Completed
Push — develop ( 7c1bda...edae1e )
by Adam
18:38 queued 03:14
created
modules/ACLRoles/DetailUserRole.php 1 patch
Braces   +6 added lines, -2 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.
@@ -72,7 +74,9 @@  discard block
 block discarded – undo
72 74
     
73 75
     $names = array();
74 76
     $names = ACLAction::setupCategoriesMatrix($categories);
75
-    if(!empty($names))$tdwidth = 100 / sizeof($names);
77
+    if(!empty($names)) {
78
+        $tdwidth = 100 / sizeof($names);
79
+    }
76 80
     $sugar_smarty->assign('APP', $app_list_strings);
77 81
     $sugar_smarty->assign('CATEGORIES', $categories);
78 82
     $sugar_smarty->assign('TDWIDTH', $tdwidth);
Please login to merge, or discard this patch.
modules/ACLRoles/EditView.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -69,12 +71,12 @@  discard block
 block discarded – undo
69 71
 		$role->id = '';
70 72
 		$sugar_smarty->assign('ISDUPLICATE', $_REQUEST['record']);
71 73
 		$duplicateString=translate('LBL_DUPLICATE_OF', 'ACLRoles');
72
-	}else{
74
+	} else{
73 75
 		$return['record']= $role->id;
74 76
 		$return['action']='DetailView';
75 77
 	}
76 78
 
77
-}else{
79
+} else{
78 80
 	$categories = ACLRole::getRoleActions('');
79 81
 }
80 82
 $sugar_smarty->assign('ROLE', $role->toArray());
@@ -82,7 +84,9 @@  discard block
 block discarded – undo
82 84
 
83 85
 if(isset($_REQUEST['return_module'])){
84 86
 	$return['module']=$_REQUEST['return_module'];
85
-	if(isset($_REQUEST['return_id']))$return['record']=$_REQUEST['return_id'];
87
+	if(isset($_REQUEST['return_id'])) {
88
+	    $return['record']=$_REQUEST['return_id'];
89
+	}
86 90
 	if(isset($_REQUEST['return_record'])){$return['record']=$_REQUEST['return_record'];}
87 91
     if(isset($_REQUEST['return_action'])){$return['action']=$_REQUEST['return_action'];}
88 92
     if ( !empty($return['record']) ) {
@@ -101,7 +105,7 @@  discard block
 block discarded – undo
101 105
 $params[] = "<a href='index.php?module=ACLRoles&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>";
102 106
 if(empty($role->id)){
103 107
 	$params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
104
-}else{
108
+} else{
105 109
 	$params[] = $role->get_summary_text();
106 110
 }
107 111
 echo getClassicModuleTitle("ACLRoles", $params, true);
Please login to merge, or discard this patch.
modules/ACLRoles/ListUsers.php 1 patch
Braces   +6 added lines, -2 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.
@@ -42,7 +44,9 @@  discard block
 block discarded – undo
42 44
 	sugar_die('No Access');
43 45
 }
44 46
 $record = '';
45
-if(isset($_REQUEST['record'])) $record = $_REQUEST['record'];
47
+if(isset($_REQUEST['record'])) {
48
+    $record = $_REQUEST['record'];
49
+}
46 50
 ?>
47 51
 <form action="index.php" method="post" name="DetailView" id="form">
48 52
 
Please login to merge, or discard this patch.
modules/ACLRoles/DetailView.php 1 patch
Braces   +6 added lines, -2 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.
@@ -59,7 +61,9 @@  discard block
 block discarded – undo
59 61
 $role->retrieve($_REQUEST['record']);
60 62
 $categories = ACLRole::getRoleActions($_REQUEST['record']);
61 63
 $names = ACLAction::setupCategoriesMatrix($categories);
62
-if(!empty($names))$tdwidth = 100 / sizeof($names);
64
+if(!empty($names)) {
65
+    $tdwidth = 100 / sizeof($names);
66
+}
63 67
 $sugar_smarty->assign('ROLE', $role->toArray());
64 68
 $sugar_smarty->assign('CATEGORIES', $categories);
65 69
 $sugar_smarty->assign('TDWIDTH', $tdwidth);
Please login to merge, or discard this patch.
modules/ACLRoles/views/view.list.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@
 block discarded – undo
45 45
     public function preDisplay()
46 46
     {
47 47
         //bug #46690: Developer Access to Users/Teams/Roles
48
-        if (!$GLOBALS['current_user']->isAdminForModule('Users') && !$GLOBALS['current_user']->isDeveloperForModule('Users'))
49
-            sugar_die('No Access');
48
+        if (!$GLOBALS['current_user']->isAdminForModule('Users') && !$GLOBALS['current_user']->isDeveloperForModule('Users')) {
49
+                    sugar_die('No Access');
50
+        }
50 51
 
51 52
         $this->lv = new ListViewSmarty();
52 53
         $this->lv->export = false;
Please login to merge, or discard this patch.
modules/ACLRoles/Save.php 1 patch
Braces   +7 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.
@@ -42,7 +44,9 @@  discard block
 block discarded – undo
42 44
 
43 45
 
44 46
 $role = new ACLRole();
45
-if(isset($_REQUEST['record']))$role->id = $_POST['record'];
47
+if(isset($_REQUEST['record'])) {
48
+    $role->id = $_POST['record'];
49
+}
46 50
 if(!empty($_REQUEST['name'])){
47 51
 	$role->name = $_POST['name'];
48 52
 	$role->description = $_POST['description'];
@@ -59,7 +63,7 @@  discard block
 block discarded – undo
59 63
 	        }
60 64
 	    }
61 65
 	}
