Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/ModuleBuilder/views/view.modulefield.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -43,20 +43,20 @@  discard block
 block discarded – undo
43 43
 class ViewModulefield extends SugarView
44 44
 {
45 45
     /**
46
-	 * @see SugarView::_getModuleTitleParams()
47
-	 */
48
-	protected function _getModuleTitleParams($browserTitle = false)
49
-	{
50
-	    global $mod_strings;
46
+     * @see SugarView::_getModuleTitleParams()
47
+     */
48
+    protected function _getModuleTitleParams($browserTitle = false)
49
+    {
50
+        global $mod_strings;
51 51
 	    
52
-    	return array(
53
-    	   translate('LBL_MODULE_NAME','Administration'),
54
-    	   ModuleBuilderController::getModuleTitle(),
55
-    	   );
52
+        return array(
53
+            translate('LBL_MODULE_NAME','Administration'),
54
+            ModuleBuilderController::getModuleTitle(),
55
+            );
56 56
     }
57 57
 
58
-	function display()
59
-	{
58
+    function display()
59
+    {
60 60
         $ac = $this->fetch();
61 61
         echo $ac->getJavascript();
62 62
     }
@@ -76,21 +76,21 @@  discard block
 block discarded – undo
76 76
             $field_name = '';
77 77
 
78 78
         $action = 'saveField'; // tyoung bug 17606: default action is to save as a dynamic field; but for standard OOB
79
-                               // fields we override this so don't create a new dynamic field instead of updating the existing field
79
+                                // fields we override this so don't create a new dynamic field instead of updating the existing field
80 80
 
81 81
         $isClone = false;
82 82
         if(!empty($this->view_object_map['is_clone']) && $this->view_object_map['is_clone']
83 83
             && (strcmp($field_name, "name") != 0)   // bug #35767, do not allow cloning of name field
84 84
             )
85 85
             $isClone = true;
86
-		/*
86
+        /*
87 87
 		$field_types =  array('varchar'=>'YourField', 'int'=>'Integer', 'float'=>'Decimal','bool'=>'Checkbox','enum'=>'DropDown',
88 88
 				'date'=>'Date', 'phone' => 'Phone', 'currency' => 'Currency', 'html' => 'HTML', 'radioenum' => 'Radio',
89 89
 				'relate' => 'Relate', 'address' => 'Address', 'text' => 'TextArea', 'url' => 'Link');
90 90
 		*/
91
-		$field_types = $GLOBALS['mod_strings']['fieldTypes'];
92
-		if (isset($field_types['encrypt']))
93
-		  unset($field_types['encrypt']);
91
+        $field_types = $GLOBALS['mod_strings']['fieldTypes'];
92
+        if (isset($field_types['encrypt']))
93
+            unset($field_types['encrypt']);
94 94
         $field_name_exceptions = array(
95 95
             //bug 22264: Field name must not be an SQL keyword.
96 96
             //Taken from SQL Server's list of reserved keywords; http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx
@@ -110,26 +110,26 @@  discard block
 block discarded – undo
110 110
             'DROP','OPENROWSET','VIEW','DUMMY','OPENXML','WAITFOR','DUMP','OPTION','WHEN','ELSE','OR','WHERE',
111 111
             'END','ORDER','WHILE','ERRLVL','OUTER','WITH','ESCAPE','OVER','WRITETEXT',
112 112
             //Mysql Keywords from http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html (those not in MSSQL's list)
113
-			'ANALYZE', 'ASENSITIVE', 'BEFORE', 'BIGINT', 'BINARY', 'BOTH', 'CALL', 'CHANGE', 'CHARACTER',
114
-			'CONDITION', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DELAYED',
115
-			'DESCRIBE', 'DETERMINISTIC', 'DISTINCTROW', 'DIV', 'DUAL', 'EACH', 'ELSEIF', 'ENCLOSED', 'ESCAPED', 'EXPLAIN',
116
-			'FALSE', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FORCE', 'FULLTEXT', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE',
117
-			'HOUR_SECOND', 'IGNORE', 'INFILE', 'INOUT', 'INSENSITIVE', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8',
118
-			'INTEGER', 'ITERATE', 'KEYS', 'LEADING', 'LEAVE', 'LIMIT', 'LINES', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK',
119
-			'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT',
120
-			'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NO_WRITE_TO_BINLOG', 'NUMERIC', 'OPTIMIZE',
121
-			'OPTIONALLY', 'OUT', 'OUTFILE', 'PURGE', 'READS', 'REAL', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE',
122
-			'REQUIRE', 'RLIKE', 'SCHEMAS', 'SECOND_MICROSECOND', 'SENSITIVE', 'SEPARATOR', 'SHOW', 'SMALLINT', 'SONAME',
123
-			'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS',
124
-			'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'TERMINATED', 'TINYBLOB', 'TINYINT', 'TINYTEXT',
125
-			'TRAILING', 'TRUE', 'UNDO', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP',
126
-			'VARBINARY', 'VARCHARACTER', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL', 'CONNECTION', 'LABEL', 'UPGRADE',
127
-			//Oracle datatypes
113
+            'ANALYZE', 'ASENSITIVE', 'BEFORE', 'BIGINT', 'BINARY', 'BOTH', 'CALL', 'CHANGE', 'CHARACTER',
114
+            'CONDITION', 'DATABASES', 'DAY_HOUR', 'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', 'DEC', 'DECIMAL', 'DELAYED',
115
+            'DESCRIBE', 'DETERMINISTIC', 'DISTINCTROW', 'DIV', 'DUAL', 'EACH', 'ELSEIF', 'ENCLOSED', 'ESCAPED', 'EXPLAIN',
116
+            'FALSE', 'FLOAT', 'FLOAT4', 'FLOAT8', 'FORCE', 'FULLTEXT', 'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE',
117
+            'HOUR_SECOND', 'IGNORE', 'INFILE', 'INOUT', 'INSENSITIVE', 'INT', 'INT1', 'INT2', 'INT3', 'INT4', 'INT8',
118
+            'INTEGER', 'ITERATE', 'KEYS', 'LEADING', 'LEAVE', 'LIMIT', 'LINES', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCK',
119
+            'LONGBLOB', 'LONGTEXT', 'LOOP', 'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB', 'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT',
120
+            'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', 'MODIFIES', 'NATURAL', 'NO_WRITE_TO_BINLOG', 'NUMERIC', 'OPTIMIZE',
121
+            'OPTIONALLY', 'OUT', 'OUTFILE', 'PURGE', 'READS', 'REAL', 'REGEXP', 'RELEASE', 'RENAME', 'REPEAT', 'REPLACE',
122
+            'REQUIRE', 'RLIKE', 'SCHEMAS', 'SECOND_MICROSECOND', 'SENSITIVE', 'SEPARATOR', 'SHOW', 'SMALLINT', 'SONAME',
123
+            'SPATIAL', 'SPECIFIC', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS',
124
+            'SQL_SMALL_RESULT', 'SSL', 'STARTING', 'STRAIGHT_JOIN', 'TERMINATED', 'TINYBLOB', 'TINYINT', 'TINYTEXT',
125
+            'TRAILING', 'TRUE', 'UNDO', 'UNLOCK', 'UNSIGNED', 'USAGE', 'USING', 'UTC_DATE', 'UTC_TIME', 'UTC_TIMESTAMP',
126
+            'VARBINARY', 'VARCHARACTER', 'WRITE', 'XOR', 'YEAR_MONTH', 'ZEROFILL', 'CONNECTION', 'LABEL', 'UPGRADE',
127
+            //Oracle datatypes
128 128
             'DATE','VARCHAR','VARCHAR2','NVARCHAR2','CHAR','NCHAR','NUMBER','PLS_INTEGER','BINARY_INTEGER','LONG','TIMESTAMP',
129
-			'INTERVAL','RAW','ROWID','UROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','XMLTYPE',
130
-			//SugarCRM reserved
131
-        	'ID', 'ID_C', 'PARENT_NAME', 'PARENT_ID',
132
-			);
129
+            'INTERVAL','RAW','ROWID','UROWID','MLSLABEL','CLOB','NCLOB','BLOB','BFILE','XMLTYPE',
130
+            //SugarCRM reserved
131
+            'ID', 'ID_C', 'PARENT_NAME', 'PARENT_ID',
132
+            );
133 133
 
134 134
 
135 135
         //C.L. - Add support to mark related module id columns as reserved keywords
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
                 $fv->ss->assign('hideLevel', 3);
174 174
             }
175 175
             if($isClone && isset($vardef['type']) && $vardef['type'] == 'datetime'){
176
-            	$vardef['type'] = 'datetimecombo';
176
+                $vardef['type'] = 'datetimecombo';
177 177
             }
178 178
             
179
-			require_once ('modules/DynamicFields/FieldCases.php') ;
179
+            require_once ('modules/DynamicFields/FieldCases.php') ;
180 180
             $tf = get_widget ( empty($vardef [ 'type' ]) ?  "" : $vardef [ 'type' ]) ;
181 181
             $tf->module = $module;
182 182
             $tf->populateFromRow($vardef);
183
-			$vardef = array_merge($vardef, $tf->get_field_def());
183
+            $vardef = array_merge($vardef, $tf->get_field_def());
184 184
 
185 185
             //          $GLOBALS['log']->debug('vardefs after loading = '.print_r($vardef,true));
186 186
            
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
             $enumFields = array();
191 191
             foreach($module->field_defs as $field => $def)
192 192
             {
193
-            	if (!empty($def['type']) && $def['type'] == "int" && !empty($def['auto_increment'])) {
194
-            	   $allowAutoInc = false;
195
-            	   continue;
196
-            	}
193
+                if (!empty($def['type']) && $def['type'] == "int" && !empty($def['auto_increment'])) {
194
+                    $allowAutoInc = false;
195
+                    continue;
196
+                }
197 197
                 if (!empty($def['type']) && $def['type'] == "enum" && $field != $vardef['name'])
198 198
                 {
199 199
                     if(!empty($def['studio']) && $def['studio'] == "false") continue; //bug51866 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             }
211 211
             $fv->ss->assign('module', $module);
212 212
             if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent'))
213
-				$field_types['parent'] = $GLOBALS['mod_strings']['parent'];
213
+                $field_types['parent'] = $GLOBALS['mod_strings']['parent'];
214 214
 
215 215
             $edit_or_add = 'editField' ;
216 216
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 }
245 245
             }
246 246
 
247
-			require_once ('modules/DynamicFields/FieldCases.php') ;
247
+            require_once ('modules/DynamicFields/FieldCases.php') ;
248 248
             $tf = get_widget ( empty($vardef [ 'type' ]) ?  "" : $vardef [ 'type' ]) ;
249 249
             $tf->module = $module;
250 250
             $tf->populateFromRow($vardef);
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 
259 259
             if(isset($vardef['vname']))
260 260
                 $fv->ss->assign('lbl_value', htmlentities($module->getLabel('en_us',$vardef['vname']), ENT_QUOTES, 'UTF-8'));
261
-			if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent'))
262
-				$field_types['parent'] = $GLOBALS['mod_strings']['parent'];
261
+            if(empty($module->mbvardefs->vardefs['fields']['parent_name']) || (isset($vardef['type']) && $vardef['type'] == 'parent'))
262
+                $field_types['parent'] = $GLOBALS['mod_strings']['parent'];
263 263
 
264 264
             $enumFields = array();
265 265
             if (!empty($module->mbvardefs->vardefs['fields']))
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         }
281 281
 
