Completed
Push — develop ( 49fa03...44ee86 )
by Dmytro
14s
created
manager/processors/purge_plugin.processor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  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
     exit();
4 4
 }
5 5
 
6
-if(!$modx->hasPermission('delete_plugin')) {
6
+if (!$modx->hasPermission('delete_plugin')) {
7 7
 	$e->setError(3);
8 8
 	$e->dumpError();
9 9
 }
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
 // Get unique list of latest added plugins by highest sql-id
15 15
 $rs = $modx->db->query("SELECT t1.id FROM {$tbl_site_plugins} t1 LEFT JOIN {$tbl_site_plugins} t2 ON (t1.name = t2.name AND t1.id < t2.id) WHERE t2.id IS NULL;");
16 16
 $latestIds = array();
17
-while($row = $modx->db->getRow($rs)) {
17
+while ($row = $modx->db->getRow($rs)) {
18 18
     $latestIds[] = $row['id'];
19 19
 }
20 20
 
21 21
 // Get list of plugins with disabled and enabled versions
22 22
 $rs = $modx->db->query("SELECT id FROM {$tbl_site_plugins} t1 WHERE disabled = 1 AND name IN (SELECT name FROM {$tbl_site_plugins} t2 WHERE t1.name = t2.name AND t1.id != t2.id)");
23 23
 
24
-while($row = $modx->db->getRow($rs)) {
24
+while ($row = $modx->db->getRow($rs)) {
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)) continue; // Keep latest version of disabled plugins
29 29
 
30 30
     // invoke OnBeforePluginFormDelete event
31 31
     $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id));
