Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
include/SuiteMozaik.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@  discard block
 block discarded – undo
89 89
     private function getContentImageSample($width = null) {
90 90
         if(is_numeric($width)) {
91 91
             $width = ' width="' . $width . '"';
92
-        }
93
-        else {
92
+        } else {
94 93
             $width = '';
95 94
         }
96 95
         $splits = explode('index.php', $_SERVER['REQUEST_URI']);
@@ -241,8 +240,7 @@  discard block
 block discarded – undo
241 240
     private function getThumbImageHTML($src, $label) {
242 241
         if(file_exists($src)) {
243 242
             $html = '<img src="' . $src. '" alt="' . $label . '">';
244
-        }
245
-        else {
243
+        } else {
246 244
             $html = $label;
247 245
         }
248 246
         return $html;
Please login to merge, or discard this patch.
ModuleInstall/PackageManager/PackageController.php 1 patch
Braces   +13 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
58 58
         if(isset($GLOBALS['log'])) {
59 59
             $GLOBALS['log']->deprecated($deprecatedMessage);
60
-        }
61
-        else {
60
+        } else {
62 61
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
63 62
         }
64 63
         self::__construct();
@@ -124,8 +123,9 @@  discard block
 block discarded – undo
124 123
           	$type_str = '';
125 124
           	foreach($types as $type){
126 125
           		$type_str .= "'".$type."'";
127
-          		if($index < $count)
128
-          			$type_str .= ",";
126
+          		if($index < $count) {
127
+          		          			$type_str .= ",";
128
+          		}
129 129
           		$index++;
130 130
           	}
131 131
 
@@ -310,18 +310,20 @@  discard block
 block discarded – undo
310 310
             }
311 311
             if(isset($_REQUEST['terms_checked'])) {
312 312
                 $terms_checked = $_REQUEST['terms_checked'];
313
-                if($terms_checked == 'on')
314
-                	$terms_checked = true;
313
+                if($terms_checked == 'on') {
314
+                                	$terms_checked = true;
315
+                }
315 316
             }
316 317
 
317 318
             if(!empty($username) && !empty($password)){
318 319
                 $password = md5($password);
319 320
                 $result = PackageManager::authenticate($username, $password, $servername, $terms_checked);
320
-                if(!is_array($result) && $result == true)
321
-                    $status  = 'success';
322
-                else
323
-                    $status  = $result['faultstring'];
324
-            }else{
321
+                if(!is_array($result) && $result == true) {
322
+                                    $status  = 'success';
323
+                } else {
324
+                                    $status  = $result['faultstring'];
325
+                }
326
+            } else{
325 327
                 $status  = 'failed';
326 328
             }
327 329
 
Please login to merge, or discard this patch.
ModuleInstall/PackageManager/PackageManager.php 1 patch
Braces   +48 added lines, -36 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
68 68
         if(isset($GLOBALS['log'])) {
69 69
             $GLOBALS['log']->deprecated($deprecatedMessage);
70
-        }
71
-        else {
70
+        } else {
72 71
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
73 72
         }
74 73
         self::__construct();
@@ -88,7 +87,7 @@  discard block
 block discarded – undo
88 87
         if(!empty($name_value_list)){
89 88
             $name_value_list = PackageManager::fromNameValueList($name_value_list);
90 89
             return $name_value_list['description'];
91
-        }else {
90
+        } else {
92 91
            return '';
93 92
         }
94 93
     }
@@ -134,8 +133,9 @@  discard block
 block discarded – undo
134 133
 		                 //check to see if we already this one installed
135 134
 		                 $result = $uh->determineIfUpgrade($myrelease['id_name'], $myrelease['version']);
136 135
 		                 $enable = false;
137
-		                 if($result == true || is_array($result))
138
-		                	 $enable = true;
136
+		                 if($result == true || is_array($result)) {
137
+		                 		                	 $enable = true;
138
+		                 }
139 139
 		                 $nodes[$mypack['category_id']]['packages'][$mypack['id']]['releases'][$myrelease['id']] = array('id' => $myrelease['id'], 'version' => $myrelease['version'], 'label' => $myrelease['description'], 'category_id' => $mypack['category_id'], 'package_id' => $mypack['id'], 'type' => 'release', 'enable' => $enable);