282 282
         if($_REQUEST['action'] == 'RefreshField'){
283
-        	require_once('modules/DynamicFields/FieldCases.php');
283
+            require_once('modules/DynamicFields/FieldCases.php');
284 284
             $field = get_widget($_POST['type']);
285 285
             $field->populateFromPost();
286 286
             $vardef = $field->get_field_def();
@@ -289,16 +289,16 @@  discard block
 block discarded – undo
289 289
         }
290 290
 
291 291
         foreach(array("formula", "default", "comments", "help", "visiblityGrid") as $toEscape)
292
-		{
293
-			if (!empty($vardef[$toEscape]) && is_string($vardef[$toEscape])) {
294
-	        	$vardef[$toEscape] = htmlentities($vardef[$toEscape], ENT_QUOTES, 'UTF-8');
295
-	        }
296
-		}
292
+        {
293
+            if (!empty($vardef[$toEscape]) && is_string($vardef[$toEscape])) {
294
+                $vardef[$toEscape] = htmlentities($vardef[$toEscape], ENT_QUOTES, 'UTF-8');
295
+            }
296
+        }
297 297
 		
298 298
         if((!empty($vardef['studio']) && is_array($vardef['studio']) && !empty($vardef['studio']['no_duplicate']) && $vardef['studio']['no_duplicate'] == true)
299 299
            || (strcmp($field_name, "name") == 0) || (isset($vardef['type']) && $vardef['type'] == 'name')) // bug #35767, do not allow cloning of name field
