Passed
Push — scrutinizer-code-quality ( 27193c...09f5a1 )
by Adam
51:28
created
modules/Relationships/Relationship.php 4 patches
Spacing   +32 added lines, -32 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.
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 class Relationship extends SugarBean {
51 51
 
52
-	var $object_name='Relationship';
52
+	var $object_name = 'Relationship';
53 53
 	var $module_dir = 'Relationships';
54 54
 	var $new_schema = true;
55 55
 	var $table_name = 'relationships';
@@ -81,21 +81,21 @@  discard block
 block discarded – undo
81 81
 	 */
82 82
 	function is_self_referencing() {
83 83
 		if (empty($this->_self_referencing)) {
84
-			$this->_self_referencing=false;
84
+			$this->_self_referencing = false;
85 85
 
86 86
 			//is it self referencing, both table and key name from lhs and rhs should  be equal.
87 87
 			if ($this->lhs_table == $this->rhs_table && $this->lhs_key == $this->rhs_key) {
88
-				$this->_self_referencing=true;
88
+				$this->_self_referencing = true;
89 89
 			}
90 90
 		}
91 91
 		return $this->_self_referencing;
92 92
 	}
93 93
 
94 94
 	/*returns true if a relationship with provided name exists*/
95
-	static function exists($relationship_name,&$db) {
95
+	static function exists($relationship_name, &$db) {
96 96
 		$query = "SELECT relationship_name FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
97
-		$result = $db->query($query,true," Error searching relationships table..");
98
-		$row  =  $db->fetchByAssoc($result);
97
+		$result = $db->query($query, true, " Error searching relationships table..");
98
+		$row = $db->fetchByAssoc($result);
99 99
 		if ($row != null) {
100 100
 			return true;
101 101
 		}
@@ -103,27 +103,27 @@  discard block
 block discarded – undo
103 103
 		return false;
104 104
 	}
105 105
 
106
-	static function delete($relationship_name,&$db) {
106
+	static function delete($relationship_name, &$db) {
107 107
 
108 108
 		$query = "UPDATE relationships SET deleted=1 WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
109
-		$result = $db->query($query,true," Error updating relationships table for ".$relationship_name);
109
+		$result = $db->query($query, true, " Error updating relationships table for ".$relationship_name);
110 110
 
111 111
 	}
112 112
 
113 113
 
114
-	function get_other_module($relationship_name, $base_module, &$db){
114
+	function get_other_module($relationship_name, $base_module, &$db) {
115 115
 	//give it the relationship_name and base module
116 116
 	//it will return the module name on the other side of the relationship
117 117
 
118 118
 		$query = "SELECT relationship_name, rhs_module, lhs_module FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
119
-		$result = $db->query($query,true," Error searching relationships table..");
120
-		$row  =  $db->fetchByAssoc($result);
119
+		$result = $db->query($query, true, " Error searching relationships table..");
120
+		$row = $db->fetchByAssoc($result);
121 121
 		if ($row != null) {
122 122
 
123
-			if($row['rhs_module']==$base_module){
123
+			if ($row['rhs_module'] == $base_module) {
124 124
 				return $row['lhs_module'];
125 125
 			}
126
-			if($row['lhs_module']==$base_module){
126
+			if ($row['lhs_module'] == $base_module) {
127 127
 				return $row['rhs_module'];
128 128
 			}
129 129
 		}
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	//end function get_other_module
135 135
 	}
136 136
 
137
-	function retrieve_by_sides($lhs_module, $rhs_module, &$db){
137
+	function retrieve_by_sides($lhs_module, $rhs_module, &$db) {
138 138
 	//give it the relationship_name and base module
139 139
 	//it will return the module name on the other side of the relationship
140 140
 
141 141
 		$query = "SELECT * FROM relationships WHERE deleted=0 AND lhs_module = '".$lhs_module."' AND rhs_module = '".$rhs_module."'";
142
-		$result = $db->query($query,true," Error searching relationships table..");
143
-		$row  =  $db->fetchByAssoc($result);
142
+		$result = $db->query($query, true, " Error searching relationships table..");
143
+		$row = $db->fetchByAssoc($result);
144 144
 		if ($row != null) {
145 145
 
146 146
 			return $row;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	//end function retrieve_by_sides
154 154
 	}
155 155
 
156
-	static function retrieve_by_modules($lhs_module, $rhs_module, &$db, $type =''){
156
+	static function retrieve_by_modules($lhs_module, $rhs_module, &$db, $type = '') {
157 157
 	//give it the relationship_name and base module
158 158
 	//it will return the module name on the other side of the relationship
159 159
 
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
 					(lhs_module = '".$rhs_module."' AND rhs_module = '".$lhs_module."')
166 166
 					)
167 167
 					";
168
-		if(!empty($type)){
168
+		if (!empty($type)) {
169 169
 			$query .= " AND relationship_type='$type'";
170 170
 		}
171
-		$result = $db->query($query,true," Error searching relationships table..");
172
-		$row  =  $db->fetchByAssoc($result);
171
+		$result = $db->query($query, true, " Error searching relationships table..");
172
+		$row = $db->fetchByAssoc($result);
173 173
 		if ($row != null) {
174 174
 
175 175
 			return $row['relationship_name'];
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
 		if (array_key_exists($relationship_name, $GLOBALS['relationships'])) {
195 195
 
196
-			foreach($GLOBALS['relationships'][$relationship_name] as $field=>$value)
196
+			foreach ($GLOBALS['relationships'][$relationship_name] as $field=>$value)
197 197
 			{
198 198
 					$this->$field = $value;
199 199
 			}
@@ -209,20 +209,20 @@  discard block
 block discarded – undo
209 209
 			$this->build_relationship_cache();
210 210
 		}
211 211
 		include(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only());
212
-		$GLOBALS['relationships']=$relationships;
212
+		$GLOBALS['relationships'] = $relationships;
213 213
 	}
214 214
 
215 215
 	function build_relationship_cache() {
216
-		$query="SELECT * from relationships where deleted=0";
217
-		$result=$this->db->query($query);
216
+		$query = "SELECT * from relationships where deleted=0";
217
+		$result = $this->db->query($query);
218 218
 
219
-		while (($row=$this->db->fetchByAssoc($result))!=null) {
219
+		while (($row = $this->db->fetchByAssoc($result)) != null) {
220 220
 			$relationships[$row['relationship_name']] = $row;
221 221
 		}
222 222
 		
223 223
 		sugar_mkdir($this->cache_file_dir(), null, true);
224
-        $out = "<?php \n \$relationships = " . var_export($relationships, true) . ";";
225
-        sugar_file_put_contents_atomic(Relationship::cache_file_dir() . '/' . Relationship::cache_file_name_only(), $out);
224
+        $out = "<?php \n \$relationships = ".var_export($relationships, true).";";
225
+        sugar_file_put_contents_atomic(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only(), $out);
226 226
 		
227 227
         require_once("data/Relationships/RelationshipFactory.php");
228 228
         SugarRelationshipFactory::deleteCache();
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	}
238 238
 	
239 239
 	public static function delete_cache() {
240
-		$filename=Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only();
240
+		$filename = Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only();
241 241
 		if (file_exists($filename)) {
242 242
 			unlink($filename);
243 243
 		}
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	}
247 247
 
248 248
 
249
-	function trace_relationship_module($base_module, $rel_module1_name, $rel_module2_name=""){
249
+	function trace_relationship_module($base_module, $rel_module1_name, $rel_module2_name = "") {
250 250
 		global $beanList;
251 251
 		global $dictionary;
252 252
 
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 		$rel_module1 = $this->get_other_module($rel_attribute1_name, $base_module, $temp_module->db);
257 257
 		$rel_module1_bean = get_module_info($rel_module1);
258 258
 
259
-		if($rel_module2_name!=""){
260
-			if($rel_module2_name == 'ProjectTask'){
259
+		if ($rel_module2_name != "") {
260
+			if ($rel_module2_name == 'ProjectTask') {
261 261
 				$rel_module2_name = strtolower($rel_module2_name);
262 262
 			}
263 263
 			$rel_attribute2_name = $rel_module1_bean->field_defs[strtolower($rel_module2_name)]['relationship'];
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 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.
@@ -197,8 +199,7 @@  discard block
 block discarded – undo
197 199
 			{
198 200
 					$this->$field = $value;
199 201
 			}
200
-		}
201
-		else {
202
+		} else {
202 203
 			$GLOBALS['log']->fatal('Error fetching relationship from cache '.$relationship_name);
203 204
 			return false;
204 205
 		}
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -246,6 +246,9 @@
 block discarded – undo
246 246
 	}
247 247
 
248 248
 
249
+	/**
250
+	 * @param string $base_module
251
+	 */
249 252
 	function trace_relationship_module($base_module, $rel_module1_name, $rel_module2_name=""){
250 253
 		global $beanList;
251 254
 		global $dictionary;
Please login to merge, or discard this patch.
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -49,115 +49,115 @@  discard block
 block discarded – undo
49 49
 
50 50
 class Relationship extends SugarBean {
51 51
 
52
-	var $object_name='Relationship';
53
-	var $module_dir = 'Relationships';
54
-	var $new_schema = true;
55
-	var $table_name = 'relationships';
56
-
57
-	var $id;
58
-	var $relationship_name;
59
-	var $lhs_module;
60
-	var $lhs_table;
61
-	var $lhs_key;
62
-	var $rhs_module;
63
-	var $rhs_table;
64
-	var $rhs_key;
65
-	var $join_table;
66
-	var $join_key_lhs;
67
-	var $join_key_rhs;
68
-	var $relationship_type;
69
-	var $relationship_role_column;
70
-	var $relationship_role_column_value;
71
-	var $reverse;
72
-
73
-	var $_self_referencing;
52
+    var $object_name='Relationship';
53
+    var $module_dir = 'Relationships';
54
+    var $new_schema = true;
55
+    var $table_name = 'relationships';
56
+
57
+    var $id;
58
+    var $relationship_name;
59
+    var $lhs_module;
60
+    var $lhs_table;
61
+    var $lhs_key;
62
+    var $rhs_module;
63
+    var $rhs_table;
64
+    var $rhs_key;
65
+    var $join_table;
66
+    var $join_key_lhs;
67
+    var $join_key_rhs;
68
+    var $relationship_type;
69
+    var $relationship_role_column;
70
+    var $relationship_role_column_value;
71
+    var $reverse;
72
+
73
+    var $_self_referencing;
74 74
 
75 75
     public function __construct() {
76
-		parent::__construct();
77
-	}
76
+        parent::__construct();
77
+    }
78 78
 
79
-	/*returns true if the relationship is self referencing. equality check is performed for both table and
79
+    /*returns true if the relationship is self referencing. equality check is performed for both table and
80 80
 	 * key names.
81 81
 	 */
82
-	function is_self_referencing() {
83
-		if (empty($this->_self_referencing)) {
84
-			$this->_self_referencing=false;
82
+    function is_self_referencing() {
83
+        if (empty($this->_self_referencing)) {
84
+            $this->_self_referencing=false;
85 85
 
86
-			//is it self referencing, both table and key name from lhs and rhs should  be equal.
87
-			if ($this->lhs_table == $this->rhs_table && $this->lhs_key == $this->rhs_key) {
88
-				$this->_self_referencing=true;
89
-			}
90
-		}
91
-		return $this->_self_referencing;
92
-	}
86
+            //is it self referencing, both table and key name from lhs and rhs should  be equal.
87
+            if ($this->lhs_table == $this->rhs_table && $this->lhs_key == $this->rhs_key) {
88
+                $this->_self_referencing=true;
89
+            }
90
+        }
91
+        return $this->_self_referencing;
92
+    }
93 93
 
94
-	/*returns true if a relationship with provided name exists*/
95
-	static function exists($relationship_name,&$db) {
96
-		$query = "SELECT relationship_name FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
97
-		$result = $db->query($query,true," Error searching relationships table..");
98
-		$row  =  $db->fetchByAssoc($result);
99
-		if ($row != null) {
100
-			return true;
101
-		}
94
+    /*returns true if a relationship with provided name exists*/
95
+    static function exists($relationship_name,&$db) {
96
+        $query = "SELECT relationship_name FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
97
+        $result = $db->query($query,true," Error searching relationships table..");
98
+        $row  =  $db->fetchByAssoc($result);
99
+        if ($row != null) {
100
+            return true;
101
+        }
102 102
 
103
-		return false;
104
-	}
103
+        return false;
104
+    }
105 105
 
106
-	static function delete($relationship_name,&$db) {
106
+    static function delete($relationship_name,&$db) {
107 107
 
108
-		$query = "UPDATE relationships SET deleted=1 WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
109
-		$result = $db->query($query,true," Error updating relationships table for ".$relationship_name);
108
+        $query = "UPDATE relationships SET deleted=1 WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
109
+        $result = $db->query($query,true," Error updating relationships table for ".$relationship_name);
110 110
 
111
-	}
111
+    }
112 112
 
113 113
 
114
-	function get_other_module($relationship_name, $base_module, &$db){
115
-	//give it the relationship_name and base module
116
-	//it will return the module name on the other side of the relationship
114
+    function get_other_module($relationship_name, $base_module, &$db){
115
+    //give it the relationship_name and base module
116
+    //it will return the module name on the other side of the relationship
117 117
 
118
-		$query = "SELECT relationship_name, rhs_module, lhs_module FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
119
-		$result = $db->query($query,true," Error searching relationships table..");
120
-		$row  =  $db->fetchByAssoc($result);
121
-		if ($row != null) {
118
+        $query = "SELECT relationship_name, rhs_module, lhs_module FROM relationships WHERE deleted=0 AND relationship_name = '".$relationship_name."'";
119
+        $result = $db->query($query,true," Error searching relationships table..");
120
+        $row  =  $db->fetchByAssoc($result);
121
+        if ($row != null) {
122 122
 
123
-			if($row['rhs_module']==$base_module){
124
-				return $row['lhs_module'];
125
-			}
126
-			if($row['lhs_module']==$base_module){
127
-				return $row['rhs_module'];
128
-			}
129
-		}
123
+            if($row['rhs_module']==$base_module){
124
+                return $row['lhs_module'];
125
+            }
126
+            if($row['lhs_module']==$base_module){
127
+                return $row['rhs_module'];
128
+            }
129
+        }
130 130
 
131
-		return false;
131
+        return false;
132 132
 
133 133
 
134
-	//end function get_other_module
135
-	}
134
+    //end function get_other_module
135
+    }
136 136
 
137
-	function retrieve_by_sides($lhs_module, $rhs_module, &$db){
138
-	//give it the relationship_name and base module
139
-	//it will return the module name on the other side of the relationship
137
+    function retrieve_by_sides($lhs_module, $rhs_module, &$db){
138
+    //give it the relationship_name and base module
139
+    //it will return the module name on the other side of the relationship
140 140
 
141
-		$query = "SELECT * FROM relationships WHERE deleted=0 AND lhs_module = '".$lhs_module."' AND rhs_module = '".$rhs_module."'";
142
-		$result = $db->query($query,true," Error searching relationships table..");
143
-		$row  =  $db->fetchByAssoc($result);
144
-		if ($row != null) {
141
+        $query = "SELECT * FROM relationships WHERE deleted=0 AND lhs_module = '".$lhs_module."' AND rhs_module = '".$rhs_module."'";
142
+        $result = $db->query($query,true," Error searching relationships table..");
143
+        $row  =  $db->fetchByAssoc($result);
144
+        if ($row != null) {
145 145
 
146
-			return $row;
146
+            return $row;
147 147
 
148
-		}
148
+        }
149 149
 
150
-		return null;
150
+        return null;
151 151
 
152 152
 
153
-	//end function retrieve_by_sides
154
-	}
153
+    //end function retrieve_by_sides
154
+    }
155 155
 
156
-	static function retrieve_by_modules($lhs_module, $rhs_module, &$db, $type =''){
157
-	//give it the relationship_name and base module
158
-	//it will return the module name on the other side of the relationship
156
+    static function retrieve_by_modules($lhs_module, $rhs_module, &$db, $type =''){
157
+    //give it the relationship_name and base module
158
+    //it will return the module name on the other side of the relationship
159 159
 
160
-		$query = "	SELECT * FROM relationships
160
+        $query = "	SELECT * FROM relationships
161 161
 					WHERE deleted=0
162 162
 					AND (
163 163
 					(lhs_module = '".$lhs_module."' AND rhs_module = '".$rhs_module."')
@@ -165,113 +165,113 @@  discard block
 block discarded – undo
165 165
 					(lhs_module = '".$rhs_module."' AND rhs_module = '".$lhs_module."')
166 166
 					)
167 167
 					";
168
-		if(!empty($type)){
169
-			$query .= " AND relationship_type='$type'";
170
-		}
171
-		$result = $db->query($query,true," Error searching relationships table..");
172
-		$row  =  $db->fetchByAssoc($result);
173
-		if ($row != null) {
168
+        if(!empty($type)){
169
+            $query .= " AND relationship_type='$type'";
170
+        }
171
+        $result = $db->query($query,true," Error searching relationships table..");
172
+        $row  =  $db->fetchByAssoc($result);
173
+        if ($row != null) {
174 174
 
175
-			return $row['relationship_name'];
175
+            return $row['relationship_name'];
176 176
 
177
-		}
177
+        }
178 178
 
179
-		return null;
179
+        return null;
180 180
 
181 181
 
182
-	//end function retrieve_by_sides
183
-	}
182
+    //end function retrieve_by_sides
183
+    }
184 184
 
185 185
 
186
-	function retrieve_by_name($relationship_name) {
186
+    function retrieve_by_name($relationship_name) {
187 187
 
188
-		if (empty($GLOBALS['relationships'])) {
189
-			$this->load_relationship_meta();
190
-		}
188
+        if (empty($GLOBALS['relationships'])) {
189
+            $this->load_relationship_meta();
190
+        }
191 191
 
192 192
 //		_ppd($GLOBALS['relationships']);
193 193
 
194
-		if (array_key_exists($relationship_name, $GLOBALS['relationships'])) {
195
-
196
-			foreach($GLOBALS['relationships'][$relationship_name] as $field=>$value)
197
-			{
198
-					$this->$field = $value;
199
-			}
200
-		}
201
-		else {
202
-			$GLOBALS['log']->fatal('Error fetching relationship from cache '.$relationship_name);
203
-			return false;
204
-		}
205
-	}
206
-
207
-	function load_relationship_meta() {
208
-		if (!file_exists(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only())) {
209
-			$this->build_relationship_cache();
210
-		}
211
-		include(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only());
212
-		$GLOBALS['relationships']=$relationships;
213
-	}
214
-
215
-	function build_relationship_cache() {
216
-		$query="SELECT * from relationships where deleted=0";
217
-		$result=$this->db->query($query);
218
-
219
-		while (($row=$this->db->fetchByAssoc($result))!=null) {
220
-			$relationships[$row['relationship_name']] = $row;
221
-		}
222
-
223
-		sugar_mkdir($this->cache_file_dir(), null, true);
194
+        if (array_key_exists($relationship_name, $GLOBALS['relationships'])) {
195
+
196
+            foreach($GLOBALS['relationships'][$relationship_name] as $field=>$value)
197
+            {
198
+                    $this->$field = $value;
199
+            }
200
+        }
201
+        else {
202
+            $GLOBALS['log']->fatal('Error fetching relationship from cache '.$relationship_name);
203
+            return false;
204
+        }
205
+    }
206
+
207
+    function load_relationship_meta() {
208
+        if (!file_exists(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only())) {
209
+            $this->build_relationship_cache();
210
+        }
211
+        include(Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only());
212
+        $GLOBALS['relationships']=$relationships;
213
+    }
214
+
215
+    function build_relationship_cache() {
216
+        $query="SELECT * from relationships where deleted=0";
217
+        $result=$this->db->query($query);
218
+
219
+        while (($row=$this->db->fetchByAssoc($result))!=null) {
220
+            $relationships[$row['relationship_name']] = $row;
221
+        }
222
+
223
+        sugar_mkdir($this->cache_file_dir(), null, true);
224 224
         $out = "<?php \n \$relationships = " . var_export($relationships, true) . ";";
225 225
         sugar_file_put_contents_atomic(Relationship::cache_file_dir() . '/' . Relationship::cache_file_name_only(), $out);
226 226
 
227 227
         require_once("data/Relationships/RelationshipFactory.php");
228 228
         SugarRelationshipFactory::deleteCache();
229
-	}
229
+    }
230 230
 
231 231
 
232
-	public static function cache_file_dir() {
233
-		return sugar_cached("modules/Relationships");
234
-	}
235
-	public static function cache_file_name_only() {
236
-		return 'relationships.cache.php';
237
-	}
232
+    public static function cache_file_dir() {
233
+        return sugar_cached("modules/Relationships");
234
+    }
235
+    public static function cache_file_name_only() {
236
+        return 'relationships.cache.php';
237
+    }
238 238
 
239
-	public static function delete_cache() {
240
-		$filename=Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only();
241
-		if (file_exists($filename)) {
242
-			unlink($filename);
243
-		}
239
+    public static function delete_cache() {
240
+        $filename=Relationship::cache_file_dir().'/'.Relationship::cache_file_name_only();
241
+        if (file_exists($filename)) {
242
+            unlink($filename);
243
+        }
244 244
         require_once("data/Relationships/RelationshipFactory.php");
245 245
         SugarRelationshipFactory::deleteCache();
246
-	}
246
+    }
247 247
 
248 248
 
249
-	function trace_relationship_module($base_module, $rel_module1_name, $rel_module2_name=""){
250
-		global $beanList;
251
-		global $dictionary;
249
+    function trace_relationship_module($base_module, $rel_module1_name, $rel_module2_name=""){
250
+        global $beanList;
251
+        global $dictionary;
252 252
 
253
-		$temp_module = get_module_info($base_module);
253
+        $temp_module = get_module_info($base_module);
254 254
 
255
-		$rel_attribute1_name = $temp_module->field_defs[strtolower($rel_module1_name)]['relationship'];
256
-		$rel_module1 = $this->get_other_module($rel_attribute1_name, $base_module, $temp_module->db);
257
-		$rel_module1_bean = get_module_info($rel_module1);
255
+        $rel_attribute1_name = $temp_module->field_defs[strtolower($rel_module1_name)]['relationship'];
256
+        $rel_module1 = $this->get_other_module($rel_attribute1_name, $base_module, $temp_module->db);
257
+        $rel_module1_bean = get_module_info($rel_module1);
258 258
 
259
-		if($rel_module2_name!=""){
260
-			if($rel_module2_name == 'ProjectTask'){
261
-				$rel_module2_name = strtolower($rel_module2_name);
262
-			}
263
-			$rel_attribute2_name = $rel_module1_bean->field_defs[strtolower($rel_module2_name)]['relationship'];
264
-			$rel_module2 = $this->get_other_module($rel_attribute2_name, $rel_module1_bean->module_dir, $rel_module1_bean->db);
265
-			$rel_module2_bean = get_module_info($rel_module2);
266
-			return $rel_module2_bean;
259
+        if($rel_module2_name!=""){
260
+            if($rel_module2_name == 'ProjectTask'){
261
+                $rel_module2_name = strtolower($rel_module2_name);
262
+            }
263
+            $rel_attribute2_name = $rel_module1_bean->field_defs[strtolower($rel_module2_name)]['relationship'];
264
+            $rel_module2 = $this->get_other_module($rel_attribute2_name, $rel_module1_bean->module_dir, $rel_module1_bean->db);
265
+            $rel_module2_bean = get_module_info($rel_module2);
266
+            return $rel_module2_bean;
267 267
 
268
-		} else {
269
-			//no rel_module2, so return rel_module2 bean
270
-			return $rel_module1_bean;
271
-		}
268
+        } else {
269
+            //no rel_module2, so return rel_module2 bean
270
+            return $rel_module1_bean;
271
+        }
272 272
 
273
-	//end function trace_relationship_module
274
-	}
273
+    //end function trace_relationship_module
274
+    }
275 275
 
276 276
 
277 277
 
Please login to merge, or discard this patch.
modules/jjwg_Maps/jjwg_Maps_Router.php 3 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@  discard block
 block discarded – undo
11 11
 
12 12
 if (!empty($_REQUEST['cron'])) {
13 13
   
14
-  require_once('modules/jjwg_Maps/jjwg_Maps.php');
15
-  require_once('modules/jjwg_Maps/controller.php');
16
-  /*
14
+    require_once('modules/jjwg_Maps/jjwg_Maps.php');
15
+    require_once('modules/jjwg_Maps/controller.php');
16
+    /*
17 17
    * This script can be used as an entry point for a cron
18 18
    * job to run the address geocoding on a regular basis.
19 19
    * index.php?module=jjwg_Maps&entryPoint=jjwg_Maps&cron=1&limit=2500
20 20
    */
21
-  $controller = new jjwg_MapsController();
22
-  $controller->action_geocode_addresses();
21
+    $controller = new jjwg_MapsController();
22
+    $controller->action_geocode_addresses();
23 23
   
24
-  exit;
24
+    exit;
25 25
 
26 26
 } else {
27 27
   
28
-  /*
28
+    /*
29 29
    * This script is also used to pass selected records from 
30 30
    * a module list view to the Maps Module (jjwg_Maps).
31 31
    *
@@ -45,25 +45,25 @@  discard block
 block discarded – undo
45 45
    * 4.) Parameter Search - Checked Records - Map
46 46
    *     Uses 'uid'(s) parameter to define search
47 47
    */
48
-  //echo 'Test:<pre>'."\n";
49
-  //foreach (array_keys($_REQUEST) as $key) {
50
-  //  echo 'Name: '.htmlspecialchars($key).'  Value: '.htmlspecialchars($_REQUEST[$key])."\n";
51
-  //}
48
+    //echo 'Test:<pre>'."\n";
49
+    //foreach (array_keys($_REQUEST) as $key) {
50
+    //  echo 'Name: '.htmlspecialchars($key).'  Value: '.htmlspecialchars($_REQUEST[$key])."\n";
51
+    //}
52 52
   
53
-  // Redirect parameters to view/action using Javascript form post.
54
-  echo '<html><head></head><body>';
55
-  echo '<form name="redirect" action="index.php" method="POST">'."\n";
56
-  echo '<input type="hidden" name="module" value="jjwg_Maps">'."\n";
57
-  echo '<input type="hidden" name="action" value="map_display">'."\n";
58
-  foreach (array_keys($_REQUEST) as $key) {
53
+    // Redirect parameters to view/action using Javascript form post.
54
+    echo '<html><head></head><body>';
55
+    echo '<form name="redirect" action="index.php" method="POST">'."\n";
56
+    echo '<input type="hidden" name="module" value="jjwg_Maps">'."\n";
57
+    echo '<input type="hidden" name="action" value="map_display">'."\n";
58
+    foreach (array_keys($_REQUEST) as $key) {
59 59
     if (!in_array($key, array('action','module','entryPoint','display_module', 'quick_address'))) {
60
-      echo '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($_REQUEST[$key]).'">'."\n";
60
+        echo '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($_REQUEST[$key]).'">'."\n";
61 61
     }
62
-  }
63
-  echo '<input type="hidden" name="display_module" value="'.htmlspecialchars($_REQUEST['display_module']).'">'."\n";
64
-  echo '</form>'."\n";
65
-  echo '<script language="javascript" type="text/javascript">document.redirect.submit();</script>'."\n"; 
66
-  echo '</body></html>';
62
+    }
63
+    echo '<input type="hidden" name="display_module" value="'.htmlspecialchars($_REQUEST['display_module']).'">'."\n";
64
+    echo '</form>'."\n";
65
+    echo '<script language="javascript" type="text/javascript">document.redirect.submit();</script>'."\n"; 
66
+    echo '</body></html>';
67 67
   
68
-  exit;
68
+    exit;
69 69
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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
 require_once('include/utils.php');
5 5
 require_once('include/export_utils.php');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
   echo '<input type="hidden" name="module" value="jjwg_Maps">'."\n";
57 57
   echo '<input type="hidden" name="action" value="map_display">'."\n";
58 58
   foreach (array_keys($_REQUEST) as $key) {
59
-    if (!in_array($key, array('action','module','entryPoint','display_module', 'quick_address'))) {
59
+    if (!in_array($key, array('action', 'module', 'entryPoint', 'display_module', 'quick_address'))) {
60 60
       echo '<input type="hidden" name="'.htmlspecialchars($key).'" value="'.htmlspecialchars($_REQUEST[$key]).'">'."\n";
61 61
     }
62 62
   }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.geocoding_test.php 3 patches
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if(!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewGeocoding_Test extends SugarView {
6 8
 
@@ -10,8 +12,10 @@  discard block
 block discarded – undo
10 12
 
11 13
 	function display() {
12 14
 		
13
-        if (!isset($_REQUEST['geocoding_address'])) $_REQUEST['geocoding_address'] = '';
14
-?>
15
+        if (!isset($_REQUEST['geocoding_address'])) {
16
+            $_REQUEST['geocoding_address'] = '';
17
+        }
18
+        ?>
15 19
 
16 20
 <div class="moduleTitle"><h2><?php echo $GLOBALS['mod_strings']['LBL_MAP_ADDRESS_TEST']; ?></h2><div class="clear"></div></div>
17 21
 <div class="clear"></div>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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.
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Jjwg_MapsViewGeocoding_Test extends SugarView {
6 6
 
7
- 	function __construct() {
8
- 		parent::__construct();
9
- 	}
7
+        function __construct() {
8
+            parent::__construct();
9
+        }
10 10
 
11
-	function display() {
11
+    function display() {
12 12
 
13 13
         if (!isset($_REQUEST['geocoding_address'])) $_REQUEST['geocoding_address'] = '';
14 14
 ?>
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 <?php
31 31
     if (!empty($_REQUEST['process_trigger'])) {
32 32
 
33
-      echo '<br /><br /><pre>';
34
-      print_r($this->bean->geocoding_results);
35
-      echo '</pre><br /><br />';
33
+        echo '<br /><br /><pre>';
34
+        print_r($this->bean->geocoding_results);
35
+        echo '</pre><br /><br />';
36 36
 
37 37
     }
38 38
 
39
-  }
39
+    }
40 40
 }
41 41
 
42 42
 ?>
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.map_display.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
4 4
 
5 5
 class Jjwg_MapsViewMap_Display extends SugarView {
6 6
 
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
   function display() {
12 12
     // Limit URI query string parameters. Used to avoid URL length errors.
13 13
     $valid_names = array('action', 'module', 'entryPoint', 'submit', 'cron', 'geocoding_process', 'process_trigger', 'distance', 'unit_type', 'record', 'related_id', 'related_module', 'quick_address', 'display_module', 'list_id', 'uid', 'current_post');
14
-    $url = $GLOBALS['sugar_config']['site_url'] . '/index.php?module=' . $GLOBALS['currentModule'] . '&action=map_markers';
14
+    $url = $GLOBALS['sugar_config']['site_url'].'/index.php?module='.$GLOBALS['currentModule'].'&action=map_markers';
15 15
     foreach (array_keys($_REQUEST) as $key) {
16 16
       if (in_array($key, $valid_names) && !in_array($key, array('action', 'module', 'entryPoint'))) {
17 17
         $url .= '&'.$key.'='.urlencode($_REQUEST[$key]);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Jjwg_MapsViewMap_Display extends SugarView {
6 6
 
7
-  function __construct() {
7
+    function __construct() {
8 8
     parent::__construct();
9
-  }
9
+    }
10 10
 
11
-  function display() {
11
+    function display() {
12 12
     // Limit URI query string parameters. Used to avoid URL length errors.
13 13
     $valid_names = array('action', 'module', 'entryPoint', 'submit', 'cron', 'geocoding_process', 'process_trigger', 'distance', 'unit_type', 'record', 'related_id', 'related_module', 'quick_address', 'display_module', 'list_id', 'uid', 'current_post');
14 14
     $url = $GLOBALS['sugar_config']['site_url'] . '/index.php?module=' . $GLOBALS['currentModule'] . '&action=map_markers';
15 15
     foreach (array_keys($_REQUEST) as $key) {
16
-      if (in_array($key, $valid_names) && !in_array($key, array('action', 'module', 'entryPoint'))) {
16
+        if (in_array($key, $valid_names) && !in_array($key, array('action', 'module', 'entryPoint'))) {
17 17
         $url .= '&'.$key.'='.urlencode($_REQUEST[$key]);
18
-      }
18
+        }
19 19
     }
20 20
 
21 21
 ?>
@@ -76,5 +76,5 @@  discard block
 block discarded – undo
76 76
 
77 77
 <?php
78 78
 
79
-  }
79
+    }
80 80
 }
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.map_markers.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
4 4
 
5 5
 class Jjwg_MapsViewMap_Markers extends SugarView {
6 6
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     // Define Custom Markers Dir and Common Icons
140 140
     $custom_markers_dir = 'custom/themes/default/images/jjwg_Markers/';
141 141
     $custom_markers_icons = array();
142
-    foreach($this->bean->custom_markers as $marker) {
142
+    foreach ($this->bean->custom_markers as $marker) {
143 143
       $custom_markers_icons[] = $marker['image'];
144 144
     }
145 145
     $num_custom_markers = count($this->bean->custom_markers);
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 ?>
905 905
   <!-- <b><?php echo $GLOBALS['mod_strings']['LBL_MAP_USER_GROUPS']; ?> </b><br/> -->
906 906
 <?php
907
-  foreach($group_name_to_num as $group_name => $group_number) {
907
+  foreach ($group_name_to_num as $group_name => $group_number) {
908 908
 ?>
909 909
     <img src="<?php echo './'.$icons_dir.'/marker_'.$group_number.'.png'; ?>" 
910 910
          rel="<?php echo $group_number; ?>" align="middle" />
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if(!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewMap_Markers extends SugarView {
6 8
 
@@ -98,8 +100,12 @@  discard block
 block discarded – undo
98 100
         // Define default point as map center
99 101
         $this->bean->map_center['lat'] = $GLOBALS['jjwg_config']['map_default_center_latitude'];
100 102
         $this->bean->map_center['lng'] = $GLOBALS['jjwg_config']['map_default_center_longitude'];
101
-        if (!isset($this->bean->map_center['html'])) $this->bean->map_center['html'] = $GLOBALS['mod_strings']['LBL_DEFAULT'];
102
-        if (!isset($this->bean->map_center['name'])) $this->bean->map_center['name'] = $GLOBALS['mod_strings']['LBL_DEFAULT'];
103
+        if (!isset($this->bean->map_center['html'])) {
104
+            $this->bean->map_center['html'] = $GLOBALS['mod_strings']['LBL_DEFAULT'];
105
+        }
106
+        if (!isset($this->bean->map_center['name'])) {
107
+            $this->bean->map_center['name'] = $GLOBALS['mod_strings']['LBL_DEFAULT'];
108
+        }
103 109
     }
104 110
 }
105 111
 ?>
@@ -112,7 +118,9 @@  discard block
 block discarded – undo
112 118
     // Define Map Data
113 119
     $num_markers = count($this->bean->map_markers);
114 120
     $num_groups = count($this->bean->map_markers_groups);
115
-    if ($num_groups > 216) $num_groups = 216;
121
+    if ($num_groups > 216) {
122
+        $num_groups = 216;
123
+    }
116 124
     $group_name_to_num = array();
117 125
     $i = 1;
118 126
     // Define Group Name to Icon Number Mapping 1-216(max)
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Jjwg_MapsViewMap_Markers extends SugarView {
6 6
 
7
-  function __construct() {
7
+    function __construct() {
8 8
     parent::__construct();
9
-  }
9
+    }
10 10
 
11
-  function display() {
11
+    function display() {
12 12
 
13 13
 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
14 14
 
@@ -125,22 +125,22 @@  discard block
 block discarded – undo
125 125
     // Define Dir of Group Icons
126 126
     $icons_dir_base = 'themes/default/images/jjwg_Maps/';
127 127
     if ($num_groups <= 10) {
128
-      $icons_dir = $icons_dir_base.'0-10/';
128
+        $icons_dir = $icons_dir_base.'0-10/';
129 129
     } elseif ($num_groups <= 25) {
130
-      $icons_dir = $icons_dir_base.'0-25/';
130
+        $icons_dir = $icons_dir_base.'0-25/';
131 131
     } elseif ($num_groups <= 100) {
132
-      $icons_dir = $icons_dir_base.'0-100/';
132
+        $icons_dir = $icons_dir_base.'0-100/';
133 133
     } elseif ($num_groups <= 216) {
134
-      $icons_dir = $icons_dir_base.'0-216/';
134
+        $icons_dir = $icons_dir_base.'0-216/';
135 135
     } else {
136
-      $icons_dir = $icons_dir_base.'0-10/'; // Demo Version
136
+        $icons_dir = $icons_dir_base.'0-10/'; // Demo Version
137 137
     }
138 138
 
139 139
     // Define Custom Markers Dir and Common Icons
140 140
     $custom_markers_dir = 'custom/themes/default/images/jjwg_Markers/';
141 141
     $custom_markers_icons = array();
142 142
     foreach($this->bean->custom_markers as $marker) {
143
-      $custom_markers_icons[] = $marker['image'];
143
+        $custom_markers_icons[] = $marker['image'];
144 144
     }
145 145
     $num_custom_markers = count($this->bean->custom_markers);
146 146
     $custom_markers_icons = array_unique($custom_markers_icons);
@@ -890,21 +890,21 @@  discard block
 block discarded – undo
890 890
   <br clear="all" />
891 891
 
892 892
 <?php
893
-  if (!empty($this->bean->map_center) || $num_markers > 0) {
893
+    if (!empty($this->bean->map_center) || $num_markers > 0) {
894 894
 ?>
895 895
   <div id="legend">
896 896
   <b><?php echo $GLOBALS['mod_strings']['LBL_MAP_LEGEND']; ?></b><br/>
897 897
 <?php
898
-  if (!empty($this->bean->map_center)) {
898
+    if (!empty($this->bean->map_center)) {
899 899
 ?>
900 900
     <img src="<?php echo './'.$icons_dir.'/marker_0.png'; ?>" align="middle" />
901 901
     <?php echo $this->bean->map_center['name']; ?><br/>
902 902
 <?php
903
-  }
903
+    }
904 904
 ?>
905 905
   <!-- <b><?php echo $GLOBALS['mod_strings']['LBL_MAP_USER_GROUPS']; ?> </b><br/> -->
906 906
 <?php
907
-  foreach($group_name_to_num as $group_name => $group_number) {
907
+    foreach($group_name_to_num as $group_name => $group_number) {
908 908
 ?>
909 909
     <img src="<?php echo './'.$icons_dir.'/marker_'.$group_number.'.png'; ?>"
910 910
          rel="<?php echo $group_number; ?>" align="middle" />
@@ -916,15 +916,15 @@  discard block
 block discarded – undo
916 916
     }
917 917
     ?><br/>
918 918
 <?php
919
-  }
919
+    }
920 920
 ?>
921 921
   </div>
922 922
 <?php
923
-  }
923
+    }
924 924
 ?>
925 925
 
926 926
 <?php
927
-  if ($num_markers > 0) {
927
+    if ($num_markers > 0) {
928 928
 ?>
929 929
     <div id="DataTable">
930 930
         <table cellpadding="3" cellspacing="0" border="1" width="100%" class="list view" id="displayDataTable">
@@ -947,11 +947,11 @@  discard block
 block discarded – undo
947 947
         </table>
948 948
     </div>
949 949
 <?php
950
-  }
950
+    }
951 951
 ?>
952 952
 
953 953
 <?php
954
-  if (in_array($this->bean->display_object->module_name, array('Accounts', 'Contacts', 'Leads', 'Prospects', 'Users')) &&
954
+    if (in_array($this->bean->display_object->module_name, array('Accounts', 'Contacts', 'Leads', 'Prospects', 'Users')) &&
955 955
           ($GLOBALS['current_user']->isAdmin() || $this->bean->ACLAccess('list')) &&
956 956
           empty($_REQUEST['list_id']) && !empty($this->bean->list_array)) {
957 957
 ?>
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
     </form>
973 973
 </div>
974 974
 <?php
975
-  }
975
+    }
976 976
 ?>
977 977
 
978 978
 </body>
@@ -992,5 +992,5 @@  discard block
 block discarded – undo
992 992
 </html>
993 993
 <?php
994 994
 
995
-   }
995
+    }
996 996
 }
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.quick_radius.php 3 patches
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if(!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewQuick_Radius extends SugarView {
6 8
 
@@ -10,8 +12,10 @@  discard block
 block discarded – undo
10 12
 
11 13
 	function display() {
12 14
 	
13
-        if (!isset($_REQUEST['quick_address'])) $_REQUEST['quick_address'] = '';
14
-?>
15
+        if (!isset($_REQUEST['quick_address'])) {
16
+            $_REQUEST['quick_address'] = '';
17
+        }
18
+        ?>
15 19
 
16 20
 <div class="moduleTitle"><h2><?php echo $GLOBALS['mod_strings']['LBL_MAP_QUICK_RADIUS']; ?><div class="clear"></div></h2></div>
17 21
 <div class="clear"></div>
@@ -38,7 +42,9 @@  discard block
 block discarded – undo
38 42
             <select id="display_module" tabindex="111" title="<?php echo $GLOBALS['mod_strings']['LBL_MODULE_TYPE']; ?>" name="display_module">
39 43
                 <?php foreach ($GLOBALS['jjwg_config']['valid_geocode_modules'] as $module) { ?>
40 44
                     <option value="<?php echo htmlspecialchars($module); ?>" <?php 
41
-                    if (!empty($_REQUEST['display_module']) && $module == $_REQUEST['display_module']) echo 'selected="selected"';
45
+                    if (!empty($_REQUEST['display_module']) && $module == $_REQUEST['display_module']) {
46
+                        echo 'selected="selected"';
47
+                    }
42 48
                     ?>><?php echo htmlspecialchars($GLOBALS['app_list_strings']['moduleList'][$module]); ?>
43 49
                 <?php } ?>
44 50
             </select>
@@ -54,7 +60,9 @@  discard block
 block discarded – undo
54 60
             <select id="unit_type" tabindex="131" title="<?php echo $GLOBALS['mod_strings']['LBL_DISTANCE']; ?>" name="unit_type">
55 61
                 <?php foreach ($GLOBALS['app_list_strings']['map_unit_type_list'] as $key=>$value) { ?>
56 62
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
57
-                    if ($key == $_REQUEST['unit_type']) echo 'selected="selected"';
63
+                    if ($key == $_REQUEST['unit_type']) {
64
+                        echo 'selected="selected"';
65
+                    }
58 66
                     ?>><?php echo htmlspecialchars($value); ?>
59 67
                 <?php } ?>
60 68
             </select>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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.
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Jjwg_MapsViewQuick_Radius extends SugarView {
6 6
 
7
- 	function __construct() {
8
- 		parent::__construct();
9
- 	}
7
+        function __construct() {
8
+            parent::__construct();
9
+        }
10 10
 
11
-	function display() {
11
+    function display() {
12 12
 
13 13
         if (!isset($_REQUEST['quick_address'])) $_REQUEST['quick_address'] = '';
14 14
 ?>
@@ -66,5 +66,5 @@  discard block
 block discarded – undo
66 66
 </form>
67 67
 
68 68
 <?php
69
-  }
69
+    }
70 70
 }
Please login to merge, or discard this patch.
modules/jjwg_Maps/views/view.config.php 2 patches
Braces   +45 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3
+if (!defined('sugarEntry') || !sugarEntry) {
4
+    die('Not A Valid Entry Point');
5
+}
4 6
 
5 7
 class Jjwg_MapsViewConfig extends SugarView {
6 8
 
@@ -113,7 +115,9 @@  discard block
 block discarded – undo
113 115
                 name="address_type_Accounts" title="">
114 116
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
115 117
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
116
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Accounts']) echo 'selected="selected"';
118
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Accounts']) {
119
+                        echo 'selected="selected"';
120
+                    }
117 121
                     ?>><?php echo htmlspecialchars($value); ?></option>
118 122
                 <?php } ?>
119 123
             </select>
@@ -130,7 +134,9 @@  discard block
 block discarded – undo
130 134
                 name="address_type_Contacts" title="">
131 135
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
132 136
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
133
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Contacts']) echo 'selected="selected"';
137
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Contacts']) {
138
+                        echo 'selected="selected"';
139
+                    }
134 140
                     ?>><?php echo htmlspecialchars($value); ?></option>
135 141
                 <?php } ?>
136 142
             </select>
@@ -147,7 +153,9 @@  discard block
 block discarded – undo
147 153
                 name="address_type_Leads" title="">
148 154
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
149 155
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
150
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Leads']) echo 'selected="selected"';
156
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Leads']) {
157
+                        echo 'selected="selected"';
158
+                    }
151 159
                     ?>><?php echo htmlspecialchars($value); ?></option>
152 160
                 <?php } ?>
153 161
             </select>
@@ -164,7 +172,9 @@  discard block
 block discarded – undo
164 172
                 name="address_type_Opportunities" title="">
165 173
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
166 174
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
167
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Opportunities']) echo 'selected="selected"';
175
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Opportunities']) {
176
+                        echo 'selected="selected"';
177
+                    }
168 178
                     ?>><?php echo htmlspecialchars($value); ?></option>
169 179
                 <?php } ?>
170 180
             </select>
@@ -182,7 +192,9 @@  discard block
 block discarded – undo
182 192
                 name="address_type_Cases" title="">
183 193
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
184 194
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
185
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Cases']) echo 'selected="selected"';
195
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Cases']) {
196
+                        echo 'selected="selected"';
197
+                    }
186 198
                     ?>><?php echo htmlspecialchars($value); ?></option>
187 199
                 <?php } ?>
188 200
             </select>
@@ -200,7 +212,9 @@  discard block
 block discarded – undo
200 212
                 name="address_type_Project" title="">
201 213
                 <?php foreach ($address_types_billing_or_shipping as $key=>$value) { ?>
202 214
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
203
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Project']) echo 'selected="selected"';
215
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Project']) {
216
+                        echo 'selected="selected"';
217
+                    }
204 218
                     ?>><?php echo htmlspecialchars($value); ?></option>
205 219
                 <?php } ?>
206 220
             </select>
@@ -218,7 +232,9 @@  discard block
 block discarded – undo
218 232
                 name="address_type_Meetings" title="">
219 233
                 <?php foreach ($address_types_flex_relate as $key=>$value) { ?>
220 234
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
221
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Meetings']) echo 'selected="selected"';
235
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Meetings']) {
236
+                        echo 'selected="selected"';
237
+                    }
222 238
                     ?>><?php echo htmlspecialchars($value); ?></option>
223 239
                 <?php } ?>
224 240
             </select>
@@ -234,7 +250,9 @@  discard block
 block discarded – undo
234 250
                 name="address_type_Prospects" title="">
235 251
                 <?php foreach ($address_types_primary_or_alt as $key=>$value) { ?>
236 252
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
237
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Prospects']) echo 'selected="selected"';
253
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type']['Prospects']) {
254
+                        echo 'selected="selected"';
255
+                    }
238 256
                     ?>><?php echo htmlspecialchars($value); ?></option>
239 257
                 <?php } ?>
240 258
             </select>
@@ -255,7 +273,9 @@  discard block
 block discarded – undo
255 273
                 name="address_type_<?php echo $module; ?>" title="">
256 274
                 <?php foreach ($address_types_all as $key=>$value) { ?>
257 275
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
258
-                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type'][$module]) echo 'selected="selected"';
276
+                    if ($key == $GLOBALS['jjwg_config']['geocode_modules_to_address_type'][$module]) {
277
+                        echo 'selected="selected"';
278
+                    }
259 279
                     ?>><?php echo htmlspecialchars($value); ?></option>
260 280
                 <?php } ?>
261 281
             </select>
@@ -449,7 +469,9 @@  discard block
 block discarded – undo
449 469
                 name="allow_approximate_location_type" title="">
450 470
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
451 471
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
452
-                    if ($key == $enabled) echo 'selected="selected"';
472
+                    if ($key == $enabled) {
473
+                        echo 'selected="selected"';
474
+                    }
453 475
                     ?>><?php echo htmlspecialchars($value); ?>
454 476
                 <?php } ?>
455 477
             </select>
@@ -493,7 +515,9 @@  discard block
 block discarded – undo
493 515
                 name="address_cache_get_enabled" title="">
494 516
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
495 517
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
496
-                    if ($key == $enabled) echo 'selected="selected"';
518
+                    if ($key == $enabled) {
519
+                        echo 'selected="selected"';
520
+                    }
497 521
                     ?>><?php echo htmlspecialchars($value); ?>
498 522
                 <?php } ?>
499 523
             </select>
@@ -511,7 +535,9 @@  discard block
 block discarded – undo
511 535
                 name="address_cache_save_enabled" title="">
512 536
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
513 537
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
514
-                    if ($key == $enabled) echo 'selected="selected"';
538
+                    if ($key == $enabled) {
539
+                        echo 'selected="selected"';
540
+                    }
515 541
                     ?>><?php echo htmlspecialchars($value); ?>
516 542
                 <?php } ?>
517 543
             </select>
@@ -541,7 +567,9 @@  discard block
 block discarded – undo
541 567
                 name="logic_hooks_enabled" title="">
542 568
                 <?php foreach ($enabled_disabled as $key=>$value) { ?>
543 569
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
544
-                    if ($key == $enabled) echo 'selected="selected"';
570
+                    if ($key == $enabled) {
571
+                        echo 'selected="selected"';
572
+                    }
545 573
                     ?>><?php echo htmlspecialchars($value); ?>
546 574
                 <?php } ?>
547 575
             </select>
@@ -609,7 +637,9 @@  discard block
 block discarded – undo
609 637
                 name="map_default_unit_type" title="">
610 638
                 <?php foreach ($unit_types as $key=>$value) { ?>
611 639
                     <option value="<?php echo htmlspecialchars($key); ?>" <?php 
612
-                    if ($key == $GLOBALS['jjwg_config']['map_default_unit_type']) echo 'selected="selected"';
640
+                    if ($key == $GLOBALS['jjwg_config']['map_default_unit_type']) {
641
+                        echo 'selected="selected"';
642
+                    }
613 643
                     ?>><?php echo htmlspecialchars($value); ?>
614 644
                 <?php } ?>
615 645
             </select>
Please login to merge, or discard this patch.
Spacing   +24 added lines, -47 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_VALID_GEOCODE_MODULES']; ?> </strong></td>
82 82
         <td><input type="text" name="valid_geocode_modules" id="valid_geocode_modules"
83 83
             value="<?php echo (isset($GLOBALS['jjwg_config']['valid_geocode_modules'])) ?
84
-                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config']['valid_geocode_modules'])) :
85
-                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_modules'])); ?>"
84
+                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config']['valid_geocode_modules'])) : htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_modules'])); ?>"
86 85
             title='' tabindex='107' size="100" maxlength="999"><br />
87 86
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
88 87
                 <?php echo htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_modules'])); ?>
@@ -92,8 +91,7 @@  discard block
 block discarded – undo
92 91
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_VALID_GEOCODE_TABLES']; ?> </strong></td>
93 92
         <td><input type="text" name="valid_geocode_tables" id="valid_geocode_tables"
94 93
             value="<?php echo (isset($GLOBALS['jjwg_config']['valid_geocode_tables'])) ?
95
-                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config']['valid_geocode_tables'])) :
96
-                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_tables'])); ?>"
94
+                htmlspecialchars(implode(', ', $GLOBALS['jjwg_config']['valid_geocode_tables'])) : htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_tables'])); ?>"
97 95
             title='' tabindex='108' size="100" maxlength="999"><br />
98 96
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
99 97
                 <?php echo htmlspecialchars(implode(', ', $GLOBALS['jjwg_config_defaults']['valid_geocode_tables'])); ?>
@@ -280,8 +278,7 @@  discard block
 block discarded – undo
280 278
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_ACCOUNTS']; ?> </strong></td>
281 279
         <td><input type="text" name="grouping_field_Accounts" id="grouping_field_Accounts"
282 280
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Accounts'])) ?
283
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Accounts']) :
284
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Accounts']); ?>"
281
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Accounts']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Accounts']); ?>"
285 282
             title='' tabindex='121' size="25" maxlength="75">
286 283
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Accounts']); ?>
287 284
         </td>
@@ -290,18 +287,16 @@  discard block
 block discarded – undo
290 287
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_CONTACTS']; ?> </strong></td>
291 288
         <td><input type="text" name="grouping_field_Contacts" id="grouping_field_Contacts"
292 289
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Contacts'])) ?
293
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Contacts']) :
294
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>"
290
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Contacts']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>"
295 291
             title='' tabindex='122' size="25" maxlength="32">
296 292
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>
297 293
         </td>
298 294
     </tr>
299 295
     <tr>
300
-        <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_LEADS'];?> </strong></td>
296
+        <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_LEADS']; ?> </strong></td>
301 297
         <td><input type="text" name="grouping_field_Leads" id="grouping_field_Leads"
302 298
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Leads'])) ?
303
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Leads']) :
304
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Leads']); ?>"
299
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Leads']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Leads']); ?>"
305 300
             title='' tabindex='123' size="25" maxlength="32">
306 301
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Leads']); ?>
307 302
         </td>
@@ -310,8 +305,7 @@  discard block
 block discarded – undo
310 305
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_OPPORTUNITIES']; ?> </strong></td>
311 306
         <td><input type="text" name="grouping_field_Opportunities" id="grouping_field_Opportunities"
312 307
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Opportunities'])) ?
313
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Opportunities']) :
314
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Opportunities']); ?>"
308
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Opportunities']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Opportunities']); ?>"
315 309
             title='' tabindex='124' size="25" maxlength="32">
316 310
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Opportunities']); ?>
317 311
         </td>
@@ -320,8 +314,7 @@  discard block
 block discarded – undo
320 314
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_CASES']; ?> </strong></td>
321 315
         <td><input type="text" name="grouping_field_Cases" id="grouping_field_Cases"
322 316
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Cases'])) ?
323
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Cases']) :
324
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Cases']); ?>"
317
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Cases']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Cases']); ?>"
325 318
             title='' tabindex='125' size="25" maxlength="32">
326 319
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Cases']); ?>
327 320
         </td>
@@ -330,8 +323,7 @@  discard block
 block discarded – undo
330 323
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_PROJECTS']; ?> </strong></td>
331 324
         <td><input type="text" name="grouping_field_Project" id="grouping_field_Project"
332 325
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Project'])) ?
333
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Project']) :
334
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Project']); ?>"
326
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Project']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Project']); ?>"
335 327
             title='' tabindex='126' size="25" maxlength="32">
336 328
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Project']); ?>
337 329
         </td>
@@ -340,8 +332,7 @@  discard block
 block discarded – undo
340 332
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_MEETINGS']; ?> </strong></td>
341 333
         <td><input type="text" name="grouping_field_Meetings" id="grouping_field_Meetings"
342 334
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Meetings'])) ?
343
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Meetings']) :
344
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Meetings']); ?>"
335
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Meetings']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Meetings']); ?>"
345 336
             title='' tabindex='127' size="25" maxlength="32">