140 140
 		           	}
141 141
 	            }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 	           	$filepath = PackageManagerComm::performDownload($filename);
214 214
 	           	return $filepath;
215 215
             }
216
-        }else{
216
+        } else{
217 217
             return null;
218 218
         }
219 219
     }
@@ -231,10 +231,11 @@  discard block
 block discarded – undo
231 231
         PackageManager::setCredentials($username, $password, $systemname);
232 232
         PackageManagerComm::clearSession();
233 233
         $result = PackageManagerComm::login($terms_checked);
234
-        if(is_array($result))
235
-        	return $result;
236
-       	else
237
-        	return true;
234
+        if(is_array($result)) {
235
+                	return $result;
236
+        } else {
237
+       	        	return true;
238
+       	}
238 239
     }
239 240
 
240 241
     function setCredentials($username, $password, $systemname){
@@ -285,7 +286,7 @@  discard block
 block discarded – undo
285 286
     	 if(!empty($release_id) || !empty($package_id)){
286 287
             $documents = PackageManagerComm::getDocumentation($package_id, $release_id);
287 288
             return $documents;
288
-        }else{
289
+        } else{
289 290
             return null;
290 291
         }
291 292
     }
@@ -480,8 +481,9 @@  discard block
 block discarded – undo
480 481
         $base_tmp_upgrade_dir   = "$base_upgrade_dir/temp";
481 482
         $manifest_file = $this->extractManifest( $base_filename,$base_tmp_upgrade_dir);
482 483
          $GLOBALS['log']->debug("Manifest: ".$manifest_file);
483
-        if($view == 'module')
484
-            $license_file = $this->extractFile($base_filename, 'LICENSE.txt', $base_tmp_upgrade_dir);
484
+        if($view == 'module') {
485
+                    $license_file = $this->extractFile($base_filename, 'LICENSE.txt', $base_tmp_upgrade_dir);
486
+        }
485 487
         if(is_file($manifest_file)){
486 488
             $GLOBALS['log']->debug("VALIDATING MANIFEST". $manifest_file);
487 489
             require_once( $manifest_file );
@@ -492,14 +494,16 @@  discard block
 block discarded – undo
492 494
             if( $view == "module" ){
493 495
                 if ($upgrade_zip_type != "module" && $upgrade_zip_type != "theme" && $upgrade_zip_type != "langpack"){
494 496
                     $this->unlinkTempFiles();
495
-                    if($display_messages)
496
-                        die($mod_strings['ERR_UW_NOT_ACCEPTIBLE_TYPE']);
497
+                    if($display_messages) {
498
+                                            die($mod_strings['ERR_UW_NOT_ACCEPTIBLE_TYPE']);
499
+                    }
497 500
                 }
498
-            }elseif( $view == "default" ){
501
+            } elseif( $view == "default" ){
499 502
                 if($upgrade_zip_type != "patch" ){
500 503
                     $this->unlinkTempFiles();
501
-                    if($display_messages)
502
-                        die($mod_strings['ERR_UW_ONLY_PATCHES']);
504
+                    if($display_messages) {
505
+                                            die($mod_strings['ERR_UW_ONLY_PATCHES']);
506
+                    }
503 507
                 }
504 508
             }
505 509
 
@@ -517,20 +521,24 @@  discard block
 block discarded – undo
517 521
 
518 522
             if( copy( $tempFile , $target_path ) ){
519 523
                 copy( $manifest_file, $target_manifest );
520
-                if($display_messages)
521
-                    $messages = '<script>ajaxStatus.flashStatus("' .$base_filename.$mod_strings['LBL_UW_UPLOAD_SUCCESS'] . ', 5000");</script>';
522
-            }else{
523
-                if($display_messages)
524
-                	$messages = '<script>ajaxStatus.flashStatus("' .$mod_strings['ERR_UW_UPLOAD_ERROR'] . ', 5000");</script>';
524
+                if($display_messages) {
525
+                                    $messages = '<script>ajaxStatus.flashStatus("' .$base_filename.$mod_strings['LBL_UW_UPLOAD_SUCCESS'] . ', 5000");</script>';
526
+                }
527
+            } else{
528
+                if($display_messages) {
529
+                                	$messages = '<script>ajaxStatus.flashStatus("' .$mod_strings['ERR_UW_UPLOAD_ERROR'] . ', 5000");</script>';
530
+                }
525 531
             }
526 532
         }//fi
