Passed
Push — scrutinizer-code-quality ( 09f5a1...c4c5fb )
by Adam
56:05 queued 14:08
created
modules/Favorites/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 FavoritesViewEdit 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 FavoritesViewEdit(){
14
+    function FavoritesViewEdit() {
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
 
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/Favorites/Dashlets/Favorites/FavoritesDashlet.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', 'Favorites');
59
+        if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Favorites');
60 60
 
61 61
         $this->searchFields = $dashletData['FavoritesDashlet']['searchFields'];
62 62
         $this->columns = $dashletData['FavoritesDashlet']['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 FavoritesDashlet($id, $def = null){
70
+    function FavoritesDashlet($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', 'Favorites');
61
+        if(empty($def['title'])) {
62
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'Favorites');
63
+        }
60 64
 
61 65
         $this->searchFields = $dashletData['FavoritesDashlet']['searchFields'];
62 66
         $this->columns = $dashletData['FavoritesDashlet']['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/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.php 2 patches
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.
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         parent::__construct($id, $def);
54 54
 
55
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
55
+        if (empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
56 56
 
57 57
         $this->searchFields = $dashletData['MyAccountsDashlet']['searchFields'];
58 58
         $this->columns = $dashletData['MyAccountsDashlet']['columns'];
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
     /**
64 64
      * @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
65 65
      */
66
-    function MyAccountsDashlet($id, $def = null){
66
+    function MyAccountsDashlet($id, $def = null) {
67 67
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
68
-        if(isset($GLOBALS['log'])) {
68
+        if (isset($GLOBALS['log'])) {
69 69
             $GLOBALS['log']->deprecated($deprecatedMessage);
70 70
         }
71 71
         else {
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
     	}
93 93
 
94 94
         if (isset($this->displayColumns) && array_search('parent_name', $this->displayColumns) !== false) {
95
-	    	$lvsParams['custom_select'] = empty($lvsParams['custom_select']) ? ', a1.name as parent_name ' : $lvsParams['custom_select'] . ', a1.name as parent_name ';
96
-	    	$lvsParams['custom_from'] = empty($lvsParams['custom_from']) ? ' LEFT JOIN accounts a1 on a1.id = accounts.parent_id' : $lvsParams['custom_from'] . ' LEFT JOIN accounts a1 on a1.id = accounts.parent_id';
95
+	    	$lvsParams['custom_select'] = empty($lvsParams['custom_select']) ? ', a1.name as parent_name ' : $lvsParams['custom_select'].', a1.name as parent_name ';
96
+	    	$lvsParams['custom_from'] = empty($lvsParams['custom_from']) ? ' LEFT JOIN accounts a1 on a1.id = accounts.parent_id' : $lvsParams['custom_from'].' LEFT JOIN accounts a1 on a1.id = accounts.parent_id';
97 97
     	}
98 98
 
99 99
     	parent::process($lvsParams);
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.
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 
53 55
         parent::__construct($id, $def);
54 56
 
55
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
57
+        if(empty($def['title'])) {
58
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
59
+        }
56 60
 
57 61
         $this->searchFields = $dashletData['MyAccountsDashlet']['searchFields'];
58 62
         $this->columns = $dashletData['MyAccountsDashlet']['columns'];
@@ -67,8 +71,7 @@  discard block
 block discarded – undo
67 71
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
68 72
         if(isset($GLOBALS['log'])) {
69 73
             $GLOBALS['log']->deprecated($deprecatedMessage);
70
-        }
71
-        else {
74
+        } else {
72 75
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
73 76
         }
74 77
         self::__construct($id, $def);
Please login to merge, or discard this patch.
modules/Accounts/Account.php 3 patches
Indentation   +226 added lines, -226 removed lines patch added patch discarded remove patch
@@ -48,43 +48,43 @@  discard block
 block discarded – undo
48 48
 
49 49
 // Account is used to store account information.
50 50
 class Account extends Company {
51
-	var $field_name_map = array();
52
-	// Stored fields
53
-	var $date_entered;
54
-	var $date_modified;
55
-	var $modified_user_id;
56
-	var $assigned_user_id;
57
-	var $annual_revenue;
58
-	var $billing_address_street;
59
-	var $billing_address_city;
60
-	var $billing_address_state;
61
-	var $billing_address_country;
62
-	var $billing_address_postalcode;
51
+    var $field_name_map = array();
52
+    // Stored fields
53
+    var $date_entered;
54
+    var $date_modified;
55
+    var $modified_user_id;
56
+    var $assigned_user_id;
57
+    var $annual_revenue;
58
+    var $billing_address_street;
59
+    var $billing_address_city;
60
+    var $billing_address_state;
61
+    var $billing_address_country;
62
+    var $billing_address_postalcode;
63 63
 
64 64
     var $billing_address_street_2;
65 65
     var $billing_address_street_3;
66 66
     var $billing_address_street_4;
67 67
 
68
-	var $description;
69
-	var $email1;
70
-	var $email2;
71
-	var $email_opt_out;
72
-	var $invalid_email;
73
-	var $employees;
74
-	var $id;
75
-	var $industry;
76
-	var $name;
77
-	var $ownership;
78
-	var $parent_id;
79
-	var $phone_alternate;
80
-	var $phone_fax;
81
-	var $phone_office;
82
-	var $rating;
83
-	var $shipping_address_street;
84
-	var $shipping_address_city;
85
-	var $shipping_address_state;
86
-	var $shipping_address_country;
87
-	var $shipping_address_postalcode;
68
+    var $description;
69
+    var $email1;
70
+    var $email2;
71
+    var $email_opt_out;
72
+    var $invalid_email;
73
+    var $employees;
74
+    var $id;
75
+    var $industry;
76
+    var $name;
77
+    var $ownership;
78
+    var $parent_id;
79
+    var $phone_alternate;
80
+    var $phone_fax;
81
+    var $phone_office;
82
+    var $rating;
83
+    var $shipping_address_street;
84
+    var $shipping_address_city;
85
+    var $shipping_address_state;
86
+    var $shipping_address_country;
87
+    var $shipping_address_postalcode;
88 88
 
89 89
     var $shipping_address_street_2;
90 90
     var $shipping_address_street_3;
@@ -92,204 +92,204 @@  discard block
 block discarded – undo
92 92
 
93 93
     var $campaign_id;
94 94
 
95
-	var $sic_code;
96
-	var $ticker_symbol;
97
-	var $account_type;
98
-	var $website;
99
-	var $custom_fields;
100
-
101
-	var $created_by;
102
-	var $created_by_name;
103
-	var $modified_by_name;
104
-
105
-	// These are for related fields
106
-	var $opportunity_id;
107
-	var $case_id;
108
-	var $contact_id;
109
-	var $task_id;
110
-	var $note_id;
111
-	var $meeting_id;
112
-	var $call_id;
113
-	var $email_id;
114
-	var $member_id;
115
-	var $parent_name;
116
-	var $assigned_user_name;
117
-	var $account_id = '';
118
-	var $account_name = '';
119
-	var $bug_id ='';
120
-	var $module_dir = 'Accounts';
121
-	var $emailAddress;
122
-
123
-
124
-	var $table_name = "accounts";
125
-	var $object_name = "Account";
126
-	var $importable = true;
127
-	var $new_schema = true;
128
-	// This is used to retrieve related fields from form posts.
129
-	var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'opportunity_id', 'bug_id', 'case_id', 'contact_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id', 'parent_name', 'member_id'
130
-	);
131
-	var $relationship_fields = Array('opportunity_id'=>'opportunities', 'bug_id' => 'bugs', 'case_id'=>'cases',
132
-									'contact_id'=>'contacts', 'task_id'=>'tasks', 'note_id'=>'notes',
133
-									'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails','member_id'=>'members',
134
-									'project_id'=>'project',
135
-									);
95
+    var $sic_code;
96
+    var $ticker_symbol;
97
+    var $account_type;
98
+    var $website;
99
+    var $custom_fields;
100
+
101
+    var $created_by;
102
+    var $created_by_name;
103
+    var $modified_by_name;
104
+
105
+    // These are for related fields
106
+    var $opportunity_id;
107
+    var $case_id;
108
+    var $contact_id;
109
+    var $task_id;
110
+    var $note_id;
111
+    var $meeting_id;
112
+    var $call_id;
113
+    var $email_id;
114
+    var $member_id;
115
+    var $parent_name;
116
+    var $assigned_user_name;
117
+    var $account_id = '';
118
+    var $account_name = '';
119
+    var $bug_id ='';
120
+    var $module_dir = 'Accounts';
121
+    var $emailAddress;
122
+
123
+
124
+    var $table_name = "accounts";
125
+    var $object_name = "Account";
126
+    var $importable = true;
127
+    var $new_schema = true;
128
+    // This is used to retrieve related fields from form posts.
129
+    var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'opportunity_id', 'bug_id', 'case_id', 'contact_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id', 'parent_name', 'member_id'
130
+    );
131
+    var $relationship_fields = Array('opportunity_id'=>'opportunities', 'bug_id' => 'bugs', 'case_id'=>'cases',
132
+                                    'contact_id'=>'contacts', 'task_id'=>'tasks', 'note_id'=>'notes',
133
+                                    'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails','member_id'=>'members',
134
+                                    'project_id'=>'project',
135
+                                    );
136 136
 
137 137
     //Meta-Data Framework fields
138 138
     var $push_billing;
139 139
     var $push_shipping;
140 140
 
141
-	public function __construct() {
141
+    public function __construct() {
142 142
         parent::__construct();
143 143
 
144 144
 
145 145
         $this->setupCustomFields('Accounts');
146 146
 
147
-		foreach ($this->field_defs as $field)
148
-		{
149
-			if(isset($field['name']))
150
-			{
151
-				$this->field_name_map[$field['name']] = $field;
152
-			}
153
-		}
147
+        foreach ($this->field_defs as $field)
148
+        {
149
+            if(isset($field['name']))
150
+            {
151
+                $this->field_name_map[$field['name']] = $field;
152
+            }
153
+        }
154 154
 
155 155
 
156 156
         //Email logic
157
-		if (!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type']) && $_REQUEST['parent_type'] == 'Emails'
158
-        	&& !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails') {
159
-			$_REQUEST['parent_name'] = '';
160
-			$_REQUEST['parent_id'] = '';
161
-		}
162
-	}
163
-
164
-	/**
165
-	 * @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
166
-	 */
167
-	public function Account(){
168
-		$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
169
-		if(isset($GLOBALS['log'])) {
170
-			$GLOBALS['log']->deprecated($deprecatedMessage);
171
-		}
172
-		else {
173
-			trigger_error($deprecatedMessage, E_USER_DEPRECATED);
174
-		}
175
-		self::__construct();
176
-	}
177
-
178
-	function get_summary_text()
179
-	{
180
-		return $this->name;
181
-	}
182
-
183
-	function get_contacts() {
184
-		return $this->get_linked_beans('contacts','Contact');
185
-	}
186
-
187
-
188
-
189
-	function clear_account_case_relationship($account_id='', $case_id='')
190
-	{
191
-		if (empty($case_id)) $where = '';
192
-		else $where = " and id = '$case_id'";
193
-		$query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 " . $where;
194
-		$this->db->query($query,true,"Error clearing account to case relationship: ");
195
-	}
196
-
197
-	/**
198
-	* This method is used to provide backward compatibility with old data that was prefixed with http://
199
-	* We now automatically prefix http://
200
-	* @deprecated.
201
- 	*/
202
-	function remove_redundant_http()
203
-	{	/*
157
+        if (!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type']) && $_REQUEST['parent_type'] == 'Emails'
158
+            && !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails') {
159
+            $_REQUEST['parent_name'] = '';
160
+            $_REQUEST['parent_id'] = '';
161
+        }
162
+    }
163
+
164
+    /**
165
+     * @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
166
+     */
167
+    public function Account(){
168
+        $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
169
+        if(isset($GLOBALS['log'])) {
170
+            $GLOBALS['log']->deprecated($deprecatedMessage);
171
+        }
172
+        else {
173
+            trigger_error($deprecatedMessage, E_USER_DEPRECATED);
174
+        }
175
+        self::__construct();
176
+    }
177
+
178
+    function get_summary_text()
179
+    {
180
+        return $this->name;
181
+    }
182
+
183
+    function get_contacts() {
184
+        return $this->get_linked_beans('contacts','Contact');
185
+    }
186
+
187
+
188
+
189
+    function clear_account_case_relationship($account_id='', $case_id='')
190
+    {
191
+        if (empty($case_id)) $where = '';
192
+        else $where = " and id = '$case_id'";
193
+        $query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 " . $where;
194
+        $this->db->query($query,true,"Error clearing account to case relationship: ");
195
+    }
196
+
197
+    /**
198
+     * This method is used to provide backward compatibility with old data that was prefixed with http://
199
+     * We now automatically prefix http://
200
+     * @deprecated.
201
+     */
202
+    function remove_redundant_http()
203
+    {	/*
204 204
 		if(preg_match("@http://@", $this->website))
205 205
 		{
206 206
 			$this->website = substr($this->website, 7);
207 207
 		}
208 208
 		*/
209
-	}
209
+    }
210 210
 
211
-	function fill_in_additional_list_fields()
212
-	{
213
-		parent::fill_in_additional_list_fields();
214
-	// Fill in the assigned_user_name
215
-	//	$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
211
+    function fill_in_additional_list_fields()
212
+    {
213
+        parent::fill_in_additional_list_fields();
214
+    // Fill in the assigned_user_name
215
+    //	$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
216 216
 
217
-	}
217
+    }
218 218
 
219
-	function fill_in_additional_detail_fields()
220
-	{
219
+    function fill_in_additional_detail_fields()
220
+    {
221 221
         parent::fill_in_additional_detail_fields();
222 222
 
223 223
         //rrs bug: 28184 - instead of removing this code altogether just adding this check to ensure that if the parent_name
224 224
         //is empty then go ahead and fill it.
225 225
         if(empty($this->parent_name) && !empty($this->id)){
226
-			$query = "SELECT a1.name from accounts a1, accounts a2 where a1.id = a2.parent_id and a2.id = '$this->id' and a1.deleted=0";
227
-			$result = $this->db->query($query,true," Error filling in additional detail fields: ");
228
-
229
-			// Get the id and the name.
230
-			$row = $this->db->fetchByAssoc($result);
231
-
232
-			if($row != null)
233
-			{
234
-				$this->parent_name = $row['name'];
235
-			}
236
-			else
237
-			{
238
-				$this->parent_name = '';
239
-			}
226
+            $query = "SELECT a1.name from accounts a1, accounts a2 where a1.id = a2.parent_id and a2.id = '$this->id' and a1.deleted=0";
227
+            $result = $this->db->query($query,true," Error filling in additional detail fields: ");
228
+
229
+            // Get the id and the name.
230
+            $row = $this->db->fetchByAssoc($result);
231
+
232
+            if($row != null)
233
+            {
234
+                $this->parent_name = $row['name'];
235
+            }
236
+            else
237
+            {
238
+                $this->parent_name = '';
239
+            }
240 240
         }
241 241
 
242 242
         // Set campaign name if there is a campaign id
243
-		if( !empty($this->campaign_id)){
243
+        if( !empty($this->campaign_id)){
244 244
 
245
-			$camp = new Campaign();
246
-		    $where = "campaigns.id='{$this->campaign_id}'";
247
-		    $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
248
-		    $this->campaign_name = $campaign_list[0]->name;
249
-		}
250
-	}
245
+            $camp = new Campaign();
246
+            $where = "campaigns.id='{$this->campaign_id}'";
247
+            $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
248
+            $this->campaign_name = $campaign_list[0]->name;
249
+        }
250
+    }
251 251
 
252
-	function get_list_view_data(){
252
+    function get_list_view_data(){
253 253
 
254
-		$temp_array = parent::get_list_view_data();
254
+        $temp_array = parent::get_list_view_data();
255 255
 
256
-		$temp_array["ENCODED_NAME"] = $this->name;
256
+        $temp_array["ENCODED_NAME"] = $this->name;
257 257
 
258
-		if(!empty($this->billing_address_state))
259
-		{
260
-			$temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state;
261
-		}
262
-		else
263
-		{
264
-			$temp_array["CITY"] = $this->billing_address_city;
265
-		}
266
-		$temp_array["BILLING_ADDRESS_STREET"]  = $this->billing_address_street;
267
-		$temp_array["SHIPPING_ADDRESS_STREET"] = $this->shipping_address_street;
258
+        if(!empty($this->billing_address_state))
259
+        {
260
+            $temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state;
261
+        }
262
+        else
263
+        {
264
+            $temp_array["CITY"] = $this->billing_address_city;
265
+        }
266
+        $temp_array["BILLING_ADDRESS_STREET"]  = $this->billing_address_street;
267
+        $temp_array["SHIPPING_ADDRESS_STREET"] = $this->shipping_address_street;
268 268
 
269
-		return $temp_array;
270
-	}
271
-	/**
269
+        return $temp_array;
270
+    }
271
+    /**
272 272
 		builds a generic search based on the query string using or
273 273
 		do not include any $this-> because this is called on without having the class instantiated
274
-	*/
275
-	function build_generic_where_clause ($the_query_string) {
276
-	$where_clauses = Array();
277
-	$the_query_string = $this->db->quote($the_query_string);
278
-	array_push($where_clauses, "accounts.name like '$the_query_string%'");
279
-	if (is_numeric($the_query_string)) {
280
-		array_push($where_clauses, "accounts.phone_alternate like '%$the_query_string%'");
281
-		array_push($where_clauses, "accounts.phone_fax like '%$the_query_string%'");
282
-		array_push($where_clauses, "accounts.phone_office like '%$the_query_string%'");
283
-	}
284
-
285
-	$the_where = "";
286
-	foreach($where_clauses as $clause)
287
-	{
288
-		if(!empty($the_where)) $the_where .= " or ";
289
-		$the_where .= $clause;
290
-	}
291
-
292
-	return $the_where;
274
+     */
275
+    function build_generic_where_clause ($the_query_string) {
276
+    $where_clauses = Array();
277
+    $the_query_string = $this->db->quote($the_query_string);
278
+    array_push($where_clauses, "accounts.name like '$the_query_string%'");
279
+    if (is_numeric($the_query_string)) {
280
+        array_push($where_clauses, "accounts.phone_alternate like '%$the_query_string%'");
281
+        array_push($where_clauses, "accounts.phone_fax like '%$the_query_string%'");
282
+        array_push($where_clauses, "accounts.phone_office like '%$the_query_string%'");
283
+    }
284
+
285
+    $the_where = "";
286
+    foreach($where_clauses as $clause)
287
+    {
288
+        if(!empty($the_where)) $the_where .= " or ";
289
+        $the_where .= $clause;
290
+    }
291
+
292
+    return $the_where;
293 293
 }
294 294
 
295 295
 
@@ -297,24 +297,24 @@  discard block
 block discarded – undo
297 297
         {
298 298
             $custom_join = $this->getCustomJoin(true, true, $where);
299 299
             $custom_join['join'] .= $relate_link_join;
300
-                         $query = "SELECT
300
+                            $query = "SELECT
301 301
                                 accounts.*,
302 302
                                 email_addresses.email_address email_address,
303 303
                                 '' email_addresses_non_primary, " . // email_addresses_non_primary needed for get_field_order_mapping()
304 304
                                 "accounts.name as account_name,
305 305
                                 users.user_name as assigned_user_name ";
306 306
             $query .= $custom_join['select'];
307
-						 $query .= " FROM accounts ";
308
-                         $query .= "LEFT JOIN users
307
+                            $query .= " FROM accounts ";
308
+                            $query .= "LEFT JOIN users
309 309
 	                                ON accounts.assigned_user_id=users.id ";
310 310
 
311
-						//join email address table too.
312
-						$query .=  ' LEFT JOIN  email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Accounts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
313
-						$query .=  ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
311
+                        //join email address table too.
312
+                        $query .=  ' LEFT JOIN  email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Accounts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
313
+                        $query .=  ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
314 314
 
315 315
             $query .= $custom_join['join'];
316 316
 
317
-		        $where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )";
317
+                $where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )";
318 318
 
319 319
                 if($where != "")
320 320
                         $query .= "where ($where) AND ".$where_auto;
@@ -329,32 +329,32 @@  discard block
 block discarded – undo
329 329
                 return $query;
330 330
         }
331 331
 
332
-	function set_notification_body($xtpl, $account)
333
-	{
334
-		$xtpl->assign("ACCOUNT_NAME", $account->name);
335
-		$xtpl->assign("ACCOUNT_TYPE", $account->account_type);
336
-		$xtpl->assign("ACCOUNT_DESCRIPTION", $account->description);
332
+    function set_notification_body($xtpl, $account)
333
+    {
334
+        $xtpl->assign("ACCOUNT_NAME", $account->name);
335
+        $xtpl->assign("ACCOUNT_TYPE", $account->account_type);
336
+        $xtpl->assign("ACCOUNT_DESCRIPTION", $account->description);
337 337
 
338
-		return $xtpl;
339
-	}
338
+        return $xtpl;
339
+    }
340 340
 
341
-	function bean_implements($interface){
342
-		switch($interface){
343
-			case 'ACL':return true;
344
-		}
345
-		return false;
346
-	}
347
-	function get_unlinked_email_query($type=array()) {
348
-
349
-		return get_unlinked_email_query($type, $this);
350
-	}
351
-
352
-	/**
353
-	 * Create a query string for select Products/Services Purchased list from database.
354
-	 * @return string final query
355
-	 */
356
-	public function getProductsServicesPurchasedQuery() {
357
-		$query = "
341
+    function bean_implements($interface){
342
+        switch($interface){
343
+            case 'ACL':return true;
344
+        }
345
+        return false;
346
+    }
347
+    function get_unlinked_email_query($type=array()) {
348
+
349
+        return get_unlinked_email_query($type, $this);
350
+    }
351
+
352
+    /**
353
+     * Create a query string for select Products/Services Purchased list from database.
354
+     * @return string final query
355
+     */
356
+    public function getProductsServicesPurchasedQuery() {
357
+        $query = "
358 358
 			SELECT
359 359
 				aos_products_quotes.*
360 360
 			FROM
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 			JOIN accounts ON accounts.id = aos_quotes.billing_account_id AND accounts.id = '{$this->id}'
364 364
 
365 365
 			";
366
-		return $query;
367
-	}
366
+        return $query;
367
+    }
368 368
 
369 369
 }
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 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.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	var $assigned_user_name;
117 117
 	var $account_id = '';
118 118
 	var $account_name = '';
119
-	var $bug_id ='';
119
+	var $bug_id = '';
120 120
 	var $module_dir = 'Accounts';
121 121
 	var $emailAddress;
122 122
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	);
131 131
 	var $relationship_fields = Array('opportunity_id'=>'opportunities', 'bug_id' => 'bugs', 'case_id'=>'cases',
132 132
 									'contact_id'=>'contacts', 'task_id'=>'tasks', 'note_id'=>'notes',
133
-									'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails','member_id'=>'members',
133
+									'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails', 'member_id'=>'members',
134 134
 									'project_id'=>'project',
135 135
 									);
136 136
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 		foreach ($this->field_defs as $field)
148 148
 		{
149
-			if(isset($field['name']))
149
+			if (isset($field['name']))
150 150
 			{
151 151
 				$this->field_name_map[$field['name']] = $field;
152 152
 			}
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 	/**
165 165
 	 * @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
166 166
 	 */
167
-	public function Account(){
167
+	public function Account() {
168 168
 		$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
169
-		if(isset($GLOBALS['log'])) {
169
+		if (isset($GLOBALS['log'])) {
170 170
 			$GLOBALS['log']->deprecated($deprecatedMessage);
171 171
 		}
172 172
 		else {
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 
183 183
 	function get_contacts() {
184
-		return $this->get_linked_beans('contacts','Contact');
184
+		return $this->get_linked_beans('contacts', 'Contact');
185 185
 	}
186 186
 
187 187
 
188 188
 
189
-	function clear_account_case_relationship($account_id='', $case_id='')
189
+	function clear_account_case_relationship($account_id = '', $case_id = '')
190 190
 	{
191 191
 		if (empty($case_id)) $where = '';
192 192
 		else $where = " and id = '$case_id'";
193
-		$query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 " . $where;
194
-		$this->db->query($query,true,"Error clearing account to case relationship: ");
193
+		$query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 ".$where;
194
+		$this->db->query($query, true, "Error clearing account to case relationship: ");
195 195
 	}
196 196
 
197 197
 	/**
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
 
223 223
         //rrs bug: 28184 - instead of removing this code altogether just adding this check to ensure that if the parent_name
224 224
         //is empty then go ahead and fill it.
225
-        if(empty($this->parent_name) && !empty($this->id)){
225
+        if (empty($this->parent_name) && !empty($this->id)) {
226 226
 			$query = "SELECT a1.name from accounts a1, accounts a2 where a1.id = a2.parent_id and a2.id = '$this->id' and a1.deleted=0";
227
-			$result = $this->db->query($query,true," Error filling in additional detail fields: ");
227
+			$result = $this->db->query($query, true, " Error filling in additional detail fields: ");
228 228
 
229 229
 			// Get the id and the name.
230 230
 			$row = $this->db->fetchByAssoc($result);
231 231
 
232
-			if($row != null)
232
+			if ($row != null)
233 233
 			{
234 234
 				$this->parent_name = $row['name'];
235 235
 			}
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
 
242 242
         // Set campaign name if there is a campaign id
243
-		if( !empty($this->campaign_id)){
243
+		if (!empty($this->campaign_id)) {
244 244
 
245 245
 			$camp = new Campaign();
246 246
 		    $where = "campaigns.id='{$this->campaign_id}'";
@@ -249,15 +249,15 @@  discard block
 block discarded – undo
249 249
 		}
250 250
 	}
251 251
 
252
-	function get_list_view_data(){
252
+	function get_list_view_data() {
253 253
 
254 254
 		$temp_array = parent::get_list_view_data();
255 255
 
256 256
 		$temp_array["ENCODED_NAME"] = $this->name;
257 257
 
258
-		if(!empty($this->billing_address_state))
258
+		if (!empty($this->billing_address_state))
259 259
 		{
260
-			$temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state;
260
+			$temp_array["CITY"] = $this->billing_address_city.', '.$this->billing_address_state;
261 261
 		}
262 262
 		else
263 263
 		{
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		builds a generic search based on the query string using or
273 273
 		do not include any $this-> because this is called on without having the class instantiated
274 274
 	*/
275
-	function build_generic_where_clause ($the_query_string) {
275
+	function build_generic_where_clause($the_query_string) {
276 276
 	$where_clauses = Array();
277 277
 	$the_query_string = $this->db->quote($the_query_string);
278 278
 	array_push($where_clauses, "accounts.name like '$the_query_string%'");
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
 	}
284 284
 
285 285
 	$the_where = "";
286
-	foreach($where_clauses as $clause)
286
+	foreach ($where_clauses as $clause)
287 287
 	{
288
-		if(!empty($the_where)) $the_where .= " or ";
288
+		if (!empty($the_where)) $the_where .= " or ";
289 289
 		$the_where .= $clause;
290 290
 	}
291 291
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 }
294 294
 
295 295
 
296
-        function create_export_query($order_by, $where, $relate_link_join='')
296
+        function create_export_query($order_by, $where, $relate_link_join = '')
297 297
         {
298 298
             $custom_join = $this->getCustomJoin(true, true, $where);
299 299
             $custom_join['join'] .= $relate_link_join;
@@ -309,21 +309,21 @@  discard block
 block discarded – undo
309 309
 	                                ON accounts.assigned_user_id=users.id ";
310 310
 
311 311
 						//join email address table too.
312
-						$query .=  ' LEFT JOIN  email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Accounts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
313
-						$query .=  ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
312
+						$query .= ' LEFT JOIN  email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Accounts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
313
+						$query .= ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ';
314 314
 
315 315
             $query .= $custom_join['join'];
316 316
 
317 317
 		        $where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )";
318 318
 
319
-                if($where != "")
319
+                if ($where != "")
320 320
                         $query .= "where ($where) AND ".$where_auto;
321 321
                 else
322 322
                         $query .= "where ".$where_auto;
323 323
 
324 324
         $order_by = $this->process_order_by($order_by);
325 325
         if (!empty($order_by)) {
326
-            $query .= ' ORDER BY ' . $order_by;
326
+            $query .= ' ORDER BY '.$order_by;
327 327
         }
328 328
 
329 329
                 return $query;
@@ -338,13 +338,13 @@  discard block
 block discarded – undo
338 338
 		return $xtpl;
339 339
 	}
340 340
 
341
-	function bean_implements($interface){
342
-		switch($interface){
341
+	function bean_implements($interface) {
342
+		switch ($interface) {
343 343
 			case 'ACL':return true;
344 344
 		}
345 345
 		return false;
346 346
 	}
347
-	function get_unlinked_email_query($type=array()) {
347
+	function get_unlinked_email_query($type = array()) {
348 348
 
349 349
 		return get_unlinked_email_query($type, $this);
350 350
 	}
Please login to merge, or discard this patch.
Braces   +19 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.
@@ -168,8 +170,7 @@  discard block
 block discarded – undo
168 170
 		$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
169 171
 		if(isset($GLOBALS['log'])) {
170 172
 			$GLOBALS['log']->deprecated($deprecatedMessage);
171
-		}
172
-		else {
173
+		} else {
173 174
 			trigger_error($deprecatedMessage, E_USER_DEPRECATED);
174 175
 		}
175 176
 		self::__construct();
@@ -188,8 +189,11 @@  discard block
 block discarded – undo
188 189
 
189 190
 	function clear_account_case_relationship($account_id='', $case_id='')
190 191
 	{
191
-		if (empty($case_id)) $where = '';
192
-		else $where = " and id = '$case_id'";
192
+		if (empty($case_id)) {
193
+		    $where = '';
194
+		} else {
195
+		    $where = " and id = '$case_id'";
196
+		}
193 197
 		$query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 " . $where;
194 198
 		$this->db->query($query,true,"Error clearing account to case relationship: ");
195 199
 	}
@@ -232,8 +236,7 @@  discard block
 block discarded – undo
232 236
 			if($row != null)
233 237
 			{
234 238
 				$this->parent_name = $row['name'];
235
-			}
236
-			else
239
+			} else
237 240
 			{
238 241
 				$this->parent_name = '';
239 242
 			}
@@ -258,8 +261,7 @@  discard block
 block discarded – undo
258 261
 		if(!empty($this->billing_address_state))
259 262
 		{
260 263
 			$temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state;
261
-		}
262
-		else
264
+		} else
263 265
 		{
264 266
 			$temp_array["CITY"] = $this->billing_address_city;
265 267
 		}
@@ -285,7 +287,9 @@  discard block
 block discarded – undo
285 287
 	$the_where = "";
286 288
 	foreach($where_clauses as $clause)
287 289
 	{
288
-		if(!empty($the_where)) $the_where .= " or ";
290
+		if(!empty($the_where)) {
291
+		    $the_where .= " or ";
292
+		}
289 293
 		$the_where .= $clause;
290 294
 	}
291 295
 
@@ -316,10 +320,11 @@  discard block
 block discarded – undo
316 320
 
317 321
 		        $where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )";
318 322
 
319
-                if($where != "")
320
-                        $query .= "where ($where) AND ".$where_auto;
321
-                else
322
-                        $query .= "where ".$where_auto;
323
+                if($where != "") {
324
+                                        $query .= "where ($where) AND ".$where_auto;
325
+                } else {
326
+                                        $query .= "where ".$where_auto;
327
+                }
323 328
 
324 329
         $order_by = $this->process_order_by($order_by);
325 330
         if (!empty($order_by)) {
Please login to merge, or discard this patch.
modules/AOP_Case_Events/AOP_Case_Events_sugar.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	var $table_name = 'aop_case_events';
37 37
 	var $tracker_visibility = false;
38 38
 	var $importable = false;
39
-	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
39
+	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
40 40
 		var $id;
41 41
 		var $name;
42 42
 		var $date_entered;
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
 		var $assigned_user_name;
54 54
 		var $assigned_user_link;
55 55
 
56
-    public function __construct(){
56
+    public function __construct() {
57 57
 		parent::__construct();
58 58
 	}
59 59
 
60 60
     /**
61 61
      * @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
62 62
      */
63
-    public function AOP_Case_Events_sugar(){
63
+    public function AOP_Case_Events_sugar() {
64 64
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
65
-        if(isset($GLOBALS['log'])) {
65
+        if (isset($GLOBALS['log'])) {
66 66
             $GLOBALS['log']->deprecated($deprecatedMessage);
67 67
         }
68 68
         else {
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
     }
73 73
 
74 74
 
75
-	function bean_implements($interface){
76
-		switch($interface){
75
+	function bean_implements($interface) {
76
+		switch ($interface) {
77 77
 			case 'ACL': return true;
78 78
 		}
79 79
 		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/AOP_Case_Events/AOP_Case_Events.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@
 block discarded – undo
40 40
 require_once('modules/AM_TaskTemplates/AM_TaskTemplates_sugar.php');
41 41
 class AM_TaskTemplates extends AM_TaskTemplates_sugar {
42 42
 
43
-	public function __construct(){
44
-		parent::__construct();
45
-	}
43
+    public function __construct(){
44
+        parent::__construct();
45
+    }
46 46
 
47 47
     /**
48 48
      * @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
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
 require_once('modules/AOP_Case_Events/AOP_Case_Events_sugar.php');
29 29
 class AOP_Case_Events extends AOP_Case_Events_sugar {
30 30
 
31
-	public function __construct(){
31
+	public function __construct() {
32 32
 		parent::__construct();
33 33
 	}
34 34
 
35 35
     /**
36 36
      * @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
37 37
      */
38
-    public function AOP_Case_Events(){
38
+    public function AOP_Case_Events() {
39 39
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
40
-        if(isset($GLOBALS['log'])) {
40
+        if (isset($GLOBALS['log'])) {
41 41
             $GLOBALS['log']->deprecated($deprecatedMessage);
42 42
         }
43 43
         else {
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/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php 2 patches
Spacing   +27 added lines, -27 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.
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 
52 52
         parent::__construct($id, $def);
53 53
 
54
-        if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_CALLS', 'Calls');
54
+        if (empty($def['title'])) $this->title = translate('LBL_LIST_MY_CALLS', 'Calls');
55 55
         $this->searchFields = $dashletData['MyCallsDashlet']['searchFields'];
56
-        if(empty($def['filters'])){
57
-			if(isset($this->searchFields['status'])){
58
-				if(!empty($this->searchFields['status']['default'])){
56
+        if (empty($def['filters'])) {
57
+			if (isset($this->searchFields['status'])) {
58
+				if (!empty($this->searchFields['status']['default'])) {
59 59
                     $this->filters['status'] = $this->searchFields['status']['default'];
60 60
                 }
61 61
 			}
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * @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
74 74
      */
75
-    function MyCallsDashlet($id, $def = null){
75
+    function MyCallsDashlet($id, $def = null) {
76 76
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
77
-        if(isset($GLOBALS['log'])) {
77
+        if (isset($GLOBALS['log'])) {
78 78
             $GLOBALS['log']->deprecated($deprecatedMessage);
79 79
         }
80 80
         else {
@@ -88,45 +88,45 @@  discard block
 block discarded – undo
88 88
         $mod_strings = return_module_language($current_language, 'Calls');
89 89
 
90 90
         // handle myitems only differently --  set the custom query to show assigned meetings and invitee meetings
91
-        if($this->myItemsOnly) {
91
+        if ($this->myItemsOnly) {
92 92
         	//join with meeting_users table to process related users
93 93
        		$this->seedBean->listview_inner_join = array('LEFT JOIN  calls_users c_u on  c_u.call_id = calls.id');
94 94
 
95 95
         	//set the custom query to include assigned meetings
96
-            $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \'' . $current_user->id . '\' OR (c_u.user_id = \'' . $current_user->id . '\' AND c_u.deleted = 0  )) ';
96
+            $lvsParams['custom_where'] = ' AND (calls.assigned_user_id = \''.$current_user->id.'\' OR (c_u.user_id = \''.$current_user->id.'\' AND c_u.deleted = 0  )) ';
97 97
         }
98 98
 
99 99
         $this->myItemsOnly = false;
100 100
 		//query needs to be distinct to avoid multiple records being returned for the same meeting (one for each invited user),
101 101
 		//so we need to make sure date entered is also set so the sort can work with the group by
102
-		$lvsParams['custom_select']=', calls.date_entered ';
103
-		$lvsParams['distinct']=true;
102
+		$lvsParams['custom_select'] = ', calls.date_entered ';
103
+		$lvsParams['distinct'] = true;
104 104
 
105 105
         parent::process($lvsParams);
106 106
 
107 107
         $keys = array();
108
-        foreach($this->lvs->data['data'] as $num => $row) {
108
+        foreach ($this->lvs->data['data'] as $num => $row) {
109 109
             $keys[] = $row['ID'];
110 110
         }
111 111
 
112 112
 
113
-       if(!empty($keys)){
114
-            $query = "SELECT call_id, accept_status FROM calls_users WHERE deleted = 0 and user_id = '" . $current_user->id . "' AND call_id IN ('" . implode("','", $keys ). "')";
113
+       if (!empty($keys)) {
114
+            $query = "SELECT call_id, accept_status FROM calls_users WHERE deleted = 0 and user_id = '".$current_user->id."' AND call_id IN ('".implode("','", $keys)."')";
115 115
             $result = $GLOBALS['db']->query($query);
116 116
 
117
-            while($row = $GLOBALS['db']->fetchByAssoc($result)) {
117
+            while ($row = $GLOBALS['db']->fetchByAssoc($result)) {
118 118
                  $rowNums = $this->lvs->data['pageData']['idIndex'][$row['call_id']]; // figure out which rows have this guid
119
-                 foreach($rowNums as $rowNum) {
119
+                 foreach ($rowNums as $rowNum) {
120 120
                     $this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] = $row['accept_status'];
121 121
                  }
122 122
             }
123 123
        }
124 124
 
125
-        foreach($this->lvs->data['data'] as $rowNum => $row) {
126
-            if(empty($this->lvs->data['data'][$rowNum]['DURATION_HOURS']))  $this->lvs->data['data'][$rowNum]['DURATION'] = '0' . $mod_strings['LBL_HOURS_ABBREV'];
127
-            else $this->lvs->data['data'][$rowNum]['DURATION'] = $this->lvs->data['data'][$rowNum]['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'];
125
+        foreach ($this->lvs->data['data'] as $rowNum => $row) {
126
+            if (empty($this->lvs->data['data'][$rowNum]['DURATION_HOURS']))  $this->lvs->data['data'][$rowNum]['DURATION'] = '0'.$mod_strings['LBL_HOURS_ABBREV'];
127
+            else $this->lvs->data['data'][$rowNum]['DURATION'] = $this->lvs->data['data'][$rowNum]['DURATION_HOURS'].$mod_strings['LBL_HOURS_ABBREV'];
128 128
 
129
-            if(empty($this->lvs->data['data'][$rowNum]['DURATION_MINUTES']) || empty($this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']])) {
129
+            if (empty($this->lvs->data['data'][$rowNum]['DURATION_MINUTES']) || empty($this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']])) {
130 130
                 $this->lvs->data['data'][$rowNum]['DURATION'] .= '00';
131 131
             }
132 132
             else {
@@ -134,16 +134,16 @@  discard block
 block discarded – undo
134 134
             }
135 135
             if ($this->lvs->data['data'][$rowNum]['STATUS'] == $app_list_strings['meeting_status_dom']['Planned'])
136 136
             {
137
-                if ($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == ''){
137
+                if ($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == '') {
138 138
 					//if no status has been set, then do not show accept options
139 139
 					$this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = "<div id=\"accept".$this->id."\" ></div>";
140
-				}elseif($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == 'none')
140
+				}elseif ($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == 'none')
141 141
                 {
142 142
                     $this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = "<div id=\"accept".$this->id."\"><a title=\"".$app_list_strings['dom_meeting_accept_options']['accept'].
143
-                        "\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=accept', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
144
-                        SugarThemeRegistry::current()->getImage("accept_inline","border='0'",null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['accept']). "</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['tentative']."\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=tentative', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
145
-                        SugarThemeRegistry::current()->getImage("tentative_inline","border='0'", null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['tentative'])."</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['decline']. "\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=decline', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
146
-                        SugarThemeRegistry::current()->getImage("decline_inline","border='0'", null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['decline'])."</a></div>";
143
+                        "\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID']."&accept_status=accept', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
144
+                        SugarThemeRegistry::current()->getImage("accept_inline", "border='0'", null, null, '.gif', $app_list_strings['dom_meeting_accept_options']['accept'])."</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['tentative']."\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID']."&accept_status=tentative', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
145
+                        SugarThemeRegistry::current()->getImage("tentative_inline", "border='0'", null, null, '.gif', $app_list_strings['dom_meeting_accept_options']['tentative'])."</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['decline']."\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID']."&accept_status=decline', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
146
+                        SugarThemeRegistry::current()->getImage("decline_inline", "border='0'", null, null, '.gif', $app_list_strings['dom_meeting_accept_options']['decline'])."</a></div>";
147 147
                 }
148 148
                 else
149 149
                 {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
             $this->lvs->data['data'][$rowNum]['DURATION'] .= $mod_strings['LBL_MINSS_ABBREV'];
156 156
         }
157
-      $this->displayColumns[]= "set_accept_links";
157
+      $this->displayColumns[] = "set_accept_links";
158 158
     }
159 159
 
160 160
     function displayOptions() {
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.
@@ -51,7 +53,9 @@  discard block
 block discarded – undo
51 53
 
52 54
         parent::__construct($id, $def);
53 55
 
54
-        if(empty($def['title'])) $this->title = translate('LBL_LIST_MY_CALLS', 'Calls');
56
+        if(empty($def['title'])) {
57
+            $this->title = translate('LBL_LIST_MY_CALLS', 'Calls');
58
+        }
55 59
         $this->searchFields = $dashletData['MyCallsDashlet']['searchFields'];
56 60
         if(empty($def['filters'])){
57 61
 			if(isset($this->searchFields['status'])){
@@ -76,8 +80,7 @@  discard block
 block discarded – undo
76 80
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
77 81
         if(isset($GLOBALS['log'])) {
78 82
             $GLOBALS['log']->deprecated($deprecatedMessage);
79
-        }
80
-        else {
83
+        } else {
81 84
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
82 85
         }
83 86
         self::__construct($id, $def);
@@ -123,13 +126,15 @@  discard block
 block discarded – undo
123 126
        }
124 127
 
125 128
         foreach($this->lvs->data['data'] as $rowNum => $row) {
126
-            if(empty($this->lvs->data['data'][$rowNum]['DURATION_HOURS']))  $this->lvs->data['data'][$rowNum]['DURATION'] = '0' . $mod_strings['LBL_HOURS_ABBREV'];
127
-            else $this->lvs->data['data'][$rowNum]['DURATION'] = $this->lvs->data['data'][$rowNum]['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'];
129
+            if(empty($this->lvs->data['data'][$rowNum]['DURATION_HOURS'])) {
130
+                $this->lvs->data['data'][$rowNum]['DURATION'] = '0' . $mod_strings['LBL_HOURS_ABBREV'];
131
+            } else {
132
+                $this->lvs->data['data'][$rowNum]['DURATION'] = $this->lvs->data['data'][$rowNum]['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'];
133
+            }
128 134
 
129 135
             if(empty($this->lvs->data['data'][$rowNum]['DURATION_MINUTES']) || empty($this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']])) {
130 136
                 $this->lvs->data['data'][$rowNum]['DURATION'] .= '00';
131
-            }
132
-            else {
137
+            } else {
133 138
                 $this->lvs->data['data'][$rowNum]['DURATION'] .= $this->seedBean->minutes_values[$this->lvs->data['data'][$rowNum]['DURATION_MINUTES']];
134 139
             }
135 140
             if ($this->lvs->data['data'][$rowNum]['STATUS'] == $app_list_strings['meeting_status_dom']['Planned'])
@@ -137,15 +142,14 @@  discard block
 block discarded – undo
137 142
                 if ($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == ''){
138 143
 					//if no status has been set, then do not show accept options
139 144
 					$this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = "<div id=\"accept".$this->id."\" ></div>";
140
-				}elseif($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == 'none')
145
+				} elseif($this->lvs->data['data'][$rowNum]['ACCEPT_STATUS'] == 'none')
141 146
                 {
142 147
                     $this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = "<div id=\"accept".$this->id."\"><a title=\"".$app_list_strings['dom_meeting_accept_options']['accept'].
143 148
                         "\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=accept', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
144 149
                         SugarThemeRegistry::current()->getImage("accept_inline","border='0'",null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['accept']). "</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['tentative']."\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=tentative', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
145 150
                         SugarThemeRegistry::current()->getImage("tentative_inline","border='0'", null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['tentative'])."</a>&nbsp;<a title=\"".$app_list_strings['dom_meeting_accept_options']['decline']. "\" href=\"javascript:SUGAR.util.retrieveAndFill('index.php?module=Activities&to_pdf=1&action=SetAcceptStatus&id=".$this->id."&object_type=Call&object_id=".$this->lvs->data['data'][$rowNum]['ID'] . "&accept_status=decline', null, null, SUGAR.mySugar.retrieveDashlet, '{$this->id}');\">".
146 151
                         SugarThemeRegistry::current()->getImage("decline_inline","border='0'", null,null,'.gif',$app_list_strings['dom_meeting_accept_options']['decline'])."</a></div>";
147
-                }
148
-                else
152
+                } else
149 153
                 {
150 154
                     $this->lvs->data['data'][$rowNum]['SET_ACCEPT_LINKS'] = $app_list_strings['dom_meeting_accept_status'][$this->lvs->data['data'][$rowNum]['ACCEPT_STATUS']];
151 155
 
Please login to merge, or discard this patch.
modules/Project/views/view.edit.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,16 +41,16 @@
 block discarded – undo
41 41
 
42 42
 class ProjectViewEdit extends ViewEdit {
43 43
 
44
- 	function __construct(){
44
+ 	function __construct() {
45 45
  		parent::__construct();
46 46
  	}
47 47
 
48 48
     /**
49 49
      * @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
50 50
      */
51
-    function ProjectViewEdit(){
51
+    function ProjectViewEdit() {
52 52
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
53
-        if(isset($GLOBALS['log'])) {
53
+        if (isset($GLOBALS['log'])) {
54 54
             $GLOBALS['log']->deprecated($deprecatedMessage);
55 55
         }
56 56
         else {
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/Project/views/view.list.php 2 patches
Spacing   +8 added lines, -8 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
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 require_once('include/MVC/View/views/view.list.php');
52 52
 require_once('modules/Project/ProjectListViewSmarty.php');
53 53
 
54
-class ProjectViewList extends ViewList{
54
+class ProjectViewList extends ViewList {
55 55
  	function __construct()
56 56
  	{
57 57
  		parent::__construct();
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @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
62 62
      */
63
-    function ProjectViewList(){
63
+    function ProjectViewList() {
64 64
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
65
-        if(isset($GLOBALS['log'])) {
65
+        if (isset($GLOBALS['log'])) {
66 66
             $GLOBALS['log']->deprecated($deprecatedMessage);
67 67
         }
68 68
         else {
@@ -82,18 +82,18 @@  discard block
 block discarded – undo
82 82
 
83 83
         $this->lv->searchColumns = $this->searchForm->searchColumns;
84 84
 
85
-        if(!$this->headers)
85
+        if (!$this->headers)
86 86
             return;
87 87
 
88
-        if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
88
+        if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
89 89
         {
90 90
             $this->lv->setup($this->seed, 'include/ListView/ListViewGeneric.tpl', $this->where, $this->params);
91
-            $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
91
+            $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - '.$_REQUEST['saved_search_select_name']);
92 92
             echo $this->lv->display();
93 93
         }
94 94
     }
95 95
 
96
-    function preDisplay(){
96
+    function preDisplay() {
97 97
         $this->lv = new ProjectListViewSmarty();
98 98
     }
99 99
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 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
@@ -64,8 +66,7 @@  discard block
 block discarded – undo
64 66
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
65 67
         if(isset($GLOBALS['log'])) {
66 68
             $GLOBALS['log']->deprecated($deprecatedMessage);
67
-        }
68
-        else {
69
+        } else {
69 70
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
70 71
         }
71 72
         self::__construct();
@@ -82,8 +83,9 @@  discard block
 block discarded – undo
82 83
 
83 84
         $this->lv->searchColumns = $this->searchForm->searchColumns;
84 85
 
85
-        if(!$this->headers)
86
-            return;
86
+        if(!$this->headers) {
87
+                    return;
88
+        }
87 89
 
88 90
         if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
89 91
         {
Please login to merge, or discard this patch.