Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
manager/processors/remove_installer.processor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,18 +12,18 @@  discard block
 block discarded – undo
12 12
  *
13 13
  */
14 14
 
15
-$msg ='';
16
-$pth = dirname(dirname(dirname(__FILE__))) . "/install/";
15
+$msg = '';
16
+$pth = dirname(dirname(dirname(__FILE__)))."/install/";
17 17
 $pth = str_replace("\\", "/", $pth);
18 18
 if (isset($_GET["rminstall"])) {
19 19
     if (is_dir($pth)) {
20 20
         if (!rmdirRecursive($pth)) {
21
-            $msg="An error occured while attempting to remove the install folder";
21
+            $msg = "An error occured while attempting to remove the install folder";
22 22
         }
23 23
     }
24 24
 }
25 25
 if ($msg) {
26
-    echo "<script>alert('" . addslashes($msg) . "');</script>";
26
+    echo "<script>alert('".addslashes($msg)."');</script>";
27 27
 }
28 28
 echo "<script>window.location='../index.php?a=2';</script>";
29 29
 
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
  * @param bool $followLinks
35 35
  * @return bool
36 36
  */
37
-function rmdirRecursive($path, $followLinks=false)
37
+function rmdirRecursive($path, $followLinks = false)
38 38
 {
39
-    $dir = opendir($path) ;
39
+    $dir = opendir($path);
40 40
     while ($entry = readdir($dir)) {
41 41
         if (is_file("$path/$entry") || ((!$followLinks) && is_link("$path/$entry"))) {
42 42
             @unlink("$path/$entry");
43
-        } elseif (is_dir("$path/$entry") && $entry!='.' && $entry!='..') {
43
+        } elseif (is_dir("$path/$entry") && $entry != '.' && $entry != '..') {
44 44
             rmdirRecursive("$path/$entry"); // recursive
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
manager/processors/send_message.processor.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('messages')) {
@@ -10,17 +10,17 @@  discard block
 block discarded – undo
10 10
 $userid = $_REQUEST['user'];
11 11
 $groupid = $_REQUEST['group'];
12 12
 $subject = $modx->db->escape($_REQUEST['messagesubject']);
13
-if ($subject=="") {
14
-    $subject="(no subject)";
13
+if ($subject == "") {
14
+    $subject = "(no subject)";
15 15
 }
16 16
 $message = $modx->db->escape($_REQUEST['messagebody']);
17
-if ($message=="") {
18
-    $message="(no message)";
17
+if ($message == "") {
18
+    $message = "(no message)";
19 19
 }
20 20
 $postdate = time();
21 21
 
22
-if ($sendto=='u') {
23
-    if ($userid==0) {
22
+if ($sendto == 'u') {
23
+    if ($userid == 0) {
24 24
         $modx->webAlertAndQuit($_lang["error_no_user_selected"]);
25 25
     }
26 26
     $modx->db->insert(
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
         ), $modx->getFullTableName('user_messages'));
36 36
 }
37 37
 
38
-if ($sendto=='g') {
39
-    if ($groupid==0) {
38
+if ($sendto == 'g') {
39
+    if ($groupid == 0) {
40 40
         $modx->webAlertAndQuit($_lang["error_no_group_selected"]);
41 41
     }
42
-    $rs = $modx->db->select('internalKey', $modx->getFullTableName('user_attributes'), "role='{$groupid}' AND internalKey!='" . $modx->getLoginUserID() . "'");
43
-    while ($row=$modx->db->getRow($rs)) {
42
+    $rs = $modx->db->select('internalKey', $modx->getFullTableName('user_attributes'), "role='{$groupid}' AND internalKey!='".$modx->getLoginUserID()."'");
43
+    while ($row = $modx->db->getRow($rs)) {
44 44
         $modx->db->insert(
45 45
             array(
46 46
                 'recipient' => $row['internalKey'],
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 }
56 56
 
57 57
 
58
-if ($sendto=='a') {
59
-    $rs = $modx->db->select('id', $modx->getFullTableName('manager_users'), "id!='" . $modx->getLoginUserID() . "'");
60
-    while ($row=$modx->db->getRow($rs)) {
58
+if ($sendto == 'a') {
59
+    $rs = $modx->db->select('id', $modx->getFullTableName('manager_users'), "id!='".$modx->getLoginUserID()."'");
60
+    while ($row = $modx->db->getRow($rs)) {
61 61
         $modx->db->insert(
62 62
             array(
63 63
                 'recipient' => $row['id'],
Please login to merge, or discard this patch.
manager/processors/access_groups.processor.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('access_permissions')) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     break;
51 51
     case "delete_user_group":
52 52
         $updategroupaccess = true;
53
-        $usergroup = (int)$_REQUEST['usergroup'];
53
+        $usergroup = (int) $_REQUEST['usergroup'];
54 54
         if (empty($usergroup)) {
55 55
             $modx->webAlertAndQuit("No user group id specified for deletion.");
56 56
         } else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
     break;
64 64
     case "delete_document_group":
65
-        $group = (int)$_REQUEST['documentgroup'];
65
+        $group = (int) $_REQUEST['documentgroup'];
66 66
         if (empty($group)) {
67 67
             $modx->webAlertAndQuit("No document group id specified for deletion.");
68 68
         } else {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         if (empty($newgroupname)) {
79 79
             $modx->webAlertAndQuit("No group name specified.");
80 80
         }
81
-        $groupid = (int)$_REQUEST['groupid'];
81
+        $groupid = (int) $_REQUEST['groupid'];
82 82
         if (empty($groupid)) {
83 83
             $modx->webAlertAndQuit("No group id specified for rename.");
84 84
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         if (empty($newgroupname)) {
91 91
             $modx->webAlertAndQuit("No group name specified.");
92 92
         }
93
-        $groupid = (int)$_REQUEST['groupid'];
93
+        $groupid = (int) $_REQUEST['groupid'];
94 94
         if (empty($groupid)) {
95 95
             $modx->webAlertAndQuit("No group id specified for rename.");
96 96
         }
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
     break;
100 100
     case "add_document_group_to_user_group":
101 101
         $updategroupaccess = true;
102
-        $usergroup = (int)$_REQUEST['usergroup'];
103
-        $docgroup = (int)$_REQUEST['docgroup'];
102
+        $usergroup = (int) $_REQUEST['usergroup'];
103
+        $docgroup = (int) $_REQUEST['docgroup'];
104 104
         $rs = $modx->db->select('COUNT(*)', $tbl_membergroup_access, "membergroup='{$usergroup}' AND documentgroup='{$docgroup}'");
105 105
         $limit = $modx->db->getValue($rs);
106
-        if ($limit<=0) {
106
+        if ($limit <= 0) {
107 107
             $modx->db->insert(array('membergroup' => $usergroup, 'documentgroup' => $docgroup), $tbl_membergroup_access);
108 108
         } else {
109 109
             //alert user that coupling already exists?
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     break;
112 112
     case "remove_document_group_from_user_group":
113 113
         $updategroupaccess = true;
114
-        $coupling = (int)$_REQUEST['coupling'];
114
+        $coupling = (int) $_REQUEST['coupling'];
115 115
         $modx->db->delete($tbl_membergroup_access, "id='{$coupling}'");
116 116
     break;
117 117
     default:
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 }
120 120
 
121 121
 // secure manager documents - flag as private
122
-if ($updategroupaccess==true) {
123
-    include MODX_MANAGER_PATH . "includes/secure_mgr_documents.inc.php";
122
+if ($updategroupaccess == true) {
123
+    include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php";
124 124
     secureMgrDocument();
125 125
 
126 126
     // Update the private group column
Please login to merge, or discard this patch.
manager/processors/duplicate_template.processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('new_template')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = isset($_GET['id'])? (int)$_GET['id'] : 0;
10
-if ($id==0) {
9
+$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
10
+if ($id == 0) {
11 11
     $modx->webAlertAndQuit($_lang["error_no_id"]);
12 12
 }
13 13
 
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) {
18
-    $count = ' ' . ($count+1);
17
+if ($count >= 1) {
18
+    $count = ' '.($count + 1);
19 19
 } else {
20 20
     $count = '';
21 21
 }
@@ -44,5 +44,5 @@  discard block
 block discarded – undo
44 44
 $_SESSION['itemname'] = $name;
45 45
 
46 46
 // finish duplicating - redirect to new template
47
-$header="Location: index.php?r=2&a=16&id=$newid";
47
+$header = "Location: index.php?r=2&a=16&id=$newid";
48 48
 header($header);
Please login to merge, or discard this patch.
manager/processors/save_htmlsnippet.processor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_chunk')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = (int)$_POST['id'];
9
+$id = (int) $_POST['id'];
10 10
 $snippet = $modx->db->escape($_POST['post']);
11 11
 $name = $modx->db->escape(trim($_POST['name']));
12 12
 $description = $modx->db->escape($_POST['description']);
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
 
17 17
 //Kyle Jaebker - added category support
18 18
 if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) {
19
-    $categoryid = (int)$_POST['categoryid'];
19
+    $categoryid = (int) $_POST['categoryid'];
20 20
 } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) {
21 21
     $categoryid = 0;
22 22
 } else {
23
-    include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
23
+    include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
24 24
     $categoryid = checkCategory($_POST['newcategory']);
25 25
     if (!$categoryid) {
26 26
         $categoryid = newCategory($_POST['newcategory']);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // finished emptying cache - redirect
81 81
         if ($_POST['stay'] != '') {
82 82
             $a = ($_POST['stay'] == '2') ? "78&id=$newid" : "77";
83
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
83
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
84 84
             header($header);
85 85
         } else {
86 86
             $header = "Location: index.php?a=76&r=2";
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         // finished emptying cache - redirect
130 130
         if ($_POST['stay'] != '') {
131 131
             $a = ($_POST['stay'] == '2') ? "78&id=$id" : "77";
132
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
132
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
133 133
             header($header);
134 134
         } else {
135 135
             $modx->unlockElement(3, $id);
Please login to merge, or discard this patch.
manager/processors/save_user.processor.php 2 patches
Switch Indentation   +209 added lines, -209 removed lines patch added patch discarded remove patch
@@ -68,109 +68,109 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 switch ($input['mode']) {
71
-    case '11': // new user
72
-        // check if this user name already exist
73
-        $rs = $modx->db->select('count(id)', $tbl_manager_users, sprintf("username='%s'", $modx->db->escape($newusername)));
74
-        $limit = $modx->db->getValue($rs);
75
-        if ($limit > 0) {
76
-            webAlertAndQuit("User name is already in use!");
77
-        }
71
+        case '11': // new user
72
+            // check if this user name already exist
73
+            $rs = $modx->db->select('count(id)', $tbl_manager_users, sprintf("username='%s'", $modx->db->escape($newusername)));
74
+            $limit = $modx->db->getValue($rs);
75
+            if ($limit > 0) {
76
+                webAlertAndQuit("User name is already in use!");
77
+            }
78 78
 
79
-        // check if the email address already exist
80
-        $rs = $modx->db->select('count(internalKey)', $tbl_user_attributes, sprintf("email='%s' AND id!='%s'", $modx->db->escape($email), $id));
81
-        $limit = $modx->db->getValue($rs);
82
-        if ($limit > 0) {
83
-            webAlertAndQuit("Email is already in use!");
84
-        }
79
+            // check if the email address already exist
80
+            $rs = $modx->db->select('count(internalKey)', $tbl_user_attributes, sprintf("email='%s' AND id!='%s'", $modx->db->escape($email), $id));
81
+            $limit = $modx->db->getValue($rs);
82
+            if ($limit > 0) {
83
+                webAlertAndQuit("Email is already in use!");
84
+            }
85 85
 
86
-        // generate a new password for this user
87
-        if ($specifiedpassword != "" && $passwordgenmethod == "spec") {
88
-            if (strlen($specifiedpassword) < 6) {
89
-                webAlertAndQuit("Password is too short!");
86
+            // generate a new password for this user
87
+            if ($specifiedpassword != "" && $passwordgenmethod == "spec") {
88
+                if (strlen($specifiedpassword) < 6) {
89
+                    webAlertAndQuit("Password is too short!");
90
+                } else {
91
+                    $newpassword = $specifiedpassword;
92
+                }
93
+            } elseif ($specifiedpassword == "" && $passwordgenmethod == "spec") {
94
+                webAlertAndQuit("You didn't specify a password for this user!");
95
+            } elseif ($passwordgenmethod == 'g') {
96
+                $newpassword = generate_password(8);
90 97
             } else {
91
-                $newpassword = $specifiedpassword;
98
+                webAlertAndQuit("No password generation method specified!");
92 99
             }
93
-        } elseif ($specifiedpassword == "" && $passwordgenmethod == "spec") {
94
-            webAlertAndQuit("You didn't specify a password for this user!");
95
-        } elseif ($passwordgenmethod == 'g') {
96
-            $newpassword = generate_password(8);
97
-        } else {
98
-            webAlertAndQuit("No password generation method specified!");
99
-        }
100 100
 
101
-        // invoke OnBeforeUserFormSave event
102
-        $modx->invokeEvent("OnBeforeUserFormSave", array(
103
-            "mode" => "new",
104
-        ));
105
-
106
-        // create the user account
107
-        $internalKey = $modx->db->insert(array('username' => $modx->db->escape($newusername)), $tbl_manager_users);
108
-
109
-        $field = array();
110
-        $field['password'] = $modx->phpass->HashPassword($newpassword);
111
-        $modx->db->update($field, $tbl_manager_users, "id='{$internalKey}'");
112
-
113
-        $field = compact('internalKey', 'fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'blocked', 'blockeduntil', 'blockedafter');
114
-        $field = $modx->db->escape($field);
115
-        $modx->db->insert($field, $tbl_user_attributes);
116
-
117
-        // Save user settings
118
-        saveUserSettings($internalKey);
119
-
120
-        // invoke OnManagerSaveUser event
121
-        $modx->invokeEvent("OnManagerSaveUser", array(
122
-            "mode" => "new",
123
-            "userid" => $internalKey,
124
-            "username" => $newusername,
125
-            "userpassword" => $newpassword,
126
-            "useremail" => $email,
127
-            "userfullname" => $fullname,
128
-            "userroleid" => $role
129
-        ));
130
-
131
-        // invoke OnUserFormSave event
132
-        $modx->invokeEvent("OnUserFormSave", array(
133
-            "mode" => "new",
134
-            "id" => $internalKey
135
-        ));
136
-
137
-        // Set the item name for logger
138
-        $_SESSION['itemname'] = $newusername;
139
-
140
-        /*******************************************************************************/
141
-        // put the user in the user_groups he/ she should be in
142
-        // first, check that up_perms are switched on!
143
-        if ($use_udperms == 1) {
144
-            if (!empty($user_groups)) {
145
-                for ($i = 0; $i < count($user_groups); $i++) {
146
-                    $f = array();
147
-                    $f['user_group'] = (int)$user_groups[$i];
148
-                    $f['member'] = $internalKey;
149
-                    $modx->db->insert($f, $tbl_member_groups);
101
+            // invoke OnBeforeUserFormSave event
102
+            $modx->invokeEvent("OnBeforeUserFormSave", array(
103
+                "mode" => "new",
104
+            ));
105
+
106
+            // create the user account
107
+            $internalKey = $modx->db->insert(array('username' => $modx->db->escape($newusername)), $tbl_manager_users);
108
+
109
+            $field = array();
110
+            $field['password'] = $modx->phpass->HashPassword($newpassword);
111
+            $modx->db->update($field, $tbl_manager_users, "id='{$internalKey}'");
112
+
113
+            $field = compact('internalKey', 'fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'blocked', 'blockeduntil', 'blockedafter');
114
+            $field = $modx->db->escape($field);
115
+            $modx->db->insert($field, $tbl_user_attributes);
116
+
117
+            // Save user settings
118
+            saveUserSettings($internalKey);
119
+
120
+            // invoke OnManagerSaveUser event
121
+            $modx->invokeEvent("OnManagerSaveUser", array(
122
+                "mode" => "new",
123
+                "userid" => $internalKey,
124
+                "username" => $newusername,
125
+                "userpassword" => $newpassword,
126
+                "useremail" => $email,
127
+                "userfullname" => $fullname,
128
+                "userroleid" => $role
129
+            ));
130
+
131
+            // invoke OnUserFormSave event
132
+            $modx->invokeEvent("OnUserFormSave", array(
133
+                "mode" => "new",
134
+                "id" => $internalKey
135
+            ));
136
+
137
+            // Set the item name for logger
138
+            $_SESSION['itemname'] = $newusername;
139
+
140
+            /*******************************************************************************/
141
+            // put the user in the user_groups he/ she should be in
142
+            // first, check that up_perms are switched on!
143
+            if ($use_udperms == 1) {
144
+                if (!empty($user_groups)) {
145
+                    for ($i = 0; $i < count($user_groups); $i++) {
146
+                        $f = array();
147
+                        $f['user_group'] = (int)$user_groups[$i];
148
+                        $f['member'] = $internalKey;
149
+                        $modx->db->insert($f, $tbl_member_groups);
150
+                    }
150 151
                 }
151 152
             }
152
-        }
153
-        // end of user_groups stuff!
154
-
155
-        if ($passwordnotifymethod == 'e') {
156
-            sendMailMessage($email, $newusername, $newpassword, $fullname);
157
-            if ($input['stay'] != '') {
158
-                $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
159
-                $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
160
-                header($header);
161
-            } else {
162
-                $header = "Location: index.php?a=75&r=2";
163
-                header($header);
164
-            }
165
-        } else {
166
-            if ($input['stay'] != '') {
167
-                $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
168
-                $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
153
+            // end of user_groups stuff!
154
+
155
+            if ($passwordnotifymethod == 'e') {
156
+                sendMailMessage($email, $newusername, $newpassword, $fullname);
157
+                if ($input['stay'] != '') {
158
+                    $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
159
+                    $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
160
+                    header($header);
161
+                } else {
162
+                    $header = "Location: index.php?a=75&r=2";
163
+                    header($header);
164
+                }
169 165
             } else {
170
-                $stayUrl = "index.php?a=75&r=2";
171
-            }
166
+                if ($input['stay'] != '') {
167
+                    $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
168
+                    $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
169
+                } else {
170
+                    $stayUrl = "index.php?a=75&r=2";
171
+                }
172 172
 
173
-            include_once "header.inc.php"; ?>
173
+                include_once "header.inc.php"; ?>
174 174
 
175 175
 			<h1><?php echo $_lang['user_title']; ?></h1>
176 176
 
@@ -192,124 +192,124 @@  discard block
 block discarded – undo
192 192
 			</div>
193 193
 			<?php
194 194
 
195
-            include_once "footer.inc.php";
196
-        }
197
-        break;
198
-    case '12': // edit user
199
-        // generate a new password for this user
200
-        if ($genpassword == 1) {
201
-            if ($specifiedpassword != "" && $passwordgenmethod == "spec") {
202
-                if (strlen($specifiedpassword) < 6) {
203
-                    webAlertAndQuit("Password is too short!");
195
+                include_once "footer.inc.php";
196
+            }
197
+            break;
198
+        case '12': // edit user
199
+            // generate a new password for this user
200
+            if ($genpassword == 1) {
201
+                if ($specifiedpassword != "" && $passwordgenmethod == "spec") {
202
+                    if (strlen($specifiedpassword) < 6) {
203
+                        webAlertAndQuit("Password is too short!");
204
+                    } else {
205
+                        $newpassword = $specifiedpassword;
206
+                    }
207
+                } elseif ($specifiedpassword == "" && $passwordgenmethod == "spec") {
208
+                    webAlertAndQuit("You didn't specify a password for this user!");
209
+                } elseif ($passwordgenmethod == 'g') {
210
+                    $newpassword = generate_password(8);
204 211
                 } else {
205
-                    $newpassword = $specifiedpassword;
212
+                    webAlertAndQuit("No password generation method specified!");
206 213
                 }
207
-            } elseif ($specifiedpassword == "" && $passwordgenmethod == "spec") {
208
-                webAlertAndQuit("You didn't specify a password for this user!");
209
-            } elseif ($passwordgenmethod == 'g') {
210
-                $newpassword = generate_password(8);
211
-            } else {
212
-                webAlertAndQuit("No password generation method specified!");
213 214
             }
214
-        }
215
-        if ($passwordnotifymethod == 'e') {
216
-            sendMailMessage($email, $newusername, $newpassword, $fullname);
217
-        }
215
+            if ($passwordnotifymethod == 'e') {
216
+                sendMailMessage($email, $newusername, $newpassword, $fullname);
217
+            }
218 218
 
219
-        // check if the username already exist
220
-        $rs = $modx->db->select('count(id)', $tbl_manager_users, sprintf("username='%s' AND id!='%s'", $modx->db->escape($newusername), $id));
221
-        $limit = $modx->db->getValue($rs);
222
-        if ($limit > 0) {
223
-            webAlertAndQuit("User name is already in use!");
224
-        }
219
+            // check if the username already exist
220
+            $rs = $modx->db->select('count(id)', $tbl_manager_users, sprintf("username='%s' AND id!='%s'", $modx->db->escape($newusername), $id));
221
+            $limit = $modx->db->getValue($rs);
222
+            if ($limit > 0) {
223
+                webAlertAndQuit("User name is already in use!");
224
+            }
225 225
 
226
-        // check if the email address already exists
227
-        $rs = $modx->db->select('count(internalKey)', $tbl_user_attributes, sprintf("email='%s' AND internalKey!='%s'", $modx->db->escape($email), $id));
228
-        $limit = $modx->db->getValue($rs);
229
-        if ($limit > 0) {
230
-            webAlertAndQuit("Email is already in use!");
231
-        }
226
+            // check if the email address already exists
227
+            $rs = $modx->db->select('count(internalKey)', $tbl_user_attributes, sprintf("email='%s' AND internalKey!='%s'", $modx->db->escape($email), $id));
228
+            $limit = $modx->db->getValue($rs);
229
+            if ($limit > 0) {
230
+                webAlertAndQuit("Email is already in use!");
231
+            }
232 232
 
233
-        // invoke OnBeforeUserFormSave event
234
-        $modx->invokeEvent("OnBeforeUserFormSave", array(
235
-            "mode" => "upd",
236
-            "id" => $id
237
-        ));
233
+            // invoke OnBeforeUserFormSave event
234
+            $modx->invokeEvent("OnBeforeUserFormSave", array(
235
+                "mode" => "upd",
236
+                "id" => $id
237
+            ));
238 238
 
239
-        // update user name and password
240
-        $field = array();
241
-        $field['username'] = $modx->db->escape($newusername);
242
-        if ($genpassword == 1) {
243
-            $field['password'] = $modx->phpass->HashPassword($newpassword);
244
-        }
245
-        $modx->db->update($field, $tbl_manager_users, "id='{$id}'");
246
-        $field = compact('fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'failedlogincount', 'blocked', 'blockeduntil', 'blockedafter');
247
-        $field = $modx->db->escape($field);
248
-        $modx->db->update($field, $tbl_user_attributes, "internalKey='{$id}'");
249
-
250
-        // Save user settings
251
-        saveUserSettings($id);
252
-
253
-        // Set the item name for logger
254
-        $_SESSION['itemname'] = $newusername;
255
-
256
-        // invoke OnManagerSaveUser event
257
-        $modx->invokeEvent("OnManagerSaveUser", array(
258
-            "mode" => "upd",
259
-            "userid" => $id,
260
-            "username" => $newusername,
261
-            "userpassword" => $newpassword,
262
-            "useremail" => $email,
263
-            "userfullname" => $fullname,
264
-            "userroleid" => $role,
265
-            "oldusername" => (($oldusername != $newusername) ? $oldusername : ""),
266
-            "olduseremail" => (($oldemail != $email) ? $oldemail : "")
267
-        ));
268
-
269
-        // invoke OnManagerChangePassword event
270
-        if ($genpassword == 1) {
271
-            $modx->invokeEvent("OnManagerChangePassword", array(
239
+            // update user name and password
240
+            $field = array();
241
+            $field['username'] = $modx->db->escape($newusername);
242
+            if ($genpassword == 1) {
243
+                $field['password'] = $modx->phpass->HashPassword($newpassword);
244
+            }
245
+            $modx->db->update($field, $tbl_manager_users, "id='{$id}'");
246
+            $field = compact('fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'failedlogincount', 'blocked', 'blockeduntil', 'blockedafter');
247
+            $field = $modx->db->escape($field);
248
+            $modx->db->update($field, $tbl_user_attributes, "internalKey='{$id}'");
249
+
250
+            // Save user settings
251
+            saveUserSettings($id);
252
+
253
+            // Set the item name for logger
254
+            $_SESSION['itemname'] = $newusername;
255
+
256
+            // invoke OnManagerSaveUser event
257
+            $modx->invokeEvent("OnManagerSaveUser", array(
258
+                "mode" => "upd",
272 259
                 "userid" => $id,
273 260
                 "username" => $newusername,
274
-                "userpassword" => $newpassword
261
+                "userpassword" => $newpassword,
262
+                "useremail" => $email,
263
+                "userfullname" => $fullname,
264
+                "userroleid" => $role,
265
+                "oldusername" => (($oldusername != $newusername) ? $oldusername : ""),
266
+                "olduseremail" => (($oldemail != $email) ? $oldemail : "")
267
+            ));
268
+
269
+            // invoke OnManagerChangePassword event
270
+            if ($genpassword == 1) {
271
+                $modx->invokeEvent("OnManagerChangePassword", array(
272
+                    "userid" => $id,
273
+                    "username" => $newusername,
274
+                    "userpassword" => $newpassword
275
+                ));
276
+            }
277
+
278
+            // invoke OnUserFormSave event
279
+            $modx->invokeEvent("OnUserFormSave", array(
280
+                "mode" => "upd",
281
+                "id" => $id
275 282
             ));
276
-        }
277 283
 
278
-        // invoke OnUserFormSave event
279
-        $modx->invokeEvent("OnUserFormSave", array(
280
-            "mode" => "upd",
281
-            "id" => $id
282
-        ));
283
-
284
-        /*******************************************************************************/
285
-        // put the user in the user_groups he/ she should be in
286
-        // first, check that up_perms are switched on!
287
-        if ($use_udperms == 1) {
288
-            // as this is an existing user, delete his/ her entries in the groups before saving the new groups
289
-            $modx->db->delete($tbl_member_groups, "member='{$id}'");
290
-            if (!empty($user_groups)) {
291
-                for ($i = 0; $i < count($user_groups); $i++) {
292
-                    $field = array();
293
-                    $field['user_group'] = (int)$user_groups[$i];
294
-                    $field['member'] = $id;
295
-                    $modx->db->insert($field, $tbl_member_groups);
284
+            /*******************************************************************************/
285
+            // put the user in the user_groups he/ she should be in
286
+            // first, check that up_perms are switched on!
287
+            if ($use_udperms == 1) {
288
+                // as this is an existing user, delete his/ her entries in the groups before saving the new groups
289
+                $modx->db->delete($tbl_member_groups, "member='{$id}'");
290
+                if (!empty($user_groups)) {
291
+                    for ($i = 0; $i < count($user_groups); $i++) {
292
+                        $field = array();
293
+                        $field['user_group'] = (int)$user_groups[$i];
294
+                        $field['member'] = $id;
295
+                        $modx->db->insert($field, $tbl_member_groups);
296
+                    }
296 297
                 }
297 298
             }
298
-        }
299
-        // end of user_groups stuff!
300
-        /*******************************************************************************/
301
-        if ($id == $modx->getLoginUserID() && ($genpassword !== 1 && $passwordnotifymethod != 's')) {
302
-            $modx->webAlertAndQuit($_lang["user_changeddata"], 'javascript:top.location.href="index.php?a=8";');
303
-        }
304
-        if ($genpassword == 1 && $passwordnotifymethod == 's') {
305
-            if ($input['stay'] != '') {
306
-                $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
307
-                $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
308
-            } else {
309
-                $stayUrl = "index.php?a=75&r=2";
299
+            // end of user_groups stuff!
300
+            /*******************************************************************************/
301
+            if ($id == $modx->getLoginUserID() && ($genpassword !== 1 && $passwordnotifymethod != 's')) {
302
+                $modx->webAlertAndQuit($_lang["user_changeddata"], 'javascript:top.location.href="index.php?a=8";');
310 303
             }
304
+            if ($genpassword == 1 && $passwordnotifymethod == 's') {
305
+                if ($input['stay'] != '') {
306
+                    $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
307
+                    $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
308
+                } else {
309
+                    $stayUrl = "index.php?a=75&r=2";
310
+                }
311 311
 
312
-            include_once "header.inc.php"; ?>
312
+                include_once "header.inc.php"; ?>
313 313
 
314 314
 			<h1><?php echo $_lang['user_title']; ?></h1>
315 315
 
@@ -329,20 +329,20 @@  discard block
 block discarded – undo
329 329
 			</div>
330 330
 			<?php
331 331
 
332
-            include_once "footer.inc.php";
333
-        } else {
334
-            if ($input['stay'] != '') {
335
-                $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
336
-                $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
337
-                header($header);
332
+                include_once "footer.inc.php";
338 333
             } else {
339
-                $header = "Location: index.php?a=75&r=2";
340
-                header($header);
334
+                if ($input['stay'] != '') {
335
+                    $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
336
+                    $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
337
+                    header($header);
338
+                } else {
339
+                    $header = "Location: index.php?a=75&r=2";
340
+                    header($header);
341
+                }
341 342
             }
342
-        }
343
-        break;
344
-    default:
345
-        webAlertAndQuit("No operation set in request.");
343
+            break;
344
+        default:
345
+            webAlertAndQuit("No operation set in request.");
346 346
 }
347 347
 
348 348
 /**
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_user')) {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 $input = $_POST;
16 16
 
17
-$id = (int)$input['id'];
17
+$id = (int) $input['id'];
18 18
 $oldusername = $input['oldusername'];
19 19
 $newusername = !empty($input['newusername']) ? trim($input['newusername']) : "New User";
20 20
 $fullname = $input['fullname'];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             if (!empty($user_groups)) {
145 145
                 for ($i = 0; $i < count($user_groups); $i++) {
146 146
                     $f = array();
147
-                    $f['user_group'] = (int)$user_groups[$i];
147
+                    $f['user_group'] = (int) $user_groups[$i];
148 148
                     $f['member'] = $internalKey;
149 149
                     $modx->db->insert($f, $tbl_member_groups);
150 150
                 }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             sendMailMessage($email, $newusername, $newpassword, $fullname);
157 157
             if ($input['stay'] != '') {
158 158
                 $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
159
-                $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
159
+                $header = "Location: index.php?a={$a}&r=2&stay=".$input['stay'];
160 160
                 header($header);
161 161
             } else {
162 162
                 $header = "Location: index.php?a=75&r=2";
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         } else {
166 166
             if ($input['stay'] != '') {
167 167
                 $a = ($input['stay'] == '2') ? "12&id={$internalKey}" : "11";
168
-                $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
168
+                $stayUrl = "index.php?a={$a}&r=2&stay=".$input['stay'];
169 169
             } else {
170 170
                 $stayUrl = "index.php?a=75&r=2";
171 171
             }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             if (!empty($user_groups)) {
291 291
                 for ($i = 0; $i < count($user_groups); $i++) {
292 292
                     $field = array();
293
-                    $field['user_group'] = (int)$user_groups[$i];
293
+                    $field['user_group'] = (int) $user_groups[$i];
294 294
                     $field['member'] = $id;
295 295
                     $modx->db->insert($field, $tbl_member_groups);
296 296
                 }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         if ($genpassword == 1 && $passwordnotifymethod == 's') {
305 305
             if ($input['stay'] != '') {
306 306
                 $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
307
-                $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay'];
307
+                $stayUrl = "index.php?a={$a}&r=2&stay=".$input['stay'];
308 308
             } else {
309 309
                 $stayUrl = "index.php?a=75&r=2";
310 310
             }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 				<div class="sectionHeader"><?php echo $_lang['user_title']; ?></div>
324 324
 				<div class="sectionBody">
325 325
 					<div id="disp">
326
-						<p><?php echo sprintf($_lang["password_msg"], $modx->htmlspecialchars($newusername), $modx->htmlspecialchars($newpassword)) . (($id == $modx->getLoginUserID()) ? ' ' . $_lang['user_changeddata'] : ''); ?></p>
326
+						<p><?php echo sprintf($_lang["password_msg"], $modx->htmlspecialchars($newusername), $modx->htmlspecialchars($newpassword)).(($id == $modx->getLoginUserID()) ? ' '.$_lang['user_changeddata'] : ''); ?></p>
327 327
 					</div>
328 328
 				</div>
329 329
 			</div>
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         } else {
334 334
             if ($input['stay'] != '') {
335 335
                 $a = ($input['stay'] == '2') ? "12&id={$id}" : "11";
336
-                $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay'];
336
+                $header = "Location: index.php?a={$a}&r=2&stay=".$input['stay'];
337 337
                 header($header);
338 338
             } else {
339 339
                 $header = "Location: index.php?a=75&r=2";
@@ -449,10 +449,10 @@  discard block
 block discarded – undo
449 449
     }
450 450
 
451 451
     foreach ($defaults as $k) {
452
-        if (isset($settings['default_' . $k]) && $settings['default_' . $k] == '1') {
452
+        if (isset($settings['default_'.$k]) && $settings['default_'.$k] == '1') {
453 453
             unset($settings[$k]);
454 454
         }
455
-        unset($settings['default_' . $k]);
455
+        unset($settings['default_'.$k]);
456 456
     }
457 457
 
458 458
     $modx->db->delete($tbl_user_settings, "user='{$id}'");
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
     global $id, $modx;
483 483
     $mode = $_POST['mode'];
484 484
     $modx->manager->saveFormValues($mode);
485
-    $modx->webAlertAndQuit($msg, "index.php?a={$mode}" . ($mode == '12' ? "&id={$id}" : ''));
485
+    $modx->webAlertAndQuit($msg, "index.php?a={$mode}".($mode == '12' ? "&id={$id}" : ''));
486 486
 }
487 487
 
488 488
 /**
Please login to merge, or discard this patch.
manager/processors/save_template.processor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('save_template')) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9
-$id = (int)$_POST['id'];
9
+$id = (int) $_POST['id'];
10 10
 $template = $modx->db->escape($_POST['post']);
11 11
 $templatename = $modx->db->escape(trim($_POST['templatename']));
12 12
 $description = $modx->db->escape($_POST['description']);
13 13
 $locked = $_POST['locked'] == 'on' ? 1 : 0;
14
-$selectable = $id == $modx->config['default_template'] ? 1 :    // Force selectable
14
+$selectable = $id == $modx->config['default_template'] ? 1 : // Force selectable
15 15
     $_POST['selectable'] == 'on' ? 1 : 0;
16 16
 $currentdate = time() + $modx->config['server_offset_time'];
17 17
 
18 18
 //Kyle Jaebker - added category support
19 19
 if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) {
20
-    $categoryid = (int)$_POST['categoryid'];
20
+    $categoryid = (int) $_POST['categoryid'];
21 21
 } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) {
22 22
     $categoryid = 0;
23 23
 } else {
24
-    include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php');
24
+    include_once(MODX_MANAGER_PATH.'includes/categories.inc.php');
25 25
     $categoryid = checkCategory($_POST['newcategory']);
26 26
     if (!$categoryid) {
27 27
         $categoryid = newCategory($_POST['newcategory']);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         // finished emptying cache - redirect
79 79
         if ($_POST['stay'] != '') {
80 80
             $a = ($_POST['stay'] == '2') ? "16&id=$newid" : "19";
81
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
81
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
82 82
             header($header);
83 83
         } else {
84 84
             $header = "Location: index.php?a=76&r=2";
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         // finished emptying cache - redirect
131 131
         if ($_POST['stay'] != '') {
132 132
             $a = ($_POST['stay'] == '2') ? "16&id=$id" : "19";
133
-            $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'];
133
+            $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay'];
134 134
             header($header);
135 135
         } else {
136 136
             $modx->unlockElement(1, $id);
Please login to merge, or discard this patch.
manager/processors/export_site.processor.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 if (!$modx->hasPermission('export_static')) {
@@ -12,17 +12,17 @@  discard block
 block discarded – undo
12 12
 $modx->loadExtension('EXPORT_SITE');
13 13
 
14 14
 
15
-if (is_dir(MODX_BASE_PATH . 'temp')) {
16
-    $export_dir = MODX_BASE_PATH . 'temp/export';
17
-} elseif (is_dir(MODX_BASE_PATH . 'assets')) {
18
-    $export_dir = MODX_BASE_PATH . 'assets/export';
15
+if (is_dir(MODX_BASE_PATH.'temp')) {
16
+    $export_dir = MODX_BASE_PATH.'temp/export';
17
+} elseif (is_dir(MODX_BASE_PATH.'assets')) {
18
+    $export_dir = MODX_BASE_PATH.'assets/export';
19 19
 }
20 20
 $modx->export->targetDir = $export_dir;
21 21
 
22
-if (strpos($modx->config['base_path'], "{$export_dir}/")===0 && 0 <= strlen(str_replace("{$export_dir}/", '', $modx->config['base_path']))) {
22
+if (strpos($modx->config['base_path'], "{$export_dir}/") === 0 && 0 <= strlen(str_replace("{$export_dir}/", '', $modx->config['base_path']))) {
23 23
     return $_lang['export_site.static.php6'];
24
-} elseif ($modx->config['rb_base_dir'] === $export_dir . '/') {
25
-    return $modx->parsePlaceholder($_lang['export_site.static.php7'], 'rb_base_url=' . $modx->config['base_url'] . $modx->config['rb_base_url']);
24
+} elseif ($modx->config['rb_base_dir'] === $export_dir.'/') {
25
+    return $modx->parsePlaceholder($_lang['export_site.static.php7'], 'rb_base_url='.$modx->config['base_url'].$modx->config['rb_base_url']);
26 26
 } elseif (!is_writable($export_dir)) {
27 27
     return $_lang['export_site_target_unwritable'];
28 28
 }
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
 $repl_after      = $_POST['repl_after'];
38 38
 $includenoncache = $_POST['includenoncache'];
39 39
 
40
-if ($ignore_ids!==$_POST['ignore_ids']
41
- ||$includenoncache!==$_POST['includenoncache']
42
- ||$repl_before!==$_POST['repl_before']
43
- ||$repl_after !==$_POST['repl_after']) {
40
+if ($ignore_ids !== $_POST['ignore_ids']
41
+ ||$includenoncache !== $_POST['includenoncache']
42
+ ||$repl_before !== $_POST['repl_before']
43
+ ||$repl_after !== $_POST['repl_after']) {
44 44
     $modx->clearCache('full');
45 45
 }
46 46
 
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
 
57 57
 $exportend = $modx->export->get_mtime();
58 58
 $totaltime = ($exportend - $modx->export->exportstart);
59
-$output .= sprintf('<p>' . $_lang["export_site_time"] . '</p>', round($totaltime, 3));
59
+$output .= sprintf('<p>'.$_lang["export_site_time"].'</p>', round($totaltime, 3));
60 60
 return $output;
Please login to merge, or discard this patch.
manager/processors/optimize_table.processor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) {
5
+if (!($modx->hasPermission('settings') && ($modx->hasPermission('logs') || $modx->hasPermission('bk_manager')))) {
6 6
     $modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -28,6 +28,6 @@  discard block
 block discarded – undo
28 28
     $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]);
29 29
 }
30 30
 
31
-$mode = (int)$_REQUEST['mode'];
32
-$header="Location: index.php?a={$mode}&s=4";
31
+$mode = (int) $_REQUEST['mode'];
32
+$header = "Location: index.php?a={$mode}&s=4";
33 33
 header($header);
Please login to merge, or discard this patch.