527 533
         else{
528 534
             $this->unlinkTempFiles();
529
-            if($display_messages)
530
-                die($mod_strings['ERR_UW_NO_MANIFEST']);
535
+            if($display_messages) {
536
+                            die($mod_strings['ERR_UW_NO_MANIFEST']);
537
+            }
538
+        }
539
+        if(isset($messages)) {
540
+                    return $messages;
531 541
         }
532
-        if(isset($messages))
533
-            return $messages;
534 542
     }
535 543
 
536 544
     function unlinkTempFiles() {
@@ -568,14 +576,15 @@  discard block
 block discarded – undo
568 576
 			$version = $manifest['version'];
569 577
 			$uh = new UpgradeHistory();
570 578
 			$previous_install = array();
571
-    		if(!empty($id_name) & !empty($version))
572
-    			$previous_install = $uh->determineIfUpgrade($id_name, $version);
579
+    		if(!empty($id_name) & !empty($version)) {
580
+    		    			$previous_install = $uh->determineIfUpgrade($id_name, $version);
581
+    		}
573 582
     		$previous_version = (empty($previous_install['version'])) ? '' : $previous_install['version'];
574 583
     		$previous_id = (empty($previous_install['id'])) ? '' : $previous_install['id'];
575 584
 
576 585
             if(!empty($previous_version)){
577 586
             	$mi->install($unzip_dir, true, $previous_version);
578
-            }else{
587
+            } else{
579 588
             	$mi->install($unzip_dir);
580 589
             }
581 590
             $GLOBALS['log']->debug("INSTALLED: ".$file);
@@ -612,7 +621,9 @@  discard block
 block discarded – undo
612 621
 	        $base_upgrade_dir       = $this->upload_dir.'/upgrades';
613 622
 	        $base_tmp_upgrade_dir   = "$base_upgrade_dir/temp";
614 623
             if(is_file($found->filename)){
615
-                if(!isset($GLOBALS['mi_remove_tables']))$GLOBALS['mi_remove_tables'] = true;
624
+                if(!isset($GLOBALS['mi_remove_tables'])) {
625
+                    $GLOBALS['mi_remove_tables'] = true;
626
+                }
616 627
                 $unzip_dir = mk_temp_dir( $base_tmp_upgrade_dir );
617 628
                 unzip($found->filename, $unzip_dir );
618 629
                 $mi = new ModuleInstaller();
@@ -621,7 +632,7 @@  discard block
 block discarded – undo
621 632
                 $found->delete();
622 633
                 unlink(remove_file_extension( $found->filename ) . '-manifest.php');
623 634
                 unlink($found->filename);
624
-            }else{
635
+            } else{
625 636
                 //file(s_ have been deleted or are not found in the directory, allow database delete to happen but no need to change filesystem
626 637
                 $found->delete();
627 638
             }
@@ -767,7 +778,7 @@  discard block
 block discarded – undo
767 778
         if(is_file($license_file)){
768 779
             $contents = file_get_contents($license_file);
769 780
             return $contents;
770
-        }else{
781
+        } else{
771 782
             return null;
772 783
         }
773 784
     }
@@ -849,7 +860,7 @@  discard block
 block discarded – undo
849 860
 						$serial_manifest['upgrade_manifest'] = (isset($upgrade_manifest) ? $upgrade_manifest : '');