62
-}else{
66
+} else{
63 67
     ob_clean();	
64 68
     $flc_module = 'All';
65 69
     foreach($_POST as $name=>$value){
Please login to merge, or discard this patch.
modules/Users/authentication/AuthenticationController.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
2
+if(!defined('sugarEntry') || !sugarEntry) {
3
+    die('Not A Valid Entry Point');
4
+}
3 5
 /*********************************************************************************
4 6
  * SugarCRM Community Edition is a customer relationship management program developed by
5 7
  * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
@@ -127,7 +129,9 @@  discard block
 block discarded – undo
127 129
 		$_SESSION['loginAttempts'] = (isset($_SESSION['loginAttempts']))? $_SESSION['loginAttempts'] + 1: 1;
128 130
 		unset($GLOBALS['login_error']);
129 131
 
130
-		if($this->loggedIn)return $this->loginSuccess;
132
+		if($this->loggedIn) {
133
+		    return $this->loginSuccess;
134
+		}
131 135
 		LogicHook::initialize()->call_custom_logic('Users', 'before_login');
132 136
 
133 137
 		$this->loginSuccess = $this->authController->loginAuthenticate($username, $password, false, $PARAMS);
@@ -146,8 +150,9 @@  discard block
 block discarded – undo
146 150
 			}
147 151
 
148 152
 			//call business logic hook
149
-			if(isset($GLOBALS['current_user']))
150
-				$GLOBALS['current_user']->call_custom_logic('after_login');
153
+			if(isset($GLOBALS['current_user'])) {
154
+							$GLOBALS['current_user']->call_custom_logic('after_login');
155
+			}
151 156
 
152 157
 			// Check for running Admin Wizard
153 158
 			$config = new Administration();
@@ -172,7 +177,7 @@  discard block
 block discarded – undo
172 177
 				header("Location: index.php?module=Users&action=Wizard");
173 178
 				sugar_cleanup(true);
174 179
 			}
175
-		}else{
180
+		} else{
176 181
 			//kbrill bug #13225
177 182
 			LogicHook::initialize();
178 183
 			$GLOBALS['logic_hook']->call_custom_logic('Users', 'login_failed');
Please login to merge, or discard this patch.
modules/Users/authentication/SugarAuthenticate/SugarAuthenticateUser.php 1 patch
Braces   +6 added lines, -2 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.
@@ -94,7 +96,9 @@  discard block
 block discarded – undo
94 96
 		global $login_error;
95 97
 
96 98
 		$GLOBALS['log']->debug("Starting user load for ". $name);
97
-		if(empty($name) || empty($password)) return false;
99
+		if(empty($name) || empty($password)) {
100
+		    return false;
101
+		}
98 102
 		$input_hash = $password;
99 103
 		$passwordEncrypted = false;
100 104
 		if (!empty($PARAMS) && isset($PARAMS['passwordEncrypted']) && $PARAMS['passwordEncrypted']) {
Please login to merge, or discard this patch.
modules/Users/UserViewHelper.php 1 patch
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         if (isset($GLOBALS['sugar_config']['show_download_tab'])) {
160 160
             $enable_download_tab = $GLOBALS['sugar_config']['show_download_tab'];
161
-        }else{
161
+        } else{
162 162
             $enable_download_tab = true;
163 163
         }
164 164
 
@@ -175,8 +175,7 @@  discard block
 block discarded – undo
175 175
             if ($this->bean->id == $current_user->id) {
176 176
                 $reset_pref_warning = translate('LBL_RESET_PREFERENCES_WARNING','Users');
177 177
                 $reset_home_warning = translate('LBL_RESET_HOMEPAGE_WARNING','Users');
178
-            }
179
-            else {
178
+            } else {
180 179
                 $reset_pref_warning = translate('LBL_RESET_PREFERENCES_WARNING_USER','Users');
181 180
                 $reset_home_warning = translate('LBL_RESET_HOMEPAGE_WARNING_USER','Users');
182 181
             }
@@ -193,8 +192,12 @@  discard block
 block discarded – undo
193 192
             $buttons_footer[]="<input type='button' class='button' id='reset_homepage_footer' onclick='if(confirm(\"{$reset_home_warning}\"))window.location=\"".$_SERVER['PHP_SELF'] .'?'.$the_query_string."&reset_homepage=true\";' value='".translate('LBL_RESET_HOMEPAGE','Users')."' />";
194 193
 
195 194
         }
196
-        if (isset($buttons_header)) $this->ss->assign("BUTTONS_HEADER", $buttons_header);
197
-        if (isset($buttons_footer)) $this->ss->assign("BUTTONS_FOOTER", $buttons_footer);
195
+        if (isset($buttons_header)) {
196
+            $this->ss->assign("BUTTONS_HEADER", $buttons_header);
197
+        }
198
+        if (isset($buttons_footer)) {
199
+            $this->ss->assign("BUTTONS_FOOTER", $buttons_footer);
200
+        }
198 201
 
199 202
 
200 203
 
@@ -388,7 +391,9 @@  discard block
 block discarded – undo
388 391
 
389 392
         $this->ss->assign('EXPORT_DELIMITER', $this->bean->getPreference('export_delimiter'));
390 393
 
391
-        if($this->bean->receive_notifications ||(!isset($this->bean->id) && $admin->settings['notify_send_by_default'])) $this->ss->assign("RECEIVE_NOTIFICATIONS", "checked");
394
+        if($this->bean->receive_notifications ||(!isset($this->bean->id) && $admin->settings['notify_send_by_default'])) {
395
+            $this->ss->assign("RECEIVE_NOTIFICATIONS", "checked");
396
+        }
392 397
 
393 398
         //jc:12293 - modifying to use the accessor method which will translate the
394 399
         //available character sets using the translation files
@@ -479,7 +484,7 @@  discard block
 block discarded – undo
479 484
             $this->ss->assign('EXTERNAL_AUTH_CLASS_1', $sugar_config['authenticationClass']);
480 485
             $this->ss->assign('EXTERNAL_AUTH_CLASS', $sugar_config['authenticationClass']);
481 486
             $authclass = $sugar_config['authenticationClass'];
482
-        }else{
487
+        } else{
483 488
             if(!empty($GLOBALS['system_config']->settings['system_ldap_enabled'])){
484 489
                 $this->ss->assign('EXTERNAL_AUTH_CLASS_1', translate('LBL_LDAP','Users'));
485 490
                 $this->ss
@@ -772,12 +777,10 @@  discard block
 block discarded – undo
772 777
         if ($user->is_admin)
773 778
         {
774 779
             $user->user_type = 'Administrator';
775
-        }
776
-        else if ($user->is_group)
780
+        } else if ($user->is_group)
777 781
         {
778 782
             $user->user_type = 'GROUP';
779
-        }
780
-        else
783
+        } else
781 784
         {
782 785
             $user->user_type = 'RegularUser';
783 786
         }
Please login to merge, or discard this patch.