346 337
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Meetings']); ?>
347 338
             &nbsp; (Limited to Meetings Module Fields)
@@ -351,8 +342,7 @@  discard block
 block discarded – undo
351 342
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR_PROSPECTS']; ?> </strong></td>
352 343
         <td><input type="text" name="grouping_field_Prospects" id="grouping_field_Prospects"
353 344
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field']['Prospects'])) ?
354
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Prospects']) :
355
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Prospects']); ?>"
345
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field']['Prospects']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Prospects']); ?>"
356 346
             title='' tabindex='128' size="25" maxlength="32">
357 347
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Prospects']); ?>
358 348
         </td>
@@ -365,8 +355,7 @@  discard block
 block discarded – undo
365 355
             <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GROUP_FIELD_FOR'].' '.$module.':'; ?> </strong></td>
366 356
             <td><input type="text" name="grouping_field_<?php echo $module; ?>" id="grouping_field_<?php echo $module; ?>"
367 357
                 value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_grouping_field'][$module])) ?
368
-                    htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field'][$module]) :
369
-                    htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>"
358
+                    htmlspecialchars($GLOBALS['jjwg_config']['map_markers_grouping_field'][$module]) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>"
370 359
                 title='' tabindex='128' size="25" maxlength="32">
371 360
                 &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