300 300
             {
301
-               $fv->ss->assign('no_duplicate', true);
301
+                $fv->ss->assign('no_duplicate', true);
302 302
             }
303 303
 
304 304
         $fv->ss->assign('action',$action);
@@ -318,25 +318,25 @@  discard block
 block discarded – undo
318 318
         $existing_field_names = array () ;
319 319
         foreach ( $module->mbvardefs->vardefs['fields'] as $field )
320 320
         {
321
-        	if ($field [ 'type' ] == 'enum' || $field [ 'type'] == 'multienum' )
322
-        	{
323
-        		$triggers [] = $field [ 'name' ] ;
324
-        	}
321
+            if ($field [ 'type' ] == 'enum' || $field [ 'type'] == 'multienum' )
322
+            {
323
+                $triggers [] = $field [ 'name' ] ;
324
+            }
325 325
         	
326
-        	if (!isset($field['source']) || $field['source'] != 'non-db') {
327
-        		if(preg_match('/^(.*?)(_c)?$/', $field['name'], $matches))
328
-        		{
329
-        			$existing_field_names [] = strtoupper($matches[1]);	
330
-        		}
331
-        	}
326
+            if (!isset($field['source']) || $field['source'] != 'non-db') {
327
+                if(preg_match('/^(.*?)(_c)?$/', $field['name'], $matches))
328
+                {
329
+                    $existing_field_names [] = strtoupper($matches[1]);	
330
+                }
331
+            }
332 332
         }
333 333
         
334 334
         $fv->ss->assign('triggers',$triggers);
335 335
         $fv->ss->assign('existing_field_names', $json->encode($existing_field_names));
336 336
         $fv->ss->assign('mod_strings',$GLOBALS['mod_strings']);
337 337
 
338
-		// jchi #24880
339
-		// end
338
+        // jchi #24880
339
+        // end
340 340
 
341 341
 
342 342
         $layout = $fv->getLayout($vardef);
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.deletepackage.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 
43 43
 class Viewdeletepackage extends SugarView
44 44
 {
45
- 	/**
46
-	 * @see SugarView::_getModuleTitleParams()
47
-	 */
48
-	protected function _getModuleTitleParams($browserTitle = false)
49
-	{
50
-	    global $mod_strings;
45
+        /**
46
+         * @see SugarView::_getModuleTitleParams()
47
+         */
48
+    protected function _getModuleTitleParams($browserTitle = false)
49
+    {
50
+        global $mod_strings;
51 51
 	    
52
-    	return array(
53
-    	   translate('LBL_MODULE_NAME','Administration'),
54
-    	   ModuleBuilderController::getModuleTitle(),
55
-    	   );
52
+        return array(
53
+            translate('LBL_MODULE_NAME','Administration'),
54
+            ModuleBuilderController::getModuleTitle(),
55
+            );
56 56
     }
57 57
 
58
-	function display()
58
+    function display()
59 59
     {
60 60
         global $mod_strings;
61 61
         
@@ -63,5 +63,5 @@  discard block
 block discarded – undo
63 63
         $ajax->addSection('center', $mod_strings['LBL_PACKAGE_DELETED'], 
64 64
             str_replace('[[package]]',$_REQUEST['package'],$mod_strings['LBL_PACKAGE_WAS_DELETED']));
65 65
         echo $ajax->getJavascript();
66
- 	}
66
+        }
67 67
 }
68 68
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.home.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -40,51 +40,51 @@
 block discarded – undo
40 40
 require_once('modules/ModuleBuilder/MB/AjaxCompose.php');
41 41
 class ViewHome extends SugarView