850 861
 						$installed->manifest = base64_encode(serialize($serial_manifest));
851 862
 						$installed->save();
852
-					}else{
863
+					} else{
853 864
 						$serial_manifest = unserialize(base64_decode($installed->manifest));
854 865
 						$manifest = $serial_manifest['manifest'];
855 866
 					}
@@ -859,8 +870,9 @@  discard block
 block discarded – undo
859 870
 						$uninstallable = true;
860 871
 					}
861 872
 					$enabled = $installed->enabled;
862
-					if(!$enabled)
863
-						$enabled_string = 'DISABLED';
873
+					if(!$enabled) {
874
+											$enabled_string = 'DISABLED';
875
+					}
864 876
 					$file_uninstall = $filename;
865 877
 					if(!$uninstallable){
866 878
 						$file_uninstall = 'UNINSTALLABLE';
Please login to merge, or discard this patch.
modules/Administration/Administration.php 1 patch
Braces   +16 added lines, -13 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.
@@ -83,8 +85,7 @@  discard block
 block discarded – undo
83 85
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
84 86
         if(isset($GLOBALS['log'])) {
85 87
             $GLOBALS['log']->deprecated($deprecatedMessage);
86
-        }
87
-        else {
88
+        } else {
88 89
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
89 90
         }
90 91
         self::__construct();
@@ -121,10 +122,11 @@  discard block
 block discarded – undo
121 122
         }
122 123
 
123 124
         while($row = $this->db->fetchByAssoc($result)) {
124
-            if($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password')
125
-                $this->settings[$row['category']."_".$row['name']] = $this->decrypt_after_retrieve($row['value']);
126
-            else
127
-                $this->settings[$row['category']."_".$row['name']] = $row['value'];
125
+            if($row['category']."_".$row['name'] == 'ldap_admin_password' || $row['category']."_".$row['name'] == 'proxy_password') {
126
+                            $this->settings[$row['category']."_".$row['name']] = $this->decrypt_after_retrieve($row['value']);
127
+            } else {
128
+                            $this->settings[$row['category']."_".$row['name']] = $row['value'];
129
+            }
128 130
             $this->settings[$row['category']] = true;
129 131
         }
130 132
         $this->settings[$category] = true;
@@ -135,8 +137,9 @@  discard block
 block discarded – undo
135 137
             $oe->getSystemMailerSettings();
136 138
 
137 139
             foreach ($oe->field_defs as $def) {
138
-                if (strpos($def, "mail_") !== false)
139
-                    $this->settings[$def] = $oe->$def;
140
+                if (strpos($def, "mail_") !== false) {
141
+                                    $this->settings[$def] = $oe->$def;
142
+                }
140 143
             }
141 144
         }
142 145
 
@@ -180,13 +183,13 @@  discard block
 block discarded – undo
180 183
         $row = $this->db->fetchByAssoc($result);
181 184
         $row_count = $row['the_count'];
182 185
 