372 361
                     <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_grouping_field']['Contacts']); ?>
@@ -388,8 +377,7 @@  discard block
 block discarded – undo
388 377
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GEOCODING_API_URL_TITLE']; ?> </strong></td>
389 378
         <td><input type="text" name="geocoding_api_url" id="geocoding_api_url"
390 379
             value="<?php echo (isset($GLOBALS['jjwg_config']['geocoding_api_url'])) ?
391
-                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_api_url']) :
392
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_api_url']); ?>"
380
+                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_api_url']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_api_url']); ?>"
393 381
             title='' tabindex='139' size="70" maxlength="255">
394 382
             <br />
395 383
             <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
@@ -403,8 +391,7 @@  discard block
 block discarded – undo
403 391
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GEOCODING_API_SECRET_TITLE']; ?> </strong></td>
404 392
         <td><input type="text" name="geocoding_api_secret" id="geocoding_api_secret"
405 393
             value="<?php echo (isset($GLOBALS['jjwg_config']['geocoding_api_secret'])) ?
406
-                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_api_secret']) :
407
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_api_secret']); ?>"
394
+                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_api_secret']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_api_secret']); ?>"
408 395
             title='' tabindex='140' size="25" maxlength="32">
409 396
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
410 397
                 <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_api_secret']) ?>