42 42
 {
43
-	/**
44
-	 * @see SugarView::_getModuleTitleParams()
45
-	 */
46
-	protected function _getModuleTitleParams($browserTitle = false)
47
-	{
48
-	    global $mod_strings;
43
+    /**
44
+     * @see SugarView::_getModuleTitleParams()
45
+     */
46
+    protected function _getModuleTitleParams($browserTitle = false)
47
+    {
48
+        global $mod_strings;
49 49
 	    
50
-    	return array(
51
-    	   translate('LBL_MODULE_NAME','Administration'),
52
-    	   ModuleBuilderController::getModuleTitle(),
53
-    	   );
50
+        return array(
51
+            translate('LBL_MODULE_NAME','Administration'),
52
+            ModuleBuilderController::getModuleTitle(),
53
+            );
54 54
     }
55 55
 
56
-	function display()
57
-	{
58
-		global $current_user;
59
-		global $mod_strings;
60
-		$smarty = new Sugar_Smarty();
61
-		$smarty->assign('title' , $mod_strings['LBL_DEVELOPER_TOOLS']);
62
-		$smarty->assign('question', $mod_strings['LBL_QUESTION_EDITOR']);
63
-		$smarty->assign('defaultHelp', 'mainHelp');
64
-		$this->generateHomeButtons();
65
-		$smarty->assign('buttons', $this->buttons);
66
-		$assistant=array('group'=>'main', 'key'=>'welcome');
67
-		$smarty->assign('assistant',$assistant);
68
-		//initialize Assistant's display property.
69
-		$userPref = $current_user->getPreference('mb_assist', 'Assistant');
70
-		if(!$userPref) $userPref="na";
71
-		$smarty->assign('userPref',$userPref);
72
-		$ajax = new AjaxCompose();
73
-		$ajax->addSection('center', $mod_strings['LBL_HOME'],$smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl'));
74
-		echo $ajax->getJavascript();
75
-	}
56
+    function display()
57
+    {
58
+        global $current_user;
59
+        global $mod_strings;
60
+        $smarty = new Sugar_Smarty();
61
+        $smarty->assign('title' , $mod_strings['LBL_DEVELOPER_TOOLS']);
62
+        $smarty->assign('question', $mod_strings['LBL_QUESTION_EDITOR']);
63
+        $smarty->assign('defaultHelp', 'mainHelp');
64
+        $this->generateHomeButtons();
65
+        $smarty->assign('buttons', $this->buttons);
66
+        $assistant=array('group'=>'main', 'key'=>'welcome');
67
+        $smarty->assign('assistant',$assistant);
68
+        //initialize Assistant's display property.
69
+        $userPref = $current_user->getPreference('mb_assist', 'Assistant');
70
+        if(!$userPref) $userPref="na";
71
+        $smarty->assign('userPref',$userPref);
72
+        $ajax = new AjaxCompose();
73
+        $ajax->addSection('center', $mod_strings['LBL_HOME'],$smarty->fetch('modules/ModuleBuilder/tpls/wizard.tpl'));
74
+        echo $ajax->getJavascript();
75
+    }
76 76
 
77 77
 
78
-	function generateHomeButtons() 
79
-	{
80
-	    global $current_user;
78
+    function generateHomeButtons() 
79
+    {
80
+        global $current_user;
81 81
         if(displayStudioForCurrentUser() == true) {
82
-		//$this->buttons['Application'] = array ('action' => '', 'imageTitle' => 'Application', 'size' => '128', 'help'=>'appBtn');
83
-		$this->buttons[$GLOBALS['mod_strings']['LBL_STUDIO']] = array ('action' => 'javascript:ModuleBuilder.main("studio")', 'imageTitle' => 'Studio', 'size' => '128', 'help'=>'studioBtn');
82
+        //$this->buttons['Application'] = array ('action' => '', 'imageTitle' => 'Application', 'size' => '128', 'help'=>'appBtn');
83
+        $this->buttons[$GLOBALS['mod_strings']['LBL_STUDIO']] = array ('action' => 'javascript:ModuleBuilder.main("studio")', 'imageTitle' => 'Studio', 'size' => '128', 'help'=>'studioBtn');
84 84
         }
85 85
         if(is_admin($current_user)) {
86
-		$this->buttons[$GLOBALS['mod_strings']['LBL_MODULEBUILDER']] = array ('action' => 'javascript:ModuleBuilder.main("mb")', 'imageTitle' => 'ModuleBuilder', 'size' => '128', 'help'=>'mbBtn');
86
+        $this->buttons[$GLOBALS['mod_strings']['LBL_MODULEBUILDER']] = array ('action' => 'javascript:ModuleBuilder.main("mb")', 'imageTitle' => 'ModuleBuilder', 'size' => '128', 'help'=>'mbBtn');
87 87
         }
88
-		$this->buttons[$GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR']] = array ('action' => 'javascript:ModuleBuilder.main("dropdowns")', 'imageTitle' => $GLOBALS['mod_strings']['LBL_HOME_EDIT_DROPDOWNS'], 'imageName' => 'DropDownEditor', 'size' => '128', 'help'=>'dropDownEditorBtn');
89
-	}
88
+        $this->buttons[$GLOBALS['mod_strings']['LBL_DROPDOWNEDITOR']] = array ('action' => 'javascript:ModuleBuilder.main("dropdowns")', 'imageTitle' => $GLOBALS['mod_strings']['LBL_HOME_EDIT_DROPDOWNS'], 'imageName' => 'DropDownEditor', 'size' => '128', 'help'=>'dropDownEditorBtn');
89
+    }
90 90
 }
91 91
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php 1 patch
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public static $definitionKeys = array ( 
60 60
         // atttributes of this relationship - here in the definition so they are preserved across saves and loads
61 61
         'for_activities',
62
-    	'is_custom',
62
+        'is_custom',
63 63
         'from_studio',
64 64
         'readonly' , // a readonly relationship cannot be Built by subclasses of AbstractRelationships
65 65
         'deleted' , // a deleted relationship will not be built, and if it had been built previously the built relationship will be removed
@@ -221,48 +221,48 @@  discard block
 block discarded – undo
221 221
         $labelDefinitions = array ( ) ;
222 222
         if (!$this->relationship_only)
223 223
         {
224
-        	if(!$this->is_custom && $update && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){
225
-        		include("modules/{$this->rhs_module}/metadata/subpaneldefs.php");
226
-        		if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){
227
-        			$rightSysLabel = $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'];
228
-        		}
229
-        		$layout_defs = array();
230
-        	}
231
-        	if(!$this->is_custom && $update && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){
232
-        		include("modules/{$this->lhs_module}/metadata/subpaneldefs.php");
233
-        		if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){
234
-        			$leftSysLabel = $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'];
235
-        		}
236
-        		$layout_defs = array();
237
-        	}
238
-        	$labelDefinitions [] = array (
239
-        		'module' => $this->rhs_module ,
240
-        		'system_label' => isset($rightSysLabel)?$rightSysLabel : 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getLeftModuleSystemLabel() ) . '_TITLE' ,
241
-        		'display_label' => ($update && !empty($_REQUEST [ 'lhs_label' ] ))?$_REQUEST [ 'lhs_label' ] :(empty($this->lhs_label) ? translate ( $this->lhs_module ) : $this->lhs_label),
242
-        	) ;
224
+            if(!$this->is_custom && $update && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){
225
+                include("modules/{$this->rhs_module}/metadata/subpaneldefs.php");
226
+                if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){
227
+                    $rightSysLabel = $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'];
228
+                }
229
+                $layout_defs = array();
230
+            }
231
+            if(!$this->is_custom && $update && file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){
232
+                include("modules/{$this->lhs_module}/metadata/subpaneldefs.php");
233
+                if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){
234
+                    $leftSysLabel = $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'];
235
+                }
236
+                $layout_defs = array();
237
+            }
238
+            $labelDefinitions [] = array (
239
+                'module' => $this->rhs_module ,
240
+                'system_label' => isset($rightSysLabel)?$rightSysLabel : 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getLeftModuleSystemLabel() ) . '_TITLE' ,
241
+                'display_label' => ($update && !empty($_REQUEST [ 'lhs_label' ] ))?$_REQUEST [ 'lhs_label' ] :(empty($this->lhs_label) ? translate ( $this->lhs_module ) : $this->lhs_label),
242
+            ) ;
243 243
             $labelDefinitions [] = array (
244
-            	'module' => $this->lhs_module ,
245
-            	'system_label' =>  isset($leftSysLabel)?$leftSysLabel :'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel() ) . '_TITLE' ,
246
-            	'display_label' => ($update && !empty($_REQUEST [ 'rhs_label' ] ))?$_REQUEST [ 'rhs_label' ] :(empty($this->rhs_label) ? translate ( $this->rhs_module ) : $this->rhs_label),
244
+                'module' => $this->lhs_module ,
245
+                'system_label' =>  isset($leftSysLabel)?$leftSysLabel :'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel() ) . '_TITLE' ,
246
+                'display_label' => ($update && !empty($_REQUEST [ 'rhs_label' ] ))?$_REQUEST [ 'rhs_label' ] :(empty($this->rhs_label) ? translate ( $this->rhs_module ) : $this->rhs_label),
247 247
             ) ;
