@@ -1,5 +1,5 @@ discard block |
||
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')) { |
@@ -11,7 +11,7 @@ discard block |
||
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 | |
@@ -21,7 +21,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -3,51 +3,51 @@ discard block |
||
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('exec_module')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? intval($_GET['id']) : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | 15 | if($_SESSION['mgrRole']!=1){ |
16 | - $rs = $modx->db->select( |
|
17 | - 'sma.usergroup,mg.member', |
|
18 | - $modx->getFullTableName("site_module_access")." sma |
|
16 | + $rs = $modx->db->select( |
|
17 | + 'sma.usergroup,mg.member', |
|
18 | + $modx->getFullTableName("site_module_access")." sma |
|
19 | 19 | LEFT JOIN ".$modx->getFullTableName("member_groups")." mg ON mg.user_group = sma.usergroup AND member='".$modx->getLoginUserID()."'", |
20 | - "sma.module = '{$id}'" |
|
21 | - ); |
|
22 | - //initialize permission to -1, if it stays -1 no permissions |
|
23 | - //attached so permission granted |
|
24 | - $permissionAccessInt = -1; |
|
20 | + "sma.module = '{$id}'" |
|
21 | + ); |
|
22 | + //initialize permission to -1, if it stays -1 no permissions |
|
23 | + //attached so permission granted |
|
24 | + $permissionAccessInt = -1; |
|
25 | 25 | |
26 | - while ($row = $modx->db->getRow($rs)) { |
|
27 | - if($row["usergroup"] && $row["member"]) { |
|
28 | - //if there are permissions and this member has permission, ofcourse |
|
29 | - //this is granted |
|
30 | - $permissionAccessInt = 1; |
|
31 | - } elseif ($permissionAccessInt==-1) { |
|
32 | - //if there are permissions but this member has no permission and the |
|
33 | - //variable was still in init state we set permission to 0; no permissions |
|
34 | - $permissionAccessInt = 0; |
|
35 | - } |
|
36 | - } |
|
26 | + while ($row = $modx->db->getRow($rs)) { |
|
27 | + if($row["usergroup"] && $row["member"]) { |
|
28 | + //if there are permissions and this member has permission, ofcourse |
|
29 | + //this is granted |
|
30 | + $permissionAccessInt = 1; |
|
31 | + } elseif ($permissionAccessInt==-1) { |
|
32 | + //if there are permissions but this member has no permission and the |
|
33 | + //variable was still in init state we set permission to 0; no permissions |
|
34 | + $permissionAccessInt = 0; |
|
35 | + } |
|
36 | + } |
|
37 | 37 | |
38 | - if($permissionAccessInt==0) { |
|
39 | - $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
|
40 | - } |
|
38 | + if($permissionAccessInt==0) { |
|
39 | + $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // get module data |
44 | 44 | $rs = $modx->db->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'"); |
45 | 45 | $content = $modx->db->getRow($rs); |
46 | 46 | if(!$content) { |
47 | - $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
|
47 | + $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
|
48 | 48 | } |
49 | 49 | if($content['disabled']) { |
50 | - $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
|
50 | + $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | // Set the item name for logger |
@@ -65,38 +65,38 @@ discard block |
||
65 | 65 | |
66 | 66 | // evalModule |
67 | 67 | function evalModule($moduleCode,$params){ |
68 | - global $modx; |
|
69 | - $modx->event->params = &$params; // store params inside event object |
|
70 | - if(is_array($params)) { |
|
71 | - extract($params, EXTR_SKIP); |
|
72 | - } |
|
73 | - ob_start(); |
|
74 | - $mod = eval($moduleCode); |
|
75 | - $msg = ob_get_contents(); |
|
76 | - ob_end_clean(); |
|
77 | - if (isset($php_errormsg)) |
|
78 | - { |
|
79 | - $error_info = error_get_last(); |
|
68 | + global $modx; |
|
69 | + $modx->event->params = &$params; // store params inside event object |
|
70 | + if(is_array($params)) { |
|
71 | + extract($params, EXTR_SKIP); |
|
72 | + } |
|
73 | + ob_start(); |
|
74 | + $mod = eval($moduleCode); |
|
75 | + $msg = ob_get_contents(); |
|
76 | + ob_end_clean(); |
|
77 | + if (isset($php_errormsg)) |
|
78 | + { |
|
79 | + $error_info = error_get_last(); |
|
80 | 80 | switch($error_info['type']) |
81 | 81 | { |
82 | - case E_NOTICE : |
|
83 | - $error_level = 1; |
|
84 | - case E_USER_NOTICE : |
|
85 | - break; |
|
86 | - case E_DEPRECATED : |
|
87 | - case E_USER_DEPRECATED : |
|
88 | - case E_STRICT : |
|
89 | - $error_level = 2; |
|
90 | - break; |
|
91 | - default: |
|
92 | - $error_level = 99; |
|
82 | + case E_NOTICE : |
|
83 | + $error_level = 1; |
|
84 | + case E_USER_NOTICE : |
|
85 | + break; |
|
86 | + case E_DEPRECATED : |
|
87 | + case E_USER_DEPRECATED : |
|
88 | + case E_STRICT : |
|
89 | + $error_level = 2; |
|
90 | + break; |
|
91 | + default: |
|
92 | + $error_level = 99; |
|
93 | + } |
|
94 | + if($modx->config['error_reporting']==='99' || 2<$error_level) |
|
95 | + { |
|
96 | + $modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'] . ' - Module', $error_info['message'], $error_info['line'], $msg); |
|
97 | + $modx->event->alert("An error occurred while loading. Please see the event log for more information<p>{$msg}</p>"); |
|
93 | 98 | } |
94 | - if($modx->config['error_reporting']==='99' || 2<$error_level) |
|
95 | - { |
|
96 | - $modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'] . ' - Module', $error_info['message'], $error_info['line'], $msg); |
|
97 | - $modx->event->alert("An error occurred while loading. Please see the event log for more information<p>{$msg}</p>"); |
|
98 | - } |
|
99 | - } |
|
100 | - unset($modx->event->params); |
|
101 | - return $mod.$msg; |
|
99 | + } |
|
100 | + unset($modx->event->params); |
|
101 | + return $mod.$msg; |
|
102 | 102 | } |
@@ -1,18 +1,18 @@ discard block |
||
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('exec_module')) { |
|
5 | +if (!$modx->hasPermission('exec_module')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_GET['id'])? intval($_GET['id']) : 0; |
|
10 | -if($id==0) { |
|
9 | +$id = isset($_GET['id']) ? intval($_GET['id']) : 0; |
|
10 | +if ($id == 0) { |
|
11 | 11 | $modx->webAlertAndQuit($_lang["error_no_id"]); |
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if ($_SESSION['mgrRole'] != 1) { |
|
16 | 16 | $rs = $modx->db->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getFullTableName("site_module_access")." sma |
@@ -24,18 +24,18 @@ discard block |
||
24 | 24 | $permissionAccessInt = -1; |
25 | 25 | |
26 | 26 | while ($row = $modx->db->getRow($rs)) { |
27 | - if($row["usergroup"] && $row["member"]) { |
|
27 | + if ($row["usergroup"] && $row["member"]) { |
|
28 | 28 | //if there are permissions and this member has permission, ofcourse |
29 | 29 | //this is granted |
30 | 30 | $permissionAccessInt = 1; |
31 | - } elseif ($permissionAccessInt==-1) { |
|
31 | + } elseif ($permissionAccessInt == -1) { |
|
32 | 32 | //if there are permissions but this member has no permission and the |
33 | 33 | //variable was still in init state we set permission to 0; no permissions |
34 | 34 | $permissionAccessInt = 0; |
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | - if($permissionAccessInt==0) { |
|
38 | + if ($permissionAccessInt == 0) { |
|
39 | 39 | $modx->webAlertAndQuit("You do not sufficient privileges to execute this module.", "index.php?a=106"); |
40 | 40 | } |
41 | 41 | } |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | // get module data |
44 | 44 | $rs = $modx->db->select('*', $modx->getFullTableName("site_modules"), "id='{$id}'"); |
45 | 45 | $content = $modx->db->getRow($rs); |
46 | -if(!$content) { |
|
46 | +if (!$content) { |
|
47 | 47 | $modx->webAlertAndQuit("No record found for id {$id}.", "index.php?a=106"); |
48 | 48 | } |
49 | -if($content['disabled']) { |
|
49 | +if ($content['disabled']) { |
|
50 | 50 | $modx->webAlertAndQuit("This module is disabled and cannot be executed.", "index.php?a=106"); |
51 | 51 | } |
52 | 52 | |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | // Set the item name for logger |
60 | 60 | $_SESSION['itemname'] = $content['name']; |
61 | 61 | |
62 | -$output = evalModule($content["modulecode"],$parameter); |
|
62 | +$output = evalModule($content["modulecode"], $parameter); |
|
63 | 63 | echo $output; |
64 | 64 | include MODX_MANAGER_PATH."includes/sysalert.display.inc.php"; |
65 | 65 | |
66 | 66 | // evalModule |
67 | -function evalModule($moduleCode,$params){ |
|
67 | +function evalModule($moduleCode, $params){ |
|
68 | 68 | global $modx; |
69 | 69 | $modx->event->params = &$params; // store params inside event object |
70 | - if(is_array($params)) { |
|
70 | + if (is_array($params)) { |
|
71 | 71 | extract($params, EXTR_SKIP); |
72 | 72 | } |
73 | 73 | ob_start(); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (isset($php_errormsg)) |
78 | 78 | { |
79 | 79 | $error_info = error_get_last(); |
80 | - switch($error_info['type']) |
|
80 | + switch ($error_info['type']) |
|
81 | 81 | { |
82 | 82 | case E_NOTICE : |
83 | 83 | $error_level = 1; |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | default: |
92 | 92 | $error_level = 99; |
93 | 93 | } |
94 | - if($modx->config['error_reporting']==='99' || 2<$error_level) |
|
94 | + if ($modx->config['error_reporting'] === '99' || 2 < $error_level) |
|
95 | 95 | { |
96 | - $modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'] . ' - Module', $error_info['message'], $error_info['line'], $msg); |
|
96 | + $modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'].' - Module', $error_info['message'], $error_info['line'], $msg); |
|
97 | 97 | $modx->event->alert("An error occurred while loading. Please see the event log for more information<p>{$msg}</p>"); |
98 | 98 | } |
99 | 99 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | } |
13 | 13 | |
14 | 14 | // check if user has access permission, except admins |
15 | -if($_SESSION['mgrRole']!=1){ |
|
15 | +if($_SESSION['mgrRole']!=1) { |
|
16 | 16 | $rs = $modx->db->select( |
17 | 17 | 'sma.usergroup,mg.member', |
18 | 18 | $modx->getFullTableName("site_module_access")." sma |
@@ -64,7 +64,8 @@ discard block |
||
64 | 64 | include MODX_MANAGER_PATH."includes/sysalert.display.inc.php"; |
65 | 65 | |
66 | 66 | // evalModule |
67 | -function evalModule($moduleCode,$params){ |
|
67 | +function evalModule($moduleCode,$params) |
|
68 | +{ |
|
68 | 69 | global $modx; |
69 | 70 | $modx->event->params = &$params; // store params inside event object |
70 | 71 | if(is_array($params)) { |
@@ -74,11 +75,9 @@ discard block |
||
74 | 75 | $mod = eval($moduleCode); |
75 | 76 | $msg = ob_get_contents(); |
76 | 77 | ob_end_clean(); |
77 | - if (isset($php_errormsg)) |
|
78 | - { |
|
78 | + if (isset($php_errormsg)) { |
|
79 | 79 | $error_info = error_get_last(); |
80 | - switch($error_info['type']) |
|
81 | - { |
|
80 | + switch($error_info['type']) { |
|
82 | 81 | case E_NOTICE : |
83 | 82 | $error_level = 1; |
84 | 83 | case E_USER_NOTICE : |
@@ -91,8 +90,7 @@ discard block |
||
91 | 90 | default: |
92 | 91 | $error_level = 99; |
93 | 92 | } |
94 | - if($modx->config['error_reporting']==='99' || 2<$error_level) |
|
95 | - { |
|
93 | + if($modx->config['error_reporting']==='99' || 2<$error_level) { |
|
96 | 94 | $modx->messageQuit('PHP Parse Error', '', true, $error_info['type'], $error_info['file'], $_SESSION['itemname'] . ' - Module', $error_info['message'], $error_info['line'], $msg); |
97 | 95 | $modx->event->alert("An error occurred while loading. Please see the event log for more information<p>{$msg}</p>"); |
98 | 96 | } |
@@ -3,7 +3,7 @@ discard block |
||
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')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $sendto = $_REQUEST['sendto']; |
@@ -16,55 +16,55 @@ discard block |
||
16 | 16 | $postdate = time(); |
17 | 17 | |
18 | 18 | if($sendto=='u') { |
19 | - if($userid==0) { |
|
20 | - $modx->webAlertAndQuit($_lang["error_no_user_selected"]); |
|
21 | - } |
|
22 | - $modx->db->insert( |
|
23 | - array( |
|
24 | - 'recipient' => $userid, |
|
25 | - 'sender' => $modx->getLoginUserID(), |
|
26 | - 'subject' => $subject, |
|
27 | - 'message' => $message, |
|
28 | - 'postdate' => $postdate, |
|
29 | - 'type' => 'Message', |
|
30 | - 'private' => 1, |
|
31 | - ), $modx->getFullTableName('user_messages')); |
|
19 | + if($userid==0) { |
|
20 | + $modx->webAlertAndQuit($_lang["error_no_user_selected"]); |
|
21 | + } |
|
22 | + $modx->db->insert( |
|
23 | + array( |
|
24 | + 'recipient' => $userid, |
|
25 | + 'sender' => $modx->getLoginUserID(), |
|
26 | + 'subject' => $subject, |
|
27 | + 'message' => $message, |
|
28 | + 'postdate' => $postdate, |
|
29 | + 'type' => 'Message', |
|
30 | + 'private' => 1, |
|
31 | + ), $modx->getFullTableName('user_messages')); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if($sendto=='g') { |
35 | - if($groupid==0) { |
|
36 | - $modx->webAlertAndQuit($_lang["error_no_group_selected"]); |
|
37 | - } |
|
38 | - $rs = $modx->db->select('internalKey', $modx->getFullTableName('user_attributes'), "role='{$groupid}' AND internalKey!='".$modx->getLoginUserID()."'"); |
|
39 | - while ($row=$modx->db->getRow($rs)) { |
|
40 | - $modx->db->insert( |
|
41 | - array( |
|
42 | - 'recipient' => $row['internalKey'], |
|
43 | - 'sender' => $modx->getLoginUserID(), |
|
44 | - 'subject' => $subject, |
|
45 | - 'message' => $message, |
|
46 | - 'postdate' => $postdate, |
|
47 | - 'type' => 'Message', |
|
48 | - 'private' => 0, |
|
49 | - ), $modx->getFullTableName('user_messages')); |
|
50 | - } |
|
35 | + if($groupid==0) { |
|
36 | + $modx->webAlertAndQuit($_lang["error_no_group_selected"]); |
|
37 | + } |
|
38 | + $rs = $modx->db->select('internalKey', $modx->getFullTableName('user_attributes'), "role='{$groupid}' AND internalKey!='".$modx->getLoginUserID()."'"); |
|
39 | + while ($row=$modx->db->getRow($rs)) { |
|
40 | + $modx->db->insert( |
|
41 | + array( |
|
42 | + 'recipient' => $row['internalKey'], |
|
43 | + 'sender' => $modx->getLoginUserID(), |
|
44 | + 'subject' => $subject, |
|
45 | + 'message' => $message, |
|
46 | + 'postdate' => $postdate, |
|
47 | + 'type' => 'Message', |
|
48 | + 'private' => 0, |
|
49 | + ), $modx->getFullTableName('user_messages')); |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
54 | 54 | if($sendto=='a') { |
55 | - $rs = $modx->db->select('id', $modx->getFullTableName('manager_users'), "id!='".$modx->getLoginUserID()."'"); |
|
56 | - while ($row=$modx->db->getRow($rs)) { |
|
57 | - $modx->db->insert( |
|
58 | - array( |
|
59 | - 'recipient' => $row['id'], |
|
60 | - 'sender' => $modx->getLoginUserID(), |
|
61 | - 'subject' => $subject, |
|
62 | - 'message' => $message, |
|
63 | - 'postdate' => $postdate, |
|
64 | - 'type' => 'Message', |
|
65 | - 'private' => 0, |
|
66 | - ), $modx->getFullTableName('user_messages')); |
|
67 | - } |
|
55 | + $rs = $modx->db->select('id', $modx->getFullTableName('manager_users'), "id!='".$modx->getLoginUserID()."'"); |
|
56 | + while ($row=$modx->db->getRow($rs)) { |
|
57 | + $modx->db->insert( |
|
58 | + array( |
|
59 | + 'recipient' => $row['id'], |
|
60 | + 'sender' => $modx->getLoginUserID(), |
|
61 | + 'subject' => $subject, |
|
62 | + 'message' => $message, |
|
63 | + 'postdate' => $postdate, |
|
64 | + 'type' => 'Message', |
|
65 | + 'private' => 0, |
|
66 | + ), $modx->getFullTableName('user_messages')); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $header = "Location: index.php?a=10"; |
@@ -1,8 +1,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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'], |
@@ -10,9 +10,13 @@ |
||
10 | 10 | $userid = $_REQUEST['user']; |
11 | 11 | $groupid = $_REQUEST['group']; |
12 | 12 | $subject = $modx->db->escape($_REQUEST['messagesubject']); |
13 | -if($subject=="") $subject="(no subject)"; |
|
13 | +if($subject=="") { |
|
14 | + $subject="(no subject)"; |
|
15 | +} |
|
14 | 16 | $message = $modx->db->escape($_REQUEST['messagebody']); |
15 | -if($message=="") $message="(no message)"; |
|
17 | +if($message=="") { |
|
18 | + $message="(no message)"; |
|
19 | +} |
|
16 | 20 | $postdate = time(); |
17 | 21 | |
18 | 22 | if($sendto=='u') { |
@@ -3,7 +3,7 @@ discard block |
||
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')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | // access group processor. |
@@ -20,113 +20,113 @@ discard block |
||
20 | 20 | $operation = $_REQUEST['operation']; |
21 | 21 | |
22 | 22 | switch ($operation) { |
23 | - case "add_user_group" : |
|
24 | - $newgroup = $_REQUEST['newusergroup']; |
|
25 | - if(empty($newgroup)) { |
|
26 | - $modx->webAlertAndQuit("No group name specified."); |
|
27 | - } else { |
|
28 | - $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_membergroup_names); |
|
23 | + case "add_user_group" : |
|
24 | + $newgroup = $_REQUEST['newusergroup']; |
|
25 | + if(empty($newgroup)) { |
|
26 | + $modx->webAlertAndQuit("No group name specified."); |
|
27 | + } else { |
|
28 | + $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_membergroup_names); |
|
29 | 29 | |
30 | - // invoke OnManagerCreateGroup event |
|
31 | - $modx->invokeEvent('OnManagerCreateGroup', array( |
|
32 | - 'groupid' => $id, |
|
33 | - 'groupname' => $newgroup, |
|
34 | - )); |
|
35 | - } |
|
36 | - break; |
|
37 | - case "add_document_group" : |
|
38 | - $newgroup = $_REQUEST['newdocgroup']; |
|
39 | - if(empty($newgroup)) { |
|
40 | - $modx->webAlertAndQuit("No group name specified."); |
|
41 | - } else { |
|
42 | - $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_documentgroup_names); |
|
30 | + // invoke OnManagerCreateGroup event |
|
31 | + $modx->invokeEvent('OnManagerCreateGroup', array( |
|
32 | + 'groupid' => $id, |
|
33 | + 'groupname' => $newgroup, |
|
34 | + )); |
|
35 | + } |
|
36 | + break; |
|
37 | + case "add_document_group" : |
|
38 | + $newgroup = $_REQUEST['newdocgroup']; |
|
39 | + if(empty($newgroup)) { |
|
40 | + $modx->webAlertAndQuit("No group name specified."); |
|
41 | + } else { |
|
42 | + $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_documentgroup_names); |
|
43 | 43 | |
44 | - // invoke OnCreateDocGroup event |
|
45 | - $modx->invokeEvent('OnCreateDocGroup', array( |
|
46 | - 'groupid' => $id, |
|
47 | - 'groupname' => $newgroup, |
|
48 | - )); |
|
49 | - } |
|
50 | - break; |
|
51 | - case "delete_user_group" : |
|
52 | - $updategroupaccess = true; |
|
53 | - $usergroup = intval($_REQUEST['usergroup']); |
|
54 | - if(empty($usergroup)) { |
|
55 | - $modx->webAlertAndQuit("No user group id specified for deletion."); |
|
56 | - } else { |
|
57 | - $modx->db->delete($tbl_membergroup_names, "id='{$usergroup}'"); |
|
44 | + // invoke OnCreateDocGroup event |
|
45 | + $modx->invokeEvent('OnCreateDocGroup', array( |
|
46 | + 'groupid' => $id, |
|
47 | + 'groupname' => $newgroup, |
|
48 | + )); |
|
49 | + } |
|
50 | + break; |
|
51 | + case "delete_user_group" : |
|
52 | + $updategroupaccess = true; |
|
53 | + $usergroup = intval($_REQUEST['usergroup']); |
|
54 | + if(empty($usergroup)) { |
|
55 | + $modx->webAlertAndQuit("No user group id specified for deletion."); |
|
56 | + } else { |
|
57 | + $modx->db->delete($tbl_membergroup_names, "id='{$usergroup}'"); |
|
58 | 58 | |
59 | - $modx->db->delete($tbl_membergroup_access, "membergroup='{$usergroup}'"); |
|
59 | + $modx->db->delete($tbl_membergroup_access, "membergroup='{$usergroup}'"); |
|
60 | 60 | |
61 | - $modx->db->delete($tbl_member_groups, "user_group='{$usergroup}'"); |
|
62 | - } |
|
63 | - break; |
|
64 | - case "delete_document_group" : |
|
65 | - $group = intval($_REQUEST['documentgroup']); |
|
66 | - if(empty($group)) { |
|
67 | - $modx->webAlertAndQuit("No document group id specified for deletion."); |
|
68 | - } else { |
|
69 | - $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
|
61 | + $modx->db->delete($tbl_member_groups, "user_group='{$usergroup}'"); |
|
62 | + } |
|
63 | + break; |
|
64 | + case "delete_document_group" : |
|
65 | + $group = intval($_REQUEST['documentgroup']); |
|
66 | + if(empty($group)) { |
|
67 | + $modx->webAlertAndQuit("No document group id specified for deletion."); |
|
68 | + } else { |
|
69 | + $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
|
70 | 70 | |
71 | - $modx->db->delete($tbl_membergroup_access, "documentgroup='{$group}'"); |
|
71 | + $modx->db->delete($tbl_membergroup_access, "documentgroup='{$group}'"); |
|
72 | 72 | |
73 | - $modx->db->delete($tbl_document_groups, "document_group='{$group}'"); |
|
74 | - } |
|
75 | - break; |
|
76 | - case "rename_user_group" : |
|
77 | - $newgroupname = $_REQUEST['newgroupname']; |
|
78 | - if(empty($newgroupname)) { |
|
79 | - $modx->webAlertAndQuit("No group name specified."); |
|
80 | - } |
|
81 | - $groupid = intval($_REQUEST['groupid']); |
|
82 | - if(empty($groupid)) { |
|
83 | - $modx->webAlertAndQuit("No group id specified for rename."); |
|
84 | - } |
|
73 | + $modx->db->delete($tbl_document_groups, "document_group='{$group}'"); |
|
74 | + } |
|
75 | + break; |
|
76 | + case "rename_user_group" : |
|
77 | + $newgroupname = $_REQUEST['newgroupname']; |
|
78 | + if(empty($newgroupname)) { |
|
79 | + $modx->webAlertAndQuit("No group name specified."); |
|
80 | + } |
|
81 | + $groupid = intval($_REQUEST['groupid']); |
|
82 | + if(empty($groupid)) { |
|
83 | + $modx->webAlertAndQuit("No group id specified for rename."); |
|
84 | + } |
|
85 | 85 | |
86 | - $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_membergroup_names, "id='{$groupid}'"); |
|
87 | - break; |
|
88 | - case "rename_document_group" : |
|
89 | - $newgroupname = $_REQUEST['newgroupname']; |
|
90 | - if(empty($newgroupname)) { |
|
91 | - $modx->webAlertAndQuit("No group name specified."); |
|
92 | - } |
|
93 | - $groupid = intval($_REQUEST['groupid']); |
|
94 | - if(empty($groupid)) { |
|
95 | - $modx->webAlertAndQuit("No group id specified for rename."); |
|
96 | - } |
|
86 | + $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_membergroup_names, "id='{$groupid}'"); |
|
87 | + break; |
|
88 | + case "rename_document_group" : |
|
89 | + $newgroupname = $_REQUEST['newgroupname']; |
|
90 | + if(empty($newgroupname)) { |
|
91 | + $modx->webAlertAndQuit("No group name specified."); |
|
92 | + } |
|
93 | + $groupid = intval($_REQUEST['groupid']); |
|
94 | + if(empty($groupid)) { |
|
95 | + $modx->webAlertAndQuit("No group id specified for rename."); |
|
96 | + } |
|
97 | 97 | |
98 | - $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
|
99 | - break; |
|
100 | - case "add_document_group_to_user_group" : |
|
101 | - $updategroupaccess = true; |
|
102 | - $usergroup = intval($_REQUEST['usergroup']); |
|
103 | - $docgroup = intval($_REQUEST['docgroup']); |
|
104 | - $rs = $modx->db->select('COUNT(*)', $tbl_membergroup_access, "membergroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
|
105 | - $limit = $modx->db->getValue($rs); |
|
106 | - if($limit<=0) { |
|
107 | - $modx->db->insert(array('membergroup' => $usergroup, 'documentgroup' => $docgroup), $tbl_membergroup_access); |
|
108 | - } else { |
|
109 | - //alert user that coupling already exists? |
|
110 | - } |
|
111 | - break; |
|
112 | - case "remove_document_group_from_user_group" : |
|
113 | - $updategroupaccess = true; |
|
114 | - $coupling = intval($_REQUEST['coupling']); |
|
115 | - $modx->db->delete($tbl_membergroup_access, "id='{$coupling}'"); |
|
116 | - break; |
|
117 | - default : |
|
118 | - $modx->webAlertAndQuit("No operation set in request."); |
|
98 | + $modx->db->update(array('name' => $modx->db->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
|
99 | + break; |
|
100 | + case "add_document_group_to_user_group" : |
|
101 | + $updategroupaccess = true; |
|
102 | + $usergroup = intval($_REQUEST['usergroup']); |
|
103 | + $docgroup = intval($_REQUEST['docgroup']); |
|
104 | + $rs = $modx->db->select('COUNT(*)', $tbl_membergroup_access, "membergroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
|
105 | + $limit = $modx->db->getValue($rs); |
|
106 | + if($limit<=0) { |
|
107 | + $modx->db->insert(array('membergroup' => $usergroup, 'documentgroup' => $docgroup), $tbl_membergroup_access); |
|
108 | + } else { |
|
109 | + //alert user that coupling already exists? |
|
110 | + } |
|
111 | + break; |
|
112 | + case "remove_document_group_from_user_group" : |
|
113 | + $updategroupaccess = true; |
|
114 | + $coupling = intval($_REQUEST['coupling']); |
|
115 | + $modx->db->delete($tbl_membergroup_access, "id='{$coupling}'"); |
|
116 | + break; |
|
117 | + default : |
|
118 | + $modx->webAlertAndQuit("No operation set in request."); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | // secure manager documents - flag as private |
122 | 122 | if($updategroupaccess==true){ |
123 | - include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
|
124 | - secureMgrDocument(); |
|
123 | + include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
|
124 | + secureMgrDocument(); |
|
125 | 125 | |
126 | - // Update the private group column |
|
127 | - $modx->db->update( |
|
128 | - 'dgn.private_memgroup = (mga.membergroup IS NOT NULL)', |
|
129 | - "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_membergroup_access} AS mga ON mga.documentgroup = dgn.id"); |
|
126 | + // Update the private group column |
|
127 | + $modx->db->update( |
|
128 | + 'dgn.private_memgroup = (mga.membergroup IS NOT NULL)', |
|
129 | + "{$tbl_documentgroup_names} AS dgn LEFT JOIN {$tbl_membergroup_access} AS mga ON mga.documentgroup = dgn.id"); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | $header = "Location: index.php?a=40"; |
@@ -1,8 +1,8 @@ discard block |
||
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('access_permissions')) { |
|
5 | +if (!$modx->hasPermission('access_permissions')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | switch ($operation) { |
23 | 23 | case "add_user_group" : |
24 | 24 | $newgroup = $_REQUEST['newusergroup']; |
25 | - if(empty($newgroup)) { |
|
25 | + if (empty($newgroup)) { |
|
26 | 26 | $modx->webAlertAndQuit("No group name specified."); |
27 | 27 | } else { |
28 | 28 | $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_membergroup_names); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | break; |
37 | 37 | case "add_document_group" : |
38 | 38 | $newgroup = $_REQUEST['newdocgroup']; |
39 | - if(empty($newgroup)) { |
|
39 | + if (empty($newgroup)) { |
|
40 | 40 | $modx->webAlertAndQuit("No group name specified."); |
41 | 41 | } else { |
42 | 42 | $id = $modx->db->insert(array('name' => $modx->db->escape($newgroup)), $tbl_documentgroup_names); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | case "delete_user_group" : |
52 | 52 | $updategroupaccess = true; |
53 | 53 | $usergroup = intval($_REQUEST['usergroup']); |
54 | - if(empty($usergroup)) { |
|
54 | + if (empty($usergroup)) { |
|
55 | 55 | $modx->webAlertAndQuit("No user group id specified for deletion."); |
56 | 56 | } else { |
57 | 57 | $modx->db->delete($tbl_membergroup_names, "id='{$usergroup}'"); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | break; |
64 | 64 | case "delete_document_group" : |
65 | 65 | $group = intval($_REQUEST['documentgroup']); |
66 | - if(empty($group)) { |
|
66 | + if (empty($group)) { |
|
67 | 67 | $modx->webAlertAndQuit("No document group id specified for deletion."); |
68 | 68 | } else { |
69 | 69 | $modx->db->delete($tbl_documentgroup_names, "id='{$group}'"); |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | break; |
76 | 76 | case "rename_user_group" : |
77 | 77 | $newgroupname = $_REQUEST['newgroupname']; |
78 | - if(empty($newgroupname)) { |
|
78 | + if (empty($newgroupname)) { |
|
79 | 79 | $modx->webAlertAndQuit("No group name specified."); |
80 | 80 | } |
81 | 81 | $groupid = intval($_REQUEST['groupid']); |
82 | - if(empty($groupid)) { |
|
82 | + if (empty($groupid)) { |
|
83 | 83 | $modx->webAlertAndQuit("No group id specified for rename."); |
84 | 84 | } |
85 | 85 | |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | break; |
88 | 88 | case "rename_document_group" : |
89 | 89 | $newgroupname = $_REQUEST['newgroupname']; |
90 | - if(empty($newgroupname)) { |
|
90 | + if (empty($newgroupname)) { |
|
91 | 91 | $modx->webAlertAndQuit("No group name specified."); |
92 | 92 | } |
93 | 93 | $groupid = intval($_REQUEST['groupid']); |
94 | - if(empty($groupid)) { |
|
94 | + if (empty($groupid)) { |
|
95 | 95 | $modx->webAlertAndQuit("No group id specified for rename."); |
96 | 96 | } |
97 | 97 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $docgroup = intval($_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? |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // secure manager documents - flag as private |
122 | -if($updategroupaccess==true){ |
|
122 | +if ($updategroupaccess == true) { |
|
123 | 123 | include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
124 | 124 | secureMgrDocument(); |
125 | 125 |
@@ -119,7 +119,7 @@ |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | // secure manager documents - flag as private |
122 | -if($updategroupaccess==true){ |
|
122 | +if($updategroupaccess==true) { |
|
123 | 123 | include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
124 | 124 | secureMgrDocument(); |
125 | 125 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $autoloader = realpath(__DIR__.'/../vendor/autoload.php'); |
52 | 52 | if (file_exists($autoloader) && is_readable($autoloader)) { |
53 | - include_once($autoloader); |
|
53 | + include_once($autoloader); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
@@ -65,22 +65,22 @@ discard block |
||
65 | 65 | $site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
66 | 66 | if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
67 | 67 | if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
68 | - $src = "<?php\n"; |
|
69 | - $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
72 | - echo 'siteManager.php write error'; |
|
73 | - exit; |
|
74 | - } |
|
75 | - sleep(1); |
|
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | - exit; |
|
68 | + $src = "<?php\n"; |
|
69 | + $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | + $rs = file_put_contents($site_mgr_path,$src); |
|
71 | + if(!$rs) { |
|
72 | + echo 'siteManager.php write error'; |
|
73 | + exit; |
|
74 | + } |
|
75 | + sleep(1); |
|
76 | + header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | + exit; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | // we use this to make sure files are accessed through |
81 | 81 | // the manager instead of seperately. |
82 | 82 | if ( ! defined('IN_MANAGER_MODE')) { |
83 | - define('IN_MANAGER_MODE', true); |
|
83 | + define('IN_MANAGER_MODE', true); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | // harden it |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | 103 | $php_ver_comp = version_compare(phpversion(), "5.0.0"); |
104 | - // -1 if left is less, 0 if equal, +1 if left is higher |
|
104 | + // -1 if left is less, 0 if equal, +1 if left is higher |
|
105 | 105 | if($php_ver_comp < 0) { |
106 | - echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | - exit; |
|
106 | + echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | + exit; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | 111 | if(!function_exists('iconv')) { |
112 | - echo $_lang['iconv_not_available']; |
|
113 | - exit; |
|
112 | + echo $_lang['iconv_not_available']; |
|
113 | + exit; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | 125 | if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
126 | - $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
126 | + $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // include_once config file |
130 | 130 | $config_filename = "./includes/config.inc.php"; |
131 | 131 | if (!file_exists($config_filename)) { |
132 | - echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | - echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | - exit; |
|
132 | + echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | + echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | + exit; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | // include the database configuration file |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | |
140 | 140 | // initiate the content manager class |
141 | 141 | if (isset($coreClass) && class_exists($coreClass)) { |
142 | - $modx = new $coreClass; |
|
142 | + $modx = new $coreClass; |
|
143 | 143 | } |
144 | 144 | if (!isset($modx) || !($modx instanceof \DocumentParser)) { |
145 | - include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | - $modx = new \DocumentParser; |
|
145 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | + $modx = new \DocumentParser; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | $modx->loadExtension("ManagerAPI"); |
@@ -166,25 +166,25 @@ discard block |
||
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | 168 | if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
169 | - $manager_language = "english"; // if not set, get the english language file. |
|
169 | + $manager_language = "english"; // if not set, get the english language file. |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | // $length_eng_lang = count($_lang); // Not used for now, required for difference-check with other languages than english (i.e. inside installer) |
173 | 173 | |
174 | 174 | if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
175 | - include_once "lang/".$manager_language.".inc.php"; |
|
175 | + include_once "lang/".$manager_language.".inc.php"; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | // allow custom language overrides not altered by future EVO-updates |
179 | 179 | if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
180 | - include_once "lang/override/".$manager_language.".inc.php"; |
|
180 | + include_once "lang/override/".$manager_language.".inc.php"; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $s = array('[+MGR_DIR+]'); |
184 | 184 | $r = array(MGR_DIR); |
185 | 185 | foreach($_lang as $k=>$v) |
186 | 186 | { |
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
187 | + if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | // send the charset header |
@@ -199,19 +199,19 @@ discard block |
||
199 | 199 | |
200 | 200 | // double check the session |
201 | 201 | if(!isset($_SESSION['mgrValidated'])){ |
202 | - echo "Not Logged In!"; |
|
203 | - exit; |
|
202 | + echo "Not Logged In!"; |
|
203 | + exit; |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | 207 | if(isset($manager_theme) && !isset($_style)) { |
208 | - $_style = array(); |
|
209 | - include_once "media/style/".$manager_theme."/style.php"; |
|
208 | + $_style = array(); |
|
209 | + include_once "media/style/".$manager_theme."/style.php"; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | // check if user is allowed to access manager interface |
213 | 213 | if(isset($allow_manager_access) && $allow_manager_access==0) { |
214 | - include_once "manager.lockout.inc.php"; |
|
214 | + include_once "manager.lockout.inc.php"; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | // Initialize System Alert Message Queque |
@@ -220,13 +220,13 @@ discard block |
||
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | 222 | if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
223 | - // this looks to be a top-level frameset request, so let's serve up a frameset |
|
224 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | - include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | - }else{ |
|
227 | - include_once "frames/1.php"; |
|
228 | - } |
|
229 | - exit; |
|
223 | + // this looks to be a top-level frameset request, so let's serve up a frameset |
|
224 | + if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | + include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | + }else{ |
|
227 | + include_once "frames/1.php"; |
|
228 | + } |
|
229 | + exit; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
240 | - include_once 'messageCount.inc.php'; |
|
240 | + include_once 'messageCount.inc.php'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | // save page to manager object |
@@ -245,19 +245,19 @@ discard block |
||
245 | 245 | |
246 | 246 | // attempt to foil some simple types of CSRF attacks |
247 | 247 | if (isset($modx->config['validate_referer']) && intval($modx->config['validate_referer'])) { |
248 | - if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | - $referer = $_SERVER['HTTP_REFERER']; |
|
250 | - |
|
251 | - if (!empty($referer)) { |
|
252 | - if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | - } |
|
255 | - } else { |
|
256 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | - } |
|
258 | - } else { |
|
259 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | - } |
|
248 | + if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | + $referer = $_SERVER['HTTP_REFERER']; |
|
250 | + |
|
251 | + if (!empty($referer)) { |
|
252 | + if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | + } |
|
255 | + } else { |
|
256 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | + } |
|
258 | + } else { |
|
259 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | + } |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | // invoke OnManagerPageInit event |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | |
266 | 266 | // return element filepath |
267 | 267 | function includeFileProcessor ($filepath,$manager_theme) { |
268 | - $element = ""; |
|
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | - $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | - }else{ |
|
272 | - $element = $filepath; |
|
273 | - } |
|
274 | - return $element; |
|
268 | + $element = ""; |
|
269 | + if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | + $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | + }else{ |
|
272 | + $element = $filepath; |
|
273 | + } |
|
274 | + return $element; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | // Now we decide what to do according to the action request. This is a BIG list :) |
@@ -279,714 +279,714 @@ discard block |
||
279 | 279 | /********************************************************************/ |
280 | 280 | /* frame management - show the requested frame */ |
281 | 281 | /********************************************************************/ |
282 | - case 1 : |
|
283 | - // get the requested frame |
|
284 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | - if($frame>9) { |
|
286 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
287 | - } |
|
288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
289 | - break; |
|
282 | + case 1 : |
|
283 | + // get the requested frame |
|
284 | + $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | + if($frame>9) { |
|
286 | + $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
287 | + } |
|
288 | + include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
289 | + break; |
|
290 | 290 | /********************************************************************/ |
291 | 291 | /* show the homepage */ |
292 | 292 | /********************************************************************/ |
293 | - case 2: |
|
294 | - // get the home page |
|
295 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
298 | - break; |
|
293 | + case 2: |
|
294 | + // get the home page |
|
295 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | + include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
298 | + break; |
|
299 | 299 | /********************************************************************/ |
300 | 300 | /* document data */ |
301 | 301 | /********************************************************************/ |
302 | - case 3: |
|
303 | - // get the page to show document's data |
|
304 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
307 | - break; |
|
302 | + case 3: |
|
303 | + // get the page to show document's data |
|
304 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | + include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
307 | + break; |
|
308 | 308 | /********************************************************************/ |
309 | 309 | /* content management */ |
310 | 310 | /********************************************************************/ |
311 | - case 85: |
|
312 | - // get the mutate page for adding a folder |
|
313 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
316 | - break; |
|
317 | - case 27: |
|
318 | - // get the mutate page for changing content |
|
319 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
322 | - break; |
|
323 | - case 4: |
|
324 | - // get the mutate page for adding content |
|
325 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
328 | - break; |
|
329 | - case 5: |
|
330 | - // get the save processor |
|
331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
332 | - break; |
|
333 | - case 6: |
|
334 | - // get the delete processor |
|
335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
336 | - break; |
|
337 | - case 63: |
|
338 | - // get the undelete processor |
|
339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
340 | - break; |
|
341 | - case 51: |
|
342 | - // get the move action |
|
343 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
346 | - break; |
|
347 | - case 52: |
|
348 | - // get the move document processor |
|
349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
350 | - break; |
|
351 | - case 61: |
|
352 | - // get the processor for publishing content |
|
353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
354 | - break; |
|
355 | - case 62: |
|
356 | - // get the processor for publishing content |
|
357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
358 | - break; |
|
359 | - case 56: |
|
360 | - // get the sort menuindex action |
|
361 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
364 | - break; |
|
311 | + case 85: |
|
312 | + // get the mutate page for adding a folder |
|
313 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
316 | + break; |
|
317 | + case 27: |
|
318 | + // get the mutate page for changing content |
|
319 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
322 | + break; |
|
323 | + case 4: |
|
324 | + // get the mutate page for adding content |
|
325 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
328 | + break; |
|
329 | + case 5: |
|
330 | + // get the save processor |
|
331 | + include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
332 | + break; |
|
333 | + case 6: |
|
334 | + // get the delete processor |
|
335 | + include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
336 | + break; |
|
337 | + case 63: |
|
338 | + // get the undelete processor |
|
339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
340 | + break; |
|
341 | + case 51: |
|
342 | + // get the move action |
|
343 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | + include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
346 | + break; |
|
347 | + case 52: |
|
348 | + // get the move document processor |
|
349 | + include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
350 | + break; |
|
351 | + case 61: |
|
352 | + // get the processor for publishing content |
|
353 | + include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
354 | + break; |
|
355 | + case 62: |
|
356 | + // get the processor for publishing content |
|
357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
358 | + break; |
|
359 | + case 56: |
|
360 | + // get the sort menuindex action |
|
361 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
364 | + break; |
|
365 | 365 | /********************************************************************/ |
366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
367 | 367 | /********************************************************************/ |
368 | - case 7: |
|
369 | - // get the wait page (so the tree can reload) |
|
370 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
373 | - break; |
|
368 | + case 7: |
|
369 | + // get the wait page (so the tree can reload) |
|
370 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | + include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
373 | + break; |
|
374 | 374 | /********************************************************************/ |
375 | 375 | /* let the user log out */ |
376 | 376 | /********************************************************************/ |
377 | - case 8: |
|
378 | - // get the logout processor |
|
379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
380 | - break; |
|
377 | + case 8: |
|
378 | + // get the logout processor |
|
379 | + include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
380 | + break; |
|
381 | 381 | /********************************************************************/ |
382 | 382 | /* user management */ |
383 | 383 | /********************************************************************/ |
384 | - case 87: |
|
385 | - // get the new web user page |
|
386 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
389 | - break; |
|
390 | - case 88: |
|
391 | - // get the edit web user page |
|
392 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
395 | - break; |
|
396 | - case 89: |
|
397 | - // get the save web user processor |
|
398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
399 | - break; |
|
400 | - case 90: |
|
401 | - // get the delete web user page |
|
402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
403 | - break; |
|
404 | - case 11: |
|
405 | - // get the new user page |
|
406 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
409 | - break; |
|
410 | - case 12: |
|
411 | - // get the edit user page |
|
412 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
415 | - break; |
|
416 | - case 32: |
|
417 | - // get the save user processor |
|
418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
419 | - break; |
|
420 | - case 28: |
|
421 | - // get the change password page |
|
422 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
425 | - break; |
|
426 | - case 34: |
|
427 | - // get the save new password page |
|
428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
429 | - break; |
|
430 | - case 33: |
|
431 | - // get the delete user page |
|
432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
433 | - break; |
|
384 | + case 87: |
|
385 | + // get the new web user page |
|
386 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
389 | + break; |
|
390 | + case 88: |
|
391 | + // get the edit web user page |
|
392 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
395 | + break; |
|
396 | + case 89: |
|
397 | + // get the save web user processor |
|
398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
399 | + break; |
|
400 | + case 90: |
|
401 | + // get the delete web user page |
|
402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
403 | + break; |
|
404 | + case 11: |
|
405 | + // get the new user page |
|
406 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
409 | + break; |
|
410 | + case 12: |
|
411 | + // get the edit user page |
|
412 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
415 | + break; |
|
416 | + case 32: |
|
417 | + // get the save user processor |
|
418 | + include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
419 | + break; |
|
420 | + case 28: |
|
421 | + // get the change password page |
|
422 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
425 | + break; |
|
426 | + case 34: |
|
427 | + // get the save new password page |
|
428 | + include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
429 | + break; |
|
430 | + case 33: |
|
431 | + // get the delete user page |
|
432 | + include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
433 | + break; |
|
434 | 434 | /********************************************************************/ |
435 | 435 | /* role management */ |
436 | 436 | /********************************************************************/ |
437 | - case 38: |
|
438 | - // get the new role page |
|
439 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
442 | - break; |
|
443 | - case 35: |
|
444 | - // get the edit role page |
|
445 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
448 | - break; |
|
449 | - case 36: |
|
450 | - // get the save role page |
|
451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
452 | - break; |
|
453 | - case 37: |
|
454 | - // get the delete role page |
|
455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
456 | - break; |
|
437 | + case 38: |
|
438 | + // get the new role page |
|
439 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
442 | + break; |
|
443 | + case 35: |
|
444 | + // get the edit role page |
|
445 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
448 | + break; |
|
449 | + case 36: |
|
450 | + // get the save role page |
|
451 | + include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
452 | + break; |
|
453 | + case 37: |
|
454 | + // get the delete role page |
|
455 | + include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
456 | + break; |
|
457 | 457 | /********************************************************************/ |
458 | 458 | /* category management */ |
459 | 459 | /********************************************************************/ |
460 | - case 120: |
|
461 | - // get the edit category page |
|
462 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
465 | - break; |
|
466 | - case 121: |
|
467 | - // for ajax-requests |
|
468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
469 | - break; |
|
460 | + case 120: |
|
461 | + // get the edit category page |
|
462 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
465 | + break; |
|
466 | + case 121: |
|
467 | + // for ajax-requests |
|
468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
469 | + break; |
|
470 | 470 | /********************************************************************/ |
471 | 471 | /* template management */ |
472 | 472 | /********************************************************************/ |
473 | - case 16: |
|
474 | - // get the edit template action |
|
475 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
478 | - break; |
|
479 | - case 19: |
|
480 | - // get the new template action |
|
481 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
484 | - break; |
|
485 | - case 20: |
|
486 | - // get the save processor |
|
487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
488 | - break; |
|
489 | - case 21: |
|
490 | - // get the delete processor |
|
491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
492 | - break; |
|
493 | - case 96: |
|
494 | - // get the duplicate template processor |
|
495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
496 | - break; |
|
497 | - case 117: |
|
498 | - // change the tv rank for selected template |
|
499 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
502 | - break; |
|
473 | + case 16: |
|
474 | + // get the edit template action |
|
475 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
478 | + break; |
|
479 | + case 19: |
|
480 | + // get the new template action |
|
481 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
484 | + break; |
|
485 | + case 20: |
|
486 | + // get the save processor |
|
487 | + include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
488 | + break; |
|
489 | + case 21: |
|
490 | + // get the delete processor |
|
491 | + include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
492 | + break; |
|
493 | + case 96: |
|
494 | + // get the duplicate template processor |
|
495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
496 | + break; |
|
497 | + case 117: |
|
498 | + // change the tv rank for selected template |
|
499 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
502 | + break; |
|
503 | 503 | /********************************************************************/ |
504 | 504 | /* snippet management */ |
505 | 505 | /********************************************************************/ |
506 | - case 22: |
|
507 | - // get the edit snippet action |
|
508 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
511 | - break; |
|
512 | - case 23: |
|
513 | - // get the new snippet action |
|
514 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
517 | - break; |
|
518 | - case 24: |
|
519 | - // get the save processor |
|
520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
521 | - break; |
|
522 | - case 25: |
|
523 | - // get the delete processor |
|
524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
525 | - break; |
|
526 | - case 98: |
|
527 | - // get the duplicate processor |
|
528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
529 | - break; |
|
506 | + case 22: |
|
507 | + // get the edit snippet action |
|
508 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
511 | + break; |
|
512 | + case 23: |
|
513 | + // get the new snippet action |
|
514 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
517 | + break; |
|
518 | + case 24: |
|
519 | + // get the save processor |
|
520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
521 | + break; |
|
522 | + case 25: |
|
523 | + // get the delete processor |
|
524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
525 | + break; |
|
526 | + case 98: |
|
527 | + // get the duplicate processor |
|
528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
529 | + break; |
|
530 | 530 | /********************************************************************/ |
531 | 531 | /* htmlsnippet management */ |
532 | 532 | /********************************************************************/ |
533 | - case 78: |
|
534 | - // get the edit snippet action |
|
535 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
538 | - break; |
|
539 | - case 77: |
|
540 | - // get the new snippet action |
|
541 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
544 | - break; |
|
545 | - case 79: |
|
546 | - // get the save processor |
|
547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
548 | - break; |
|
549 | - case 80: |
|
550 | - // get the delete processor |
|
551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
552 | - break; |
|
553 | - case 97: |
|
554 | - // get the duplicate processor |
|
555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
556 | - break; |
|
533 | + case 78: |
|
534 | + // get the edit snippet action |
|
535 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
538 | + break; |
|
539 | + case 77: |
|
540 | + // get the new snippet action |
|
541 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
544 | + break; |
|
545 | + case 79: |
|
546 | + // get the save processor |
|
547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
548 | + break; |
|
549 | + case 80: |
|
550 | + // get the delete processor |
|
551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
552 | + break; |
|
553 | + case 97: |
|
554 | + // get the duplicate processor |
|
555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
556 | + break; |
|
557 | 557 | /********************************************************************/ |
558 | 558 | /* show the credits page */ |
559 | 559 | /********************************************************************/ |
560 | - case 18: |
|
561 | - // get the credits page |
|
562 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
565 | - break; |
|
560 | + case 18: |
|
561 | + // get the credits page |
|
562 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | + include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
565 | + break; |
|
566 | 566 | /********************************************************************/ |
567 | 567 | /* empty cache & synchronisation */ |
568 | 568 | /********************************************************************/ |
569 | - case 26: |
|
570 | - // get the cache emptying processor |
|
571 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
574 | - break; |
|
569 | + case 26: |
|
570 | + // get the cache emptying processor |
|
571 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
574 | + break; |
|
575 | 575 | /********************************************************************/ |
576 | 576 | /* Module management */ |
577 | 577 | /********************************************************************/ |
578 | - case 106: |
|
579 | - // get module management |
|
580 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
583 | - break; |
|
584 | - case 107: |
|
585 | - // get the new module action |
|
586 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
589 | - break; |
|
590 | - case 108: |
|
591 | - // get the edit module action |
|
592 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
595 | - break; |
|
596 | - case 109: |
|
597 | - // get the save processor |
|
598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
599 | - break; |
|
600 | - case 110: |
|
601 | - // get the delete processor |
|
602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
603 | - break; |
|
604 | - case 111: |
|
605 | - // get the duplicate processor |
|
606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
607 | - break; |
|
608 | - case 112: |
|
609 | - // execute/run the module |
|
610 | - //include_once "header.inc.php"; |
|
611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
612 | - //include_once "footer.inc.php"; |
|
613 | - break; |
|
614 | - case 113: |
|
615 | - // get the module resources (dependencies) action |
|
616 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
619 | - break; |
|
578 | + case 106: |
|
579 | + // get module management |
|
580 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | + include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
583 | + break; |
|
584 | + case 107: |
|
585 | + // get the new module action |
|
586 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
589 | + break; |
|
590 | + case 108: |
|
591 | + // get the edit module action |
|
592 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
595 | + break; |
|
596 | + case 109: |
|
597 | + // get the save processor |
|
598 | + include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
599 | + break; |
|
600 | + case 110: |
|
601 | + // get the delete processor |
|
602 | + include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
603 | + break; |
|
604 | + case 111: |
|
605 | + // get the duplicate processor |
|
606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
607 | + break; |
|
608 | + case 112: |
|
609 | + // execute/run the module |
|
610 | + //include_once "header.inc.php"; |
|
611 | + include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
612 | + //include_once "footer.inc.php"; |
|
613 | + break; |
|
614 | + case 113: |
|
615 | + // get the module resources (dependencies) action |
|
616 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
619 | + break; |
|
620 | 620 | /********************************************************************/ |
621 | 621 | /* plugin management */ |
622 | 622 | /********************************************************************/ |
623 | - case 100: |
|
624 | - // change the plugin priority |
|
625 | - //include_once "header.inc.php"; - in action file |
|
626 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
628 | - break; |
|
629 | - case 101: |
|
630 | - // get the new plugin action |
|
631 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
634 | - break; |
|
635 | - case 102: |
|
636 | - // get the edit plugin action |
|
637 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
640 | - break; |
|
641 | - case 103: |
|
642 | - // get the save processor |
|
643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
644 | - break; |
|
645 | - case 104: |
|
646 | - // get the delete processor |
|
647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
648 | - break; |
|
649 | - case 105: |
|
650 | - // get the duplicate processor |
|
651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
652 | - break; |
|
653 | - case 119: |
|
654 | - // get the purge processor |
|
655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
656 | - break; |
|
623 | + case 100: |
|
624 | + // change the plugin priority |
|
625 | + //include_once "header.inc.php"; - in action file |
|
626 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
628 | + break; |
|
629 | + case 101: |
|
630 | + // get the new plugin action |
|
631 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
634 | + break; |
|
635 | + case 102: |
|
636 | + // get the edit plugin action |
|
637 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
640 | + break; |
|
641 | + case 103: |
|
642 | + // get the save processor |
|
643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
644 | + break; |
|
645 | + case 104: |
|
646 | + // get the delete processor |
|
647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
648 | + break; |
|
649 | + case 105: |
|
650 | + // get the duplicate processor |
|
651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
652 | + break; |
|
653 | + case 119: |
|
654 | + // get the purge processor |
|
655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
656 | + break; |
|
657 | 657 | /********************************************************************/ |
658 | 658 | /* view phpinfo */ |
659 | 659 | /********************************************************************/ |
660 | - case 200: |
|
661 | - // show phpInfo |
|
662 | - if($modx->hasPermission('logs')) { |
|
663 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
666 | - } |
|
667 | - break; |
|
660 | + case 200: |
|
661 | + // show phpInfo |
|
662 | + if($modx->hasPermission('logs')) { |
|
663 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | + include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
666 | + } |
|
667 | + break; |
|
668 | 668 | /********************************************************************/ |
669 | 669 | /* errorpage */ |
670 | 670 | /********************************************************************/ |
671 | - case 29: |
|
672 | - // get the error page |
|
673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
674 | - break; |
|
671 | + case 29: |
|
672 | + // get the error page |
|
673 | + include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
674 | + break; |
|
675 | 675 | /********************************************************************/ |
676 | 676 | /* file manager */ |
677 | 677 | /********************************************************************/ |
678 | - case 31: |
|
679 | - // get the page to manage files |
|
680 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
683 | - break; |
|
678 | + case 31: |
|
679 | + // get the page to manage files |
|
680 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | + include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
683 | + break; |
|
684 | 684 | /********************************************************************/ |
685 | 685 | /* access permissions */ |
686 | 686 | /********************************************************************/ |
687 | - case 40: |
|
688 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
691 | - break; |
|
692 | - case 91: |
|
693 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
696 | - break; |
|
687 | + case 40: |
|
688 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
691 | + break; |
|
692 | + case 91: |
|
693 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
696 | + break; |
|
697 | 697 | /********************************************************************/ |
698 | 698 | /* access groups processor */ |
699 | 699 | /********************************************************************/ |
700 | - case 41: |
|
701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
702 | - break; |
|
703 | - case 92: |
|
704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
705 | - break; |
|
700 | + case 41: |
|
701 | + include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
702 | + break; |
|
703 | + case 92: |
|
704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
705 | + break; |
|
706 | 706 | /********************************************************************/ |
707 | 707 | /* settings editor */ |
708 | 708 | /********************************************************************/ |
709 | - case 17: |
|
710 | - // get the settings editor |
|
711 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
714 | - break; |
|
715 | - case 118: |
|
716 | - // call settings ajax include |
|
717 | - ob_clean(); |
|
718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
719 | - break; |
|
709 | + case 17: |
|
710 | + // get the settings editor |
|
711 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
714 | + break; |
|
715 | + case 118: |
|
716 | + // call settings ajax include |
|
717 | + ob_clean(); |
|
718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
719 | + break; |
|
720 | 720 | /********************************************************************/ |
721 | 721 | /* save settings */ |
722 | 722 | /********************************************************************/ |
723 | - case 30: |
|
724 | - // get the save settings processor |
|
725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
726 | - break; |
|
723 | + case 30: |
|
724 | + // get the save settings processor |
|
725 | + include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
726 | + break; |
|
727 | 727 | /********************************************************************/ |
728 | 728 | /* system information */ |
729 | 729 | /********************************************************************/ |
730 | - case 53: |
|
731 | - // get the settings editor |
|
732 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
735 | - break; |
|
730 | + case 53: |
|
731 | + // get the settings editor |
|
732 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | + include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
735 | + break; |
|
736 | 736 | /********************************************************************/ |
737 | 737 | /* optimise table */ |
738 | 738 | /********************************************************************/ |
739 | - case 54: |
|
740 | - // get the table optimizer/truncate processor |
|
741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
742 | - break; |
|
739 | + case 54: |
|
740 | + // get the table optimizer/truncate processor |
|
741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
742 | + break; |
|
743 | 743 | /********************************************************************/ |
744 | 744 | /* view logging */ |
745 | 745 | /********************************************************************/ |
746 | - case 13: |
|
747 | - // view logging |
|
748 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
751 | - break; |
|
746 | + case 13: |
|
747 | + // view logging |
|
748 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | + include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
751 | + break; |
|
752 | 752 | /********************************************************************/ |
753 | 753 | /* empty logs */ |
754 | 754 | /********************************************************************/ |
755 | - case 55: |
|
756 | - // get the settings editor |
|
757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
758 | - break; |
|
755 | + case 55: |
|
756 | + // get the settings editor |
|
757 | + include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
758 | + break; |
|
759 | 759 | /********************************************************************/ |
760 | 760 | /* calls test page */ |
761 | 761 | /********************************************************************/ |
762 | - case 999: |
|
763 | - // get the test page |
|
764 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
767 | - break; |
|
762 | + case 999: |
|
763 | + // get the test page |
|
764 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | + include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
767 | + break; |
|
768 | 768 | /********************************************************************/ |
769 | 769 | /* Empty recycle bin */ |
770 | 770 | /********************************************************************/ |
771 | - case 64: |
|
772 | - // get the Recycle bin emptier |
|
773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
774 | - break; |
|
771 | + case 64: |
|
772 | + // get the Recycle bin emptier |
|
773 | + include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
774 | + break; |
|
775 | 775 | /********************************************************************/ |
776 | 776 | /* Messages */ |
777 | 777 | /********************************************************************/ |
778 | - case 10: |
|
779 | - // get the messages page |
|
780 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
783 | - break; |
|
778 | + case 10: |
|
779 | + // get the messages page |
|
780 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | + include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
783 | + break; |
|
784 | 784 | /********************************************************************/ |
785 | 785 | /* Delete a message */ |
786 | 786 | /********************************************************************/ |
787 | - case 65: |
|
788 | - // get the message deleter |
|
789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
790 | - break; |
|
787 | + case 65: |
|
788 | + // get the message deleter |
|
789 | + include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
790 | + break; |
|
791 | 791 | /********************************************************************/ |
792 | 792 | /* Send a message */ |
793 | 793 | /********************************************************************/ |
794 | - case 66: |
|
795 | - // get the message deleter |
|
796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
797 | - break; |
|
794 | + case 66: |
|
795 | + // get the message deleter |
|
796 | + include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
797 | + break; |
|
798 | 798 | /********************************************************************/ |
799 | 799 | /* Remove locks */ |
800 | 800 | /********************************************************************/ |
801 | - case 67: |
|
802 | - // get the lock remover |
|
803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
804 | - break; |
|
801 | + case 67: |
|
802 | + // get the lock remover |
|
803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
804 | + break; |
|
805 | 805 | /********************************************************************/ |
806 | 806 | /* Site schedule */ |
807 | 807 | /********************************************************************/ |
808 | - case 70: |
|
809 | - // get the schedule page |
|
810 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
813 | - break; |
|
808 | + case 70: |
|
809 | + // get the schedule page |
|
810 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | + include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
813 | + break; |
|
814 | 814 | /********************************************************************/ |
815 | 815 | /* Search */ |
816 | 816 | /********************************************************************/ |
817 | - case 71: |
|
818 | - // get the search page |
|
819 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
822 | - break; |
|
817 | + case 71: |
|
818 | + // get the search page |
|
819 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | + include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
822 | + break; |
|
823 | 823 | /********************************************************************/ |
824 | 824 | /* About */ |
825 | 825 | /********************************************************************/ |
826 | - case 59: |
|
827 | - // get the about page |
|
828 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
831 | - break; |
|
826 | + case 59: |
|
827 | + // get the about page |
|
828 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | + include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
831 | + break; |
|
832 | 832 | /********************************************************************/ |
833 | 833 | /* Add weblink */ |
834 | 834 | /********************************************************************/ |
835 | - case 72: |
|
836 | - // get the weblink page |
|
837 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
840 | - break; |
|
835 | + case 72: |
|
836 | + // get the weblink page |
|
837 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
840 | + break; |
|
841 | 841 | /********************************************************************/ |
842 | 842 | /* User management */ |
843 | 843 | /********************************************************************/ |
844 | - case 75: |
|
845 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
848 | - break; |
|
849 | - case 99: |
|
850 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
853 | - break; |
|
854 | - case 86: |
|
855 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
858 | - break; |
|
844 | + case 75: |
|
845 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | + include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
848 | + break; |
|
849 | + case 99: |
|
850 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | + include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
853 | + break; |
|
854 | + case 86: |
|
855 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | + include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
858 | + break; |
|
859 | 859 | /********************************************************************/ |
860 | 860 | /* template/ snippet management */ |
861 | 861 | /********************************************************************/ |
862 | - case 76: |
|
863 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
866 | - break; |
|
862 | + case 76: |
|
863 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | + include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
866 | + break; |
|
867 | 867 | /********************************************************************/ |
868 | 868 | /* Export to file */ |
869 | 869 | /********************************************************************/ |
870 | - case 83: |
|
871 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
874 | - break; |
|
870 | + case 83: |
|
871 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | + include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
874 | + break; |
|
875 | 875 | /********************************************************************/ |
876 | 876 | /* Resource Selector */ |
877 | 877 | /********************************************************************/ |
878 | - case 84: |
|
879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
880 | - break; |
|
878 | + case 84: |
|
879 | + include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
880 | + break; |
|
881 | 881 | /********************************************************************/ |
882 | 882 | /* Backup Manager */ |
883 | 883 | /********************************************************************/ |
884 | - case 93: |
|
885 | - # header and footer will be handled interally |
|
886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
887 | - break; |
|
884 | + case 93: |
|
885 | + # header and footer will be handled interally |
|
886 | + include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
887 | + break; |
|
888 | 888 | /********************************************************************/ |
889 | 889 | /* Duplicate Document */ |
890 | 890 | /********************************************************************/ |
891 | - case 94: |
|
892 | - // get the duplicate processor |
|
893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
894 | - break; |
|
891 | + case 94: |
|
892 | + // get the duplicate processor |
|
893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
894 | + break; |
|
895 | 895 | /********************************************************************/ |
896 | 896 | /* Import Document from file */ |
897 | 897 | /********************************************************************/ |
898 | - case 95: |
|
899 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
902 | - break; |
|
898 | + case 95: |
|
899 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | + include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
902 | + break; |
|
903 | 903 | /********************************************************************/ |
904 | 904 | /* Help */ |
905 | 905 | /********************************************************************/ |
906 | - case 9: |
|
907 | - // get the help page |
|
908 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
911 | - break; |
|
906 | + case 9: |
|
907 | + // get the help page |
|
908 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | + include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
911 | + break; |
|
912 | 912 | /********************************************************************/ |
913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
914 | 914 | /********************************************************************/ |
915 | - case 300: |
|
916 | - // get the new document variable action |
|
917 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
920 | - break; |
|
921 | - case 301: |
|
922 | - // get the edit document variable action |
|
923 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
926 | - break; |
|
927 | - case 302: |
|
928 | - // get the save processor |
|
929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
930 | - break; |
|
931 | - case 303: |
|
932 | - // get the delete processor |
|
933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
934 | - break; |
|
935 | - case 304: |
|
936 | - // get the duplicate processor |
|
937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
938 | - break; |
|
939 | - case 305: |
|
940 | - // get the tv-rank action |
|
941 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
944 | - break; |
|
915 | + case 300: |
|
916 | + // get the new document variable action |
|
917 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
920 | + break; |
|
921 | + case 301: |
|
922 | + // get the edit document variable action |
|
923 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
926 | + break; |
|
927 | + case 302: |
|
928 | + // get the save processor |
|
929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
930 | + break; |
|
931 | + case 303: |
|
932 | + // get the delete processor |
|
933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
934 | + break; |
|
935 | + case 304: |
|
936 | + // get the duplicate processor |
|
937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
938 | + break; |
|
939 | + case 305: |
|
940 | + // get the tv-rank action |
|
941 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
944 | + break; |
|
945 | 945 | /********************************************************************/ |
946 | 946 | /* Event viewer: show event message log */ |
947 | 947 | /********************************************************************/ |
948 | - case 114: |
|
949 | - // get event logs |
|
950 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
953 | - break; |
|
954 | - case 115: |
|
955 | - // get event log details viewer |
|
956 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
959 | - break; |
|
960 | - case 116: |
|
961 | - // get the event log delete processor |
|
962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
963 | - break; |
|
964 | - |
|
965 | - case 501: |
|
966 | - //delete category |
|
967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
968 | - break; |
|
948 | + case 114: |
|
949 | + // get event logs |
|
950 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
953 | + break; |
|
954 | + case 115: |
|
955 | + // get event log details viewer |
|
956 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
959 | + break; |
|
960 | + case 116: |
|
961 | + // get the event log delete processor |
|
962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
963 | + break; |
|
964 | + |
|
965 | + case 501: |
|
966 | + //delete category |
|
967 | + include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
968 | + break; |
|
969 | 969 | /********************************************************************/ |
970 | 970 | /* default action: show not implemented message */ |
971 | 971 | /********************************************************************/ |
972 | - default : |
|
973 | - // say that what was requested doesn't do anything yet |
|
974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
975 | - echo " |
|
972 | + default : |
|
973 | + // say that what was requested doesn't do anything yet |
|
974 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
975 | + echo " |
|
976 | 976 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
977 | 977 | <div class='sectionBody'> |
978 | 978 | <p>".$_lang['functionnotimpl_message']."</p> |
979 | 979 | </div> |
980 | 980 | "; |
981 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
981 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /********************************************************************/ |
985 | 985 | // log action, unless it's a frame request |
986 | 986 | if($action!=1 && $action!=7 && $action!=2) { |
987 | - include_once "log.class.inc.php"; |
|
988 | - $log = new logHandler; |
|
989 | - $log->initAndWriteLog(); |
|
987 | + include_once "log.class.inc.php"; |
|
988 | + $log = new logHandler; |
|
989 | + $log->initAndWriteLog(); |
|
990 | 990 | } |
991 | 991 | /********************************************************************/ |
992 | 992 | // show debug |
@@ -54,32 +54,32 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
57 | -$mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
57 | +$mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
58 | 58 | $mstart = memory_get_usage(); |
59 | -$self = str_replace('\\','/',__FILE__); |
|
60 | -$self_dir = str_replace('/index.php','',$self); |
|
61 | -$mgr_dir = substr($self_dir,strrpos($self_dir,'/')+1); |
|
62 | -$base_path = str_replace($mgr_dir . '/index.php','',$self); |
|
63 | -$site_mgr_path = $base_path . 'assets/cache/siteManager.php'; |
|
64 | -if(is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | -$site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
|
66 | -if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | -if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
|
59 | +$self = str_replace('\\', '/', __FILE__); |
|
60 | +$self_dir = str_replace('/index.php', '', $self); |
|
61 | +$mgr_dir = substr($self_dir, strrpos($self_dir, '/') + 1); |
|
62 | +$base_path = str_replace($mgr_dir.'/index.php', '', $self); |
|
63 | +$site_mgr_path = $base_path.'assets/cache/siteManager.php'; |
|
64 | +if (is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | +$site_hostnames_path = $base_path.'assets/cache/siteHostnames.php'; |
|
66 | +if (is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | +if (!defined('MGR_DIR') || MGR_DIR !== $mgr_dir) { |
|
68 | 68 | $src = "<?php\n"; |
69 | 69 | $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
70 | + $rs = file_put_contents($site_mgr_path, $src); |
|
71 | + if (!$rs) { |
|
72 | 72 | echo 'siteManager.php write error'; |
73 | 73 | exit; |
74 | 74 | } |
75 | 75 | sleep(1); |
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
76 | + header('Location:'.$_SERVER['REQUEST_URI']); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | |
80 | 80 | // we use this to make sure files are accessed through |
81 | 81 | // the manager instead of seperately. |
82 | -if ( ! defined('IN_MANAGER_MODE')) { |
|
82 | +if (!defined('IN_MANAGER_MODE')) { |
|
83 | 83 | define('IN_MANAGER_MODE', true); |
84 | 84 | } |
85 | 85 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | // send anti caching headers |
90 | 90 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
91 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
91 | +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
92 | 92 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
93 | 93 | header("Cache-Control: post-check=0, pre-check=0", false); |
94 | 94 | header("Pragma: no-cache"); |
@@ -100,29 +100,29 @@ discard block |
||
100 | 100 | include_once "includes/lang/english.inc.php"; |
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | -$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
103 | +$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
104 | 104 | // -1 if left is less, 0 if equal, +1 if left is higher |
105 | -if($php_ver_comp < 0) { |
|
105 | +if ($php_ver_comp < 0) { |
|
106 | 106 | echo sprintf($_lang['php_version_check'], phpversion()); |
107 | 107 | exit; |
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | -if(!function_exists('iconv')) { |
|
111 | +if (!function_exists('iconv')) { |
|
112 | 112 | echo $_lang['iconv_not_available']; |
113 | 113 | exit; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
117 | -$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | -set_include_path(get_include_path() . PATH_SEPARATOR . $incPath); |
|
117 | +$incPath = str_replace("\\", "/", dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | +set_include_path(get_include_path().PATH_SEPARATOR.$incPath); |
|
119 | 119 | |
120 | 120 | if (!defined('ENT_COMPAT')) define('ENT_COMPAT', 2); |
121 | 121 | if (!defined('ENT_NOQUOTES')) define('ENT_NOQUOTES', 0); |
122 | 122 | if (!defined('ENT_QUOTES')) define('ENT_QUOTES', 3); |
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | -if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
|
125 | +if (!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
|
126 | 126 | $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
127 | 127 | } |
128 | 128 | |
@@ -161,30 +161,30 @@ discard block |
||
161 | 161 | // Now that session is given get user settings and merge into $modx->config |
162 | 162 | $usersettings = $modx->getUserSettings(); |
163 | 163 | |
164 | -$settings =& $modx->config; |
|
164 | +$settings = & $modx->config; |
|
165 | 165 | extract($modx->config, EXTR_OVERWRITE); |
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | -if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
168 | +if (!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
169 | 169 | $manager_language = "english"; // if not set, get the english language file. |
170 | 170 | } |
171 | 171 | |
172 | 172 | // $length_eng_lang = count($_lang); // Not used for now, required for difference-check with other languages than english (i.e. inside installer) |
173 | 173 | |
174 | -if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
174 | +if ($manager_language != "english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
175 | 175 | include_once "lang/".$manager_language.".inc.php"; |
176 | 176 | } |
177 | 177 | |
178 | 178 | // allow custom language overrides not altered by future EVO-updates |
179 | -if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
179 | +if (file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
180 | 180 | include_once "lang/override/".$manager_language.".inc.php"; |
181 | 181 | } |
182 | 182 | |
183 | 183 | $s = array('[+MGR_DIR+]'); |
184 | 184 | $r = array(MGR_DIR); |
185 | -foreach($_lang as $k=>$v) |
|
185 | +foreach ($_lang as $k=>$v) |
|
186 | 186 | { |
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
187 | + if (strpos($v, '[+') !== false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | // send the charset header |
@@ -198,19 +198,19 @@ discard block |
||
198 | 198 | include_once "accesscontrol.inc.php"; |
199 | 199 | |
200 | 200 | // double check the session |
201 | -if(!isset($_SESSION['mgrValidated'])){ |
|
201 | +if (!isset($_SESSION['mgrValidated'])) { |
|
202 | 202 | echo "Not Logged In!"; |
203 | 203 | exit; |
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | -if(isset($manager_theme) && !isset($_style)) { |
|
207 | +if (isset($manager_theme) && !isset($_style)) { |
|
208 | 208 | $_style = array(); |
209 | 209 | include_once "media/style/".$manager_theme."/style.php"; |
210 | 210 | } |
211 | 211 | |
212 | 212 | // check if user is allowed to access manager interface |
213 | -if(isset($allow_manager_access) && $allow_manager_access==0) { |
|
213 | +if (isset($allow_manager_access) && $allow_manager_access == 0) { |
|
214 | 214 | include_once "manager.lockout.inc.php"; |
215 | 215 | } |
216 | 216 | |
@@ -219,21 +219,21 @@ discard block |
||
219 | 219 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | -if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
222 | +if (!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
223 | 223 | // this looks to be a top-level frameset request, so let's serve up a frameset |
224 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
224 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | 225 | include_once "media/style/".$manager_theme."/frames/1.php"; |
226 | - }else{ |
|
226 | + } else { |
|
227 | 227 | include_once "frames/1.php"; |
228 | 228 | } |
229 | 229 | exit; |
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
233 | -$option = array('min_range'=>1,'max_range'=>2000); |
|
234 | -if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | -elseif(isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
236 | -elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
233 | +$option = array('min_range'=>1, 'max_range'=>2000); |
|
234 | +if (isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | +elseif (isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a', FILTER_VALIDATE_INT, $option); |
|
236 | +elseif (isset($_POST['a'])) $action = filter_input(INPUT_POST, 'a', FILTER_VALIDATE_INT, $option); |
|
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
@@ -264,11 +264,11 @@ discard block |
||
264 | 264 | $modx->invokeEvent("OnManagerPageInit", array("action" => $action)); |
265 | 265 | |
266 | 266 | // return element filepath |
267 | -function includeFileProcessor ($filepath,$manager_theme) { |
|
267 | +function includeFileProcessor($filepath, $manager_theme){ |
|
268 | 268 | $element = ""; |
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
269 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | 270 | $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
271 | - }else{ |
|
271 | + } else { |
|
272 | 272 | $element = $filepath; |
273 | 273 | } |
274 | 274 | return $element; |
@@ -281,341 +281,341 @@ discard block |
||
281 | 281 | /********************************************************************/ |
282 | 282 | case 1 : |
283 | 283 | // get the requested frame |
284 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | - if($frame>9) { |
|
286 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
284 | + $frame = preg_replace('/[^a-z0-9]/i', '', $_REQUEST['f']); |
|
285 | + if ($frame > 9) { |
|
286 | + $enable_debug = false; // this is to stop the debug thingy being attached to the framesets |
|
287 | 287 | } |
288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
288 | + include_once(includeFileProcessor("frames/".$frame.".php", $manager_theme)); |
|
289 | 289 | break; |
290 | 290 | /********************************************************************/ |
291 | 291 | /* show the homepage */ |
292 | 292 | /********************************************************************/ |
293 | 293 | case 2: |
294 | 294 | // get the home page |
295 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
295 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
296 | + include_once(includeFileProcessor("actions/welcome.static.php", $manager_theme)); |
|
297 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
298 | 298 | break; |
299 | 299 | /********************************************************************/ |
300 | 300 | /* document data */ |
301 | 301 | /********************************************************************/ |
302 | 302 | case 3: |
303 | 303 | // get the page to show document's data |
304 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
304 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
305 | + include_once(includeFileProcessor("actions/document_data.static.php", $manager_theme)); |
|
306 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
307 | 307 | break; |
308 | 308 | /********************************************************************/ |
309 | 309 | /* content management */ |
310 | 310 | /********************************************************************/ |
311 | 311 | case 85: |
312 | 312 | // get the mutate page for adding a folder |
313 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
313 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
314 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
315 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
316 | 316 | break; |
317 | 317 | case 27: |
318 | 318 | // get the mutate page for changing content |
319 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
319 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
320 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
321 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
322 | 322 | break; |
323 | 323 | case 4: |
324 | 324 | // get the mutate page for adding content |
325 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
325 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
326 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
327 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
328 | 328 | break; |
329 | 329 | case 5: |
330 | 330 | // get the save processor |
331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
331 | + include_once(includeFileProcessor("processors/save_content.processor.php", $manager_theme)); |
|
332 | 332 | break; |
333 | 333 | case 6: |
334 | 334 | // get the delete processor |
335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
335 | + include_once(includeFileProcessor("processors/delete_content.processor.php", $manager_theme)); |
|
336 | 336 | break; |
337 | 337 | case 63: |
338 | 338 | // get the undelete processor |
339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php", $manager_theme)); |
|
340 | 340 | break; |
341 | 341 | case 51: |
342 | 342 | // get the move action |
343 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
343 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
344 | + include_once(includeFileProcessor("actions/move_document.dynamic.php", $manager_theme)); |
|
345 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
346 | 346 | break; |
347 | 347 | case 52: |
348 | 348 | // get the move document processor |
349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
349 | + include_once(includeFileProcessor("processors/move_document.processor.php", $manager_theme)); |
|
350 | 350 | break; |
351 | 351 | case 61: |
352 | 352 | // get the processor for publishing content |
353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
353 | + include_once(includeFileProcessor("processors/publish_content.processor.php", $manager_theme)); |
|
354 | 354 | break; |
355 | 355 | case 62: |
356 | 356 | // get the processor for publishing content |
357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php", $manager_theme)); |
|
358 | 358 | break; |
359 | 359 | case 56: |
360 | 360 | // get the sort menuindex action |
361 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
361 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
362 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php", $manager_theme)); |
|
363 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
364 | 364 | break; |
365 | 365 | /********************************************************************/ |
366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
367 | 367 | /********************************************************************/ |
368 | 368 | case 7: |
369 | 369 | // get the wait page (so the tree can reload) |
370 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
370 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
371 | + include_once(includeFileProcessor("actions/wait.static.php", $manager_theme)); |
|
372 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
373 | 373 | break; |
374 | 374 | /********************************************************************/ |
375 | 375 | /* let the user log out */ |
376 | 376 | /********************************************************************/ |
377 | 377 | case 8: |
378 | 378 | // get the logout processor |
379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
379 | + include_once(includeFileProcessor("processors/logout.processor.php", $manager_theme)); |
|
380 | 380 | break; |
381 | 381 | /********************************************************************/ |
382 | 382 | /* user management */ |
383 | 383 | /********************************************************************/ |
384 | 384 | case 87: |
385 | 385 | // get the new web user page |
386 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
386 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
387 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
388 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
389 | 389 | break; |
390 | 390 | case 88: |
391 | 391 | // get the edit web user page |
392 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
392 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
393 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
394 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
395 | 395 | break; |
396 | 396 | case 89: |
397 | 397 | // get the save web user processor |
398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php", $manager_theme)); |
|
399 | 399 | break; |
400 | 400 | case 90: |
401 | 401 | // get the delete web user page |
402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php", $manager_theme)); |
|
403 | 403 | break; |
404 | 404 | case 11: |
405 | 405 | // get the new user page |
406 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
406 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
407 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
408 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
409 | 409 | break; |
410 | 410 | case 12: |
411 | 411 | // get the edit user page |
412 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
412 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
413 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
414 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
415 | 415 | break; |
416 | 416 | case 32: |
417 | 417 | // get the save user processor |
418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
418 | + include_once(includeFileProcessor("processors/save_user.processor.php", $manager_theme)); |
|
419 | 419 | break; |
420 | 420 | case 28: |
421 | 421 | // get the change password page |
422 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
422 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
423 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php", $manager_theme)); |
|
424 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
425 | 425 | break; |
426 | 426 | case 34: |
427 | 427 | // get the save new password page |
428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
428 | + include_once(includeFileProcessor("processors/save_password.processor.php", $manager_theme)); |
|
429 | 429 | break; |
430 | 430 | case 33: |
431 | 431 | // get the delete user page |
432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
432 | + include_once(includeFileProcessor("processors/delete_user.processor.php", $manager_theme)); |
|
433 | 433 | break; |
434 | 434 | /********************************************************************/ |
435 | 435 | /* role management */ |
436 | 436 | /********************************************************************/ |
437 | 437 | case 38: |
438 | 438 | // get the new role page |
439 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
439 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
440 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
441 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
442 | 442 | break; |
443 | 443 | case 35: |
444 | 444 | // get the edit role page |
445 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
445 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
446 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
447 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
448 | 448 | break; |
449 | 449 | case 36: |
450 | 450 | // get the save role page |
451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
451 | + include_once(includeFileProcessor("processors/save_role.processor.php", $manager_theme)); |
|
452 | 452 | break; |
453 | 453 | case 37: |
454 | 454 | // get the delete role page |
455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
455 | + include_once(includeFileProcessor("processors/delete_role.processor.php", $manager_theme)); |
|
456 | 456 | break; |
457 | 457 | /********************************************************************/ |
458 | 458 | /* category management */ |
459 | 459 | /********************************************************************/ |
460 | 460 | case 120: |
461 | 461 | // get the edit category page |
462 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
462 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
463 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
464 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
465 | 465 | break; |
466 | 466 | case 121: |
467 | 467 | // for ajax-requests |
468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
469 | 469 | break; |
470 | 470 | /********************************************************************/ |
471 | 471 | /* template management */ |
472 | 472 | /********************************************************************/ |
473 | 473 | case 16: |
474 | 474 | // get the edit template action |
475 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
475 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
476 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
477 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
478 | 478 | break; |
479 | 479 | case 19: |
480 | 480 | // get the new template action |
481 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
481 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
482 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
483 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
484 | 484 | break; |
485 | 485 | case 20: |
486 | 486 | // get the save processor |
487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
487 | + include_once(includeFileProcessor("processors/save_template.processor.php", $manager_theme)); |
|
488 | 488 | break; |
489 | 489 | case 21: |
490 | 490 | // get the delete processor |
491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
491 | + include_once(includeFileProcessor("processors/delete_template.processor.php", $manager_theme)); |
|
492 | 492 | break; |
493 | 493 | case 96: |
494 | 494 | // get the duplicate template processor |
495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php", $manager_theme)); |
|
496 | 496 | break; |
497 | 497 | case 117: |
498 | 498 | // change the tv rank for selected template |
499 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
499 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
500 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php", $manager_theme)); |
|
501 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
502 | 502 | break; |
503 | 503 | /********************************************************************/ |
504 | 504 | /* snippet management */ |
505 | 505 | /********************************************************************/ |
506 | 506 | case 22: |
507 | 507 | // get the edit snippet action |
508 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
508 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
509 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
510 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
511 | 511 | break; |
512 | 512 | case 23: |
513 | 513 | // get the new snippet action |
514 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
514 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
515 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
516 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
517 | 517 | break; |
518 | 518 | case 24: |
519 | 519 | // get the save processor |
520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php", $manager_theme)); |
|
521 | 521 | break; |
522 | 522 | case 25: |
523 | 523 | // get the delete processor |
524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php", $manager_theme)); |
|
525 | 525 | break; |
526 | 526 | case 98: |
527 | 527 | // get the duplicate processor |
528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php", $manager_theme)); |
|
529 | 529 | break; |
530 | 530 | /********************************************************************/ |
531 | 531 | /* htmlsnippet management */ |
532 | 532 | /********************************************************************/ |
533 | 533 | case 78: |
534 | 534 | // get the edit snippet action |
535 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
535 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
536 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
537 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
538 | 538 | break; |
539 | 539 | case 77: |
540 | 540 | // get the new snippet action |
541 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
541 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
542 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
543 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
544 | 544 | break; |
545 | 545 | case 79: |
546 | 546 | // get the save processor |
547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php", $manager_theme)); |
|
548 | 548 | break; |
549 | 549 | case 80: |
550 | 550 | // get the delete processor |
551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php", $manager_theme)); |
|
552 | 552 | break; |
553 | 553 | case 97: |
554 | 554 | // get the duplicate processor |
555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php", $manager_theme)); |
|
556 | 556 | break; |
557 | 557 | /********************************************************************/ |
558 | 558 | /* show the credits page */ |
559 | 559 | /********************************************************************/ |
560 | 560 | case 18: |
561 | 561 | // get the credits page |
562 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
562 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
563 | + include_once(includeFileProcessor("actions/credits.static.php", $manager_theme)); |
|
564 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
565 | 565 | break; |
566 | 566 | /********************************************************************/ |
567 | 567 | /* empty cache & synchronisation */ |
568 | 568 | /********************************************************************/ |
569 | 569 | case 26: |
570 | 570 | // get the cache emptying processor |
571 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
571 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
572 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php", $manager_theme)); |
|
573 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
574 | 574 | break; |
575 | 575 | /********************************************************************/ |
576 | 576 | /* Module management */ |
577 | 577 | /********************************************************************/ |
578 | 578 | case 106: |
579 | 579 | // get module management |
580 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
580 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
581 | + include_once(includeFileProcessor("actions/modules.static.php", $manager_theme)); |
|
582 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
583 | 583 | break; |
584 | 584 | case 107: |
585 | 585 | // get the new module action |
586 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
586 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
587 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
588 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
589 | 589 | break; |
590 | 590 | case 108: |
591 | 591 | // get the edit module action |
592 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
592 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
593 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
594 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
595 | 595 | break; |
596 | 596 | case 109: |
597 | 597 | // get the save processor |
598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
598 | + include_once(includeFileProcessor("processors/save_module.processor.php", $manager_theme)); |
|
599 | 599 | break; |
600 | 600 | case 110: |
601 | 601 | // get the delete processor |
602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
602 | + include_once(includeFileProcessor("processors/delete_module.processor.php", $manager_theme)); |
|
603 | 603 | break; |
604 | 604 | case 111: |
605 | 605 | // get the duplicate processor |
606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php", $manager_theme)); |
|
607 | 607 | break; |
608 | 608 | case 112: |
609 | 609 | // execute/run the module |
610 | 610 | //include_once "header.inc.php"; |
611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
611 | + include_once(includeFileProcessor("processors/execute_module.processor.php", $manager_theme)); |
|
612 | 612 | //include_once "footer.inc.php"; |
613 | 613 | break; |
614 | 614 | case 113: |
615 | 615 | // get the module resources (dependencies) action |
616 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
616 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
617 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php", $manager_theme)); |
|
618 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
619 | 619 | break; |
620 | 620 | /********************************************************************/ |
621 | 621 | /* plugin management */ |
@@ -623,46 +623,46 @@ discard block |
||
623 | 623 | case 100: |
624 | 624 | // change the plugin priority |
625 | 625 | //include_once "header.inc.php"; - in action file |
626 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
626 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php", $manager_theme)); |
|
627 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
628 | 628 | break; |
629 | 629 | case 101: |
630 | 630 | // get the new plugin action |
631 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
631 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
632 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
633 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
634 | 634 | break; |
635 | 635 | case 102: |
636 | 636 | // get the edit plugin action |
637 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
637 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
638 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
639 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
640 | 640 | break; |
641 | 641 | case 103: |
642 | 642 | // get the save processor |
643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php", $manager_theme)); |
|
644 | 644 | break; |
645 | 645 | case 104: |
646 | 646 | // get the delete processor |
647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php", $manager_theme)); |
|
648 | 648 | break; |
649 | 649 | case 105: |
650 | 650 | // get the duplicate processor |
651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php", $manager_theme)); |
|
652 | 652 | break; |
653 | 653 | case 119: |
654 | 654 | // get the purge processor |
655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php", $manager_theme)); |
|
656 | 656 | break; |
657 | 657 | /********************************************************************/ |
658 | 658 | /* view phpinfo */ |
659 | 659 | /********************************************************************/ |
660 | 660 | case 200: |
661 | 661 | // show phpInfo |
662 | - if($modx->hasPermission('logs')) { |
|
663 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
662 | + if ($modx->hasPermission('logs')) { |
|
663 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
664 | + include_once(includeFileProcessor("actions/phpinfo.static.php", $manager_theme)); |
|
665 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
666 | 666 | } |
667 | 667 | break; |
668 | 668 | /********************************************************************/ |
@@ -670,320 +670,320 @@ discard block |
||
670 | 670 | /********************************************************************/ |
671 | 671 | case 29: |
672 | 672 | // get the error page |
673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
673 | + include_once(includeFileProcessor("actions/error_dialog.static.php", $manager_theme)); |
|
674 | 674 | break; |
675 | 675 | /********************************************************************/ |
676 | 676 | /* file manager */ |
677 | 677 | /********************************************************************/ |
678 | 678 | case 31: |
679 | 679 | // get the page to manage files |
680 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
680 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
681 | + include_once(includeFileProcessor("actions/files.dynamic.php", $manager_theme)); |
|
682 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
683 | 683 | break; |
684 | 684 | /********************************************************************/ |
685 | 685 | /* access permissions */ |
686 | 686 | /********************************************************************/ |
687 | 687 | case 40: |
688 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
688 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
689 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php", $manager_theme)); |
|
690 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
691 | 691 | break; |
692 | 692 | case 91: |
693 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
694 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php", $manager_theme)); |
|
695 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
696 | 696 | break; |
697 | 697 | /********************************************************************/ |
698 | 698 | /* access groups processor */ |
699 | 699 | /********************************************************************/ |
700 | 700 | case 41: |
701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
701 | + include_once(includeFileProcessor("processors/access_groups.processor.php", $manager_theme)); |
|
702 | 702 | break; |
703 | 703 | case 92: |
704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php", $manager_theme)); |
|
705 | 705 | break; |
706 | 706 | /********************************************************************/ |
707 | 707 | /* settings editor */ |
708 | 708 | /********************************************************************/ |
709 | 709 | case 17: |
710 | 710 | // get the settings editor |
711 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
711 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
712 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php", $manager_theme)); |
|
713 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
714 | 714 | break; |
715 | 715 | case 118: |
716 | 716 | // call settings ajax include |
717 | 717 | ob_clean(); |
718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php", $manager_theme)); |
|
719 | 719 | break; |
720 | 720 | /********************************************************************/ |
721 | 721 | /* save settings */ |
722 | 722 | /********************************************************************/ |
723 | 723 | case 30: |
724 | 724 | // get the save settings processor |
725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
725 | + include_once(includeFileProcessor("processors/save_settings.processor.php", $manager_theme)); |
|
726 | 726 | break; |
727 | 727 | /********************************************************************/ |
728 | 728 | /* system information */ |
729 | 729 | /********************************************************************/ |
730 | 730 | case 53: |
731 | 731 | // get the settings editor |
732 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
732 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
733 | + include_once(includeFileProcessor("actions/sysinfo.static.php", $manager_theme)); |
|
734 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
735 | 735 | break; |
736 | 736 | /********************************************************************/ |
737 | 737 | /* optimise table */ |
738 | 738 | /********************************************************************/ |
739 | 739 | case 54: |
740 | 740 | // get the table optimizer/truncate processor |
741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php", $manager_theme)); |
|
742 | 742 | break; |
743 | 743 | /********************************************************************/ |
744 | 744 | /* view logging */ |
745 | 745 | /********************************************************************/ |
746 | 746 | case 13: |
747 | 747 | // view logging |
748 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
748 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
749 | + include_once(includeFileProcessor("actions/logging.static.php", $manager_theme)); |
|
750 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
751 | 751 | break; |
752 | 752 | /********************************************************************/ |
753 | 753 | /* empty logs */ |
754 | 754 | /********************************************************************/ |
755 | 755 | case 55: |
756 | 756 | // get the settings editor |
757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
757 | + include_once(includeFileProcessor("processors/empty_table.processor.php", $manager_theme)); |
|
758 | 758 | break; |
759 | 759 | /********************************************************************/ |
760 | 760 | /* calls test page */ |
761 | 761 | /********************************************************************/ |
762 | 762 | case 999: |
763 | 763 | // get the test page |
764 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
764 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
765 | + include_once(includeFileProcessor("test_page.php", $manager_theme)); |
|
766 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
767 | 767 | break; |
768 | 768 | /********************************************************************/ |
769 | 769 | /* Empty recycle bin */ |
770 | 770 | /********************************************************************/ |
771 | 771 | case 64: |
772 | 772 | // get the Recycle bin emptier |
773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
773 | + include_once(includeFileProcessor("processors/remove_content.processor.php", $manager_theme)); |
|
774 | 774 | break; |
775 | 775 | /********************************************************************/ |
776 | 776 | /* Messages */ |
777 | 777 | /********************************************************************/ |
778 | 778 | case 10: |
779 | 779 | // get the messages page |
780 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
780 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
781 | + include_once(includeFileProcessor("actions/messages.static.php", $manager_theme)); |
|
782 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
783 | 783 | break; |
784 | 784 | /********************************************************************/ |
785 | 785 | /* Delete a message */ |
786 | 786 | /********************************************************************/ |
787 | 787 | case 65: |
788 | 788 | // get the message deleter |
789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
789 | + include_once(includeFileProcessor("processors/delete_message.processor.php", $manager_theme)); |
|
790 | 790 | break; |
791 | 791 | /********************************************************************/ |
792 | 792 | /* Send a message */ |
793 | 793 | /********************************************************************/ |
794 | 794 | case 66: |
795 | 795 | // get the message deleter |
796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
796 | + include_once(includeFileProcessor("processors/send_message.processor.php", $manager_theme)); |
|
797 | 797 | break; |
798 | 798 | /********************************************************************/ |
799 | 799 | /* Remove locks */ |
800 | 800 | /********************************************************************/ |
801 | 801 | case 67: |
802 | 802 | // get the lock remover |
803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php", $manager_theme)); |
|
804 | 804 | break; |
805 | 805 | /********************************************************************/ |
806 | 806 | /* Site schedule */ |
807 | 807 | /********************************************************************/ |
808 | 808 | case 70: |
809 | 809 | // get the schedule page |
810 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
810 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
811 | + include_once(includeFileProcessor("actions/site_schedule.static.php", $manager_theme)); |
|
812 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
813 | 813 | break; |
814 | 814 | /********************************************************************/ |
815 | 815 | /* Search */ |
816 | 816 | /********************************************************************/ |
817 | 817 | case 71: |
818 | 818 | // get the search page |
819 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
819 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
820 | + include_once(includeFileProcessor("actions/search.static.php", $manager_theme)); |
|
821 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
822 | 822 | break; |
823 | 823 | /********************************************************************/ |
824 | 824 | /* About */ |
825 | 825 | /********************************************************************/ |
826 | 826 | case 59: |
827 | 827 | // get the about page |
828 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
828 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
829 | + include_once(includeFileProcessor("actions/about.static.php", $manager_theme)); |
|
830 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
831 | 831 | break; |
832 | 832 | /********************************************************************/ |
833 | 833 | /* Add weblink */ |
834 | 834 | /********************************************************************/ |
835 | 835 | case 72: |
836 | 836 | // get the weblink page |
837 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
837 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
838 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
839 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
840 | 840 | break; |
841 | 841 | /********************************************************************/ |
842 | 842 | /* User management */ |
843 | 843 | /********************************************************************/ |
844 | 844 | case 75: |
845 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
845 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
846 | + include_once(includeFileProcessor("actions/user_management.static.php", $manager_theme)); |
|
847 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
848 | 848 | break; |
849 | 849 | case 99: |
850 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
851 | + include_once(includeFileProcessor("actions/web_user_management.static.php", $manager_theme)); |
|
852 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
853 | 853 | break; |
854 | 854 | case 86: |
855 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
856 | + include_once(includeFileProcessor("actions/role_management.static.php", $manager_theme)); |
|
857 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
858 | 858 | break; |
859 | 859 | /********************************************************************/ |
860 | 860 | /* template/ snippet management */ |
861 | 861 | /********************************************************************/ |
862 | 862 | case 76: |
863 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
863 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
864 | + include_once(includeFileProcessor("actions/resources.static.php", $manager_theme)); |
|
865 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
866 | 866 | break; |
867 | 867 | /********************************************************************/ |
868 | 868 | /* Export to file */ |
869 | 869 | /********************************************************************/ |
870 | 870 | case 83: |
871 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
871 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
872 | + include_once(includeFileProcessor("actions/export_site.static.php", $manager_theme)); |
|
873 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
874 | 874 | break; |
875 | 875 | /********************************************************************/ |
876 | 876 | /* Resource Selector */ |
877 | 877 | /********************************************************************/ |
878 | 878 | case 84: |
879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
879 | + include_once(includeFileProcessor("actions/resource_selector.static.php", $manager_theme)); |
|
880 | 880 | break; |
881 | 881 | /********************************************************************/ |
882 | 882 | /* Backup Manager */ |
883 | 883 | /********************************************************************/ |
884 | 884 | case 93: |
885 | 885 | # header and footer will be handled interally |
886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
886 | + include_once(includeFileProcessor("actions/bkmanager.static.php", $manager_theme)); |
|
887 | 887 | break; |
888 | 888 | /********************************************************************/ |
889 | 889 | /* Duplicate Document */ |
890 | 890 | /********************************************************************/ |
891 | 891 | case 94: |
892 | 892 | // get the duplicate processor |
893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php", $manager_theme)); |
|
894 | 894 | break; |
895 | 895 | /********************************************************************/ |
896 | 896 | /* Import Document from file */ |
897 | 897 | /********************************************************************/ |
898 | 898 | case 95: |
899 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
899 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
900 | + include_once(includeFileProcessor("actions/import_site.static.php", $manager_theme)); |
|
901 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
902 | 902 | break; |
903 | 903 | /********************************************************************/ |
904 | 904 | /* Help */ |
905 | 905 | /********************************************************************/ |
906 | 906 | case 9: |
907 | 907 | // get the help page |
908 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
908 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
909 | + include_once(includeFileProcessor("actions/help.static.php", $manager_theme)); |
|
910 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
911 | 911 | break; |
912 | 912 | /********************************************************************/ |
913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
914 | 914 | /********************************************************************/ |
915 | 915 | case 300: |
916 | 916 | // get the new document variable action |
917 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
917 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
918 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
919 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
920 | 920 | break; |
921 | 921 | case 301: |
922 | 922 | // get the edit document variable action |
923 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
923 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
924 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
925 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
926 | 926 | break; |
927 | 927 | case 302: |
928 | 928 | // get the save processor |
929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php", $manager_theme)); |
|
930 | 930 | break; |
931 | 931 | case 303: |
932 | 932 | // get the delete processor |
933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php", $manager_theme)); |
|
934 | 934 | break; |
935 | 935 | case 304: |
936 | 936 | // get the duplicate processor |
937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php", $manager_theme)); |
|
938 | 938 | break; |
939 | 939 | case 305: |
940 | 940 | // get the tv-rank action |
941 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
941 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
942 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php", $manager_theme)); |
|
943 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
944 | 944 | break; |
945 | 945 | /********************************************************************/ |
946 | 946 | /* Event viewer: show event message log */ |
947 | 947 | /********************************************************************/ |
948 | 948 | case 114: |
949 | 949 | // get event logs |
950 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
950 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
951 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php", $manager_theme)); |
|
952 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
953 | 953 | break; |
954 | 954 | case 115: |
955 | 955 | // get event log details viewer |
956 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
956 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
957 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php", $manager_theme)); |
|
958 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
959 | 959 | break; |
960 | 960 | case 116: |
961 | 961 | // get the event log delete processor |
962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php", $manager_theme)); |
|
963 | 963 | break; |
964 | 964 | |
965 | 965 | case 501: |
966 | 966 | //delete category |
967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
967 | + include_once(includeFileProcessor("processors/delete_category.processor.php", $manager_theme)); |
|
968 | 968 | break; |
969 | 969 | /********************************************************************/ |
970 | 970 | /* default action: show not implemented message */ |
971 | 971 | /********************************************************************/ |
972 | 972 | default : |
973 | 973 | // say that what was requested doesn't do anything yet |
974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
974 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
975 | 975 | echo " |
976 | 976 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
977 | 977 | <div class='sectionBody'> |
978 | 978 | <p>".$_lang['functionnotimpl_message']."</p> |
979 | 979 | </div> |
980 | 980 | "; |
981 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
981 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /********************************************************************/ |
985 | 985 | // log action, unless it's a frame request |
986 | -if($action!=1 && $action!=7 && $action!=2) { |
|
986 | +if ($action != 1 && $action != 7 && $action != 2) { |
|
987 | 987 | include_once "log.class.inc.php"; |
988 | 988 | $log = new logHandler; |
989 | 989 | $log->initAndWriteLog(); |
@@ -61,9 +61,13 @@ discard block |
||
61 | 61 | $mgr_dir = substr($self_dir,strrpos($self_dir,'/')+1); |
62 | 62 | $base_path = str_replace($mgr_dir . '/index.php','',$self); |
63 | 63 | $site_mgr_path = $base_path . 'assets/cache/siteManager.php'; |
64 | -if(is_file($site_mgr_path)) include_once($site_mgr_path); |
|
64 | +if(is_file($site_mgr_path)) { |
|
65 | + include_once($site_mgr_path); |
|
66 | +} |
|
65 | 67 | $site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
66 | -if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
68 | +if(is_file($site_hostnames_path)) { |
|
69 | + include_once($site_hostnames_path); |
|
70 | +} |
|
67 | 71 | if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
68 | 72 | $src = "<?php\n"; |
69 | 73 | $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
@@ -117,9 +121,15 @@ discard block |
||
117 | 121 | $incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond |
118 | 122 | set_include_path(get_include_path() . PATH_SEPARATOR . $incPath); |
119 | 123 | |
120 | -if (!defined('ENT_COMPAT')) define('ENT_COMPAT', 2); |
|
121 | -if (!defined('ENT_NOQUOTES')) define('ENT_NOQUOTES', 0); |
|
122 | -if (!defined('ENT_QUOTES')) define('ENT_QUOTES', 3); |
|
124 | +if (!defined('ENT_COMPAT')) { |
|
125 | + define('ENT_COMPAT', 2); |
|
126 | +} |
|
127 | +if (!defined('ENT_NOQUOTES')) { |
|
128 | + define('ENT_NOQUOTES', 0); |
|
129 | +} |
|
130 | +if (!defined('ENT_QUOTES')) { |
|
131 | + define('ENT_QUOTES', 3); |
|
132 | +} |
|
123 | 133 | |
124 | 134 | // set the document_root :| |
125 | 135 | if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
@@ -182,10 +192,11 @@ discard block |
||
182 | 192 | |
183 | 193 | $s = array('[+MGR_DIR+]'); |
184 | 194 | $r = array(MGR_DIR); |
185 | -foreach($_lang as $k=>$v) |
|
186 | -{ |
|
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | -} |
|
195 | +foreach($_lang as $k=>$v) { |
|
196 | + if(strpos($v,'[+')!==false) { |
|
197 | + $_lang[$k] = str_replace($s, $r, $v); |
|
198 | + } |
|
199 | + } |
|
189 | 200 | |
190 | 201 | // send the charset header |
191 | 202 | header('Content-Type: text/html; charset='.$modx_manager_charset); |
@@ -198,7 +209,7 @@ discard block |
||
198 | 209 | include_once "accesscontrol.inc.php"; |
199 | 210 | |
200 | 211 | // double check the session |
201 | -if(!isset($_SESSION['mgrValidated'])){ |
|
212 | +if(!isset($_SESSION['mgrValidated'])) { |
|
202 | 213 | echo "Not Logged In!"; |
203 | 214 | exit; |
204 | 215 | } |
@@ -215,7 +226,9 @@ discard block |
||
215 | 226 | } |
216 | 227 | |
217 | 228 | // Initialize System Alert Message Queque |
218 | -if (!isset($_SESSION['SystemAlertMsgQueque'])) $_SESSION['SystemAlertMsgQueque'] = array(); |
|
229 | +if (!isset($_SESSION['SystemAlertMsgQueque'])) { |
|
230 | + $_SESSION['SystemAlertMsgQueque'] = array(); |
|
231 | +} |
|
219 | 232 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
220 | 233 | |
221 | 234 | // first we check to see if this is a frameset request |
@@ -223,7 +236,7 @@ discard block |
||
223 | 236 | // this looks to be a top-level frameset request, so let's serve up a frameset |
224 | 237 | if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
225 | 238 | include_once "media/style/".$manager_theme."/frames/1.php"; |
226 | - }else{ |
|
239 | + } else { |
|
227 | 240 | include_once "frames/1.php"; |
228 | 241 | } |
229 | 242 | exit; |
@@ -231,10 +244,15 @@ discard block |
||
231 | 244 | |
232 | 245 | // OK, let's retrieve the action directive from the request |
233 | 246 | $option = array('min_range'=>1,'max_range'=>2000); |
234 | -if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | -elseif(isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
236 | -elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
237 | -else $action = null; |
|
247 | +if(isset($_GET['a']) && isset($_POST['a'])) { |
|
248 | + $modx->webAlertAndQuit($_lang['error_double_action']); |
|
249 | +} elseif(isset($_GET['a'])) { |
|
250 | + $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
251 | +} elseif(isset($_POST['a'])) { |
|
252 | + $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
253 | +} else { |
|
254 | + $action = null; |
|
255 | +} |
|
238 | 256 | |
239 | 257 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
240 | 258 | include_once 'messageCount.inc.php'; |
@@ -264,11 +282,12 @@ discard block |
||
264 | 282 | $modx->invokeEvent("OnManagerPageInit", array("action" => $action)); |
265 | 283 | |
266 | 284 | // return element filepath |
267 | -function includeFileProcessor ($filepath,$manager_theme) { |
|
285 | +function includeFileProcessor ($filepath,$manager_theme) |
|
286 | +{ |
|
268 | 287 | $element = ""; |
269 | 288 | if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
270 | 289 | $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
271 | - }else{ |
|
290 | + } else { |
|
272 | 291 | $element = $filepath; |
273 | 292 | } |
274 | 293 | return $element; |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * Build and return document tree view nodes |
5 | 5 | * |
6 | 6 | */ |
7 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
7 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
8 | 8 | die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
9 | 9 | } |
10 | 10 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $parent = intval($_REQUEST['parent']); |
23 | 23 | $expandAll = intval($_REQUEST['expandAll']); |
24 | 24 | $output = ''; |
25 | -$theme = $manager_theme . "/"; |
|
25 | +$theme = $manager_theme."/"; |
|
26 | 26 | $hereid = isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) ? $_REQUEST['id'] : ''; |
27 | 27 | |
28 | 28 | if (isset($_REQUEST['showonlyfolders'])) { |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
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 | 8 | if(is_array($evtOut)) { |
9 | - echo implode("\n", $evtOut); |
|
9 | + echo implode("\n", $evtOut); |
|
10 | 10 | } |
11 | 11 | ?> |
12 | 12 | |
@@ -52,23 +52,23 @@ discard block |
||
52 | 52 | |
53 | 53 | <div id="treeHolder"> |
54 | 54 | <?php |
55 | - // invoke OnManagerTreePrerender event |
|
56 | - $evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->db->escape($_REQUEST)); |
|
57 | - if(is_array($evtOut)) { |
|
58 | - echo implode("\n", $evtOut); |
|
59 | - } |
|
60 | - ?> |
|
55 | + // invoke OnManagerTreePrerender event |
|
56 | + $evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->db->escape($_REQUEST)); |
|
57 | + if(is_array($evtOut)) { |
|
58 | + echo implode("\n", $evtOut); |
|
59 | + } |
|
60 | + ?> |
|
61 | 61 | <div id="node0" class="rootNode"><a class="node" onclick="modx.tree.treeAction(event, 0)" data-id="0" data-title-esc="<?php $site_name = htmlspecialchars($site_name, ENT_QUOTES, $modx->config['modx_charset']); |
62 | - echo $site_name; ?>"><span class="icon"><?php echo $_style['tree_showtree']; ?></span><span class="title"><?php echo $site_name; ?></span></a> |
|
62 | + echo $site_name; ?>"><span class="icon"><?php echo $_style['tree_showtree']; ?></span><span class="title"><?php echo $site_name; ?></span></a> |
|
63 | 63 | <div id="treeloader"><i class="fa fa-cog fa-spin fa-3x fa-fw"></i></div> |
64 | 64 | </div> |
65 | 65 | <div id="treeRoot"></div> |
66 | 66 | <?php |
67 | - // invoke OnManagerTreeRender event |
|
68 | - $evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->db->escape($_REQUEST)); |
|
69 | - if(is_array($evtOut)) { |
|
70 | - echo implode("\n", $evtOut); |
|
71 | - } |
|
72 | - ?> |
|
67 | + // invoke OnManagerTreeRender event |
|
68 | + $evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->db->escape($_REQUEST)); |
|
69 | + if(is_array($evtOut)) { |
|
70 | + echo implode("\n", $evtOut); |
|
71 | + } |
|
72 | + ?> |
|
73 | 73 | </div> |
74 | 74 | </div> |
@@ -1,11 +1,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ?> |
@@ -1,11 +1,11 @@ discard block |
||
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 | ?> |
@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
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 | header("X-XSS-Protection: 0"); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | if (isset($_COOKIE['MODX_themeColor'])) { |
49 | - $body_class .= ' ' . $_COOKIE['MODX_themeColor']; |
|
49 | + $body_class .= ' '.$_COOKIE['MODX_themeColor']; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | if (isset($modx->pluginCache['ElementsInTree'])) { |
@@ -74,36 +74,36 @@ discard block |
||
74 | 74 | $user['which_browser'] = $modx->config['which_browser']; |
75 | 75 | } |
76 | 76 | |
77 | -$css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
|
77 | +$css = 'media/style/'.$modx->config['manager_theme'].'/css/page.css?v='.$lastInstallTime; |
|
78 | 78 | |
79 | 79 | if ($modx->config['manager_theme'] == 'default') { |
80 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
81 | - require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
|
80 | + if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css') && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) { |
|
81 | + require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php'; |
|
82 | 82 | $minifier = new Formatter\CSSMinify(); |
83 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
84 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
85 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css'); |
|
86 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css'); |
|
87 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css'); |
|
88 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css'); |
|
89 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css'); |
|
90 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css'); |
|
91 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css'); |
|
92 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css'); |
|
93 | - $minifier->addFile(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'); |
|
83 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css'); |
|
84 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css'); |
|
85 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css'); |
|
86 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css'); |
|
87 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css'); |
|
88 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css'); |
|
89 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css'); |
|
90 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css'); |
|
91 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css'); |
|
92 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css'); |
|
93 | + $minifier->addFile(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'); |
|
94 | 94 | $css = $minifier->minify(); |
95 | - file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
|
95 | + file_put_contents(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css', $css); |
|
96 | 96 | } |
97 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
98 | - $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
|
97 | + if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) { |
|
98 | + $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime; |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | -$modx->config['global_tabs'] = (int)($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
102 | +$modx->config['global_tabs'] = (int) ($modx->config['global_tabs'] && ($user['role'] == 1 || $modx->hasPermission('edit_template') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_plugin'))); |
|
103 | 103 | |
104 | 104 | ?> |
105 | 105 | <!DOCTYPE html> |
106 | -<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="') . $mxla . '" xml:lang="' . $mxla . '"' ?>> |
|
106 | +<html <?= (isset($modx_textdir) && $modx_textdir ? 'dir="rtl" lang="' : 'lang="').$mxla.'" xml:lang="'.$mxla.'"' ?>> |
|
107 | 107 | <head> |
108 | 108 | <title><?= $site_name ?>- (EVO CMS Manager)</title> |
109 | 109 | <meta http-equiv="Content-Type" content="text/html; charset=<?= $modx_manager_charset ?>" /> |
@@ -134,20 +134,20 @@ discard block |
||
134 | 134 | MODX_SITE_URL: '<?= MODX_SITE_URL ?>', |
135 | 135 | MODX_MANAGER_URL: '<?= MODX_MANAGER_URL ?>', |
136 | 136 | user: { |
137 | - role: <?= (int)$user['role'] ?>, |
|
137 | + role: <?= (int) $user['role'] ?>, |
|
138 | 138 | username: '<?= $user['username'] ?>' |
139 | 139 | }, |
140 | 140 | config: { |
141 | 141 | mail_check_timeperiod: <?= $modx->config['mail_check_timeperiod'] ?>, |
142 | - menu_height: <?= (int)$menu_height ?>, |
|
143 | - tree_width: <?= (int)$tree_width ?>, |
|
144 | - tree_min_width: <?= (int)$tree_min_width ?>, |
|
145 | - session_timeout: <?= (int)$modx->config['session_timeout'] ?>, |
|
146 | - site_start: <?= (int)$modx->config['site_start'] ?>, |
|
147 | - tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int)$modx->config['tree_page_click'] : 27) ?>, |
|
142 | + menu_height: <?= (int) $menu_height ?>, |
|
143 | + tree_width: <?= (int) $tree_width ?>, |
|
144 | + tree_min_width: <?= (int) $tree_min_width ?>, |
|
145 | + session_timeout: <?= (int) $modx->config['session_timeout'] ?>, |
|
146 | + site_start: <?= (int) $modx->config['site_start'] ?>, |
|
147 | + tree_page_click: <?=(!empty($modx->config['tree_page_click']) ? (int) $modx->config['tree_page_click'] : 27) ?>, |
|
148 | 148 | theme: '<?= $modx->config['manager_theme'] ?>', |
149 | 149 | which_browser: '<?= $user['which_browser'] ?>', |
150 | - layout: <?= (int)$manager_layout ?>, |
|
150 | + layout: <?= (int) $manager_layout ?>, |
|
151 | 151 | textdir: '<?= $modx_textdir ?>', |
152 | 152 | global_tabs: <?= $modx->config['global_tabs'] ?> |
153 | 153 | |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | delete a[b]; |
233 | 233 | }, |
234 | 234 | openedArray: [], |
235 | - lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE) . "\n" ?> |
|
235 | + lockedElementsTranslation: <?= json_encode($unlockTranslations, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE)."\n" ?> |
|
236 | 236 | }; |
237 | 237 | <?php |
238 | 238 | $opened = array_filter(array_map('intval', explode('|', $_SESSION['openedArray']))); |
239 | - echo (empty($opened) ? '' : 'modx.openedArray[' . implode("] = 1;\n modx.openedArray[", $opened) . '] = 1;') . "\n"; |
|
239 | + echo (empty($opened) ? '' : 'modx.openedArray['.implode("] = 1;\n modx.openedArray[", $opened).'] = 1;')."\n"; |
|
240 | 240 | ?> |
241 | 241 | </script> |
242 | 242 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/modx.min.js?v=<?= $lastInstallTime ?>"></script> |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | <a href="javascript:;" class="dropdown-toggle" onclick="return false;"> |
366 | 366 | <span class="username"><?= $user['username'] ?></span> |
367 | 367 | <?php if ($user['photo']) { ?> |
368 | - <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL . $user['photo'] ?>);"></span> |
|
368 | + <span class="icon photo" style="background-image: url(<?= MODX_SITE_URL.$user['photo'] ?>);"></span> |
|
369 | 369 | <?php } else { ?> |
370 | 370 | <span class="icon"><?= $_style['menu_user'] ?></span> |
371 | 371 | <?php } ?> |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $version = 'Evolution'; |
393 | 393 | ?> |
394 | 394 | <?php |
395 | - echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>' . $version . ' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
395 | + echo sprintf('<li><span class="dropdown-item" title="%s – %s" %s>'.$version.' %s</span></li>', $site_name, $modx->getVersionData('full_appname'), $style, $modx->config['settings_version']); |
|
396 | 396 | ?> |
397 | 397 | </ul> |
398 | 398 | </li> |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | <script type="text/javascript"> |
532 | 532 | |
533 | 533 | if (document.getElementById('treeMenu')) { |
534 | - <?php if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
534 | + <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
535 | 535 | |
536 | 536 | document.getElementById('treeMenu_openelements').onclick = function(e) { |
537 | 537 | e.preventDefault(); |
@@ -549,12 +549,12 @@ discard block |
||
549 | 549 | } |
550 | 550 | }; |
551 | 551 | <?php } ?> |
552 | - <?php if($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
552 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
553 | 553 | |
554 | 554 | document.getElementById('treeMenu_openimages').onclick = function(e) { |
555 | 555 | e.preventDefault(); |
556 | 556 | if (modx.config.global_tabs && !e.shiftKey) { |
557 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
557 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=images' ?>', title: '<?= $_lang["images_management"] ?>'}); |
|
558 | 558 | } else { |
559 | 559 | var randomNum = '<?= $_lang["files_files"] ?>'; |
560 | 560 | if (e.shiftKey) { |
@@ -567,12 +567,12 @@ discard block |
||
567 | 567 | } |
568 | 568 | }; |
569 | 569 | <?php } ?> |
570 | - <?php if($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
570 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
571 | 571 | |
572 | 572 | document.getElementById('treeMenu_openfiles').onclick = function(e) { |
573 | 573 | e.preventDefault(); |
574 | 574 | if (modx.config.global_tabs && !e.shiftKey) { |
575 | - modx.tabs({url: '<?= MODX_MANAGER_URL . 'media/browser/' . $which_browser . '/browse.php?filemanager=media/browser/' . $which_browser . '/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
575 | + modx.tabs({url: '<?= MODX_MANAGER_URL.'media/browser/'.$which_browser.'/browse.php?filemanager=media/browser/'.$which_browser.'/browse.php&type=files' ?>', title: '<?= $_lang["files_files"] ?>'}); |
|
576 | 576 | } else { |
577 | 577 | var randomNum = '<?= $_lang["files_files"] ?>'; |
578 | 578 | if (e.shiftKey) { |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | |
627 | 627 | </div> |
628 | 628 | <?php if ($modx->config['show_picker'] != "0") { |
629 | - include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
|
629 | + include('media/style/'.$modx->config['manager_theme'].'/color.switcher.php'); |
|
630 | 630 | } ?> |
631 | 631 | </body> |
632 | 632 | </html> |
@@ -1,5 +1,5 @@ discard block |
||
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 | header("X-XSS-Protection: 0"); |
@@ -11,22 +11,22 @@ discard block |
||
11 | 11 | |
12 | 12 | $mxla = $modx_lang_attribute ? $modx_lang_attribute : 'en'; |
13 | 13 | |
14 | -if (!isset($modx->config['manager_menu_height'])) { |
|
14 | +if (!isset($modx->config['manager_menu_height'])) { |
|
15 | 15 | $modx->config['manager_menu_height'] = 2.2; // rem |
16 | 16 | } |
17 | 17 | |
18 | -if (!isset($modx->config['manager_tree_width'])) { |
|
18 | +if (!isset($modx->config['manager_tree_width'])) { |
|
19 | 19 | $modx->config['manager_tree_width'] = 20; // rem |
20 | 20 | } |
21 | 21 | |
22 | -if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
22 | +if (isset($_SESSION['onLoginForwardToAction']) && is_int($_SESSION['onLoginForwardToAction'])) { |
|
23 | 23 | $initMainframeAction = $_SESSION['onLoginForwardToAction']; |
24 | 24 | unset($_SESSION['onLoginForwardToAction']); |
25 | -} else { |
|
25 | +} else { |
|
26 | 26 | $initMainframeAction = 2; // welcome.static |
27 | 27 | } |
28 | 28 | |
29 | -if (!isset($_SESSION['tree_show_only_folders'])) { |
|
29 | +if (!isset($_SESSION['tree_show_only_folders'])) { |
|
30 | 30 | $_SESSION['tree_show_only_folders'] = 0; |
31 | 31 | } |
32 | 32 | |
@@ -35,21 +35,21 @@ discard block |
||
35 | 35 | $tree_width = $modx->config['manager_tree_width']; |
36 | 36 | $tree_min_width = 0; |
37 | 37 | |
38 | -if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
38 | +if (isset($_COOKIE['MODX_widthSideBar'])) { |
|
39 | 39 | $MODX_widthSideBar = $_COOKIE['MODX_widthSideBar']; |
40 | -} else { |
|
40 | +} else { |
|
41 | 41 | $MODX_widthSideBar = $tree_width; |
42 | 42 | } |
43 | 43 | |
44 | -if (!$MODX_widthSideBar) { |
|
44 | +if (!$MODX_widthSideBar) { |
|
45 | 45 | $body_class .= 'sidebar-closed'; |
46 | 46 | } |
47 | 47 | |
48 | -if (isset($_COOKIE['MODX_themeColor'])) { |
|
48 | +if (isset($_COOKIE['MODX_themeColor'])) { |
|
49 | 49 | $body_class .= ' ' . $_COOKIE['MODX_themeColor']; |
50 | 50 | } |
51 | 51 | |
52 | -if (isset($modx->pluginCache['ElementsInTree'])) { |
|
52 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
53 | 53 | $body_class .= ' ElementsInTree'; |
54 | 54 | } |
55 | 55 | |
@@ -65,19 +65,19 @@ discard block |
||
65 | 65 | 'type8' => $_lang["lock_element_type_8"] |
66 | 66 | ); |
67 | 67 | |
68 | -foreach ($unlockTranslations as $key => $value) { |
|
68 | +foreach ($unlockTranslations as $key => $value) { |
|
69 | 69 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
70 | 70 | } |
71 | 71 | |
72 | 72 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
73 | -if ($user['which_browser'] == 'default') { |
|
73 | +if ($user['which_browser'] == 'default') { |
|
74 | 74 | $user['which_browser'] = $modx->config['which_browser']; |
75 | 75 | } |
76 | 76 | |
77 | 77 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
78 | 78 | |
79 | -if ($modx->config['manager_theme'] == 'default') { |
|
80 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
79 | +if ($modx->config['manager_theme'] == 'default') { |
|
80 | + if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
81 | 81 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
82 | 82 | $minifier = new Formatter\CSSMinify(); |
83 | 83 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $css = $minifier->minify(); |
95 | 95 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
96 | 96 | } |
97 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
97 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
98 | 98 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
99 | 99 | } |
100 | 100 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | <?php |
249 | 249 | // invoke OnManagerTopPrerender event |
250 | 250 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST); |
251 | - if (is_array($evtOut)) { |
|
251 | + if (is_array($evtOut)) { |
|
252 | 252 | echo implode("\n", $evtOut); |
253 | 253 | } |
254 | 254 | ?> |
@@ -419,9 +419,12 @@ discard block |
||
419 | 419 | <div id="evo-tab-page-home" class="evo-tab-page show"> |
420 | 420 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
421 | 421 | </div> |
422 | - <?php else: ?> |
|
422 | + <?php else { |
|
423 | + : ?> |
|
423 | 424 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
424 | - <?php endif; ?> |
|
425 | + <?php endif; |
|
426 | +} |
|
427 | +?> |
|
425 | 428 | <div id="mainloader"></div> |
426 | 429 | </div> |
427 | 430 | <div id="resizer"></div> |
@@ -434,11 +437,11 @@ discard block |
||
434 | 437 | 'tree_sortdir', |
435 | 438 | 'tree_nodename' |
436 | 439 | ); |
437 | - foreach ($sortParams as $param) { |
|
438 | - if (isset($_REQUEST[$param])) { |
|
440 | + foreach ($sortParams as $param) { |
|
441 | + if (isset($_REQUEST[$param])) { |
|
439 | 442 | $modx->manager->saveLastUserSetting($param, $_REQUEST[$param]); |
440 | 443 | $_SESSION[$param] = $_REQUEST[$param]; |
441 | - } else if (!isset($_SESSION[$param])) { |
|
444 | + } else if (!isset($_SESSION[$param])) { |
|
442 | 445 | $_SESSION[$param] = $modx->manager->getLastUserSetting($param); |
443 | 446 | } |
444 | 447 | } |
@@ -518,9 +521,9 @@ discard block |
||
518 | 521 | </div> |
519 | 522 | |
520 | 523 | <?php |
521 | - function constructLink($action, $img, $text, $allowed) |
|
522 | - { |
|
523 | - if ($allowed == 1) { |
|
524 | + function constructLink($action, $img, $text, $allowed) |
|
525 | + { |
|
526 | + if ($allowed == 1) { |
|
524 | 527 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action, $action); |
525 | 528 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text); |
526 | 529 | } |
@@ -625,7 +628,7 @@ discard block |
||
625 | 628 | ?> |
626 | 629 | |
627 | 630 | </div> |
628 | -<?php if ($modx->config['show_picker'] != "0") { |
|
631 | +<?php if ($modx->config['show_picker'] != "0") { |
|
629 | 632 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php'); |
630 | 633 | } ?> |
631 | 634 | </body> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
|
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 | /** |
@@ -11,575 +11,575 @@ discard block |
||
11 | 11 | * @param string $hereid |
12 | 12 | */ |
13 | 13 | function makeHTML($indent, $parent, $expandAll, $theme, $hereid = '') { |
14 | - global $modx; |
|
15 | - global $icons, $iconsPrivate, $_style; |
|
16 | - global $_lang, $opened, $opened2, $closed2; //added global vars |
|
17 | - global $modx_textdir; |
|
18 | - |
|
19 | - $output = ''; |
|
20 | - |
|
21 | - // setup spacer |
|
22 | - $level = 0; |
|
23 | - $spacer = '<span class="indent">'; |
|
24 | - for($i = 2; $i <= $indent; $i++) { |
|
25 | - $spacer .= '<i></i>'; |
|
26 | - $level++; |
|
27 | - } |
|
28 | - $spacer .= '</span>'; |
|
29 | - |
|
30 | - // manage order-by |
|
31 | - if(!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) { |
|
32 | - // This is the first startup, set default sort order |
|
33 | - $_SESSION['tree_sortby'] = 'menuindex'; |
|
34 | - $_SESSION['tree_sortdir'] = 'ASC'; |
|
35 | - } |
|
36 | - |
|
37 | - switch($_SESSION['tree_sortby']) { |
|
38 | - case 'createdon': |
|
39 | - case 'editedon': |
|
40 | - case 'publishedon': |
|
41 | - case 'pub_date': |
|
42 | - case 'unpub_date': |
|
43 | - $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.' . $_SESSION['tree_sortby'], 'sc.' . $_SESSION['tree_sortby']); |
|
44 | - break; |
|
45 | - default: |
|
46 | - $sortby = 'sc.' . $_SESSION['tree_sortby']; |
|
47 | - }; |
|
48 | - |
|
49 | - $orderby = $modx->db->escape($sortby . ' ' . $_SESSION['tree_sortdir']); |
|
50 | - |
|
51 | - // Folder sorting gets special setup ;) Add menuindex and pagetitle |
|
52 | - if($_SESSION['tree_sortby'] == 'isfolder') { |
|
53 | - $orderby .= ', menuindex ASC, pagetitle'; |
|
54 | - } |
|
55 | - |
|
56 | - $tblsc = $modx->getFullTableName('site_content'); |
|
57 | - $tbldg = $modx->getFullTableName('document_groups'); |
|
58 | - $tblst = $modx->getFullTableName('site_templates'); |
|
59 | - // get document groups for current user |
|
60 | - $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
|
61 | - $showProtected = false; |
|
62 | - if(isset ($modx->config['tree_show_protected'])) { |
|
63 | - $showProtected = (boolean) $modx->config['tree_show_protected']; |
|
64 | - } |
|
65 | - $mgrRole = (isset ($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
66 | - if($showProtected == false) { |
|
67 | - $access = "AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
68 | - } else { |
|
69 | - $access = ''; |
|
70 | - } |
|
71 | - $docgrp_cond = $docgrp ? "OR dg.document_group IN ({$docgrp})" : ''; |
|
72 | - $field = "DISTINCT sc.id, pagetitle, longtitle, menutitle, parent, isfolder, published, pub_date, unpub_date, richtext, searchable, cacheable, deleted, type, template, templatename, menuindex, donthit, hidemenu, alias, contentType, privateweb, privatemgr, |
|
14 | + global $modx; |
|
15 | + global $icons, $iconsPrivate, $_style; |
|
16 | + global $_lang, $opened, $opened2, $closed2; //added global vars |
|
17 | + global $modx_textdir; |
|
18 | + |
|
19 | + $output = ''; |
|
20 | + |
|
21 | + // setup spacer |
|
22 | + $level = 0; |
|
23 | + $spacer = '<span class="indent">'; |
|
24 | + for($i = 2; $i <= $indent; $i++) { |
|
25 | + $spacer .= '<i></i>'; |
|
26 | + $level++; |
|
27 | + } |
|
28 | + $spacer .= '</span>'; |
|
29 | + |
|
30 | + // manage order-by |
|
31 | + if(!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) { |
|
32 | + // This is the first startup, set default sort order |
|
33 | + $_SESSION['tree_sortby'] = 'menuindex'; |
|
34 | + $_SESSION['tree_sortdir'] = 'ASC'; |
|
35 | + } |
|
36 | + |
|
37 | + switch($_SESSION['tree_sortby']) { |
|
38 | + case 'createdon': |
|
39 | + case 'editedon': |
|
40 | + case 'publishedon': |
|
41 | + case 'pub_date': |
|
42 | + case 'unpub_date': |
|
43 | + $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.' . $_SESSION['tree_sortby'], 'sc.' . $_SESSION['tree_sortby']); |
|
44 | + break; |
|
45 | + default: |
|
46 | + $sortby = 'sc.' . $_SESSION['tree_sortby']; |
|
47 | + }; |
|
48 | + |
|
49 | + $orderby = $modx->db->escape($sortby . ' ' . $_SESSION['tree_sortdir']); |
|
50 | + |
|
51 | + // Folder sorting gets special setup ;) Add menuindex and pagetitle |
|
52 | + if($_SESSION['tree_sortby'] == 'isfolder') { |
|
53 | + $orderby .= ', menuindex ASC, pagetitle'; |
|
54 | + } |
|
55 | + |
|
56 | + $tblsc = $modx->getFullTableName('site_content'); |
|
57 | + $tbldg = $modx->getFullTableName('document_groups'); |
|
58 | + $tblst = $modx->getFullTableName('site_templates'); |
|
59 | + // get document groups for current user |
|
60 | + $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
|
61 | + $showProtected = false; |
|
62 | + if(isset ($modx->config['tree_show_protected'])) { |
|
63 | + $showProtected = (boolean) $modx->config['tree_show_protected']; |
|
64 | + } |
|
65 | + $mgrRole = (isset ($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0'; |
|
66 | + if($showProtected == false) { |
|
67 | + $access = "AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
68 | + } else { |
|
69 | + $access = ''; |
|
70 | + } |
|
71 | + $docgrp_cond = $docgrp ? "OR dg.document_group IN ({$docgrp})" : ''; |
|
72 | + $field = "DISTINCT sc.id, pagetitle, longtitle, menutitle, parent, isfolder, published, pub_date, unpub_date, richtext, searchable, cacheable, deleted, type, template, templatename, menuindex, donthit, hidemenu, alias, contentType, privateweb, privatemgr, |
|
73 | 73 | MAX(IF(1={$mgrRole} OR sc.privatemgr=0 {$docgrp_cond}, 1, 0)) AS hasAccess, GROUP_CONCAT(document_group SEPARATOR ',') AS roles"; |
74 | - $from = "{$tblsc} AS sc LEFT JOIN {$tbldg} dg on dg.document = sc.id LEFT JOIN {$tblst} st on st.id = sc.template"; |
|
75 | - $where = "(parent={$parent}) {$access} GROUP BY sc.id"; |
|
76 | - $result = $modx->db->select($field, $from, $where, $orderby); |
|
77 | - if($modx->db->getRecordCount($result) == 0) { |
|
78 | - $output .= sprintf('<div><a class="empty">%s%s <span class="empty">%s</span></a></div>', $spacer, $_style['tree_deletedpage'], $_lang['empty_folder']); |
|
79 | - } |
|
80 | - |
|
81 | - $nodeNameSource = $_SESSION['tree_nodename'] == 'default' ? $modx->config['resource_tree_node_name'] : $_SESSION['tree_nodename']; |
|
82 | - |
|
83 | - while($row = $modx->db->getRow($result)) { |
|
84 | - $node = ''; |
|
85 | - |
|
86 | - $nodetitle = getNodeTitle($nodeNameSource, $row); |
|
87 | - $nodetitleDisplay = $nodetitle; |
|
88 | - |
|
89 | - $treeNodeClass = 'node'; |
|
90 | - $treeNodeClass .= $row['hasAccess'] == 0 ? ' protected' : ''; |
|
91 | - |
|
92 | - if($row['deleted'] == 1) { |
|
93 | - $treeNodeClass .= ' deleted'; |
|
94 | - //$nodetitleDisplay = sprintf('<span class="deletedNode">%s</span>', $nodetitle); |
|
95 | - } elseif($row['published'] == 0) { |
|
96 | - $treeNodeClass .= ' unpublished'; |
|
97 | - //$nodetitleDisplay = sprintf('<span class="unpublishedNode">%s</span>', $nodetitle); |
|
98 | - } elseif($row['hidemenu'] == 1) { |
|
99 | - $treeNodeClass .= ' hidemenu'; |
|
100 | - //$nodetitleDisplay = sprintf('<span class="notInMenuNode%s">%s</span>', $protectedClass, $nodetitle); |
|
101 | - } else { |
|
102 | - //$nodetitleDisplay = sprintf('<span class="publishedNode%s">%s</span>', $protectedClass, $nodetitle); |
|
103 | - } |
|
104 | - |
|
105 | - if($row['id'] == $hereid) { |
|
106 | - $treeNodeClass .= ' current'; |
|
107 | - } |
|
108 | - |
|
109 | - $weblinkDisplay = $row['type'] == 'reference' ? sprintf(' %s', $_style['tree_linkgo']) : ''; |
|
110 | - $pageIdDisplay = '<small>(' . ($modx_textdir ? '‏' : '') . $row['id'] . ')</small>'; |
|
111 | - |
|
112 | - // Prepare displaying user-locks |
|
113 | - $lockedByUser = ''; |
|
114 | - $rowLock = $modx->elementIsLocked(7, $row['id'], true); |
|
115 | - if($rowLock && $modx->hasPermission('display_locks')) { |
|
116 | - if($rowLock['sid'] == $modx->sid) { |
|
117 | - $title = $modx->parseText($_lang["lock_element_editing"], array( |
|
118 | - 'element_type' => $_lang["lock_element_type_7"], |
|
119 | - 'lasthit_df' => $rowLock['lasthit_df'] |
|
120 | - )); |
|
121 | - $lockedByUser = '<span title="' . $title . '" class="editResource">' . $_style['tree_preview_resource'] . '</span>'; |
|
122 | - } else { |
|
123 | - $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
|
124 | - 'element_type' => $_lang["lock_element_type_7"], |
|
125 | - 'username' => $rowLock['username'], |
|
126 | - 'lasthit_df' => $rowLock['lasthit_df'] |
|
127 | - )); |
|
128 | - if($modx->hasPermission('remove_locks')) { |
|
129 | - $lockedByUser = '<span onclick="modx.tree.unlockElement(7, ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
130 | - } else { |
|
131 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
132 | - } |
|
133 | - } |
|
134 | - } |
|
135 | - |
|
136 | - $url = $modx->makeUrl($row['id']); |
|
137 | - |
|
138 | - $title = ''; |
|
139 | - if(isDateNode($nodeNameSource)) { |
|
140 | - $title = $_lang['pagetitle'] . ': ' . $row['pagetitle'] . '[+lf+]'; |
|
141 | - } |
|
142 | - $title .= $_lang['id'] . ': ' . $row['id']; |
|
143 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_title'] . ': ' . $row['menutitle']; |
|
144 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_index'] . ': ' . $row['menuindex']; |
|
145 | - $title .= '[+lf+]' . $_lang['alias'] . ': ' . (!empty($row['alias']) ? $row['alias'] : '-'); |
|
146 | - $title .= '[+lf+]' . $_lang['template'] . ': ' . $row['templatename']; |
|
147 | - $title .= '[+lf+]' . $_lang['publish_date'] . ': ' . $modx->toDateFormat($row['pub_date']); |
|
148 | - $title .= '[+lf+]' . $_lang['unpublish_date'] . ': ' . $modx->toDateFormat($row['unpub_date']); |
|
149 | - $title .= '[+lf+]' . $_lang['page_data_web_access'] . ': ' . ($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
150 | - $title .= '[+lf+]' . $_lang['page_data_mgr_access'] . ': ' . ($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
151 | - $title .= '[+lf+]' . $_lang['resource_opt_richtext'] . ': ' . ($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
152 | - $title .= '[+lf+]' . $_lang['page_data_searchable'] . ': ' . ($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
153 | - $title .= '[+lf+]' . $_lang['page_data_cacheable'] . ': ' . ($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
154 | - $title = $modx->htmlspecialchars($title); |
|
155 | - $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
156 | - |
|
157 | - $data = array( |
|
158 | - 'id' => $row['id'], |
|
159 | - 'pagetitle' => $row['pagetitle'], |
|
160 | - 'longtitle' => $row['longtitle'], |
|
161 | - 'menutitle' => $row['menutitle'], |
|
162 | - 'parent' => $parent, |
|
163 | - 'isfolder' => $row['isfolder'], |
|
164 | - 'published' => $row['published'], |
|
165 | - 'deleted' => $row['deleted'], |
|
166 | - 'type' => $row['type'], |
|
167 | - 'menuindex' => $row['menuindex'], |
|
168 | - 'donthit' => $row['donthit'], |
|
169 | - 'hidemenu' => $row['hidemenu'], |
|
170 | - 'alias' => $row['alias'], |
|
171 | - 'contenttype' => $row['contentType'], |
|
172 | - 'privateweb' => $row['privateweb'], |
|
173 | - 'privatemgr' => $row['privatemgr'], |
|
174 | - 'hasAccess' => $row['hasAccess'], |
|
175 | - 'template' => $row['template'], |
|
176 | - 'nodetitle' => $nodetitle, |
|
177 | - 'url' => $url, |
|
178 | - 'title' => $title, |
|
179 | - 'nodetitleDisplay' => $nodetitleDisplay, |
|
180 | - 'weblinkDisplay' => $weblinkDisplay, |
|
181 | - 'pageIdDisplay' => $pageIdDisplay, |
|
182 | - 'lockedByUser' => $lockedByUser, |
|
183 | - 'treeNodeClass' => $treeNodeClass, |
|
184 | - 'treeNodeSelected' => $row['id'] == $hereid ? ' treeNodeSelected' : '', |
|
185 | - 'tree_page_click' => $modx->config['tree_page_click'], |
|
186 | - 'showChildren' => 1, |
|
187 | - 'openFolder' => 1, |
|
188 | - 'contextmenu' => '', |
|
189 | - 'tree_minusnode' => $_style['tree_minusnode'], |
|
190 | - 'tree_plusnode' => $_style['tree_plusnode'], |
|
191 | - 'spacer' => $spacer, |
|
192 | - 'subMenuState' => '', |
|
193 | - 'level' => $level, |
|
194 | - 'isPrivate' => 0, |
|
195 | - 'roles' => ($row['roles'] ? $row['roles'] : '') |
|
196 | - ); |
|
197 | - |
|
198 | - $ph = $data; |
|
199 | - $ph['nodetitle_esc'] = addslashes($nodetitle); |
|
200 | - $ph['indent'] = $indent + 1; |
|
201 | - $ph['expandAll'] = $expandAll; |
|
202 | - $ph['isPrivate'] = ($row['privateweb'] || $row['privatemgr']) ? 1 : 0; |
|
203 | - |
|
204 | - if(!$row['isfolder']) { |
|
205 | - $tpl = getTplSingleNode(); |
|
206 | - switch($row['id']) { |
|
207 | - case $modx->config['site_start'] : |
|
208 | - $icon = $_style['tree_page_home']; |
|
209 | - break; |
|
210 | - case $modx->config['error_page'] : |
|
211 | - $icon = $_style['tree_page_404']; |
|
212 | - break; |
|
213 | - case $modx->config['site_unavailable_page'] : |
|
214 | - $icon = $_style['tree_page_hourglass']; |
|
215 | - break; |
|
216 | - case $modx->config['unauthorized_page'] : |
|
217 | - $icon = $_style['tree_page_info']; |
|
218 | - break; |
|
219 | - default: |
|
220 | - if(isset($icons[$row['contentType']])) { |
|
221 | - $icon = $icons[$row['contentType']]; |
|
222 | - } else { |
|
223 | - $icon = $_style['tree_page']; |
|
224 | - } |
|
225 | - } |
|
226 | - $ph['icon'] = $icon; |
|
227 | - |
|
228 | - // invoke OnManagerNodePrerender event |
|
229 | - $prenode = $modx->invokeEvent("OnManagerNodePrerender", array('ph' => $ph)); |
|
230 | - if(is_array($prenode)) { |
|
231 | - $phnew = array(); |
|
232 | - foreach($prenode as $pnode) { |
|
233 | - $phnew = array_merge($phnew, unserialize($pnode)); |
|
234 | - } |
|
235 | - $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
236 | - } |
|
237 | - |
|
238 | - if($ph['contextmenu']) { |
|
239 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
240 | - } |
|
241 | - |
|
242 | - if($_SESSION['tree_show_only_folders']) { |
|
243 | - if($row['parent'] == 0) { |
|
244 | - $node .= $modx->parseText($tpl, $ph); |
|
245 | - } else { |
|
246 | - $node .= ''; |
|
247 | - } |
|
248 | - } else { |
|
249 | - $node .= $modx->parseText($tpl, $ph); |
|
250 | - } |
|
251 | - |
|
252 | - } else { |
|
253 | - $ph['icon_folder_open'] = $_style['tree_folderopen_new']; |
|
254 | - $ph['icon_folder_close'] = $_style['tree_folder_new']; |
|
255 | - |
|
256 | - if($_SESSION['tree_show_only_folders']) { |
|
257 | - $tpl = getTplFolderNodeNotChildren(); |
|
258 | - $checkFolders = checkIsFolder($row['id'], 1) ? 1 : 0; // folders |
|
259 | - $checkDocs = checkIsFolder($row['id'], 0) ? 1 : 0; // no folders |
|
260 | - $ph['tree_page_click'] = 3; |
|
261 | - |
|
262 | - // expandAll: two type for partial expansion |
|
263 | - if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
264 | - if($expandAll == 1) { |
|
265 | - $opened2[] = $row['id']; |
|
266 | - } |
|
267 | - $ph['icon'] = $ph['icon_folder_open']; |
|
268 | - $ph['icon_node_toggle'] = $ph['tree_minusnode']; |
|
269 | - $ph['node_toggle'] = 1; |
|
270 | - $ph['subMenuState'] = ' open'; |
|
271 | - |
|
272 | - if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
273 | - $ph['showChildren'] = 1; |
|
274 | - $ph['icon_node_toggle'] = ''; |
|
275 | - $ph['icon'] = $ph['icon_folder_close']; |
|
276 | - } elseif(!$checkDocs && $checkFolders) { |
|
277 | - $ph['showChildren'] = 0; |
|
278 | - $ph['openFolder'] = 2; |
|
279 | - } else { |
|
280 | - $ph['openFolder'] = 2; |
|
281 | - } |
|
282 | - |
|
283 | - // invoke OnManagerNodePrerender event |
|
284 | - $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
285 | - 'ph' => $ph, |
|
286 | - 'opened' => '1' |
|
287 | - )); |
|
288 | - if(is_array($prenode)) { |
|
289 | - $phnew = array(); |
|
290 | - foreach($prenode as $pnode) { |
|
291 | - $phnew = array_merge($phnew, unserialize($pnode)); |
|
292 | - } |
|
293 | - $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
294 | - } |
|
295 | - |
|
296 | - if($ph['contextmenu']) { |
|
297 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
298 | - } |
|
299 | - |
|
300 | - $node .= $modx->parseText($tpl, $ph); |
|
301 | - if($checkFolders) { |
|
302 | - $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
|
303 | - } |
|
304 | - $node .= '</div></div>'; |
|
305 | - } else { |
|
306 | - $closed2[] = $row['id']; |
|
307 | - $ph['icon'] = $ph['icon_folder_close']; |
|
308 | - $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
|
309 | - $ph['node_toggle'] = 0; |
|
310 | - |
|
311 | - if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
312 | - $ph['showChildren'] = 1; |
|
313 | - $ph['icon_node_toggle'] = ''; |
|
314 | - } elseif(!$checkDocs && $checkFolders) { |
|
315 | - $ph['showChildren'] = 0; |
|
316 | - $ph['openFolder'] = 2; |
|
317 | - } else { |
|
318 | - $ph['openFolder'] = 2; |
|
319 | - } |
|
320 | - |
|
321 | - // invoke OnManagerNodePrerender event |
|
322 | - $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
323 | - 'ph' => $ph, |
|
324 | - 'opened' => '0' |
|
325 | - )); |
|
326 | - if(is_array($prenode)) { |
|
327 | - $phnew = array(); |
|
328 | - foreach($prenode as $pnode) { |
|
329 | - $phnew = array_merge($phnew, unserialize($pnode)); |
|
330 | - } |
|
331 | - $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
332 | - } |
|
333 | - |
|
334 | - if($ph['contextmenu']) { |
|
335 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
336 | - } |
|
337 | - |
|
338 | - $node .= $modx->parseText($tpl, $ph); |
|
339 | - $node .= '</div></div>'; |
|
340 | - } |
|
341 | - } else { |
|
342 | - $tpl = getTplFolderNode(); |
|
343 | - // expandAll: two type for partial expansion |
|
344 | - if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
345 | - if($expandAll == 1) { |
|
346 | - $opened2[] = $row['id']; |
|
347 | - } |
|
348 | - $ph['icon'] = $ph['icon_folder_open']; |
|
349 | - $ph['icon_node_toggle'] = $ph['tree_minusnode']; |
|
350 | - $ph['node_toggle'] = 1; |
|
351 | - $ph['subMenuState'] = ' open'; |
|
352 | - |
|
353 | - if($ph['donthit'] == 1) { |
|
354 | - $ph['tree_page_click'] = 3; |
|
355 | - $ph['icon_node_toggle'] = ''; |
|
356 | - $ph['icon'] = $ph['icon_folder_close']; |
|
357 | - $ph['showChildren'] = 0; |
|
358 | - } |
|
359 | - |
|
360 | - // invoke OnManagerNodePrerender event |
|
361 | - $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
362 | - 'ph' => $ph, |
|
363 | - 'opened' => '1' |
|
364 | - )); |
|
365 | - if(is_array($prenode)) { |
|
366 | - $phnew = array(); |
|
367 | - foreach($prenode as $pnode) { |
|
368 | - $phnew = array_merge($phnew, unserialize($pnode)); |
|
369 | - } |
|
370 | - $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
371 | - if($ph['showChildren'] == 0) { |
|
372 | - unset($opened2[$row['id']]); |
|
373 | - $ph['node_toggle'] = 0; |
|
374 | - $ph['subMenuState'] = ''; |
|
375 | - } |
|
376 | - } |
|
377 | - |
|
378 | - if($ph['showChildren'] == 0) { |
|
379 | - $ph['icon_node_toggle'] = ''; |
|
380 | - $ph['donthit'] = 1; |
|
381 | - $ph['icon'] = $ph['icon_folder_close']; |
|
382 | - $tpl = getTplFolderNodeNotChildren(); |
|
383 | - } |
|
384 | - |
|
385 | - if($ph['contextmenu']) { |
|
386 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
387 | - } |
|
388 | - |
|
389 | - $node .= $modx->parseText($tpl, $ph); |
|
390 | - if($ph['donthit'] == 0) { |
|
391 | - $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
|
392 | - } |
|
393 | - $node .= '</div></div>'; |
|
394 | - } else { |
|
395 | - $closed2[] = $row['id']; |
|
396 | - $ph['icon'] = $ph['icon_folder_close']; |
|
397 | - $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
|
398 | - $ph['node_toggle'] = 0; |
|
399 | - |
|
400 | - if($ph['donthit'] == 1) { |
|
401 | - $ph['tree_page_click'] = 3; |
|
402 | - $ph['icon_node_toggle'] = ''; |
|
403 | - $ph['icon'] = $ph['icon_folder_close']; |
|
404 | - $ph['showChildren'] = 0; |
|
405 | - } |
|
406 | - |
|
407 | - // invoke OnManagerNodePrerender event |
|
408 | - $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
409 | - 'ph' => $ph, |
|
410 | - 'opened' => '0' |
|
411 | - )); |
|
412 | - if(is_array($prenode)) { |
|
413 | - $phnew = array(); |
|
414 | - foreach($prenode as $pnode) { |
|
415 | - $phnew = array_merge($phnew, unserialize($pnode)); |
|
416 | - } |
|
417 | - $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
418 | - } |
|
419 | - |
|
420 | - if($ph['showChildren'] == 0) { |
|
421 | - $ph['icon_node_toggle'] = ''; |
|
422 | - $ph['donthit'] = 1; |
|
423 | - $ph['icon'] = $ph['icon_folder_close']; |
|
424 | - $tpl = getTplFolderNodeNotChildren(); |
|
425 | - } |
|
426 | - |
|
427 | - if($ph['contextmenu']) { |
|
428 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
429 | - } |
|
430 | - |
|
431 | - $node .= $modx->parseText($tpl, $ph); |
|
432 | - $node .= '</div></div>'; |
|
433 | - } |
|
434 | - } |
|
435 | - } |
|
436 | - |
|
437 | - // invoke OnManagerNodeRender event |
|
438 | - $data['node'] = $node; |
|
439 | - $evtOut = $modx->invokeEvent('OnManagerNodeRender', $data); |
|
440 | - if(is_array($evtOut)) { |
|
441 | - $evtOut = implode("\n", $evtOut); |
|
442 | - } |
|
443 | - if($evtOut != '') { |
|
444 | - $node = trim($evtOut); |
|
445 | - } |
|
446 | - |
|
447 | - $output .= $node; |
|
448 | - } |
|
449 | - |
|
450 | - return $output; |
|
74 | + $from = "{$tblsc} AS sc LEFT JOIN {$tbldg} dg on dg.document = sc.id LEFT JOIN {$tblst} st on st.id = sc.template"; |
|
75 | + $where = "(parent={$parent}) {$access} GROUP BY sc.id"; |
|
76 | + $result = $modx->db->select($field, $from, $where, $orderby); |
|
77 | + if($modx->db->getRecordCount($result) == 0) { |
|
78 | + $output .= sprintf('<div><a class="empty">%s%s <span class="empty">%s</span></a></div>', $spacer, $_style['tree_deletedpage'], $_lang['empty_folder']); |
|
79 | + } |
|
80 | + |
|
81 | + $nodeNameSource = $_SESSION['tree_nodename'] == 'default' ? $modx->config['resource_tree_node_name'] : $_SESSION['tree_nodename']; |
|
82 | + |
|
83 | + while($row = $modx->db->getRow($result)) { |
|
84 | + $node = ''; |
|
85 | + |
|
86 | + $nodetitle = getNodeTitle($nodeNameSource, $row); |
|
87 | + $nodetitleDisplay = $nodetitle; |
|
88 | + |
|
89 | + $treeNodeClass = 'node'; |
|
90 | + $treeNodeClass .= $row['hasAccess'] == 0 ? ' protected' : ''; |
|
91 | + |
|
92 | + if($row['deleted'] == 1) { |
|
93 | + $treeNodeClass .= ' deleted'; |
|
94 | + //$nodetitleDisplay = sprintf('<span class="deletedNode">%s</span>', $nodetitle); |
|
95 | + } elseif($row['published'] == 0) { |
|
96 | + $treeNodeClass .= ' unpublished'; |
|
97 | + //$nodetitleDisplay = sprintf('<span class="unpublishedNode">%s</span>', $nodetitle); |
|
98 | + } elseif($row['hidemenu'] == 1) { |
|
99 | + $treeNodeClass .= ' hidemenu'; |
|
100 | + //$nodetitleDisplay = sprintf('<span class="notInMenuNode%s">%s</span>', $protectedClass, $nodetitle); |
|
101 | + } else { |
|
102 | + //$nodetitleDisplay = sprintf('<span class="publishedNode%s">%s</span>', $protectedClass, $nodetitle); |
|
103 | + } |
|
104 | + |
|
105 | + if($row['id'] == $hereid) { |
|
106 | + $treeNodeClass .= ' current'; |
|
107 | + } |
|
108 | + |
|
109 | + $weblinkDisplay = $row['type'] == 'reference' ? sprintf(' %s', $_style['tree_linkgo']) : ''; |
|
110 | + $pageIdDisplay = '<small>(' . ($modx_textdir ? '‏' : '') . $row['id'] . ')</small>'; |
|
111 | + |
|
112 | + // Prepare displaying user-locks |
|
113 | + $lockedByUser = ''; |
|
114 | + $rowLock = $modx->elementIsLocked(7, $row['id'], true); |
|
115 | + if($rowLock && $modx->hasPermission('display_locks')) { |
|
116 | + if($rowLock['sid'] == $modx->sid) { |
|
117 | + $title = $modx->parseText($_lang["lock_element_editing"], array( |
|
118 | + 'element_type' => $_lang["lock_element_type_7"], |
|
119 | + 'lasthit_df' => $rowLock['lasthit_df'] |
|
120 | + )); |
|
121 | + $lockedByUser = '<span title="' . $title . '" class="editResource">' . $_style['tree_preview_resource'] . '</span>'; |
|
122 | + } else { |
|
123 | + $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
|
124 | + 'element_type' => $_lang["lock_element_type_7"], |
|
125 | + 'username' => $rowLock['username'], |
|
126 | + 'lasthit_df' => $rowLock['lasthit_df'] |
|
127 | + )); |
|
128 | + if($modx->hasPermission('remove_locks')) { |
|
129 | + $lockedByUser = '<span onclick="modx.tree.unlockElement(7, ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
130 | + } else { |
|
131 | + $lockedByUser = '<span title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
132 | + } |
|
133 | + } |
|
134 | + } |
|
135 | + |
|
136 | + $url = $modx->makeUrl($row['id']); |
|
137 | + |
|
138 | + $title = ''; |
|
139 | + if(isDateNode($nodeNameSource)) { |
|
140 | + $title = $_lang['pagetitle'] . ': ' . $row['pagetitle'] . '[+lf+]'; |
|
141 | + } |
|
142 | + $title .= $_lang['id'] . ': ' . $row['id']; |
|
143 | + $title .= '[+lf+]' . $_lang['resource_opt_menu_title'] . ': ' . $row['menutitle']; |
|
144 | + $title .= '[+lf+]' . $_lang['resource_opt_menu_index'] . ': ' . $row['menuindex']; |
|
145 | + $title .= '[+lf+]' . $_lang['alias'] . ': ' . (!empty($row['alias']) ? $row['alias'] : '-'); |
|
146 | + $title .= '[+lf+]' . $_lang['template'] . ': ' . $row['templatename']; |
|
147 | + $title .= '[+lf+]' . $_lang['publish_date'] . ': ' . $modx->toDateFormat($row['pub_date']); |
|
148 | + $title .= '[+lf+]' . $_lang['unpublish_date'] . ': ' . $modx->toDateFormat($row['unpub_date']); |
|
149 | + $title .= '[+lf+]' . $_lang['page_data_web_access'] . ': ' . ($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
150 | + $title .= '[+lf+]' . $_lang['page_data_mgr_access'] . ': ' . ($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
151 | + $title .= '[+lf+]' . $_lang['resource_opt_richtext'] . ': ' . ($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
152 | + $title .= '[+lf+]' . $_lang['page_data_searchable'] . ': ' . ($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
153 | + $title .= '[+lf+]' . $_lang['page_data_cacheable'] . ': ' . ($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
154 | + $title = $modx->htmlspecialchars($title); |
|
155 | + $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
156 | + |
|
157 | + $data = array( |
|
158 | + 'id' => $row['id'], |
|
159 | + 'pagetitle' => $row['pagetitle'], |
|
160 | + 'longtitle' => $row['longtitle'], |
|
161 | + 'menutitle' => $row['menutitle'], |
|
162 | + 'parent' => $parent, |
|
163 | + 'isfolder' => $row['isfolder'], |
|
164 | + 'published' => $row['published'], |
|
165 | + 'deleted' => $row['deleted'], |
|
166 | + 'type' => $row['type'], |
|
167 | + 'menuindex' => $row['menuindex'], |
|
168 | + 'donthit' => $row['donthit'], |
|
169 | + 'hidemenu' => $row['hidemenu'], |
|
170 | + 'alias' => $row['alias'], |
|
171 | + 'contenttype' => $row['contentType'], |
|
172 | + 'privateweb' => $row['privateweb'], |
|
173 | + 'privatemgr' => $row['privatemgr'], |
|
174 | + 'hasAccess' => $row['hasAccess'], |
|
175 | + 'template' => $row['template'], |
|
176 | + 'nodetitle' => $nodetitle, |
|
177 | + 'url' => $url, |
|
178 | + 'title' => $title, |
|
179 | + 'nodetitleDisplay' => $nodetitleDisplay, |
|
180 | + 'weblinkDisplay' => $weblinkDisplay, |
|
181 | + 'pageIdDisplay' => $pageIdDisplay, |
|
182 | + 'lockedByUser' => $lockedByUser, |
|
183 | + 'treeNodeClass' => $treeNodeClass, |
|
184 | + 'treeNodeSelected' => $row['id'] == $hereid ? ' treeNodeSelected' : '', |
|
185 | + 'tree_page_click' => $modx->config['tree_page_click'], |
|
186 | + 'showChildren' => 1, |
|
187 | + 'openFolder' => 1, |
|
188 | + 'contextmenu' => '', |
|
189 | + 'tree_minusnode' => $_style['tree_minusnode'], |
|
190 | + 'tree_plusnode' => $_style['tree_plusnode'], |
|
191 | + 'spacer' => $spacer, |
|
192 | + 'subMenuState' => '', |
|
193 | + 'level' => $level, |
|
194 | + 'isPrivate' => 0, |
|
195 | + 'roles' => ($row['roles'] ? $row['roles'] : '') |
|
196 | + ); |
|
197 | + |
|
198 | + $ph = $data; |
|
199 | + $ph['nodetitle_esc'] = addslashes($nodetitle); |
|
200 | + $ph['indent'] = $indent + 1; |
|
201 | + $ph['expandAll'] = $expandAll; |
|
202 | + $ph['isPrivate'] = ($row['privateweb'] || $row['privatemgr']) ? 1 : 0; |
|
203 | + |
|
204 | + if(!$row['isfolder']) { |
|
205 | + $tpl = getTplSingleNode(); |
|
206 | + switch($row['id']) { |
|
207 | + case $modx->config['site_start'] : |
|
208 | + $icon = $_style['tree_page_home']; |
|
209 | + break; |
|
210 | + case $modx->config['error_page'] : |
|
211 | + $icon = $_style['tree_page_404']; |
|
212 | + break; |
|
213 | + case $modx->config['site_unavailable_page'] : |
|
214 | + $icon = $_style['tree_page_hourglass']; |
|
215 | + break; |
|
216 | + case $modx->config['unauthorized_page'] : |
|
217 | + $icon = $_style['tree_page_info']; |
|
218 | + break; |
|
219 | + default: |
|
220 | + if(isset($icons[$row['contentType']])) { |
|
221 | + $icon = $icons[$row['contentType']]; |
|
222 | + } else { |
|
223 | + $icon = $_style['tree_page']; |
|
224 | + } |
|
225 | + } |
|
226 | + $ph['icon'] = $icon; |
|
227 | + |
|
228 | + // invoke OnManagerNodePrerender event |
|
229 | + $prenode = $modx->invokeEvent("OnManagerNodePrerender", array('ph' => $ph)); |
|
230 | + if(is_array($prenode)) { |
|
231 | + $phnew = array(); |
|
232 | + foreach($prenode as $pnode) { |
|
233 | + $phnew = array_merge($phnew, unserialize($pnode)); |
|
234 | + } |
|
235 | + $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
236 | + } |
|
237 | + |
|
238 | + if($ph['contextmenu']) { |
|
239 | + $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
240 | + } |
|
241 | + |
|
242 | + if($_SESSION['tree_show_only_folders']) { |
|
243 | + if($row['parent'] == 0) { |
|
244 | + $node .= $modx->parseText($tpl, $ph); |
|
245 | + } else { |
|
246 | + $node .= ''; |
|
247 | + } |
|
248 | + } else { |
|
249 | + $node .= $modx->parseText($tpl, $ph); |
|
250 | + } |
|
251 | + |
|
252 | + } else { |
|
253 | + $ph['icon_folder_open'] = $_style['tree_folderopen_new']; |
|
254 | + $ph['icon_folder_close'] = $_style['tree_folder_new']; |
|
255 | + |
|
256 | + if($_SESSION['tree_show_only_folders']) { |
|
257 | + $tpl = getTplFolderNodeNotChildren(); |
|
258 | + $checkFolders = checkIsFolder($row['id'], 1) ? 1 : 0; // folders |
|
259 | + $checkDocs = checkIsFolder($row['id'], 0) ? 1 : 0; // no folders |
|
260 | + $ph['tree_page_click'] = 3; |
|
261 | + |
|
262 | + // expandAll: two type for partial expansion |
|
263 | + if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
264 | + if($expandAll == 1) { |
|
265 | + $opened2[] = $row['id']; |
|
266 | + } |
|
267 | + $ph['icon'] = $ph['icon_folder_open']; |
|
268 | + $ph['icon_node_toggle'] = $ph['tree_minusnode']; |
|
269 | + $ph['node_toggle'] = 1; |
|
270 | + $ph['subMenuState'] = ' open'; |
|
271 | + |
|
272 | + if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
273 | + $ph['showChildren'] = 1; |
|
274 | + $ph['icon_node_toggle'] = ''; |
|
275 | + $ph['icon'] = $ph['icon_folder_close']; |
|
276 | + } elseif(!$checkDocs && $checkFolders) { |
|
277 | + $ph['showChildren'] = 0; |
|
278 | + $ph['openFolder'] = 2; |
|
279 | + } else { |
|
280 | + $ph['openFolder'] = 2; |
|
281 | + } |
|
282 | + |
|
283 | + // invoke OnManagerNodePrerender event |
|
284 | + $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
285 | + 'ph' => $ph, |
|
286 | + 'opened' => '1' |
|
287 | + )); |
|
288 | + if(is_array($prenode)) { |
|
289 | + $phnew = array(); |
|
290 | + foreach($prenode as $pnode) { |
|
291 | + $phnew = array_merge($phnew, unserialize($pnode)); |
|
292 | + } |
|
293 | + $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
294 | + } |
|
295 | + |
|
296 | + if($ph['contextmenu']) { |
|
297 | + $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
298 | + } |
|
299 | + |
|
300 | + $node .= $modx->parseText($tpl, $ph); |
|
301 | + if($checkFolders) { |
|
302 | + $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
|
303 | + } |
|
304 | + $node .= '</div></div>'; |
|
305 | + } else { |
|
306 | + $closed2[] = $row['id']; |
|
307 | + $ph['icon'] = $ph['icon_folder_close']; |
|
308 | + $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
|
309 | + $ph['node_toggle'] = 0; |
|
310 | + |
|
311 | + if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
312 | + $ph['showChildren'] = 1; |
|
313 | + $ph['icon_node_toggle'] = ''; |
|
314 | + } elseif(!$checkDocs && $checkFolders) { |
|
315 | + $ph['showChildren'] = 0; |
|
316 | + $ph['openFolder'] = 2; |
|
317 | + } else { |
|
318 | + $ph['openFolder'] = 2; |
|
319 | + } |
|
320 | + |
|
321 | + // invoke OnManagerNodePrerender event |
|
322 | + $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
323 | + 'ph' => $ph, |
|
324 | + 'opened' => '0' |
|
325 | + )); |
|
326 | + if(is_array($prenode)) { |
|
327 | + $phnew = array(); |
|
328 | + foreach($prenode as $pnode) { |
|
329 | + $phnew = array_merge($phnew, unserialize($pnode)); |
|
330 | + } |
|
331 | + $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
332 | + } |
|
333 | + |
|
334 | + if($ph['contextmenu']) { |
|
335 | + $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
336 | + } |
|
337 | + |
|
338 | + $node .= $modx->parseText($tpl, $ph); |
|
339 | + $node .= '</div></div>'; |
|
340 | + } |
|
341 | + } else { |
|
342 | + $tpl = getTplFolderNode(); |
|
343 | + // expandAll: two type for partial expansion |
|
344 | + if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
345 | + if($expandAll == 1) { |
|
346 | + $opened2[] = $row['id']; |
|
347 | + } |
|
348 | + $ph['icon'] = $ph['icon_folder_open']; |
|
349 | + $ph['icon_node_toggle'] = $ph['tree_minusnode']; |
|
350 | + $ph['node_toggle'] = 1; |
|
351 | + $ph['subMenuState'] = ' open'; |
|
352 | + |
|
353 | + if($ph['donthit'] == 1) { |
|
354 | + $ph['tree_page_click'] = 3; |
|
355 | + $ph['icon_node_toggle'] = ''; |
|
356 | + $ph['icon'] = $ph['icon_folder_close']; |
|
357 | + $ph['showChildren'] = 0; |
|
358 | + } |
|
359 | + |
|
360 | + // invoke OnManagerNodePrerender event |
|
361 | + $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
362 | + 'ph' => $ph, |
|
363 | + 'opened' => '1' |
|
364 | + )); |
|
365 | + if(is_array($prenode)) { |
|
366 | + $phnew = array(); |
|
367 | + foreach($prenode as $pnode) { |
|
368 | + $phnew = array_merge($phnew, unserialize($pnode)); |
|
369 | + } |
|
370 | + $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
371 | + if($ph['showChildren'] == 0) { |
|
372 | + unset($opened2[$row['id']]); |
|
373 | + $ph['node_toggle'] = 0; |
|
374 | + $ph['subMenuState'] = ''; |
|
375 | + } |
|
376 | + } |
|
377 | + |
|
378 | + if($ph['showChildren'] == 0) { |
|
379 | + $ph['icon_node_toggle'] = ''; |
|
380 | + $ph['donthit'] = 1; |
|
381 | + $ph['icon'] = $ph['icon_folder_close']; |
|
382 | + $tpl = getTplFolderNodeNotChildren(); |
|
383 | + } |
|
384 | + |
|
385 | + if($ph['contextmenu']) { |
|
386 | + $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
387 | + } |
|
388 | + |
|
389 | + $node .= $modx->parseText($tpl, $ph); |
|
390 | + if($ph['donthit'] == 0) { |
|
391 | + $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
|
392 | + } |
|
393 | + $node .= '</div></div>'; |
|
394 | + } else { |
|
395 | + $closed2[] = $row['id']; |
|
396 | + $ph['icon'] = $ph['icon_folder_close']; |
|
397 | + $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
|
398 | + $ph['node_toggle'] = 0; |
|
399 | + |
|
400 | + if($ph['donthit'] == 1) { |
|
401 | + $ph['tree_page_click'] = 3; |
|
402 | + $ph['icon_node_toggle'] = ''; |
|
403 | + $ph['icon'] = $ph['icon_folder_close']; |
|
404 | + $ph['showChildren'] = 0; |
|
405 | + } |
|
406 | + |
|
407 | + // invoke OnManagerNodePrerender event |
|
408 | + $prenode = $modx->invokeEvent("OnManagerNodePrerender", array( |
|
409 | + 'ph' => $ph, |
|
410 | + 'opened' => '0' |
|
411 | + )); |
|
412 | + if(is_array($prenode)) { |
|
413 | + $phnew = array(); |
|
414 | + foreach($prenode as $pnode) { |
|
415 | + $phnew = array_merge($phnew, unserialize($pnode)); |
|
416 | + } |
|
417 | + $ph = (count($phnew) > 0) ? $phnew : $ph; |
|
418 | + } |
|
419 | + |
|
420 | + if($ph['showChildren'] == 0) { |
|
421 | + $ph['icon_node_toggle'] = ''; |
|
422 | + $ph['donthit'] = 1; |
|
423 | + $ph['icon'] = $ph['icon_folder_close']; |
|
424 | + $tpl = getTplFolderNodeNotChildren(); |
|
425 | + } |
|
426 | + |
|
427 | + if($ph['contextmenu']) { |
|
428 | + $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
429 | + } |
|
430 | + |
|
431 | + $node .= $modx->parseText($tpl, $ph); |
|
432 | + $node .= '</div></div>'; |
|
433 | + } |
|
434 | + } |
|
435 | + } |
|
436 | + |
|
437 | + // invoke OnManagerNodeRender event |
|
438 | + $data['node'] = $node; |
|
439 | + $evtOut = $modx->invokeEvent('OnManagerNodeRender', $data); |
|
440 | + if(is_array($evtOut)) { |
|
441 | + $evtOut = implode("\n", $evtOut); |
|
442 | + } |
|
443 | + if($evtOut != '') { |
|
444 | + $node = trim($evtOut); |
|
445 | + } |
|
446 | + |
|
447 | + $output .= $node; |
|
448 | + } |
|
449 | + |
|
450 | + return $output; |
|
451 | 451 | } |
452 | 452 | |
453 | 453 | function getIconInfo($_style) { |
454 | - if(!isset($_style['tree_page_gif'])) { |
|
455 | - $_style['tree_page_gif'] = $_style['tree_page']; |
|
456 | - } |
|
457 | - if(!isset($_style['tree_page_jpg'])) { |
|
458 | - $_style['tree_page_jpg'] = $_style['tree_page']; |
|
459 | - } |
|
460 | - if(!isset($_style['tree_page_png'])) { |
|
461 | - $_style['tree_page_png'] = $_style['tree_page']; |
|
462 | - } |
|
463 | - $icons = array( |
|
464 | - 'text/html' => $_style['tree_page_html'], |
|
465 | - 'text/plain' => $_style['tree_page'], |
|
466 | - 'text/xml' => $_style['tree_page_xml'], |
|
467 | - 'text/css' => $_style['tree_page_css'], |
|
468 | - 'text/javascript' => $_style['tree_page_js'], |
|
469 | - 'application/rss+xml' => $_style['tree_page_rss'], |
|
470 | - 'application/pdf' => $_style['tree_page_pdf'], |
|
471 | - 'application/vnd.ms-word' => $_style['tree_page_word'], |
|
472 | - 'application/vnd.ms-excel' => $_style['tree_page_excel'], |
|
473 | - 'image/gif' => $_style['tree_page_gif'], |
|
474 | - 'image/jpg' => $_style['tree_page_jpg'], |
|
475 | - 'image/png' => $_style['tree_page_png'] |
|
476 | - ); |
|
477 | - return $icons; |
|
454 | + if(!isset($_style['tree_page_gif'])) { |
|
455 | + $_style['tree_page_gif'] = $_style['tree_page']; |
|
456 | + } |
|
457 | + if(!isset($_style['tree_page_jpg'])) { |
|
458 | + $_style['tree_page_jpg'] = $_style['tree_page']; |
|
459 | + } |
|
460 | + if(!isset($_style['tree_page_png'])) { |
|
461 | + $_style['tree_page_png'] = $_style['tree_page']; |
|
462 | + } |
|
463 | + $icons = array( |
|
464 | + 'text/html' => $_style['tree_page_html'], |
|
465 | + 'text/plain' => $_style['tree_page'], |
|
466 | + 'text/xml' => $_style['tree_page_xml'], |
|
467 | + 'text/css' => $_style['tree_page_css'], |
|
468 | + 'text/javascript' => $_style['tree_page_js'], |
|
469 | + 'application/rss+xml' => $_style['tree_page_rss'], |
|
470 | + 'application/pdf' => $_style['tree_page_pdf'], |
|
471 | + 'application/vnd.ms-word' => $_style['tree_page_word'], |
|
472 | + 'application/vnd.ms-excel' => $_style['tree_page_excel'], |
|
473 | + 'image/gif' => $_style['tree_page_gif'], |
|
474 | + 'image/jpg' => $_style['tree_page_jpg'], |
|
475 | + 'image/png' => $_style['tree_page_png'] |
|
476 | + ); |
|
477 | + return $icons; |
|
478 | 478 | } |
479 | 479 | |
480 | 480 | function getPrivateIconInfo($_style) { |
481 | - if(!isset($_style['tree_page_gif_secure'])) { |
|
482 | - $_style['tree_page_gif_secure'] = $_style['tree_page_secure']; |
|
483 | - } |
|
484 | - if(!isset($_style['tree_page_jpg_secure'])) { |
|
485 | - $_style['tree_page_jpg_secure'] = $_style['tree_page_secure']; |
|
486 | - } |
|
487 | - if(!isset($_style['tree_page_png_secure'])) { |
|
488 | - $_style['tree_page_png_secure'] = $_style['tree_page_secure']; |
|
489 | - } |
|
490 | - $iconsPrivate = array( |
|
491 | - 'text/html' => $_style['tree_page_html_secure'], |
|
492 | - 'text/plain' => $_style['tree_page_secure'], |
|
493 | - 'text/xml' => $_style['tree_page_xml_secure'], |
|
494 | - 'text/css' => $_style['tree_page_css_secure'], |
|
495 | - 'text/javascript' => $_style['tree_page_js_secure'], |
|
496 | - 'application/rss+xml' => $_style['tree_page_rss_secure'], |
|
497 | - 'application/pdf' => $_style['tree_page_pdf_secure'], |
|
498 | - 'application/vnd.ms-word' => $_style['tree_page_word_secure'], |
|
499 | - 'application/vnd.ms-excel' => $_style['tree_page_excel_secure'], |
|
500 | - 'image/gif' => $_style['tree_page_gif_secure'], |
|
501 | - 'image/jpg' => $_style['tree_page_jpg_secure'], |
|
502 | - 'image/png' => $_style['tree_page_png_secure'] |
|
503 | - ); |
|
504 | - return $iconsPrivate; |
|
481 | + if(!isset($_style['tree_page_gif_secure'])) { |
|
482 | + $_style['tree_page_gif_secure'] = $_style['tree_page_secure']; |
|
483 | + } |
|
484 | + if(!isset($_style['tree_page_jpg_secure'])) { |
|
485 | + $_style['tree_page_jpg_secure'] = $_style['tree_page_secure']; |
|
486 | + } |
|
487 | + if(!isset($_style['tree_page_png_secure'])) { |
|
488 | + $_style['tree_page_png_secure'] = $_style['tree_page_secure']; |
|
489 | + } |
|
490 | + $iconsPrivate = array( |
|
491 | + 'text/html' => $_style['tree_page_html_secure'], |
|
492 | + 'text/plain' => $_style['tree_page_secure'], |
|
493 | + 'text/xml' => $_style['tree_page_xml_secure'], |
|
494 | + 'text/css' => $_style['tree_page_css_secure'], |
|
495 | + 'text/javascript' => $_style['tree_page_js_secure'], |
|
496 | + 'application/rss+xml' => $_style['tree_page_rss_secure'], |
|
497 | + 'application/pdf' => $_style['tree_page_pdf_secure'], |
|
498 | + 'application/vnd.ms-word' => $_style['tree_page_word_secure'], |
|
499 | + 'application/vnd.ms-excel' => $_style['tree_page_excel_secure'], |
|
500 | + 'image/gif' => $_style['tree_page_gif_secure'], |
|
501 | + 'image/jpg' => $_style['tree_page_jpg_secure'], |
|
502 | + 'image/png' => $_style['tree_page_png_secure'] |
|
503 | + ); |
|
504 | + return $iconsPrivate; |
|
505 | 505 | } |
506 | 506 | |
507 | 507 | function getNodeTitle($nodeNameSource, $row) { |
508 | - global $modx; |
|
509 | - |
|
510 | - switch($nodeNameSource) { |
|
511 | - case 'menutitle': |
|
512 | - $nodetitle = $row['menutitle'] ? $row['menutitle'] : $row['pagetitle']; |
|
513 | - break; |
|
514 | - case 'alias': |
|
515 | - $nodetitle = $row['alias'] ? $row['alias'] : $row['id']; |
|
516 | - if(strpos($row['alias'], '.') === false) { |
|
517 | - if($row['isfolder'] != 1 || $modx->config['make_folders'] != 1) { |
|
518 | - $nodetitle .= $modx->config['friendly_url_suffix']; |
|
519 | - } |
|
520 | - } |
|
521 | - $nodetitle = $modx->config['friendly_url_prefix'] . $nodetitle; |
|
522 | - break; |
|
523 | - case 'pagetitle': |
|
524 | - $nodetitle = $row['pagetitle']; |
|
525 | - break; |
|
526 | - case 'longtitle': |
|
527 | - $nodetitle = $row['longtitle'] ? $row['longtitle'] : $row['pagetitle']; |
|
528 | - break; |
|
529 | - case 'createdon': |
|
530 | - case 'editedon': |
|
531 | - case 'publishedon': |
|
532 | - case 'pub_date': |
|
533 | - case 'unpub_date': |
|
534 | - $doc = $modx->getDocumentObject('id', $row['id']); |
|
535 | - $date = $doc[$nodeNameSource]; |
|
536 | - if(!empty($date)) { |
|
537 | - $nodetitle = $modx->toDateFormat($date); |
|
538 | - } else { |
|
539 | - $nodetitle = '- - -'; |
|
540 | - } |
|
541 | - break; |
|
542 | - default: |
|
543 | - $nodetitle = $row['pagetitle']; |
|
544 | - } |
|
545 | - $nodetitle = $modx->htmlspecialchars(str_replace(array( |
|
546 | - "\r\n", |
|
547 | - "\n", |
|
548 | - "\r" |
|
549 | - ), ' ', $nodetitle), ENT_COMPAT); |
|
550 | - return $nodetitle; |
|
508 | + global $modx; |
|
509 | + |
|
510 | + switch($nodeNameSource) { |
|
511 | + case 'menutitle': |
|
512 | + $nodetitle = $row['menutitle'] ? $row['menutitle'] : $row['pagetitle']; |
|
513 | + break; |
|
514 | + case 'alias': |
|
515 | + $nodetitle = $row['alias'] ? $row['alias'] : $row['id']; |
|
516 | + if(strpos($row['alias'], '.') === false) { |
|
517 | + if($row['isfolder'] != 1 || $modx->config['make_folders'] != 1) { |
|
518 | + $nodetitle .= $modx->config['friendly_url_suffix']; |
|
519 | + } |
|
520 | + } |
|
521 | + $nodetitle = $modx->config['friendly_url_prefix'] . $nodetitle; |
|
522 | + break; |
|
523 | + case 'pagetitle': |
|
524 | + $nodetitle = $row['pagetitle']; |
|
525 | + break; |
|
526 | + case 'longtitle': |
|
527 | + $nodetitle = $row['longtitle'] ? $row['longtitle'] : $row['pagetitle']; |
|
528 | + break; |
|
529 | + case 'createdon': |
|
530 | + case 'editedon': |
|
531 | + case 'publishedon': |
|
532 | + case 'pub_date': |
|
533 | + case 'unpub_date': |
|
534 | + $doc = $modx->getDocumentObject('id', $row['id']); |
|
535 | + $date = $doc[$nodeNameSource]; |
|
536 | + if(!empty($date)) { |
|
537 | + $nodetitle = $modx->toDateFormat($date); |
|
538 | + } else { |
|
539 | + $nodetitle = '- - -'; |
|
540 | + } |
|
541 | + break; |
|
542 | + default: |
|
543 | + $nodetitle = $row['pagetitle']; |
|
544 | + } |
|
545 | + $nodetitle = $modx->htmlspecialchars(str_replace(array( |
|
546 | + "\r\n", |
|
547 | + "\n", |
|
548 | + "\r" |
|
549 | + ), ' ', $nodetitle), ENT_COMPAT); |
|
550 | + return $nodetitle; |
|
551 | 551 | } |
552 | 552 | |
553 | 553 | function isDateNode($nodeNameSource) { |
554 | - switch($nodeNameSource) { |
|
555 | - case 'createdon': |
|
556 | - case 'editedon': |
|
557 | - case 'publishedon': |
|
558 | - case 'pub_date': |
|
559 | - case 'unpub_date': |
|
560 | - return true; |
|
561 | - default: |
|
562 | - return false; |
|
563 | - } |
|
554 | + switch($nodeNameSource) { |
|
555 | + case 'createdon': |
|
556 | + case 'editedon': |
|
557 | + case 'publishedon': |
|
558 | + case 'pub_date': |
|
559 | + case 'unpub_date': |
|
560 | + return true; |
|
561 | + default: |
|
562 | + return false; |
|
563 | + } |
|
564 | 564 | } |
565 | 565 | |
566 | 566 | function checkIsFolder($parent = 0, $isfolder = 1) { |
567 | - global $modx; |
|
567 | + global $modx; |
|
568 | 568 | |
569 | - return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
|
569 | + return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
|
570 | 570 | } |
571 | 571 | |
572 | 572 | function _htmlentities($array) { |
573 | - global $modx; |
|
573 | + global $modx; |
|
574 | 574 | |
575 | - $array = json_encode($array, JSON_UNESCAPED_UNICODE); |
|
576 | - $array = htmlentities($array, ENT_COMPAT, $modx->config['modx_charset']); |
|
575 | + $array = json_encode($array, JSON_UNESCAPED_UNICODE); |
|
576 | + $array = htmlentities($array, ENT_COMPAT, $modx->config['modx_charset']); |
|
577 | 577 | |
578 | - return $array; |
|
578 | + return $array; |
|
579 | 579 | } |
580 | 580 | |
581 | 581 | function getTplSingleNode() { |
582 | - return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
582 | + return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
583 | 583 | onclick="modx.tree.treeAction(event,[+id+]);" |
584 | 584 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
585 | 585 | data-id="[+id+]" |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | } |
604 | 604 | |
605 | 605 | function getTplFolderNode() { |
606 | - return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
606 | + return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
607 | 607 | onclick="modx.tree.treeAction(event,[+id+]);" |
608 | 608 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
609 | 609 | data-id="[+id+]" |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | } |
640 | 640 | |
641 | 641 | function getTplFolderNodeNotChildren() { |
642 | - return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
642 | + return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
|
643 | 643 | onclick="modx.tree.treeAction(event,[+id+]);" |
644 | 644 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
645 | 645 | data-id="[+id+]" |
@@ -671,10 +671,10 @@ discard block |
||
671 | 671 | } |
672 | 672 | |
673 | 673 | function dbug($str, $flag = false) { |
674 | - print('<pre>'); |
|
675 | - print_r($str); |
|
676 | - print('</pre>'); |
|
677 | - if($flag) { |
|
678 | - exit; |
|
679 | - } |
|
674 | + print('<pre>'); |
|
675 | + print_r($str); |
|
676 | + print('</pre>'); |
|
677 | + if($flag) { |
|
678 | + exit; |
|
679 | + } |
|
680 | 680 | } |
@@ -1,5 +1,5 @@ discard block |
||
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 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @param $theme |
11 | 11 | * @param string $hereid |
12 | 12 | */ |
13 | -function makeHTML($indent, $parent, $expandAll, $theme, $hereid = '') { |
|
13 | +function makeHTML($indent, $parent, $expandAll, $theme, $hereid = ''){ |
|
14 | 14 | global $modx; |
15 | 15 | global $icons, $iconsPrivate, $_style; |
16 | 16 | global $_lang, $opened, $opened2, $closed2; //added global vars |
@@ -21,35 +21,35 @@ discard block |
||
21 | 21 | // setup spacer |
22 | 22 | $level = 0; |
23 | 23 | $spacer = '<span class="indent">'; |
24 | - for($i = 2; $i <= $indent; $i++) { |
|
24 | + for ($i = 2; $i <= $indent; $i++) { |
|
25 | 25 | $spacer .= '<i></i>'; |
26 | 26 | $level++; |
27 | 27 | } |
28 | 28 | $spacer .= '</span>'; |
29 | 29 | |
30 | 30 | // manage order-by |
31 | - if(!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) { |
|
31 | + if (!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) { |
|
32 | 32 | // This is the first startup, set default sort order |
33 | 33 | $_SESSION['tree_sortby'] = 'menuindex'; |
34 | 34 | $_SESSION['tree_sortdir'] = 'ASC'; |
35 | 35 | } |
36 | 36 | |
37 | - switch($_SESSION['tree_sortby']) { |
|
37 | + switch ($_SESSION['tree_sortby']) { |
|
38 | 38 | case 'createdon': |
39 | 39 | case 'editedon': |
40 | 40 | case 'publishedon': |
41 | 41 | case 'pub_date': |
42 | 42 | case 'unpub_date': |
43 | - $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.' . $_SESSION['tree_sortby'], 'sc.' . $_SESSION['tree_sortby']); |
|
43 | + $sortby = sprintf('CASE WHEN %s IS NULL THEN 1 ELSE 0 END, %s', 'sc.'.$_SESSION['tree_sortby'], 'sc.'.$_SESSION['tree_sortby']); |
|
44 | 44 | break; |
45 | 45 | default: |
46 | - $sortby = 'sc.' . $_SESSION['tree_sortby']; |
|
46 | + $sortby = 'sc.'.$_SESSION['tree_sortby']; |
|
47 | 47 | }; |
48 | 48 | |
49 | - $orderby = $modx->db->escape($sortby . ' ' . $_SESSION['tree_sortdir']); |
|
49 | + $orderby = $modx->db->escape($sortby.' '.$_SESSION['tree_sortdir']); |
|
50 | 50 | |
51 | 51 | // Folder sorting gets special setup ;) Add menuindex and pagetitle |
52 | - if($_SESSION['tree_sortby'] == 'isfolder') { |
|
52 | + if ($_SESSION['tree_sortby'] == 'isfolder') { |
|
53 | 53 | $orderby .= ', menuindex ASC, pagetitle'; |
54 | 54 | } |
55 | 55 | |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | // get document groups for current user |
60 | 60 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
61 | 61 | $showProtected = false; |
62 | - if(isset ($modx->config['tree_show_protected'])) { |
|
62 | + if (isset ($modx->config['tree_show_protected'])) { |
|
63 | 63 | $showProtected = (boolean) $modx->config['tree_show_protected']; |
64 | 64 | } |
65 | 65 | $mgrRole = (isset ($_SESSION['mgrRole']) && (string) $_SESSION['mgrRole'] === '1') ? '1' : '0'; |
66 | - if($showProtected == false) { |
|
67 | - $access = "AND (1={$mgrRole} OR sc.privatemgr=0" . (!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
66 | + if ($showProtected == false) { |
|
67 | + $access = "AND (1={$mgrRole} OR sc.privatemgr=0".(!$docgrp ? ')' : " OR dg.document_group IN ({$docgrp}))"); |
|
68 | 68 | } else { |
69 | 69 | $access = ''; |
70 | 70 | } |
@@ -74,13 +74,13 @@ discard block |
||
74 | 74 | $from = "{$tblsc} AS sc LEFT JOIN {$tbldg} dg on dg.document = sc.id LEFT JOIN {$tblst} st on st.id = sc.template"; |
75 | 75 | $where = "(parent={$parent}) {$access} GROUP BY sc.id"; |
76 | 76 | $result = $modx->db->select($field, $from, $where, $orderby); |
77 | - if($modx->db->getRecordCount($result) == 0) { |
|
77 | + if ($modx->db->getRecordCount($result) == 0) { |
|
78 | 78 | $output .= sprintf('<div><a class="empty">%s%s <span class="empty">%s</span></a></div>', $spacer, $_style['tree_deletedpage'], $_lang['empty_folder']); |
79 | 79 | } |
80 | 80 | |
81 | 81 | $nodeNameSource = $_SESSION['tree_nodename'] == 'default' ? $modx->config['resource_tree_node_name'] : $_SESSION['tree_nodename']; |
82 | 82 | |
83 | - while($row = $modx->db->getRow($result)) { |
|
83 | + while ($row = $modx->db->getRow($result)) { |
|
84 | 84 | $node = ''; |
85 | 85 | |
86 | 86 | $nodetitle = getNodeTitle($nodeNameSource, $row); |
@@ -89,46 +89,46 @@ discard block |
||
89 | 89 | $treeNodeClass = 'node'; |
90 | 90 | $treeNodeClass .= $row['hasAccess'] == 0 ? ' protected' : ''; |
91 | 91 | |
92 | - if($row['deleted'] == 1) { |
|
92 | + if ($row['deleted'] == 1) { |
|
93 | 93 | $treeNodeClass .= ' deleted'; |
94 | 94 | //$nodetitleDisplay = sprintf('<span class="deletedNode">%s</span>', $nodetitle); |
95 | - } elseif($row['published'] == 0) { |
|
95 | + } elseif ($row['published'] == 0) { |
|
96 | 96 | $treeNodeClass .= ' unpublished'; |
97 | 97 | //$nodetitleDisplay = sprintf('<span class="unpublishedNode">%s</span>', $nodetitle); |
98 | - } elseif($row['hidemenu'] == 1) { |
|
98 | + } elseif ($row['hidemenu'] == 1) { |
|
99 | 99 | $treeNodeClass .= ' hidemenu'; |
100 | 100 | //$nodetitleDisplay = sprintf('<span class="notInMenuNode%s">%s</span>', $protectedClass, $nodetitle); |
101 | 101 | } else { |
102 | 102 | //$nodetitleDisplay = sprintf('<span class="publishedNode%s">%s</span>', $protectedClass, $nodetitle); |
103 | 103 | } |
104 | 104 | |
105 | - if($row['id'] == $hereid) { |
|
105 | + if ($row['id'] == $hereid) { |
|
106 | 106 | $treeNodeClass .= ' current'; |
107 | 107 | } |
108 | 108 | |
109 | 109 | $weblinkDisplay = $row['type'] == 'reference' ? sprintf(' %s', $_style['tree_linkgo']) : ''; |
110 | - $pageIdDisplay = '<small>(' . ($modx_textdir ? '‏' : '') . $row['id'] . ')</small>'; |
|
110 | + $pageIdDisplay = '<small>('.($modx_textdir ? '‏' : '').$row['id'].')</small>'; |
|
111 | 111 | |
112 | 112 | // Prepare displaying user-locks |
113 | 113 | $lockedByUser = ''; |
114 | 114 | $rowLock = $modx->elementIsLocked(7, $row['id'], true); |
115 | - if($rowLock && $modx->hasPermission('display_locks')) { |
|
116 | - if($rowLock['sid'] == $modx->sid) { |
|
115 | + if ($rowLock && $modx->hasPermission('display_locks')) { |
|
116 | + if ($rowLock['sid'] == $modx->sid) { |
|
117 | 117 | $title = $modx->parseText($_lang["lock_element_editing"], array( |
118 | 118 | 'element_type' => $_lang["lock_element_type_7"], |
119 | 119 | 'lasthit_df' => $rowLock['lasthit_df'] |
120 | 120 | )); |
121 | - $lockedByUser = '<span title="' . $title . '" class="editResource">' . $_style['tree_preview_resource'] . '</span>'; |
|
121 | + $lockedByUser = '<span title="'.$title.'" class="editResource">'.$_style['tree_preview_resource'].'</span>'; |
|
122 | 122 | } else { |
123 | 123 | $title = $modx->parseText($_lang["lock_element_locked_by"], array( |
124 | 124 | 'element_type' => $_lang["lock_element_type_7"], |
125 | 125 | 'username' => $rowLock['username'], |
126 | 126 | 'lasthit_df' => $rowLock['lasthit_df'] |
127 | 127 | )); |
128 | - if($modx->hasPermission('remove_locks')) { |
|
129 | - $lockedByUser = '<span onclick="modx.tree.unlockElement(7, ' . $row['id'] . ', this);return false;" title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
128 | + if ($modx->hasPermission('remove_locks')) { |
|
129 | + $lockedByUser = '<span onclick="modx.tree.unlockElement(7, '.$row['id'].', this);return false;" title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
130 | 130 | } else { |
131 | - $lockedByUser = '<span title="' . $title . '" class="lockedResource">' . $_style['icons_secured'] . '</span>'; |
|
131 | + $lockedByUser = '<span title="'.$title.'" class="lockedResource">'.$_style['icons_secured'].'</span>'; |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | } |
@@ -136,23 +136,23 @@ discard block |
||
136 | 136 | $url = $modx->makeUrl($row['id']); |
137 | 137 | |
138 | 138 | $title = ''; |
139 | - if(isDateNode($nodeNameSource)) { |
|
140 | - $title = $_lang['pagetitle'] . ': ' . $row['pagetitle'] . '[+lf+]'; |
|
139 | + if (isDateNode($nodeNameSource)) { |
|
140 | + $title = $_lang['pagetitle'].': '.$row['pagetitle'].'[+lf+]'; |
|
141 | 141 | } |
142 | - $title .= $_lang['id'] . ': ' . $row['id']; |
|
143 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_title'] . ': ' . $row['menutitle']; |
|
144 | - $title .= '[+lf+]' . $_lang['resource_opt_menu_index'] . ': ' . $row['menuindex']; |
|
145 | - $title .= '[+lf+]' . $_lang['alias'] . ': ' . (!empty($row['alias']) ? $row['alias'] : '-'); |
|
146 | - $title .= '[+lf+]' . $_lang['template'] . ': ' . $row['templatename']; |
|
147 | - $title .= '[+lf+]' . $_lang['publish_date'] . ': ' . $modx->toDateFormat($row['pub_date']); |
|
148 | - $title .= '[+lf+]' . $_lang['unpublish_date'] . ': ' . $modx->toDateFormat($row['unpub_date']); |
|
149 | - $title .= '[+lf+]' . $_lang['page_data_web_access'] . ': ' . ($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
150 | - $title .= '[+lf+]' . $_lang['page_data_mgr_access'] . ': ' . ($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
151 | - $title .= '[+lf+]' . $_lang['resource_opt_richtext'] . ': ' . ($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
152 | - $title .= '[+lf+]' . $_lang['page_data_searchable'] . ': ' . ($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
153 | - $title .= '[+lf+]' . $_lang['page_data_cacheable'] . ': ' . ($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
142 | + $title .= $_lang['id'].': '.$row['id']; |
|
143 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_title'].': '.$row['menutitle']; |
|
144 | + $title .= '[+lf+]'.$_lang['resource_opt_menu_index'].': '.$row['menuindex']; |
|
145 | + $title .= '[+lf+]'.$_lang['alias'].': '.(!empty($row['alias']) ? $row['alias'] : '-'); |
|
146 | + $title .= '[+lf+]'.$_lang['template'].': '.$row['templatename']; |
|
147 | + $title .= '[+lf+]'.$_lang['publish_date'].': '.$modx->toDateFormat($row['pub_date']); |
|
148 | + $title .= '[+lf+]'.$_lang['unpublish_date'].': '.$modx->toDateFormat($row['unpub_date']); |
|
149 | + $title .= '[+lf+]'.$_lang['page_data_web_access'].': '.($row['privateweb'] ? $_lang['private'] : $_lang['public']); |
|
150 | + $title .= '[+lf+]'.$_lang['page_data_mgr_access'].': '.($row['privatemgr'] ? $_lang['private'] : $_lang['public']); |
|
151 | + $title .= '[+lf+]'.$_lang['resource_opt_richtext'].': '.($row['richtext'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
152 | + $title .= '[+lf+]'.$_lang['page_data_searchable'].': '.($row['searchable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
153 | + $title .= '[+lf+]'.$_lang['page_data_cacheable'].': '.($row['cacheable'] == 0 ? $_lang['no'] : $_lang['yes']); |
|
154 | 154 | $title = $modx->htmlspecialchars($title); |
155 | - $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
155 | + $title = str_replace('[+lf+]', ' ', $title); // replace line-breaks with empty space as fall-back |
|
156 | 156 | |
157 | 157 | $data = array( |
158 | 158 | 'id' => $row['id'], |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | $ph['expandAll'] = $expandAll; |
202 | 202 | $ph['isPrivate'] = ($row['privateweb'] || $row['privatemgr']) ? 1 : 0; |
203 | 203 | |
204 | - if(!$row['isfolder']) { |
|
204 | + if (!$row['isfolder']) { |
|
205 | 205 | $tpl = getTplSingleNode(); |
206 | - switch($row['id']) { |
|
206 | + switch ($row['id']) { |
|
207 | 207 | case $modx->config['site_start'] : |
208 | 208 | $icon = $_style['tree_page_home']; |
209 | 209 | break; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $icon = $_style['tree_page_info']; |
218 | 218 | break; |
219 | 219 | default: |
220 | - if(isset($icons[$row['contentType']])) { |
|
220 | + if (isset($icons[$row['contentType']])) { |
|
221 | 221 | $icon = $icons[$row['contentType']]; |
222 | 222 | } else { |
223 | 223 | $icon = $_style['tree_page']; |
@@ -227,20 +227,20 @@ discard block |
||
227 | 227 | |
228 | 228 | // invoke OnManagerNodePrerender event |
229 | 229 | $prenode = $modx->invokeEvent("OnManagerNodePrerender", array('ph' => $ph)); |
230 | - if(is_array($prenode)) { |
|
230 | + if (is_array($prenode)) { |
|
231 | 231 | $phnew = array(); |
232 | - foreach($prenode as $pnode) { |
|
232 | + foreach ($prenode as $pnode) { |
|
233 | 233 | $phnew = array_merge($phnew, unserialize($pnode)); |
234 | 234 | } |
235 | 235 | $ph = (count($phnew) > 0) ? $phnew : $ph; |
236 | 236 | } |
237 | 237 | |
238 | - if($ph['contextmenu']) { |
|
239 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
238 | + if ($ph['contextmenu']) { |
|
239 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
240 | 240 | } |
241 | 241 | |
242 | - if($_SESSION['tree_show_only_folders']) { |
|
243 | - if($row['parent'] == 0) { |
|
242 | + if ($_SESSION['tree_show_only_folders']) { |
|
243 | + if ($row['parent'] == 0) { |
|
244 | 244 | $node .= $modx->parseText($tpl, $ph); |
245 | 245 | } else { |
246 | 246 | $node .= ''; |
@@ -253,15 +253,15 @@ discard block |
||
253 | 253 | $ph['icon_folder_open'] = $_style['tree_folderopen_new']; |
254 | 254 | $ph['icon_folder_close'] = $_style['tree_folder_new']; |
255 | 255 | |
256 | - if($_SESSION['tree_show_only_folders']) { |
|
256 | + if ($_SESSION['tree_show_only_folders']) { |
|
257 | 257 | $tpl = getTplFolderNodeNotChildren(); |
258 | 258 | $checkFolders = checkIsFolder($row['id'], 1) ? 1 : 0; // folders |
259 | 259 | $checkDocs = checkIsFolder($row['id'], 0) ? 1 : 0; // no folders |
260 | 260 | $ph['tree_page_click'] = 3; |
261 | 261 | |
262 | 262 | // expandAll: two type for partial expansion |
263 | - if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
264 | - if($expandAll == 1) { |
|
263 | + if ($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
264 | + if ($expandAll == 1) { |
|
265 | 265 | $opened2[] = $row['id']; |
266 | 266 | } |
267 | 267 | $ph['icon'] = $ph['icon_folder_open']; |
@@ -269,11 +269,11 @@ discard block |
||
269 | 269 | $ph['node_toggle'] = 1; |
270 | 270 | $ph['subMenuState'] = ' open'; |
271 | 271 | |
272 | - if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
272 | + if (($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
273 | 273 | $ph['showChildren'] = 1; |
274 | 274 | $ph['icon_node_toggle'] = ''; |
275 | 275 | $ph['icon'] = $ph['icon_folder_close']; |
276 | - } elseif(!$checkDocs && $checkFolders) { |
|
276 | + } elseif (!$checkDocs && $checkFolders) { |
|
277 | 277 | $ph['showChildren'] = 0; |
278 | 278 | $ph['openFolder'] = 2; |
279 | 279 | } else { |
@@ -285,20 +285,20 @@ discard block |
||
285 | 285 | 'ph' => $ph, |
286 | 286 | 'opened' => '1' |
287 | 287 | )); |
288 | - if(is_array($prenode)) { |
|
288 | + if (is_array($prenode)) { |
|
289 | 289 | $phnew = array(); |
290 | - foreach($prenode as $pnode) { |
|
290 | + foreach ($prenode as $pnode) { |
|
291 | 291 | $phnew = array_merge($phnew, unserialize($pnode)); |
292 | 292 | } |
293 | 293 | $ph = (count($phnew) > 0) ? $phnew : $ph; |
294 | 294 | } |
295 | 295 | |
296 | - if($ph['contextmenu']) { |
|
297 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
296 | + if ($ph['contextmenu']) { |
|
297 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | $node .= $modx->parseText($tpl, $ph); |
301 | - if($checkFolders) { |
|
301 | + if ($checkFolders) { |
|
302 | 302 | $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
303 | 303 | } |
304 | 304 | $node .= '</div></div>'; |
@@ -308,10 +308,10 @@ discard block |
||
308 | 308 | $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
309 | 309 | $ph['node_toggle'] = 0; |
310 | 310 | |
311 | - if(($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
311 | + if (($checkDocs && !$checkFolders) || (!$checkDocs && !$checkFolders)) { |
|
312 | 312 | $ph['showChildren'] = 1; |
313 | 313 | $ph['icon_node_toggle'] = ''; |
314 | - } elseif(!$checkDocs && $checkFolders) { |
|
314 | + } elseif (!$checkDocs && $checkFolders) { |
|
315 | 315 | $ph['showChildren'] = 0; |
316 | 316 | $ph['openFolder'] = 2; |
317 | 317 | } else { |
@@ -323,16 +323,16 @@ discard block |
||
323 | 323 | 'ph' => $ph, |
324 | 324 | 'opened' => '0' |
325 | 325 | )); |
326 | - if(is_array($prenode)) { |
|
326 | + if (is_array($prenode)) { |
|
327 | 327 | $phnew = array(); |
328 | - foreach($prenode as $pnode) { |
|
328 | + foreach ($prenode as $pnode) { |
|
329 | 329 | $phnew = array_merge($phnew, unserialize($pnode)); |
330 | 330 | } |
331 | 331 | $ph = (count($phnew) > 0) ? $phnew : $ph; |
332 | 332 | } |
333 | 333 | |
334 | - if($ph['contextmenu']) { |
|
335 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
334 | + if ($ph['contextmenu']) { |
|
335 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
336 | 336 | } |
337 | 337 | |
338 | 338 | $node .= $modx->parseText($tpl, $ph); |
@@ -341,8 +341,8 @@ discard block |
||
341 | 341 | } else { |
342 | 342 | $tpl = getTplFolderNode(); |
343 | 343 | // expandAll: two type for partial expansion |
344 | - if($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
345 | - if($expandAll == 1) { |
|
344 | + if ($expandAll == 1 || ($expandAll == 2 && in_array($row['id'], $opened))) { |
|
345 | + if ($expandAll == 1) { |
|
346 | 346 | $opened2[] = $row['id']; |
347 | 347 | } |
348 | 348 | $ph['icon'] = $ph['icon_folder_open']; |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | $ph['node_toggle'] = 1; |
351 | 351 | $ph['subMenuState'] = ' open'; |
352 | 352 | |
353 | - if($ph['donthit'] == 1) { |
|
353 | + if ($ph['donthit'] == 1) { |
|
354 | 354 | $ph['tree_page_click'] = 3; |
355 | 355 | $ph['icon_node_toggle'] = ''; |
356 | 356 | $ph['icon'] = $ph['icon_folder_close']; |
@@ -362,32 +362,32 @@ discard block |
||
362 | 362 | 'ph' => $ph, |
363 | 363 | 'opened' => '1' |
364 | 364 | )); |
365 | - if(is_array($prenode)) { |
|
365 | + if (is_array($prenode)) { |
|
366 | 366 | $phnew = array(); |
367 | - foreach($prenode as $pnode) { |
|
367 | + foreach ($prenode as $pnode) { |
|
368 | 368 | $phnew = array_merge($phnew, unserialize($pnode)); |
369 | 369 | } |
370 | 370 | $ph = (count($phnew) > 0) ? $phnew : $ph; |
371 | - if($ph['showChildren'] == 0) { |
|
371 | + if ($ph['showChildren'] == 0) { |
|
372 | 372 | unset($opened2[$row['id']]); |
373 | 373 | $ph['node_toggle'] = 0; |
374 | 374 | $ph['subMenuState'] = ''; |
375 | 375 | } |
376 | 376 | } |
377 | 377 | |
378 | - if($ph['showChildren'] == 0) { |
|
378 | + if ($ph['showChildren'] == 0) { |
|
379 | 379 | $ph['icon_node_toggle'] = ''; |
380 | 380 | $ph['donthit'] = 1; |
381 | 381 | $ph['icon'] = $ph['icon_folder_close']; |
382 | 382 | $tpl = getTplFolderNodeNotChildren(); |
383 | 383 | } |
384 | 384 | |
385 | - if($ph['contextmenu']) { |
|
386 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
385 | + if ($ph['contextmenu']) { |
|
386 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | $node .= $modx->parseText($tpl, $ph); |
390 | - if($ph['donthit'] == 0) { |
|
390 | + if ($ph['donthit'] == 0) { |
|
391 | 391 | $node .= makeHTML($indent + 1, $row['id'], $expandAll, $theme, $hereid); |
392 | 392 | } |
393 | 393 | $node .= '</div></div>'; |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $ph['icon_node_toggle'] = $ph['tree_plusnode']; |
398 | 398 | $ph['node_toggle'] = 0; |
399 | 399 | |
400 | - if($ph['donthit'] == 1) { |
|
400 | + if ($ph['donthit'] == 1) { |
|
401 | 401 | $ph['tree_page_click'] = 3; |
402 | 402 | $ph['icon_node_toggle'] = ''; |
403 | 403 | $ph['icon'] = $ph['icon_folder_close']; |
@@ -409,23 +409,23 @@ discard block |
||
409 | 409 | 'ph' => $ph, |
410 | 410 | 'opened' => '0' |
411 | 411 | )); |
412 | - if(is_array($prenode)) { |
|
412 | + if (is_array($prenode)) { |
|
413 | 413 | $phnew = array(); |
414 | - foreach($prenode as $pnode) { |
|
414 | + foreach ($prenode as $pnode) { |
|
415 | 415 | $phnew = array_merge($phnew, unserialize($pnode)); |
416 | 416 | } |
417 | 417 | $ph = (count($phnew) > 0) ? $phnew : $ph; |
418 | 418 | } |
419 | 419 | |
420 | - if($ph['showChildren'] == 0) { |
|
420 | + if ($ph['showChildren'] == 0) { |
|
421 | 421 | $ph['icon_node_toggle'] = ''; |
422 | 422 | $ph['donthit'] = 1; |
423 | 423 | $ph['icon'] = $ph['icon_folder_close']; |
424 | 424 | $tpl = getTplFolderNodeNotChildren(); |
425 | 425 | } |
426 | 426 | |
427 | - if($ph['contextmenu']) { |
|
428 | - $ph['contextmenu'] = ' data-contextmenu="' . _htmlentities($ph['contextmenu']) . '"'; |
|
427 | + if ($ph['contextmenu']) { |
|
428 | + $ph['contextmenu'] = ' data-contextmenu="'._htmlentities($ph['contextmenu']).'"'; |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | $node .= $modx->parseText($tpl, $ph); |
@@ -437,10 +437,10 @@ discard block |
||
437 | 437 | // invoke OnManagerNodeRender event |
438 | 438 | $data['node'] = $node; |
439 | 439 | $evtOut = $modx->invokeEvent('OnManagerNodeRender', $data); |
440 | - if(is_array($evtOut)) { |
|
440 | + if (is_array($evtOut)) { |
|
441 | 441 | $evtOut = implode("\n", $evtOut); |
442 | 442 | } |
443 | - if($evtOut != '') { |
|
443 | + if ($evtOut != '') { |
|
444 | 444 | $node = trim($evtOut); |
445 | 445 | } |
446 | 446 | |
@@ -450,14 +450,14 @@ discard block |
||
450 | 450 | return $output; |
451 | 451 | } |
452 | 452 | |
453 | -function getIconInfo($_style) { |
|
454 | - if(!isset($_style['tree_page_gif'])) { |
|
453 | +function getIconInfo($_style){ |
|
454 | + if (!isset($_style['tree_page_gif'])) { |
|
455 | 455 | $_style['tree_page_gif'] = $_style['tree_page']; |
456 | 456 | } |
457 | - if(!isset($_style['tree_page_jpg'])) { |
|
457 | + if (!isset($_style['tree_page_jpg'])) { |
|
458 | 458 | $_style['tree_page_jpg'] = $_style['tree_page']; |
459 | 459 | } |
460 | - if(!isset($_style['tree_page_png'])) { |
|
460 | + if (!isset($_style['tree_page_png'])) { |
|
461 | 461 | $_style['tree_page_png'] = $_style['tree_page']; |
462 | 462 | } |
463 | 463 | $icons = array( |
@@ -477,14 +477,14 @@ discard block |
||
477 | 477 | return $icons; |
478 | 478 | } |
479 | 479 | |
480 | -function getPrivateIconInfo($_style) { |
|
481 | - if(!isset($_style['tree_page_gif_secure'])) { |
|
480 | +function getPrivateIconInfo($_style){ |
|
481 | + if (!isset($_style['tree_page_gif_secure'])) { |
|
482 | 482 | $_style['tree_page_gif_secure'] = $_style['tree_page_secure']; |
483 | 483 | } |
484 | - if(!isset($_style['tree_page_jpg_secure'])) { |
|
484 | + if (!isset($_style['tree_page_jpg_secure'])) { |
|
485 | 485 | $_style['tree_page_jpg_secure'] = $_style['tree_page_secure']; |
486 | 486 | } |
487 | - if(!isset($_style['tree_page_png_secure'])) { |
|
487 | + if (!isset($_style['tree_page_png_secure'])) { |
|
488 | 488 | $_style['tree_page_png_secure'] = $_style['tree_page_secure']; |
489 | 489 | } |
490 | 490 | $iconsPrivate = array( |
@@ -504,21 +504,21 @@ discard block |
||
504 | 504 | return $iconsPrivate; |
505 | 505 | } |
506 | 506 | |
507 | -function getNodeTitle($nodeNameSource, $row) { |
|
507 | +function getNodeTitle($nodeNameSource, $row){ |
|
508 | 508 | global $modx; |
509 | 509 | |
510 | - switch($nodeNameSource) { |
|
510 | + switch ($nodeNameSource) { |
|
511 | 511 | case 'menutitle': |
512 | 512 | $nodetitle = $row['menutitle'] ? $row['menutitle'] : $row['pagetitle']; |
513 | 513 | break; |
514 | 514 | case 'alias': |
515 | 515 | $nodetitle = $row['alias'] ? $row['alias'] : $row['id']; |
516 | - if(strpos($row['alias'], '.') === false) { |
|
517 | - if($row['isfolder'] != 1 || $modx->config['make_folders'] != 1) { |
|
516 | + if (strpos($row['alias'], '.') === false) { |
|
517 | + if ($row['isfolder'] != 1 || $modx->config['make_folders'] != 1) { |
|
518 | 518 | $nodetitle .= $modx->config['friendly_url_suffix']; |
519 | 519 | } |
520 | 520 | } |
521 | - $nodetitle = $modx->config['friendly_url_prefix'] . $nodetitle; |
|
521 | + $nodetitle = $modx->config['friendly_url_prefix'].$nodetitle; |
|
522 | 522 | break; |
523 | 523 | case 'pagetitle': |
524 | 524 | $nodetitle = $row['pagetitle']; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | case 'unpub_date': |
534 | 534 | $doc = $modx->getDocumentObject('id', $row['id']); |
535 | 535 | $date = $doc[$nodeNameSource]; |
536 | - if(!empty($date)) { |
|
536 | + if (!empty($date)) { |
|
537 | 537 | $nodetitle = $modx->toDateFormat($date); |
538 | 538 | } else { |
539 | 539 | $nodetitle = '- - -'; |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | return $nodetitle; |
551 | 551 | } |
552 | 552 | |
553 | -function isDateNode($nodeNameSource) { |
|
554 | - switch($nodeNameSource) { |
|
553 | +function isDateNode($nodeNameSource){ |
|
554 | + switch ($nodeNameSource) { |
|
555 | 555 | case 'createdon': |
556 | 556 | case 'editedon': |
557 | 557 | case 'publishedon': |
@@ -563,13 +563,13 @@ discard block |
||
563 | 563 | } |
564 | 564 | } |
565 | 565 | |
566 | -function checkIsFolder($parent = 0, $isfolder = 1) { |
|
566 | +function checkIsFolder($parent = 0, $isfolder = 1){ |
|
567 | 567 | global $modx; |
568 | 568 | |
569 | - return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM ' . $modx->getFullTableName('site_content') . ' WHERE parent=' . $parent . ' AND isfolder=' . $isfolder . ' ')); |
|
569 | + return (int) $modx->db->getValue($modx->db->query('SELECT count(*) FROM '.$modx->getFullTableName('site_content').' WHERE parent='.$parent.' AND isfolder='.$isfolder.' ')); |
|
570 | 570 | } |
571 | 571 | |
572 | -function _htmlentities($array) { |
|
572 | +function _htmlentities($array){ |
|
573 | 573 | global $modx; |
574 | 574 | |
575 | 575 | $array = json_encode($array, JSON_UNESCAPED_UNICODE); |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | return $array; |
579 | 579 | } |
580 | 580 | |
581 | -function getTplSingleNode() { |
|
581 | +function getTplSingleNode(){ |
|
582 | 582 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
583 | 583 | onclick="modx.tree.treeAction(event,[+id+]);" |
584 | 584 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | title="[+title+]">[+nodetitleDisplay+][+weblinkDisplay+]</span>[+pageIdDisplay+]</a></div>'; |
603 | 603 | } |
604 | 604 | |
605 | -function getTplFolderNode() { |
|
605 | +function getTplFolderNode(){ |
|
606 | 606 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
607 | 607 | onclick="modx.tree.treeAction(event,[+id+]);" |
608 | 608 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | title="[+title+]">[+nodetitleDisplay+][+weblinkDisplay+]</span>[+pageIdDisplay+]</a><div>'; |
639 | 639 | } |
640 | 640 | |
641 | -function getTplFolderNodeNotChildren() { |
|
641 | +function getTplFolderNodeNotChildren(){ |
|
642 | 642 | return '<div id="node[+id+]"><a class="[+treeNodeClass+]" |
643 | 643 | onclick="modx.tree.treeAction(event,[+id+]);" |
644 | 644 | oncontextmenu="modx.tree.showPopup(event,[+id+],\'[+nodetitle_esc+]\');" |
@@ -670,11 +670,11 @@ discard block |
||
670 | 670 | title="[+title+]">[+nodetitleDisplay+][+weblinkDisplay+]</span>[+pageIdDisplay+]</a><div>'; |
671 | 671 | } |
672 | 672 | |
673 | -function dbug($str, $flag = false) { |
|
673 | +function dbug($str, $flag = false){ |
|
674 | 674 | print('<pre>'); |
675 | 675 | print_r($str); |
676 | 676 | print('</pre>'); |
677 | - if($flag) { |
|
677 | + if ($flag) { |
|
678 | 678 | exit; |
679 | 679 | } |
680 | 680 | } |