@@ -417,8 +404,7 @@  discard block
 block discarded – undo
417 404
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GEOCODING_LIMIT_TITLE']; ?> </strong></td>
418 405
         <td><input type="text" name="geocoding_limit" id="geocoding_limit"
419 406
             value="<?php echo (isset($GLOBALS['jjwg_config']['geocoding_limit'])) ?
420
-                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_limit']) :
421
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_limit']); ?>"
407
+                htmlspecialchars($GLOBALS['jjwg_config']['geocoding_limit']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_limit']); ?>"
422 408
             title='' tabindex='141' size="10" maxlength="25">
423 409
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
424 410
                 <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['geocoding_limit']) ?>
@@ -431,8 +417,7 @@  discard block
 block discarded – undo
431 417
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_GOOGLE_GEOCODING_LIMIT_TITLE']; ?> </strong></td>
432 418
         <td><input type="text" name="google_geocoding_limit" id="google_geocoding_limit"
433 419
             value="<?php echo (isset($GLOBALS['jjwg_config']['google_geocoding_limit'])) ?
434
-                htmlspecialchars($GLOBALS['jjwg_config']['google_geocoding_limit']) :
435
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['google_geocoding_limit']); ?>"
420
+                htmlspecialchars($GLOBALS['jjwg_config']['google_geocoding_limit']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['google_geocoding_limit']); ?>"
436 421
             title='' tabindex='142' size="10" maxlength="25">