248 248
         }
249 249
         return $labelDefinitions ;
250 250
     }
251 251
 
252
-	function getLeftModuleSystemLabel()
252
+    function getLeftModuleSystemLabel()
253 253
     {
254
-		if($this->lhs_module == $this->rhs_module){
255
-			return $this->lhs_module.'_L';
256
-		}
257
-		return $this->lhs_module;
254
+        if($this->lhs_module == $this->rhs_module){
255
+            return $this->lhs_module.'_L';
256
+        }
257
+        return $this->lhs_module;
258 258
     }
259 259
 
260 260
     function getRightModuleSystemLabel()
261 261
     {
262
-		if($this->lhs_module == $this->rhs_module){
263
-			return $this->rhs_module.'_R';
264
-		}
265
-		return $this->rhs_module;
262
+        if($this->lhs_module == $this->rhs_module){
263
+            return $this->rhs_module.'_R';
264
+        }
265
+        return $this->rhs_module;
266 266
     }
267 267
 
268 268
     /**
@@ -298,24 +298,24 @@  discard block
 block discarded – undo
298 298
     protected function getSubpanelDefinition ($relationshipName , $sourceModule , $subpanelName, $titleKeyName = '', $source = "")
299 299
     {
300 300
         if (empty($source)) 
301
-        	$source = $this->getValidDBName($relationshipName);
302
-    	$subpanelDefinition = array ( ) ;
301
+            $source = $this->getValidDBName($relationshipName);
302
+        $subpanelDefinition = array ( ) ;
303 303
         $subpanelDefinition [ 'order' ] = 100 ;
304 304
         $subpanelDefinition [ 'module' ] = $sourceModule ;
305 305
         $subpanelDefinition [ 'subpanel_name' ] = $subpanelName ;
306 306
         // following two lines are required for the subpanel pagination code in ListView.php->processUnionBeans() to correctly determine the relevant field for sorting
307 307
         $subpanelDefinition [ 'sort_order' ] = 'asc' ;
308 308
         $subpanelDefinition [ 'sort_by' ] = 'id' ;
309
-		if(!empty($titleKeyName)){
310
-			$subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $titleKeyName ) . '_TITLE' ;
311
-		}else{
312
-			$subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ;
313
-		}
309
+        if(!empty($titleKeyName)){
310
+            $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $titleKeyName ) . '_TITLE' ;
311
+        }else{
312
+            $subpanelDefinition [ 'title_key' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ;
313
+        }
314 314
         $subpanelDefinition [ 'get_subpanel_data' ] = $source ;
315 315
         $subpanelDefinition [ 'top_buttons' ] = array(
316
-		    array('widget_class' => "SubPanelTopButtonQuickCreate"),
317
-		    array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
318
-		);
316
+            array('widget_class' => "SubPanelTopButtonQuickCreate"),
317
+            array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
318
+        );
319 319
         
320 320
         return array ( $subpanelDefinition );
321 321
     }
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $vardef [ 'module' ] = $sourceModule ;
340 340
         $vardef [ 'bean_name' ] = BeanFactory::getObjectName($sourceModule) ;
341 341
         if ($right_side)
342
-        	$vardef [ 'side' ] = 'right' ;
342
+            $vardef [ 'side' ] = 'right' ;
343 343
         if (!empty($vname))
344 344
             $vardef [ 'vname' ] = $vname;
345 345
         if (!empty($id_name))
@@ -364,11 +364,11 @@  discard block
 block discarded – undo
364 364
         $vardef [ 'type' ] = 'link' ;
365 365
         $vardef [ 'relationship' ] = $relationshipName ;
366 366
         $vardef [ 'source' ] = 'non-db' ;
367
-		$vardef ['reportable'] = false;
367
+        $vardef ['reportable'] = false;
368 368
         if ($right_side)
369
-        	$vardef [ 'side' ] = 'right' ;
369
+            $vardef [ 'side' ] = 'right' ;
370 370
         else
371
-        	$vardef [ 'side' ] = 'left' ;
371
+            $vardef [ 'side' ] = 'left' ;
372 372
         if (!empty($vname))
373 373
             $vardef [ 'vname' ] = $vname;
374 374
 
@@ -389,11 +389,11 @@  discard block
 block discarded – undo
389 389
         $vardef [ 'type' ] = 'relate' ;
390 390
 
391 391
         $vardef [ 'source' ] = 'non-db' ;
392
-		if(!empty($vnameLabel)){
393
-			$vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $vnameLabel ) . '_TITLE' ;
394
-		}else{
395
-			$vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ;
396
-		}
392
+        if(!empty($vnameLabel)){
393
+            $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $vnameLabel ) . '_TITLE' ;
394
+        }else{
395
+            $vardef [ 'vname' ] = 'LBL_' . strtoupper ( $relationshipName . '_FROM_' . $sourceModule ) . '_TITLE' ;
396
+        }
397 397
         
398 398
         $vardef [ 'save' ] = true; // the magic value to tell SugarBean to save this relate field even though it is not listed in the $relationship_fields array
399 399
        
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
             if (in_array( 'file' , array_keys ( $module->config [ 'templates' ] ) ) ){
422 422
                 $vardef [ 'rname' ] = 'document_name' ;
423 423
             }elseif(in_array ( 'person' , array_keys ( $module->config [ 'templates' ] ) ) ){
424
-            	$vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ;
424
+                $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ;
425 425
             }
426 426
         }
427 427
         else
@@ -450,11 +450,11 @@  discard block
 block discarded – undo
450 450
                     require_once ( $GLOBALS ['beanFiles'] [ $object ] );
451 451
                     $bean = new $object();
452 452
                     if ( isset ( $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){
453
-                    	if(in_array ( 'file' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){
454
-                    		$vardef [ 'rname' ] = 'document_name' ;
455
-                    	}elseif(in_array ( 'person' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){
456
-                    		 $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ;
457
-                    	}
453
+                        if(in_array ( 'file' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){
454
+                            $vardef [ 'rname' ] = 'document_name' ;
455
+                        }elseif(in_array ( 'person' , $GLOBALS [ 'dictionary' ] [ $object ] [ 'templates'] )){
456
+                                $vardef [ 'db_concat_fields' ] = array( 0 =>'first_name', 1 =>'last_name') ;
457
+                        }
458 458
                     }
459 459
                         
460 460
             }
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
     function getJoinKeyLHS()
635 635
     {
636 636
         if (!isset($this->joinKeyLHS))
637
-        	$this->joinKeyLHS = $this->getValidDBName ( $this->relationship_name . $this->lhs_module . "_ida"  , true) ;
637
+            $this->joinKeyLHS = $this->getValidDBName ( $this->relationship_name . $this->lhs_module . "_ida"  , true) ;
638 638
         
639 639
         return $this->joinKeyLHS;
640 640
     }
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
     function getJoinKeyRHS()
643 643
     {
644 644
         if (!isset($this->joinKeyRHS))
645
-        	$this->joinKeyRHS = $this->getValidDBName ( $this->relationship_name . $this->rhs_module . "_idb"  , true) ;
645
+            $this->joinKeyRHS = $this->getValidDBName ( $this->relationship_name . $this->rhs_module . "_idb"  , true) ;
646 646
     	
647 647
         return $this->joinKeyRHS;
648 648
     }
@@ -674,32 +674,32 @@  discard block
 block discarded – undo
674 674
     }
675 675
 
676 676
     public function getTitleKey($left=false){
677
-		if(!$this->is_custom && !$left && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){
678
-    		include("modules/{$this->rhs_module}/metadata/subpaneldefs.php");
679
-    		if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){
680
-    			return $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'];
681
-    		}
682
-    	}else if(!$this->is_custom &&  file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){
683
-    		include("modules/{$this->lhs_module}/metadata/subpaneldefs.php");
684
-    		if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){
685
-    			return $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'];
686
-    		}
687
-    	}
677
+        if(!$this->is_custom && !$left && file_exists("modules/{$this->rhs_module}/metadata/subpaneldefs.php")){
678
+            include("modules/{$this->rhs_module}/metadata/subpaneldefs.php");
679
+            if(isset($layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'])){
680
+                return $layout_defs[$this->rhs_module]['subpanel_setup'][strtolower($this->lhs_module)]['title_key'];
681
+            }
682
+        }else if(!$this->is_custom &&  file_exists("modules/{$this->lhs_module}/metadata/subpaneldefs.php")){
683
+            include("modules/{$this->lhs_module}/metadata/subpaneldefs.php");
684
+            if(isset($layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'])){
685
+                return $layout_defs[$this->lhs_module]['subpanel_setup'][strtolower($this->rhs_module)]['title_key'];
686
+            }
687
+        }
688 688
     	
689
-    	if($left){
690
-    		$titleKeyName = $this->getRightModuleSystemLabel();
691
-    		$sourceModule = $this->rhs_module;
692
-    	}else{
693
-    		$titleKeyName = $this->getLeftModuleSystemLabel();
694
-    		$sourceModule = $this->lhs_module;
695
-    	}
689
+        if($left){
690
+            $titleKeyName = $this->getRightModuleSystemLabel();
691
+            $sourceModule = $this->rhs_module;
692
+        }else{
693
+            $titleKeyName = $this->getLeftModuleSystemLabel();
694
+            $sourceModule = $this->lhs_module;
695
+        }
696 696
     	
697
-		if(!empty($titleKeyName)){
698
-			$title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $titleKeyName ) . '_TITLE' ;
699
-		}else{
700
-			$title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $sourceModule ) . '_TITLE' ;
701
-		}
697
+        if(!empty($titleKeyName)){
698
+            $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $titleKeyName ) . '_TITLE' ;
699
+        }else{
700
+            $title_key = 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $sourceModule ) . '_TITLE' ;
701
+        }
702 702
 		
703
-		return $title_key;
704
-	}
703
+        return $title_key;
704
+    }
705 705
 }
706 706
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/AbstractRelationships.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
     // have different actual relationship names other than <relationshipName>
67 67
     // e.g $dictionary[ 'quotes_accounts' ] has two relationships: quotes_billto_accounts, quotes_shipto_accounts
68 68
     protected $specialCaseBaseNames = array( 'quotes_accounts',
69
-                                             'quotes_contacts',
70
-                                             'emails_beans',
71
-                                             'linked_documents',
72
-                                             'project_relation',
73
-                                             'prospect_lists_prospects',
74
-                                             'queues_beans',
75
-                                             'queues_queue',
76
-                                             'tracker_sessions'
77
-                                          );
69
+                                                'quotes_contacts',
70
+                                                'emails_beans',
71
+                                                'linked_documents',
72
+                                                'project_relation',
73
+                                                'prospect_lists_prospects',
74
+                                                'queues_beans',
75
+                                                'queues_queue',
76
+                                                'tracker_sessions'
77
+                                            );
78 78
     /*
79 79
      * Find all deployed modules that can participate in a relationship
80 80
      * Return a list of modules with associated subpanels
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     protected function build ($basepath , $installDefPrefix , $relationships )
334 334
     {
335 335
         global $sugar_config;
336
-    	// keep the relationships data separate from any other build data by ading /relationships to the basepath
336
+        // keep the relationships data separate from any other build data by ading /relationships to the basepath
337 337
         $basepath .= '/relationships' ;
338 338
 
339 339
         $installDefs = array ( ) ;
@@ -393,34 +393,34 @@  discard block
 block discarded – undo
393 393
     {
394 394
         global $sugar_config;
395 395
         
396
-       	mkdir_recursive ( "$basepath/language" ) ;
396
+            mkdir_recursive ( "$basepath/language" ) ;
397 397
     	
398
-       	$headerString = "<?php\n//THIS FILE IS AUTO GENERATED, DO NOT MODIFY\n" ;
398
+            $headerString = "<?php\n//THIS FILE IS AUTO GENERATED, DO NOT MODIFY\n" ;
399 399
         $installDefs = array ( ) ;
400 400
         foreach ( $labelDefinitions as $definition )
401 401
         {
402
-        	$mod_strings = array();
403
-        	$app_list_strings = array();
402
+            $mod_strings = array();
403
+            $app_list_strings = array();
404 404
         	
405
-        	$out = $headerString;
405
+            $out = $headerString;
406 406
         	
407
-        	$filename = "{$basepath}/language/{$definition['module']}.php" ;
407
+            $filename = "{$basepath}/language/{$definition['module']}.php" ;
408 408
     	
409
-	    	if (file_exists ( $filename ))
410
-	    		include ($filename);
409
+            if (file_exists ( $filename ))
410
+                include ($filename);
411 411
 	    		
412 412
             
413 413
             //Check for app strings
414 414
             $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->saveLabels(): saving the following to {$filename}" 
415
-                                      . print_r ( $definition, true ) ) ;
415
+                                        . print_r ( $definition, true ) ) ;
416 416
             if ($definition['module'] == 'application') {
417
-            	$app_list_strings[$definition [ 'system_label' ]] = $definition [ 'display_label' ];
418
-            	foreach ($app_list_strings as $key => $val)
419
-            		$out .= override_value_to_string_recursive2('app_list_strings', $key, $val);
417
+                $app_list_strings[$definition [ 'system_label' ]] = $definition [ 'display_label' ];
418
+                foreach ($app_list_strings as $key => $val)
419
+                    $out .= override_value_to_string_recursive2('app_list_strings', $key, $val);
420 420
             } else {
421
-            	$mod_strings[ $definition [ 'system_label' ]] = $definition [ 'display_label' ];
422
-            	foreach ($mod_strings as $key => $val)
423
-            		$out .= override_value_to_string_recursive2('mod_strings', $key, $val);
421
+                $mod_strings[ $definition [ 'system_label' ]] = $definition [ 'display_label' ];
422
+                foreach ($mod_strings as $key => $val)
423
+                    $out .= override_value_to_string_recursive2('mod_strings', $key, $val);
424 424
             }
425 425
             
426 426
             $fh = fopen ( $filename, 'w' ) ;
@@ -430,17 +430,17 @@  discard block
 block discarded – undo
430 430
         	
431 431
             foreach($sugar_config['languages'] as $lk => $lv)
432 432
             {
433
-            	$installDefs [ $definition [ 'module' ] . "_$lk" ] = array ( 
434
-            		'from' => "{$installDefPrefix}/relationships/language/{$definition [ 'module' ]}.php" , 
435
-            		'to_module' => $definition [ 'module' ] , 
436
-            		'language' => $lk 
437
-            	) ;                                 		
433
+                $installDefs [ $definition [ 'module' ] . "_$lk" ] = array ( 
434
+                    'from' => "{$installDefPrefix}/relationships/language/{$definition [ 'module' ]}.php" , 
435
+                    'to_module' => $definition [ 'module' ] , 
436
+                    'language' => $lk 
437
+                ) ;                                 		
438 438
             }
439 439
             
440 440
             /* do not use the following write_array_to_file method to write the label file - 
441 441
              * module installer appends each of the label files together (as it does for all files) 
442 442
 			 * into a combined label file and so the last $mod_strings is the only one received by the application */