183
-        if($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password')
184
-            $value = $this->encrpyt_before_save($value);
186
+        if($category."_".$key == 'ldap_admin_password' || $category."_".$key == 'proxy_password') {
187
+                    $value = $this->encrpyt_before_save($value);
188
+        }
185 189
 
186 190
         if( $row_count == 0){
187 191
             $result = $this->db->query("INSERT INTO config (value, category, name) VALUES ('$value','$category', '$key')");
188
-        }
189
-        else{
192
+        } else{
190 193
             $result = $this->db->query("UPDATE config SET value = '{$value}' WHERE category = '{$category}' AND name = '{$key}'");
191 194
         }
192 195
         sugar_cache_clear('admin_settings_cache');
Please login to merge, or discard this patch.
modules/Administration/UpgradeHistory.php 1 patch
Braces   +33 added lines, -31 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.
@@ -85,8 +87,7 @@  discard block
 block discarded – undo
85 87
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
86 88
         if(isset($GLOBALS['log'])) {
87 89
             $GLOBALS['log']->deprecated($deprecatedMessage);
88
-        }
89
-        else {
90
+        } else {
90 91
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
91 92
         }
92 93
         self::__construct();
@@ -109,13 +110,13 @@  discard block
 block discarded – undo
109 110
 
110 111
             if(empty($patch_to_check->id_name)){
111 112
                 $where = " WHERE name = '$patch_to_check->name' ";
112
-            }else{
113
+            } else{
113 114
                 $where = " WHERE id_name = '$patch_to_check->id_name' ";
114 115
             }
115 116
 
116 117
             if(!empty($patch_to_check->id)){
117 118
                 $where .= "  AND id != '$patch_to_check->id'  ";
118
-            }else{
119
+            } else{
119 120
                 $where .= "  AND id is not null  ";
120 121
             }
121 122
 
@@ -144,7 +145,7 @@  discard block
 block discarded – undo
144 145
         $result = $this->db->query($query);
145 146
          if(empty($result)){
146 147
             return null;
147
-         }else{
148
+         } else{
148 149
             $temp_version = 0;
149 150
             $id = '';
150 151
             while($row = $this->db->fetchByAssoc($result))
@@ -154,10 +155,11 @@  discard block
 block discarded – undo
154 155
                     $id = $row['id'];
155 156
                 }
156 157
             }//end while
157
-            if($this->is_right_version_greater(explode('.', $temp_version), explode('.', $version), false))
158
-                return array('id' => $id, 'version' => $temp_version);
159
-            else
160
-                return null;
158
+            if($this->is_right_version_greater(explode('.', $temp_version), explode('.', $version), false)) {
159
+                            return array('id' => $id, 'version' => $temp_version);
160
+            } else {
161
+                            return null;
162
+            }
161 163
          }
162 164
     }
163 165
 
@@ -186,7 +188,7 @@  discard block
 block discarded – undo
186 188
                 //we have found a match
187 189
                 //if the patch_to_check version is greater than the found version
188 190
                 return ($this->is_right_version_greater(explode('.', $history_object->version), explode('.', $patch_to_check->version)));
189
-            }else{
191
+            } else{
190 192
                 return true;
191 193
             }
192 194
         }
@@ -194,8 +196,9 @@  discard block
 block discarded – undo
194 196
         //with a matching unique_key in the database
195 197
         foreach($patch_list as $more_recent_patch)