437 422
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
438 423
                 <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['google_geocoding_limit']) ?>
@@ -463,8 +448,7 @@  discard block
 block discarded – undo
463 448
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_EXPORT_ADDRESSES_LIMIT_TITLE']; ?> </strong></td>
464 449
         <td><input type="text" name="export_addresses_limit" id="export_addresses_limit"
465 450
             value="<?php echo (isset($GLOBALS['jjwg_config']['export_addresses_limit'])) ?
466
-                htmlspecialchars($GLOBALS['jjwg_config']['export_addresses_limit']) :
467
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['export_addresses_limit']); ?>"
451
+                htmlspecialchars($GLOBALS['jjwg_config']['export_addresses_limit']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['export_addresses_limit']); ?>"
468 452
             title='' tabindex='144' size="10" maxlength="25">
469 453
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?>
470 454
                 <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['export_addresses_limit']) ?>
@@ -567,8 +551,7 @@  discard block
 block discarded – undo
567 551
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_MARKERS_LIMIT_TITLE']; ?> </strong></td>
568 552
         <td><input type="text" name="map_markers_limit" id="map_markers_limit"
569 553
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_markers_limit'])) ?
570
-                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_limit']) :
571
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_limit']); ?>"
554
+                htmlspecialchars($GLOBALS['jjwg_config']['map_markers_limit']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_limit']); ?>"
572 555
             title='' tabindex='150' size="10" maxlength="25">
573 556
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_markers_limit']) ?>
574 557
         </td>
@@ -580,8 +563,7 @@  discard block
 block discarded – undo
580 563
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_DEFAULT_CENTER_LATITUDE_TITLE']; ?> </strong></td>
581 564
         <td><input type="text" name="map_default_center_latitude" id="map_default_center_latitude"
582 565
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_default_center_latitude'])) ?
583
-                htmlspecialchars($GLOBALS['jjwg_config']['map_default_center_latitude']) :
584
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_latitude']); ?>"
566
+                htmlspecialchars($GLOBALS['jjwg_config']['map_default_center_latitude']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_latitude']); ?>"
585 567
             title='' tabindex='151' size="10" maxlength="25">
586 568
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_latitude']) ?>
587 569
         </td>
@@ -593,8 +575,7 @@  discard block
 block discarded – undo
593 575
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_DEFAULT_CENTER_LONGITUDE_TITLE']; ?> </strong></td>
594 576
         <td><input type="text" name="map_default_center_longitude" id="map_default_center_longitude"
595 577
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_default_center_longitude'])) ?
596
-                htmlspecialchars($GLOBALS['jjwg_config']['map_default_center_longitude']) :
597
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_longitude']); ?>"
578
+                htmlspecialchars($GLOBALS['jjwg_config']['map_default_center_longitude']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_longitude']); ?>"
598 579
             title='' tabindex='152' size="10" maxlength="25">
599 580
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_center_longitude']) ?>
600 581
         </td>
@@ -623,8 +604,7 @@  discard block
 block discarded – undo
623 604
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_DEFAULT_DISTANCE_TITLE']; ?> </strong></td>
624 605
         <td><input type="text" name="map_default_distance" id="map_default_distance"
625 606
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_default_distance'])) ?
626
-                htmlspecialchars($GLOBALS['jjwg_config']['map_default_distance']) :
627
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_distance']); ?>"
607
+                htmlspecialchars($GLOBALS['jjwg_config']['map_default_distance']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_distance']); ?>"
628 608
             title='' tabindex='154' size="10" maxlength="25">
629 609
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_default_distance']) ?>
630 610
         </td>
@@ -636,8 +616,7 @@  discard block
 block discarded – undo
636 616
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_DUPLICATE_MARKER_ADJUSTMENT_TITLE']; ?> </strong></td>
637 617
         <td><input type="text" name="map_duplicate_marker_adjustment" id="map_duplicate_marker_adjustment"
638 618
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_duplicate_marker_adjustment'])) ?
639
-                rtrim(number_format($GLOBALS['jjwg_config']['map_duplicate_marker_adjustment'], 8), '0.') :
640
-                rtrim(number_format($GLOBALS['jjwg_config_defaults']['map_duplicate_marker_adjustment'], 8), '0.'); ?>"
619
+                rtrim(number_format($GLOBALS['jjwg_config']['map_duplicate_marker_adjustment'], 8), '0.') : rtrim(number_format($GLOBALS['jjwg_config_defaults']['map_duplicate_marker_adjustment'], 8), '0.'); ?>"
641 620
             title='' tabindex='155' size="10" maxlength="25">
642 621
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo rtrim(number_format($GLOBALS['jjwg_config_defaults']['map_duplicate_marker_adjustment'], 8), '0.'); ?>
643 622
         </td>
@@ -649,8 +628,7 @@  discard block
 block discarded – undo
649 628
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_CLUSTER_GRID_SIZE_TITLE']; ?> </strong></td>
650 629
         <td><input type="text" name="map_clusterer_grid_size" id="map_clusterer_grid_size"
651 630
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_clusterer_grid_size'])) ?
652
-                htmlspecialchars($GLOBALS['jjwg_config']['map_clusterer_grid_size']) :
653
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_grid_size']); ?>"
631
+                htmlspecialchars($GLOBALS['jjwg_config']['map_clusterer_grid_size']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_grid_size']); ?>"
654 632
             title='' tabindex='156' size="10" maxlength="25">
655 633
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_grid_size']) ?>
656 634
         </td>
@@ -662,8 +640,7 @@  discard block
 block discarded – undo
662 640
         <td><strong><?php echo $GLOBALS['mod_strings']['LBL_CONFIG_MAP_MARKERS_CLUSTERER_MAX_ZOOM_TITLE']; ?> </strong></td>
663 641
         <td><input type="text" name="map_clusterer_max_zoom" id="map_clusterer_max_zoom"
664 642
             value="<?php echo (isset($GLOBALS['jjwg_config']['map_clusterer_max_zoom'])) ?
665
-                htmlspecialchars($GLOBALS['jjwg_config']['map_clusterer_max_zoom']) :
666
-                htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_max_zoom']); ?>"
643
+                htmlspecialchars($GLOBALS['jjwg_config']['map_clusterer_max_zoom']) : htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_max_zoom']); ?>"
667 644
             title='' tabindex='157' size="10" maxlength="25">
668 645
             &nbsp; <?php echo $GLOBALS['mod_strings']['LBL_CONFIG_DEFAULT']; ?> <?php echo htmlspecialchars($GLOBALS['jjwg_config_defaults']['map_clusterer_max_zoom']) ?>
669 646
         </td>
Please login to merge, or discard this patch.
modules/SecurityGroups/VersionCheck.php 3 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -4,30 +4,30 @@  discard block
 block discarded – undo
4 4
 
5 5
 class VersionCheck {
6 6
 
7
-	function version_check($event, $arguments)
8
-	{
9
-		global $current_user;
7
+    function version_check($event, $arguments)
8
+    {
9
+        global $current_user;
10 10
 	
11
-		require_once('include/utils.php');
12
-		if(is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
13
-			//require_once('modules/SecurityGroups/SecurityGroup.php');
11
+        require_once('include/utils.php');
12
+        if(is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
13
+            //require_once('modules/SecurityGroups/SecurityGroup.php');
14 14
 			
15
-			//check to see if the securitysuite version
16
-			//matches the sugar version. If not then display an error messag
15
+            //check to see if the securitysuite version
16
+            //matches the sugar version. If not then display an error messag
17 17
 			
18
-			global $sugar_config;
19
-			if(empty($sugar_config['securitysuite_version'])
20
-				|| $sugar_config['securitysuite_version'] != $sugar_config['sugar_version']
21
-			) {
22
-				$securitysuite_warning = "Warning! SecuritySuite no longer matches the version of Sugar that you are running. "
23
-					. "SecuritySuite will not work correctly until updated to ".$sugar_config['sugar_version'].". "
24
-					. "Upgrade now to  ";
18
+            global $sugar_config;
19
+            if(empty($sugar_config['securitysuite_version'])
20
+                || $sugar_config['securitysuite_version'] != $sugar_config['sugar_version']
21
+            ) {
22
+                $securitysuite_warning = "Warning! SecuritySuite no longer matches the version of Sugar that you are running. "
23
+                    . "SecuritySuite will not work correctly until updated to ".$sugar_config['sugar_version'].". "
24
+                    . "Upgrade now to  ";
25 25
 					
26
-				global $sugar_config;
27
-				$upgrade_url = "http://www.eggsurplus.com/version.php?version=".$sugar_config['sugar_version'];
28
-				$upgrade_text = "SecuritySuite for ".$sugar_config['sugar_version'];
29
-				$GLOBALS['log']->fatal($securitysuite_warning."<a href='$upgrade_url'>$upgrade_text</a>");
30
-				//echo $display_warning;
26
+                global $sugar_config;
27
+                $upgrade_url = "http://www.eggsurplus.com/version.php?version=".$sugar_config['sugar_version'];
28
+                $upgrade_text = "SecuritySuite for ".$sugar_config['sugar_version'];
29
+                $GLOBALS['log']->fatal($securitysuite_warning."<a href='$upgrade_url'>$upgrade_text</a>");
30
+                //echo $display_warning;
31 31
 
32 32
 
33 33
 ?>
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 </script>
51 51
 <?php
52 52
 
53
-			}
53
+            }
54 54
 		
55
-		} //end if admin
56
-	} 
55
+        } //end if admin
56
+    } 
57 57
 
58 58
 
59 59
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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
 class VersionCheck {
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
 		global $current_user;
10 10
 	
11 11
 		require_once('include/utils.php');
12
-		if(is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
12
+		if (is_admin($current_user) && empty($_REQUEST['to_pdf']) && empty($_REQUEST['sugar_body_only'])) {
13 13
 			//require_once('modules/SecurityGroups/SecurityGroup.php');
14 14
 			
15 15
 			//check to see if the securitysuite version
16 16
 			//matches the sugar version. If not then display an error messag
17 17
 			
18 18
 			global $sugar_config;
19
-			if(empty($sugar_config['securitysuite_version'])
19
+			if (empty($sugar_config['securitysuite_version'])
20 20
 				|| $sugar_config['securitysuite_version'] != $sugar_config['sugar_version']
21 21
 			) {
22 22
 				$securitysuite_warning = "Warning! SecuritySuite no longer matches the version of Sugar that you are running. "
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.
modules/SecurityGroups/SaveSecurityGroupUserRelationship.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
 require_once('modules/SecurityGroups/SecurityGroupUserRelationship.php');
5 5
 
@@ -10,29 +10,29 @@  discard block
 block discarded – undo
10 10
 
11 11
 $focus->retrieve($_REQUEST['record']);
12 12
 
13
-foreach($focus->column_fields as $field)
13
+foreach ($focus->column_fields as $field)
14 14
 {
15 15
     safe_map($field, $focus, true);
16 16
 }
17 17
 
18
-foreach($focus->additional_column_fields as $field)
18
+foreach ($focus->additional_column_fields as $field)
19 19
 {
20 20
     safe_map($field, $focus, true);
21 21
 }
22 22
 
23 23
 // send them to the edit screen.
24
-if(isset($_REQUEST['record']) && $_REQUEST['record'] != "")
24
+if (isset($_REQUEST['record']) && $_REQUEST['record'] != "")
25 25
 {
26 26
     $recordID = $_REQUEST['record'];
27 27
 }
28 28
 
29
-    if( isset($_POST['noninheritable']) && $_POST['noninheritable'] == '1') {
29
+    if (isset($_POST['noninheritable']) && $_POST['noninheritable'] == '1') {
30 30
         $focus->noninheritable = 1;
31 31
     } else {
32 32
         $focus->noninheritable = 0;
33 33
     }
34 34
 
35
-    if( isset($_POST['primary_group']) && $_POST['primary_group'] == '1') {
35
+    if (isset($_POST['primary_group']) && $_POST['primary_group'] == '1') {
36 36
         $focus->primary_group = 1;
37 37
         //unset all other primary groups for this user
38 38
         global $db;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 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.
Please login to merge, or discard this patch.