443
-        	// write_array_to_file ( 'mod_strings', array ( $definition [ 'system_label' ] => $definition [ 'display_label' ] ), $filename, "a" ) ;
443
+            // write_array_to_file ( 'mod_strings', array ( $definition [ 'system_label' ] => $definition [ 'display_label' ] ), $filename, "a" ) ;
444 444
         }
445 445
         
446 446
         return $installDefs ;
@@ -534,11 +534,11 @@  discard block
 block discarded – undo
534 534
             $relName = $moduleName;
535 535
             foreach ( $definitions as $definition )
536 536
             {
537
-            	if (!empty($definition['relationship']))
538
-            	{
539
-            		$relName = $definition['relationship'];
540
-            		break;
541
-            	}
537
+                if (!empty($definition['relationship']))
538
+                {
539
+                    $relName = $definition['relationship'];
540
+                    break;
541
+                }
542 542
             }
543 543
             
544 544
             $filename = "$basepath/vardefs/{$relName}_{$moduleName}.php" ;
@@ -547,14 +547,14 @@  discard block
 block discarded – undo
547 547
             foreach ( $definitions as $definition )
548 548
             {
549 549
                 $GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->saveVardefs(): saving the following to {$filename}" . print_r ( $definition, true ) ) ;
550
-               	$out .= '$dictionary["' . $object . '"]["fields"]["' . $definition [ 'name' ] . '"] = '
551
-               		  . var_export_helper($definition) . ";\n";
550
+                    $out .= '$dictionary["' . $object . '"]["fields"]["' . $definition [ 'name' ] . '"] = '
551
+                            . var_export_helper($definition) . ";\n";
552 552
             }
