Completed
Pull Request — develop (#595)
by
unknown
05:41
created
manager/processors/remove_locks.processor.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 if(!isset($_GET['id'])) {
7
-	if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	if(!$modx->hasPermission('remove_locks')) {
8
+	    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+	}
8 10
 
9 11
 	// Remove all locks
10 12
 	$modx->db->truncate($modx->getFullTableName('active_user_locks'));
Please login to merge, or discard this patch.
manager/processors/web_access_groups.processor.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 }
118 118
 
119 119
 // secure web documents - flag as private
120
-if($updategroupaccess==true){
120
+if($updategroupaccess==true) {
121 121
 	include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php";
122 122
 	secureWebDocument();
123 123
 
Please login to merge, or discard this patch.
manager/processors/duplicate_snippet.processor.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_snippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_snippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate Snippet
21 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
manager/processors/purge_plugin.processor.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,10 @@
 block discarded – undo
25 25
 
26 26
     $id = $row['id'];
27 27
 
28
-    if(in_array($id,$latestIds)) continue;	// Keep latest version of disabled plugins
28
+    if(in_array($id,$latestIds)) {
29
+        continue;
30
+    }
31
+    // Keep latest version of disabled plugins
29 32
 
30 33
     // invoke OnBeforePluginFormDelete event
31 34
     $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id));
Please login to merge, or discard this patch.
manager/processors/delete_role.processor.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
 	$modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
14
-if($id==1){
14
+if($id==1) {
15 15
 	$modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!");
16 16
 }
17 17
 
18 18
 $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'");
19 19
 $count=$modx->db->getValue($rs);
20
-if($count>0){
20
+if($count>0) {
21 21
 	$modx->webAlertAndQuit("There are users with this role. It can't be deleted.");
22 22
 }
23 23
 
Please login to merge, or discard this patch.
manager/processors/duplicate_htmlsnippet.processor.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('name', $modx->getFullTableName('site_htmlsnippets'), "name LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate htmlsnippet
21 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
manager/processors/save_password.processor.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 $pass1 = $_POST['pass1'];
11 11
 $pass2 = $_POST['pass2'];
12 12
 
13
-if($pass1!=$pass2){
13
+if($pass1!=$pass2) {
14 14
 	$modx->webAlertAndQuit("Passwords don't match!");
15 15
 }
16 16
 
17
-if(strlen($pass1)<6){
17
+if(strlen($pass1)<6) {
18 18
 	$modx->webAlertAndQuit("Password is too short. Please specify a password of at least 6 characters.");
19 19
 }
20 20
 
Please login to merge, or discard this patch.
manager/processors/duplicate_template.processor.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@
 block discarded – undo
14 14
 // count duplicates
15 15
 $name = $modx->db->getValue($modx->db->select('templatename', $modx->getFullTableName('site_templates'), "id='{$id}'"));
16 16
 $count = $modx->db->getRecordCount($modx->db->select('templatename', $modx->getFullTableName('site_templates'), "templatename LIKE '{$name} {$_lang['duplicated_el_suffix']}%'"));
17
-if($count>=1) $count = ' '.($count+1);
18
-else $count = '';
17
+if($count>=1) {
18
+    $count = ' '.($count+1);
19
+} else {
20
+    $count = '';
21
+}
19 22
 
20 23
 // duplicate template
21 24
 $newid = $modx->db->insert(
Please login to merge, or discard this patch.
manager/processors/send_message.processor.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,9 +10,13 @@
 block discarded – undo
10 10
 $userid = $_REQUEST['user'];
11 11
 $groupid = $_REQUEST['group'];
12 12
 $subject = $modx->db->escape($_REQUEST['messagesubject']);
13
-if($subject=="") $subject="(no subject)";
13
+if($subject=="") {
14
+    $subject="(no subject)";
15
+}
14 16
 $message = $modx->db->escape($_REQUEST['messagebody']);
15
-if($message=="") $message="(no message)";
17
+if($message=="") {
18
+    $message="(no message)";
19
+}
16 20
 $postdate = time();
17 21
 
18 22
 if($sendto=='u') {
Please login to merge, or discard this patch.