Completed
Push — develop ( 0c0e51 )
by Adam
26:01 queued 12:43
created
modules/ModuleBuilder/views/view.deletemodule.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -43,22 +43,22 @@
 block discarded – undo
43 43
 class Viewdeletemodule 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
-	{
60
- 		$ajax = new AjaxCompose();
61
-		$ajax->addSection('center', 'Module Deleted', $_REQUEST['module'] . ' was deleted from ' . $_REQUEST['package']);
62
-		echo $ajax->getJavascript(); 
63
- 	}
58
+    function display()
59
+    {
60
+            $ajax = new AjaxCompose();
61
+        $ajax->addSection('center', 'Module Deleted', $_REQUEST['module'] . ' was deleted from ' . $_REQUEST['package']);
62
+        echo $ajax->getJavascript(); 
63
+        }
64 64
 }
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.dropdown.php 1 patch
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -41,130 +41,130 @@
 block discarded – undo
41 41
 
42 42
 class ViewDropdown extends SugarView
43 43
 {
44
- 	/**
45
-	 * @see SugarView::_getModuleTitleParams()
46
-	 */
47
-	protected function _getModuleTitleParams($browserTitle = false)
48
-	{
49
-	    global $mod_strings;
44
+        /**
45
+         * @see SugarView::_getModuleTitleParams()
46
+         */
47
+    protected function _getModuleTitleParams($browserTitle = false)
48
+    {
49
+        global $mod_strings;
50 50
 	    
51
-    	return array(
52
-    	   translate('LBL_MODULE_NAME','Administration'),
53
-    	   ModuleBuilderController::getModuleTitle(),
54
-    	   );
51
+        return array(
52
+            translate('LBL_MODULE_NAME','Administration'),
53
+            ModuleBuilderController::getModuleTitle(),
54
+            );
55 55
     }
56 56
 
57
- 	function display()
58
- 	{
59
-		$ajax = new AjaxCompose();
60
-		$smarty = $this->generateSmarty();
57
+        function display()
58
+        {
59
+        $ajax = new AjaxCompose();
60
+        $smarty = $this->generateSmarty();
61 61
 		
62
-		if (isset($_REQUEST['refreshTree']))
63
-		{
64
-			require_once ('modules/ModuleBuilder/Module/DropDownTree.php');
65
-			$mbt = new DropDownTree();
66
-			$ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes());
67
-			$smarty->assign('refreshTree',true);
68
-		}
62
+        if (isset($_REQUEST['refreshTree']))
63
+        {
64
+            require_once ('modules/ModuleBuilder/Module/DropDownTree.php');
65
+            $mbt = new DropDownTree();
66
+            $ajax->addSection('west', $mbt->getName(), $mbt->fetchNodes());
67
+            $smarty->assign('refreshTree',true);
68
+        }
69 69
 
70 70
         global $mod_strings;
71 71
 
72
- 		$smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE']));
73
-		$smarty->assign('editImage', SugarThemeRegistry::current()->getImage( 'edit_inline', ''
72
+            $smarty->assign('deleteImage', SugarThemeRegistry::current()->getImage( 'delete_inline', '',null,null,'.gif',$mod_strings['LBL_MB_DELETE']));
73
+        $smarty->assign('editImage', SugarThemeRegistry::current()->getImage( 'edit_inline', ''
74 74
 ,null,null,'.gif',$mod_strings['LBL_EDIT']));
75
-		$smarty->assign('action', 'savedropdown');
76
-		$body = $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdown.tpl');
77
-		$ajax->addSection('east2', $mod_strings['LBL_SECTION_DROPDOWNED'], $body );
78
- 		echo $ajax->getJavascript();
79
- 	}
75
+        $smarty->assign('action', 'savedropdown');
76
+        $body = $smarty->fetch('modules/ModuleBuilder/tpls/MBModule/dropdown.tpl');
77
+        $ajax->addSection('east2', $mod_strings['LBL_SECTION_DROPDOWNED'], $body );
78
+            echo $ajax->getJavascript();
79
+        }
80 80
  	
81
- 	function generateSmarty()
82
- 	{
83
-		//get the selected language
84
-		$selected_lang = (!empty($_REQUEST['dropdown_lang'])?$_REQUEST['dropdown_lang']:$_SESSION['authenticated_user_language']);
85
-		$vardef = array();
86
-		$package_name = 'studio';
87
-		$package_strings = array();
88
-		$new =false;
89
-		$my_list_strings = return_app_list_strings_language( $selected_lang ) ;
81
+        function generateSmarty()
82
+        {
83
+        //get the selected language
84
+        $selected_lang = (!empty($_REQUEST['dropdown_lang'])?$_REQUEST['dropdown_lang']:$_SESSION['authenticated_user_language']);
85
+        $vardef = array();
86
+        $package_name = 'studio';
87
+        $package_strings = array();
88
+        $new =false;
89
+        $my_list_strings = return_app_list_strings_language( $selected_lang ) ;
90 90
 //		$my_list_strings = $GLOBALS['app_list_strings'];
91 91
 
92 92
         $smarty = new Sugar_Smarty();
93 93
 		      
94
-		//if we are using ModuleBuilder then process the following
95
-		if(!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio'){
96
-			require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
97
-			$mb = new ModuleBuilder();
98
-			$module = $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
99
-			$package = $mb->packages[$_REQUEST['view_package']];
100
-			$package_name = $package->name;
101
-			$module->getVardefs();
102
-			if(empty($_REQUEST['dropdown_name']) && !empty($_REQUEST['field'])){
103
-				$new = true;
104
-				$_REQUEST['dropdown_name'] = $_REQUEST['field']. '_list';
105
-			}
94
+        //if we are using ModuleBuilder then process the following
95
+        if(!empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio'){
96
+            require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
97
+            $mb = new ModuleBuilder();
98
+            $module = $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
99
+            $package = $mb->packages[$_REQUEST['view_package']];
100
+            $package_name = $package->name;
101
+            $module->getVardefs();
102
+            if(empty($_REQUEST['dropdown_name']) && !empty($_REQUEST['field'])){
103
+                $new = true;
104
+                $_REQUEST['dropdown_name'] = $_REQUEST['field']. '_list';
105
+            }
106 106
 			
107
-			$vardef = (!empty($module->mbvardefs->fields[$_REQUEST['dropdown_name']]))? $module->mbvardefs->fields[$_REQUEST['dropdown_name']]: array();
108
-			$module->mblanguage->generateAppStrings(false) ;
107
+            $vardef = (!empty($module->mbvardefs->fields[$_REQUEST['dropdown_name']]))? $module->mbvardefs->fields[$_REQUEST['dropdown_name']]: array();
108
+            $module->mblanguage->generateAppStrings(false) ;
109 109
             $my_list_strings = array_merge( $my_list_strings, $module->mblanguage->appListStrings[$selected_lang.'.lang.php'] );
110 110
             $smarty->assign('module_name', $module->name);
111
-		}
111
+        }
112 112
 
113 113
         $module_name = !empty($module->name) ?  $module->name : '';
114 114
         $module_name = (empty($module_name) && !empty($_REQUEST['view_module'])) ?  $_REQUEST['view_module'] : $module_name;
115 115
 
116
-		foreach($my_list_strings as $key=>$value){
117
-			if(!is_array($value)){
118
-				unset($my_list_strings[$key]);
119
-			}
120
-		}
116
+        foreach($my_list_strings as $key=>$value){
117
+            if(!is_array($value)){
118
+                unset($my_list_strings[$key]);
119
+            }
120
+        }
121 121
 		
122
-		$dropdowns = array_keys($my_list_strings);
123
-		asort($dropdowns);
124
-		$keys = array_keys($dropdowns);
125
-		$first_string = $my_list_strings[$dropdowns[$keys[0]]];
122
+        $dropdowns = array_keys($my_list_strings);
123
+        asort($dropdowns);
124
+        $keys = array_keys($dropdowns);
125
+        $first_string = $my_list_strings[$dropdowns[$keys[0]]];
126 126
 
127
-		$name = '';
128
-		$selected_dropdown = array();
127
+        $name = '';
128
+        $selected_dropdown = array();
129 129
 
130
-		$json = getJSONobj();
130
+        $json = getJSONobj();
131 131
 
132
-		if(!empty($_REQUEST['dropdown_name']) && !$new){
133
-			$name = $_REQUEST['dropdown_name'];
132
+        if(!empty($_REQUEST['dropdown_name']) && !$new){
133
+            $name = $_REQUEST['dropdown_name'];
134 134
 			
135
-			// handle the case where we've saved a dropdown in one language, and now attempt to edit it for another language. The $name exists, but $my_list_strings[$name] doesn't
135
+            // handle the case where we've saved a dropdown in one language, and now attempt to edit it for another language. The $name exists, but $my_list_strings[$name] doesn't
136 136
             // for now, we just treat it as if it was new. A better approach might be to use the first language version as a template for future languages
137 137
             if (!isset($my_list_strings[$name]))
138 138
                 $my_list_strings[$name] = array () ;
139 139
  
140
-			$selected_dropdown = (!empty($vardef['options']) && !empty($my_list_strings[$vardef['options']])) ? $my_list_strings[$vardef['options']] : $my_list_strings[$name];
141
-			$smarty->assign('ul_list', 'list = '.$json->encode(array_keys($selected_dropdown)));
142
-			$smarty->assign('dropdown_name', (!empty($vardef['options']) ? $vardef['options'] : $_REQUEST['dropdown_name']));
143
-			$smarty->assign('name', $_REQUEST['dropdown_name']);
144
-			$smarty->assign('options', $selected_dropdown);
145
-		}else{
146
-			$smarty->assign('ul_list', 'list = {}');
147
-			//we should try to find a name for this dropdown based on the field name.
148
-			$pre_pop_name = '';
149
-			if(!empty($_REQUEST['field']))
150
-				$pre_pop_name = $_REQUEST['field'];
151
-			//ensure this dropdown name does not already exist
152
-			$use_name = $pre_pop_name.'_list';
153
-			for($i = 0; $i < 100; $i++){
154
-				if(empty($my_list_strings[$use_name]))
155
-					break;
156
-				else
157
-					$use_name = $pre_pop_name.'_'.$i;
158
-			}
159
-			$smarty->assign('prepopulated_name', $use_name);
160
-		}
140
+            $selected_dropdown = (!empty($vardef['options']) && !empty($my_list_strings[$vardef['options']])) ? $my_list_strings[$vardef['options']] : $my_list_strings[$name];
141
+            $smarty->assign('ul_list', 'list = '.$json->encode(array_keys($selected_dropdown)));
142
+            $smarty->assign('dropdown_name', (!empty($vardef['options']) ? $vardef['options'] : $_REQUEST['dropdown_name']));
143
+            $smarty->assign('name', $_REQUEST['dropdown_name']);
144
+            $smarty->assign('options', $selected_dropdown);
145
+        }else{
146
+            $smarty->assign('ul_list', 'list = {}');
147
+            //we should try to find a name for this dropdown based on the field name.
148
+            $pre_pop_name = '';
149
+            if(!empty($_REQUEST['field']))
150
+                $pre_pop_name = $_REQUEST['field'];
151
+            //ensure this dropdown name does not already exist
152
+            $use_name = $pre_pop_name.'_list';
153
+            for($i = 0; $i < 100; $i++){
154
+                if(empty($my_list_strings[$use_name]))
155
+                    break;
156
+                else
157
+                    $use_name = $pre_pop_name.'_'.$i;
158
+            }
159
+            $smarty->assign('prepopulated_name', $use_name);
160
+        }
161 161
 
162
-		$smarty->assign('module_name', $module_name);
163
-		$smarty->assign('APP', $GLOBALS['app_strings']);
164
-		$smarty->assign('MOD', $GLOBALS['mod_strings']);
165
-		$smarty->assign('selected_lang', $selected_lang);
166
-		$smarty->assign('available_languages',get_languages());
167
-		$smarty->assign('package_name', $package_name);
168
- 		return $smarty;
169
- 	}
162
+        $smarty->assign('module_name', $module_name);
163
+        $smarty->assign('APP', $GLOBALS['app_strings']);
164
+        $smarty->assign('MOD', $GLOBALS['mod_strings']);
165
+        $smarty->assign('selected_lang', $selected_lang);
166
+        $smarty->assign('available_languages',get_languages());
167
+        $smarty->assign('package_name', $package_name);
168
+            return $smarty;
169
+        }
170 170
 }
171 171
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.listview.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 class ViewListView extends SugarView
47 47
 {
48 48
     /**
49
-	 * @see SugarView::_getModuleTitleParams()
50
-	 */
51
-	protected function _getModuleTitleParams($browserTitle = false)
52
-	{
53
-	    global $mod_strings;
49
+     * @see SugarView::_getModuleTitleParams()
50
+     */
51
+    protected function _getModuleTitleParams($browserTitle = false)
52
+    {
53
+        global $mod_strings;
54 54
 	    
55
-    	return array(
56
-    	   translate('LBL_MODULE_NAME','Administration'),
57
-    	   ModuleBuilderController::getModuleTitle(),
58
-    	   );
55
+        return array(
56
+            translate('LBL_MODULE_NAME','Administration'),
57
+            ModuleBuilderController::getModuleTitle(),
58
+            );
59 59
     }
60 60
 
61 61
     /*
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
 
114 114
         $labels = array (
115
-        			MB_LISTVIEW => 'LBL_LISTVIEW' ,
116
-        			) ;
115
+                    MB_LISTVIEW => 'LBL_LISTVIEW' ,
116
+                    ) ;
117 117
         $translatedViewType = '' ;
118
-		if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) )
119
-			$translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ;
120
-		$this->translatedViewType = $translatedViewType;
118
+        if ( isset ( $labels [ strtolower ( $this->editLayout ) ] ) )
119
+            $translatedViewType = translate ( $labels [ strtolower( $this->editLayout ) ] , 'ModuleBuilder' ) ;
120
+        $this->translatedViewType = $translatedViewType;
121 121
 
122 122
         if ($this->fromModuleBuilder)
123 123
         {
@@ -198,8 +198,8 @@  discard block
 block discarded – undo
198 198
                 $subRef = $subList[strtolower($this->subpanel)];
199 199
                 $subTitleKey = !empty($subRef) ? $subRef : "LBL_" . strtoupper($this->subpanel) . "_SUBPANEL_TITLE";
200 200
                 $subTitle    = !empty($subRef) ? translate($subTitleKey, $this->editModule) : UCfirst($this->subpanel);
201
-            	$smarty->assign ( 'subpanel_label', $subTitleKey ) ;
202
-            	$smarty->assign ( 'subpanel_title', $subTitle ) ;
201
+                $smarty->assign ( 'subpanel_label', $subTitleKey ) ;
202
+                $smarty->assign ( 'subpanel_title', $subTitle ) ;
203 203
             }
204 204
         }
205 205
         $helpName = $this->subpanel ? 'subPanelEditor' : 'listViewEditor';
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
 
322 322
     function _buildImageButtons ($buttons , $horizontal = true)
323 323
     {
324
-    	$text = '<table cellspacing=2><tr>' ;
324
+        $text = '<table cellspacing=2><tr>' ;
325 325
         foreach ( $buttons as $button )
326 326
         {
327 327
             if (empty($button['id'])) {
328
-            	$button['id'] = $button['name'];
328
+                $button['id'] = $button['name'];
329 329
             }
330 330
             if (! $horizontal)
331 331
             {
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.dashlet.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -68,16 +68,16 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     /**
71
-	 * @see SugarView::_getModuleTitleParams()
72
-	 */
73
-	protected function _getModuleTitleParams($browserTitle = false)
74
-	{
75
-	    global $mod_strings;
71
+     * @see SugarView::_getModuleTitleParams()
72
+     */
73
+    protected function _getModuleTitleParams($browserTitle = false)
74
+    {
75
+        global $mod_strings;
76 76
 	    
77
-    	return array(
78
-    	   translate('LBL_MODULE_NAME','Administration'),
79
-    	   ModuleBuilderController::getModuleTitle(),
80
-    	   );
77
+        return array(
78
+            translate('LBL_MODULE_NAME','Administration'),
79
+            ModuleBuilderController::getModuleTitle(),
80
+            );
81 81
     }
82 82
 
83 83
     // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
         $smarty = $this->constructSmarty ( $parser ) ;
98 98
         if ($preview)
99 99
         {
100
-        	echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ;
100
+            echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ;
101 101
         } else
102 102
         {
103
-        	$ajax = $this->constructAjax () ;
104
-        	$ajax->addSection ( 'center', translate('LBL_DASHLET'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ;
105
-        	echo $ajax->getJavascript () ;
103
+            $ajax = $this->constructAjax () ;
104
+            $ajax->addSection ( 'center', translate('LBL_DASHLET'), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ;
105
+            echo $ajax->getJavascript () ;
106 106
         }
107 107
     }
108 108
 
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
         $helpName = (isset( $_REQUEST['view']) && $_REQUEST['view']=='dashletsearch') ? 'searchViewEditor' : 'listViewEditor';
146 146
         $smarty->assign ( 'helpName', $helpName ) ;
147 147
         $smarty->assign ( 'helpDefault', 'modify' ) ;
148
-    	if ($this->fromModuleBuilder) {
149
-			$mb = new ModuleBuilder ( ) ;
148
+        if ($this->fromModuleBuilder) {
149
+            $mb = new ModuleBuilder ( ) ;
150 150
             $module = & $mb->getPackageModule ( $this->editPackage, $this->editModule ) ;
151
-		    $smarty->assign('current_mod_strings', $module->getModStrings());
152
-		}
151
+            $smarty->assign('current_mod_strings', $module->getModStrings());
152
+        }
153 153
         $smarty->assign ( 'title', $this->_constructTitle () ) ;
154 154
         $groups = array ( ) ;
155 155
         foreach ( $parser->columns as $column => $function )
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.modulelabels.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -48,60 +48,60 @@
 block discarded – undo
48 48
 
49 49
 class ViewModulelabels extends SugarView
50 50
 {
51
- 	/**
52
-	 * @see SugarView::_getModuleTitleParams()
53
-	 */
54
-	protected function _getModuleTitleParams($browserTitle = false)
55
-	{
56
-	    global $mod_strings;
51
+        /**
52
+         * @see SugarView::_getModuleTitleParams()
53
+         */
54
+    protected function _getModuleTitleParams($browserTitle = false)
55
+    {
56
+        global $mod_strings;
57 57
 	    
58
-    	return array(
59
-    	   translate('LBL_MODULE_NAME','Administration'),
60
-    	   ModuleBuilderController::getModuleTitle(),
61
-    	   );
58
+        return array(
59
+            translate('LBL_MODULE_NAME','Administration'),
60
+            ModuleBuilderController::getModuleTitle(),
61
+            );
62 62
     }
63 63
 
64
-	function display()
65
-	{
66
- 		global $mod_strings;
64
+    function display()
65
+    {
66
+            global $mod_strings;
67 67
         $bak_mod_strings=$mod_strings;
68
- 		$smarty = new Sugar_Smarty();
68
+            $smarty = new Sugar_Smarty();
69 69
         $smarty->assign('mod_strings', $mod_strings);
70
- 		$package_name = $_REQUEST['view_package'];
71
- 		$module_name = $_REQUEST['view_module'];
70
+            $package_name = $_REQUEST['view_package'];
71
+            $module_name = $_REQUEST['view_module'];
72 72
 
73
-		require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
74
-		$mb = new ModuleBuilder();
75
-		$mb->getPackage($_REQUEST['view_package']);
76
-		$package = $mb->packages[$_REQUEST['view_package']];
77
-		$package->getModule($module_name);
78
-		$mbModule = $package->modules[$module_name];
79
-		$selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']);
80
-		if(empty($selected_lang)){
81
-	    	$selected_lang = $GLOBALS['sugar_config']['default_language'];
82
-		}
83
-	        //need to change the following to interface with MBlanguage.
73
+        require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
74
+        $mb = new ModuleBuilder();
75
+        $mb->getPackage($_REQUEST['view_package']);
76
+        $package = $mb->packages[$_REQUEST['view_package']];
77
+        $package->getModule($module_name);
78
+        $mbModule = $package->modules[$module_name];
79
+        $selected_lang = (!empty($_REQUEST['selected_lang'])?$_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']);
80
+        if(empty($selected_lang)){
81
+            $selected_lang = $GLOBALS['sugar_config']['default_language'];
82
+        }
83
+            //need to change the following to interface with MBlanguage.
84 84
 
85 85
         $smarty->assign('MOD', $mbModule->getModStrings($selected_lang));
86
-		$smarty->assign('APP', $GLOBALS['app_strings']);
87
-		$smarty->assign('selected_lang', $selected_lang);
88
-		$smarty->assign('view_package', $package_name);
89
-		$smarty->assign('view_module', $module_name);
90
-		$smarty->assign('mb','1');
91
-		$smarty->assign('available_languages', get_languages());
92
-		///////////////////////////////////////////////////////////////////
93
- 		////ASSISTANT
94
- 		$smarty->assign('assistant',array('group'=>'module', 'key'=>'labels'));
95
-		/////////////////////////////////////////////////////////////////
96
-	 	////ASSISTANT
86
+        $smarty->assign('APP', $GLOBALS['app_strings']);
87
+        $smarty->assign('selected_lang', $selected_lang);
88
+        $smarty->assign('view_package', $package_name);
89
+        $smarty->assign('view_module', $module_name);
90
+        $smarty->assign('mb','1');
91
+        $smarty->assign('available_languages', get_languages());
92
+        ///////////////////////////////////////////////////////////////////
93
+            ////ASSISTANT
94
+            $smarty->assign('assistant',array('group'=>'module', 'key'=>'labels'));
95
+        /////////////////////////////////////////////////////////////////
96
+            ////ASSISTANT
97 97
 
98
-		$ajax = new AjaxCompose();
99
-		$ajax->addCrumb($bak_mod_strings['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
100
-		$ajax->addCrumb($package_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name. '")');
98
+        $ajax = new AjaxCompose();
99
+        $ajax->addCrumb($bak_mod_strings['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
100
+        $ajax->addCrumb($package_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name. '")');
101 101
         $ajax->addCrumb($module_name, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package='.$package->name.'&view_module='. $module_name . '")');
102 102
         $ajax->addCrumb($bak_mod_strings['LBL_LABELS'], '');
103
-		$ajax->addSection('center', $bak_mod_strings['LBL_LABELS'],$smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl'));
104
-		echo $ajax->getJavascript();
105
-	}
103
+        $ajax->addSection('center', $bak_mod_strings['LBL_LABELS'],$smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl'));
104
+        echo $ajax->getJavascript();
105
+    }
106 106
 }
107 107
 
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.history.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -47,19 +47,19 @@  discard block
 block discarded – undo
47 47
     var $pageSize = 10 ;
48 48
 
49 49
     /**
50
-	 * @see SugarView::_getModuleTitleParams()
51
-	 */
52
-	protected function _getModuleTitleParams($browserTitle = false)
53
-	{
54
-	    global $mod_strings;
50
+     * @see SugarView::_getModuleTitleParams()
51
+     */
52
+    protected function _getModuleTitleParams($browserTitle = false)
53
+    {
54
+        global $mod_strings;
55 55
 	    
56
-    	return array(
57
-    	   translate('LBL_MODULE_NAME','Administration'),
58
-    	   ModuleBuilderController::getModuleTitle(),
59
-    	   );
56
+        return array(
57
+            translate('LBL_MODULE_NAME','Administration'),
58
+            ModuleBuilderController::getModuleTitle(),
59
+            );
60 60
     }
61 61
 
62
-	function display ()
62
+    function display ()
63 63
     {
64 64
         $this->layout = strtolower ( $_REQUEST [ 'view' ] ) ;
65 65
         
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         }
136 136
         echo "<input type='button' name='close$sid' value='". translate ( 'LBL_BTN_CLOSE' )."' " . 
137 137
                 "class='button' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.tabPanel.get(\"activeTab\"));' style='margin:5px;'>" . 
138
-             "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " .  
138
+                "<input type='button' name='restore$sid' value='" . translate ( 'LBL_MB_RESTORE' ) . "' " .  
139 139
                 "class='button' onclick='ModuleBuilder.history.revert(\"$this->module\",\"{$this->layout}\",\"$sid\"$subpanel);' style='margin:5px;'>" ;
140 140
         $this->history->restoreByTimestamp ( $sid ) ;
141 141
         $view ;
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
             $view = new ViewSearchView ( ) ;
150 150
         } else if ($this->layout == 'dashlet' || $this->layout == 'dashletsearch')
151 151
         {
152
-        	require_once ("modules/ModuleBuilder/views/view.dashlet.php") ;
153
-        	$view = new ViewDashlet ( ) ;
152
+            require_once ("modules/ModuleBuilder/views/view.dashlet.php") ;
153
+            $view = new ViewDashlet ( ) ;
154 154
         }  else if ($this->layout == 'popuplist' || $this->layout == 'popupsearch')
155 155
         {
156
-        	require_once ("modules/ModuleBuilder/views/view.popupview.php") ;
157
-        	$view = new ViewPopupview ( ) ;
156
+            require_once ("modules/ModuleBuilder/views/view.popupview.php") ;
157
+            $view = new ViewPopupview ( ) ;
158 158
         } else
159 159
         {
160 160
             require_once ("modules/ModuleBuilder/views/view.layoutview.php") ;
@@ -175,12 +175,12 @@  discard block
 block discarded – undo
175 175
         $this->history->restoreByTimestamp ( $sid ) ;
176 176
     }
177 177
 
178
-	/**
179
- 	 * Restores a layout to its current customized state. 
180
- 	 * Called when leaving a restored layout without saving.
181
- 	 */
178
+    /**
179
+     * Restores a layout to its current customized state. 
180
+     * Called when leaving a restored layout without saving.
181
+     */
182 182
     function unrestore() 
183 183
     {
184
-    	$this->history->undoRestore () ;
184
+        $this->history->undoRestore () ;
185 185
     }
186 186
 }
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.labels.php 1 patch
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -48,73 +48,73 @@  discard block
 block discarded – undo
48 48
 class ViewLabels extends ViewModulefields
49 49
 {
50 50
     /**
51
-	 * @see SugarView::_getModuleTitleParams()
52
-	 */
53
-	protected function _getModuleTitleParams($browserTitle = false)
54
-	{
55
-	    global $mod_strings;
51
+     * @see SugarView::_getModuleTitleParams()
52
+     */
53
+    protected function _getModuleTitleParams($browserTitle = false)
54
+    {
55
+        global $mod_strings;
56 56
 
57
-    	return array(
58
-    	   translate('LBL_MODULE_NAME','Administration'),
59
-    	   ModuleBuilderController::getModuleTitle(),
60
-    	   );
57
+        return array(
58
+            translate('LBL_MODULE_NAME','Administration'),
59
+            ModuleBuilderController::getModuleTitle(),
60
+            );
61 61
     }
62 62
 
63
- 	//STUDIO LABELS ONLY//
64
- 	//TODO Bundle Studio and ModuleBuilder label handling to increase maintainability.
65
- 	function display()
66
- 	{
67
-		$editModule = $_REQUEST['view_module'];
68
-		$allLabels = (!empty($_REQUEST['labels']) && $_REQUEST['labels']== 'all');
63
+        //STUDIO LABELS ONLY//
64
+        //TODO Bundle Studio and ModuleBuilder label handling to increase maintainability.
65
+        function display()
66
+        {
67
+        $editModule = $_REQUEST['view_module'];
68
+        $allLabels = (!empty($_REQUEST['labels']) && $_REQUEST['labels']== 'all');
69 69
 
70
- 		if (!isset($_REQUEST['MB']))
71
-		{
72
-		    global $app_list_strings;
73
-		    $moduleNames = array_change_key_case($app_list_strings['moduleList']);
74
-		    $translatedEditModule = $moduleNames[strtolower($editModule)];
75
-		}
76
-		$selected_lang = (!empty($_REQUEST['selected_lang'])? $_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']);
77
-		if(empty($selected_lang)){
78
-		    $selected_lang = $GLOBALS['sugar_config']['default_language'];
79
-		}
70
+            if (!isset($_REQUEST['MB']))
71
+        {
72
+            global $app_list_strings;
73
+            $moduleNames = array_change_key_case($app_list_strings['moduleList']);
74
+            $translatedEditModule = $moduleNames[strtolower($editModule)];
75
+        }
76
+        $selected_lang = (!empty($_REQUEST['selected_lang'])? $_REQUEST['selected_lang']:$_SESSION['authenticated_user_language']);
77
+        if(empty($selected_lang)){
78
+            $selected_lang = $GLOBALS['sugar_config']['default_language'];
79
+        }
80 80
 
81
-		$smarty = new Sugar_Smarty();
82
-		global $mod_strings;
81
+        $smarty = new Sugar_Smarty();
82
+        global $mod_strings;
83 83
         $smarty->assign('mod_strings', $mod_strings);
84
-		$smarty->assign('available_languages',get_languages());
84
+        $smarty->assign('available_languages',get_languages());
85 85
 
86 86
 
87 87
         $objectName = BeanFactory::getObjectName($editModule);
88 88
         VardefManager::loadVardef($editModule, $objectName);
89 89
         global $dictionary;
90 90
         $vnames = array();
91
-		//jchi 24557 . We should list all the lables in viewdefs(list,detail,edit,quickcreate) that the user can edit them.
92
-		require_once 'modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' ;
91
+        //jchi 24557 . We should list all the lables in viewdefs(list,detail,edit,quickcreate) that the user can edit them.
92
+        require_once 'modules/ModuleBuilder/parsers/views/ListLayoutMetaDataParser.php' ;
93 93
         $parser = new ListLayoutMetaDataParser ( MB_LISTVIEW, $editModule ) ;
94 94
         foreach ( $parser->getLayout() as $key => $def )
95 95
         {
96
-        	if(isset($def['label']) ) {
97
-               $vnames[$def['label']] = $def['label'];
98
-        	}
96
+            if(isset($def['label']) ) {
97
+                $vnames[$def['label']] = $def['label'];
98
+            }
99 99
         }
100 100
 
101
-       require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ;
101
+        require_once 'modules/ModuleBuilder/parsers/views/GridLayoutMetaDataParser.php' ;
102 102
         $variableMap = $this->getVariableMap($editModule);
103 103
         foreach($variableMap as $key => $value){
104
-        	$gridLayoutMetaDataParserTemp = new GridLayoutMetaDataParser ( $value, $editModule) ;
105
-        	foreach ( $gridLayoutMetaDataParserTemp->getLayout() as $panel)
106
-	        {
107
-	                foreach ( $panel as $row )
108
-	                {
109
-	                    foreach ( $row as $fieldArray )
110
-	                    { // fieldArray is an array('name'=>name,'label'=>label)
111
-	                        if (isset ( $fieldArray [ 'label' ] ))
112
-	                        {
113
-	                            $vnames[$fieldArray [ 'label' ] ] = $fieldArray [ 'label' ] ;
114
-	                        }
115
-	                    }
116
-	                }
117
-	        }
104
+            $gridLayoutMetaDataParserTemp = new GridLayoutMetaDataParser ( $value, $editModule) ;
105
+            foreach ( $gridLayoutMetaDataParserTemp->getLayout() as $panel)
106
+            {
107
+                    foreach ( $panel as $row )
108
+                    {
109
+                        foreach ( $row as $fieldArray )
110
+                        { // fieldArray is an array('name'=>name,'label'=>label)
111
+                            if (isset ( $fieldArray [ 'label' ] ))
112
+                            {
113
+                                $vnames[$fieldArray [ 'label' ] ] = $fieldArray [ 'label' ] ;
114
+                            }
115
+                        }
116
+                    }
117
+            }
118 118
         }
119 119
         //end
120 120
 
@@ -122,23 +122,23 @@  discard block
 block discarded – undo
122 122
         require_once ('include/SubPanel/SubPanel.php') ;
123 123
         $subList =  SubPanel::getModuleSubpanels ( $editModule );
124 124
         foreach($subList as $subpanel => $titleLabel) {
125
-        	$vnames[$titleLabel] = $titleLabel;
125
+            $vnames[$titleLabel] = $titleLabel;
126 126
         }
127 127
 
128 128
         foreach($dictionary[$objectName]['fields'] as $name=>$def) {
129
-        	if(isset($def['vname'])) {
130
-               $vnames[$def['vname']] = $def['vname'];
131
-        	}
132
-		}
133
- 	    $formatted_mod_strings = array();
129
+            if(isset($def['vname'])) {
130
+                $vnames[$def['vname']] = $def['vname'];
131
+            }
132
+        }
133
+            $formatted_mod_strings = array();
134 134
 
135
- 	    //we shouldn't set the $refresh=true here, or will lost template language mod_strings.
136
- 	    //return_module_language($selected_lang, $editModule,false) : the mod_strings will be included from cache files here.
135
+            //we shouldn't set the $refresh=true here, or will lost template language mod_strings.
136
+            //return_module_language($selected_lang, $editModule,false) : the mod_strings will be included from cache files here.
137 137
         foreach(return_module_language($selected_lang, $editModule,false) as $name=>$label) {
138
-        		//#25294
139
-        	 	if($allLabels || isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) {
138
+                //#25294
139
+                    if($allLabels || isset($vnames[$name]) || preg_match( '/lbl_city|lbl_country|lbl_billing_address|lbl_alt_address|lbl_shipping_address|lbl_postal_code|lbl_state$/si' , $name)) {
140 140
                     $formatted_mod_strings[$name] = htmlentities($label, ENT_QUOTES, 'UTF-8');
141
-        	 	}
141
+                    }
142 142
         }
143 143
         //Grab everything from the custom files
144 144
         $mod_bak = $mod_strings;
@@ -147,49 +147,49 @@  discard block
 block discarded – undo
147 147
             "custom/modules/$editModule/Ext/Language/$selected_lang.lang.ext.php"
148 148
         );
149 149
         foreach($files as $langfile){
150
-        	$mod_strings = array();
151
-        	if (is_file($langfile))
152
-        	{
153
-        	   include($langfile);
154
-        	   foreach($mod_strings as $key => $label)
155
-        	   {
150
+            $mod_strings = array();
151
+            if (is_file($langfile))
152
+            {
153
+                include($langfile);
154
+                foreach($mod_strings as $key => $label)
155
+                {
156 156
                     $formatted_mod_strings[$key] = htmlentities($label, ENT_QUOTES, 'UTF-8');
157
-        	   }
158
-        	}
157
+                }
158
+            }
159 159
         }
160 160
         $mod_strings = $mod_bak;
161 161
         ksort($formatted_mod_strings);
162
-		$smarty->assign('MOD', $formatted_mod_strings);
163
-		$smarty->assign('view_module', $editModule);
164
-		$smarty->assign('APP', $GLOBALS['app_strings']);
165
-		$smarty->assign('selected_lang', $selected_lang);
166
-		$smarty->assign('defaultHelp', 'labelsBtn');
167
-		$smarty->assign('assistant', array('key'=>'labels', 'group'=>'module'));
168
-		$smarty->assign('labels_choice', $mod_strings['labelTypes']);
169
-		$smarty->assign('labels_current', $allLabels?"all":"");
162
+        $smarty->assign('MOD', $formatted_mod_strings);
163
+        $smarty->assign('view_module', $editModule);
164
+        $smarty->assign('APP', $GLOBALS['app_strings']);
165
+        $smarty->assign('selected_lang', $selected_lang);
166
+        $smarty->assign('defaultHelp', 'labelsBtn');
167
+        $smarty->assign('assistant', array('key'=>'labels', 'group'=>'module'));
168
+        $smarty->assign('labels_choice', $mod_strings['labelTypes']);
169
+        $smarty->assign('labels_current', $allLabels?"all":"");
170 170
 
171
-		$ajax = new AjaxCompose();
172
-		$ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
173
-		$ajax->addCrumb($translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module='.$editModule.'")');
174
-		$ajax->addCrumb($mod_strings['LBL_LABELS'], '');
171
+        $ajax = new AjaxCompose();
172
+        $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
173
+        $ajax->addCrumb($translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module='.$editModule.'")');
174
+        $ajax->addCrumb($mod_strings['LBL_LABELS'], '');
175 175
 
176
- 		$html = $smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl');
177
- 		$ajax->addSection('center', $GLOBALS['mod_strings']['LBL_SECTION_EDLABELS'], $html);
178
- 		echo $ajax->getJavascript();
179
- 	}
176
+            $html = $smarty->fetch('modules/ModuleBuilder/tpls/labels.tpl');
177
+            $ajax->addSection('center', $GLOBALS['mod_strings']['LBL_SECTION_EDLABELS'], $html);
178
+            echo $ajax->getJavascript();
179
+        }
180 180
     
181 181
     // fixing bug #39749: Quick Create in Studio
182 182
     function getVariableMap($module)
183 183
     {
184 184
         $variableMap = array(MB_EDITVIEW => 'EditView', 
185
-                             MB_DETAILVIEW => 'DetailView', 
186
-                             MB_QUICKCREATE => 'QuickCreate');
185
+                                MB_DETAILVIEW => 'DetailView', 
186
+                                MB_QUICKCREATE => 'QuickCreate');
187 187
         
188 188
         $hideQuickCreateForModules = array('KBDocuments',
189
-                                           'ProjectTask',
190
-                                           'Campaigns',
191
-                                           'Quotes',
192
-                                           'ProductTemplates');
189
+                                            'ProjectTask',
190
+                                            'Campaigns',
191
+                                            'Quotes',
192
+                                            'ProductTemplates');
193 193
         
194 194
         if(in_array($module, $hideQuickCreateForModules))
195 195
         {
Please login to merge, or discard this patch.
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.