553 553
             file_put_contents($filename, $out);
554 554
             
555 555
             $installDefs [ $moduleName ] = array ( 
556
-            	'from' => "{$installDefPrefix}/relationships/vardefs/{$relName}_{$moduleName}.php" , 
557
-            	'to_module' => $moduleName 
556
+                'from' => "{$installDefPrefix}/relationships/vardefs/{$relName}_{$moduleName}.php" , 
557
+                'to_module' => $moduleName 
558 558
             ) ;
559 559
         }
560 560
         
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
             }
285 285
             $module->setAppListStrings ( 'en_us', $appStrings ) ;
286 286
             $module->save () ;
287
-			//Bug42170================================
288
-		}
287
+            //Bug42170================================
288
+        }
289 289
         
290 290
         // use an installDefPrefix of <basepath>/SugarModules for compatibility with the rest of ModuleBuilder
291 291
         $this->installDefs = parent::build ( $basepath, "<basepath>/SugarModules", $relationships ) ;
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
                         $fieldsToAdd [$deployedModuleName] = $fieldName;
419 419
                     }
420 420
                 }
421
-        	}
421
+            }
422 422
         }
423 423
         return array(array('additional_fields' => $fieldsToAdd));
424 424
     }
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
                         
105 105
 
106 106
                         if (! empty ( $dictionary ) && ! empty ( $dictionary [ $name ] ) ) {
107
-                        	if (! empty ( $dictionary [ $name ] [ 'true_relationship_type' ] )) {
108
-                        		$definition [ 'relationship_type' ] = $dictionary [ $name ] [ 'true_relationship_type' ] ;
109
-                        	}
107
+                            if (! empty ( $dictionary [ $name ] [ 'true_relationship_type' ] )) {
108
+                                $definition [ 'relationship_type' ] = $dictionary [ $name ] [ 'true_relationship_type' ] ;
109
+                            }
110 110
                             if (! empty ( $dictionary [ $name ] [ 'from_studio' ] )) {
111 111
                                 $definition [ 'from_studio' ] = $dictionary [ $name ] [ 'from_studio' ] ;
112 112
                             }
113
-                        	$definition [ 'is_custom' ] = true;
113
+                            $definition [ 'is_custom' ] = true;
114 114
                         }
