Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/Home/Dashlets/ChartsDashlet/ChartsDashlet.php 2 patches
Spacing   +18 added lines, -18 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.
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
 
65 65
         $this->searchFields = array();
66 66
         $this->isConfigurable = true; // dashlet is configurable
67
-        $this->hasScript = true;  // dashlet has javascript attached to it
67
+        $this->hasScript = true; // dashlet has javascript attached to it
68 68
     }
69 69
 
70 70
     /**
71 71
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
72 72
      */
73
-    function ChartsDashlet($id, $report_id, $def){
73
+    function ChartsDashlet($id, $report_id, $def) {
74 74
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
75
-        if(isset($GLOBALS['log'])) {
75
+        if (isset($GLOBALS['log'])) {
76 76
             $GLOBALS['log']->deprecated($deprecatedMessage);
77 77
         }
78 78
         else {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$chartReport = new SavedReport();
96 96
 		$chartExists = $chartReport->retrieve($this->report_id, false);
97 97
 
98
-		if (!is_null($chartExists)){
98
+		if (!is_null($chartExists)) {
99 99
 			$title = getReportNameTranslation($chartReport->name);
100 100
 	        $this->title = $title;
101 101
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 			$xmlFile = get_cache_file_name($reporter);
116 116
 
117
-			$html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />"; // return parent::display for title and such
117
+			$html = parent::display()."<div align='center'>".$str."</div>"."<br />"; // return parent::display for title and such
118 118
 
119 119
 			$ss = new Sugar_Smarty();
120 120
 	        $ss->assign('chartName', $this->id);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	        $script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
123 123
 			$json = getJSONobj();
124 124
 
125
-	        return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />"; // return parent::display for title and such
125
+	        return parent::display()."<div align='center'>".$str."</div>"."<br />"; // return parent::display for title and such
126 126
 		}
127 127
     }
128 128
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$chartReport = new SavedReport();
139 139
 		$chartExists = $chartReport->retrieve($this->report_id, false);
140 140
 
141
-		if (!is_null($chartExists)){
141
+		if (!is_null($chartExists)) {
142 142
 	        $this->title = $chartReport->name;
143 143
 
144 144
 			require_once("modules/Reports/templates/templates_chart.php");
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			$reporter->saved_report_id = $chartReport->id;
153 153
 			$xmlFile = get_cache_file_name($reporter);
154 154
 
155
-	        $str = $sugarChart->getDashletScript($this->id,$xmlFile);
155
+	        $str = $sugarChart->getDashletScript($this->id, $xmlFile);
156 156
 	        return $str;
157 157
 		}
158 158
     }
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
     function saveOptions($req) {
175 175
     }
176 176
 
177
-    function setConfigureIcon(){
177
+    function setConfigureIcon() {
178 178
 
179 179
 
180
-        if($this->isConfigurable)
181
-            $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet"><a href="index.php?module=Reports&record=' . $this->report_id . '&action=ReportCriteriaResults&page=report">'
182
-                               . SugarThemeRegistry::current()->getImage('dashlet-header-edit','title="' . translate('LBL_DASHLET_EDIT', 'Home') . '" border="0"  align="absmiddle"', null,null,'.gif',translate('LBL_DASHLET_EDIT', 'Home')).'</a>'
180
+        if ($this->isConfigurable)
181
+            $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet"><a href="index.php?module=Reports&record='.$this->report_id.'&action=ReportCriteriaResults&page=report">'
182
+                               . SugarThemeRegistry::current()->getImage('dashlet-header-edit', 'title="'.translate('LBL_DASHLET_EDIT', 'Home').'" border="0"  align="absmiddle"', null, null, '.gif', translate('LBL_DASHLET_EDIT', 'Home')).'</a>'
183 183
 
184 184
                                . '';
185 185
         else
@@ -188,21 +188,21 @@  discard block
 block discarded – undo
188 188
     	return $additionalTitle;
189 189
     }
190 190
 
191
-   function setRefreshIcon(){
191
+   function setRefreshIcon() {
192 192
 
193 193
 
194 194
     	$additionalTitle = '';
195
-        if($this->isRefreshable)
195
+        if ($this->isRefreshable)
196 196
             $additionalTitle .= '<a href="#" onclick="SUGAR.mySugar.retrieveDashlet(\''
197
-                                . $this->id . '\', \'chart\'); return false;"><!--not_in_theme!-->'
197
+                                . $this->id.'\', \'chart\'); return false;"><!--not_in_theme!-->'
198 198
                                 . SugarThemeRegistry::current()->getImage(
199 199
                     'dashlet-header-refresh',
200
-                    'border="0" align="absmiddle" title="'. translate('LBL_DASHLET_REFRESH', 'Home') . '"',
200
+                    'border="0" align="absmiddle" title="'.translate('LBL_DASHLET_REFRESH', 'Home').'"',
201 201
                     null,
202 202
                     null,
203 203
                     '.gif',
204 204
                     translate('LBL_DASHLET_REFRESH', 'Home')
205
-                ) .'</a>';
205
+                ).'</a>';
206 206
         return $additionalTitle;
207 207
     }
208 208
 }
Please login to merge, or discard this patch.
Braces   +12 added lines, -9 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.
@@ -74,8 +76,7 @@  discard block
 block discarded – undo
74 76
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
75 77
         if(isset($GLOBALS['log'])) {
76 78
             $GLOBALS['log']->deprecated($deprecatedMessage);
77
-        }
78
-        else {
79
+        } else {
79 80
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
80 81
         }
81 82
         self::__construct($id, $report_id, $def);
@@ -177,13 +178,14 @@  discard block
 block discarded – undo
177 178
     function setConfigureIcon(){
178 179
 
179 180
 
180
-        if($this->isConfigurable)
181
-            $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet"><a href="index.php?module=Reports&record=' . $this->report_id . '&action=ReportCriteriaResults&page=report">'
181
+        if($this->isConfigurable) {
182
+                    $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet"><a href="index.php?module=Reports&record=' . $this->report_id . '&action=ReportCriteriaResults&page=report">'
182 183
                                . SugarThemeRegistry::current()->getImage('dashlet-header-edit','title="' . translate('LBL_DASHLET_EDIT', 'Home') . '" border="0"  align="absmiddle"', null,null,'.gif',translate('LBL_DASHLET_EDIT', 'Home')).'</a>'
183 184
 
184 185
                                . '';
185
-        else
186
-            $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet">';
186
+        } else {
187
+                    $additionalTitle = '<td nowrap width="1%" style="padding-right: 0px;"><div class="dashletToolSet">';
188
+        }
187 189
 
188 190
     	return $additionalTitle;
189 191
     }
@@ -192,8 +194,8 @@  discard block
 block discarded – undo
192 194
 
193 195
 
194 196
     	$additionalTitle = '';
195
-        if($this->isRefreshable)
196
-            $additionalTitle .= '<a href="#" onclick="SUGAR.mySugar.retrieveDashlet(\''
197
+        if($this->isRefreshable) {
198
+                    $additionalTitle .= '<a href="#" onclick="SUGAR.mySugar.retrieveDashlet(\''
197 199
                                 . $this->id . '\', \'chart\'); return false;"><!--not_in_theme!-->'
198 200
                                 . SugarThemeRegistry::current()->getImage(
199 201
                     'dashlet-header-refresh',
@@ -203,6 +205,7 @@  discard block
 block discarded – undo
203 205
                     '.gif',
204 206
                     translate('LBL_DASHLET_REFRESH', 'Home')
205 207
                 ) .'</a>';
208
+        }
206 209
         return $additionalTitle;
207 210
     }
208 211
 }
Please login to merge, or discard this patch.
modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.php 2 patches
Spacing   +16 added lines, -16 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.
@@ -56,30 +56,30 @@  discard block
 block discarded – undo
56 56
     function __construct($id, $def) {
57 57
         $this->loadLanguage('JotPadDashlet'); // load the language strings here
58 58
 
59
-        if(!empty($def['savedText']))  // load default text is none is defined
59
+        if (!empty($def['savedText']))  // load default text is none is defined
60 60
             $this->savedText = $def['savedText'];
61 61
         else
62 62
             $this->savedText = $this->dashletStrings['LBL_DEFAULT_TEXT'];
63 63
 
64
-        if(!empty($def['height'])) // set a default height if none is set
64
+        if (!empty($def['height'])) // set a default height if none is set
65 65
             $this->height = $def['height'];
66 66
 
67 67
         parent::__construct($id); // call parent constructor
68 68
 
69 69
         $this->isConfigurable = true; // dashlet is configurable
70
-        $this->hasScript = true;  // dashlet has javascript attached to it
70
+        $this->hasScript = true; // dashlet has javascript attached to it
71 71
 
72 72
         // if no custom title, use default
73
-        if(empty($def['title'])) $this->title = $this->dashletStrings['LBL_TITLE'];
73
+        if (empty($def['title'])) $this->title = $this->dashletStrings['LBL_TITLE'];
74 74
         else $this->title = $def['title'];
75 75
     }
76 76
 
77 77
     /**
78 78
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
79 79
      */
80
-    function JotPadDashlet($id, $def){
80
+    function JotPadDashlet($id, $def) {
81 81
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
82
-        if(isset($GLOBALS['log'])) {
82
+        if (isset($GLOBALS['log'])) {
83 83
             $GLOBALS['log']->deprecated($deprecatedMessage);
84 84
         }
85 85
         else {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $ss->assign('height', $this->height);
104 104
 
105 105
         $str = $ss->fetch('modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.tpl');
106
-        return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str . '<br />'; // return parent::display for title and such
106
+        return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']).$str.'<br />'; // return parent::display for title and such
107 107
     }
108 108
 
109 109
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $ss->assign('height', $this->height);
139 139
         $ss->assign('id', $this->id);
140 140
 
141
-        return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl');
141
+        return parent::displayOptions().$ss->fetch('modules/Home/Dashlets/JotPadDashlet/JotPadDashletOptions.tpl');
142 142
     }
143 143
 
144 144
     /**
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
         global $sugar_config, $timedate, $current_user, $theme;
152 152
         $options = array();
153 153
         $options['title'] = $_REQUEST['title'];
154
-        if(is_numeric($_REQUEST['height'])) {
155
-            if($_REQUEST['height'] > 0 && $_REQUEST['height'] <= 300) $options['height'] = $_REQUEST['height'];
156
-            elseif($_REQUEST['height'] > 300) $options['height'] = '300';
154
+        if (is_numeric($_REQUEST['height'])) {
155
+            if ($_REQUEST['height'] > 0 && $_REQUEST['height'] <= 300) $options['height'] = $_REQUEST['height'];
156
+            elseif ($_REQUEST['height'] > 300) $options['height'] = '300';
157 157
             else $options['height'] = '100';
158 158
         }
159 159
 
@@ -167,17 +167,17 @@  discard block
 block discarded – undo
167 167
      */
168 168
     function saveText() {
169 169
         $json = getJSONobj();
170
-    	if(isset($_REQUEST['savedText'])) {
170
+    	if (isset($_REQUEST['savedText'])) {
171 171
             $optionsArray = $this->loadOptions();
172
-            $optionsArray['savedText']=$json->decode(html_entity_decode($_REQUEST['savedText']));
173
-            $optionsArray['savedText']=SugarCleaner::cleanHtml(nl2br($optionsArray['savedText']));
172
+            $optionsArray['savedText'] = $json->decode(html_entity_decode($_REQUEST['savedText']));
173
+            $optionsArray['savedText'] = SugarCleaner::cleanHtml(nl2br($optionsArray['savedText']));
174 174
             $this->storeOptions($optionsArray);
175 175
 
176 176
         }
177 177
         else {
178 178
             $optionsArray['savedText'] = '';
179 179
         }
180
-        echo 'result = ' . $json->encode(array('id' => $_REQUEST['id'],
180
+        echo 'result = '.$json->encode(array('id' => $_REQUEST['id'],
181 181
                                        'savedText' => $optionsArray['savedText']));
182 182
     }
183 183
 }
Please login to merge, or discard this patch.
Braces   +25 added lines, -14 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.
@@ -56,13 +58,17 @@  discard block
 block discarded – undo
56 58
     function __construct($id, $def) {
57 59
         $this->loadLanguage('JotPadDashlet'); // load the language strings here
58 60
 
59
-        if(!empty($def['savedText']))  // load default text is none is defined
61
+        if(!empty($def['savedText'])) {
62
+            // load default text is none is defined
60 63
             $this->savedText = $def['savedText'];
61
-        else
62
-            $this->savedText = $this->dashletStrings['LBL_DEFAULT_TEXT'];
64
+        } else {
65
+                    $this->savedText = $this->dashletStrings['LBL_DEFAULT_TEXT'];
66
+        }
63 67
 
64
-        if(!empty($def['height'])) // set a default height if none is set
68
+        if(!empty($def['height'])) {
69
+            // set a default height if none is set
65 70
             $this->height = $def['height'];
71
+        }
66 72
 
67 73
         parent::__construct($id); // call parent constructor
68 74
 
@@ -70,8 +76,11 @@  discard block
 block discarded – undo
70 76
         $this->hasScript = true;  // dashlet has javascript attached to it
71 77
 
72 78
         // if no custom title, use default
73
-        if(empty($def['title'])) $this->title = $this->dashletStrings['LBL_TITLE'];
74
-        else $this->title = $def['title'];
79
+        if(empty($def['title'])) {
80
+            $this->title = $this->dashletStrings['LBL_TITLE'];
81
+        } else {
82
+            $this->title = $def['title'];
83
+        }
75 84
     }
76 85
 
77 86
     /**
@@ -81,8 +90,7 @@  discard block
 block discarded – undo
81 90
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
82 91
         if(isset($GLOBALS['log'])) {
83 92
             $GLOBALS['log']->deprecated($deprecatedMessage);
84
-        }
85
-        else {
93
+        } else {
86 94
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
87 95
         }
88 96
         self::__construct($id, $def);
@@ -152,9 +160,13 @@  discard block
 block discarded – undo
152 160
         $options = array();
153 161
         $options['title'] = $_REQUEST['title'];
154 162
         if(is_numeric($_REQUEST['height'])) {
155
-            if($_REQUEST['height'] > 0 && $_REQUEST['height'] <= 300) $options['height'] = $_REQUEST['height'];
156
-            elseif($_REQUEST['height'] > 300) $options['height'] = '300';
157
-            else $options['height'] = '100';
163
+            if($_REQUEST['height'] > 0 && $_REQUEST['height'] <= 300) {
164
+                $options['height'] = $_REQUEST['height'];
165
+            } elseif($_REQUEST['height'] > 300) {
166
+                $options['height'] = '300';
167
+            } else {
168
+                $options['height'] = '100';
169
+            }
158 170
         }
159 171
 
160 172
         $options['savedText'] = $this->savedText;
@@ -173,8 +185,7 @@  discard block
 block discarded – undo
173 185
             $optionsArray['savedText']=SugarCleaner::cleanHtml(nl2br($optionsArray['savedText']));
174 186
             $this->storeOptions($optionsArray);
175 187
 
176
-        }
177
-        else {
188
+        } else {
178 189
             $optionsArray['savedText'] = '';
179 190
         }
180 191
         echo 'result = ' . $json->encode(array('id' => $_REQUEST['id'],
Please login to merge, or discard this patch.
modules/AOS_Product_Categories/AOS_Product_Categories_sugar.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	var $object_name = 'AOS_Product_Categories';
51 51
 	var $table_name = 'aos_product_categories';
52 52
 	var $importable = true;
53
-	var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
53
+	var $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
54 54
 		var $id;
55 55
 		var $name;
56 56
 		var $date_entered;
@@ -67,16 +67,16 @@  discard block
 block discarded – undo
67 67
 		var $assigned_user_name;
68 68
 		var $assigned_user_link;
69 69
 
70
-    function __construct(){
70
+    function __construct() {
71 71
 		parent::__construct();
72 72
 	}
73 73
 
74 74
     /**
75 75
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
76 76
      */
77
-    function AOS_Product_Categories_sugar(){
77
+    function AOS_Product_Categories_sugar() {
78 78
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
79
-        if(isset($GLOBALS['log'])) {
79
+        if (isset($GLOBALS['log'])) {
80 80
             $GLOBALS['log']->deprecated($deprecatedMessage);
81 81
         }
82 82
         else {
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
     }
87 87
 
88 88
 
89
-	function bean_implements($interface){
90
-		switch($interface){
89
+	function bean_implements($interface) {
90
+		switch ($interface) {
91 91
 			case 'ACL': return true;
92 92
 		}
93 93
 		return false;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
24 24
         if(isset($GLOBALS['log'])) {
25 25
             $GLOBALS['log']->deprecated($deprecatedMessage);
26
-        }
27
-        else {
26
+        } else {
28 27
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
29 28
         }
30 29
         self::__construct($seed, $module, $subPanel, $options);
Please login to merge, or discard this patch.
modules/AOS_Product_Categories/views/view.edit.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  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
 require_once('include/MVC/View/views/view.edit.php');
5 5
 
6 6
 class AOS_Product_CategoriesViewEdit extends ViewEdit {
7
-    function __construct(){
7
+    function __construct() {
8 8
         parent::__construct();
9 9
     }
10 10
 
11 11
     /**
12 12
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
13 13
      */
14
-    function AOS_Product_CategoriesViewEdit(){
14
+    function AOS_Product_CategoriesViewEdit() {
15 15
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
16
-        if(isset($GLOBALS['log'])) {
16
+        if (isset($GLOBALS['log'])) {
17 17
             $GLOBALS['log']->deprecated($deprecatedMessage);
18 18
         }
19 19
         else {
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     }
24 24
 
25 25
 
26
-    function display(){
26
+    function display() {
27 27
         parent::display();
28 28
         ?>
29 29
         <script>
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.
modules/AOS_Product_Categories/AOS_Product_Categories.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 require_once('modules/AOS_Product_Categories/AOS_Product_Categories_sugar.php');
44 44
 class AOS_Product_Categories extends AOS_Product_Categories_sugar {
45 45
 
46
-	function __construct(){
46
+	function __construct() {
47 47
 		parent::__construct();
48 48
 	}
49 49
 
50 50
     /**
51 51
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
52 52
      */
53
-    function AOS_Product_Categories(){
53
+    function AOS_Product_Categories() {
54 54
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
55
-        if(isset($GLOBALS['log'])) {
55
+        if (isset($GLOBALS['log'])) {
56 56
             $GLOBALS['log']->deprecated($deprecatedMessage);
57 57
         }
58 58
         else {
@@ -62,20 +62,20 @@  discard block
 block discarded – undo
62 62
     }
63 63
 
64 64
 
65
-    private function clearParent(){
65
+    private function clearParent() {
66 66
         $this->parent_category_id = '';
67 67
         $this->parent_category_name = '';
68 68
         $this->parent_category = '';
69 69
     }
70 70
 
71 71
 
72
-    function save($check_notify = FALSE){
73
-        if($this->is_parent){
72
+    function save($check_notify = FALSE) {
73
+        if ($this->is_parent) {
74 74
             $this->clearParent();
75
-        }else{
75
+        } else {
76 76
             $tmp = $this;
77
-            while($tmp && $tmp->parent_category_id){
78
-                if($tmp->parent_category_id == $this->id){
77
+            while ($tmp && $tmp->parent_category_id) {
78
+                if ($tmp->parent_category_id == $this->id) {
79 79
                     $this->clearParent();
80 80
                     break;
81 81
                 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
55 55
         if(isset($GLOBALS['log'])) {
56 56
             $GLOBALS['log']->deprecated($deprecatedMessage);
57
-        }
58
-        else {
57
+        } else {
59 58
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
60 59
         }
61 60
         self::__construct();
@@ -72,7 +71,7 @@  discard block
 block discarded – undo
72 71
     function save($check_notify = FALSE){
73 72
         if($this->is_parent){
74 73
             $this->clearParent();
75
-        }else{
74
+        } else{
76 75
             $tmp = $this;
77 76
             while($tmp && $tmp->parent_category_id){
78 77
                 if($tmp->parent_category_id == $this->id){
Please login to merge, or discard this patch.
Dashlets/AOS_Product_CategoriesDashlet/AOS_Product_CategoriesDashlet.php 2 patches
Spacing   +4 added lines, -4 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.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         parent::__construct($id, $def);
58 58
 
59
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_Product_Categories');
59
+        if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_Product_Categories');
60 60
 
61 61
         $this->searchFields = $dashletData['AOS_Product_CategoriesDashlet']['searchFields'];
62 62
         $this->columns = $dashletData['AOS_Product_CategoriesDashlet']['columns'];
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
69 69
      */
70
-    function AOS_Product_CategoriesDashlet($id, $def = null){
70
+    function AOS_Product_CategoriesDashlet($id, $def = null) {
71 71
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
72
-        if(isset($GLOBALS['log'])) {
72
+        if (isset($GLOBALS['log'])) {
73 73
             $GLOBALS['log']->deprecated($deprecatedMessage);
74 74
         }
75 75
         else {
Please login to merge, or discard this patch.
Braces   +7 added lines, -4 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.
@@ -56,7 +58,9 @@  discard block
 block discarded – undo
56 58
 
57 59
         parent::__construct($id, $def);
58 60
 
59
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_Product_Categories');
61
+        if(empty($def['title'])) {
62
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'AOS_Product_Categories');
63
+        }
60 64
 
61 65
         $this->searchFields = $dashletData['AOS_Product_CategoriesDashlet']['searchFields'];
62 66
         $this->columns = $dashletData['AOS_Product_CategoriesDashlet']['columns'];
@@ -71,8 +75,7 @@  discard block
 block discarded – undo
71 75
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
72 76
         if(isset($GLOBALS['log'])) {
73 77
             $GLOBALS['log']->deprecated($deprecatedMessage);
74
-        }
75
-        else {
78
+        } else {
76 79
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
77 80
         }
78 81
         self::__construct($id, $def);
Please login to merge, or discard this patch.
modules/Employees/Popup_picker.php 3 patches
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 {
56 56
 
57 57
 
58
-	/*
58
+    /*
59 59
 	 *
60 60
 	 */
61
-	function __construct()
62
-	{
63
-	}
61
+    function __construct()
62
+    {
63
+    }
64 64
 
65 65
     /**
66 66
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
@@ -77,102 +77,102 @@  discard block
 block discarded – undo
77 77
     }
78 78
 
79 79
 
80
-	/*
81
-	 *
82
-	 */
83
-	function _get_where_clause()
84
-	{
85
-		$where = '';
86
-		if(isset($_REQUEST['query']))
87
-		{
88
-			$where_clauses = array();
89
-			append_where_clause($where_clauses, "first_name", "users.first_name");
90
-			append_where_clause($where_clauses, "last_name", "users.last_name");
91
-			append_where_clause($where_clauses, "user_name", "users.user_name");
92
-
93
-			$where = generate_where_statement($where_clauses);
94
-		}
95
-
96
-		return $where;
97
-	}
98
-
99
-	/**
80
+    /*
100 81
 	 *
101 82
 	 */
102
-	function process_page()
103
-	{
104
-		global $theme;
105
-		global $mod_strings;
106
-		global $app_strings;
107
-		global $currentModule;
108
-		global $sugar_version, $sugar_config;
109
-
110
-		$output_html = '';
111
-		$where = '';
112
-
113
-		$where = $this->_get_where_clause();
114
-
115
-
116
-
117
-		$first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
118
-		$last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
119
-		$user_name = empty($_REQUEST['user_name']) ? '' : $_REQUEST['user_name'];
120
-		$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
121
-		$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
122
-
123
-		$button  = "<form action='index.php' method='post' name='form' id='form'>\n";
124
-		if(!$hide_clear_button)
125
-		{
126
-			$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
127
-				.$app_strings['LBL_CLEAR_BUTTON_TITLE']."'  />\n";
128
-		}
129
-		$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
130
-			.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
131
-			.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value='  "
132
-			.$app_strings['LBL_CANCEL_BUTTON_LABEL']."  ' />\n";
133
-		$button .= "</form>\n";
134
-
135
-		$form = new XTemplate('modules/Employees/Popup_picker.html');
136
-		$form->assign('MOD', $mod_strings);
137
-		$form->assign('APP', $app_strings);
138
-		$form->assign('THEME', $theme);
139
-		$form->assign('MODULE_NAME', $currentModule);
140
-		$form->assign('FIRST_NAME', $first_name);
141
-		$form->assign('LAST_NAME', $last_name);
142
-		$form->assign('USER_NAME', $user_name);
143
-		$form->assign('request_data', $request_data);
144
-
145
-		ob_start();
146
-		insert_popup_header($theme);
147
-		$output_html .= ob_get_contents();
148
-		ob_end_clean();
149
-
150
-		$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
151
-
152
-		$form->parse('main.SearchHeader');
153
-		$output_html .= $form->text('main.SearchHeader');
154
-
155
-		// Reset the sections that are already in the page so that they do not print again later.
156
-		$form->reset('main.SearchHeader');
157
-
158
-		// create the listview
159
-		$seed_bean = new Employee();
160
-		$ListView = new ListView();
161
-		$ListView->show_export_button = false;
162
-		$ListView->process_for_popups = true;
163
-		$ListView->setXTemplate($form);
164
-		$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
165
-		$ListView->setHeaderText($button);
166
-		$ListView->setQuery($where, '', 'user_name', 'EMPLOYEE');
167
-		$ListView->setModStrings($mod_strings);
168
-
169
-		ob_start();
170
-		$ListView->processListView($seed_bean, 'main', 'EMPLOYEE');
171
-		$output_html .= ob_get_contents();
172
-		ob_end_clean();
173
-
174
-		$output_html .= insert_popup_footer();
175
-		return $output_html;
176
-	}
83
+    function _get_where_clause()
84
+    {
85
+        $where = '';
86
+        if(isset($_REQUEST['query']))
87
+        {
88
+            $where_clauses = array();
89
+            append_where_clause($where_clauses, "first_name", "users.first_name");
90
+            append_where_clause($where_clauses, "last_name", "users.last_name");
91
+            append_where_clause($where_clauses, "user_name", "users.user_name");
92
+
93
+            $where = generate_where_statement($where_clauses);
94
+        }
95
+
96
+        return $where;
97
+    }
98
+
99
+    /**
100
+     *
101
+     */
102
+    function process_page()
103
+    {
104
+        global $theme;
105
+        global $mod_strings;
106
+        global $app_strings;
107
+        global $currentModule;
108
+        global $sugar_version, $sugar_config;
109
+
110
+        $output_html = '';
111
+        $where = '';
112
+
113
+        $where = $this->_get_where_clause();
114
+
115
+
116
+
117
+        $first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name'];
118
+        $last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name'];
119
+        $user_name = empty($_REQUEST['user_name']) ? '' : $_REQUEST['user_name'];
120
+        $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
121
+        $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
122
+
123
+        $button  = "<form action='index.php' method='post' name='form' id='form'>\n";
124
+        if(!$hide_clear_button)
125
+        {
126
+            $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
127
+                .$app_strings['LBL_CLEAR_BUTTON_TITLE']."'  />\n";
128
+        }
129
+        $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
130
+            .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
131
+            .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value='  "
132
+            .$app_strings['LBL_CANCEL_BUTTON_LABEL']."  ' />\n";
133
+        $button .= "</form>\n";
134
+
135
+        $form = new XTemplate('modules/Employees/Popup_picker.html');
136
+        $form->assign('MOD', $mod_strings);
137
+        $form->assign('APP', $app_strings);
138
+        $form->assign('THEME', $theme);
139
+        $form->assign('MODULE_NAME', $currentModule);
140
+        $form->assign('FIRST_NAME', $first_name);
141
+        $form->assign('LAST_NAME', $last_name);
142
+        $form->assign('USER_NAME', $user_name);
143
+        $form->assign('request_data', $request_data);
144
+
145
+        ob_start();
146
+        insert_popup_header($theme);
147
+        $output_html .= ob_get_contents();
148
+        ob_end_clean();
149
+
150
+        $output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
151
+
152
+        $form->parse('main.SearchHeader');
153
+        $output_html .= $form->text('main.SearchHeader');
154
+
155
+        // Reset the sections that are already in the page so that they do not print again later.
156
+        $form->reset('main.SearchHeader');
157
+
158
+        // create the listview
159
+        $seed_bean = new Employee();
160
+        $ListView = new ListView();
161
+        $ListView->show_export_button = false;
162
+        $ListView->process_for_popups = true;
163
+        $ListView->setXTemplate($form);
164
+        $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
165
+        $ListView->setHeaderText($button);
166
+        $ListView->setQuery($where, '', 'user_name', 'EMPLOYEE');
167
+        $ListView->setModStrings($mod_strings);
168
+
169
+        ob_start();
170
+        $ListView->processListView($seed_bean, 'main', 'EMPLOYEE');
171
+        $output_html .= ob_get_contents();
172
+        ob_end_clean();
173
+
174
+        $output_html .= insert_popup_footer();
175
+        return $output_html;
176
+    }
177 177
 } // end of class Popup_Picker
178 178
 ?>
179 179
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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.
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
63 63
      */
64
-    function Popup_Picker(){
64
+    function Popup_Picker() {
65 65
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
66
-        if(isset($GLOBALS['log'])) {
66
+        if (isset($GLOBALS['log'])) {
67 67
             $GLOBALS['log']->deprecated($deprecatedMessage);
68 68
         }
69 69
         else {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	function _get_where_clause()
80 80
 	{
81 81
 		$where = '';
82
-		if(isset($_REQUEST['query']))
82
+		if (isset($_REQUEST['query']))
83 83
 		{
84 84
 			$where_clauses = array();
85 85
 			append_where_clause($where_clauses, "name", "acl_roles.name");
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 		$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
109 109
 		$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
110 110
 
111
-		$button  = "<form action='index.php' method='post' name='form' id='form'>\n";
112
-		if(!$hide_clear_button)
111
+		$button = "<form action='index.php' method='post' name='form' id='form'>\n";
112
+		if (!$hide_clear_button)
113 113
 		{
114 114
 			$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
115 115
 				.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value='  "
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.
modules/Employees/views/view.detail.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 
45 45
 class EmployeesViewDetail extends ViewDetail {
46 46
 
47
- 	function __construct(){
48
- 		parent::__construct();
49
- 	}
47
+        function __construct(){
48
+            parent::__construct();
49
+        }
50 50
 
51 51
     /**
52 52
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
     }
64 64
 
65 65
 
66
-   /**
67
-    * Return the "breadcrumbs" to display at the top of the page
68
-    *
69
-    * @param  bool $show_help optional, true if we show the help links
70
-    * @return HTML string containing breadcrumb title
71
-    */
66
+    /**
67
+     * Return the "breadcrumbs" to display at the top of the page
68
+     *
69
+     * @param  bool $show_help optional, true if we show the help links
70
+     * @return HTML string containing breadcrumb title
71
+     */
72 72
     public function getModuleTitle($show_help = true)
73 73
     {
74 74
         global $sugar_version, $sugar_flavor, $server_unique_key, $current_language, $action, $current_user;
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
         $count = count($params);
82 82
         $index = 0;
83 83
 
84
-		if(SugarThemeRegistry::current()->directionality == "rtl") {
85
-			$params = array_reverse($params);
86
-		}
84
+        if(SugarThemeRegistry::current()->directionality == "rtl") {
85
+            $params = array_reverse($params);
86
+        }
87 87
 
88 88
         $paramString = '';
89 89
         foreach($params as $parm){
@@ -118,27 +118,27 @@  discard block
 block discarded – undo
118 118
         return $theTitle;
119 119
     }
120 120
 
121
- 	function display() {
122
-       	if(is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id) {
123
-			 $this->ss->assign('DISPLAY_EDIT', true);
121
+        function display() {
122
+            if(is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id) {
123
+                $this->ss->assign('DISPLAY_EDIT', true);
124 124
         }
125 125
         if(is_admin($GLOBALS['current_user'])){
126
- 			$this->ss->assign('DISPLAY_DUPLICATE', true);
127
- 		}
126
+                $this->ss->assign('DISPLAY_DUPLICATE', true);
127
+            }
128 128
 
129
- 		$showDeleteButton = FALSE;
130
- 		if(  $_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users') )
129
+            $showDeleteButton = FALSE;
130
+            if(  $_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users') )
131 131
         {
132 132
             $showDeleteButton = TRUE;
133
- 		     if( empty($this->bean->user_name) ) //Indicates just employee
134
- 		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_EMPLOYEE_CONFIRM'];
135
- 		     else
136
- 		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_USER_CONFIRM'];
137
- 		     $this->ss->assign('DELETE_WARNING', $deleteWarning);
133
+                if( empty($this->bean->user_name) ) //Indicates just employee
134
+                    $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_EMPLOYEE_CONFIRM'];
135
+                else
136
+                    $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_USER_CONFIRM'];
137
+                $this->ss->assign('DELETE_WARNING', $deleteWarning);
138 138
         }
139 139
         $this->ss->assign('DISPLAY_DELETE', $showDeleteButton);
140 140
 
141
- 		parent::display();
142
- 	}
141
+            parent::display();
142
+        }
143 143
 }
144 144
 ?>
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
 
45 45
 class EmployeesViewDetail extends ViewDetail {
46 46
 
47
- 	function __construct(){
47
+ 	function __construct() {
48 48
  		parent::__construct();
49 49
  	}
50 50
 
51 51
     /**
52 52
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
53 53
      */
54
-    function EmployeesViewDetail(){
54
+    function EmployeesViewDetail() {
55 55
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
56
-        if(isset($GLOBALS['log'])) {
56
+        if (isset($GLOBALS['log'])) {
57 57
             $GLOBALS['log']->deprecated($deprecatedMessage);
58 58
         }
59 59
         else {
@@ -75,32 +75,32 @@  discard block
 block discarded – undo
75 75
 
76 76
         $theTitle = "<div class='moduleTitle'>\n";
77 77
 
78
-        $module = preg_replace("/ /","",$this->module);
78
+        $module = preg_replace("/ /", "", $this->module);
79 79
 
80 80
         $params = $this->_getModuleTitleParams();
81 81
         $count = count($params);
82 82
         $index = 0;
83 83
 
84
-		if(SugarThemeRegistry::current()->directionality == "rtl") {
84
+		if (SugarThemeRegistry::current()->directionality == "rtl") {
85 85
 			$params = array_reverse($params);
86 86
 		}
87 87
 
88 88
         $paramString = '';
89
-        foreach($params as $parm){
89
+        foreach ($params as $parm) {
90 90
             $index++;
91 91
             $paramString .= $parm;
92
-            if($index < $count){
92
+            if ($index < $count) {
93 93
                 $paramString .= $this->getBreadCrumbSymbol();
94 94
             }
95 95
         }
96 96
 
97
-        if(!empty($paramString)){
97
+        if (!empty($paramString)) {
98 98
             $theTitle .= "<h2> $paramString </h2>\n";
99 99
         }
100 100
 
101 101
         if ($show_help) {
102 102
             $theTitle .= "<span class='utils'>";
103
-            if(is_admin($current_user) || is_admin_for_module($current_user, $this->module))
103
+            if (is_admin($current_user) || is_admin_for_module($current_user, $this->module))
104 104
             {
105 105
             $createImageURL = SugarThemeRegistry::current()->getImageURL('create-record.gif');
106 106
             $theTitle .= <<<EOHTML
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
     }
120 120
 
121 121
  	function display() {
122
-       	if(is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id) {
122
+       	if (is_admin($GLOBALS['current_user']) || $_REQUEST['record'] == $GLOBALS['current_user']->id) {
123 123
 			 $this->ss->assign('DISPLAY_EDIT', true);
124 124
         }
125
-        if(is_admin($GLOBALS['current_user'])){
125
+        if (is_admin($GLOBALS['current_user'])) {
126 126
  			$this->ss->assign('DISPLAY_DUPLICATE', true);
127 127
  		}
128 128
 
129 129
  		$showDeleteButton = FALSE;
130
- 		if(  $_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users') )
130
+ 		if ($_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users'))
131 131
         {
132 132
             $showDeleteButton = TRUE;
133
- 		     if( empty($this->bean->user_name) ) //Indicates just employee
133
+ 		     if (empty($this->bean->user_name)) //Indicates just employee
134 134
  		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_EMPLOYEE_CONFIRM'];
135 135
  		     else
136 136
  		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_USER_CONFIRM'];
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 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
 /*********************************************************************************
5 7
  * SugarCRM Community Edition is a customer relationship management program developed by
@@ -55,8 +57,7 @@  discard block
 block discarded – undo
55 57
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
56 58
         if(isset($GLOBALS['log'])) {
57 59
             $GLOBALS['log']->deprecated($deprecatedMessage);
58
-        }
59
-        else {
60
+        } else {
60 61
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
61 62
         }
62 63
         self::__construct();
@@ -130,10 +131,12 @@  discard block
 block discarded – undo
130 131
  		if(  $_REQUEST['record'] != $GLOBALS['current_user']->id && $GLOBALS['current_user']->isAdminForModule('Users') )
131 132
         {
132 133
             $showDeleteButton = TRUE;
133
- 		     if( empty($this->bean->user_name) ) //Indicates just employee
134
+ 		     if( empty($this->bean->user_name) ) {
135
+ 		         //Indicates just employee
134 136
  		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_EMPLOYEE_CONFIRM'];
135
- 		     else
136
- 		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_USER_CONFIRM'];
137
+ 		     } else {
138
+ 		      		         $deleteWarning = $GLOBALS['mod_strings']['LBL_DELETE_USER_CONFIRM'];
139
+ 		     }
137 140
  		     $this->ss->assign('DELETE_WARNING', $deleteWarning);
138 141
         }
139 142
         $this->ss->assign('DISPLAY_DELETE', $showDeleteButton);
Please login to merge, or discard this patch.
modules/Employees/views/view.edit.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 3
 
4 4
 /*********************************************************************************
5 5
  * SugarCRM Community Edition is a customer relationship management program developed by
@@ -42,16 +42,16 @@  discard block
 block discarded – undo
42 42
 
43 43
 class EmployeesViewEdit extends ViewEdit {
44 44
     var $useForSubpanel = true;
45
- 	function __construct(){
45
+ 	function __construct() {
46 46
  		parent::__construct();
47 47
  	}
48 48
 
49 49
     /**
50 50
      * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
51 51
      */
52
-    function EmployeesViewEdit(){
52
+    function EmployeesViewEdit() {
53 53
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
54
-        if(isset($GLOBALS['log'])) {
54
+        if (isset($GLOBALS['log'])) {
55 55
             $GLOBALS['log']->deprecated($deprecatedMessage);
56 56
         }
57 57
         else {
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
 
64 64
  	function display() {
65
-       	if(is_admin($GLOBALS['current_user'])) {
65
+       	if (is_admin($GLOBALS['current_user'])) {
66 66
             $json = getJSONobj();
67 67
             require_once('include/QuickSearchDefaults.php');
68 68
             $qsd = QuickSearchDefaults::getQuickSearchDefaults();
69 69
             $sqs_objects = array('EditView_reports_to_name' => $qsd->getQSUser());
70 70
             $sqs_objects['EditView_reports_to_name']['populate_list'] = array('reports_to_name', 'reports_to_id');
71
-            $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>';
71
+            $quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = '.$json->encode($sqs_objects).'; enableQS();</script>';
72 72
 
73 73
             $this->ss->assign('REPORTS_TO_JS', $quicksearch_js);
74 74
 			$this->ss->assign('EDIT_REPORTS_TO', true);
@@ -76,27 +76,27 @@  discard block
 block discarded – undo
76 76
 
77 77
 
78 78
        //retrieve employee bean if it is not already in focus
79
-         if(empty($this->bean->id)  && !empty($_REQUEST['record'])){
79
+         if (empty($this->bean->id) && !empty($_REQUEST['record'])) {
80 80
             $this->bean->retrieve($_REQUEST['record']);
81 81
          }
82 82
          //populate values for non admin users
83
-        if(!empty($this->bean->id)) {
83
+        if (!empty($this->bean->id)) {
84 84
             global $app_list_strings;
85
-            if( !empty($this->bean->status) ) {
86
-                $this->ss->assign('STATUS_READONLY',$app_list_strings['user_status_dom'][$this->bean->status]); }
87
-            if( !empty($this->bean->employee_status) ) {
85
+            if (!empty($this->bean->status)) {
86
+                $this->ss->assign('STATUS_READONLY', $app_list_strings['user_status_dom'][$this->bean->status]); }
87
+            if (!empty($this->bean->employee_status)) {
88 88
                 $this->ss->assign('EMPLOYEE_STATUS_READONLY', $app_list_strings['employee_status_dom'][$this->bean->employee_status]);
89 89
             }
90
-            if( !empty($this->bean->reports_to_id) ) {
90
+            if (!empty($this->bean->reports_to_id)) {
91 91
                 $reportsToUser = get_assigned_user_name($this->bean->reports_to_id);
92 92
                 $reportsToUserField = "<input type='text' name='reports_to_name' id='reports_to_name' value='{$reportsToUser}' disabled>\n";
93 93
                 $reportsToUserField .= "<input type='hidden' name='reports_to_id' id='reports_to_id' value='{$this->bean->reports_to_id}'>";
94 94
                 $this->ss->assign('REPORTS_TO_READONLY', $reportsToUserField);
95 95
             }
96
-            if( !empty($this->bean->title) ) {
96
+            if (!empty($this->bean->title)) {
97 97
                 $this->ss->assign('TITLE_READONLY', $this->bean->title);
98 98
             }
99
-            if( !empty($this->bean->department) ) {
99
+            if (!empty($this->bean->department)) {
100 100
                 $this->ss->assign('DEPT_READONLY', $this->bean->department);
101 101
             }
102 102
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
  * Date: 06/03/15
44 44
  * Comments
45 45
  */
46
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
46
+if(!defined('sugarEntry') || !sugarEntry) {
47
+    die('Not A Valid Entry Point');
48
+}
47 49
 
48 50
 class CasesController extends SugarController {
49 51
 
@@ -90,8 +92,7 @@  discard block
 block discarded – undo
90 92
                 $count++;
91 93
             }
92 94
             echo '</table>';
93
-        }
94
-        else {
95
+        } else {
95 96
             echo $mod_strings['LBL_NO_SUGGESTIONS'];
96 97
         }
97 98
         die();
Please login to merge, or discard this patch.