Completed
Push — develop ( d568f8...c061fc )
by Agel_Nash
06:25
created
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 1 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.
manager/processors/cache_sync.class.processor.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         if (isset($this->aliases[$id])) {
95 95
             if ($this->aliasVisible[$id] == 1) {
96 96
                 if ($path != '') {
97
-                    $path = $this->aliases[$id] . '/' . $path;
97
+                    $path = $this->aliases[$id].'/'.$path;
98 98
                 } else {
99 99
                     $path = $this->aliases[$id];
100 100
                 }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $modx->messageQuit("Cache path not set.");
119 119
         }
120 120
 
121
-        $files = glob(realpath($this->cachePath) . '/*.pageCache.php');
121
+        $files = glob(realpath($this->cachePath).'/*.pageCache.php');
122 122
         $filesincache = count($files);
123 123
         $deletedfiles = array();
124 124
         while ($file = array_shift($files)) {
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
                 if (isset($opcache)) {
154 154
                     echo '<p>Opcache empty.</p>';
155 155
                 }
156
-                echo '<p>' . $_lang['cache_files_deleted'] . '</p><ul>';
156
+                echo '<p>'.$_lang['cache_files_deleted'].'</p><ul>';
157 157
                 foreach ($deletedfiles as $deletedfile) {
158
-                    echo '<li>' . $deletedfile . '</li>';
158
+                    echo '<li>'.$deletedfile.'</li>';
159 159
                 }
160 160
                 echo '</ul>';
161 161
             }
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
 
175 175
 
176 176
         // write the file
177
-        $content = '<?php' . "\n";
178
-        $content .= '$recent_update=\'' . $this->request_time . '\';' . "\n";
179
-        $content .= '$cacheRefreshTime=\'' . $cacheRefreshTime . '\';' . "\n";
177
+        $content = '<?php'."\n";
178
+        $content .= '$recent_update=\''.$this->request_time.'\';'."\n";
179
+        $content .= '$cacheRefreshTime=\''.$cacheRefreshTime.'\';'."\n";
180 180
 
181
-        $filename = $this->cachePath . '/sitePublishing.idx.php';
181
+        $filename = $this->cachePath.'/sitePublishing.idx.php';
182 182
         if (!$handle = fopen($filename, 'w')) {
183 183
             exit("Cannot open file ({$filename}");
184 184
         }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $timesArr = array();
203 203
 
204 204
         $result = $modx->db->select('MIN(pub_date) AS minpub', '[+prefix+]site_content',
205
-            'pub_date>' . $this->request_time);
205
+            'pub_date>'.$this->request_time);
206 206
         if (!$result) {
207 207
             echo "Couldn't determine next publish event!";
208 208
         }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         }
214 214
 
215 215
         $result = $modx->db->select('MIN(unpub_date) AS minunpub', '[+prefix+]site_content',
216
-            'unpub_date>' . $this->request_time);
216
+            'unpub_date>'.$this->request_time);
217 217
         if (!$result) {
218 218
             echo "Couldn't determine next unpublish event!";
219 219
         }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         $config = array();
253 253
         $content .= '$c=&$this->config;';
254 254
         while (list($key, $value) = $modx->db->getRow($rs, 'num')) {
255
-            $content .= '$c[\'' . $key . '\']="' . $this->escapeDoubleQuotes($value) . '";';
255
+            $content .= '$c[\''.$key.'\']="'.$this->escapeDoubleQuotes($value).'";';
256 256
             $config[$key] = $value;
257 257
         }
258 258
 
@@ -290,23 +290,23 @@  discard block
 block discarded – undo
290 290
             $docid = $doc['id'];
291 291
             if ($use_alias_path) {
292 292
                 $tmpPath = $this->getParents($doc['parent']);
293
-                $alias = (strlen($tmpPath) > 0 ? "$tmpPath/" : '') . $doc['alias'];
293
+                $alias = (strlen($tmpPath) > 0 ? "$tmpPath/" : '').$doc['alias'];
294 294
                 $key = $alias;
295 295
             } else {
296 296
                 $key = $doc['alias'];
297 297
             }
298 298
 
299 299
             $doc['path'] = $tmpPath;
300
-            $content .= '$a[' . $docid . ']=array(\'id\'=>' . $docid . ',\'alias\'=>\'' . $doc['alias'] . '\',\'path\'=>\'' . $doc['path'] . '\',\'parent\'=>' . $doc['parent'] . ',\'isfolder\'=>' . $doc['isfolder'] . ',\'alias_visible\'=>' . $doc['alias_visible'] . ');';
301
-            $content .= '$d[\'' . $key . '\']=' . $docid . ';';
302
-            $content .= '$m[]=array(' . $doc['parent'] . '=>' . $docid . ');';
300
+            $content .= '$a['.$docid.']=array(\'id\'=>'.$docid.',\'alias\'=>\''.$doc['alias'].'\',\'path\'=>\''.$doc['path'].'\',\'parent\'=>'.$doc['parent'].',\'isfolder\'=>'.$doc['isfolder'].',\'alias_visible\'=>'.$doc['alias_visible'].');';
301
+            $content .= '$d[\''.$key.'\']='.$docid.';';
302
+            $content .= '$m[]=array('.$doc['parent'].'=>'.$docid.');';
303 303
         }
304 304
 
305 305
         // get content types
306 306
         $rs = $modx->db->select('id, contentType', '[+prefix+]site_content', "contentType!='text/html'");
307 307
         $content .= '$c=&$this->contentTypes;';
308 308
         while ($doc = $modx->db->getRow($rs)) {
309
-            $content .= '$c[\'' . $doc['id'] . '\']=\'' . $doc['contentType'] . '\';';
309
+            $content .= '$c[\''.$doc['id'].'\']=\''.$doc['contentType'].'\';';
310 310
         }