115 115
                             
116 116
                         
@@ -155,23 +155,23 @@  discard block
 block discarded – undo
155 155
      */
156 156
     function delete ($rel_name)
157 157
     {
158
-    	//Remove any fields from layouts
158
+        //Remove any fields from layouts
159 159
         $rel = $this->get($rel_name);
160 160
         if (!empty($rel))
161 161
         {
162 162
             $this->removeFieldsFromDeployedLayout($rel);
163 163
         }
164 164
         require_once("ModuleInstall/ModuleInstaller.php");
165
-    	require_once ('modules/Administration/QuickRepairAndRebuild.php') ;
166
-    	$mi = new ModuleInstaller();
167
-    	$mi->silent = true;
165
+        require_once ('modules/Administration/QuickRepairAndRebuild.php') ;
166
+        $mi = new ModuleInstaller();
167
+        $mi->silent = true;
168 168
         $mi->id_name = 'custom' . $rel_name; // provide the moduleinstaller with a unique name for this relationship - normally this value is set to the package key...
169
-    	$mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
169
+        $mi->uninstall_relationship("custom/metadata/{$rel_name}MetaData.php");
170 170
         $mi->uninstallLabels('custom/Extension/modules/relationships/language/',$rel->buildLabels());
171 171
         $mi->uninstallExtLabels($rel->buildLabels());
172 172
     	
173
-    	// now clear all caches so that our changes are visible
174
-    	Relationship::delete_cache();
173
+        // now clear all caches so that our changes are visible
174
+        Relationship::delete_cache();
175 175
         $mi->rebuild_tabledictionary();
176 176
         
177 177
         $MBmodStrings = $GLOBALS [ 'mod_strings' ];
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         foreach ( $this->relationships as $name => $relationship )
314 314
         {
315 315
             $relationship->setFromStudio();
316
-        	$GLOBALS [ 'mod_strings' ] = $MBModStrings ;
316
+            $GLOBALS [ 'mod_strings' ] = $MBModStrings ;
317 317
             $installDefs = parent::build ( $basepath, "<basepath>",  array ($name => $relationship ) ) ;
318 318
 
319 319
             // and mark as built so that the next time we come through we'll know and won't build again
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
      * @param $relationship    The relationship that is getting deleted
408 408
      * return null
409 409
      */
410
-	private function removeFieldsFromDeployedLayout ($relationship)
410
+    private function removeFieldsFromDeployedLayout ($relationship)
411 411
     {
412 412
         
413 413
         // many-to-many relationships don't have fields so if we have a many-to-many we can just skip this...
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/RelationshipFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
         if (! isset ( $definition [ 'relationship_type' ] ))
55 55
             $definition [ 'relationship_type' ] = MB_MANYTOMANY ;
56 56
             
57
-    	if (!empty ($definition['for_activities']) && $definition['for_activities'] == true) {
58
-        	require_once 'modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php';
59
-        	return new ActivitiesRelationship ($definition);
57
+        if (!empty ($definition['for_activities']) && $definition['for_activities'] == true) {
58
+            require_once 'modules/ModuleBuilder/parsers/relationships/ActivitiesRelationship.php';
59
+            return new ActivitiesRelationship ($definition);
60 60
         }
61 61
         
62 62
         switch ( strtolower ( $definition [ 'relationship_type' ] ))
Please login to merge, or discard this patch.
modules/ModuleBuilder/parsers/relationships/OneToManyRelationship.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
         $source = "";
100 100
         if ($this->rhs_module == $this->lhs_module)
101 101
         {
102
-        	$source = $this->getJoinKeyLHS();
102
+            $source = $this->getJoinKeyLHS();
103 103
         }
104 104
  
105 105
         return array( 
106
-        	$this->lhs_module => $this->getSubpanelDefinition ( 
107
-        		$this->relationship_name, $this->rhs_module, $this->rhs_subpanel , $this->getRightModuleSystemLabel() , $source
108
-        	) 
106
+            $this->lhs_module => $this->getSubpanelDefinition ( 
107
+                $this->relationship_name, $this->rhs_module, $this->rhs_subpanel , $this->getRightModuleSystemLabel() , $source
108
+            ) 
109 109
         );
110 110
     }
111 111
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     /*
114 114
      * @return array    An array of field definitions, ready for the vardefs, keyed by module
115 115
      */
116
-	function buildVardefs ( )
116
+    function buildVardefs ( )
117 117
     {
118 118
         $vardefs = array ( ) ;
119 119
         
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         ) ;
124 124
         if ($this->rhs_module != $this->lhs_module )
125 125
         {
126
-        	$vardefs [ $this->lhs_module ] [] = $this->getLinkFieldDefinition ( $this->rhs_module, $this->relationship_name, true,
126
+            $vardefs [ $this->lhs_module ] [] = $this->getLinkFieldDefinition ( $this->rhs_module, $this->relationship_name, true,
127 127
                 'LBL_' . strtoupper ( $this->relationship_name . '_FROM_' . $this->getRightModuleSystemLabel()  ) . '_TITLE');
128 128
         }
129 129
         if (! $this->relationship_only)
Please login to merge, or discard this patch.