Completed
Push — console-installer ( 3d54e5...e2b50d )
by Adam
69:10 queued 48:24
created
modules/Meetings/metadata/quickcreatedefs.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -38,48 +38,48 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $viewdefs ['Meetings'] =
41
-array (
41
+array(
42 42
   'QuickCreate' =>
43
-  array (
43
+  array(
44 44
     'templateMeta' =>
45
-    array (
45
+    array(
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49 49
       'maxColumns' => '2',
50 50
       'form' =>
51
-      array (
51
+      array(
52 52
         'hidden' =>
53
-        array (
53
+        array(
54 54
            '<input type="hidden" name="isSaveAndNew" value="false">',
55 55
            '<input type="hidden" name="is_ajax_call" value="1">',
56 56
         ),
57 57
         'buttons' =>
58
-        array (
58
+        array(
59 59
 
60
-          array (
60
+          array(
61 61
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
62 62
           ),
63 63
            'CANCEL',
64 64
 
65
-          array (
65
+          array(
66 66
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.meetings.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\');" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
67 67
           ),
68 68
 
69
-          array (
69
+          array(
70 70
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Meetings\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\');" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
71 71
           ),
72 72
         ),
73 73
       ),
74 74
       'widths' =>
75
-      array (
75
+      array(
76 76
 
77
-        array (
77
+        array(
78 78
           'label' => '10',
79 79
           'field' => '30',
80 80
         ),
81 81
 
82
-        array (
82
+        array(
83 83
           'label' => '10',
84 84
           'field' => '30',
85 85
         ),
@@ -90,60 +90,60 @@  discard block
 block discarded – undo
90 90
       'useTabs' => false,
91 91
     ),
92 92
     'panels' =>
93
-    array (
93
+    array(
94 94
       'default' =>
95
-      array (
95
+      array(
96 96
 
97
-        array (
97
+        array(
98 98
 
99
-          array (
99
+          array(
100 100
             'name' => 'name',
101 101
             'displayParams' =>
102
-            array (
102
+            array(
103 103
               'required' => true,
104 104
             ),
105 105
           ),
106 106
 
107
-          array (
107
+          array(
108 108
             'name' => 'status',
109 109
             'fields' =>
110
-            array (
110
+            array(
111 111
 
112
-              array (
112
+              array(
113 113
                 'name' => 'status',
114 114
               ),
115 115
             ),
116 116
           ),
117 117
         ),
118
-        array (
118
+        array(
119 119
 
120
-          array (
120
+          array(
121 121
             'name' => 'date_start',
122 122
             'type' => 'datetimecombo',
123 123
             'displayParams' =>
124
-            array (
124
+            array(
125 125
               'required' => true,
126 126
               'updateCallback' => 'SugarWidgetScheduler.update_time();',
127 127
             ),
128 128
           ),
129 129
 
130
-          array (
130
+          array(
131 131
             'name' => 'parent_name',
132 132
             'label' => 'LBL_LIST_RELATED_TO',
133 133
           ),
134 134
         ),
135 135
         
136
-        array (
137
-          array (
136
+        array(
137
+          array(
138 138
             'name' => 'date_end',
139 139
             'type' => 'datetimecombo',
140 140
             'displayParams' =>
141
-            array (
141
+            array(
142 142
               'required' => true,
143 143
               'updateCallback' => 'SugarWidgetScheduler.update_time();',
144 144
             ),
145 145
           ),
146
-          array (
146
+          array(
147 147
             'name' => 'location',
148 148
             'comment' => 'Meeting location',
149 149
             'label' => 'LBL_LOCATION',
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         ),
152 152
         
153 153
         array(        
154
-          array (
154
+          array(
155 155
             'name' => 'duration',
156 156
             'customCode' => '
157 157
                 @@FIELD@@
@@ -174,24 +174,24 @@  discard block
 block discarded – undo
174 174
 //            'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
175 175
 //            'label' => 'LBL_REMINDER',
176 176
 //          ),
177
-              array (
177
+              array(
178 178
                   'name' => 'reminders',
179 179
                   'customCode' => '{include file="modules/Reminders/tpls/reminders.tpl"}',
180 180
                   'label' => 'LBL_REMINDERS',
181 181
               ),
182 182
        ),
183 183
 
184
-         array (
185
-         	 array (
184
+         array(
185
+         	 array(
186 186
             'name' => 'assigned_user_name',
187 187
             'label' => 'LBL_ASSIGNED_TO_NAME',
188 188
           ),
189 189
 
190 190
         ),
191 191
 
192
-        array (
192
+        array(
193 193
 
194
-          array (
194
+          array(
195 195
             'name' => 'description',
196 196
             'comment' => 'Full text of the note',
197 197
             'label' => 'LBL_DESCRIPTION',
Please login to merge, or discard this patch.
modules/Meetings/metadata/listviewdefs.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,28 +38,28 @@  discard block
 block discarded – undo
38 38
  ********************************************************************************/
39 39
 
40 40
 $listViewDefs ['Meetings'] = 
41
-array (
41
+array(
42 42
   'SET_COMPLETE' => 
43
-  array (
43
+  array(
44 44
     'width' => '1%',
45 45
     'label' => 'LBL_LIST_CLOSE',
46 46
     'link' => true,
47 47
     'sortable' => false,
48 48
     'default' => true,
49 49
     'related_fields' => 
50
-    array (
50
+    array(
51 51
       0 => 'status',
52 52
     ),
53 53
   ),
54 54
   'NAME' => 
55
-  array (
55
+  array(
56 56
     'width' => '40%',
57 57
     'label' => 'LBL_LIST_SUBJECT',
58 58
     'link' => true,
59 59
     'default' => true,
60 60
   ),
61 61
   'CONTACT_NAME' => 
62
-  array (
62
+  array(
63 63
     'width' => '20%',
64 64
     'label' => 'LBL_LIST_CONTACT',
65 65
     'link' => true,
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     'ACLTag' => 'CONTACT',
70 70
   ),
71 71
   'PARENT_NAME' => 
72
-  array (
72
+  array(
73 73
     'width' => '20%',
74 74
     'label' => 'LBL_LIST_RELATED_TO',
75 75
     'dynamic_module' => 'PARENT_TYPE',
@@ -79,24 +79,24 @@  discard block
 block discarded – undo
79 79
     'sortable' => false,
80 80
     'ACLTag' => 'PARENT',
81 81
     'related_fields' => 
82
-    array (
82
+    array(
83 83
       0 => 'parent_id',
84 84
       1 => 'parent_type',
85 85
     ),
86 86
   ),
87 87
   'DATE_START' => 
88
-  array (
88
+  array(
89 89
     'width' => '15%',
90 90
     'label' => 'LBL_LIST_DATE',
91 91
     'link' => false,
92 92
     'default' => true,
93 93
     'related_fields' => 
94
-    array (
94
+    array(
95 95
       0 => 'time_start',
96 96
     ),
97 97
   ),
98 98
   'ASSIGNED_USER_NAME' => 
99
-  array (
99
+  array(
100 100
     'width' => '2%',
101 101
     'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
102 102
     'module' => 'Employees',
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
     'default' => true,
105 105
   ),
106 106
   'DIRECTION' => 
107
-  array (
107
+  array(
108 108
     'type' => 'enum',
109 109
     'label' => 'LBL_LIST_DIRECTION',
110 110
     'width' => '10%',
111 111
     'default' => false,
112 112
   ),
113 113
   'STATUS' => 
114
-  array (
114
+  array(
115 115
     'width' => '10%',
116 116
     'label' => 'LBL_LIST_STATUS',
117 117
     'link' => false,
118 118
     'default' => false,
119 119
   ),
120
-  'DATE_ENTERED' => array (
120
+  'DATE_ENTERED' => array(
121 121
 	'width' => '10%',
122 122
 	'label' => 'LBL_DATE_ENTERED',
123 123
 	'default' => true
Please login to merge, or discard this patch.
modules/Meetings/views/view.edit.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  	 */
53 53
  	public function preDisplay()
54 54
  	{
55
- 		if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) {
55
+ 		if (!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) {
56 56
 	       $this->bean->status = 'Held';
57 57
  		}
58 58
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			$javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->id);
75 75
 		}
76 76
  		$this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
77
- 		if($this->ev->isDuplicate){
77
+ 		if ($this->ev->isDuplicate) {
78 78
 	        $this->bean->status = $this->bean->getDefaultStatus();
79 79
  		} //if
80 80
 
Please login to merge, or discard this patch.
modules/ModuleBuilder/language/en_us.lang.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -730,9 +730,9 @@
 block discarded – undo
730 730
 
731 731
     'LBL_ILLEGAL_FIELD_VALUE' => "Drop down key cannot contain quotes.",
732 732
     'LBL_CONFIRM_SAVE_DROPDOWN' => "You are selecting this item for removal from the dropdown list. Any dropdown fields using this list with this item as a value will no longer display the value, and the value will no longer be able to be selected from the dropdown fields. Are you sure you want to continue?",
733
-    'LBL_POPHELP_VALIDATE_US_PHONE' => "Select to validate this field for the entry of a 10-digit<br>" .
734
-        "phone number, with allowance for the country code 1, and<br>" .
735
-        "to apply a U.S. format to the phone number when the record<br>" .
733
+    'LBL_POPHELP_VALIDATE_US_PHONE' => "Select to validate this field for the entry of a 10-digit<br>".
734
+        "phone number, with allowance for the country code 1, and<br>".
735
+        "to apply a U.S. format to the phone number when the record<br>".
736 736
         "is saved. The following format will be applied: (xxx) xxx-xxxx.",
737 737
     'LBL_ALL_MODULES' => 'All Modules',
738 738
     'LBL_RELATED_FIELD_ID_NAME_LABEL' => '{0} (related {1} ID)',
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.module.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	    global $mod_strings;
52 52
 	    
53 53
     	return array(
54
-    	   translate('LBL_MODULE_NAME','Administration'),
54
+    	   translate('LBL_MODULE_NAME', 'Administration'),
55 55
     	   ModuleBuilderController::getModuleTitle(),
56 56
     	   );
57 57
     }
@@ -65,20 +65,20 @@  discard block
 block discarded – undo
65 65
 		$mb = new ModuleBuilder();
66 66
 		$mb->getPackage($_REQUEST['view_package']);
67 67
 		$package = $mb->packages[$_REQUEST['view_package']];
68
-		$module_name = (!empty($_REQUEST['view_module']))?$_REQUEST['view_module']:'';
68
+		$module_name = (!empty($_REQUEST['view_module'])) ? $_REQUEST['view_module'] : '';
69 69
 		$package->getModule($module_name);
70 70
 		$this->mbModule = $package->modules[$module_name];
71 71
 		$this->loadPackageHelp($module_name);
72 72
 		
73 73
 		// set up the list of either available types for a new module, or implemented types for an existing one
74
-        $types = (empty($module_name)) ? MBModule::getTypes() : $this->mbModule->mbvardefs->templates ;
74
+        $types = (empty($module_name)) ? MBModule::getTypes() : $this->mbModule->mbvardefs->templates;
75 75
         
76
-        foreach( $types as $type=>$definition)
76
+        foreach ($types as $type=>$definition)
77 77
         {
78
-            $translated_type[$type]=translate('LBL_TYPE_'.strtoupper($type),'ModuleBuilder');
78
+            $translated_type[$type] = translate('LBL_TYPE_'.strtoupper($type), 'ModuleBuilder');
79 79
         }
80 80
         natcasesort($translated_type);
81
-        $smarty->assign('types',$translated_type);
81
+        $smarty->assign('types', $translated_type);
82 82
 		
83 83
 		$smarty->assign('package', $package);
84 84
 		$smarty->assign('module', $this->mbModule);
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
 
87 87
 		$ajax = new AjaxCompose();
88 88
 		$ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
89
-		$ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")');
90
-		if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
89
+		$ajax->addCrumb(' '.$package->name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")');
90
+		if (empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
91 91
 		$ajax->addCrumb($module_name, '');
92
-		$html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl');
93
-		if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule')
94
-			$html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
92
+		$html = $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl');
93
+		if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'SaveModule')
94
+			$html .= "<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
95 95
 		$ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html);
96 96
 		
97 97
 		echo $ajax->getJavascript();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
  	    $name
102 102
  	    )
103 103
  	{
104
-        $this->mbModule->help['default'] = (empty($name))?'create':'modify';
104
+        $this->mbModule->help['default'] = (empty($name)) ? 'create' : 'modify';
105 105
         $this->mbModule->help['group'] = 'module';
106 106
  	}
107 107
 }
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.searchview.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined ( 'sugarEntry' ) || ! sugarEntry)
3
-die ( 'Not A Valid Entry Point' ) ;
2
+if (!defined('sugarEntry') || !sugarEntry)
3
+die ('Not A Valid Entry Point');
4 4
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
6 6
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 
44 44
 
45 45
 
46
-require_once ('modules/ModuleBuilder/views/view.listview.php') ;
47
-require_once 'modules/ModuleBuilder/parsers/constants.php' ;
46
+require_once ('modules/ModuleBuilder/views/view.listview.php');
47
+require_once 'modules/ModuleBuilder/parsers/constants.php';
48 48
 
49 49
 class ViewSearchView extends ViewListView
50 50
 {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	    global $mod_strings;
65 65
 	    
66 66
     	return array(
67
-    	   translate('LBL_MODULE_NAME','Administration'),
67
+    	   translate('LBL_MODULE_NAME', 'Administration'),
68 68
     	   ModuleBuilderController::getModuleTitle(),
69 69
     	   );
70 70
     }
@@ -78,58 +78,58 @@  discard block
 block discarded – undo
78 78
  	    $preview = false
79 79
  	    )
80 80
  	{
81
- 		$packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ;
82
- 		require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ;
83
- 		$parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ;
81
+ 		$packageName = (isset ($_REQUEST ['view_package'])) ? $_REQUEST ['view_package'] : '';
82
+ 		require_once 'modules/ModuleBuilder/parsers/ParserFactory.php';
83
+ 		$parser = ParserFactory::getParser($this->editLayout, $this->editModule, $packageName);
84 84
 
85
- 		$smarty = parent::constructSmarty ( $parser ) ;
86
- 		$smarty->assign ( 'action', 'searchViewSave' ) ;
87
- 		$smarty->assign ( 'view', $this->editLayout ) ;
88
- 		$smarty->assign ( 'helpName', 'searchViewEditor' ) ;
89
- 		$smarty->assign ( 'helpDefault', 'modify' ) ;
85
+ 		$smarty = parent::constructSmarty($parser);
86
+ 		$smarty->assign('action', 'searchViewSave');
87
+ 		$smarty->assign('view', $this->editLayout);
88
+ 		$smarty->assign('helpName', 'searchViewEditor');
89
+ 		$smarty->assign('helpDefault', 'modify');
90 90
 
91 91
  		if ($preview)
92 92
  		{
93
- 			echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ;
93
+ 			echo $smarty->fetch("modules/ModuleBuilder/tpls/Preview/listView.tpl");
94 94
  		} else
95 95
  		{
96
- 			$ajax = $this->constructAjax () ;
97
- 			$ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ;
98
- 			echo $ajax->getJavascript () ;
96
+ 			$ajax = $this->constructAjax();
97
+ 			$ajax->addSection('center', translate($this->title), $smarty->fetch("modules/ModuleBuilder/tpls/listView.tpl"));
98
+ 			echo $ajax->getJavascript();
99 99
  		}
100 100
  	}
101 101
 
102 102
  	function constructAjax()
103 103
  	{
104
- 		require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ;
105
- 		$ajax = new AjaxCompose ( ) ;
106
- 		switch ( $this->editLayout )
104
+ 		require_once ('modules/ModuleBuilder/MB/AjaxCompose.php');
105
+ 		$ajax = new AjaxCompose( );
106
+ 		switch ($this->editLayout)
107 107
  		{
108 108
  			default:
109
- 				$searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ;
109
+ 				$searchLabel = 'LBL_'.strtoupper($this->editLayout);
110 110
  		}
111 111
 
112
-        $layoutLabel = 'LBL_LAYOUTS' ;
113
-        $layoutView = 'layouts' ;
112
+        $layoutLabel = 'LBL_LAYOUTS';
113
+        $layoutView = 'layouts';
114 114
 
115 115
 
116 116
  		if ($this->fromModuleBuilder)
117 117
  		{
118
- 			$ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ;
119
- 			$ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ;
120
- 			$ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")'  ) ;
121
- 			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")'  ) ;
122
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")'  ) ;
123
- 			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ;
118
+ 			$ajax->addCrumb(translate('LBL_MODULEBUILDER', 'ModuleBuilder'), 'ModuleBuilder.main("mb")');
119
+ 			$ajax->addCrumb($_REQUEST ['view_package'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$_REQUEST ['view_package'].'")');
120
+ 			$ajax->addCrumb($this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package='.$_REQUEST ['view_package']."&view_module={$this->editModule}".'")');
121
+ 			$ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module='.$this->editModule.'&view_package='.$_REQUEST['view_package'].'")');
122
+ 			if ($layoutLabel == 'LBL_LAYOUTS') $ajax->addCrumb(translate('LBL_SEARCH_FORMS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module='.$this->editModule.'&view_package='.$_REQUEST ['view_package'].'")');
123
+ 			$ajax->addCrumb(translate($searchLabel, 'ModuleBuilder'), '');
124 124
  		} else
125 125
  		{
126
- 			$ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ;
127
- 			$ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")'  ) ;
128
- 			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")'  ) ;
129
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ;
130
- 			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), ''  ) ;
126
+ 			$ajax->addCrumb(translate('LBL_STUDIO', 'ModuleBuilder'), 'ModuleBuilder.main("studio")');
127
+ 			$ajax->addCrumb($this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module='.$this->editModule.'")');
128
+ 			$ajax->addCrumb(translate($layoutLabel, 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module='.$this->editModule.'")');
129
+ 			if ($layoutLabel == 'LBL_LAYOUTS') $ajax->addCrumb(translate('LBL_SEARCH_FORMS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module='.$this->editModule.'")');
130
+ 			$ajax->addCrumb(translate($searchLabel, 'ModuleBuilder'), '');
131 131
  		}
132 132
  		$this->title = $searchLabel;
133
- 		return $ajax ;
133
+ 		return $ajax;
134 134
  	}
135 135
 }
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.exportcustomizations.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	    global $mod_strings;
49 49
 	    
50 50
     	return array(
51
-    	   translate('LBL_MODULE_NAME','Administration'),
51
+    	   translate('LBL_MODULE_NAME', 'Administration'),
52 52
     	   ModuleBuilderController::getModuleTitle(),
53 53
     	   );
54 54
     }
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
  		global $current_user, $mod_strings;
59 59
  		$smarty = new Sugar_Smarty();
60 60
  		$mb = new MBPackage("packageCustom");
61
- 		$mod=$mb->getCustomModules();
62
- 		foreach($mod as $key => $value){
63
- 		    $modules[]=$key;
64
- 		    $custom[]=$value;
61
+ 		$mod = $mb->getCustomModules();
62
+ 		foreach ($mod as $key => $value) {
63
+ 		    $modules[] = $key;
64
+ 		    $custom[] = $value;
65 65
  		}
66 66
  		$nb_mod = count($modules);
67 67
  		$smarty->assign('mod_strings', $mod_strings);
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
  		$smarty->assign('custom', $custom);
70 70
  		$smarty->assign('nb_mod', $nb_mod);
71 71
  		$smarty->assign('defaultHelp', 'exportHelp');
72
- 		$smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
73
- 		$smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
72
+ 		$smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);  
73
+ 		$smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);  
74 74
 		$ajax = new AjaxCompose();
75 75
 		$ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
76
-		$ajax->addSection('center', $mod_strings['LBL_EC_TITLE'],$smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
76
+		$ajax->addSection('center', $mod_strings['LBL_EC_TITLE'], $smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
77 77
 		echo $ajax->getJavascript();
78 78
  	}
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.relationship.php 1 patch
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
38 38
  ********************************************************************************/
39 39
 
40
-require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ;
41
-require_once ('modules/ModuleBuilder/MB/ModuleBuilder.php') ;
42
-require_once ('modules/ModuleBuilder/Module/StudioModuleFactory.php') ;
43
-require_once ('modules/ModuleBuilder/Module/StudioBrowser.php') ;
44
-require_once ('modules/ModuleBuilder/parsers/constants.php') ;
45
-require_once 'modules/ModuleBuilder/parsers/relationships/RelationshipFactory.php' ;
40
+require_once ('modules/ModuleBuilder/MB/AjaxCompose.php');
41
+require_once ('modules/ModuleBuilder/MB/ModuleBuilder.php');
42
+require_once ('modules/ModuleBuilder/Module/StudioModuleFactory.php');
43
+require_once ('modules/ModuleBuilder/Module/StudioBrowser.php');
44
+require_once ('modules/ModuleBuilder/parsers/constants.php');
45
+require_once 'modules/ModuleBuilder/parsers/relationships/RelationshipFactory.php';
46 46
 
47 47
 class ViewRelationship extends SugarView
48 48
 {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	    global $mod_strings;
55 55
 	    
56 56
     	return array(
57
-    	   translate('LBL_MODULE_NAME','Administration'),
57
+    	   translate('LBL_MODULE_NAME', 'Administration'),
58 58
     	   ModuleBuilderController::getModuleTitle(),
59 59
     	   );
60 60
     }
@@ -63,214 +63,214 @@  discard block
 block discarded – undo
63 63
         $definition
64 64
         )
65 65
     {
66
-        require_once 'modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' ;
67
-        foreach ( AbstractRelationship::$definitionKeys as $key )
66
+        require_once 'modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php';
67
+        foreach (AbstractRelationship::$definitionKeys as $key)
68 68
         {
69
-        	if(!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label')) ){
69
+        	if (!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label'))) {
70 70
         		continue;
71 71
         	}
72
-            if (! empty ( $_REQUEST [ $key ] ))
72
+            if (!empty ($_REQUEST [$key]))
73 73
             {
74
-                $definition [ $key ] = $_REQUEST [ $key ] ;
74
+                $definition [$key] = $_REQUEST [$key];
75 75
             }
76 76
         }
77
-        return $definition ;
77
+        return $definition;
78 78
     }
79 79
 
80 80
     function display()
81 81
     {
82
-        $selected_lang = (!empty($_REQUEST['relationship_lang'])?$_REQUEST['relationship_lang']:$_SESSION['authenticated_user_language']);
83
-        $this->smarty = new Sugar_Smarty ( ) ;
84
-        $ac = new AjaxCompose ( ) ;
85
-        $this->fromModuleBuilder = isset ( $_REQUEST [ 'MB' ] ) || (!empty ( $_REQUEST [ 'view_package' ] ) && $_REQUEST [ 'view_package' ] != 'studio') ;
86
-        $this->smarty->assign ( 'fromModuleBuilder', $this->fromModuleBuilder ) ;
82
+        $selected_lang = (!empty($_REQUEST['relationship_lang']) ? $_REQUEST['relationship_lang'] : $_SESSION['authenticated_user_language']);
83
+        $this->smarty = new Sugar_Smarty( );
84
+        $ac = new AjaxCompose( );
85
+        $this->fromModuleBuilder = isset ($_REQUEST ['MB']) || (!empty ($_REQUEST ['view_package']) && $_REQUEST ['view_package'] != 'studio');
86
+        $this->smarty->assign('fromModuleBuilder', $this->fromModuleBuilder);
87 87
         
88 88
         if (!$this->fromModuleBuilder)
89 89
         {
90
-            $module = StudioModuleFactory::getStudioModule( $_REQUEST [ 'view_module' ] ) ;
91
-            $moduleName = $_REQUEST [ 'view_module' ] ;
92
-            $fields = $module->fields ;
93
-            require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ;
94
-            $relatableModules = DeployedRelationships::findRelatableModules () ;
95
-        	$appStrings = return_app_list_strings_language( $selected_lang ) ;
96
-        	$modStrings = return_module_language( $selected_lang, $_REQUEST [ 'view_module' ], true ) ;
90
+            $module = StudioModuleFactory::getStudioModule($_REQUEST ['view_module']);
91
+            $moduleName = $_REQUEST ['view_module'];
92
+            $fields = $module->fields;
93
+            require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php';
94
+            $relatableModules = DeployedRelationships::findRelatableModules();
95
+        	$appStrings = return_app_list_strings_language($selected_lang);
96
+        	$modStrings = return_module_language($selected_lang, $_REQUEST ['view_module'], true);
97 97
         	$appStrings = $appStrings['moduleList'];
98 98
         } else
99 99
         {
100
-            $mb = new ModuleBuilder ( ) ;
100
+            $mb = new ModuleBuilder( );
101 101
 			$mb->getPackages();
102 102
 			//display the latest module name rather than what is in or not in the loaded app_list_strings.
103 103
 			$mb->getPackage($_REQUEST ['view_package'])->loadModuleTitles();
104
-            $module = $mb->getPackageModule ( $_REQUEST [ 'view_package' ], $_REQUEST [ 'view_module' ] ) ;
104
+            $module = $mb->getPackageModule($_REQUEST ['view_package'], $_REQUEST ['view_module']);
105 105
             $moduleName = empty($module->key_name) ? $module->getModuleName() : $module->key_name;
106
-            $this->smarty->assign ( 'view_package', $_REQUEST [ 'view_package' ] ) ;
107
-            $mbvardefs = $module->getVardefs () ;
108
-            $fields = $mbvardefs [ 'fields' ] ;
109
-            require_once 'modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php' ;
110
-            $relatableModules = UndeployedRelationships::findRelatableModules () ;
111
-            $appStrings = $module->getModStrings( $selected_lang ) ;
106
+            $this->smarty->assign('view_package', $_REQUEST ['view_package']);
107
+            $mbvardefs = $module->getVardefs();
108
+            $fields = $mbvardefs ['fields'];
109
+            require_once 'modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php';
110
+            $relatableModules = UndeployedRelationships::findRelatableModules();
111
+            $appStrings = $module->getModStrings($selected_lang);
112 112
         }
113 113
         
114
-        ksort( $relatableModules ) ;
115
-        $lhs_subpanels = $module->getProvidedSubpanels () ;
114
+        ksort($relatableModules);
115
+        $lhs_subpanels = $module->getProvidedSubpanels();
116 116
         // Fix to re-add sorting of the subpanel names so that the 'default' subpanel always appears first in the list. 
117 117
         // This assumes that subpanels are usually named ForXYZ which is the case currently, and hence 'default' will be sorted first. 
118 118
         //I f this assumption is incorrect, then a better solution would be to remove 'default' from the subpanel list, then sort, and finally array_unshift it back on.
119 119
         natcasesort($lhs_subpanels);
120 120
                 
121
-        $cardinality = array ( MB_ONETOONE => translate ( 'LBL_ONETOONE' ) , MB_ONETOMANY => translate ( 'LBL_ONETOMANY' ) , MB_MANYTOONE=> translate ( 'LBL_MANYTOONE' ), MB_MANYTOMANY => translate ( 'LBL_MANYTOMANY' ), ) ;
121
+        $cardinality = array(MB_ONETOONE => translate('LBL_ONETOONE'), MB_ONETOMANY => translate('LBL_ONETOMANY'), MB_MANYTOONE=> translate('LBL_MANYTOONE'), MB_MANYTOMANY => translate('LBL_MANYTOMANY'),);
122 122
         
123 123
         if (!$this->fromModuleBuilder)
124 124
             unset($cardinality[MB_MANYTOONE]);
125 125
             
126
-        $relationships = $module->getRelationships () ;
126
+        $relationships = $module->getRelationships();
127 127
         
128 128
         // if a description for this relationship already exists, then load it so it can be modified
129
-        if (! empty ( $_REQUEST [ 'relationship_name' ] ))
129
+        if (!empty ($_REQUEST ['relationship_name']))
130 130
         {
131
-            $relationship = $relationships->get ( $_REQUEST [ 'relationship_name' ] ) ;
132
-            $relationship->setName($_REQUEST [ 'relationship_name' ] );
131
+            $relationship = $relationships->get($_REQUEST ['relationship_name']);
132
+            $relationship->setName($_REQUEST ['relationship_name']);
133 133
             $definition = $relationship->getDefinition();
134
-            if (!$this->fromModuleBuilder){
135
-        		$modStrings = return_module_language( $selected_lang, $relationship->rhs_module, true ) ;
136
-	            $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module;
137
-	            $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ;
138
-	    		$definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ;
139
-			}else{
134
+            if (!$this->fromModuleBuilder) {
135
+        		$modStrings = return_module_language($selected_lang, $relationship->rhs_module, true);
136
+	            $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()]) ? $modStrings[$relationship->getTitleKey()] : $relationship->lhs_module;
137
+	            $modStrings = return_module_language($selected_lang, $relationship->lhs_module, true);
138
+	    		$definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)]) ? $modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module;
139
+			} else {
140 140
 				#30624
141
-				if(!empty($_REQUEST['rhs_module'])){
141
+				if (!empty($_REQUEST['rhs_module'])) {
142 142
 					$definition['rhs_label'] = $_REQUEST['rhs_module'];
143 143
 				}
144 144
 			}
145 145
         } else
146 146
         {
147
-            $definition = array ( ) ;
148
-            $firstModuleDefinition = each ( $relatableModules ) ;
149
-            $definition [ 'rhs_module' ] = $firstModuleDefinition [ 'key' ] ;
150
-            $definition [ 'lhs_module' ] = $moduleName ;
151
-            $definition [ 'lhs_label' ] = translate($moduleName);
152
-            $definition [ 'relationship_type' ] = MB_MANYTOMANY ;
147
+            $definition = array( );
148
+            $firstModuleDefinition = each($relatableModules);
149
+            $definition ['rhs_module'] = $firstModuleDefinition ['key'];
150
+            $definition ['lhs_module'] = $moduleName;
151
+            $definition ['lhs_label'] = translate($moduleName);
152
+            $definition ['relationship_type'] = MB_MANYTOMANY;
153 153
         }
154 154
         // load the relationship from post - required as we can call view.relationship.php from Ajax when changing the rhs_module for example           
155
-        $definition = $this->overrideDefinitionFromPOST ( $definition ) ;
155
+        $definition = $this->overrideDefinitionFromPOST($definition);
156 156
         
157 157
         if (empty($definition ['rhs_label']))
158 158
         {
159
-        	$definition ['rhs_label'] = translate($definition [ 'rhs_module' ]);
159
+        	$definition ['rhs_label'] = translate($definition ['rhs_module']);
160 160
         }
161 161
         if (empty($definition ['lhs_label']))
162 162
         {
163
-            $definition ['lhs_label'] = translate($definition [ 'lhs_module' ]);
163
+            $definition ['lhs_label'] = translate($definition ['lhs_module']);
164 164
         }
165
-        $relationship = RelationshipFactory::newRelationship ( $definition ) ;
165
+        $relationship = RelationshipFactory::newRelationship($definition);
166 166
         
167
-        $rhs_subpanels = $relatableModules [ $relationship->rhs_module ] ;
167
+        $rhs_subpanels = $relatableModules [$relationship->rhs_module];
168 168
         // Fix to re-add sorting of the subpanel names so that the 'default' subpanel always appears first in the list. This assumes that subpanels are usually named ForXYZ which is the case currently, and hence 'default' will be sorted first. If this assumption is incorrect, then a better solution would be to remove 'default' from the subpanel list, then sort, and finally array_unshift it back on.
169 169
         natcasesort($rhs_subpanels);
170 170
         
171
-        if (empty ( $_REQUEST [ 'relationship_name' ] ))
171
+        if (empty ($_REQUEST ['relationship_name']))
172 172
         {
173 173
             // tidy up the options for the view based on the modules participating in the relationship and the cardinality
174 174
             // some modules (e.g., Knowledge Base/KBDocuments) lack subpanels. That means they can't be the lhs of a 1-many or many-many, or the rhs of a many-many for example          
175 175
 
176 176
             // fix up the available cardinality options
177
-            $relationship_type = $relationship->getType () ;
178
-            if (count ( $lhs_subpanels ) == 0 || count ( $rhs_subpanels ) == 0)
177
+            $relationship_type = $relationship->getType();
178
+            if (count($lhs_subpanels) == 0 || count($rhs_subpanels) == 0)
179 179
             {
180
-                unset ( $cardinality [ MB_MANYTOMANY ] ) ;
180
+                unset ($cardinality [MB_MANYTOMANY]);
181 181
             }
182
-            if (count ( $rhs_subpanels ) == 0)
182
+            if (count($rhs_subpanels) == 0)
183 183
             {
184
-                unset ( $cardinality [ MB_ONETOMANY ] ) ;
184
+                unset ($cardinality [MB_ONETOMANY]);
185 185
             }
186 186
 
187 187
             if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Activities') {
188
-            	$cardinality = array( MB_ONETOMANY => translate ( 'LBL_ONETOMANY' ));
188
+            	$cardinality = array(MB_ONETOMANY => translate('LBL_ONETOMANY'));
189 189
             }
190 190
             //Bug 23139, Campaigns module current cannot display custom subpanels, so we need to ban it from any
191 191
             //relationships that would require a new subpanel to be shown in Campaigns.
192 192
         	if (isset ($definition['lhs_module']) && $definition['lhs_module'] == 'Campaigns') {
193
-            	unset ( $cardinality [ MB_MANYTOMANY ] ) ;
194
-            	unset ( $cardinality [ MB_ONETOMANY ] ) ;
193
+            	unset ($cardinality [MB_MANYTOMANY]);
194
+            	unset ($cardinality [MB_ONETOMANY]);
195 195
             }
196
-        	if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [ MB_MANYTOMANY ])) {
197
-            	unset ( $cardinality [ MB_MANYTOMANY ] ) ;
198
-            	unset ( $cardinality [ MB_MANYTOONE ] );
196
+        	if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [MB_MANYTOMANY])) {
197
+            	unset ($cardinality [MB_MANYTOMANY]);
198
+            	unset ($cardinality [MB_MANYTOONE]);
199 199
             }
200
-            if (! isset($cardinality[$relationship->getType()]))
200
+            if (!isset($cardinality[$relationship->getType()]))
201 201
             {
202
-                end ($cardinality) ;
203
-                $definition [ 'relationship_type' ] = key ( $cardinality ) ;
204
-                $relationship = RelationshipFactory::newRelationship ( $definition ) ;
202
+                end($cardinality);
203
+                $definition ['relationship_type'] = key($cardinality);
204
+                $relationship = RelationshipFactory::newRelationship($definition);
205 205
             }
206 206
             
207
-            $this->smarty->assign ( 'is_new', true ) ;
207
+            $this->smarty->assign('is_new', true);
208 208
         } else {
209
-        	$this->smarty->assign ( 'is_new', false ) ;
209
+        	$this->smarty->assign('is_new', false);
210 210
         }
211 211
         
212 212
         //Remove Activities if one-to-many is not availible
213
-    	if (!isset($cardinality [ MB_ONETOMANY ]) && isset ($relatableModules['Activities'])) {
213
+    	if (!isset($cardinality [MB_ONETOMANY]) && isset ($relatableModules['Activities'])) {
214 214
         	unset ($relatableModules['Activities']);
215 215
         }
216 216
         
217 217
         
218 218
         // now enforce the relationship_only requirement - that is, only construct the underlying relationship and link fields, and not the UI, if the subpanel code will have troubles displaying the UI                
219
-        $relationships->enforceRelationshipOnly ( $relationship ) ;
220
-        $this->smarty->assign ( 'view_module', $_REQUEST['view_module'] ) ;
221
-        $this->smarty->assign ( 'rel', $relationship->getDefinition () ) ;
222
-        $this->smarty->assign ( 'mod_strings', $GLOBALS [ 'mod_strings' ] ) ;
223
-        $this->smarty->assign ( 'module_key', $relationship->lhs_module ) ;
224
-        $this->smarty->assign ( 'cardinality', array_keys ( $cardinality ) ) ;
225
-        $this->smarty->assign ( 'translated_cardinality', $cardinality ) ;
226
-        $this->smarty->assign ( 'selected_cardinality', translate ( $relationship->getType () ) ) ;
219
+        $relationships->enforceRelationshipOnly($relationship);
220
+        $this->smarty->assign('view_module', $_REQUEST['view_module']);
221
+        $this->smarty->assign('rel', $relationship->getDefinition());
222
+        $this->smarty->assign('mod_strings', $GLOBALS ['mod_strings']);
223
+        $this->smarty->assign('module_key', $relationship->lhs_module);
224
+        $this->smarty->assign('cardinality', array_keys($cardinality));
225
+        $this->smarty->assign('translated_cardinality', $cardinality);
226
+        $this->smarty->assign('selected_cardinality', translate($relationship->getType()));
227 227
         
228
-        $relatable = array ( ) ;
229
-        foreach ( $relatableModules as $name => $dummy )
228
+        $relatable = array( );
229
+        foreach ($relatableModules as $name => $dummy)
230 230
         {
231
-            $relatable [ $name ] = translate ( $name ) ;
231
+            $relatable [$name] = translate($name);
232 232
         }
233
-        unset($relatable [ 'KBDocuments' ] ) ;
234
-        natcasesort ( $relatable ) ;
235
-        $this->smarty->assign ( 'relatable', array_keys ( $relatable ) ) ;
236
-        $this->smarty->assign ( 'translated_relatable', $relatable ) ;
237
-        $this->smarty->assign ( 'rhspanels', $rhs_subpanels ) ;
238
-        $this->smarty->assign ( 'lhspanels', $lhs_subpanels ) ;
233
+        unset($relatable ['KBDocuments']);
234
+        natcasesort($relatable);
235
+        $this->smarty->assign('relatable', array_keys($relatable));
236
+        $this->smarty->assign('translated_relatable', $relatable);
237
+        $this->smarty->assign('rhspanels', $rhs_subpanels);
238
+        $this->smarty->assign('lhspanels', $lhs_subpanels);
239 239
         $this->smarty->assign('selected_lang', $selected_lang);
240
-		$this->smarty->assign('available_languages',get_languages());
240
+		$this->smarty->assign('available_languages', get_languages());
241 241
         
242
-        switch ( $relationship->relationship_type)
242
+        switch ($relationship->relationship_type)
243 243
         {
244 244
             case MB_ONETOONE :
245
-                break ;
245
+                break;
246 246
             
247 247
             case MB_ONETOMANY :
248
-                if (empty ( $relationship->relationship_column_name ))
248
+                if (empty ($relationship->relationship_column_name))
249 249
                 {
250
-                    $validRoleColumnFields = array ( ) ;
251
-                    foreach ( $fields as $field )
250
+                    $validRoleColumnFields = array( );
251
+                    foreach ($fields as $field)
252 252
                     {
253
-                        $validRoleColumnFields [] = $field ;
253
+                        $validRoleColumnFields [] = $field;
254 254
                     }
255
-                    $this->smarty->assign ( 'relationship_role_column_enum', $validRoleColumnFields ) ;
255
+                    $this->smarty->assign('relationship_role_column_enum', $validRoleColumnFields);
256 256
                 }
257
-                if (! empty ( $relationship->relationship_role_column_value ))
258
-                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
259
-                break ;
257
+                if (!empty ($relationship->relationship_role_column_value))
258
+                    $this->smarty->assign('relationship_role_column_value', $relationship->relationship_role_column_value);
259
+                break;
260 260
             case MB_MANYTOMANY :
261
-                if (! empty ( $relationship->relationship_role_column_value ))
262
-                    $this->smarty->assign ( 'relationship_role_column_value', $relationship->relationship_role_column_value ) ;
263
-                break ;
261
+                if (!empty ($relationship->relationship_role_column_value))
262
+                    $this->smarty->assign('relationship_role_column_value', $relationship->relationship_role_column_value);
263
+                break;
264 264
         }
265 265
         
266 266
         //see if we use the new system
267
-        if (isset ( $_REQUEST [ 'json' ] ) && $_REQUEST [ 'json' ] == 'false')
267
+        if (isset ($_REQUEST ['json']) && $_REQUEST ['json'] == 'false')
268 268
         {
269
-            echo $this->smarty->fetch ( 'modules/ModuleBuilder/tpls/studioRelationship.tpl' ) ;
269
+            echo $this->smarty->fetch('modules/ModuleBuilder/tpls/studioRelationship.tpl');
270 270
         } else
271 271
         {
272
-            $ac->addSection ( 'east', $module->name . ' ' . $GLOBALS [ 'mod_strings' ] [ 'LBL_RELATIONSHIPS' ], $this->smarty->fetch ( 'modules/ModuleBuilder/tpls/studioRelationship.tpl' ) ) ;
273
-            echo $ac->getJavascript () ;
272
+            $ac->addSection('east', $module->name.' '.$GLOBALS ['mod_strings'] ['LBL_RELATIONSHIPS'], $this->smarty->fetch('modules/ModuleBuilder/tpls/studioRelationship.tpl'));
273
+            echo $ac->getJavascript();
274 274
         }
275 275
     }
276 276
 }
277 277
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.dropdowns.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	    global $mod_strings;
50 50
 	    
51 51
     	return array(
52
-    	   translate('LBL_MODULE_NAME','Administration'),
52
+    	   translate('LBL_MODULE_NAME', 'Administration'),
53 53
     	   ModuleBuilderController::getModuleTitle(),
54 54
     	   );
55 55
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 			require_once ('modules/ModuleBuilder/Module/DropDownTree.php');
65 65
 			$mbt = new DropDownTree();
66 66
 			$ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes());
67
-			$smarty->assign('refreshTree',true);
67
+			$smarty->assign('refreshTree', true);
68 68
 		}
69 69
                 
70 70
         global $mod_strings;
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
         require_once('modules/ModuleBuilder/Module/DropDownBrowser.php');
74 74
         $dd = new DropDownBrowser();
75 75
         
76
-        $smarty->assign('LBL_BTN_ADDDROPDOWN',translate('LBL_BTN_ADDDROPDOWN'));
76
+        $smarty->assign('LBL_BTN_ADDDROPDOWN', translate('LBL_BTN_ADDDROPDOWN'));
77 77
         $smarty->assign('dropdowns', $dd->getNodes());
78
-		$smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE']));
79
-		$smarty->assign('editImage', SugarThemeRegistry::current()->getImage( 'edit_inline', '',null,null,'.gif',$mod_strings['LBL_EDIT']));
78
+		$smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage('delete_inline', '', null, null, '.gif', $mod_strings['LBL_MB_DELETE']));
79
+		$smarty->assign('editImage', SugarThemeRegistry::current()->getImage('edit_inline', '', null, null, '.gif', $mod_strings['LBL_EDIT']));
80 80
 		$smarty->assign('action', 'savedropdown');
81 81
 		
82 82
 
83
-		$ajax->addSection('center', $GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR'], $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl') );
83
+		$ajax->addSection('center', $GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR'], $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdowns.tpl'));
84 84
  		echo $ajax->getJavascript();
85 85
  	}
86 86
 }
87 87
\ No newline at end of file
Please login to merge, or discard this patch.