@@ -1,22 +1,22 @@ 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 | if(!$modx->hasPermission('delete_template')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id']) ? (int)$_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 | // delete the template, but first check it doesn't have any documents using it |
15 | 15 | $rs = $modx->db->select('id, pagetitle,introtext', $modx->getFullTableName('site_content'), "template='{$id}' AND deleted=0"); |
16 | 16 | $limit = $modx->db->getRecordCount($rs); |
17 | 17 | if($limit > 0) { |
18 | - include "header.inc.php"; |
|
19 | - ?> |
|
18 | + include "header.inc.php"; |
|
19 | + ?> |
|
20 | 20 | |
21 | 21 | <h1><?php echo $_lang['manage_templates']; ?></h1> |
22 | 22 | |
@@ -28,20 +28,20 @@ discard block |
||
28 | 28 | <p>Documents using this template:</p> |
29 | 29 | <ul> |
30 | 30 | <?php |
31 | - while($row = $modx->db->getRow($rs)) { |
|
32 | - echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
33 | - } |
|
34 | - ?> |
|
31 | + while($row = $modx->db->getRow($rs)) { |
|
32 | + echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['introtext'] != '' ? ' - ' . $row['introtext'] : '') . '</li>'; |
|
33 | + } |
|
34 | + ?> |
|
35 | 35 | </ul> |
36 | 36 | </div> |
37 | 37 | </div> |
38 | 38 | <?php |
39 | - include_once "footer.inc.php"; |
|
40 | - exit; |
|
39 | + include_once "footer.inc.php"; |
|
40 | + exit; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | if($id == $default_template) { |
44 | - $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
44 | + $modx->webAlertAndQuit("This template is set as the default template. Please choose a different default template in the MODX configuration before deleting this template."); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Set the item name for logger |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | |
51 | 51 | // invoke OnBeforeTempFormDelete event |
52 | 52 | $modx->invokeEvent("OnBeforeTempFormDelete", array( |
53 | - "id" => $id |
|
54 | - )); |
|
53 | + "id" => $id |
|
54 | + )); |
|
55 | 55 | |
56 | 56 | // delete the document. |
57 | 57 | $modx->db->delete($modx->getFullTableName('site_templates'), "id='{$id}'"); |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | |
61 | 61 | // invoke OnTempFormDelete event |
62 | 62 | $modx->invokeEvent("OnTempFormDelete", array( |
63 | - "id" => $id |
|
64 | - )); |
|
63 | + "id" => $id |
|
64 | + )); |
|
65 | 65 | |
66 | 66 | // empty cache |
67 | 67 | $modx->clearCache('full'); |
@@ -3,12 +3,12 @@ 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('delete_snippet')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_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 | // Set the item name for logger |
@@ -17,18 +17,18 @@ discard block |
||
17 | 17 | |
18 | 18 | // invoke OnBeforeSnipFormDelete event |
19 | 19 | $modx->invokeEvent("OnBeforeSnipFormDelete", |
20 | - array( |
|
21 | - "id" => $id |
|
22 | - )); |
|
20 | + array( |
|
21 | + "id" => $id |
|
22 | + )); |
|
23 | 23 | |
24 | 24 | // delete the snippet. |
25 | 25 | $modx->db->delete($modx->getFullTableName('site_snippets'), "id='{$id}'"); |
26 | 26 | |
27 | 27 | // invoke OnSnipFormDelete event |
28 | 28 | $modx->invokeEvent("OnSnipFormDelete", |
29 | - array( |
|
30 | - "id" => $id |
|
31 | - )); |
|
29 | + array( |
|
30 | + "id" => $id |
|
31 | + )); |
|
32 | 32 | |
33 | 33 | // empty cache |
34 | 34 | $modx->clearCache('full'); |
@@ -3,33 +3,33 @@ |
||
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('settings') && ($modx->hasPermission('logs')||$modx->hasPermission('bk_manager')))) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | if (isset($_REQUEST['t'])) { |
10 | 10 | |
11 | - if (empty($_REQUEST['t'])) { |
|
12 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
13 | - } |
|
11 | + if (empty($_REQUEST['t'])) { |
|
12 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
13 | + } |
|
14 | 14 | |
15 | - // Set the item name for logger |
|
16 | - $_SESSION['itemname'] = $_REQUEST['t']; |
|
15 | + // Set the item name for logger |
|
16 | + $_SESSION['itemname'] = $_REQUEST['t']; |
|
17 | 17 | |
18 | - $modx->db->optimize($_REQUEST['t']); |
|
18 | + $modx->db->optimize($_REQUEST['t']); |
|
19 | 19 | |
20 | 20 | } elseif (isset($_REQUEST['u'])) { |
21 | 21 | |
22 | - if (empty($_REQUEST['u'])) { |
|
23 | - $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
24 | - } |
|
22 | + if (empty($_REQUEST['u'])) { |
|
23 | + $modx->webAlertAndQuit($_lang["error_no_truncate_tablename"]); |
|
24 | + } |
|
25 | 25 | |
26 | - // Set the item name for logger |
|
27 | - $_SESSION['itemname'] = $_REQUEST['u']; |
|
26 | + // Set the item name for logger |
|
27 | + $_SESSION['itemname'] = $_REQUEST['u']; |
|
28 | 28 | |
29 | - $modx->db->truncate($_REQUEST['u']); |
|
29 | + $modx->db->truncate($_REQUEST['u']); |
|
30 | 30 | |
31 | 31 | } else { |
32 | - $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
32 | + $modx->webAlertAndQuit($_lang["error_no_optimise_tablename"]); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $mode = (int)$_REQUEST['mode']; |
@@ -4,23 +4,23 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | if(!isset($_GET['id'])) { |
7 | - if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | + if(!$modx->hasPermission('remove_locks')) $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
8 | 8 | |
9 | - // Remove all locks |
|
10 | - $modx->db->truncate($modx->getFullTableName('active_user_locks')); |
|
9 | + // Remove all locks |
|
10 | + $modx->db->truncate($modx->getFullTableName('active_user_locks')); |
|
11 | 11 | |
12 | - $header = "Location: index.php?a=2"; |
|
13 | - header($header); |
|
12 | + $header = "Location: index.php?a=2"; |
|
13 | + header($header); |
|
14 | 14 | } else { |
15 | - // Remove single locks via AJAX / window.onbeforeunload |
|
16 | - $type = (int)$_GET['type']; |
|
17 | - $id = (int)$_GET['id']; |
|
18 | - $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
|
19 | - if($type && $id) { |
|
20 | - $modx->unlockElement($type, $id, $includeAllUsers); |
|
21 | - echo '1'; |
|
22 | - exit; |
|
23 | - } else { |
|
24 | - echo 'No type or id sent with request.'; |
|
25 | - } |
|
15 | + // Remove single locks via AJAX / window.onbeforeunload |
|
16 | + $type = (int)$_GET['type']; |
|
17 | + $id = (int)$_GET['id']; |
|
18 | + $includeAllUsers = $modx->hasPermission('remove_locks'); // Enables usage of "unlock"-ajax-button |
|
19 | + if($type && $id) { |
|
20 | + $modx->unlockElement($type, $id, $includeAllUsers); |
|
21 | + echo '1'; |
|
22 | + exit; |
|
23 | + } else { |
|
24 | + echo 'No type or id sent with request.'; |
|
25 | + } |
|
26 | 26 | } |
@@ -3,12 +3,12 @@ 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('edit_template')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_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 | // count duplicates |
@@ -19,37 +19,37 @@ discard block |
||
19 | 19 | |
20 | 20 | // duplicate TV |
21 | 21 | $newid = $modx->db->insert( |
22 | - array( |
|
23 | - 'type'=>'', |
|
24 | - 'name'=>'', |
|
25 | - 'caption'=>'', |
|
26 | - 'description'=>'', |
|
27 | - 'default_text'=>'', |
|
28 | - 'elements'=>'', |
|
29 | - 'rank'=>'', |
|
30 | - 'display'=>'', |
|
31 | - 'display_params'=>'', |
|
32 | - 'category'=>'', |
|
33 | - ), $modx->getFullTableName('site_tmplvars'), // Insert into |
|
34 | - "type, CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, CONCAT(caption, ' Duplicate{$count}') AS caption, description, default_text, elements, rank, display, display_params, category", $modx->getFullTableName('site_tmplvars'), "id='{$id}'"); // Copy from |
|
22 | + array( |
|
23 | + 'type'=>'', |
|
24 | + 'name'=>'', |
|
25 | + 'caption'=>'', |
|
26 | + 'description'=>'', |
|
27 | + 'default_text'=>'', |
|
28 | + 'elements'=>'', |
|
29 | + 'rank'=>'', |
|
30 | + 'display'=>'', |
|
31 | + 'display_params'=>'', |
|
32 | + 'category'=>'', |
|
33 | + ), $modx->getFullTableName('site_tmplvars'), // Insert into |
|
34 | + "type, CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, CONCAT(caption, ' Duplicate{$count}') AS caption, description, default_text, elements, rank, display, display_params, category", $modx->getFullTableName('site_tmplvars'), "id='{$id}'"); // Copy from |
|
35 | 35 | |
36 | 36 | |
37 | 37 | // duplicate TV Template Access Permissions |
38 | 38 | $modx->db->insert( |
39 | - array( |
|
40 | - 'tmplvarid'=>'', |
|
41 | - 'templateid'=>'', |
|
42 | - 'rank'=>'', |
|
43 | - ), $modx->getFullTableName('site_tmplvar_templates'), // Insert into |
|
44 | - "'{$newid}', templateid, rank", $modx->getFullTableName('site_tmplvar_templates'), "tmplvarid='{$id}'"); // Copy from |
|
39 | + array( |
|
40 | + 'tmplvarid'=>'', |
|
41 | + 'templateid'=>'', |
|
42 | + 'rank'=>'', |
|
43 | + ), $modx->getFullTableName('site_tmplvar_templates'), // Insert into |
|
44 | + "'{$newid}', templateid, rank", $modx->getFullTableName('site_tmplvar_templates'), "tmplvarid='{$id}'"); // Copy from |
|
45 | 45 | |
46 | 46 | // duplicate TV Access Permissions |
47 | 47 | $modx->db->insert( |
48 | - array( |
|
49 | - 'tmplvarid'=>'', |
|
50 | - 'documentgroup'=>'', |
|
51 | - ), $modx->getFullTableName('site_tmplvar_access'), // Insert into |
|
52 | - "'{$newid}', documentgroup", $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); // Copy from |
|
48 | + array( |
|
49 | + 'tmplvarid'=>'', |
|
50 | + 'documentgroup'=>'', |
|
51 | + ), $modx->getFullTableName('site_tmplvar_access'), // Insert into |
|
52 | + "'{$newid}', documentgroup", $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); // Copy from |
|
53 | 53 | |
54 | 54 | // Set the item name for logger |
55 | 55 | $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_tmplvars'), "id='{$newid}'")); |
@@ -3,22 +3,22 @@ |
||
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('delete_role')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_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 | if($id==1){ |
15 | - $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
|
15 | + $modx->webAlertAndQuit("The role you are trying to delete is the admin role. This role cannot be deleted!"); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_attributes'), "role='{$id}'"); |
19 | 19 | $count=$modx->db->getValue($rs); |
20 | 20 | if($count>0){ |
21 | - $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
|
21 | + $modx->webAlertAndQuit("There are users with this role. It can't be deleted."); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | // Set the item name for logger |
@@ -1,26 +1,26 @@ 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 | if(!$modx->hasPermission('delete_template')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id']) ? (int)$_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 | $forced = isset($_GET['force']) ? $_GET['force'] : 0; |
15 | 15 | |
16 | 16 | // check for relations |
17 | 17 | if(!$forced) { |
18 | - $drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content') . " AS sc |
|
18 | + $drs = $modx->db->select('sc.id, sc.pagetitle,sc.description', $modx->getFullTableName('site_content') . " AS sc |
|
19 | 19 | INNER JOIN " . $modx->getFullTableName('site_tmplvar_contentvalues') . " AS stcv ON stcv.contentid=sc.id", "stcv.tmplvarid='{$id}'"); |
20 | - $count = $modx->db->getRecordCount($drs); |
|
21 | - if($count > 0) { |
|
22 | - include_once "header.inc.php"; |
|
23 | - ?> |
|
20 | + $count = $modx->db->getRecordCount($drs); |
|
21 | + if($count > 0) { |
|
22 | + include_once "header.inc.php"; |
|
23 | + ?> |
|
24 | 24 | <script> |
25 | 25 | var actions = { |
26 | 26 | delete: function() { |
@@ -42,17 +42,17 @@ discard block |
||
42 | 42 | <p><?= $_lang['tmplvar_inuse'] ?></p> |
43 | 43 | <ul> |
44 | 44 | <?php |
45 | - while($row = $modx->db->getRow($drs)) { |
|
46 | - echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['description'] != '' ? ' - ' . $row['description'] : '') . '</li>'; |
|
47 | - } |
|
48 | - ?> |
|
45 | + while($row = $modx->db->getRow($drs)) { |
|
46 | + echo '<li><span style="width: 200px"><a href="index.php?id=' . $row['id'] . '&a=27">' . $row['pagetitle'] . '</a></span>' . ($row['description'] != '' ? ' - ' . $row['description'] : '') . '</li>'; |
|
47 | + } |
|
48 | + ?> |
|
49 | 49 | </ul> |
50 | 50 | </div> |
51 | 51 | </div> |
52 | 52 | <?php |
53 | - include_once "footer.inc.php"; |
|
54 | - exit; |
|
55 | - } |
|
53 | + include_once "footer.inc.php"; |
|
54 | + exit; |
|
55 | + } |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // Set the item name for logger |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | // invoke OnBeforeTVFormDelete event |
63 | 63 | $modx->invokeEvent("OnBeforeTVFormDelete", array( |
64 | - "id" => $id |
|
64 | + "id" => $id |
|
65 | 65 | )); |
66 | 66 | |
67 | 67 | // delete variable |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // invoke OnTVFormDelete event |
80 | 80 | $modx->invokeEvent("OnTVFormDelete", array( |
81 | - "id" => $id |
|
81 | + "id" => $id |
|
82 | 82 | )); |
83 | 83 | |
84 | 84 | // empty cache |
@@ -3,12 +3,12 @@ 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('new_template')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_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 | // count duplicates |
@@ -19,22 +19,22 @@ discard block |
||
19 | 19 | |
20 | 20 | // duplicate template |
21 | 21 | $newid = $modx->db->insert( |
22 | - array( |
|
23 | - 'templatename'=>'', |
|
24 | - 'description'=>'', |
|
25 | - 'content'=>'', |
|
26 | - 'category'=>'', |
|
27 | - ), $modx->getFullTableName('site_templates'), // Insert into |
|
28 | - "CONCAT(templatename, ' {$_lang['duplicated_el_suffix']}{$count}') AS templatename, description, content, category", $modx->getFullTableName('site_templates'), "id='{$id}'"); // Copy from |
|
22 | + array( |
|
23 | + 'templatename'=>'', |
|
24 | + 'description'=>'', |
|
25 | + 'content'=>'', |
|
26 | + 'category'=>'', |
|
27 | + ), $modx->getFullTableName('site_templates'), // Insert into |
|
28 | + "CONCAT(templatename, ' {$_lang['duplicated_el_suffix']}{$count}') AS templatename, description, content, category", $modx->getFullTableName('site_templates'), "id='{$id}'"); // Copy from |
|
29 | 29 | |
30 | 30 | // duplicate TV values |
31 | 31 | $modx->db->insert( |
32 | - array( |
|
33 | - 'tmplvarid'=>'', |
|
34 | - 'templateid'=>'', |
|
35 | - 'rank'=>'', |
|
36 | - ), $modx->getFullTableName('site_tmplvar_templates'), // Insert into |
|
37 | - "tmplvarid, '{$newid}', rank", $modx->getFullTableName('site_tmplvar_templates'), "templateid='{$id}'"); // Copy from |
|
32 | + array( |
|
33 | + 'tmplvarid'=>'', |
|
34 | + 'templateid'=>'', |
|
35 | + 'rank'=>'', |
|
36 | + ), $modx->getFullTableName('site_tmplvar_templates'), // Insert into |
|
37 | + "tmplvarid, '{$newid}', rank", $modx->getFullTableName('site_tmplvar_templates'), "templateid='{$id}'"); // Copy from |
|
38 | 38 | |
39 | 39 | // Set the item name for logger |
40 | 40 | $name = $modx->db->getValue($modx->db->select('templatename', $modx->getFullTableName('site_templates'), "id='{$newid}'")); |
@@ -3,12 +3,12 @@ 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('save_document')||!$modx->hasPermission('publish_document')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_REQUEST['id'])? (int)$_REQUEST['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 | /************webber ********/ |
@@ -33,20 +33,20 @@ discard block |
||
33 | 33 | $udperms->role = $_SESSION['mgrRole']; |
34 | 34 | |
35 | 35 | if(!$udperms->checkPermissions()) { |
36 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
36 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | // update the document |
40 | 40 | $modx->db->update( |
41 | - array( |
|
42 | - 'published' => 1, |
|
43 | - 'pub_date' => 0, |
|
44 | - 'unpub_date' => 0, |
|
45 | - 'editedby' => $modx->getLoginUserID(), |
|
46 | - 'editedon' => time(), |
|
47 | - 'publishedby' => $modx->getLoginUserID(), |
|
48 | - 'publishedon' => time(), |
|
49 | - ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
41 | + array( |
|
42 | + 'published' => 1, |
|
43 | + 'pub_date' => 0, |
|
44 | + 'unpub_date' => 0, |
|
45 | + 'editedby' => $modx->getLoginUserID(), |
|
46 | + 'editedon' => time(), |
|
47 | + 'publishedby' => $modx->getLoginUserID(), |
|
48 | + 'publishedon' => time(), |
|
49 | + ), $modx->getFullTableName('site_content'), "id='{$id}'"); |
|
50 | 50 | |
51 | 51 | // invoke OnDocPublished event |
52 | 52 | $modx->invokeEvent("OnDocPublished",array("docid"=>$id)); |