Completed
Push — master ( a75ecc...97ae17 )
by Adam
71:21 queued 52:34
created
modules/Home/UnifiedSearchAdvanced.php 1 patch
Indentation   +297 added lines, -297 removed lines patch added patch discarded remove patch
@@ -69,95 +69,95 @@  discard block
 block discarded – undo
69 69
         $this->cache_display = sugar_cached('modules/unified_search_modules_display.php');
70 70
     }
71 71
 
72
-	function getDropDownDiv($tpl = 'modules/Home/UnifiedSearchAdvanced.tpl') {
73
-		global $app_list_strings, $app_strings;
72
+    function getDropDownDiv($tpl = 'modules/Home/UnifiedSearchAdvanced.tpl') {
73
+        global $app_list_strings, $app_strings;
74 74
 
75
-		if(!file_exists($this->cache_search))
76
-		{
77
-			$this->buildCache();
78
-		}
75
+        if(!file_exists($this->cache_search))
76
+        {
77
+            $this->buildCache();
78
+        }
79 79
 
80
-		$unified_search_modules_display = $this->getUnifiedSearchModulesDisplay();
80
+        $unified_search_modules_display = $this->getUnifiedSearchModulesDisplay();
81 81
 
82
-		global $mod_strings, $modListHeader, $app_list_strings, $current_user, $app_strings, $beanList;
83
-		$users_modules = $current_user->getPreference('globalSearch', 'search');
82
+        global $mod_strings, $modListHeader, $app_list_strings, $current_user, $app_strings, $beanList;
83
+        $users_modules = $current_user->getPreference('globalSearch', 'search');
84 84
 
85
-		// preferences are empty, select all
86
-		if(empty($users_modules)) {
87
-			$users_modules = array();
88
-			foreach($unified_search_modules_display as $module=>$data) {
89
-				if (!empty($data['visible']) ) {
85
+        // preferences are empty, select all
86
+        if(empty($users_modules)) {
87
+            $users_modules = array();
88
+            foreach($unified_search_modules_display as $module=>$data) {
89
+                if (!empty($data['visible']) ) {
90 90
                     $users_modules[$module] = $beanList[$module];
91 91
                 }
92
-			}
93
-			$current_user->setPreference('globalSearch', $users_modules, 0, 'search');
94
-		}
92
+            }
93
+            $current_user->setPreference('globalSearch', $users_modules, 0, 'search');
94
+        }
95 95
 
96
-		$sugar_smarty = new Sugar_Smarty();
96
+        $sugar_smarty = new Sugar_Smarty();
97 97
 
98
-		$modules_to_search = array();
98
+        $modules_to_search = array();
99 99
 
100
-		foreach($users_modules as $key=>$module)
101
-		{
100
+        foreach($users_modules as $key=>$module)
101
+        {
102 102
             if(ACLController::checkAccess($key, 'list', true))
103 103
             {
104 104
                 $modules_to_search[$key]['checked'] = true;
105 105
             }
106
-		}
107
-
108
-		if(!empty($this->query_string))
109
-		{
110
-			$sugar_smarty->assign('query_string', securexss($this->query_string));
111
-		} else {
112
-			$sugar_smarty->assign('query_string', '');
113
-		}
114
-
115
-		$sugar_smarty->assign('MOD', return_module_language($GLOBALS['current_language'], 'Administration'));
116
-		$sugar_smarty->assign('APP', $app_strings);
117
-		$sugar_smarty->assign('USE_SEARCH_GIF', 0);
118
-		$sugar_smarty->assign('LBL_SEARCH_BUTTON_LABEL', $app_strings['LBL_SEARCH_BUTTON_LABEL']);
119
-		$sugar_smarty->assign('LBL_SEARCH_BUTTON_TITLE', $app_strings['LBL_SEARCH_BUTTON_TITLE']);
120
-		$sugar_smarty->assign('LBL_SEARCH', $app_strings['LBL_SEARCH']);
121
-
122
-		$json_enabled = array();
123
-		$json_disabled = array();
124
-
125
-		//Now add the rest of the modules that are searchable via Global Search settings
126
-		foreach($unified_search_modules_display as $module=>$data)
127
-		{
128
-			if(!isset($modules_to_search[$module]) && $data['visible'] && ACLController::checkAccess($module, 'list', true))
129
-			{
130
-			   $modules_to_search[$module]['checked'] = false;
131
-			} else if (isset($modules_to_search[$module]) && !$data['visible']) {
132
-			   unset($modules_to_search[$module]);
133
-			}
134
-		}
135
-
136
-		//Create the two lists (doing it this way preserves the user's ordering choice for enabled modules)
137
-		foreach($modules_to_search as $module=>$data)
138
-		{
139
-			$label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module;
140
-			if(!empty($data['checked']))
141
-			{
142
-				$json_enabled[] = array("module" => $module, 'label' => $label);
143
-			} else {
144
-				$json_disabled[] = array("module" => $module, 'label' => $label);
145
-			}
146
-		}
147
-
148
-		$sugar_smarty->assign('enabled_modules', json_encode($json_enabled));
149
-		$sugar_smarty->assign('disabled_modules', json_encode($json_disabled));
150
-
151
-		$showDiv = $current_user->getPreference('showGSDiv', 'search');
152
-		if(!isset($showDiv))
153
-		{
154
-		   $showDiv = 'no';
155
-		}
156
-
157
-		$sugar_smarty->assign('SHOWGSDIV', $showDiv);
158
-		$sugar_smarty->debugging = true;
159
-		return $sugar_smarty->fetch($tpl);
160
-	}
106
+        }
107
+
108
+        if(!empty($this->query_string))
109
+        {
110
+            $sugar_smarty->assign('query_string', securexss($this->query_string));
111
+        } else {
112
+            $sugar_smarty->assign('query_string', '');
113
+        }
114
+
115
+        $sugar_smarty->assign('MOD', return_module_language($GLOBALS['current_language'], 'Administration'));
116
+        $sugar_smarty->assign('APP', $app_strings);
117
+        $sugar_smarty->assign('USE_SEARCH_GIF', 0);
118
+        $sugar_smarty->assign('LBL_SEARCH_BUTTON_LABEL', $app_strings['LBL_SEARCH_BUTTON_LABEL']);
119
+        $sugar_smarty->assign('LBL_SEARCH_BUTTON_TITLE', $app_strings['LBL_SEARCH_BUTTON_TITLE']);
120
+        $sugar_smarty->assign('LBL_SEARCH', $app_strings['LBL_SEARCH']);
121
+
122
+        $json_enabled = array();
123
+        $json_disabled = array();
124
+
125
+        //Now add the rest of the modules that are searchable via Global Search settings
126
+        foreach($unified_search_modules_display as $module=>$data)
127
+        {
128
+            if(!isset($modules_to_search[$module]) && $data['visible'] && ACLController::checkAccess($module, 'list', true))
129
+            {
130
+                $modules_to_search[$module]['checked'] = false;
131
+            } else if (isset($modules_to_search[$module]) && !$data['visible']) {
132
+                unset($modules_to_search[$module]);
133
+            }
134
+        }
135
+
136
+        //Create the two lists (doing it this way preserves the user's ordering choice for enabled modules)
137
+        foreach($modules_to_search as $module=>$data)
138
+        {
139
+            $label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module;
140
+            if(!empty($data['checked']))
141
+            {
142
+                $json_enabled[] = array("module" => $module, 'label' => $label);
143
+            } else {
144
+                $json_disabled[] = array("module" => $module, 'label' => $label);
145
+            }
146
+        }
147
+
148
+        $sugar_smarty->assign('enabled_modules', json_encode($json_enabled));
149
+        $sugar_smarty->assign('disabled_modules', json_encode($json_disabled));
150
+
151
+        $showDiv = $current_user->getPreference('showGSDiv', 'search');
152
+        if(!isset($showDiv))
153
+        {
154
+            $showDiv = 'no';
155
+        }
156
+
157
+        $sugar_smarty->assign('SHOWGSDIV', $showDiv);
158
+        $sugar_smarty->debugging = true;
159
+        return $sugar_smarty->fetch($tpl);
160
+    }
161 161
 
162 162
 
163 163
     /**
@@ -170,70 +170,70 @@  discard block
 block discarded – undo
170 170
      *
171 171
      *
172 172
      */
173
-	function search() {
173
+    function search() {
174 174
 
175 175
         $unified_search_modules = $this->getUnifiedSearchModules();
176
-		$unified_search_modules_display = $this->getUnifiedSearchModulesDisplay();
176
+        $unified_search_modules_display = $this->getUnifiedSearchModulesDisplay();
177 177
 
178 178
 
179
-		require_once 'include/ListView/ListViewSmarty.php';
179
+        require_once 'include/ListView/ListViewSmarty.php';
180 180
 
181
-		global $modListHeader, $beanList, $beanFiles, $current_language, $app_strings, $current_user, $mod_strings;
182
-		$home_mod_strings = return_module_language($current_language, 'Home');
181
+        global $modListHeader, $beanList, $beanFiles, $current_language, $app_strings, $current_user, $mod_strings;
182
+        $home_mod_strings = return_module_language($current_language, 'Home');
183 183
 
184
-		$this->query_string = $GLOBALS['db']->quote(securexss(from_html(clean_string($this->query_string, 'UNIFIED_SEARCH'))));
184
+        $this->query_string = $GLOBALS['db']->quote(securexss(from_html(clean_string($this->query_string, 'UNIFIED_SEARCH'))));
185 185
 
186
-		if(!empty($_REQUEST['advanced']) && $_REQUEST['advanced'] != 'false') {
187
-			$modules_to_search = array();
188
-			if(!empty($_REQUEST['search_modules']))
189
-			{
190
-			    foreach(explode (',', $_REQUEST['search_modules'] ) as $key)
191
-	            {
186
+        if(!empty($_REQUEST['advanced']) && $_REQUEST['advanced'] != 'false') {
187
+            $modules_to_search = array();
188
+            if(!empty($_REQUEST['search_modules']))
189
+            {
190
+                foreach(explode (',', $_REQUEST['search_modules'] ) as $key)
191
+                {
192 192
                     if (isset($unified_search_modules_display[$key]) && !empty($unified_search_modules_display[$key]['visible']))
193 193
                     {
194 194
                         $modules_to_search[$key] = $beanList[$key];
195 195
                     }
196
-	            }
197
-			}
198
-
199
-			$current_user->setPreference('showGSDiv', isset($_REQUEST['showGSDiv']) ? $_REQUEST['showGSDiv'] : 'no', 0, 'search');
200
-			$current_user->setPreference('globalSearch', $modules_to_search, 0, 'search'); // save selections to user preference
201
-		} else {
202
-			$users_modules = $current_user->getPreference('globalSearch', 'search');
203
-			$modules_to_search = array();
204
-
205
-			if(!empty($users_modules)) {
206
-				// use user's previous selections
207
-			    foreach ( $users_modules as $key => $value ) {
208
-			    	if (isset($unified_search_modules_display[$key]) && !empty($unified_search_modules_display[$key]['visible'])) {
209
-		            	$modules_to_search[$key] = $beanList[$key];
210
-		        	}
211
-			    }
212
-			} else {
213
-				foreach($unified_search_modules_display as $module=>$data) {
214
-				    if (!empty($data['visible']) ) {
215
-				        $modules_to_search[$module] = $beanList[$module];
216
-				    }
217
-				}
218
-			}
219
-			$current_user->setPreference('globalSearch', $modules_to_search, 'search');
220
-		}
221
-
222
-
223
-		$templateFile = 'modules/Home/UnifiedSearchAdvancedForm.tpl';
224
-		if(file_exists('custom/' . $templateFile))
225
-		{
226
-		   $templateFile = 'custom/'.$templateFile;
227
-		}
228
-
229
-		echo $this->getDropDownDiv($templateFile);
230
-
231
-		$module_results = array();
232
-		$module_counts = array();
233
-		$has_results = false;
234
-
235
-		if(!empty($this->query_string)) {
236
-			foreach($modules_to_search as $moduleName => $beanName) {
196
+                }
197
+            }
198
+
199
+            $current_user->setPreference('showGSDiv', isset($_REQUEST['showGSDiv']) ? $_REQUEST['showGSDiv'] : 'no', 0, 'search');
200
+            $current_user->setPreference('globalSearch', $modules_to_search, 0, 'search'); // save selections to user preference
201
+        } else {
202
+            $users_modules = $current_user->getPreference('globalSearch', 'search');
203
+            $modules_to_search = array();
204
+
205
+            if(!empty($users_modules)) {
206
+                // use user's previous selections
207
+                foreach ( $users_modules as $key => $value ) {
208
+                    if (isset($unified_search_modules_display[$key]) && !empty($unified_search_modules_display[$key]['visible'])) {
209
+                        $modules_to_search[$key] = $beanList[$key];
210
+                    }
211
+                }
212
+            } else {
213
+                foreach($unified_search_modules_display as $module=>$data) {
214
+                    if (!empty($data['visible']) ) {
215
+                        $modules_to_search[$module] = $beanList[$module];
216
+                    }
217
+                }
218
+            }
219
+            $current_user->setPreference('globalSearch', $modules_to_search, 'search');
220
+        }
221
+
222
+
223
+        $templateFile = 'modules/Home/UnifiedSearchAdvancedForm.tpl';
224
+        if(file_exists('custom/' . $templateFile))
225
+        {
226
+            $templateFile = 'custom/'.$templateFile;
227
+        }
228
+
229
+        echo $this->getDropDownDiv($templateFile);
230
+
231
+        $module_results = array();
232
+        $module_counts = array();
233
+        $has_results = false;
234
+
235
+        if(!empty($this->query_string)) {
236
+            foreach($modules_to_search as $moduleName => $beanName) {
237 237
                 require_once $beanFiles[$beanName] ;
238 238
                 $seed = new $beanName();
239 239
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
                 //retrieve the original list view defs and store for processing in case of custom layout changes
245 245
                 require('modules/'.$seed->module_dir.'/metadata/listviewdefs.php');
246
-				$orig_listViewDefs = $listViewDefs;
246
+                $orig_listViewDefs = $listViewDefs;
247 247
 
248 248
                 if(file_exists('custom/modules/'.$seed->module_dir.'/metadata/listviewdefs.php'))
249 249
                 {
@@ -255,20 +255,20 @@  discard block
 block discarded – undo
255 255
                     continue;
256 256
                 }
257 257
 
258
-			    $unifiedSearchFields = array () ;
258
+                $unifiedSearchFields = array () ;
259 259
                 $innerJoins = array();
260 260
                 foreach ( $unified_search_modules[ $moduleName ]['fields'] as $field=>$def )
261 261
                 {
262
-                	$listViewCheckField = strtoupper($field);
263
-                	//check to see if the field is in listview defs
264
-					if ( empty($listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) {
265
-						//check to see if field is in original list view defs (in case we are using custom layout defs)
266
-						if (!empty($orig_listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) {
267
-							//if we are here then the layout has been customized, but the field is still needed for query creation
268
-							$listViewDefs[$seed->module_dir][$listViewCheckField] = $orig_listViewDefs[$seed->module_dir][$listViewCheckField];
269
-						}
262
+                    $listViewCheckField = strtoupper($field);
263
+                    //check to see if the field is in listview defs
264
+                    if ( empty($listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) {
265
+                        //check to see if field is in original list view defs (in case we are using custom layout defs)
266
+                        if (!empty($orig_listViewDefs[$seed->module_dir][$listViewCheckField]['default']) ) {
267
+                            //if we are here then the layout has been customized, but the field is still needed for query creation
268
+                            $listViewDefs[$seed->module_dir][$listViewCheckField] = $orig_listViewDefs[$seed->module_dir][$listViewCheckField];
269
+                        }
270 270
 
271
-					}
271
+                    }
272 272
 
273 273
                     //bug: 34125 we might want to try to use the LEFT JOIN operator instead of the INNER JOIN in the case we are
274 274
                     //joining against a field that has not been populated.
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
                 require_once $beanFiles[$beanName] ;
303 303
                 $seed = new $beanName();
304 304
                 
305
-				require_once $this->searchFormPath;
305
+                require_once $this->searchFormPath;
306 306
                 $searchForm = new $this->searchFormClass ( $seed, $moduleName ) ;
307 307
 
308 308
                 $searchForm->setup (array ( $moduleName => array() ) , $unifiedSearchFields , '' , 'saved_views' /* hack to avoid setup doing further unwanted processing */ ) ;
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
                 $params = array('custom_select' => "");
312 312
                 foreach($innerJoins as $field=>$def) {
313 313
                     if (isset ($def['db_field'])) {
314
-                      foreach($def['db_field'] as $dbfield)
315
-                          $where_clauses[] = $dbfield . " LIKE '" . $this->query_string . "%'";
316
-                          $params['custom_select'] .= ", $dbfield";
317
-                          $params['distinct'] = true;
318
-                          //$filterFields[$dbfield] = $dbfield;
314
+                        foreach($def['db_field'] as $dbfield)
315
+                            $where_clauses[] = $dbfield . " LIKE '" . $this->query_string . "%'";
316
+                            $params['custom_select'] .= ", $dbfield";
317
+                            $params['distinct'] = true;
318
+                            //$filterFields[$dbfield] = $dbfield;
319 319
                     }
320 320
                 }
321 321
 
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
 
342 342
                 if(count($displayColumns) > 0)
343 343
                 {
344
-                	$lv->displayColumns = $displayColumns;
344
+                    $lv->displayColumns = $displayColumns;
345 345
                 } else {
346
-                	$lv->displayColumns = $listViewDefs[$seed->module_dir];
346
+                    $lv->displayColumns = $listViewDefs[$seed->module_dir];
347 347
                 }
348 348
 
349 349
                 $lv->export = false;
@@ -368,56 +368,56 @@  discard block
 block discarded – undo
368 368
                     $module_results[$moduleName] .= $lv->display(false, false);
369 369
                 }
370 370
 
371
-			}
372
-		}
371
+            }
372
+        }
373 373
 
374
-		if($has_results) {
375
-			foreach($module_counts as $name=>$value) {
376
-				echo $module_results[$name];
377
-			}
378
-		} else if(empty($_REQUEST['form_only'])) {
379
-			echo $home_mod_strings['LBL_NO_RESULTS'];
380
-			echo $home_mod_strings['LBL_NO_RESULTS_TIPS'];
381
-		}
374
+        if($has_results) {
375
+            foreach($module_counts as $name=>$value) {
376
+                echo $module_results[$name];
377
+            }
378
+        } else if(empty($_REQUEST['form_only'])) {
379
+            echo $home_mod_strings['LBL_NO_RESULTS'];
380
+            echo $home_mod_strings['LBL_NO_RESULTS_TIPS'];
381
+        }
382 382
 
383
-	}
383
+    }
384 384
 
385
-	function buildCache()
386
-	{
385
+    function buildCache()
386
+    {
387 387
 
388
-		global $beanList, $beanFiles, $dictionary;
388
+        global $beanList, $beanFiles, $dictionary;
389 389
 
390
-		$supported_modules = array();
390
+        $supported_modules = array();
391 391
 
392
-		foreach($beanList as $moduleName=>$beanName)
393
-		{
394
-			if (!isset($beanFiles[$beanName]))
395
-				continue;
392
+        foreach($beanList as $moduleName=>$beanName)
393
+        {
394
+            if (!isset($beanFiles[$beanName]))
395
+                continue;
396 396
 
397
-			$beanName = BeanFactory::getObjectName($moduleName);
398
-			$manager = new VardefManager ( );
399
-			$manager->loadVardef( $moduleName , $beanName ) ;
397
+            $beanName = BeanFactory::getObjectName($moduleName);
398
+            $manager = new VardefManager ( );
399
+            $manager->loadVardef( $moduleName , $beanName ) ;
400 400
 
401
-			// obtain the field definitions used by generateSearchWhere (duplicate code in view.list.php)
402
-			if(file_exists('custom/modules/'.$moduleName.'/metadata/metafiles.php')){
401
+            // obtain the field definitions used by generateSearchWhere (duplicate code in view.list.php)
402
+            if(file_exists('custom/modules/'.$moduleName.'/metadata/metafiles.php')){
403 403
                 require('custom/modules/'.$moduleName.'/metadata/metafiles.php');
404 404
             }elseif(file_exists('modules/'.$moduleName.'/metadata/metafiles.php')){
405 405
                 require('modules/'.$moduleName.'/metadata/metafiles.php');
406 406
             }
407 407
 
408 408
 
409
-			if(!empty($metafiles[$moduleName]['searchfields']))
410
-			{
411
-				require $metafiles[$moduleName]['searchfields'] ;
412
-			} else if(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) {
413
-				require "modules/{$moduleName}/metadata/SearchFields.php" ;
414
-			}
409
+            if(!empty($metafiles[$moduleName]['searchfields']))
410
+            {
411
+                require $metafiles[$moduleName]['searchfields'] ;
412
+            } else if(file_exists("modules/{$moduleName}/metadata/SearchFields.php")) {
413
+                require "modules/{$moduleName}/metadata/SearchFields.php" ;
414
+            }
415 415
 
416
-			//Load custom SearchFields.php if it exists
417
-			if(file_exists("custom/modules/{$moduleName}/metadata/SearchFields.php"))
418
-			{
419
-				require "custom/modules/{$moduleName}/metadata/SearchFields.php" ;
420
-			}				
416
+            //Load custom SearchFields.php if it exists
417
+            if(file_exists("custom/modules/{$moduleName}/metadata/SearchFields.php"))
418
+            {
419
+                require "custom/modules/{$moduleName}/metadata/SearchFields.php" ;
420
+            }				
421 421
 
422 422
             //If there are $searchFields are empty, just continue, there are no search fields defined for the module
423 423
             if(empty($searchFields[$moduleName]))
@@ -425,34 +425,34 @@  discard block
 block discarded – undo
425 425
                 continue;
426 426
             }
427 427
 
428
-			$isCustomModule = preg_match('/^([a-z0-9]{1,5})_([a-z0-9_]+)$/i' , $moduleName);
429
-
430
-			//If the bean supports unified search or if it's a custom module bean and unified search is not defined
431
-			if(!empty($dictionary[$beanName]['unified_search']) || $isCustomModule)
432
-			{
433
-				$fields = array();
434
-				foreach ( $dictionary [ $beanName ][ 'fields' ] as $field => $def )
435
-				{
436
-					// We cannot enable or disable unified_search for email in the vardefs as we don't actually have a vardef entry for 'email'
437
-					// the searchFields entry for 'email' doesn't correspond to any vardef entry. Instead it contains SQL to directly perform the search.
438
-					// So as a proxy we allow any field in the vardefs that has a name starting with 'email...' to be tagged with the 'unified_search' parameter
439
-
440
-					if (strpos($field,'email') !== false)
441
-					{
442
-						$field = 'email' ;
443
-					}
444
-
445
-					//bug: 38139 - allow phone to be searched through Global Search
446
-					if (strpos($field,'phone') !== false)
447
-					{
448
-						$field = 'phone' ;
449
-					}
450
-
451
-					if ( !empty($def['unified_search']) && isset ( $searchFields [ $moduleName ] [ $field ]  ))
452
-					{
453
-						$fields [ $field ] = $searchFields [ $moduleName ] [ $field ] ;
454
-					}
455
-				}
428
+            $isCustomModule = preg_match('/^([a-z0-9]{1,5})_([a-z0-9_]+)$/i' , $moduleName);
429
+
430
+            //If the bean supports unified search or if it's a custom module bean and unified search is not defined
431
+            if(!empty($dictionary[$beanName]['unified_search']) || $isCustomModule)
432
+            {
433
+                $fields = array();
434
+                foreach ( $dictionary [ $beanName ][ 'fields' ] as $field => $def )
435
+                {
436
+                    // We cannot enable or disable unified_search for email in the vardefs as we don't actually have a vardef entry for 'email'
437
+                    // the searchFields entry for 'email' doesn't correspond to any vardef entry. Instead it contains SQL to directly perform the search.
438
+                    // So as a proxy we allow any field in the vardefs that has a name starting with 'email...' to be tagged with the 'unified_search' parameter
439
+
440
+                    if (strpos($field,'email') !== false)
441
+                    {
442
+                        $field = 'email' ;
443
+                    }
444
+
445
+                    //bug: 38139 - allow phone to be searched through Global Search
446
+                    if (strpos($field,'phone') !== false)
447
+                    {
448
+                        $field = 'phone' ;
449
+                    }
450
+
451
+                    if ( !empty($def['unified_search']) && isset ( $searchFields [ $moduleName ] [ $field ]  ))
452
+                    {
453
+                        $fields [ $field ] = $searchFields [ $moduleName ] [ $field ] ;
454
+                    }
455
+                }
456 456
 
457 457
                 foreach ($searchFields[$moduleName] as $field => $def)
458 458
                 {
@@ -465,23 +465,23 @@  discard block
 block discarded – undo
465 465
                     }
466 466
                 }
467 467
 
468
-				if(count($fields) > 0) {
469
-					$supported_modules [$moduleName] ['fields'] = $fields;
470
-					if (isset($dictionary[$beanName]['unified_search_default_enabled']) && $dictionary[$beanName]['unified_search_default_enabled'] === TRUE)
471
-					{
468
+                if(count($fields) > 0) {
469
+                    $supported_modules [$moduleName] ['fields'] = $fields;
470
+                    if (isset($dictionary[$beanName]['unified_search_default_enabled']) && $dictionary[$beanName]['unified_search_default_enabled'] === TRUE)
471
+                    {
472 472
                         $supported_modules [$moduleName]['default'] = true;
473 473
                     } else {
474 474
                         $supported_modules [$moduleName]['default'] = false;
475 475
                     }
476
-				}
476
+                }
477 477
 
478
-			}
478
+            }
479 479
 
480
-		}
480
+        }
481 481
 
482
-		ksort($supported_modules);
483
-		write_array_to_file('unified_search_modules', $supported_modules, $this->cache_search);
484
-	}
482
+        ksort($supported_modules);
483
+        write_array_to_file('unified_search_modules', $supported_modules, $this->cache_search);
484
+    }
485 485
 
486 486
     /**
487 487
      * Retrieve the enabled and disabled modules used for global search.
@@ -525,9 +525,9 @@  discard block
 block discarded – undo
525 525
                 $label = isset($app_list_strings['moduleList'][$module]) ? $app_list_strings['moduleList'][$module] : $module;
526 526
                 if($data['default'])
527 527
                 {
528
-                  $json_enabled[] = array("module" => $module, 'label' => $label);
528
+                    $json_enabled[] = array("module" => $module, 'label' => $label);
529 529
                 } else {
530
-                  $json_disabled[] = array("module" => $module, 'label' => $label);
530
+                    $json_disabled[] = array("module" => $module, 'label' => $label);
531 531
                 }
532 532
             }
533 533
         }
@@ -536,47 +536,47 @@  discard block
 block discarded – undo
536 536
     }
537 537
 
538 538
 
539
-	/**
540
-	 * saveGlobalSearchSettings
541
-	 * This method handles the administrator's request to save the searchable modules selected and stores
542
-	 * the results in the unified_search_modules_display.php file
543
-	 *
544
-	 */
545
-	function saveGlobalSearchSettings()
546
-	{
547
-		if(isset($_REQUEST['enabled_modules']))
548
-		{
539
+    /**
540
+     * saveGlobalSearchSettings
541
+     * This method handles the administrator's request to save the searchable modules selected and stores
542
+     * the results in the unified_search_modules_display.php file
543
+     *
544
+     */
545
+    function saveGlobalSearchSettings()
546
+    {
547
+        if(isset($_REQUEST['enabled_modules']))
548
+        {
549 549
             $unified_search_modules_display = $this->getUnifiedSearchModulesDisplay();
550 550
 
551
-			$new_unified_search_modules_display = array();
551
+            $new_unified_search_modules_display = array();
552 552
 
553 553
             foreach(explode (',', $_REQUEST['enabled_modules'] ) as $module)
554 554
             {
555 555
                 $new_unified_search_modules_display[$module]['visible'] = true;
556 556
             }
557 557
 
558
-			foreach($unified_search_modules_display as $module=>$data)
559
-			{
560
-				if(!isset($new_unified_search_modules_display[$module]))
561
-				{
562
-				   $new_unified_search_modules_display[$module]['visible'] = false;
563
-				}
564
-			}
565
-
566
-			$this->writeUnifiedSearchModulesDisplayFile($new_unified_search_modules_display);
567
-		}
568
-	}
569
-
570
-
571
-	public static function unlinkUnifiedSearchModulesFile() {
572
-		//clear the unified_search_module.php file
573
-		$cache_search = sugar_cached('modules/unified_search_modules.php');
574
-    	if(file_exists($cache_search))
575
-    	{
576
-    		$GLOBALS['log']->info("unlink {$cache_search}");
577
-    		unlink($cache_search);
578
-    	}
579
-	}
558
+            foreach($unified_search_modules_display as $module=>$data)
559
+            {
560
+                if(!isset($new_unified_search_modules_display[$module]))
561
+                {
562
+                    $new_unified_search_modules_display[$module]['visible'] = false;
563
+                }
564
+            }
565
+
566
+            $this->writeUnifiedSearchModulesDisplayFile($new_unified_search_modules_display);
567
+        }
568
+    }
569
+
570
+
571
+    public static function unlinkUnifiedSearchModulesFile() {
572
+        //clear the unified_search_module.php file
573
+        $cache_search = sugar_cached('modules/unified_search_modules.php');
574
+        if(file_exists($cache_search))
575
+        {
576
+            $GLOBALS['log']->info("unlink {$cache_search}");
577
+            unlink($cache_search);
578
+        }
579
+    }
580 580
     
581 581
 
582 582
     /**
@@ -589,21 +589,21 @@  discard block
 block discarded – undo
589 589
      */
590 590
     public function getUnifiedSearchModules()
591 591
     {
592
-		//Make directory if it doesn't exist
592
+        //Make directory if it doesn't exist
593 593
         $cachedir = sugar_cached('modules');
594
-		if(!file_exists($cachedir))
595
-		{
596
-		   mkdir_recursive($cachedir);
597
-		}
594
+        if(!file_exists($cachedir))
595
+        {
596
+            mkdir_recursive($cachedir);
597
+        }
598 598
 
599
-		//Load unified_search_modules.php file
599
+        //Load unified_search_modules.php file
600 600
         $cachedFile = sugar_cached('modules/unified_search_modules.php');
601
-		if(!file_exists($cachedFile))
602
-		{
603
-			$this->buildCache();
604
-		}
601
+        if(!file_exists($cachedFile))
602
+        {
603
+            $this->buildCache();
604
+        }
605 605
 
606
-		include $cachedFile;
606
+        include $cachedFile;
607 607
         return $unified_search_modules;
608 608
     }
609 609
 
@@ -618,8 +618,8 @@  discard block
 block discarded – undo
618 618
      */
619 619
     public function getUnifiedSearchModulesDisplay()
620 620
     {
621
-		if(!file_exists('custom/modules/unified_search_modules_display.php'))
622
-		{
621
+        if(!file_exists('custom/modules/unified_search_modules_display.php'))
622
+        {
623 623
             $unified_search_modules = $this->getUnifiedSearchModules();
624 624
 
625 625
             $unified_search_modules_display = array();
@@ -633,13 +633,13 @@  discard block
 block discarded – undo
633 633
             }
634 634
 
635 635
             $this->writeUnifiedSearchModulesDisplayFile($unified_search_modules_display);
636
-		}
636
+        }
637 637
 
638
-		include('custom/modules/unified_search_modules_display.php');
638
+        include('custom/modules/unified_search_modules_display.php');
639 639
         return $unified_search_modules_display;
640 640
     }
641 641
 
642
-	/*
642
+    /*
643 643
 	 * writeUnifiedSearchModulesDisplayFile
644 644
 	 * Private method to handle writing the unified_search_modules_display value to file
645 645
 	 *
@@ -647,35 +647,35 @@  discard block
 block discarded – undo
647 647
 	 * @return boolean value indication whether or not file was successfully written
648 648
 	 * @throws Exception Thrown if the file write operation fails
649 649
 	 */
650
-	private function writeUnifiedSearchModulesDisplayFile($unified_search_modules_display)
651
-	{
652
-		if(is_null($unified_search_modules_display) || empty($unified_search_modules_display))
653
-		{
654
-		   return false;
655
-		}
656
-
657
-	    if(!write_array_to_file("unified_search_modules_display", $unified_search_modules_display, 'custom/modules/unified_search_modules_display.php'))
658
-	    {
659
-	    	//Log error message and throw Exception
660
-	    	global $app_strings;
661
-	    	$msg = string_format($app_strings['ERR_FILE_WRITE'], array('custom/modules/unified_search_modules_display.php'));
662
-	    	$GLOBALS['log']->error($msg);
663
-	    	throw new Exception($msg);
664
-	    }
665
-
666
-	    return true;
667
-	}
650
+    private function writeUnifiedSearchModulesDisplayFile($unified_search_modules_display)
651
+    {
652
+        if(is_null($unified_search_modules_display) || empty($unified_search_modules_display))
653
+        {
654
+            return false;
655
+        }
656
+
657
+        if(!write_array_to_file("unified_search_modules_display", $unified_search_modules_display, 'custom/modules/unified_search_modules_display.php'))
658
+        {
659
+            //Log error message and throw Exception
660
+            global $app_strings;
661
+            $msg = string_format($app_strings['ERR_FILE_WRITE'], array('custom/modules/unified_search_modules_display.php'));
662
+            $GLOBALS['log']->error($msg);
663
+            throw new Exception($msg);
664
+        }
665
+
666
+        return true;
667
+    }
668 668
 }
669 669
 
670 670
 
671 671
 function unified_search_modules_cmp($a, $b) {
672
-	if(!isset($a['translated']) || !isset($b['translated']))
673
-	{
674
-	   return 0;
675
-	}
672
+    if(!isset($a['translated']) || !isset($b['translated']))
673
+    {
674
+        return 0;
675
+    }
676 676
 
677
-	$name1 = strtolower($a['translated']);
678
-	$name2 = strtolower($b['translated']);
677
+    $name1 = strtolower($a['translated']);
678
+    $name2 = strtolower($b['translated']);
679 679
 
680
-	return $name1 < $name2 ? -1 : 1;
680
+    return $name1 < $name2 ? -1 : 1;
681 681
 }
Please login to merge, or discard this patch.
modules/Administration/DisplayWarnings.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
 global $db;
44 44
 function displayAdminError($errorString){
45
-	$output = '<p class="error">' . $errorString .'</p>';
46
-		echo $output;
45
+    $output = '<p class="error">' . $errorString .'</p>';
46
+        echo $output;
47 47
 }
48 48
 
49 49
 if(!empty($_SESSION['display_lotuslive_alert'])){
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 
55 55
 
56 56
 if(isset($_SESSION['rebuild_relationships'])){
57
-	displayAdminError(translate('MSG_REBUILD_RELATIONSHIPS', 'Administration'));
57
+    displayAdminError(translate('MSG_REBUILD_RELATIONSHIPS', 'Administration'));
58 58
 }
59 59
 
60 60
 if(isset($_SESSION['rebuild_extensions'])){
61
-	displayAdminError(translate('MSG_REBUILD_EXTENSIONS', 'Administration'));
61
+    displayAdminError(translate('MSG_REBUILD_EXTENSIONS', 'Administration'));
62 62
 }
63 63
 
64 64
 if ( (strpos($_SERVER["SERVER_SOFTWARE"],'Microsoft-IIS') !== false) && (php_sapi_name() == 'cgi-fcgi') && (ini_get('fastcgi.logging') != '0') ) {
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
 }
67 67
 if(is_admin($current_user)){
68 68
 if(!empty($_SESSION['COULD_NOT_CONNECT'])){
69
-	displayAdminError(translate('LBL_COULD_NOT_CONNECT', 'Administration') . ' '. $timedate->to_display_date_time($_SESSION['COULD_NOT_CONNECT']));
69
+    displayAdminError(translate('LBL_COULD_NOT_CONNECT', 'Administration') . ' '. $timedate->to_display_date_time($_SESSION['COULD_NOT_CONNECT']));
70 70
 }
71 71
 if(!empty($_SESSION['EXCEEDING_OC_LICENSES']) && $_SESSION['EXCEEDING_OC_LICENSES'] == true){
72 72
     displayAdminError(translate('LBL_EXCEEDING_OC_LICENSES', 'Administration'));
73 73
 }
74 74
 if(isset($license) && !empty($license->settings['license_msg_admin'])){
75 75
     // UUDDLRLRBA
76
-	$GLOBALS['log']->fatal(base64_decode($license->settings['license_msg_admin']));
76
+    $GLOBALS['log']->fatal(base64_decode($license->settings['license_msg_admin']));
77 77
     //displayAdminError(base64_decode($license->settings['license_msg_admin']));
78
-	return;
78
+    return;
79 79
 }
80 80
 
81 81
 //No SMTP server is set up Error.
@@ -96,40 +96,40 @@  discard block
 block discarded – undo
96 96
     displayAdminError(translate('WARN_NO_SMTP_SERVER_AVAILABLE_ERROR','Administration'));
97 97
 }
98 98
 
99
- if(!empty($dbconfig['db_host_name']) || $sugar_config['sugar_version'] != $sugar_version ){
100
-       		displayAdminError(translate('WARN_REPAIR_CONFIG', 'Administration'));
99
+    if(!empty($dbconfig['db_host_name']) || $sugar_config['sugar_version'] != $sugar_version ){
100
+                displayAdminError(translate('WARN_REPAIR_CONFIG', 'Administration'));
101 101
         }
102 102
 
103 103
         if( !isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == false ){
104
-        	displayAdminError(translate('WARN_INSTALLER_LOCKED', 'Administration'));
105
-		}
104
+            displayAdminError(translate('WARN_INSTALLER_LOCKED', 'Administration'));
105
+        }
106 106
 
107 107
 
108 108
         if(empty($GLOBALS['sugar_config']['admin_access_control'])){
109
-			if(isset($_SESSION['invalid_versions'])){
110
-				$invalid_versions = $_SESSION['invalid_versions'];
111
-				foreach($invalid_versions as $invalid){
112
-					displayAdminError(translate('WARN_UPGRADE', 'Administration'). $invalid['name'] .translate('WARN_UPGRADE2', 'Administration'));
113
-				}
114
-			}
115
-
116
-			if (isset($_SESSION['available_version'])){
117
-				if($_SESSION['available_version'] != $sugar_version)
118
-				{
119
-					displayAdminError(translate('WARN_UPGRADENOTE', 'Administration').$_SESSION['available_version_description']);
120
-				}
121
-			}
109
+            if(isset($_SESSION['invalid_versions'])){
110
+                $invalid_versions = $_SESSION['invalid_versions'];
111
+                foreach($invalid_versions as $invalid){
112
+                    displayAdminError(translate('WARN_UPGRADE', 'Administration'). $invalid['name'] .translate('WARN_UPGRADE2', 'Administration'));
113
+                }
114
+            }
115
+
116
+            if (isset($_SESSION['available_version'])){
117
+                if($_SESSION['available_version'] != $sugar_version)
118
+                {
119
+                    displayAdminError(translate('WARN_UPGRADENOTE', 'Administration').$_SESSION['available_version_description']);
120
+                }
121
+            }
122 122
         }
123 123
 
124 124
 
125
-		if(isset($_SESSION['administrator_error']))
126
-		{
127
-			// Only print DB errors once otherwise they will still look broken
128
-			// after they are fixed.
129
-			displayAdminError($_SESSION['administrator_error']);
130
-		}
125
+        if(isset($_SESSION['administrator_error']))
126
+        {
127
+            // Only print DB errors once otherwise they will still look broken
128
+            // after they are fixed.
129
+            displayAdminError($_SESSION['administrator_error']);
130
+        }
131 131
 
132
-		unset($_SESSION['administrator_error']);
132
+        unset($_SESSION['administrator_error']);
133 133
 }
134 134
 
135 135
 ?>
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -41,37 +41,37 @@  discard block
 block discarded – undo
41 41
 
42 42
 
43 43
 global $db;
44
-function displayAdminError($errorString){
45
-	$output = '<p class="error">' . $errorString .'</p>';
44
+function displayAdminError($errorString) {
45
+	$output = '<p class="error">'.$errorString.'</p>';
46 46
 		echo $output;
47 47
 }
48 48
 
49
-if(!empty($_SESSION['display_lotuslive_alert'])){
49
+if (!empty($_SESSION['display_lotuslive_alert'])) {
50 50
     displayAdminError(translate('MSG_RECONNECT_LOTUSLIVE', 'Administration'));
51 51
 }
52 52
 
53 53
 
54 54
 
55 55
 
56
-if(isset($_SESSION['rebuild_relationships'])){
56
+if (isset($_SESSION['rebuild_relationships'])) {
57 57
 	displayAdminError(translate('MSG_REBUILD_RELATIONSHIPS', 'Administration'));
58 58
 }
59 59
 
60
-if(isset($_SESSION['rebuild_extensions'])){
60
+if (isset($_SESSION['rebuild_extensions'])) {
61 61
 	displayAdminError(translate('MSG_REBUILD_EXTENSIONS', 'Administration'));
62 62
 }
63 63
 
64
-if ( (strpos($_SERVER["SERVER_SOFTWARE"],'Microsoft-IIS') !== false) && (php_sapi_name() == 'cgi-fcgi') && (ini_get('fastcgi.logging') != '0') ) {
64
+if ((strpos($_SERVER["SERVER_SOFTWARE"], 'Microsoft-IIS') !== false) && (php_sapi_name() == 'cgi-fcgi') && (ini_get('fastcgi.logging') != '0')) {
65 65
     displayAdminError(translate('LBL_FASTCGI_LOGGING', 'Administration'));
66 66
 }
67
-if(is_admin($current_user)){
68
-if(!empty($_SESSION['COULD_NOT_CONNECT'])){
69
-	displayAdminError(translate('LBL_COULD_NOT_CONNECT', 'Administration') . ' '. $timedate->to_display_date_time($_SESSION['COULD_NOT_CONNECT']));
67
+if (is_admin($current_user)) {
68
+if (!empty($_SESSION['COULD_NOT_CONNECT'])) {
69
+	displayAdminError(translate('LBL_COULD_NOT_CONNECT', 'Administration').' '.$timedate->to_display_date_time($_SESSION['COULD_NOT_CONNECT']));
70 70
 }
71
-if(!empty($_SESSION['EXCEEDING_OC_LICENSES']) && $_SESSION['EXCEEDING_OC_LICENSES'] == true){
71
+if (!empty($_SESSION['EXCEEDING_OC_LICENSES']) && $_SESSION['EXCEEDING_OC_LICENSES'] == true) {
72 72
     displayAdminError(translate('LBL_EXCEEDING_OC_LICENSES', 'Administration'));
73 73
 }
74
-if(isset($license) && !empty($license->settings['license_msg_admin'])){
74
+if (isset($license) && !empty($license->settings['license_msg_admin'])) {
75 75
     // UUDDLRLRBA
76 76
 	$GLOBALS['log']->fatal(base64_decode($license->settings['license_msg_admin']));
77 77
     //displayAdminError(base64_decode($license->settings['license_msg_admin']));
@@ -86,35 +86,35 @@  discard block
 block discarded – undo
86 86
 //If sendmail has been configured by setting the config variable ignore this warning
87 87
 $sendMailEnabled = isset($sugar_config['allow_sendmail_outbound']) && $sugar_config['allow_sendmail_outbound'];
88 88
 
89
-if(trim($admin->settings['mail_smtpserver']) == '' && !$sendMailEnabled) {
90
-    if($admin->settings['notify_on']) {
89
+if (trim($admin->settings['mail_smtpserver']) == '' && !$sendMailEnabled) {
90
+    if ($admin->settings['notify_on']) {
91 91
         $smtp_error = true;
92 92
     }
93 93
 }
94 94
 
95
-if($smtp_error) {
96
-    displayAdminError(translate('WARN_NO_SMTP_SERVER_AVAILABLE_ERROR','Administration'));
95
+if ($smtp_error) {
96
+    displayAdminError(translate('WARN_NO_SMTP_SERVER_AVAILABLE_ERROR', 'Administration'));
97 97
 }
98 98
 
99
- if(!empty($dbconfig['db_host_name']) || $sugar_config['sugar_version'] != $sugar_version ){
99
+ if (!empty($dbconfig['db_host_name']) || $sugar_config['sugar_version'] != $sugar_version) {
100 100
        		displayAdminError(translate('WARN_REPAIR_CONFIG', 'Administration'));
101 101
         }
102 102
 
103
-        if( !isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == false ){
103
+        if (!isset($sugar_config['installer_locked']) || $sugar_config['installer_locked'] == false) {
104 104
         	displayAdminError(translate('WARN_INSTALLER_LOCKED', 'Administration'));
105 105
 		}
106 106
 
107 107
 
108
-        if(empty($GLOBALS['sugar_config']['admin_access_control'])){
109
-			if(isset($_SESSION['invalid_versions'])){
108
+        if (empty($GLOBALS['sugar_config']['admin_access_control'])) {
109
+			if (isset($_SESSION['invalid_versions'])) {
110 110
 				$invalid_versions = $_SESSION['invalid_versions'];
111
-				foreach($invalid_versions as $invalid){
112
-					displayAdminError(translate('WARN_UPGRADE', 'Administration'). $invalid['name'] .translate('WARN_UPGRADE2', 'Administration'));
111
+				foreach ($invalid_versions as $invalid) {
112
+					displayAdminError(translate('WARN_UPGRADE', 'Administration').$invalid['name'].translate('WARN_UPGRADE2', 'Administration'));
113 113
 				}
114 114
 			}
115 115
 
116
-			if (isset($_SESSION['available_version'])){
117
-				if($_SESSION['available_version'] != $sugar_version)
116
+			if (isset($_SESSION['available_version'])) {
117
+				if ($_SESSION['available_version'] != $sugar_version)
118 118
 				{
119 119
 					displayAdminError(translate('WARN_UPGRADENOTE', 'Administration').$_SESSION['available_version_description']);
120 120
 				}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         }
123 123
 
124 124
 
125
-		if(isset($_SESSION['administrator_error']))
125
+		if (isset($_SESSION['administrator_error']))
126 126
 		{
127 127
 			// Only print DB errors once otherwise they will still look broken
128 128
 			// after they are fixed.
Please login to merge, or discard this patch.
modules/Administration/Administration.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 /*********************************************************************************
4 4
  * SugarCRM Community Edition is a customer relationship management program developed by
5 5
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     );
70 70
     var $disable_custom_fields = true;
71
-    var $checkbox_fields = Array("notify_send_by_default", "mail_smtpauth_req", "notify_on", 'portal_on', 'skypeout_on', 'system_mailmerge_on', 'proxy_auth', 'proxy_on', 'system_ldap_enabled','captcha_on');
71
+    var $checkbox_fields = Array("notify_send_by_default", "mail_smtpauth_req", "notify_on", 'portal_on', 'skypeout_on', 'system_mailmerge_on', 'proxy_auth', 'proxy_on', 'system_ldap_enabled', 'captcha_on');
72 72
 
73 73
     function Administration() {
74 74
         parent::SugarBean();
@@ -76,16 +76,16 @@  discard block
 block discarded – undo
76 76
         $this->setupCustomFields('Administration');
77 77
     }
78 78
 
79
-    function retrieveSettings($category = FALSE, $clean=false) {
79
+    function retrieveSettings($category = FALSE, $clean = false) {
80 80
         // declare a cache for all settings
81 81
         $settings_cache = sugar_cache_retrieve('admin_settings_cache');
82 82
 
83
-        if($clean) {
83
+        if ($clean) {
84 84
             $settings_cache = array();
85 85
         }
86 86
 
87 87
         // Check for a cache hit
88
-        if(!empty($settings_cache)) {
88
+        if (!empty($settings_cache)) {
89 89
             $this->settings = $settings_cache;
90 90
             if (!empty($this->settings[$category]))
91 91
             {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             }
94 94
         }
95 95
 
96
-        if ( ! empty($category) ) {
96
+        if (!empty($category)) {
97 97
             $query = "SELECT category, name, value FROM {$this->table_name} WHERE category = '{$category}'";
98 98
         } else {
99 99
             $query = "SELECT category, name, value FROM {$this->table_name}";
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
 
102 102
         $result = $this->db->query($query, true, "Unable to retrieve system settings");
103 103
 
104
-        if(empty($result)) {
104
+        if (empty($result)) {
105 105
             return NULL;
106 106
         }
107 107
 
108
-        while($row = $this->db->fetchByAssoc($result)) {
109
-            if($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password')
108
+        while ($row = $this->db->fetchByAssoc($result)) {
109
+            if ($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password')
110 110
                 $this->settings[$row['category']."_".$row['name']] = $this->decrypt_after_retrieve($row['value']);
111 111
             else
112 112
                 $this->settings[$row['category']."_".$row['name']] = $row['value'];
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
         $this->settings[$category] = true;
116 116
 
117
-        if(!isset($this->settings["mail_sendtype"])) {
117
+        if (!isset($this->settings["mail_sendtype"])) {
118 118
             // outbound email settings
119 119
             $oe = new OutboundEmail();
120 120
             $oe->getSystemMailerSettings();
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         }
127 127
 
128 128
         // At this point, we have built a new array that should be cached.
129
-        sugar_cache_put('admin_settings_cache',$this->settings);
129
+        sugar_cache_put('admin_settings_cache', $this->settings);
130 130
         return $this;
131 131
     }
132 132
 
@@ -136,16 +136,16 @@  discard block
 block discarded – undo
136 136
         // outbound email settings
137 137
         $oe = new OutboundEmail();
138 138
 
139
-        foreach($_POST as $key => $val) {
139
+        foreach ($_POST as $key => $val) {
140 140
             $prefix = $this->get_config_prefix($key);
141
-            if(in_array($prefix[0], $this->config_categories)) {
142
-                if(is_array($val)){
143
-                    $val=implode(",",$val);
141
+            if (in_array($prefix[0], $this->config_categories)) {
142
+                if (is_array($val)) {
143
+                    $val = implode(",", $val);
144 144
                 }
145 145
                 $this->saveSetting($prefix[0], $prefix[1], $val);
146 146
             }
147
-            if(strpos($key, "mail_") !== false) {
148
-                if(in_array($key, $oe->field_defs)) {
147
+            if (strpos($key, "mail_") !== false) {
148
+                if (in_array($key, $oe->field_defs)) {
149 149
                     $oe->$key = $val;
150 150
                 }
151 151
             }
@@ -165,13 +165,13 @@  discard block
 block discarded – undo
165 165
         $row = $this->db->fetchByAssoc($result);
166 166
         $row_count = $row['the_count'];
167 167
 
168
-        if($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password')
168
+        if ($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password')
169 169
             $value = $this->encrpyt_before_save($value);
170 170
 
171
-        if( $row_count == 0){
171
+        if ($row_count == 0) {
172 172
             $result = $this->db->query("INSERT INTO config (value, category, name) VALUES ('$value','$category', '$key')");
173 173
         }
174
-        else{
174
+        else {
175 175
             $result = $this->db->query("UPDATE config SET value = '{$value}' WHERE category = '{$category}' AND name = '{$key}'");
176 176
         }
177 177
         sugar_cache_clear('admin_settings_cache');
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     }
180 180
 
181 181
     function get_config_prefix($str) {
182
-        return Array(substr($str, 0, strpos($str, "_")), substr($str, strpos($str, "_")+1));
182
+        return Array(substr($str, 0, strpos($str, "_")), substr($str, strpos($str, "_") + 1));
183 183
     }
184 184
 }
185 185
 ?>
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -106,10 +108,11 @@  discard block
 block discarded – undo
106 108
         }
107 109
 
108 110
         while($row = $this->db->fetchByAssoc($result)) {
109
-            if($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password')
110
-                $this->settings[$row['category']."_".$row['name']] = $this->decrypt_after_retrieve($row['value']);
111
-            else
112
-                $this->settings[$row['category']."_".$row['name']] = $row['value'];
111
+            if($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password') {
112
+                            $this->settings[$row['category']."_".$row['name']] = $this->decrypt_after_retrieve($row['value']);
113
+            } else {
114
+                            $this->settings[$row['category']."_".$row['name']] = $row['value'];
115
+            }
113 116
             $this->settings[$row['category']] = true;
114 117
         }
115 118
         $this->settings[$category] = true;
@@ -120,8 +123,9 @@  discard block
 block discarded – undo
120 123
             $oe->getSystemMailerSettings();
121 124
 
122 125
             foreach ($oe->field_defs as $def) {
123
-                if (strpos($def, "mail_") !== false)
124
-                    $this->settings[$def] = $oe->$def;
126
+                if (strpos($def, "mail_") !== false) {
127
+                                    $this->settings[$def] = $oe->$def;
128
+                }
125 129
             }
126 130
         }
127 131
 
@@ -165,13 +169,13 @@  discard block
 block discarded – undo
165 169
         $row = $this->db->fetchByAssoc($result);
166 170
         $row_count = $row['the_count'];
167 171
 
168
-        if($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password')
169
-            $value = $this->encrpyt_before_save($value);
172
+        if($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password') {
173
+                    $value = $this->encrpyt_before_save($value);
174
+        }
170 175
 
171 176
         if( $row_count == 0){
172 177
             $result = $this->db->query("INSERT INTO config (value, category, name) VALUES ('$value','$category', '$key')");
173
-        }
174
-        else{
178
+        } else{
175 179
             $result = $this->db->query("UPDATE config SET value = '{$value}' WHERE category = '{$category}' AND name = '{$key}'");
176 180
         }
177 181
         sugar_cache_clear('admin_settings_cache');
Please login to merge, or discard this patch.
modules/AOP_Case_Updates/Case_Updates.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 
26
-function display_updates($focus, $field, $value, $view){
26
+function display_updates($focus, $field, $value, $view) {
27 27
     global $mod_strings;
28 28
 
29 29
     $hideImage = SugarThemeRegistry::current()->getImageURL('basic_search.gif');
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 </script>
128 128
 A;
129 129
 
130
-    $updates = $focus->get_linked_beans('aop_case_updates',"AOP_Case_Updates");
131
-    if(!$updates || is_null($focus->id)){
130
+    $updates = $focus->get_linked_beans('aop_case_updates', "AOP_Case_Updates");
131
+    if (!$updates || is_null($focus->id)) {
132 132
         $html .= quick_edit_case_updates($focus);
133 133
         return $html;
134 134
         //return $mod_strings['LBL_NO_CASE_UPDATES'];
@@ -154,18 +154,18 @@  discard block
 block discarded – undo
154 154
 EOD;
155 155
 
156 156
 
157
-    usort($updates,function($a,$b){
157
+    usort($updates, function($a, $b) {
158 158
         $aDate = $a->fetched_row['date_entered'];
159 159
         $bDate = $b->fetched_row['date_entered'];
160
-        if($aDate < $bDate){
160
+        if ($aDate < $bDate) {
161 161
             return -1;
162
-        }elseif($aDate > $bDate){
162
+        }elseif ($aDate > $bDate) {
163 163
             return 1;
164 164
         }
165 165
         return 0;
166 166
     });
167 167
 
168
-    foreach($updates as $update){
168
+    foreach ($updates as $update) {
169 169
         $html .= display_single_update($update, $hideImage);
170 170
     }
171 171
     $html .= "</div>";
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 /**
179 179
  * @return mixed|string|void
180 180
  */
181
-function display_update_form(){
181
+function display_update_form() {
182 182
     global $mod_strings, $app_strings;
183
-    $sugar_smarty	= new Sugar_Smarty();
183
+    $sugar_smarty = new Sugar_Smarty();
184 184
     $sugar_smarty->assign('MOD', $mod_strings);
185 185
     $sugar_smarty->assign('APP', $app_strings);
186 186
     return $sugar_smarty->fetch('modules/AOP_Case_Updates/tpl/caseUpdateForm.tpl');
@@ -191,23 +191,23 @@  discard block
 block discarded – undo
191 191
  * @param SugarBean $update
192 192
  * @return string - html to be displayed
193 193
  */
194
-function getUpdateDisplayHead(SugarBean $update){
194
+function getUpdateDisplayHead(SugarBean $update) {
195 195
     global $mod_strings;
196
-    if($update->contact_id){
196
+    if ($update->contact_id) {
197 197
         $name = $update->getUpdateContact()->name;
198
-    }elseif($update->assigned_user_id){
198
+    }elseif ($update->assigned_user_id) {
199 199
         $name = $update->getUpdateUser()->name;
200
-    }else{
200
+    } else {
201 201
         $name = "Unknown";
202 202
     }
203 203
     $html = "<a href='' onclick='toggleCaseUpdate(\"".$update->id."\");return false;'>";
204 204
     $html .= "<img  id='caseUpdate".$update->id."Image' class='caseUpdateImage' src='".SugarThemeRegistry::current()->getImageURL('basic_search.gif')."'>";
205 205
     $html .= "</a>";
206
-    $html .= "<span>".($update->internal ? "<strong>" . $mod_strings['LBL_INTERNAL'] . "</strong> " : '') .$name . " ".$update->date_entered."</span><br>";
207
-    $notes = $update->get_linked_beans('notes','Notes');
208
-    if($notes){
209
-        $html.= $mod_strings['LBL_AOP_CASE_ATTACHMENTS'];
210
-        foreach($notes as $note){
206
+    $html .= "<span>".($update->internal ? "<strong>".$mod_strings['LBL_INTERNAL']."</strong> " : '').$name." ".$update->date_entered."</span><br>";
207
+    $notes = $update->get_linked_beans('notes', 'Notes');
208
+    if ($notes) {
209
+        $html .= $mod_strings['LBL_AOP_CASE_ATTACHMENTS'];
210
+        foreach ($notes as $note) {
211 211
             $html .= "<a href='index.php?module=Notes&action=DetailView&record={$note->id}'>{$note->filename}</a>&nbsp;";
212 212
         }
213 213
     }
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
  * @param AOP_Case_Updates $update
221 221
  * @return string - the html for the update
222 222
  */
223
-function display_single_update(AOP_Case_Updates $update){
223
+function display_single_update(AOP_Case_Updates $update) {
224 224
 
225 225
     /*if assigned user*/
226
-    if($update->assigned_user_id){
226
+    if ($update->assigned_user_id) {
227 227
         /*if internal update*/
228
-        if ($update->internal){
228
+        if ($update->internal) {
229 229
             $html = "<div id='caseStyleInternal'>".getUpdateDisplayHead($update);
230 230
             $html .= "<div id='caseUpdate".$update->id."' class='caseUpdate'>";
231 231
             $html .= nl2br(html_entity_decode($update->description));
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     }
244 244
 
245 245
     /*if contact user*/
246
-    if($update->contact_id){
246
+    if ($update->contact_id) {
247 247
         $html = "<div id='extramargin'><div id='caseStyleContact'>".getUpdateDisplayHead($update);
248 248
         $html .= "<div id='caseUpdate".$update->id."' class='caseUpdate'>";
249 249
         $html .= nl2br(html_entity_decode($update->description));
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
  * @param $case
260 260
  * @return string - html link
261 261
  */
262
-function display_case_attachments($case){
262
+function display_case_attachments($case) {
263 263
     $html = '';
264
-    $notes = $case->get_linked_beans('notes','Notes');
265
-    if($notes){
266
-        foreach($notes as $note){
264
+    $notes = $case->get_linked_beans('notes', 'Notes');
265
+    if ($notes) {
266
+        foreach ($notes as $note) {
267 267
             $html .= "<a href='index.php?module=Notes&action=DetailView&record={$note->id}'>{$note->filename}</a>&nbsp;";
268 268
         }
269 269
     }
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
  *
278 278
  * @return string - the html to be displayed and javascript
279 279
  */
280
-function quick_edit_case_updates($case){
280
+function quick_edit_case_updates($case) {
281 281
     global $action;
282 282
 
283 283
     //on DetailView only
284
-    if($action != 'DetailView') return;
284
+    if ($action != 'DetailView') return;
285 285
 
286 286
     //current record id
287 287
     $record = $_GET['record'];
@@ -294,12 +294,12 @@  discard block
 block discarded – undo
294 294
     $roles = $acl->getUserRoles($id);
295 295
 
296 296
     //Return if user cannot edit cases
297
-    if(in_array( "no edit cases", $roles) || $roles === "no edit cases"){
297
+    if (in_array("no edit cases", $roles) || $roles === "no edit cases") {
298 298
 
299 299
         return;
300 300
     }
301 301
     $internalChecked = '';
302
-    if($case->internal){
302
+    if ($case->internal) {
303 303
         $internalChecked = "checked='checked'";
304 304
     }
305 305
     $html = <<< EOD
Please login to merge, or discard this patch.
modules/AOP_Case_Updates/AOP_Case_Updates.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -30,35 +30,35 @@  discard block
 block discarded – undo
30 30
 require_once 'include/clean.php';
31 31
 class AOP_Case_Updates extends AOP_Case_Updates_sugar {
32 32
 
33
-    function AOP_Case_Updates(){
33
+    function AOP_Case_Updates() {
34 34
         parent::AOP_Case_Updates_sugar();
35 35
     }
36 36
 
37
-    function save($check_notify = false){
37
+    function save($check_notify = false) {
38 38
         $this->name = SugarCleaner::cleanHtml($this->name);
39 39
         $this->description = SugarCleaner::cleanHtml($this->description);
40 40
         global $current_user, $sugar_config;
41 41
         parent::save($check_notify);
42 42
         $email_template = new EmailTemplate();
43
-        if($_REQUEST['module'] == 'Import'){
43
+        if ($_REQUEST['module'] == 'Import') {
44 44
             //Don't send email on import
45 45
             return;
46 46
         }
47
-        if(!isAOPEnabled()){
47
+        if (!isAOPEnabled()) {
48 48
             return;
49 49
         }
50
-        if($this->internal){
50
+        if ($this->internal) {
51 51
             return;
52 52
         }
53 53
         $signature = array();
54 54
         $addDelimiter = true;
55 55
         $aop_config = $sugar_config['aop'];
56
-        if($this->assigned_user_id){
57
-            if($aop_config['contact_email_template_id']){
56
+        if ($this->assigned_user_id) {
57
+            if ($aop_config['contact_email_template_id']) {
58 58
                 $email_template = $email_template->retrieve($aop_config['contact_email_template_id']);
59 59
                 $signature = $current_user->getDefaultSignature();
60 60
             }
61
-            if($email_template) {
61
+            if ($email_template) {
62 62
                 foreach ($this->getContacts() as $contact) {
63 63
                     $GLOBALS['log']->info("AOPCaseUpdates: Calling send email");
64 64
                     $emails = array();
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
                     $res = $this->sendEmail($emails, $email_template, $signature, $this->case_id, $addDelimiter, $contact->id);
67 67
                 }
68 68
             }
69
-        }else{
69
+        } else {
70 70
             $emails = $this->getEmailForUser();
71
-            if($aop_config['user_email_template_id']){
71
+            if ($aop_config['user_email_template_id']) {
72 72
                 $email_template = $email_template->retrieve($aop_config['user_email_template_id']);
73 73
             }
74 74
             $addDelimiter = false;
75
-            if($emails && $email_template){
75
+            if ($emails && $email_template) {
76 76
                 $GLOBALS['log']->info("AOPCaseUpdates: Calling send email");
77
-                $res = $this->sendEmail($emails, $email_template, $signature, $this->case_id, $addDelimiter,$this->contact_id);
77
+                $res = $this->sendEmail($emails, $email_template, $signature, $this->case_id, $addDelimiter, $this->contact_id);
78 78
             }
79 79
         }
80 80
 
@@ -83,68 +83,68 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * @return aCase
85 85
      */
86
-    public function getCase(){
87
-        $case = BeanFactory::getBean("Cases",$this->case_id);
86
+    public function getCase() {
87
+        $case = BeanFactory::getBean("Cases", $this->case_id);
88 88
         return $case;
89 89
     }
90 90
 
91
-    public function getContacts(){
91
+    public function getContacts() {
92 92
         $case = $this->getCase();
93
-        if($case){
94
-            return $case->get_linked_beans("contacts","Contacts");
93
+        if ($case) {
94
+            return $case->get_linked_beans("contacts", "Contacts");
95 95
         }
96 96
         return null;
97 97
     }
98 98
 
99
-    public function getUpdateContact(){
100
-        if($this->contact_id){
101
-            return BeanFactory::getBean("Contacts",$this->contact_id);
99
+    public function getUpdateContact() {
100
+        if ($this->contact_id) {
101
+            return BeanFactory::getBean("Contacts", $this->contact_id);
102 102
         }
103 103
         return null;
104 104
     }
105
-    public function getUser(){
106
-        $user = BeanFactory::getBean('Users',$this->getCase()->assigned_user_id);
105
+    public function getUser() {
106
+        $user = BeanFactory::getBean('Users', $this->getCase()->assigned_user_id);
107 107
         return $user;
108 108
     }
109
-    public function getUpdateUser(){
110
-        $user = BeanFactory::getBean('Users',$this->assigned_user_id);
109
+    public function getUpdateUser() {
110
+        $user = BeanFactory::getBean('Users', $this->assigned_user_id);
111 111
         return $user;
112 112
     }
113 113
 
114
-    private function getEmailForUser(){
114
+    private function getEmailForUser() {
115 115
         $user = $this->getUser();
116
-        if($user){
116
+        if ($user) {
117 117
             return array($user->emailAddress->getPrimaryAddress($user));
118 118
         }
119 119
         return array();
120 120
     }
121 121
 
122
-    private function populateTemplate(EmailTemplate $template, $addDelimiter = true, $contactId = null){
122
+    private function populateTemplate(EmailTemplate $template, $addDelimiter = true, $contactId = null) {
123 123
         global $app_strings, $sugar_config;
124 124
         //Order of beans seems to matter here so we place contact first.
125 125
         $userId = '';
126 126
         $user = $this->getUpdateUser();
127
-        if(!$user){
127
+        if (!$user) {
128 128
             $this->getUser();
129 129
         }
130
-        $beans = array("Contacts" => $contactId,"Cases" => $this->getCase()->id, "Users" => $user->id, "AOP_Case_Updates" => $this->id);
130
+        $beans = array("Contacts" => $contactId, "Cases" => $this->getCase()->id, "Users" => $user->id, "AOP_Case_Updates" => $this->id);
131 131
         $ret = array();
132
-        $ret['subject'] = from_html(aop_parse_template($template->subject,$beans));
133
-        $body = aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body_html),$beans);
134
-        $bodyAlt = aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body),$beans);
135
-        if($addDelimiter){
136
-            $body = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'] . $body;
137
-            $bodyAlt = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'] . $bodyAlt;
132
+        $ret['subject'] = from_html(aop_parse_template($template->subject, $beans));
133
+        $body = aop_parse_template(str_replace("\$sugarurl", $sugar_config['site_url'], $template->body_html), $beans);
134
+        $bodyAlt = aop_parse_template(str_replace("\$sugarurl", $sugar_config['site_url'], $template->body), $beans);
135
+        if ($addDelimiter) {
136
+            $body = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'].$body;
137
+            $bodyAlt = $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'].$bodyAlt;
138 138
         }
139 139
         $ret['body'] = from_html($body);
140 140
         $ret['body_alt'] = strip_tags(from_html($bodyAlt));
141 141
         return $ret;
142 142
     }
143 143
 
144
-    private function sendEmail($emails, $template, $signature = array(), $caseId = null, $addDelimiter = true, $contactId = null){
144
+    private function sendEmail($emails, $template, $signature = array(), $caseId = null, $addDelimiter = true, $contactId = null) {
145 145
         $GLOBALS['log']->info("AOPCaseUpdates: sendEmail called");
146 146
         require_once("include/SugarPHPMailer.php");
147
-        $mailer=new SugarPHPMailer();
147
+        $mailer = new SugarPHPMailer();
148 148
         $admin = new Administration();
149 149
         $admin->retrieveSettings();
150 150
 
@@ -152,35 +152,35 @@  discard block
 block discarded – undo
152 152
         $mailer->setMailerForSystem();
153 153
 
154 154
         $signatureHTML = "";
155
-        if($signature && array_key_exists("signature_html",$signature)){
155
+        if ($signature && array_key_exists("signature_html", $signature)) {
156 156
             $signatureHTML = from_html($signature['signature_html']);
157 157
         }
158 158
         $signaturePlain = "";
159
-        if($signature && array_key_exists("signature",$signature)){
159
+        if ($signature && array_key_exists("signature", $signature)) {
160 160
             $signaturePlain = $signature['signature'];
161 161
         }
162 162
         $emailSettings = getPortalEmailSettings();
163 163
         $text = $this->populateTemplate($template, $addDelimiter, $contactId);
164 164
         $mailer->Subject = $text['subject'];
165
-        $mailer->Body = $text['body'] . $signatureHTML;
165
+        $mailer->Body = $text['body'].$signatureHTML;
166 166
         $mailer->IsHTML(true);
167
-        $mailer->AltBody = $text['body_alt'] . $signaturePlain;
167
+        $mailer->AltBody = $text['body_alt'].$signaturePlain;
168 168
         $mailer->From     = $emailSettings['from_address'];
169 169
         $mailer->FromName = $emailSettings['from_name'];
170
-        foreach($emails as $email){
170
+        foreach ($emails as $email) {
171 171
             $mailer->AddAddress($email);
172 172
         }
173
-        if ($mailer->Send()){
173
+        if ($mailer->Send()) {
174 174
             require_once('modules/Emails/Email.php');
175 175
             $emailObj = new Email();
176
-            $emailObj->to_addrs = implode(",",$emails);
177
-            $emailObj->type= 'out';
176
+            $emailObj->to_addrs = implode(",", $emails);
177
+            $emailObj->type = 'out';
178 178
             $emailObj->deleted = '0';
179 179
             $emailObj->name = $mailer->Subject;
180 180
             $emailObj->description = $mailer->AltBody;
181 181
             $emailObj->description_html = $mailer->Body;
182 182
             $emailObj->from_addr = $mailer->From;
183
-            if ( $caseId) {
183
+            if ($caseId) {
184 184
                 $emailObj->parent_type = "Cases";
185 185
                 $emailObj->parent_id = $caseId;
186 186
             }
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
             $emailObj->created_by = '1';
190 190
             $emailObj->status = 'sent';
191 191
             $emailObj->save();
192
-        }else{
193
-            $GLOBALS['log']->info("AOPCaseUpdates: Could not send email:  " . $mailer->ErrorInfo);
192
+        } else {
193
+            $GLOBALS['log']->info("AOPCaseUpdates: Could not send email:  ".$mailer->ErrorInfo);
194 194
             return false;
195 195
         }
196 196
         return true;
Please login to merge, or discard this patch.
modules/AOP_Case_Updates/CaseUpdatesHook.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -25,27 +25,27 @@  discard block
 block discarded – undo
25 25
 class CaseUpdatesHook {
26 26
     private $slug_size = 50;
27 27
 
28
-    private function getCaseCounts(){
28
+    private function getCaseCounts() {
29 29
         global $db;
30 30
         $counts = array();
31 31
         $r = $db->query("SELECT users.id,count(cases.id) AS c FROM users LEFT JOIN cases ON (cases.assigned_user_id = users.id AND cases.status != 'Closed' AND cases.status != 'Duplicate' AND cases.status != 'Rejected') WHERE NOT users.deleted GROUP BY users.id");
32
-        while($a = $db->fetchByAssoc($r)){
32
+        while ($a = $db->fetchByAssoc($r)) {
33 33
             $counts[$a['id']] = $a['c'];
34 34
         }
35 35
         return $counts;
36 36
     }
37 37
 
38
-    private function getAssignToUser(){
38
+    private function getAssignToUser() {
39 39
         require_once 'modules/AOP_Case_Updates/AOPAssignManager.php';
40 40
         $assignManager = new AOPAssignManager();
41 41
         return $assignManager->getNextAssignedUser();
42 42
     }
43 43
 
44
-    private function arrangeFilesArray(){
44
+    private function arrangeFilesArray() {
45 45
         $count = 0;
46
-        foreach($_FILES['case_update_file'] as $key => $vals){
47
-            foreach($vals as $index => $val){
48
-                if(!array_key_exists('case_update_file'.$index,$_FILES)){
46
+        foreach ($_FILES['case_update_file'] as $key => $vals) {
47
+            foreach ($vals as $index => $val) {
48
+                if (!array_key_exists('case_update_file'.$index, $_FILES)) {
49 49
                     $_FILES['case_update_file'.$index] = array();
50 50
                     $count++;
51 51
                 }
@@ -56,34 +56,34 @@  discard block
 block discarded – undo
56 56
     }
57 57
 
58 58
 
59
-    public function saveUpdate($bean, $event, $arguments){
60
-        if(!isAOPEnabled()){
59
+    public function saveUpdate($bean, $event, $arguments) {
60
+        if (!isAOPEnabled()) {
61 61
             return;
62 62
         }
63 63
         global $current_user, $app_list_strings;
64
-        if(empty($bean->fetched_row) || !$bean->id){
64
+        if (empty($bean->fetched_row) || !$bean->id) {
65 65
 
66
-            if(!$bean->state){
66
+            if (!$bean->state) {
67 67
                 $bean->state = $app_list_strings['case_state_default_key'];
68 68
             }
69
-            if($bean->status == "New"){
69
+            if ($bean->status == "New") {
70 70
                 $bean->status = $app_list_strings['case_status_default_key'];
71 71
             }
72 72
 
73 73
             //New case - assign
74
-            if(!$bean->assigned_user_id){
74
+            if (!$bean->assigned_user_id) {
75 75
                 $userId = $this->getAssignToUser();
76 76
                 $bean->assigned_user_id = $userId;
77 77
                 $bean->notify_inworkflow = true;
78 78
             }
79 79
             return;
80 80
         }
81
-        if($_REQUEST['module'] == 'Import'){
81
+        if ($_REQUEST['module'] == 'Import') {
82 82
             return;
83 83
         }
84 84
         //Grab the update field and create a new update with it.
85 85
         $text = $bean->update_text;
86
-        if(!$text && empty($_FILES['case_update_file'])){
86
+        if (!$text && empty($_FILES['case_update_file'])) {
87 87
             //No text or files, so nothing really to save.
88 88
             return;
89 89
         }
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
         $case_update->internal = $bean->internal;
94 94
         $bean->internal = false;
95 95
         $case_update->assigned_user_id = $current_user->id;
96
-        if(strlen($text) > $this->slug_size){
97
-            $case_update->name = substr($text,0,$this->slug_size)."...";
96
+        if (strlen($text) > $this->slug_size) {
97
+            $case_update->name = substr($text, 0, $this->slug_size)."...";
98 98
         }
99 99
         $case_update->description = nl2br($text);
100 100
         $case_update->case_id = $bean->id;
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
 
103 103
         $fileCount = $this->arrangeFilesArray();
104 104
 
105
-        for($x = 0; $x < $fileCount; $x++){
106
-            if($_FILES['case_update_file']['error'][$x] == UPLOAD_ERR_NO_FILE){
105
+        for ($x = 0; $x < $fileCount; $x++) {
106
+            if ($_FILES['case_update_file']['error'][$x] == UPLOAD_ERR_NO_FILE) {
107 107
                 continue;
108 108
             }
109 109
             $uploadFile = new UploadFile('case_update_file'.$x);
110
-            if(!$uploadFile->confirm_upload()){
110
+            if (!$uploadFile->confirm_upload()) {
111 111
                 continue;
112 112
             }
113 113
             $note = $this->newNote($case_update->id);
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
             $uploadFile->final_move($note->id);
119 119
         }
120 120
         $postPrefix = 'case_update_id_';
121
-        foreach($_POST as $key => $val){
122
-            if(strpos($key, $postPrefix) !== 0 || empty($val)){
121
+        foreach ($_POST as $key => $val) {
122
+            if (strpos($key, $postPrefix) !== 0 || empty($val)) {
123 123
                 continue;
124 124
             }
125 125
             //Val is selected doc id
126
-            $doc = BeanFactory::getBean('Documents',$val);
127
-            if(!$doc){
126
+            $doc = BeanFactory::getBean('Documents', $val);
127
+            if (!$doc) {
128 128
                 continue;
129 129
             }
130 130
             $note = $this->newNote($case_update->id);
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
             $note->save();
135 135
             $srcFile = "upload://{$doc->document_revision_id}";
136 136
             $destFile = "upload://{$note->id}";
137
-            copy($srcFile,$destFile);
137
+            copy($srcFile, $destFile);
138 138
         }
139 139
     }
140 140
 
141
-    private function newNote($caseUpdateId){
141
+    private function newNote($caseUpdateId) {
142 142
         $note = BeanFactory::newBean('Notes');
143 143
         $note->parent_type = 'AOP_Case_Updates';
144 144
         $note->parent_id = $caseUpdateId;
@@ -146,30 +146,30 @@  discard block
 block discarded – undo
146 146
         return $note;
147 147
     }
148 148
 
149
-    private function linkAccountAndCase($case_id,$account_id){
150
-        if(!$account_id || !$case_id){
149
+    private function linkAccountAndCase($case_id, $account_id) {
150
+        if (!$account_id || !$case_id) {
151 151
             return;
152 152
         }
153
-        $case = BeanFactory::getBean("Cases",$case_id);
154
-        if(!$case->account_id){
153
+        $case = BeanFactory::getBean("Cases", $case_id);
154
+        if (!$case->account_id) {
155 155
             $case->account_id = $account_id;
156 156
             $case->save();
157 157
         }
158 158
     }
159 159
 
160
-    public function assignAccount($bean, $event, $arguments){
161
-        if($arguments['module'] != "Cases" || $arguments['related_module'] != "Contacts"){
160
+    public function assignAccount($bean, $event, $arguments) {
161
+        if ($arguments['module'] != "Cases" || $arguments['related_module'] != "Contacts") {
162 162
             return;
163 163
         }
164
-        if(!isAOPEnabled()){
164
+        if (!isAOPEnabled()) {
165 165
             return;
166 166
         }
167
-        $contact = BeanFactory::getBean("Contacts",$arguments['related_id']);
167
+        $contact = BeanFactory::getBean("Contacts", $arguments['related_id']);
168 168
         $contact->load_relationship("accounts");
169
-        if(!$contact || !$contact->account_id){
169
+        if (!$contact || !$contact->account_id) {
170 170
             return;
171 171
         }
172
-        $this->linkAccountAndCase($bean->id,$contact->account_id);
172
+        $this->linkAccountAndCase($bean->id, $contact->account_id);
173 173
     }
174 174
 
175 175
     /**
@@ -178,26 +178,26 @@  discard block
 block discarded – undo
178 178
      * @param $event
179 179
      * @param $arguments
180 180
      */
181
-    public function saveEmailUpdate($bean, $event, $arguments){
181
+    public function saveEmailUpdate($bean, $event, $arguments) {
182 182
         global $mod_strings;
183
-        if($bean->intent != "createcase" || $bean->parent_type != "Cases"){
183
+        if ($bean->intent != "createcase" || $bean->parent_type != "Cases") {
184 184
             $GLOBALS['log']->warn("CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type");
185 185
             return;
186 186
         }
187
-        if(!isAOPEnabled()){
187
+        if (!isAOPEnabled()) {
188 188
             return;
189 189
         }
190
-        if(!$bean->parent_id ){
190
+        if (!$bean->parent_id) {
191 191
             $GLOBALS['log']->warn("CaseUpdatesHook: saveEmailUpdate No parent id");
192 192
             return;
193 193
         }
194 194
 
195
-        if($bean->cases){
195
+        if ($bean->cases) {
196 196
             $GLOBALS['log']->warn("CaseUpdatesHook: saveEmailUpdate cases already set");
197 197
             return;
198 198
         }
199 199
 
200
-        if($bean->fetched_row['parent_id']){
200
+        if ($bean->fetched_row['parent_id']) {
201 201
             //Will have been processed already
202 202
             return;
203 203
         }
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
         $ea = new SugarEmailAddress();
207 207
         $beans = $ea->getBeansByEmailAddress($bean->from_addr);
208 208
         $contact_id = null;
209
-        foreach($beans as $emailBean){
210
-            if($emailBean->module_name == "Contacts" && !empty($emailBean->id)){
209
+        foreach ($beans as $emailBean) {
210
+            if ($emailBean->module_name == "Contacts" && !empty($emailBean->id)) {
211 211
                 $contact_id = $emailBean->id;
212
-                $this->linkAccountAndCase($bean->parent_id,$emailBean->account_id);
212
+                $this->linkAccountAndCase($bean->parent_id, $emailBean->account_id);
213 213
             }
214 214
         }
215 215
         $case_update = new AOP_Case_Updates();
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
         $case_update->internal = false;
221 221
         $case_update->case_id = $bean->parent_id;
222 222
         $case_update->save();
223
-        $notes = $bean->get_linked_beans('notes','Notes');
224
-        foreach($notes as $note){
223
+        $notes = $bean->get_linked_beans('notes', 'Notes');
224
+        foreach ($notes as $note) {
225 225
             //Link notes to case update also
226 226
             $newNote = BeanFactory::newBean('Notes');
227 227
             $newNote->name = $note->name;
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             $newNote->save();
233 233
             $srcFile = "upload://{$note->id}";
234 234
             $destFile = "upload://{$newNote->id}";
235
-            copy($srcFile,$destFile);
235
+            copy($srcFile, $destFile);
236 236
         }
237 237
 
238 238
         $this->updateCaseStatus($case_update->case_id);
@@ -242,71 +242,71 @@  discard block
 block discarded – undo
242 242
      * Changes the status of the supplied case based on the case_status_changes config values.
243 243
      * @param $caseId
244 244
      */
245
-    private function updateCaseStatus($caseId){
245
+    private function updateCaseStatus($caseId) {
246 246
         global $sugar_config;
247
-        if(empty($caseId)){
247
+        if (empty($caseId)) {
248 248
             return;
249 249
         }
250
-        if(empty($sugar_config['aop']['case_status_changes'])){
250
+        if (empty($sugar_config['aop']['case_status_changes'])) {
251 251
             return;
252 252
         }
253
-        $statusMap = json_decode($sugar_config['aop']['case_status_changes'],1);
254
-        if(empty($statusMap)){
253
+        $statusMap = json_decode($sugar_config['aop']['case_status_changes'], 1);
254
+        if (empty($statusMap)) {
255 255
             return;
256 256
         }
257
-        $case = BeanFactory::getBean('Cases',$caseId);
258
-        if(empty($case)){
257
+        $case = BeanFactory::getBean('Cases', $caseId);
258
+        if (empty($case)) {
259 259
             return;
260 260
         }
261
-        if(array_key_exists($case->status,$statusMap)){
261
+        if (array_key_exists($case->status, $statusMap)) {
262 262
             $case->status = $statusMap[$case->status];
263
-            $statusBits = explode('_',$case->status);
263
+            $statusBits = explode('_', $case->status);
264 264
             $case->state = array_shift($statusBits);
265 265
             $case->save();
266 266
         }
267 267
 
268 268
     }
269 269
 
270
-    private function unquoteEmail($text){
270
+    private function unquoteEmail($text) {
271 271
         global $app_strings;
272 272
         $text = html_entity_decode($text);
273
-        $text = preg_replace('/(\r\n|\r|\n)/s',"\n",$text);
274
-        $pos = strpos($text,$app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER']);
275
-        if($pos !== false){
276
-            $text = substr($text,0,$pos);
273
+        $text = preg_replace('/(\r\n|\r|\n)/s', "\n", $text);
274
+        $pos = strpos($text, $app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER']);
275
+        if ($pos !== false) {
276
+            $text = substr($text, 0, $pos);
277 277
         }
278 278
         return $text;
279 279
     }
280 280
 
281
-    public function closureNotifyPrep($bean, $event, $arguments){
282
-        if($_REQUEST['module'] == 'Import'){
281
+    public function closureNotifyPrep($bean, $event, $arguments) {
282
+        if ($_REQUEST['module'] == 'Import') {
283 283
             return;
284 284
         }
285
-        if($bean->state!= "Closed" || $bean->fetched_row['state'] == "Closed"){
285
+        if ($bean->state != "Closed" || $bean->fetched_row['state'] == "Closed") {
286 286
             $bean->send_closure_email = false;
287
-        }else{
287
+        } else {
288 288
             $bean->send_closure_email = true;
289 289
         }
290 290
 
291 291
     }
292 292
 
293
-    public function closureNotify($bean, $event, $arguments){
294
-        if($_REQUEST['module'] == 'Import'){
293
+    public function closureNotify($bean, $event, $arguments) {
294
+        if ($_REQUEST['module'] == 'Import') {
295 295
             return;
296 296
         }
297
-        if($bean->state != "Closed" || !$bean->send_closure_email){
297
+        if ($bean->state != "Closed" || !$bean->send_closure_email) {
298 298
             return;
299 299
         }
300 300
         $this->sendClosureEmail($bean, $arguments['related_bean']);
301 301
     }
302 302
 
303
-    private function sendClosureEmail(aCase $bean){
304
-        if(!isAOPEnabled()){
303
+    private function sendClosureEmail(aCase $bean) {
304
+        if (!isAOPEnabled()) {
305 305
             return;
306 306
         }
307 307
         $GLOBALS['log']->warn("CaseUpdatesHook: sendClosureEmail called");
308 308
         require_once("include/SugarPHPMailer.php");
309
-        $mailer=new SugarPHPMailer();
309
+        $mailer = new SugarPHPMailer();
310 310
         $admin = new Administration();
311 311
         $admin->retrieveSettings();
312 312
 
@@ -317,15 +317,15 @@  discard block
 block discarded – undo
317 317
         $aop_config = $this->getAOPConfig();
318 318
         $email_template = $email_template->retrieve($aop_config['case_closure_email_template_id']);
319 319
 
320
-        if(!$email_template){
320
+        if (!$email_template) {
321 321
             $GLOBALS['log']->warn("CaseUpdatesHook: sendClosureEmail template is empty");
322 322
             return false;
323 323
         }
324 324
 
325
-        $contact = $bean->get_linked_beans("contacts","Contact");
326
-        if($contact){
325
+        $contact = $bean->get_linked_beans("contacts", "Contact");
326
+        if ($contact) {
327 327
             $contact = $contact[0];
328
-        }else{
328
+        } else {
329 329
             return false;
330 330
         }
331 331
 
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
         $email = $contact->emailAddress->getPrimaryAddress($contact);
343 343
 
344 344
         $mailer->AddAddress($email);
345
-        if (!$mailer->Send()){
346
-            $GLOBALS['log']->info("CaseUpdatesHook: Could not send email:  " . $mailer->ErrorInfo);
345
+        if (!$mailer->Send()) {
346
+            $GLOBALS['log']->info("CaseUpdatesHook: Could not send email:  ".$mailer->ErrorInfo);
347 347
             return false;
348
-        }else{
348
+        } else {
349 349
             $this->logEmail($email, $mailer, $bean->id);
350 350
             return true;
351 351
         }
@@ -358,25 +358,25 @@  discard block
 block discarded – undo
358 358
      * @param $event
359 359
      * @param $arguments
360 360
      */
361
-    public function creationNotify($bean, $event, $arguments){
362
-        if($_REQUEST['module'] == 'Import'){
361
+    public function creationNotify($bean, $event, $arguments) {
362
+        if ($_REQUEST['module'] == 'Import') {
363 363
             return;
364 364
         }
365
-        if($arguments['module'] != "Cases" || $arguments['related_module'] != "Contacts"){
365
+        if ($arguments['module'] != "Cases" || $arguments['related_module'] != "Contacts") {
366 366
             return;
367 367
         }
368
-        if(!$bean->fetched_row){
368
+        if (!$bean->fetched_row) {
369 369
             return;
370 370
         }
371
-        if(!empty($arguments['related_bean'])){
371
+        if (!empty($arguments['related_bean'])) {
372 372
             $contact = $arguments['related_bean'];
373
-        }else{
374
-            $contact = BeanFactory::getBean("Contacts",$arguments['related_id']);
373
+        } else {
374
+            $contact = BeanFactory::getBean("Contacts", $arguments['related_id']);
375 375
         }
376 376
         $this->sendCreationEmail($bean, $contact);
377 377
     }
378 378
 
379
-    private function populateTemplate(EmailTemplate $template, aCase $bean, $contact){
379
+    private function populateTemplate(EmailTemplate $template, aCase $bean, $contact) {
380 380
         global $app_strings, $sugar_config;
381 381
         //Order of beans seems to matter here so we place contact first.
382 382
         $beans = array(
@@ -385,26 +385,26 @@  discard block
 block discarded – undo
385 385
             "Users" => $bean->assigned_user_id
386 386
         );
387 387
         $ret = array();
388
-        $ret['subject'] = from_html(aop_parse_template($template->subject,$beans));
389
-        $ret['body'] = from_html($app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'].aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body_html),$beans));
390
-        $ret['body_alt'] = strip_tags(from_html(aop_parse_template(str_replace("\$sugarurl",$sugar_config['site_url'],$template->body),$beans)));
388
+        $ret['subject'] = from_html(aop_parse_template($template->subject, $beans));
389
+        $ret['body'] = from_html($app_strings['LBL_AOP_EMAIL_REPLY_DELIMITER'].aop_parse_template(str_replace("\$sugarurl", $sugar_config['site_url'], $template->body_html), $beans));
390
+        $ret['body_alt'] = strip_tags(from_html(aop_parse_template(str_replace("\$sugarurl", $sugar_config['site_url'], $template->body), $beans)));
391 391
         return $ret;
392 392
     }
393 393
 
394
-    private function getAOPConfig(){
394
+    private function getAOPConfig() {
395 395
         global $sugar_config;
396
-        if(!array_key_exists("aop",$sugar_config)){
396
+        if (!array_key_exists("aop", $sugar_config)) {
397 397
             return array();
398 398
         }
399 399
         return $sugar_config['aop'];
400 400
     }
401 401
 
402
-    private function sendCreationEmail(aCase $bean, $contact){
403
-        if(!isAOPEnabled()){
402
+    private function sendCreationEmail(aCase $bean, $contact) {
403
+        if (!isAOPEnabled()) {
404 404
             return;
405 405
         }
406 406
         require_once("include/SugarPHPMailer.php");
407
-        $mailer=new SugarPHPMailer();
407
+        $mailer = new SugarPHPMailer();
408 408
         $admin = new Administration();
409 409
         $admin->retrieveSettings();
410 410
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
         $aop_config = $this->getAOPConfig();
417 417
         $email_template = $email_template->retrieve($aop_config['case_creation_email_template_id']);
418
-        if(!$aop_config['case_creation_email_template_id'] || !$email_template){
418
+        if (!$aop_config['case_creation_email_template_id'] || !$email_template) {
419 419
             $GLOBALS['log']->warn("CaseUpdatesHook: sendCreationEmail template is empty");
420 420
             return false;
421 421
         }
@@ -429,24 +429,24 @@  discard block
 block discarded – undo
429 429
         $mailer->From     = $emailSettings['from_address'];
430 430
         $mailer->FromName = $emailSettings['from_name'];
431 431
         $email = $contact->emailAddress->getPrimaryAddress($contact);
432
-        if(empty($email) && !empty($contact->email1)){
432
+        if (empty($email) && !empty($contact->email1)) {
433 433
             $email = $contact->email1;
434 434
         }
435 435
         $mailer->AddAddress($email);
436
-        if (!$mailer->Send()){
437
-            $GLOBALS['log']->info("CaseUpdatesHook: Could not send email:  " . $mailer->ErrorInfo);
436
+        if (!$mailer->Send()) {
437
+            $GLOBALS['log']->info("CaseUpdatesHook: Could not send email:  ".$mailer->ErrorInfo);
438 438
             return false;
439
-        }else{
439
+        } else {
440 440
             $this->logEmail($email, $mailer, $bean->id);
441 441
             return true;
442 442
         }
443 443
     }
444 444
 
445
-    private function logEmail($email, $mailer, $caseId = null){
445
+    private function logEmail($email, $mailer, $caseId = null) {
446 446
         require_once('modules/Emails/Email.php');
447 447
         $emailObj = new Email();
448 448
         $emailObj->to_addrs = $email;
449
-        $emailObj->type= 'out';
449
+        $emailObj->type = 'out';
450 450
         $emailObj->deleted = '0';
451 451
         $emailObj->name = $mailer->Subject;
452 452
         $emailObj->description = $mailer->AltBody;
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         $emailObj->save();
464 464
     }
465 465
 
466
-    public function filterHTML($bean, $event, $arguments){
467
-        $bean->description = SugarCleaner::cleanHtml($bean->description,true);
466
+    public function filterHTML($bean, $event, $arguments) {
467
+        $bean->description = SugarCleaner::cleanHtml($bean->description, true);
468 468
     }
469 469
 }
Please login to merge, or discard this patch.
modules/AOR_Fields/AOR_Field.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 
83 83
         require_once('modules/AOW_WorkFlow/aow_utils.php');
84 84
 
85
-        $line_count = count($post_data[$key . 'field']);
85
+        $line_count = count($post_data[$key.'field']);
86 86
         for ($i = 0; $i < $line_count; ++$i) {
87 87
 
88
-            if ($post_data[$key . 'deleted'][$i] == 1) {
89
-                $this->mark_deleted($post_data[$key . 'id'][$i]);
88
+            if ($post_data[$key.'deleted'][$i] == 1) {
89
+                $this->mark_deleted($post_data[$key.'id'][$i]);
90 90
             } else {
91 91
                 $field = new AOR_Field();
92 92
                 $field->group_display = false;
@@ -102,22 +102,22 @@  discard block
 block discarded – undo
102 102
 
103 103
                 foreach ($this->field_defs as $field_def) {
104 104
                     $field_name = $field_def['name'];
105
-                    if (is_array($post_data[$key . $field_name])) {
106
-                        if ($field_name != 'group_display' && isset($post_data[$key . $field_name][$i])) {
107
-                            if (is_array($post_data[$key . $field_name][$i])) {
108
-                                $post_data[$key . $field_name][$i] = base64_encode(serialize($post_data[$key . $field_name][$i]));
105
+                    if (is_array($post_data[$key.$field_name])) {
106
+                        if ($field_name != 'group_display' && isset($post_data[$key.$field_name][$i])) {
107
+                            if (is_array($post_data[$key.$field_name][$i])) {
108
+                                $post_data[$key.$field_name][$i] = base64_encode(serialize($post_data[$key.$field_name][$i]));
109 109
                             } else if ($field_name == 'value') {
110
-                                $post_data[$key . $field_name][$i] = fixUpFormatting($_REQUEST['report_module'], $field->field, $post_data[$key . $field_name][$i]);
110
+                                $post_data[$key.$field_name][$i] = fixUpFormatting($_REQUEST['report_module'], $field->field, $post_data[$key.$field_name][$i]);
111 111
                             }
112 112
                             if ($field_name == 'module_path') {
113
-                                $post_data[$key . $field_name][$i] = base64_encode(serialize(explode(":", $post_data[$key . $field_name][$i])));
113
+                                $post_data[$key.$field_name][$i] = base64_encode(serialize(explode(":", $post_data[$key.$field_name][$i])));
114 114
                             }
115
-                            $field->$field_name = $post_data[$key . $field_name][$i];
115
+                            $field->$field_name = $post_data[$key.$field_name][$i];
116 116
                         }
117
-                    } else if (is_null($post_data[$key . $field_name])) {
117
+                    } else if (is_null($post_data[$key.$field_name])) {
118 118
                         // do nothing
119 119
                     } else {
120
-                        throw new Exception('illegal type in post data at key ' . $key . $field_name . ' ' . gettype($post_data[$key . $field_name]));
120
+                        throw new Exception('illegal type in post data at key '.$key.$field_name.' '.gettype($post_data[$key.$field_name]));
121 121
                     }
122 122
 
123 123
                 }
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.modulefields.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -45,20 +45,20 @@  discard block
 block discarded – undo
45 45
     var $mbModule;
46 46
     
47 47
     /**
48
-	 * @see SugarView::_getModuleTitleParams()
49
-	 */
50
-	protected function _getModuleTitleParams($browserTitle = false)
51
-	{
52
-	    global $mod_strings;
48
+     * @see SugarView::_getModuleTitleParams()
49
+     */
50
+    protected function _getModuleTitleParams($browserTitle = false)
51
+    {
52
+        global $mod_strings;
53 53
 	    
54
-    	return array(
55
-    	   translate('LBL_MODULE_NAME','Administration'),
56
-    	   ModuleBuilderController::getModuleTitle(),
57
-    	   );
54
+        return array(
55
+            translate('LBL_MODULE_NAME','Administration'),
56
+            ModuleBuilderController::getModuleTitle(),
57
+            );
58 58
     }
59 59
 
60
-	function display()
61
-	{
60
+    function display()
61
+    {
62 62
         $smarty = new Sugar_Smarty();
63 63
         global $mod_strings;
64 64
         $bak_mod_strings=$mod_strings;
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
                 if ($this->isValidStudioField($def))
93 93
                 {
94 94
                     $def['label'] = translate($def['vname'], $module_name);
95
-					//Custom relate fields will have a non-db source, but custom_module set
96
-                	if(isset($def['source']) && $def['source'] == 'custom_fields' || isset($def['custom_module'])) {
97
-                       $f[$mod_strings['LBL_HCUSTOM']][$def['name']] = $def;
98
-                       $def['custom'] = true;
95
+                    //Custom relate fields will have a non-db source, but custom_module set
96
+                    if(isset($def['source']) && $def['source'] == 'custom_fields' || isset($def['custom_module'])) {
97
+                        $f[$mod_strings['LBL_HCUSTOM']][$def['name']] = $def;
98
+                        $def['custom'] = true;
99 99
                     } else {
100
-                       $f[$mod_strings['LBL_HDEFAULT']][$def['name']] = $def;
101
-                       $def['custom'] = false;
100
+                        $f[$mod_strings['LBL_HDEFAULT']][$def['name']] = $def;
101
+                        $def['custom'] = false;
102 102
                     }
103 103
 
104 104
                     $def['type'] = isset($fieldTypes[$def['type']]) ? $fieldTypes[$def['type']] : ucfirst($def['type']);
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
                     {
184 184
                         if (isset($loadedFields[$field]))
185 185
                         {
186
-                           unset($this->mbModule->mbvardefs->vardefs['fields'][$k][$field]);
186
+                            unset($this->mbModule->mbvardefs->vardefs['fields'][$k][$field]);
187 187
                         } else {
188
-                           $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['label'] = isset($def['vname']) && isset($this->mbModule->mblanguage->strings[$current_language.'.lang.php'][$def['vname']]) ? $this->mbModule->mblanguage->strings[$current_language.'.lang.php'][$def['vname']] : $field;
189
-                           $customFieldsData[$field] = ($k == $this->mbModule->name) ? true : false;
190
-                           $loadedFields[$field] = true;
188
+                            $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['label'] = isset($def['vname']) && isset($this->mbModule->mblanguage->strings[$current_language.'.lang.php'][$def['vname']]) ? $this->mbModule->mblanguage->strings[$current_language.'.lang.php'][$def['vname']] : $field;
189
+                            $customFieldsData[$field] = ($k == $this->mbModule->name) ? true : false;
190
+                            $loadedFields[$field] = true;
191 191
 
192
-                           $type = $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['type'];
193
-                           $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['type'] = isset($fieldTypes[$type]) ? $fieldTypes[$type] : ucfirst($type);
194
-                           $fieldsData[] = $this->mbModule->mbvardefs->vardefs['fields'][$k][$field];
192
+                            $type = $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['type'];
193
+                            $this->mbModule->mbvardefs->vardefs['fields'][$k][$field]['type'] = isset($fieldTypes[$type]) ? $fieldTypes[$type] : ucfirst($type);
194
+                            $fieldsData[] = $this->mbModule->mbvardefs->vardefs['fields'][$k][$field];
195 195
                         }
196 196
                     }
197 197
                 }
@@ -249,29 +249,29 @@  discard block
 block discarded – undo
249 249
     function isValidStudioField(
250 250
         $def
251 251
         )
252
-	{
253
-    	if (isset($def['studio'])) {
252
+    {
253
+        if (isset($def['studio'])) {
254 254
             if (is_array($def [ 'studio' ]))
255 255
             {
256
-    			if (isset($def['studio']['editField']) && $def['studio']['editField'] == true)
256
+                if (isset($def['studio']['editField']) && $def['studio']['editField'] == true)
257 257
                     return true;
258
-    			if (isset($def['studio']['required']) && $def['studio']['required'])
258
+                if (isset($def['studio']['required']) && $def['studio']['required'])
259 259
                     return true;
260 260
                     
261
-    		} else
262
-    		{
263
-    			if ($def['studio'] == 'visible')
261
+            } else
262
+            {
263
+                if ($def['studio'] == 'visible')
264 264
                     return true;
265 265
                 if ($def['studio'] == 'hidden' || $def['studio'] == 'false' || !$def['studio'] )
266 266
                     return false;
267 267
             }
268 268
         }
269
-    	if (empty($def ['source']) || $def ['source'] == 'db' || $def ['source'] == 'custom_fields')
270
-		{
271
-    		if ($def ['type'] != 'id' && (empty($def ['dbType']) || $def ['dbType'] != 'id'))
272
-		  return true;
273
-		}
269
+        if (empty($def ['source']) || $def ['source'] == 'db' || $def ['source'] == 'custom_fields')
270
+        {
271
+            if ($def ['type'] != 'id' && (empty($def ['dbType']) || $def ['dbType'] != 'id'))
272
+            return true;
273
+        }
274 274
 		
275
-		return false;
276
-	}
275
+        return false;
276
+    }
277 277
 }
278 278
\ No newline at end of file
Please login to merge, or discard this patch.
install/language/en_us.lang.php 1 patch
Indentation   +396 added lines, -396 removed lines patch added patch discarded remove patch
@@ -43,40 +43,40 @@  discard block
 block discarded – undo
43 43
  * *******************************************************************************/
44 44
 
45 45
 $mod_strings = array(
46
-	'LBL_BASIC_SEARCH'					=> 'Basic Search',
47
-	'LBL_ADVANCED_SEARCH'				=> 'Advanced Search',
48
-	'LBL_BASIC_TYPE'					=> 'Basic Type',
49
-	'LBL_ADVANCED_TYPE'					=> 'Advanced Type',
50
-	'LBL_SYSOPTS_1'						=> 'Select from the following system configuration options below.',
46
+    'LBL_BASIC_SEARCH'					=> 'Basic Search',
47
+    'LBL_ADVANCED_SEARCH'				=> 'Advanced Search',
48
+    'LBL_BASIC_TYPE'					=> 'Basic Type',
49
+    'LBL_ADVANCED_TYPE'					=> 'Advanced Type',
50
+    'LBL_SYSOPTS_1'						=> 'Select from the following system configuration options below.',
51 51
     'LBL_SYSOPTS_2'                     => 'What type of database will be used for the SuiteCRM instance you are about to install?',
52
-	'LBL_SYSOPTS_CONFIG'				=> 'System Configuration',
53
-	'LBL_SYSOPTS_DB_TYPE'				=> '',
54
-	'LBL_SYSOPTS_DB'					=> 'Specify Database Type',
52
+    'LBL_SYSOPTS_CONFIG'				=> 'System Configuration',
53
+    'LBL_SYSOPTS_DB_TYPE'				=> '',
54
+    'LBL_SYSOPTS_DB'					=> 'Specify Database Type',
55 55
     'LBL_SYSOPTS_DB_TITLE'              => 'Database Type',
56
-	'LBL_SYSOPTS_ERRS_TITLE'			=> 'Please fix the following errors before proceeding:',
57
-	'LBL_MAKE_DIRECTORY_WRITABLE'      => 'Please make the following directory writable:',
56
+    'LBL_SYSOPTS_ERRS_TITLE'			=> 'Please fix the following errors before proceeding:',
57
+    'LBL_MAKE_DIRECTORY_WRITABLE'      => 'Please make the following directory writable:',
58 58
     'ERR_DB_VERSION_FAILURE'			=> 'Unable to check database version.',
59
-	'DEFAULT_CHARSET'					=> 'UTF-8',
59
+    'DEFAULT_CHARSET'					=> 'UTF-8',
60 60
     'ERR_ADMIN_USER_NAME_BLANK'         => 'Provide the user name for the SuiteCRM admin user. ',
61
-	'ERR_ADMIN_PASS_BLANK'				=> 'Provide the password for the SuiteCRM admin user. ',
61
+    'ERR_ADMIN_PASS_BLANK'				=> 'Provide the password for the SuiteCRM admin user. ',
62 62
 
63 63
     //'ERR_CHECKSYS_CALL_TIME'			=> 'Allow Call Time Pass Reference is Off (please enable in php.ini)',
64 64
     'ERR_CHECKSYS'                      => 'Errors have been detected during compatibility check.  In order for your SuiteCRM Installation to function properly, please take the proper steps to address the issues listed below and either press the recheck button, or try installing again.',
65 65
     'ERR_CHECKSYS_CALL_TIME'            => 'Allow Call Time Pass Reference is On (this should be set to Off in php.ini)',
66
-	'ERR_CHECKSYS_CURL'					=> 'Not found: SuiteCRM Scheduler will run with limited functionality.',
66
+    'ERR_CHECKSYS_CURL'					=> 'Not found: SuiteCRM Scheduler will run with limited functionality.',
67 67
     'ERR_CHECKSYS_IMAP'					=> 'Not found: InboundEmail and Campaigns (Email) require the IMAP libraries. Neither will be functional.',
68
-	'ERR_CHECKSYS_MSSQL_MQGPC'			=> 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.',
69
-	'ERR_CHECKSYS_MEM_LIMIT_0'			=> 'Warning: ',
70
-	'ERR_CHECKSYS_MEM_LIMIT_1'			=> ' (Set this to ',
71
-	'ERR_CHECKSYS_MEM_LIMIT_2'			=> 'M or larger in your php.ini file)',
72
-	'ERR_CHECKSYS_MYSQL_VERSION'		=> 'Minimum Version 4.1.2 - Found: ',
73
-	'ERR_CHECKSYS_NO_SESSIONS'			=> 'Failed to write and read session variables.  Unable to proceed with the installation.',
74
-	'ERR_CHECKSYS_NOT_VALID_DIR'		=> 'Not A Valid Directory',
75
-	'ERR_CHECKSYS_NOT_WRITABLE'			=> 'Warning: Not Writable',
76
-	'ERR_CHECKSYS_PHP_INVALID_VER'		=> 'Your version of PHP is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ',
77
-	'ERR_CHECKSYS_IIS_INVALID_VER'      => 'Your version of IIS is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ',
78
-	'ERR_CHECKSYS_FASTCGI'              => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ',
79
-	'ERR_CHECKSYS_FASTCGI_LOGGING'      => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.',
68
+    'ERR_CHECKSYS_MSSQL_MQGPC'			=> 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.',
69
+    'ERR_CHECKSYS_MEM_LIMIT_0'			=> 'Warning: ',
70
+    'ERR_CHECKSYS_MEM_LIMIT_1'			=> ' (Set this to ',
71
+    'ERR_CHECKSYS_MEM_LIMIT_2'			=> 'M or larger in your php.ini file)',
72
+    'ERR_CHECKSYS_MYSQL_VERSION'		=> 'Minimum Version 4.1.2 - Found: ',
73
+    'ERR_CHECKSYS_NO_SESSIONS'			=> 'Failed to write and read session variables.  Unable to proceed with the installation.',
74
+    'ERR_CHECKSYS_NOT_VALID_DIR'		=> 'Not A Valid Directory',
75
+    'ERR_CHECKSYS_NOT_WRITABLE'			=> 'Warning: Not Writable',
76
+    'ERR_CHECKSYS_PHP_INVALID_VER'		=> 'Your version of PHP is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ',
77
+    'ERR_CHECKSYS_IIS_INVALID_VER'      => 'Your version of IIS is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ',
78
+    'ERR_CHECKSYS_FASTCGI'              => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ',
79
+    'ERR_CHECKSYS_FASTCGI_LOGGING'      => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.',
80 80
     'ERR_CHECKSYS_PHP_UNSUPPORTED'		=> 'Unsupported PHP Version Installed: ( ver',
81 81
     'LBL_DB_UNAVAILABLE'                => 'Database unavailable',
82 82
     'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found.  Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL or MS SQLServer.  You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP.  Please refer to your PHP Manual for more information on how to enable Database Support.',
@@ -89,184 +89,184 @@  discard block
 block discarded – undo
89 89
     'ERR_CHECKSYS_CUSTOM_NOT_WRITABLE'  => 'The Custom Directory exists but is not writeable.  You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System.  Please take the needed steps to make the file writeable.',
90 90
     'ERR_CHECKSYS_FILES_NOT_WRITABLE'   => "The files or directories listed below are not writeable or are missing and cannot be created.  Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the 'read only' option and apply it to all subfolders.",
91 91
     'LBL_CHECKSYS_OVERRIDE_CONFIG' => 'Config override',
92
-	//'ERR_CHECKSYS_SAFE_MODE'			=> 'Safe Mode is On (please disable in php.ini)',
93
-	'ERR_CHECKSYS_SAFE_MODE'			=> 'Safe Mode is On (you may wish to disable in php.ini)',
92
+    //'ERR_CHECKSYS_SAFE_MODE'			=> 'Safe Mode is On (please disable in php.ini)',
93
+    'ERR_CHECKSYS_SAFE_MODE'			=> 'Safe Mode is On (you may wish to disable in php.ini)',
94 94
     'ERR_CHECKSYS_ZLIB'					=> 'ZLib support not found: SuiteCRM reaps enormous performance benefits with zlib compression.',
95 95
     'ERR_CHECKSYS_ZIP'					=> 'ZIP support not found: SuiteCRM needs ZIP support in order to process compressed files.',
96 96
     'ERR_CHECKSYS_PCRE'					=> 'PCRE library not found: SuiteCRM needs PCRE library in order to process Perl style of regular expression pattern matching.',
97 97
     'ERR_CHECKSYS_PCRE_VER'				=> 'PCRE library version: SuiteCRM needs PCRE library 7.0 or above to process Perl style of regular expression pattern matching.',
98
-	'ERR_DB_ADMIN'						=> 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established.  Please enter a valid user name and password.  (Error: ',
98
+    'ERR_DB_ADMIN'						=> 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established.  Please enter a valid user name and password.  (Error: ',
99 99
     'ERR_DB_ADMIN_MSSQL'                => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established.  Please enter a valid user name and password.',
100
-	'ERR_DB_EXISTS_NOT'					=> 'The specified database does not exist.',
101
-	'ERR_DB_EXISTS_WITH_CONFIG'			=> 'Database already exists with config data.  To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?"  To upgrade, use the Upgrade Wizard in the Admin Console.  Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.',
102
-	'ERR_DB_EXISTS'						=> 'The provided Database Name already exists -- cannot create another one with the same name.',
100
+    'ERR_DB_EXISTS_NOT'					=> 'The specified database does not exist.',
101
+    'ERR_DB_EXISTS_WITH_CONFIG'			=> 'Database already exists with config data.  To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?"  To upgrade, use the Upgrade Wizard in the Admin Console.  Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.',
102
+    'ERR_DB_EXISTS'						=> 'The provided Database Name already exists -- cannot create another one with the same name.',
103 103
     'ERR_DB_EXISTS_PROCEED'             => 'The provided Database Name already exists.  You can<br>1.  hit the back button and choose a new database name <br>2.  click next and continue but all existing tables on this database will be dropped.  <strong>This means your tables and data will be blown away.</strong>',
104
-	'ERR_DB_HOSTNAME'					=> 'Host name cannot be blank.',
105
-	'ERR_DB_INVALID'					=> 'Invalid database type selected.',
106
-	'ERR_DB_LOGIN_FAILURE'				=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
107
-	'ERR_DB_LOGIN_FAILURE_MYSQL'		=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
108
-	'ERR_DB_LOGIN_FAILURE_MSSQL'		=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
109
-	'ERR_DB_MYSQL_VERSION'				=> 'Your MySQL version (%s) is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.',
110
-	'ERR_DB_NAME'						=> 'Database name cannot be blank.',
111
-	'ERR_DB_NAME2'						=> "Database name cannot contain a '\\', '/', or '.'",
104
+    'ERR_DB_HOSTNAME'					=> 'Host name cannot be blank.',
105
+    'ERR_DB_INVALID'					=> 'Invalid database type selected.',
106
+    'ERR_DB_LOGIN_FAILURE'				=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
107
+    'ERR_DB_LOGIN_FAILURE_MYSQL'		=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
108
+    'ERR_DB_LOGIN_FAILURE_MSSQL'		=> 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established.  Please enter a valid host, username and password',
109
+    'ERR_DB_MYSQL_VERSION'				=> 'Your MySQL version (%s) is not supported by SuiteCRM.  You will need to install a version that is compatible with the SuiteCRM application.  Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.',
110
+    'ERR_DB_NAME'						=> 'Database name cannot be blank.',
111
+    'ERR_DB_NAME2'						=> "Database name cannot contain a '\\', '/', or '.'",
112 112
     'ERR_DB_MYSQL_DB_NAME_INVALID'      => "Database name cannot contain a '\\', '/', or '.'",
113 113
     'ERR_DB_MSSQL_DB_NAME_INVALID'      => "Database name cannot begin with a number, '#', or '@' and cannot contain a space, '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', '&', '!', or '-'",
114 114
     'ERR_DB_OCI8_DB_NAME_INVALID'       => "Database name can only consist of alphanumeric characters and the symbols '#', '_' or '$'",
115
-	'ERR_DB_PASSWORD'					=> 'The passwords provided for the SuiteCRM database administrator do not match.  Please re-enter the same passwords in the password fields.',
116
-	'ERR_DB_PRIV_USER'					=> 'Provide a database administrator user name.  The user is required for the initial connection to the database.',
117
-	'ERR_DB_USER_EXISTS'				=> 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.',
118
-	'ERR_DB_USER'						=> 'Enter a user name for the SuiteCRM database administrator.',
119
-	'ERR_DBCONF_VALIDATION'				=> 'Please fix the following errors before proceeding:',
115
+    'ERR_DB_PASSWORD'					=> 'The passwords provided for the SuiteCRM database administrator do not match.  Please re-enter the same passwords in the password fields.',
116
+    'ERR_DB_PRIV_USER'					=> 'Provide a database administrator user name.  The user is required for the initial connection to the database.',
117
+    'ERR_DB_USER_EXISTS'				=> 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.',
118
+    'ERR_DB_USER'						=> 'Enter a user name for the SuiteCRM database administrator.',
119
+    'ERR_DBCONF_VALIDATION'				=> 'Please fix the following errors before proceeding:',
120 120
     'ERR_DBCONF_PASSWORD_MISMATCH'      => 'The passwords provided for the SuiteCRM database user do not match. Please re-enter the same passwords in the password fields.',
121
-	'ERR_ERROR_GENERAL'					=> 'The following errors were encountered:',
122
-	'ERR_LANG_CANNOT_DELETE_FILE'		=> 'Cannot delete file: ',
123
-	'ERR_LANG_MISSING_FILE'				=> 'Cannot find file: ',
124
-	'ERR_LANG_NO_LANG_FILE'			 	=> 'No language pack file found at include/language inside: ',
125
-	'ERR_LANG_UPLOAD_1'					=> 'There was a problem with your upload.  Please try again.',
126
-	'ERR_LANG_UPLOAD_2'					=> 'Language Packs must be ZIP archives.',
127
-	'ERR_LANG_UPLOAD_3'					=> 'PHP could not move the temp file to the upgrade directory.',
128
-	'ERR_LICENSE_MISSING'				=> 'Missing Required Fields',
129
-	'ERR_LICENSE_NOT_FOUND'				=> 'License file not found!',
130
-	'ERR_LOG_DIRECTORY_NOT_EXISTS'		=> 'Log directory provided is not a valid directory.',
131
-	'ERR_LOG_DIRECTORY_NOT_WRITABLE'	=> 'Log directory provided is not a writable directory.',
132
-	'ERR_LOG_DIRECTORY_REQUIRED'		=> 'Log directory is required if you wish to specify your own.',
133
-	'ERR_NO_DIRECT_SCRIPT'				=> 'Unable to process script directly.',
134
-	'ERR_NO_SINGLE_QUOTE'				=> 'Cannot use the single quotation mark for ',
135
-	'ERR_PASSWORD_MISMATCH'				=> 'The passwords provided for the SuiteCRM admin user do not match.  Please re-enter the same passwords in the password fields.',
136
-	'ERR_PERFORM_CONFIG_PHP_1'			=> 'Cannot write to the <span class=stop>config.php</span> file.',
137
-	'ERR_PERFORM_CONFIG_PHP_2'			=> 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file.  However, you <strong>must </strong>create the config.php file before you continue to the next step.',
138
-	'ERR_PERFORM_CONFIG_PHP_3'			=> 'Did you remember to create the config.php file?',
139
-	'ERR_PERFORM_CONFIG_PHP_4'			=> 'Warning: Could not write to config.php file.  Please ensure it exists.',
140
-	'ERR_PERFORM_HTACCESS_1'			=> 'Cannot write to the ',
141
-	'ERR_PERFORM_HTACCESS_2'			=> ' file.',
142
-	'ERR_PERFORM_HTACCESS_3'			=> 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:',
143
-	'ERR_PERFORM_NO_TCPIP'				=> '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.',
144
-	'ERR_SESSION_DIRECTORY_NOT_EXISTS'	=> 'Session directory provided is not a valid directory.',
145
-	'ERR_SESSION_DIRECTORY'				=> 'Session directory provided is not a writable directory.',
146
-	'ERR_SESSION_PATH'					=> 'Session path is required if you wish to specify your own.',
147
-	'ERR_SI_NO_CONFIG'					=> 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php',
148
-	'ERR_SITE_GUID'						=> 'Application ID is required if you wish to specify your own.',
121
+    'ERR_ERROR_GENERAL'					=> 'The following errors were encountered:',
122
+    'ERR_LANG_CANNOT_DELETE_FILE'		=> 'Cannot delete file: ',
123
+    'ERR_LANG_MISSING_FILE'				=> 'Cannot find file: ',
124
+    'ERR_LANG_NO_LANG_FILE'			 	=> 'No language pack file found at include/language inside: ',
125
+    'ERR_LANG_UPLOAD_1'					=> 'There was a problem with your upload.  Please try again.',
126
+    'ERR_LANG_UPLOAD_2'					=> 'Language Packs must be ZIP archives.',
127
+    'ERR_LANG_UPLOAD_3'					=> 'PHP could not move the temp file to the upgrade directory.',
128
+    'ERR_LICENSE_MISSING'				=> 'Missing Required Fields',
129
+    'ERR_LICENSE_NOT_FOUND'				=> 'License file not found!',
130
+    'ERR_LOG_DIRECTORY_NOT_EXISTS'		=> 'Log directory provided is not a valid directory.',
131
+    'ERR_LOG_DIRECTORY_NOT_WRITABLE'	=> 'Log directory provided is not a writable directory.',
132
+    'ERR_LOG_DIRECTORY_REQUIRED'		=> 'Log directory is required if you wish to specify your own.',
133
+    'ERR_NO_DIRECT_SCRIPT'				=> 'Unable to process script directly.',
134
+    'ERR_NO_SINGLE_QUOTE'				=> 'Cannot use the single quotation mark for ',
135
+    'ERR_PASSWORD_MISMATCH'				=> 'The passwords provided for the SuiteCRM admin user do not match.  Please re-enter the same passwords in the password fields.',
136
+    'ERR_PERFORM_CONFIG_PHP_1'			=> 'Cannot write to the <span class=stop>config.php</span> file.',
137
+    'ERR_PERFORM_CONFIG_PHP_2'			=> 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file.  However, you <strong>must </strong>create the config.php file before you continue to the next step.',
138
+    'ERR_PERFORM_CONFIG_PHP_3'			=> 'Did you remember to create the config.php file?',
139
+    'ERR_PERFORM_CONFIG_PHP_4'			=> 'Warning: Could not write to config.php file.  Please ensure it exists.',
140
+    'ERR_PERFORM_HTACCESS_1'			=> 'Cannot write to the ',
141
+    'ERR_PERFORM_HTACCESS_2'			=> ' file.',
142
+    'ERR_PERFORM_HTACCESS_3'			=> 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:',
143
+    'ERR_PERFORM_NO_TCPIP'				=> '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.',
144
+    'ERR_SESSION_DIRECTORY_NOT_EXISTS'	=> 'Session directory provided is not a valid directory.',
145
+    'ERR_SESSION_DIRECTORY'				=> 'Session directory provided is not a writable directory.',
146
+    'ERR_SESSION_PATH'					=> 'Session path is required if you wish to specify your own.',
147
+    'ERR_SI_NO_CONFIG'					=> 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php',
148
+    'ERR_SITE_GUID'						=> 'Application ID is required if you wish to specify your own.',
149 149
     'ERROR_SPRITE_SUPPORT'              => "Currently we are not able to locate the GD library, as a result you will not be able to use the CSS Sprite functionality.",
150
-	'ERR_UPLOAD_MAX_FILESIZE'			=> 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.',
150
+    'ERR_UPLOAD_MAX_FILESIZE'			=> 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.',
151 151
     'LBL_UPLOAD_MAX_FILESIZE_TITLE'     => 'Upload File Size',
152
-	'ERR_URL_BLANK'						=> 'Provide the base URL for the SuiteCRM instance.',
153
-	'ERR_UW_NO_UPDATE_RECORD'			=> 'Could not locate installation record of',
154
-	'ERROR_FLAVOR_INCOMPATIBLE'			=> 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ',
155
-	'ERROR_LICENSE_EXPIRED'				=> "Error: Your license expired ",
156
-	'ERROR_LICENSE_EXPIRED2'			=> " day(s) ago.   Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a>  in the Admin screen to enter your new license key.  If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.",
157
-	'ERROR_MANIFEST_TYPE'				=> 'Manifest file must specify the package type.',
158
-	'ERROR_PACKAGE_TYPE'				=> 'Manifest file specifies an unrecognized package type',
159
-	'ERROR_VALIDATION_EXPIRED'			=> "Error: Your validation key expired ",
160
-	'ERROR_VALIDATION_EXPIRED2'			=> " day(s) ago.   Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key.  If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.",
161
-	'ERROR_VERSION_INCOMPATIBLE'		=> 'The uploaded file is not compatible with this version of SuiteCRM: ',
162
-
163
-	'LBL_BACK'							=> 'Back',
152
+    'ERR_URL_BLANK'						=> 'Provide the base URL for the SuiteCRM instance.',
153
+    'ERR_UW_NO_UPDATE_RECORD'			=> 'Could not locate installation record of',
154
+    'ERROR_FLAVOR_INCOMPATIBLE'			=> 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ',
155
+    'ERROR_LICENSE_EXPIRED'				=> "Error: Your license expired ",
156
+    'ERROR_LICENSE_EXPIRED2'			=> " day(s) ago.   Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a>  in the Admin screen to enter your new license key.  If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.",
157
+    'ERROR_MANIFEST_TYPE'				=> 'Manifest file must specify the package type.',
158
+    'ERROR_PACKAGE_TYPE'				=> 'Manifest file specifies an unrecognized package type',
159
+    'ERROR_VALIDATION_EXPIRED'			=> "Error: Your validation key expired ",
160
+    'ERROR_VALIDATION_EXPIRED2'			=> " day(s) ago.   Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key.  If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.",
161
+    'ERROR_VERSION_INCOMPATIBLE'		=> 'The uploaded file is not compatible with this version of SuiteCRM: ',
162
+
163
+    'LBL_BACK'							=> 'Back',
164 164
     'LBL_CANCEL'                        => 'Cancel',
165 165
     'LBL_ACCEPT'                        => 'I Accept',
166
-	'LBL_CHECKSYS_1'					=> 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.',
167
-	'LBL_CHECKSYS_CACHE'				=> 'Writable Cache Sub-Directories',
166
+    'LBL_CHECKSYS_1'					=> 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.',
167
+    'LBL_CHECKSYS_CACHE'				=> 'Writable Cache Sub-Directories',
168 168
     'LBL_DROP_DB_CONFIRM'               => 'The provided Database Name already exists.<br>You can either:<br>1.  Click on the Cancel button and choose a new database name, or <br>2.  Click the Accept button and continue.  All existing tables in the database will be dropped. <strong>This means that all of the tables and pre-existing data will be blown away.</strong>',
169
-	'LBL_CHECKSYS_CALL_TIME'			=> 'PHP Allow Call Time Pass Reference Turned Off',
169
+    'LBL_CHECKSYS_CALL_TIME'			=> 'PHP Allow Call Time Pass Reference Turned Off',
170 170
     'LBL_CHECKSYS_COMPONENT'			=> 'Component',
171
-	'LBL_CHECKSYS_COMPONENT_OPTIONAL'	=> 'Optional Components',
172
-	'LBL_CHECKSYS_CONFIG'				=> 'Writable SuiteCRM Configuration File (config.php)',
173
-	'LBL_CHECKSYS_CONFIG_OVERRIDE'		=> 'Writable SuiteCRM Configuration File (config_override.php)',
174
-	'LBL_CHECKSYS_CURL'					=> 'cURL Module',
171
+    'LBL_CHECKSYS_COMPONENT_OPTIONAL'	=> 'Optional Components',
172
+    'LBL_CHECKSYS_CONFIG'				=> 'Writable SuiteCRM Configuration File (config.php)',
173
+    'LBL_CHECKSYS_CONFIG_OVERRIDE'		=> 'Writable SuiteCRM Configuration File (config_override.php)',
174
+    'LBL_CHECKSYS_CURL'					=> 'cURL Module',
175 175
     'LBL_CHECKSYS_SESSION_SAVE_PATH'    => 'Session Save Path Setting',
176
-	'LBL_CHECKSYS_CUSTOM'				=> 'Writeable Custom Directory',
177
-	'LBL_CHECKSYS_DATA'					=> 'Writable Data Sub-Directories',
178
-	'LBL_CHECKSYS_IMAP'					=> 'IMAP Module',
179
-	'LBL_CHECKSYS_FASTCGI'             => 'FastCGI',
180
-	'LBL_CHECKSYS_MQGPC'				=> 'Magic Quotes GPC',
181
-	'LBL_CHECKSYS_MBSTRING'				=> 'MB Strings Module',
182
-	'LBL_CHECKSYS_MEM_OK'				=> 'OK (No Limit)',
183
-	'LBL_CHECKSYS_MEM_UNLIMITED'		=> 'OK (Unlimited)',
184
-	'LBL_CHECKSYS_MEM'					=> 'PHP Memory Limit',
185
-	'LBL_CHECKSYS_MODULE'				=> 'Writable Modules Sub-Directories and Files',
186
-	'LBL_CHECKSYS_MYSQL_VERSION'		=> 'MySQL Version',
187
-	'LBL_CHECKSYS_NOT_AVAILABLE'		=> 'Not Available',
188
-	'LBL_CHECKSYS_OK'					=> 'OK',
189
-	'LBL_CHECKSYS_PHP_INI'				=> 'Location of your PHP configuration file (php.ini):',
190
-	'LBL_CHECKSYS_PHP_OK'				=> 'OK (ver ',
191
-	'LBL_CHECKSYS_PHPVER'				=> 'PHP Version',
176
+    'LBL_CHECKSYS_CUSTOM'				=> 'Writeable Custom Directory',
177
+    'LBL_CHECKSYS_DATA'					=> 'Writable Data Sub-Directories',
178
+    'LBL_CHECKSYS_IMAP'					=> 'IMAP Module',
179
+    'LBL_CHECKSYS_FASTCGI'             => 'FastCGI',
180
+    'LBL_CHECKSYS_MQGPC'				=> 'Magic Quotes GPC',
181
+    'LBL_CHECKSYS_MBSTRING'				=> 'MB Strings Module',
182
+    'LBL_CHECKSYS_MEM_OK'				=> 'OK (No Limit)',
183
+    'LBL_CHECKSYS_MEM_UNLIMITED'		=> 'OK (Unlimited)',
184
+    'LBL_CHECKSYS_MEM'					=> 'PHP Memory Limit',
185
+    'LBL_CHECKSYS_MODULE'				=> 'Writable Modules Sub-Directories and Files',
186
+    'LBL_CHECKSYS_MYSQL_VERSION'		=> 'MySQL Version',
187
+    'LBL_CHECKSYS_NOT_AVAILABLE'		=> 'Not Available',
188
+    'LBL_CHECKSYS_OK'					=> 'OK',
189
+    'LBL_CHECKSYS_PHP_INI'				=> 'Location of your PHP configuration file (php.ini):',
190
+    'LBL_CHECKSYS_PHP_OK'				=> 'OK (ver ',
191
+    'LBL_CHECKSYS_PHPVER'				=> 'PHP Version',
192 192
     'LBL_CHECKSYS_IISVER'               => 'IIS Version',
193
-	'LBL_CHECKSYS_RECHECK'				=> 'Re-check',
194
-	'LBL_CHECKSYS_SAFE_MODE'			=> 'PHP Safe Mode Turned Off',
195
-	'LBL_CHECKSYS_SESSION'				=> 'Writable Session Save Path (',
196
-	'LBL_CHECKSYS_STATUS'				=> 'Status',
197
-	'LBL_CHECKSYS_TITLE'				=> 'System Check Acceptance',
198
-	'LBL_CHECKSYS_VER'					=> 'Found: ( ver ',
199
-	'LBL_CHECKSYS_XML'					=> 'XML Parsing',
200
-	'LBL_CHECKSYS_ZLIB'					=> 'ZLIB Compression Module',
201
-	'LBL_CHECKSYS_ZIP'					=> 'ZIP Handling Module',
202
-	'LBL_CHECKSYS_PCRE'					=> 'PCRE Library',
203
-	'LBL_CHECKSYS_FIX_FILES'            => 'Please fix the following files or directories before proceeding:',
193
+    'LBL_CHECKSYS_RECHECK'				=> 'Re-check',
194
+    'LBL_CHECKSYS_SAFE_MODE'			=> 'PHP Safe Mode Turned Off',
195
+    'LBL_CHECKSYS_SESSION'				=> 'Writable Session Save Path (',
196
+    'LBL_CHECKSYS_STATUS'				=> 'Status',
197
+    'LBL_CHECKSYS_TITLE'				=> 'System Check Acceptance',
198
+    'LBL_CHECKSYS_VER'					=> 'Found: ( ver ',
199
+    'LBL_CHECKSYS_XML'					=> 'XML Parsing',
200
+    'LBL_CHECKSYS_ZLIB'					=> 'ZLIB Compression Module',
201
+    'LBL_CHECKSYS_ZIP'					=> 'ZIP Handling Module',
202
+    'LBL_CHECKSYS_PCRE'					=> 'PCRE Library',
203
+    'LBL_CHECKSYS_FIX_FILES'            => 'Please fix the following files or directories before proceeding:',
204 204
     'LBL_CHECKSYS_FIX_MODULE_FILES'     => 'Please fix the following module directories and the files under them before proceeding:',
205 205
     'LBL_CHECKSYS_UPLOAD'               => 'Writable Upload Directory',
206 206
     'LBL_CLOSE'							=> 'Close',
207 207
     'LBL_THREE'                         => '3',
208
-	'LBL_CONFIRM_BE_CREATED'			=> 'be created',
209
-	'LBL_CONFIRM_DB_TYPE'				=> 'Database Type',
210
-	'LBL_CONFIRM_DIRECTIONS'			=> 'Please confirm the settings below.  If you would like to change any of the values, click "Back" to edit.  Otherwise, click "Next" to start the installation.',
211
-	'LBL_CONFIRM_LICENSE_TITLE'			=> 'License Information',
212
-	'LBL_CONFIRM_NOT'					=> 'not',
213
-	'LBL_CONFIRM_TITLE'					=> 'Confirm Settings',
214
-	'LBL_CONFIRM_WILL'					=> 'will',
215
-	'LBL_DBCONF_CREATE_DB'				=> 'Create Database',
216
-	'LBL_DBCONF_CREATE_USER'			=> 'Create User',
217
-	'LBL_DBCONF_DB_DROP_CREATE_WARN'	=> 'Caution: All SuiteCRM data will be erased<br>if this box is checked.',
218
-	'LBL_DBCONF_DB_DROP_CREATE'			=> 'Drop and Recreate Existing SuiteCRM tables?',
208
+    'LBL_CONFIRM_BE_CREATED'			=> 'be created',
209
+    'LBL_CONFIRM_DB_TYPE'				=> 'Database Type',
210
+    'LBL_CONFIRM_DIRECTIONS'			=> 'Please confirm the settings below.  If you would like to change any of the values, click "Back" to edit.  Otherwise, click "Next" to start the installation.',
211
+    'LBL_CONFIRM_LICENSE_TITLE'			=> 'License Information',
212
+    'LBL_CONFIRM_NOT'					=> 'not',
213
+    'LBL_CONFIRM_TITLE'					=> 'Confirm Settings',
214
+    'LBL_CONFIRM_WILL'					=> 'will',
215
+    'LBL_DBCONF_CREATE_DB'				=> 'Create Database',
216
+    'LBL_DBCONF_CREATE_USER'			=> 'Create User',
217
+    'LBL_DBCONF_DB_DROP_CREATE_WARN'	=> 'Caution: All SuiteCRM data will be erased<br>if this box is checked.',
218
+    'LBL_DBCONF_DB_DROP_CREATE'			=> 'Drop and Recreate Existing SuiteCRM tables?',
219 219
     'LBL_DBCONF_DB_DROP'                => 'Drop Tables',
220 220
     'LBL_DBCONF_DB_NAME'				=> 'Database Name',
221
-	'LBL_DBCONF_DB_PASSWORD'			=> 'SuiteCRM Database User Password',
222
-	'LBL_DBCONF_DB_PASSWORD2'			=> 'Re-enter SuiteCRM Database User Password',
223
-	'LBL_DBCONF_DB_USER'				=> 'SuiteCRM Database User',
221
+    'LBL_DBCONF_DB_PASSWORD'			=> 'SuiteCRM Database User Password',
222
+    'LBL_DBCONF_DB_PASSWORD2'			=> 'Re-enter SuiteCRM Database User Password',
223
+    'LBL_DBCONF_DB_USER'				=> 'SuiteCRM Database User',
224 224
     'LBL_DBCONF_SUGAR_DB_USER'          => 'SuiteCRM Database User',
225 225
     'LBL_DBCONF_DB_ADMIN_USER'          => 'Database Administrator Username',
226 226
     'LBL_DBCONF_DB_ADMIN_PASSWORD'      => 'Database Admin Password',
227
-	'LBL_DBCONF_DEMO_DATA'				=> 'Populate Database with Demo Data?',
227
+    'LBL_DBCONF_DEMO_DATA'				=> 'Populate Database with Demo Data?',
228 228
     'LBL_DBCONF_DEMO_DATA_TITLE'        => 'Choose Demo Data',
229
-	'LBL_DBCONF_HOST_NAME'				=> 'Host Name',
230
-	'LBL_DBCONF_HOST_INSTANCE'			=> 'Host Instance',
231
-	'LBL_DBCONF_HOST_PORT'				=> 'Port',
232
-	'LBL_DBCONF_INSTRUCTIONS'			=> 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.',
233
-	'LBL_DBCONF_MB_DEMO_DATA'			=> 'Use multi-byte text in demo data?',
229
+    'LBL_DBCONF_HOST_NAME'				=> 'Host Name',
230
+    'LBL_DBCONF_HOST_INSTANCE'			=> 'Host Instance',
231
+    'LBL_DBCONF_HOST_PORT'				=> 'Port',
232
+    'LBL_DBCONF_INSTRUCTIONS'			=> 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.',
233
+    'LBL_DBCONF_MB_DEMO_DATA'			=> 'Use multi-byte text in demo data?',
234 234
     'LBL_DBCONFIG_MSG2'                 => 'Name of web server or machine (host) on which the database is located ( such as localhost or www.mydomain.com ):',
235
-	'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name',
235
+    'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name',
236 236
     'LBL_DBCONFIG_MSG3'                 => 'Name of the database that will contain the data for the SuiteCRM instance you are about to install:',
237
-	'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name',
237
+    'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name',
238 238
     'LBL_DBCONFIG_B_MSG1'               => 'The username and password of a database administrator who can create database tables and users and who can write to the database is necessary in order to set up the SuiteCRM database.',
239
-	'LBL_DBCONFIG_B_MSG1_LABEL' => '',
239
+    'LBL_DBCONFIG_B_MSG1_LABEL' => '',
240 240
     'LBL_DBCONFIG_SECURITY'             => 'For security purposes, you can specify an exclusive database user to connect to the SuiteCRM database.  This user must be able to write, update and retrieve data on the SuiteCRM database that will be created for this instance.  This user can be the database administrator specified above, or you can provide new or existing database user information.',
241 241
     'LBL_DBCONFIG_AUTO_DD'              => 'Do it for me',
242 242
     'LBL_DBCONFIG_PROVIDE_DD'           => 'Provide existing user',
243 243
     'LBL_DBCONFIG_CREATE_DD'            => 'Define user to create',
244 244
     'LBL_DBCONFIG_SAME_DD'              => 'Same as Admin User',
245
-	//'LBL_DBCONF_I18NFIX'              => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?',
245
+    //'LBL_DBCONF_I18NFIX'              => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?',
246 246
     'LBL_FTS'                           => 'Full Text Search',
247 247
     'LBL_FTS_INSTALLED'                 => 'Installed',
248 248
     'LBL_FTS_INSTALLED_ERR1'            => 'Full Text Search capability is not installed.',
249 249
     'LBL_FTS_INSTALLED_ERR2'            => 'You can still install but will not be able to use Full Text Search functionality.  Please refer to your database server install guide on how to do this, or contact your Administrator.',
250
-	'LBL_DBCONF_PRIV_PASS'				=> 'Privileged Database User Password',
251
-	'LBL_DBCONF_PRIV_USER_2'			=> 'Database Account Above Is a Privileged User?',
252
-	'LBL_DBCONF_PRIV_USER_DIRECTIONS'	=> 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user.  This privileged database user will only be used to perform these tasks as needed during the installation process.  You may also use the same database user as above if that user has sufficient privileges.',
253
-	'LBL_DBCONF_PRIV_USER'				=> 'Privileged Database User Name',
254
-	'LBL_DBCONF_TITLE'					=> 'Database Configuration',
250
+    'LBL_DBCONF_PRIV_PASS'				=> 'Privileged Database User Password',
251
+    'LBL_DBCONF_PRIV_USER_2'			=> 'Database Account Above Is a Privileged User?',
252
+    'LBL_DBCONF_PRIV_USER_DIRECTIONS'	=> 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user.  This privileged database user will only be used to perform these tasks as needed during the installation process.  You may also use the same database user as above if that user has sufficient privileges.',
253
+    'LBL_DBCONF_PRIV_USER'				=> 'Privileged Database User Name',
254
+    'LBL_DBCONF_TITLE'					=> 'Database Configuration',
255 255
     'LBL_DBCONF_TITLE_NAME'             => 'Provide Database Name',
256 256
     'LBL_DBCONF_TITLE_USER_INFO'        => 'Provide Database User Information',
257
-	'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User',
258
-	'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password',
259
-	'LBL_DISABLED_DESCRIPTION_2'		=> 'After this change has been made, you may click the "Start" button below to begin your installation.  <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>',
260
-	'LBL_DISABLED_DESCRIPTION'			=> 'The installer has already been run once.  As a safety measure, it has been disabled from running a second time.  If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'.  The line should look like this:',
261
-	'LBL_DISABLED_HELP_1'				=> 'For installation help, please visit the SuiteCRM',
257
+    'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User',
258
+    'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password',
259
+    'LBL_DISABLED_DESCRIPTION_2'		=> 'After this change has been made, you may click the "Start" button below to begin your installation.  <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>',
260
+    'LBL_DISABLED_DESCRIPTION'			=> 'The installer has already been run once.  As a safety measure, it has been disabled from running a second time.  If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'.  The line should look like this:',
261
+    'LBL_DISABLED_HELP_1'				=> 'For installation help, please visit the SuiteCRM',
262 262
     'LBL_DISABLED_HELP_LNK'             => 'http://www.suitecrm.com/forum/index',
263
-	'LBL_DISABLED_HELP_2'				=> 'support forums',
264
-	'LBL_DISABLED_TITLE_2'				=> 'SuiteCRM Installation has been Disabled',
265
-	'LBL_DISABLED_TITLE'				=> 'SuiteCRM Installation Disabled',
266
-	'LBL_EMAIL_CHARSET_DESC'			=> 'Character Set most commonly used in your locale',
267
-	'LBL_EMAIL_CHARSET_TITLE'			=> 'Outbound Email Settings',
263
+    'LBL_DISABLED_HELP_2'				=> 'support forums',
264
+    'LBL_DISABLED_TITLE_2'				=> 'SuiteCRM Installation has been Disabled',
265
+    'LBL_DISABLED_TITLE'				=> 'SuiteCRM Installation Disabled',
266
+    'LBL_EMAIL_CHARSET_DESC'			=> 'Character Set most commonly used in your locale',
267
+    'LBL_EMAIL_CHARSET_TITLE'			=> 'Outbound Email Settings',
268 268
     'LBL_EMAIL_CHARSET_CONF'            => 'Character Set for Outbound Email ',
269
-	'LBL_HELP'							=> 'Help',
269
+    'LBL_HELP'							=> 'Help',
270 270
     'LBL_INSTALL'                       => 'Install',
271 271
     'LBL_INSTALL_TYPE_TITLE'            => 'Installation Options',
272 272
     'LBL_INSTALL_TYPE_SUBTITLE'         => 'Choose Install Type',
@@ -275,158 +275,158 @@  discard block
 block discarded – undo
275 275
     'LBL_INSTALL_TYPE_MSG1'             => 'The key is required for general application functionality, but it is not required for installation. You do not need to enter the key at this time, but you will need to provide the key after you have installed the application.',
276 276
     'LBL_INSTALL_TYPE_MSG2'             => 'Requires minimum information for the installation. Recommended for new users.',
277 277
     'LBL_INSTALL_TYPE_MSG3'             => 'Provides additional options to set during the installation. Most of these options are also available after installation in the admin screens. Recommended for advanced users.',
278
-	'LBL_LANG_1'						=> 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well.  If you would like to skip this step, click Next.',
279
-	'LBL_LANG_BUTTON_COMMIT'			=> 'Install',
280
-	'LBL_LANG_BUTTON_REMOVE'			=> 'Remove',
281
-	'LBL_LANG_BUTTON_UNINSTALL'			=> 'Uninstall',
282
-	'LBL_LANG_BUTTON_UPLOAD'			=> 'Upload',
283
-	'LBL_LANG_NO_PACKS'					=> 'none',
284
-	'LBL_LANG_PACK_INSTALLED'			=> 'The following language packs have been installed: ',
285
-	'LBL_LANG_PACK_READY'				=> 'The following language packs are ready to be installed: ',
286
-	'LBL_LANG_SUCCESS'					=> 'The language pack was successfully uploaded.',
287
-	'LBL_LANG_TITLE'			   		=> 'Language Pack',
278
+    'LBL_LANG_1'						=> 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well.  If you would like to skip this step, click Next.',
279
+    'LBL_LANG_BUTTON_COMMIT'			=> 'Install',
280
+    'LBL_LANG_BUTTON_REMOVE'			=> 'Remove',
281
+    'LBL_LANG_BUTTON_UNINSTALL'			=> 'Uninstall',
282
+    'LBL_LANG_BUTTON_UPLOAD'			=> 'Upload',
283
+    'LBL_LANG_NO_PACKS'					=> 'none',
284
+    'LBL_LANG_PACK_INSTALLED'			=> 'The following language packs have been installed: ',
285
+    'LBL_LANG_PACK_READY'				=> 'The following language packs are ready to be installed: ',
286
+    'LBL_LANG_SUCCESS'					=> 'The language pack was successfully uploaded.',
287
+    'LBL_LANG_TITLE'			   		=> 'Language Pack',
288 288
     'LBL_LAUNCHING_SILENT_INSTALL'     => 'Installing SuiteCRM now.  This may take up to a few minutes.',
289
-	'LBL_LANG_UPLOAD'					=> 'Upload a Language Pack',
290
-	'LBL_LICENSE_ACCEPTANCE'			=> 'License Acceptance',
289
+    'LBL_LANG_UPLOAD'					=> 'Upload a Language Pack',
290
+    'LBL_LICENSE_ACCEPTANCE'			=> 'License Acceptance',
291 291
     'LBL_LICENSE_CHECKING'              => 'Checking system for compatibility.',
292 292
     'LBL_LICENSE_CHKENV_HEADER'         => 'Checking Environment',
293 293
     'LBL_LICENSE_CHKDB_HEADER'          => 'Verifying DB Credentials.',
294 294
     'LBL_LICENSE_CHECK_PASSED'          => 'System passed check for compatibility.',
295
-	'LBL_CREATE_CACHE' => 'Preparing to Install...',
295
+    'LBL_CREATE_CACHE' => 'Preparing to Install...',
296 296
     'LBL_LICENSE_REDIRECT'              => 'Redirecting in ',
297
-	'LBL_LICENSE_DIRECTIONS'			=> 'If you have your license information, please enter it in the fields below.',
298
-	'LBL_LICENSE_DOWNLOAD_KEY'			=> 'Enter Download Key',
299
-	'LBL_LICENSE_EXPIRY'				=> 'Expiration Date',
300
-	'LBL_LICENSE_I_ACCEPT'				=> 'I Accept',
301
-	'LBL_LICENSE_NUM_USERS'				=> 'Number of Users',
302
-	'LBL_LICENSE_OC_DIRECTIONS'			=> 'Please enter the number of purchased offline clients.',
303
-	'LBL_LICENSE_OC_NUM'				=> 'Number of Offline Client Licenses',
304
-	'LBL_LICENSE_OC'					=> 'Offline Client Licenses',
305
-	'LBL_LICENSE_PRINTABLE'				=> ' Printable View ',
297
+    'LBL_LICENSE_DIRECTIONS'			=> 'If you have your license information, please enter it in the fields below.',
298
+    'LBL_LICENSE_DOWNLOAD_KEY'			=> 'Enter Download Key',
299
+    'LBL_LICENSE_EXPIRY'				=> 'Expiration Date',
300
+    'LBL_LICENSE_I_ACCEPT'				=> 'I Accept',
301
+    'LBL_LICENSE_NUM_USERS'				=> 'Number of Users',
302
+    'LBL_LICENSE_OC_DIRECTIONS'			=> 'Please enter the number of purchased offline clients.',
303
+    'LBL_LICENSE_OC_NUM'				=> 'Number of Offline Client Licenses',
304
+    'LBL_LICENSE_OC'					=> 'Offline Client Licenses',
305
+    'LBL_LICENSE_PRINTABLE'				=> ' Printable View ',
306 306
     'LBL_PRINT_SUMM'                    => 'Print Summary',
307
-	'LBL_LICENSE_TITLE_2'				=> 'SuiteCRM License',
308
-	'LBL_LICENSE_TITLE'					=> 'License Information',
309
-	'LBL_LICENSE_USERS'					=> 'Licensed Users',
310
-
311
-	'LBL_LOCALE_CURRENCY'				=> 'Currency Settings',
312
-	'LBL_LOCALE_CURR_DEFAULT'			=> 'Default Currency',
313
-	'LBL_LOCALE_CURR_SYMBOL'			=> 'Currency Symbol',
314
-	'LBL_LOCALE_CURR_ISO'				=> 'Currency Code (ISO 4217)',
315
-	'LBL_LOCALE_CURR_1000S'				=> '1000s Separator',
316
-	'LBL_LOCALE_CURR_DECIMAL'			=> 'Decimal Separator',
317
-	'LBL_LOCALE_CURR_EXAMPLE'			=> 'Example',
318
-	'LBL_LOCALE_CURR_SIG_DIGITS'		=> 'Significant Digits',
319
-	'LBL_LOCALE_DATEF'					=> 'Default Date Format',
320
-	'LBL_LOCALE_DESC'					=> 'The specified locale settings will be reflected globally within the SuiteCRM instance.',
321
-	'LBL_LOCALE_EXPORT'					=> 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>',
322
-	'LBL_LOCALE_EXPORT_DELIMITER'		=> 'Export (.csv) Delimiter',
323
-	'LBL_LOCALE_EXPORT_TITLE'			=> 'Import/Export Settings',
324
-	'LBL_LOCALE_LANG'					=> 'Default Language',
325
-	'LBL_LOCALE_NAMEF'					=> 'Default Name Format',
326
-	'LBL_LOCALE_NAMEF_DESC'				=> 's = salutation<br />f = first name<br />l = last name',
327
-	'LBL_LOCALE_NAME_FIRST'				=> 'David',
328
-	'LBL_LOCALE_NAME_LAST'				=> 'Livingstone',
329
-	'LBL_LOCALE_NAME_SALUTATION'		=> 'Dr.',
330
-	'LBL_LOCALE_TIMEF'					=> 'Default Time Format',
331
-	'LBL_LOCALE_TITLE'					=> 'Locale Settings',
307
+    'LBL_LICENSE_TITLE_2'				=> 'SuiteCRM License',
308
+    'LBL_LICENSE_TITLE'					=> 'License Information',
309
+    'LBL_LICENSE_USERS'					=> 'Licensed Users',
310
+
311
+    'LBL_LOCALE_CURRENCY'				=> 'Currency Settings',
312
+    'LBL_LOCALE_CURR_DEFAULT'			=> 'Default Currency',
313
+    'LBL_LOCALE_CURR_SYMBOL'			=> 'Currency Symbol',
314
+    'LBL_LOCALE_CURR_ISO'				=> 'Currency Code (ISO 4217)',
315
+    'LBL_LOCALE_CURR_1000S'				=> '1000s Separator',
316
+    'LBL_LOCALE_CURR_DECIMAL'			=> 'Decimal Separator',
317
+    'LBL_LOCALE_CURR_EXAMPLE'			=> 'Example',
318
+    'LBL_LOCALE_CURR_SIG_DIGITS'		=> 'Significant Digits',
319
+    'LBL_LOCALE_DATEF'					=> 'Default Date Format',
320
+    'LBL_LOCALE_DESC'					=> 'The specified locale settings will be reflected globally within the SuiteCRM instance.',
321
+    'LBL_LOCALE_EXPORT'					=> 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>',
322
+    'LBL_LOCALE_EXPORT_DELIMITER'		=> 'Export (.csv) Delimiter',
323
+    'LBL_LOCALE_EXPORT_TITLE'			=> 'Import/Export Settings',
324
+    'LBL_LOCALE_LANG'					=> 'Default Language',
325
+    'LBL_LOCALE_NAMEF'					=> 'Default Name Format',
326
+    'LBL_LOCALE_NAMEF_DESC'				=> 's = salutation<br />f = first name<br />l = last name',
327
+    'LBL_LOCALE_NAME_FIRST'				=> 'David',
328
+    'LBL_LOCALE_NAME_LAST'				=> 'Livingstone',
329
+    'LBL_LOCALE_NAME_SALUTATION'		=> 'Dr.',
330
+    'LBL_LOCALE_TIMEF'					=> 'Default Time Format',
331
+    'LBL_LOCALE_TITLE'					=> 'Locale Settings',
332 332
     'LBL_CUSTOMIZE_LOCALE'              => 'Customize Locale Settings',
333
-	'LBL_LOCALE_UI'						=> 'User Interface',
334
-
335
-	'LBL_ML_ACTION'						=> 'Action',
336
-	'LBL_ML_DESCRIPTION'				=> 'Description',
337
-	'LBL_ML_INSTALLED'					=> 'Date Installed',
338
-	'LBL_ML_NAME'						=> 'Name',
339
-	'LBL_ML_PUBLISHED'					=> 'Date Published',
340
-	'LBL_ML_TYPE'						=> 'Type',
341
-	'LBL_ML_UNINSTALLABLE'				=> 'Uninstallable',
342
-	'LBL_ML_VERSION'					=> 'Version',
343
-	'LBL_MSSQL'							=> 'SQL Server',
344
-	'LBL_MSSQL2'                        => 'SQL Server (FreeTDS)',
345
-	'LBL_MSSQL_SQLSRV'				    => 'SQL Server (Microsoft SQL Server Driver for PHP)',
346
-	'LBL_MYSQL'							=> 'MySQL',
333
+    'LBL_LOCALE_UI'						=> 'User Interface',
334
+
335
+    'LBL_ML_ACTION'						=> 'Action',
336
+    'LBL_ML_DESCRIPTION'				=> 'Description',
337
+    'LBL_ML_INSTALLED'					=> 'Date Installed',
338
+    'LBL_ML_NAME'						=> 'Name',
339
+    'LBL_ML_PUBLISHED'					=> 'Date Published',
340
+    'LBL_ML_TYPE'						=> 'Type',
341
+    'LBL_ML_UNINSTALLABLE'				=> 'Uninstallable',
342
+    'LBL_ML_VERSION'					=> 'Version',
343
+    'LBL_MSSQL'							=> 'SQL Server',
344
+    'LBL_MSSQL2'                        => 'SQL Server (FreeTDS)',
345
+    'LBL_MSSQL_SQLSRV'				    => 'SQL Server (Microsoft SQL Server Driver for PHP)',
346
+    'LBL_MYSQL'							=> 'MySQL',
347 347
     'LBL_MYSQLI'						=> 'MySQL (mysqli extension)',
348
-	'LBL_IBM_DB2'						=> 'IBM DB2',
349
-	'LBL_NEXT'							=> 'Next',
350
-	'LBL_NO'							=> 'No',
348
+    'LBL_IBM_DB2'						=> 'IBM DB2',
349
+    'LBL_NEXT'							=> 'Next',
350
+    'LBL_NO'							=> 'No',
351 351
     'LBL_ORACLE'						=> 'Oracle',
352
-	'LBL_PERFORM_ADMIN_PASSWORD'		=> 'Setting site admin password',
353
-	'LBL_PERFORM_AUDIT_TABLE'			=> 'audit table / ',
354
-	'LBL_PERFORM_CONFIG_PHP'			=> 'Creating SuiteCRM configuration file',
355
-	'LBL_PERFORM_CREATE_DB_1'			=> '<b>Creating the database</b> ',
356
-	'LBL_PERFORM_CREATE_DB_2'			=> ' <b>on</b> ',
357
-	'LBL_PERFORM_CREATE_DB_USER'		=> 'Creating the Database username and password...',
358
-	'LBL_PERFORM_CREATE_DEFAULT'		=> 'Creating default SuiteCRM data',
359
-	'LBL_PERFORM_CREATE_LOCALHOST'		=> 'Creating the Database username and password for localhost...',
360
-	'LBL_PERFORM_CREATE_RELATIONSHIPS'	=> 'Creating SuiteCRM relationship tables',
361
-	'LBL_PERFORM_CREATING'				=> 'creating / ',
362
-	'LBL_PERFORM_DEFAULT_REPORTS'		=> 'Creating default reports',
363
-	'LBL_PERFORM_DEFAULT_SCHEDULER'		=> 'Creating default scheduler jobs',
364
-	'LBL_PERFORM_DEFAULT_SETTINGS'		=> 'Inserting default settings',
365
-	'LBL_PERFORM_DEFAULT_USERS'			=> 'Creating default users',
366
-	'LBL_PERFORM_DEMO_DATA'				=> 'Populating the database tables with demo data (this may take a little while)',
367
-	'LBL_PERFORM_DONE'					=> 'done<br>',
368
-	'LBL_PERFORM_DROPPING'				=> 'dropping / ',
369
-	'LBL_PERFORM_FINISH'				=> 'Finish',
370
-	'LBL_PERFORM_LICENSE_SETTINGS'		=> 'Updating license information',
371
-	'LBL_PERFORM_OUTRO_1'				=> 'The setup of SuiteCRM ',
372
-	'LBL_PERFORM_OUTRO_2'				=> ' is now complete!',
373
-	'LBL_PERFORM_OUTRO_3'				=> 'Total time: ',
374
-	'LBL_PERFORM_OUTRO_4'				=> ' seconds.',
375
-	'LBL_PERFORM_OUTRO_5'				=> 'Approximate memory used: ',
376
-	'LBL_PERFORM_OUTRO_6'				=> ' bytes.',
377
-	'LBL_PERFORM_OUTRO_7'				=> 'Your system is now installed and configured for use.',
378
-	'LBL_PERFORM_REL_META'				=> 'relationship meta ... ',
379
-	'LBL_PERFORM_SUCCESS'				=> 'Success!',
380
-	'LBL_PERFORM_TABLES'				=> 'Creating SuiteCRM application tables, audit tables and relationship metadata',
381
-	'LBL_PERFORM_TITLE'					=> 'Perform Setup',
382
-	'LBL_PRINT'							=> 'Print',
383
-	'LBL_REG_CONF_1'					=> 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.',
384
-	'LBL_REG_CONF_2'					=> 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.',
385
-	'LBL_REG_CONF_3'					=> 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.',
386
-	'LBL_REG_TITLE'						=> 'Registration',
352
+    'LBL_PERFORM_ADMIN_PASSWORD'		=> 'Setting site admin password',
353
+    'LBL_PERFORM_AUDIT_TABLE'			=> 'audit table / ',
354
+    'LBL_PERFORM_CONFIG_PHP'			=> 'Creating SuiteCRM configuration file',
355
+    'LBL_PERFORM_CREATE_DB_1'			=> '<b>Creating the database</b> ',
356
+    'LBL_PERFORM_CREATE_DB_2'			=> ' <b>on</b> ',
357
+    'LBL_PERFORM_CREATE_DB_USER'		=> 'Creating the Database username and password...',
358
+    'LBL_PERFORM_CREATE_DEFAULT'		=> 'Creating default SuiteCRM data',
359
+    'LBL_PERFORM_CREATE_LOCALHOST'		=> 'Creating the Database username and password for localhost...',
360
+    'LBL_PERFORM_CREATE_RELATIONSHIPS'	=> 'Creating SuiteCRM relationship tables',
361
+    'LBL_PERFORM_CREATING'				=> 'creating / ',
362
+    'LBL_PERFORM_DEFAULT_REPORTS'		=> 'Creating default reports',
363
+    'LBL_PERFORM_DEFAULT_SCHEDULER'		=> 'Creating default scheduler jobs',
364
+    'LBL_PERFORM_DEFAULT_SETTINGS'		=> 'Inserting default settings',
365
+    'LBL_PERFORM_DEFAULT_USERS'			=> 'Creating default users',
366
+    'LBL_PERFORM_DEMO_DATA'				=> 'Populating the database tables with demo data (this may take a little while)',
367
+    'LBL_PERFORM_DONE'					=> 'done<br>',
368
+    'LBL_PERFORM_DROPPING'				=> 'dropping / ',
369
+    'LBL_PERFORM_FINISH'				=> 'Finish',
370
+    'LBL_PERFORM_LICENSE_SETTINGS'		=> 'Updating license information',
371
+    'LBL_PERFORM_OUTRO_1'				=> 'The setup of SuiteCRM ',
372
+    'LBL_PERFORM_OUTRO_2'				=> ' is now complete!',
373
+    'LBL_PERFORM_OUTRO_3'				=> 'Total time: ',
374
+    'LBL_PERFORM_OUTRO_4'				=> ' seconds.',
375
+    'LBL_PERFORM_OUTRO_5'				=> 'Approximate memory used: ',
376
+    'LBL_PERFORM_OUTRO_6'				=> ' bytes.',
377
+    'LBL_PERFORM_OUTRO_7'				=> 'Your system is now installed and configured for use.',
378
+    'LBL_PERFORM_REL_META'				=> 'relationship meta ... ',
379
+    'LBL_PERFORM_SUCCESS'				=> 'Success!',
380
+    'LBL_PERFORM_TABLES'				=> 'Creating SuiteCRM application tables, audit tables and relationship metadata',
381
+    'LBL_PERFORM_TITLE'					=> 'Perform Setup',
382
+    'LBL_PRINT'							=> 'Print',
383
+    'LBL_REG_CONF_1'					=> 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.',
384
+    'LBL_REG_CONF_2'					=> 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.',
385
+    'LBL_REG_CONF_3'					=> 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.',
386
+    'LBL_REG_TITLE'						=> 'Registration',
387 387
     'LBL_REG_NO_THANKS'                 => 'No Thanks',
388 388
     'LBL_REG_SKIP_THIS_STEP'            => 'Skip this Step',
389
-	'LBL_REQUIRED'						=> '* Required field',
389
+    'LBL_REQUIRED'						=> '* Required field',
390 390
 
391 391
     'LBL_SITECFG_ADMIN_Name'            => 'SuiteCRM Application Admin Name',
392
-	'LBL_SITECFG_ADMIN_PASS_2'			=> 'Re-enter SuiteCRM Admin User Password',
393
-	'LBL_SITECFG_ADMIN_PASS_WARN'		=> 'Caution: This will override the admin password of any previous installation.',
394
-	'LBL_SITECFG_ADMIN_PASS'			=> 'SuiteCRM Admin User Password',
395
-	'LBL_SITECFG_APP_ID'				=> 'Application ID',
396
-	'LBL_SITECFG_CUSTOM_ID_DIRECTIONS'	=> 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances.  If you have a cluster of SuiteCRM installations, they all must share the same application ID.',
397
-	'LBL_SITECFG_CUSTOM_ID'				=> 'Provide Your Own Application ID',
398
-	'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS'	=> 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.',
399
-	'LBL_SITECFG_CUSTOM_LOG'			=> 'Use a Custom Log Directory',
400
-	'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS'	=> 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.',
401
-	'LBL_SITECFG_CUSTOM_SESSION'		=> 'Use a Custom Session Directory for SuiteCRM',
402
-	'LBL_SITECFG_DIRECTIONS'			=> 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.',
403
-	'LBL_SITECFG_FIX_ERRORS'			=> '<b>Please fix the following errors before proceeding:</b>',
404
-	'LBL_SITECFG_LOG_DIR'				=> 'Log Directory',
405
-	'LBL_SITECFG_SESSION_PATH'			=> 'Path to Session Directory<br>(must be writable)',
406
-	'LBL_SITECFG_SITE_SECURITY'			=> 'Select Security Options',
407
-	'LBL_SITECFG_SUGAR_UP_DIRECTIONS'	=> 'If selected, the system will periodically check for updated versions of the application.',
408
-	'LBL_SITECFG_SUGAR_UP'				=> 'Automatically Check For Updates?',
409
-	'LBL_SITECFG_SUGAR_UPDATES'			=> 'SuiteCRM Updates Config',
410
-	'LBL_SITECFG_TITLE'					=> 'Site Configuration',
392
+    'LBL_SITECFG_ADMIN_PASS_2'			=> 'Re-enter SuiteCRM Admin User Password',
393
+    'LBL_SITECFG_ADMIN_PASS_WARN'		=> 'Caution: This will override the admin password of any previous installation.',
394
+    'LBL_SITECFG_ADMIN_PASS'			=> 'SuiteCRM Admin User Password',
395
+    'LBL_SITECFG_APP_ID'				=> 'Application ID',
396
+    'LBL_SITECFG_CUSTOM_ID_DIRECTIONS'	=> 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances.  If you have a cluster of SuiteCRM installations, they all must share the same application ID.',
397
+    'LBL_SITECFG_CUSTOM_ID'				=> 'Provide Your Own Application ID',
398
+    'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS'	=> 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.',
399
+    'LBL_SITECFG_CUSTOM_LOG'			=> 'Use a Custom Log Directory',
400
+    'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS'	=> 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.',
401
+    'LBL_SITECFG_CUSTOM_SESSION'		=> 'Use a Custom Session Directory for SuiteCRM',
402
+    'LBL_SITECFG_DIRECTIONS'			=> 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.',
403
+    'LBL_SITECFG_FIX_ERRORS'			=> '<b>Please fix the following errors before proceeding:</b>',
404
+    'LBL_SITECFG_LOG_DIR'				=> 'Log Directory',
405
+    'LBL_SITECFG_SESSION_PATH'			=> 'Path to Session Directory<br>(must be writable)',
406
+    'LBL_SITECFG_SITE_SECURITY'			=> 'Select Security Options',
407
+    'LBL_SITECFG_SUGAR_UP_DIRECTIONS'	=> 'If selected, the system will periodically check for updated versions of the application.',
408
+    'LBL_SITECFG_SUGAR_UP'				=> 'Automatically Check For Updates?',
409
+    'LBL_SITECFG_SUGAR_UPDATES'			=> 'SuiteCRM Updates Config',
410
+    'LBL_SITECFG_TITLE'					=> 'Site Configuration',
411 411
     'LBL_SITECFG_TITLE2'                => 'Identify Administration User',
412 412
     'LBL_SITECFG_SECURITY_TITLE'        => 'Site Security',
413
-	'LBL_SITECFG_URL'					=> 'URL of SuiteCRM Instance',
414
-	'LBL_SITECFG_USE_DEFAULTS'			=> 'Use Defaults?',
415
-	'LBL_SITECFG_ANONSTATS'             => 'Send Anonymous Usage Statistics?',
416
-	'LBL_SITECFG_ANONSTATS_DIRECTIONS'  => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.',
413
+    'LBL_SITECFG_URL'					=> 'URL of SuiteCRM Instance',
414
+    'LBL_SITECFG_USE_DEFAULTS'			=> 'Use Defaults?',
415
+    'LBL_SITECFG_ANONSTATS'             => 'Send Anonymous Usage Statistics?',
416
+    'LBL_SITECFG_ANONSTATS_DIRECTIONS'  => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.',
417 417
     'LBL_SITECFG_URL_MSG'               => 'Enter the URL that will be used to access the SuiteCRM instance after installation. The URL will also be used as a base for the URLs in the SuiteCRM application pages. The URL should include the web server or machine name or IP address.',
418 418
     'LBL_SITECFG_SYS_NAME_MSG'          => 'Enter a name for your system.  This name will be displayed in the browser title bar when users visit the SuiteCRM application.',
419 419
     'LBL_SITECFG_PASSWORD_MSG'          => 'After installation, you will need to use the SuiteCRM admin user (default username = admin) to log in to the SuiteCRM instance.  Enter a password for this administrator user. This password can be changed after the initial login.  You may also enter another admin username to use besides the default value provided.',
420 420
     'LBL_SITECFG_COLLATION_MSG'         => 'Select collation (sorting) settings for your system. This settings will create the tables with the specific language you use. In case your language doesn\'t require special settings please use default value.',
421 421
     'LBL_SPRITE_SUPPORT'                => 'Sprite Support',
422
-	'LBL_SYSTEM_CREDS'                  => 'System Credentials',
422
+    'LBL_SYSTEM_CREDS'                  => 'System Credentials',
423 423
     'LBL_SYSTEM_ENV'                    => 'System Environment',
424
-	'LBL_START'							=> 'Start',
424
+    'LBL_START'							=> 'Start',
425 425
     'LBL_SHOW_PASS'                     => 'Show Passwords',
426 426
     'LBL_HIDE_PASS'                     => 'Hide Passwords',
427 427
     'LBL_HIDDEN'                        => '<i>(hidden)</i>',
428
-	'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements',
429
-	'LBL_STEP2' => 'Step 2 of 2 - Configuration',
428
+    'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements',
429
+    'LBL_STEP2' => 'Step 2 of 2 - Configuration',
430 430
 //    'LBL_STEP1'                         => 'Step 1 of 8 - Pre-Installation requirements',
431 431
 //    'LBL_STEP2'                         => 'Step 2 of 8 - License Agreement',
432 432
 //    'LBL_STEP3'                         => 'Step 3 of 8 - Installation Type',
@@ -436,11 +436,11 @@  discard block
 block discarded – undo
436 436
 //    'LBL_STEP7'                         => 'Step 7 of 8 - Confirm Settings',
437 437
 //    'LBL_STEP8'                         => 'Step 8 of 8 - Installation Successful',
438 438
 //	'LBL_NO_THANKS'						=> 'Continue to installer',
439
-	'LBL_CHOOSE_LANG'					=> '<b>Choose your language</b>',
440
-	'LBL_STEP'							=> 'Step',
441
-	'LBL_TITLE_WELCOME'					=> 'Welcome to the SuiteCRM ',
442
-	'LBL_WELCOME_1'						=> 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.',
443
-	'LBL_WELCOME_2'						=> 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>.  <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.',
439
+    'LBL_CHOOSE_LANG'					=> '<b>Choose your language</b>',
440
+    'LBL_STEP'							=> 'Step',
441
+    'LBL_TITLE_WELCOME'					=> 'Welcome to the SuiteCRM ',
442
+    'LBL_WELCOME_1'						=> 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.',
443
+    'LBL_WELCOME_2'						=> 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>.  <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.',
444 444
     //welcome page variables
445 445
     'LBL_TITLE_ARE_YOU_READY'            => 'Are you ready to install?',
446 446
     'REQUIRED_SYS_COMP' => 'Required System Components',
@@ -523,20 +523,20 @@  discard block
 block discarded – undo
523 523
                                 ',
524 524
     'LBL_WELCOME_PLEASE_READ_BELOW' => 'Please read the following important information before proceeding with the installation.  The information will help you determine whether or not you are ready to install the application at this time.',
525 525
 
526
-	'LBL_WELCOME_CHOOSE_LANGUAGE'		=> '<b>Choose your language</b>',
527
-	'LBL_WELCOME_SETUP_WIZARD'			=> 'Setup Wizard',
528
-	'LBL_WELCOME_TITLE_WELCOME'			=> 'Welcome to the SuiteCRM ',
529
-	'LBL_WELCOME_TITLE'					=> 'SuiteCRM Setup Wizard',
530
-	'LBL_WIZARD_TITLE'					=> 'SuiteCRM Setup Wizard: ',
531
-	'LBL_YES'							=> 'Yes',
526
+    'LBL_WELCOME_CHOOSE_LANGUAGE'		=> '<b>Choose your language</b>',
527
+    'LBL_WELCOME_SETUP_WIZARD'			=> 'Setup Wizard',
528
+    'LBL_WELCOME_TITLE_WELCOME'			=> 'Welcome to the SuiteCRM ',
529
+    'LBL_WELCOME_TITLE'					=> 'SuiteCRM Setup Wizard',
530
+    'LBL_WIZARD_TITLE'					=> 'SuiteCRM Setup Wizard: ',
531
+    'LBL_YES'							=> 'Yes',
532 532
     'LBL_YES_MULTI'                     => 'Yes - Multibyte',
533
-	// OOTB Scheduler Job Names:
534
-	'LBL_OOTB_WORKFLOW'		=> 'Process Workflow Tasks',
535
-	'LBL_OOTB_REPORTS'		=> 'Run Report Generation Scheduled Tasks',
536
-	'LBL_OOTB_IE'			=> 'Check Inbound Mailboxes',
537
-	'LBL_OOTB_BOUNCE'		=> 'Run Nightly Process Bounced Campaign Emails',
533
+    // OOTB Scheduler Job Names:
534
+    'LBL_OOTB_WORKFLOW'		=> 'Process Workflow Tasks',
535
+    'LBL_OOTB_REPORTS'		=> 'Run Report Generation Scheduled Tasks',
536
+    'LBL_OOTB_IE'			=> 'Check Inbound Mailboxes',
537
+    'LBL_OOTB_BOUNCE'		=> 'Run Nightly Process Bounced Campaign Emails',
538 538
     'LBL_OOTB_CAMPAIGN'		=> 'Run Nightly Mass Email Campaigns',
539
-	'LBL_OOTB_PRUNE'		=> 'Prune Database on 1st of Month',
539
+    'LBL_OOTB_PRUNE'		=> 'Prune Database on 1st of Month',
540 540
     'LBL_OOTB_TRACKER'		=> 'Prune tracker tables',
541 541
     'LBL_OOTB_SUGARFEEDS'   => 'Prune SuiteCRM Feed Tables',
542 542
     'LBL_OOTB_SEND_EMAIL_REMINDERS'	=> 'Run Email Reminder Notifications',
@@ -550,19 +550,19 @@  discard block
 block discarded – undo
550 550
     'LBL_PATCH_1'           => 'If you would like to skip this step, click Next.',
551 551
     'LBL_PATCH_TITLE'       => 'System Patch',
552 552
     'LBL_PATCH_READY'       => 'The following patch(es) are ready to be installed:',
553
-	'LBL_SESSION_ERR_DESCRIPTION'		=> "SuiteCRM relies upon PHP sessions to store important information while connected to this web server.  Your PHP installation does not have the Session information correctly configured.
553
+    'LBL_SESSION_ERR_DESCRIPTION'		=> "SuiteCRM relies upon PHP sessions to store important information while connected to this web server.  Your PHP installation does not have the Session information correctly configured.
554 554
 											<br><br>A common misconfiguration is that the <b>'session.save_path'</b> directive is not pointing to a valid directory.  <br>
555 555
 											<br> Please correct your <a target=_new href='http://us2.php.net/manual/en/ref.session.php'>PHP configuration</a> in the php.ini file located here below.",
556
-	'LBL_SESSION_ERR_TITLE'				=> 'PHP Sessions Configuration Error',
557
-	'LBL_SYSTEM_NAME'=>'System Name',
556
+    'LBL_SESSION_ERR_TITLE'				=> 'PHP Sessions Configuration Error',
557
+    'LBL_SYSTEM_NAME'=>'System Name',
558 558
     'LBL_COLLATION' => 'Collation Settings',
559
-	'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.',
560
-	'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer',
561
-	'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.',
562
-	'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.',
563
-	'LBL_YOUR_PHP_VERSION' => '(Your current php version is ',
564
-	'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)',
565
-	'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further',
559
+    'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.',
560
+    'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer',
561
+    'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.',
562
+    'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.',
563
+    'LBL_YOUR_PHP_VERSION' => '(Your current php version is ',
564
+    'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)',
565
+    'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further',
566 566
     'LBL_STREAM' => 'PHP allows to use stream',
567 567
 
568 568
     'advanced_password_new_account_email' => array(
@@ -594,91 +594,91 @@  discard block
 block discarded – undo
594 594
         'name' => 'Forgot Password email',
595 595
         ),
596 596
 
597
-	// SMTP settings
598
-
599
-	'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.',
600
-	'LBL_CHOOSE_EMAIL_PROVIDER'        => 'Choose your Email provider:',
601
-
602
-	'LBL_SMTPTYPE_GMAIL'                    => 'Gmail',
603
-	'LBL_SMTPTYPE_YAHOO'                    => 'Yahoo! Mail',
604
-	'LBL_SMTPTYPE_EXCHANGE'                 => 'Microsoft Exchange',
605
-	'LBL_SMTPTYPE_OTHER'                  => 'Other',
606
-	'LBL_MAIL_SMTP_SETTINGS'           => 'SMTP Server Specification',
607
-	'LBL_MAIL_SMTPSERVER'				=> 'SMTP Server:',
608
-	'LBL_MAIL_SMTPPORT'					=> 'SMTP Port:',
609
-	'LBL_MAIL_SMTPAUTH_REQ'				=> 'Use SMTP Authentication?',
610
-	'LBL_EMAIL_SMTP_SSL_OR_TLS'         => 'Enable SMTP over SSL or TLS?',
611
-	'LBL_GMAIL_SMTPUSER'					=> 'Gmail Email Address:',
612
-	'LBL_GMAIL_SMTPPASS'					=> 'Gmail Password:',
613
-	'LBL_ALLOW_DEFAULT_SELECTION'           => 'Allow users to use this account for outgoing email:',
614
-	'LBL_ALLOW_DEFAULT_SELECTION_HELP'          => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts.  If the option is not selected, users can still use the outgoing mail server after providing their own account information.',
615
-
616
-	'LBL_YAHOOMAIL_SMTPPASS'					=> 'Yahoo! Mail Password:',
617
-	'LBL_YAHOOMAIL_SMTPUSER'					=> 'Yahoo! Mail ID:',
618
-
619
-	'LBL_EXCHANGE_SMTPPASS'					=> 'Exchange Password:',
620
-	'LBL_EXCHANGE_SMTPUSER'					=> 'Exchange Username:',
621
-	'LBL_EXCHANGE_SMTPPORT'					=> 'Exchange Server Port:',
622
-	'LBL_EXCHANGE_SMTPSERVER'				=> 'Exchange Server:',
623
-
624
-
625
-	'LBL_MAIL_SMTPUSER'					=> 'SMTP Username:',
626
-	'LBL_MAIL_SMTPPASS'					=> 'SMTP Password:',
627
-
628
-	// Branding
629
-
630
-	'LBL_WIZARD_SYSTEM_TITLE' => 'Branding',
631
-	'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.',
632
-	'SYSTEM_NAME_WIZARD'=>'Name:',
633
-	'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.',
634
-	'NEW_LOGO'=>'Select Logo:',
635
-	'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.',
636
-	'COMPANY_LOGO_UPLOAD_BTN' => 'Upload',
637
-	'CURRENT_LOGO'=>'Current Logo:',
597
+    // SMTP settings
598
+
599
+    'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.',
600
+    'LBL_CHOOSE_EMAIL_PROVIDER'        => 'Choose your Email provider:',
601
+
602
+    'LBL_SMTPTYPE_GMAIL'                    => 'Gmail',
603
+    'LBL_SMTPTYPE_YAHOO'                    => 'Yahoo! Mail',
604
+    'LBL_SMTPTYPE_EXCHANGE'                 => 'Microsoft Exchange',
605
+    'LBL_SMTPTYPE_OTHER'                  => 'Other',
606
+    'LBL_MAIL_SMTP_SETTINGS'           => 'SMTP Server Specification',
607
+    'LBL_MAIL_SMTPSERVER'				=> 'SMTP Server:',
608
+    'LBL_MAIL_SMTPPORT'					=> 'SMTP Port:',
609
+    'LBL_MAIL_SMTPAUTH_REQ'				=> 'Use SMTP Authentication?',
610
+    'LBL_EMAIL_SMTP_SSL_OR_TLS'         => 'Enable SMTP over SSL or TLS?',
611
+    'LBL_GMAIL_SMTPUSER'					=> 'Gmail Email Address:',
612
+    'LBL_GMAIL_SMTPPASS'					=> 'Gmail Password:',
613
+    'LBL_ALLOW_DEFAULT_SELECTION'           => 'Allow users to use this account for outgoing email:',
614
+    'LBL_ALLOW_DEFAULT_SELECTION_HELP'          => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts.  If the option is not selected, users can still use the outgoing mail server after providing their own account information.',
615
+
616
+    'LBL_YAHOOMAIL_SMTPPASS'					=> 'Yahoo! Mail Password:',
617
+    'LBL_YAHOOMAIL_SMTPUSER'					=> 'Yahoo! Mail ID:',
618
+
619
+    'LBL_EXCHANGE_SMTPPASS'					=> 'Exchange Password:',
620
+    'LBL_EXCHANGE_SMTPUSER'					=> 'Exchange Username:',
621
+    'LBL_EXCHANGE_SMTPPORT'					=> 'Exchange Server Port:',
622
+    'LBL_EXCHANGE_SMTPSERVER'				=> 'Exchange Server:',
623
+
624
+
625
+    'LBL_MAIL_SMTPUSER'					=> 'SMTP Username:',
626
+    'LBL_MAIL_SMTPPASS'					=> 'SMTP Password:',
627
+
628
+    // Branding
629
+
630
+    'LBL_WIZARD_SYSTEM_TITLE' => 'Branding',
631
+    'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.',
632
+    'SYSTEM_NAME_WIZARD'=>'Name:',
633
+    'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.',
634
+    'NEW_LOGO'=>'Select Logo:',
635
+    'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.',
636
+    'COMPANY_LOGO_UPLOAD_BTN' => 'Upload',
637
+    'CURRENT_LOGO'=>'Current Logo:',
638 638
     'CURRENT_LOGO_HELP'=>'This logo is displayed in the left-hand corner of the footer of the SuiteCRM application.',
639 639
 
640
-	// System Local Settings
641
-
642
-
643
-	'LBL_LOCALE_TITLE' => 'System Locale Settings',
644
-	'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.',
645
-	'LBL_DATE_FORMAT' => 'Date Format:',
646
-	'LBL_TIME_FORMAT' => 'Time Format:',
647
-		'LBL_TIMEZONE' => 'Time Zone:',
648
-	'LBL_LANGUAGE'=>'Language:',
649
-	'LBL_CURRENCY'=>'Currency:',
650
-	'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:',
651
-	'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:',
652
-	'LBL_NUMBER_GROUPING_SEP' => '1000s separator:',
653
-	'LBL_DECIMAL_SEP' => 'Decimal symbol:',
654
-	'LBL_NAME_FORMAT' => 'Name Format:',
655
-	'UPLOAD_LOGO' => 'Please wait, logo uploading..',
656
-	'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.',
657
-	'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.',
658
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.',
659
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.',
660
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.',
661
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.',
662
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.',
663
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.',
664
-	'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.',
665
-
666
-	'LBL_INSTALL_PROCESS' => 'Install...',
667
-
668
-	'LBL_EMAIL_ADDRESS' => 'Email Address:',
669
-	'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.',
670
-	'ERR_SITE_URL' => 'Site URL is required.',
671
-
672
-	'STAT_CONFIGURATION' => 'Configuration relationships...',
673
-	'STAT_CREATE_DB' => 'Create database...',
674
-	//'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)',
675
-	'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...',
676
-	'STAT_INSTALL_FINISH' => 'Install finish...',
677
-	'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>',
678
-	'LBL_LICENCE_TOOLTIP' => 'Please accept license first',
679
-
680
-	'LBL_MORE_OPTIONS_TITLE' => 'More options',
681
-	'LBL_START' => '',
640
+    // System Local Settings
641
+
642
+
643
+    'LBL_LOCALE_TITLE' => 'System Locale Settings',
644
+    'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.',
645
+    'LBL_DATE_FORMAT' => 'Date Format:',
646
+    'LBL_TIME_FORMAT' => 'Time Format:',
647
+        'LBL_TIMEZONE' => 'Time Zone:',
648
+    'LBL_LANGUAGE'=>'Language:',
649
+    'LBL_CURRENCY'=>'Currency:',
650
+    'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:',
651
+    'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:',
652
+    'LBL_NUMBER_GROUPING_SEP' => '1000s separator:',
653
+    'LBL_DECIMAL_SEP' => 'Decimal symbol:',
654
+    'LBL_NAME_FORMAT' => 'Name Format:',
655
+    'UPLOAD_LOGO' => 'Please wait, logo uploading..',
656
+    'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.',
657
+    'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.',
658
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.',
659
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.',
660
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.',
661
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.',
662
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.',
663
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.',
664
+    'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.',
665
+
666
+    'LBL_INSTALL_PROCESS' => 'Install...',
667
+
668
+    'LBL_EMAIL_ADDRESS' => 'Email Address:',
669
+    'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.',
670
+    'ERR_SITE_URL' => 'Site URL is required.',
671
+
672
+    'STAT_CONFIGURATION' => 'Configuration relationships...',
673
+    'STAT_CREATE_DB' => 'Create database...',
674
+    //'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)',
675
+    'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...',
676
+    'STAT_INSTALL_FINISH' => 'Install finish...',
677
+    'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>',
678
+    'LBL_LICENCE_TOOLTIP' => 'Please accept license first',
679
+
680
+    'LBL_MORE_OPTIONS_TITLE' => 'More options',
681
+    'LBL_START' => '',
682 682
 
683 683
 
684 684
 );
Please login to merge, or discard this patch.