Please login to merge, or discard this patch.
manager/processors/remove_content.processor.php 1 patch
Spacing   +3 added lines, -3 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('delete_document')) {
5
+if (!$modx->hasPermission('delete_document')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -42,5 +42,5 @@  discard block
 block discarded – undo
42 42
 	$modx->clearCache('full');
43 43
 
44 44
 	// finished emptying cache - redirect
45
-	$header="Location: index.php?a=2&r=1";
45
+	$header = "Location: index.php?a=2&r=1";
46 46
 	header($header);
Please login to merge, or discard this patch.
manager/processors/save_password.processor.php 1 patch
Spacing   +7 added lines, -7 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('save_password')) {
5
+if (!$modx->hasPermission('save_password')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,11 +10,11 @@  discard block
 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
 
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 	$uid = $modx->getLoginUserID();
24 24
 	$modx->loadExtension('phpass');
25 25
 	$f['password'] = $modx->phpass->HashPassword($pass1);
26
-	$modx->db->update($f,$tbl_manager_users,"id='{$uid}'");
26
+	$modx->db->update($f, $tbl_manager_users, "id='{$uid}'");
27 27
 
28 28
 	// invoke OnManagerChangePassword event
29
-	$modx->invokeEvent('OnManagerChangePassword', array (
29
+	$modx->invokeEvent('OnManagerChangePassword', array(
30 30
 		'userid' => $uid,
31 31
 		'username' => $_SESSION['mgrShortname'],
32 32
 		'userpassword' => $pass1
33 33
 	));
34 34
 
35
-$header="Location: index.php?a=2";
35
+$header = "Location: index.php?a=2";
36 36
 header($header);
Please login to merge, or discard this patch.
manager/processors/empty_table.processor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 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')) {
5
+if (!$modx->hasPermission('settings')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
9 9
 $modx->db->truncate($modx->getFullTableName('manager_log'));
10 10
 
11
-$header="Location: index.php?a=13";
11
+$header = "Location: index.php?a=13";
12 12
 header($header);
Please login to merge, or discard this patch.
manager/processors/send_message.processor.php 1 patch
Spacing   +11 added lines, -11 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('messages')) {
5
+if (!$modx->hasPermission('messages')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -10,13 +10,13 @@  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=="") $subject="(no subject)";
13
+if ($subject == "") $subject = "(no subject)";
14 14
 $message = $modx->db->escape($_REQUEST['messagebody']);
15
-if($message=="") $message="(no message)";
15
+if ($message == "") $message = "(no message)";
16 16
 $postdate = time();
17 17
 
18
-if($sendto=='u') {
19
-	if($userid==0) {
18
+if ($sendto == 'u') {
19
+	if ($userid == 0) {
20 20
 		$modx->webAlertAndQuit($_lang["error_no_user_selected"]);
21 21
 	}
22 22
 	$modx->db->insert(
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 		), $modx->getFullTableName('user_messages'));
32 32
 }
33 33
 
34
-if($sendto=='g') {
35
-	if($groupid==0) {
34
+if ($sendto == 'g') {
35
+	if ($groupid == 0) {
36 36
 		$modx->webAlertAndQuit($_lang["error_no_group_selected"]);
37 37
 	}
38 38
 	$rs = $modx->db->select('internalKey', $modx->getFullTableName('user_attributes'), "role='{$groupid}' AND internalKey!='".$modx->getLoginUserID()."'");
39
-	while ($row=$modx->db->getRow($rs)) {
39
+	while ($row = $modx->db->getRow($rs)) {
40 40
 		$modx->db->insert(
41 41
 			array(
42 42
 				'recipient' => $row['internalKey'],
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 }
52 52
 
53 53
 
54
-if($sendto=='a') {
54
+if ($sendto == 'a') {
55 55
 	$rs = $modx->db->select('id', $modx->getFullTableName('manager_users'), "id!='".$modx->getLoginUserID()."'");
56
-	while ($row=$modx->db->getRow($rs)) {
56
+	while ($row = $modx->db->getRow($rs)) {
57 57
 		$modx->db->insert(
58 58
 			array(
59 59
 				'recipient' => $row['id'],
Please login to merge, or discard this patch.
manager/frames/tree.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  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
 
6 6
 // invoke OnManagerTreeInit event
7 7
 $evtOut = $modx->invokeEvent('OnManagerTreeInit', $_REQUEST);
8
-if(is_array($evtOut)) {
8
+if (is_array($evtOut)) {
9 9
 	echo implode("\n", $evtOut);
10 10
 }
11 11
 ?>
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<a class="treeButton" id="treeMenu_collapsetree" onclick="modx.tree.collapseTree();" title="<?php echo $_lang['collapse_tree']; ?>"><?php echo $_style['collapse_tree']; ?></a>
19 19
 
20
-		<?php if($modx->hasPermission('new_document')) { ?>
20
+		<?php if ($modx->hasPermission('new_document')) { ?>
21 21
 			<a class="treeButton" id="treeMenu_addresource" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=4', title: '<?php echo $_lang['add_resource']; ?>'});" title="<?php echo $_lang['add_resource']; ?>"><?php echo $_style['add_doc_tree']; ?></a>
22 22
 			<a class="treeButton" id="treeMenu_addweblink" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=72', title: '<?php echo $_lang['add_weblink']; ?>'});" title="<?php echo $_lang['add_weblink']; ?>"><?php echo $_style['add_weblink_tree']; ?></a>
23 23
 		<?php } ?>
@@ -26,23 +26,23 @@  discard block
 block discarded – undo
26 26
 
27 27
 		<a class="treeButton" id="treeMenu_sortingtree" onclick="modx.tree.showSorter(event);" title="<?php echo $_lang['sort_tree']; ?>"><?php echo $_style['sort_tree']; ?></a>
28 28
 
29
-		<?php if($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?>
29
+		<?php if ($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?>
30 30
 			<a class="treeButton" id="treeMenu_sortingindex" onclick="modx.tabs({url: '<?= MODX_MANAGER_URL ?>?a=56&id=0', title: '<?php echo $_lang['sort_menuindex']; ?>'});" title="<?php echo $_lang['sort_menuindex']; ?>"><?php echo $_style['sort_menuindex']; ?></a>
31 31
 		<?php } ?>
32 32
 
33
-		<?php if($use_browser && $modx->hasPermission('assets_images')) { ?>
34
-			<a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a>
33
+		<?php if ($use_browser && $modx->hasPermission('assets_images')) { ?>
34
+			<a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a>
35 35
 		<?php } ?>
36 36
 
37
-		<?php if($use_browser && $modx->hasPermission('assets_files')) { ?>
38
-			<a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a>
37
+		<?php if ($use_browser && $modx->hasPermission('assets_files')) { ?>
38
+			<a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a>
39 39
 		<?php } ?>
40 40
 
41
-		<?php if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?>
42
-			<a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a>
41
+		<?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?>
42
+			<a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a>
43 43
 		<?php } ?>
44 44
 
45
-		<?php if($modx->hasPermission('empty_trash')) { ?>
45
+		<?php if ($modx->hasPermission('empty_trash')) { ?>
46 46
 			<a class="treeButton treeButtonDisabled" id="treeMenu_emptytrash" title="<?php echo $_lang['empty_recycle_bin_empty']; ?>"><?php echo $_style['empty_recycle_bin_empty']; ?></a>
47 47
 		<?php } ?>
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		<?php
55 55
 		// invoke OnManagerTreePrerender event
56 56
 		$evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->db->escape($_REQUEST));
57
-		if(is_array($evtOut)) {
57
+		if (is_array($evtOut)) {
58 58
 			echo implode("\n", $evtOut);
59 59
 		}
60 60
 		?>
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		<?php
67 67
 		// invoke OnManagerTreeRender event
68 68
 		$evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->db->escape($_REQUEST));
69
-		if(is_array($evtOut)) {
69
+		if (is_array($evtOut)) {
70 70
 			echo implode("\n", $evtOut);
71 71
 		}
72 72
 		?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.3.4.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.
manager/actions/help/version_notices/1.2.1.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 ?>
Please login to merge, or discard this patch.