196 198
         {
197
-            if($more_recent_patch->id == $patch_to_check->id)
198
-                break;
199
+            if($more_recent_patch->id == $patch_to_check->id) {
200
+                            break;
201
+            }
199 202
 
200 203
             //we will only resort to checking the files if we cannot find the unique_keys
201 204
             //or the unique_keys do not match
@@ -219,25 +222,27 @@  discard block
 block discarded – undo
219 222
     {
220 223
         if(is_file($check_path))
221 224
         {
222
-            if(file_exists($recent_path))
223
-                return true;
224
-            else
225
-                return false;
226
-        }
227
-        elseif(is_dir($check_path))
225
+            if(file_exists($recent_path)) {
226
+                            return true;
227
+            } else {
228
+                            return false;
229
+            }
230
+        } elseif(is_dir($check_path))
228 231
         {
229 232
             $status = false;
230 233
 
231 234
             $d = dir( $check_path );
232 235
             while( $f = $d->read() )
233 236
             {
234
-                if( $f == "." || $f == ".." )
235
-                    continue;
237
+                if( $f == "." || $f == ".." ) {
238
+                                    continue;
239
+                }
236 240
 
237 241
                 $status = $this->foundConflict("$check_path/$f", "$recent_path/$f");
238 242
 
239
-                if($status)
240
-                    break;
243
+                if($status) {
244
+                                    break;
245
+                }
241 246
             }
242 247
 
243 248
             $d->close();
@@ -259,20 +264,17 @@  discard block
 block discarded – undo
259 264
     function is_right_version_greater($left, $right, $equals_is_greater = true){
260 265
         if(count($left) == 0 && count($right) == 0){
261 266
             return $equals_is_greater;
262
-        }
263
-        else if(count($left) == 0 || count($right) == 0){
267
+        } else if(count($left) == 0 || count($right) == 0){
264 268
             return true;
265
-        }
266
-        else if($left[0] == $right[0]){
269
+        } else if($left[0] == $right[0]){
267 270
             array_shift($left);
268 271
             array_shift($right);
269 272
             return $this->is_right_version_greater($left, $right, $equals_is_greater);
270
-        }
271
-        else if($left[0] < $right[0]){
273
+        } else if($left[0] < $right[0]){
272 274
            return true;
275
+        } else {
276
+                    return false;
273 277
         }
274
-        else
275
-            return false;
276 278
     }
277 279
 
278 280
     /**
Please login to merge, or discard this patch.
modules/Meetings/MeetingsJjwg_MapsLogicHook.php 1 patch
Braces   +4 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 MeetingsJjwg_MapsLogicHook
6 8
 {
@@ -19,8 +21,7 @@  discard block
 block discarded – undo
19 21
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
20 22
         if(isset($GLOBALS['log'])) {
21 23
             $GLOBALS['log']->deprecated($deprecatedMessage);
22
-        }
23
-        else {
24
+        } else {
24 25
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
25 26
         }
26 27
         self::__construct();
Please login to merge, or discard this patch.
modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php 1 patch
Braces   +28 added lines, -18 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.
@@ -92,10 +94,18 @@  discard block
 block discarded – undo
92 94
         }
93 95
 
94 96
 
95
-        if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
96
-		if(!empty($def['rows']))$this->displayRows = $def['rows'];
97
-		if(!empty($def['categories']))$this->selectedCategories = $def['categories'];
98
-		if(!empty($def['userfeed_created'])) $this->userfeed_created = $def['userfeed_created'];
97
+        if(empty($def['title'])) {
98
+            $this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
99
+        }
100
+		if(!empty($def['rows'])) {
101
+		    $this->displayRows = $def['rows'];
102
+		}
103
+		if(!empty($def['categories'])) {
104
+		    $this->selectedCategories = $def['categories'];
105
+		}
106
+		if(!empty($def['userfeed_created'])) {
107
+		    $this->userfeed_created = $def['userfeed_created'];
108
+		}
99 109
         $this->searchFields = $dashletData['SugarFeedDashlet']['searchFields'];
100 110
         $this->columns = $dashletData['SugarFeedDashlet']['columns'];
101 111
 
@@ -115,7 +125,7 @@  discard block
 block discarded – undo
115 125
 		if(count($this->categories) < $catCount){
116 126
 			if(!empty($this->selectedCategories)){
117 127
 				ACLController::filterModuleList($this->selectedCategories, true);
118
-			}else{
128
+			} else{
119 129
 				$this->selectedCategories = array_keys($this->categories);
120 130
 				unset($this->selectedCategories[0]);
121 131
 			}
@@ -130,8 +140,7 @@  discard block
 block discarded – undo
130 140
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
131 141
         if(isset($GLOBALS['log'])) {
132 142
             $GLOBALS['log']->deprecated($deprecatedMessage);
133
-        }
134
-        else {
143
+        } else {
135 144
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
136 145
         }
137 146
         self::__construct($id, $def);
@@ -233,8 +242,7 @@  discard block
 block discarded – undo
233 242
             {
234 243
                 $all_modules = array_merge($regular_modules, $owner_modules, $admin_modules);
235 244
                 $module_limiter = " sugarfeed.related_module in ('" . implode("','", $all_modules) . "')";
236
-            }
237
-            else if ( count($owner_modules) > 0
245
+            } else if ( count($owner_modules) > 0
238 246
 				) {
239 247
                 $module_limiter = " ((sugarfeed.related_module IN ('".implode("','", $regular_modules)."') "
240 248
 					.") ";
@@ -276,8 +284,9 @@  discard block
 block discarded – undo
276 284
                     {
277 285
                         $modKey = $modStringMatches[2];
278 286
                         $modString = translate($modKey, $modStringMatches[1]);
279
-                        if( strpos($modString, '{0}') === FALSE || !isset($GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']]) )
280
-                            continue;
287
+                        if( strpos($modString, '{0}') === FALSE || !isset($GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']]) ) {
288
+                                                    continue;
289
+                        }
281 290
 
282 291
                         $modStringSingular = $GLOBALS['app_list_strings']['moduleListSingular'][$data['RELATED_MODULE']];
283 292
                         $modString = string_format($modString, array($modStringSingular) );
@@ -293,8 +302,9 @@  discard block
 block discarded – undo
293 302
             foreach($this->lvs->data['pageData']['urls'] as $type => $url) {
294 303
             	// awu Replacing action=DisplayDashlet with action=DynamicAction&DynamicAction=DisplayDashlet
295 304
                 $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet';
296
-                if($type != 'orderBy')
297
-                    $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&id=' . $this->id;
305
+                if($type != 'orderBy') {
306
+                                    $this->lvs->data['pageData']['urls'][$type] = $url.'&action=DynamicAction&DynamicAction=displayDashlet&sugar_body_only=1&id=' . $this->id;
307
+                }
298 308
             }
299 309
 
300 310
             $this->lvs->ss->assign('dashletId', $this->id);
@@ -438,8 +448,9 @@  discard block
 block discarded – undo
438 448
 		if($rows > 100){
439 449
 			$rows = 100;
440 450
 		}
441
-        if ( isset($req['autoRefresh']) )
442
-            $options['autoRefresh'] = $req['autoRefresh'];
451
+        if ( isset($req['autoRefresh']) ) {
452
+                    $options['autoRefresh'] = $req['autoRefresh'];
453
+        }
443 454
         $options['rows'] = $rows;
444 455
 		$options['categories'] = $req['categories'];
445 456
 		foreach($options['categories'] as $cat){
@@ -564,8 +575,7 @@  discard block
 block discarded – undo
564 575
 
565 576
         if($current_user->getPreference('use_real_names') == 'on'){
566 577
             $ss->assign('user_name', $current_user->full_name);
567
-        }
568
-        else {
578
+        } else {
569 579
             $ss->assign('user_name', $user_name);
570 580
         }
571 581
         $linkTypesIn = SugarFeed::getLinkTypes();
Please login to merge, or discard this patch.
modules/Contacts/ContactsJjwg_MapsLogicHook.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,9 @@  discard block
 block discarded – undo
2 2
 
3 3
 // custom/modules/Contacts/ContactsJjwg_MapsLogicHook.php
4 4
 
5
-if (!defined('sugarEntry') || !sugarEntry)
5
+if (!defined('sugarEntry') || !sugarEntry) {
6 6
     die('Not A Valid Entry Point');
7
+}
7 8
 
8 9
 class ContactsJjwg_MapsLogicHook {
9 10
 
@@ -19,8 +20,7 @@  discard block
 block discarded – undo
19 20
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
20 21
         if(isset($GLOBALS['log'])) {
21 22
             $GLOBALS['log']->deprecated($deprecatedMessage);
22
-        }
23
-        else {
23
+        } else {
24 24
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
25 25
         }
26 26
         self::__construct();
Please login to merge, or discard this patch.
modules/Cases/CasesJjwg_MapsLogicHook.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-if (!defined('sugarEntry') || !sugarEntry)
4
+if (!defined('sugarEntry') || !sugarEntry) {
5 5
     die('Not A Valid Entry Point');
6
+}
6 7
 
7 8
 class CasesJjwg_MapsLogicHook {
8 9
 
@@ -18,8 +19,7 @@  discard block
 block discarded – undo
18 19
         $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
19 20
         if(isset($GLOBALS['log'])) {
20 21
             $GLOBALS['log']->deprecated($deprecatedMessage);
21
-        }
22
-        else {
22
+        } else {
23 23
             trigger_error($deprecatedMessage, E_USER_DEPRECATED);
24 24
         }
25 25
         self::__construct();
Please login to merge, or discard this patch.