311 311
 
312 312
         // WRITE Chunks to cache file
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             if ($modx->config['minifyphp_incache']) {
317 317
                 $doc['snippet'] = $this->php_strip_whitespace($doc['snippet']);
318 318
             }
319
-            $content .= '$c[\'' . $doc['name'] . '\']=\'' . ($doc['disabled'] ? '' : $this->escapeSingleQuotes($doc['snippet'])) . '\';';
319
+            $content .= '$c[\''.$doc['name'].'\']=\''.($doc['disabled'] ? '' : $this->escapeSingleQuotes($doc['snippet'])).'\';';
320 320
         }
321 321
 
322 322
         // WRITE snippets to cache file
@@ -327,18 +327,18 @@  discard block
 block discarded – undo
327 327
         while ($row = $modx->db->getRow($rs)) {
328 328
             $key = $row['name'];
329 329
             if ($row['disabled']) {
330
-                $content .= '$s[\'' . $key . '\']=\'return false;\';';
330
+                $content .= '$s[\''.$key.'\']=\'return false;\';';
331 331
             } else {
332 332
                 $value = trim($row['snippet']);
333 333
                 if ($modx->config['minifyphp_incache']) {
334 334
                     $value = $this->php_strip_whitespace($value);
335 335
                 }
336
-                $content .= '$s[\'' . $key . '\']=\'' . $this->escapeSingleQuotes($value) . '\';';
336
+                $content .= '$s[\''.$key.'\']=\''.$this->escapeSingleQuotes($value).'\';';
337 337
                 $properties = $modx->parseProperties($row['properties']);
338 338
                 $sharedproperties = $modx->parseProperties($row['sharedproperties']);
339 339
                 $properties = array_merge($sharedproperties, $properties);
340 340
                 if (0 < count($properties)) {
341
-                    $content .= '$s[\'' . $key . 'Props\']=\'' . $this->escapeSingleQuotes(json_encode($properties)) . '\';';
341
+                    $content .= '$s[\''.$key.'Props\']=\''.$this->escapeSingleQuotes(json_encode($properties)).'\';';
342 342
                 }
343 343
             }
344 344
         }
@@ -356,13 +356,13 @@  discard block
 block discarded – undo
356 356
             if ($modx->config['minifyphp_incache']) {
357 357
                 $value = $this->php_strip_whitespace($value);
358 358
             }
359
-            $content .= '$p[\'' . $key . '\']=\'' . $this->escapeSingleQuotes($value) . '\';';
359
+            $content .= '$p[\''.$key.'\']=\''.$this->escapeSingleQuotes($value).'\';';
360 360
             if ($row['properties'] != '' || $row['sharedproperties'] != '') {
361 361
                 $properties = $modx->parseProperties($row['properties']);
362 362
                 $sharedproperties = $modx->parseProperties($row['sharedproperties']);
363 363
                 $properties = array_merge($sharedproperties, $properties);
364 364
                 if (0 < count($properties)) {
365
-                    $content .= '$p[\'' . $key . 'Props\']=\'' . $this->escapeSingleQuotes(json_encode($properties)) . '\';';
365
+                    $content .= '$p[\''.$key.'Props\']=\''.$this->escapeSingleQuotes(json_encode($properties)).'\';';
366 366
                 }
367 367
             }
368 368
         }
@@ -385,14 +385,14 @@  discard block
 block discarded – undo
385 385
         }
386 386
         foreach ($events as $evtname => $pluginnames) {
387 387
             $events[$evtname] = $pluginnames;
388
-            $content .= '$e[\'' . $evtname . '\']=array(\'' . implode('\',\'',
389
-                    $this->escapeSingleQuotes($pluginnames)) . '\');';
388
+            $content .= '$e[\''.$evtname.'\']=array(\''.implode('\',\'',
389
+                    $this->escapeSingleQuotes($pluginnames)).'\');';
390 390
         }
391 391
 
392 392
         $content .= "\n";
393 393
 
394 394
         // close and write the file
395
-        $filename = $this->cachePath . 'siteCache.idx.php';
395
+        $filename = $this->cachePath.'siteCache.idx.php';
396 396
 
397 397
         // invoke OnBeforeCacheUpdate event
398 398
         if ($modx) {
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
             exit("Cannot write main MODX cache file! Make sure the assets/cache directory is writable!");
404 404
         }
405 405
 
406
-        if (!is_file($this->cachePath . '/.htaccess')) {
407
-            file_put_contents($this->cachePath . '/.htaccess', "order deny,allow\ndeny from all\n");
406
+        if (!is_file($this->cachePath.'/.htaccess')) {
407
+            file_put_contents($this->cachePath.'/.htaccess', "order deny,allow\ndeny from all\n");
408 408
         }
409 409
 
410 410
         // invoke OnCacheUpdate event
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
     {
426 426
         $source = trim($source);
427 427
         if (substr($source, 0, 5) !== '<?php') {
428
-            $source = '<?php ' . $source;
428
+            $source = '<?php '.$source;
429 429
         }
430 430
 
431 431
         $tokens = token_get_all($source);
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
             }
484 484
         }
485 485
         $source = preg_replace(array('@^<\?php@i', '|\s+|', '|<!--|', '|-->|', '|-->\s+<!--|'),
486
-            array('', ' ', "\n" . '<!--', '-->' . "\n", '-->' . "\n" . '<!--'), $_);
486
+            array('', ' ', "\n".'<!--', '-->'."\n", '-->'."\n".'<!--'), $_);
487 487
         $source = trim($source);
488 488
 
489 489
         return $source;
Please login to merge, or discard this patch.