@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if(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('export_static')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // figure out the base of the server, so we know where to get the documents in order to export them |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | <div class="container container-body"> |
| 37 | 37 | <?php |
| 38 | - if(isset($_POST['export'])) { |
|
| 39 | - $rs = include_once(MODX_MANAGER_PATH . 'processors/export_site.processor.php'); |
|
| 40 | - echo $rs; |
|
| 41 | - } else { |
|
| 42 | - ?> |
|
| 38 | + if(isset($_POST['export'])) { |
|
| 39 | + $rs = include_once(MODX_MANAGER_PATH . 'processors/export_site.processor.php'); |
|
| 40 | + echo $rs; |
|
| 41 | + } else { |
|
| 42 | + ?> |
|
| 43 | 43 | <form action="index.php" method="post" name="exportFrm"> |
| 44 | 44 | <input type="hidden" name="export" value="export" /> |
| 45 | 45 | <input type="hidden" name="a" value="83" /> |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | </script> |
| 82 | 82 | </form> |
| 83 | 83 | <?php |
| 84 | - } |
|
| 85 | - ?> |
|
| 84 | + } |
|
| 85 | + ?> |
|
| 86 | 86 | </div> |
| 87 | 87 | </div> |
| 88 | 88 | |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE != "true") { |
|
| 2 | +if (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('export_static')) { |
|
| 5 | +if (!$modx->hasPermission('export_static')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | <div class="container container-body"> |
| 37 | 37 | <?php |
| 38 | - if(isset($_POST['export'])) { |
|
| 39 | - $rs = include_once(MODX_MANAGER_PATH . 'processors/export_site.processor.php'); |
|
| 38 | + if (isset($_POST['export'])) { |
|
| 39 | + $rs = include_once(MODX_MANAGER_PATH.'processors/export_site.processor.php'); |
|
| 40 | 40 | echo $rs; |
| 41 | 41 | } else { |
| 42 | 42 | ?> |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | <a href="javascript:;" class="btn btn-primary" onclick="document.exportFrm.submit();jQuery(this).hide();"><i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang["export_site_start"] ?></a> |
| 77 | 77 | <script> |
| 78 | 78 | jQuery('#exportButton a').click(function() { |
| 79 | - jQuery(this).parent().html('<?= $_style['ajax_loader'];?>'); |
|
| 79 | + jQuery(this).parent().html('<?= $_style['ajax_loader']; ?>'); |
|
| 80 | 80 | }); |
| 81 | 81 | </script> |
| 82 | 82 | </form> |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if(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('edit_user')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | ?> |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | <div class="form-group"><?= $_lang['role_management_msg'] ?> <a class="btn btn-secondary btn-sm" href="index.php?a=38"><i class="<?= $_style["actions_new"] ?> hide4desktop"></i> <?= $_lang['new_role'] ?></a></div> |
| 19 | 19 | <div class="form-group"> |
| 20 | 20 | <?php |
| 21 | - $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
|
| 22 | - $limit = $modx->db->getRecordCount($rs); |
|
| 23 | - if($limit < 1) { |
|
| 24 | - ?> |
|
| 21 | + $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
|
| 22 | + $limit = $modx->db->getRecordCount($rs); |
|
| 23 | + if($limit < 1) { |
|
| 24 | + ?> |
|
| 25 | 25 | <p><?= $_lang["no_records_found"] ?></p> |
| 26 | 26 | <?php |
| 27 | - } else { |
|
| 28 | - ?> |
|
| 27 | + } else { |
|
| 28 | + ?> |
|
| 29 | 29 | <div class="row"> |
| 30 | 30 | <div class="table-responsive"> |
| 31 | 31 | <table class="table data"> |
@@ -37,24 +37,24 @@ discard block |
||
| 37 | 37 | </thead> |
| 38 | 38 | <tbody> |
| 39 | 39 | <?php |
| 40 | - while($row = $modx->db->getRow($rs)) { |
|
| 41 | - if($row['id'] == 1) { |
|
| 42 | - ?> |
|
| 40 | + while($row = $modx->db->getRow($rs)) { |
|
| 41 | + if($row['id'] == 1) { |
|
| 42 | + ?> |
|
| 43 | 43 | <tr class="text-muted disabled"> |
| 44 | 44 | <td><b><?= $row['name'] ?></b></td> |
| 45 | 45 | <td><span><?= $_lang['administrator_role_message'] ?></span></td> |
| 46 | 46 | </tr> |
| 47 | 47 | <?php |
| 48 | - } else { |
|
| 49 | - ?> |
|
| 48 | + } else { |
|
| 49 | + ?> |
|
| 50 | 50 | <tr> |
| 51 | 51 | <td><a class="text-primary" href="index.php?id=<?= $row['id'] ?>&a=35"><?= $row['name'] ?></a></td> |
| 52 | 52 | <td><?= $row['description'] ?></td> |
| 53 | 53 | </tr> |
| 54 | 54 | <?php |
| 55 | - } |
|
| 56 | - } |
|
| 57 | - ?> |
|
| 55 | + } |
|
| 56 | + } |
|
| 57 | + ?> |
|
| 58 | 58 | </tbody> |
| 59 | 59 | </table> |
| 60 | 60 | </div> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE != "true") { |
|
| 2 | +if (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('edit_user')) { |
|
| 5 | +if (!$modx->hasPermission('edit_user')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | <?php |
| 21 | 21 | $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
| 22 | 22 | $limit = $modx->db->getRecordCount($rs); |
| 23 | - if($limit < 1) { |
|
| 23 | + if ($limit < 1) { |
|
| 24 | 24 | ?> |
| 25 | 25 | <p><?= $_lang["no_records_found"] ?></p> |
| 26 | 26 | <?php |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | </thead> |
| 38 | 38 | <tbody> |
| 39 | 39 | <?php |
| 40 | - while($row = $modx->db->getRow($rs)) { |
|
| 41 | - if($row['id'] == 1) { |
|
| 40 | + while ($row = $modx->db->getRow($rs)) { |
|
| 41 | + if ($row['id'] == 1) { |
|
| 42 | 42 | ?> |
| 43 | 43 | <tr class="text-muted disabled"> |
| 44 | 44 | <td><b><?= $row['name'] ?></b></td> |
@@ -1,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if(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('view_eventlog')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // get id |
@@ -41,18 +41,18 @@ discard block |
||
| 41 | 41 | <div class="tab-page"> |
| 42 | 42 | <div class="container container-body"> |
| 43 | 43 | <?php |
| 44 | - $date = $modx->toDateFormat($content["createdon"]); |
|
| 45 | - if($content["type"] == 1) { |
|
| 46 | - $icon = $_style['actions_info'] . ' text-info'; |
|
| 47 | - $msgtype = $_lang["information"]; |
|
| 48 | - } else if($content["type"] == 2) { |
|
| 49 | - $icon = $_style['actions_triangle'] . ' text-warning'; |
|
| 50 | - $msgtype = $_lang["warning"]; |
|
| 51 | - } else if($content["type"] == 3) { |
|
| 52 | - $icon = $_style['actions_error'] . ' text-danger'; |
|
| 53 | - $msgtype = $_lang["error"]; |
|
| 54 | - } |
|
| 55 | - ?> |
|
| 44 | + $date = $modx->toDateFormat($content["createdon"]); |
|
| 45 | + if($content["type"] == 1) { |
|
| 46 | + $icon = $_style['actions_info'] . ' text-info'; |
|
| 47 | + $msgtype = $_lang["information"]; |
|
| 48 | + } else if($content["type"] == 2) { |
|
| 49 | + $icon = $_style['actions_triangle'] . ' text-warning'; |
|
| 50 | + $msgtype = $_lang["warning"]; |
|
| 51 | + } else if($content["type"] == 3) { |
|
| 52 | + $icon = $_style['actions_error'] . ' text-danger'; |
|
| 53 | + $msgtype = $_lang["error"]; |
|
| 54 | + } |
|
| 55 | + ?> |
|
| 56 | 56 | <p><b><?= $content['source'] . " - " . $_lang['eventlog_viewer'] ?></b></p> |
| 57 | 57 | <p> |
| 58 | 58 | <i class="<?= $icon ?>"></i> <?= $msgtype ?> |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE != "true") { |
|
| 2 | +if (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('view_eventlog')) { |
|
| 5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | // get id |
| 10 | 10 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
| 11 | 11 | |
| 12 | -$ds = $modx->db->select('el.*, IFNULL(wu.username,mu.username) as username', $modx->getFullTableName("event_log") . " el |
|
| 13 | - LEFT JOIN " . $modx->getFullTableName("manager_users") . " mu ON mu.id=el.user AND el.usertype=0 |
|
| 14 | - LEFT JOIN " . $modx->getFullTableName("web_users") . " wu ON wu.id=el.user AND el.usertype=1", "el.id='{$id}'"); |
|
| 12 | +$ds = $modx->db->select('el.*, IFNULL(wu.username,mu.username) as username', $modx->getFullTableName("event_log")." el |
|
| 13 | + LEFT JOIN " . $modx->getFullTableName("manager_users")." mu ON mu.id=el.user AND el.usertype=0 |
|
| 14 | + LEFT JOIN " . $modx->getFullTableName("web_users")." wu ON wu.id=el.user AND el.usertype=1", "el.id='{$id}'"); |
|
| 15 | 15 | $content = $modx->db->getRow($ds); |
| 16 | 16 | |
| 17 | 17 | ?> |
@@ -42,18 +42,18 @@ discard block |
||
| 42 | 42 | <div class="container container-body"> |
| 43 | 43 | <?php |
| 44 | 44 | $date = $modx->toDateFormat($content["createdon"]); |
| 45 | - if($content["type"] == 1) { |
|
| 46 | - $icon = $_style['actions_info'] . ' text-info'; |
|
| 45 | + if ($content["type"] == 1) { |
|
| 46 | + $icon = $_style['actions_info'].' text-info'; |
|
| 47 | 47 | $msgtype = $_lang["information"]; |
| 48 | - } else if($content["type"] == 2) { |
|
| 49 | - $icon = $_style['actions_triangle'] . ' text-warning'; |
|
| 48 | + } else if ($content["type"] == 2) { |
|
| 49 | + $icon = $_style['actions_triangle'].' text-warning'; |
|
| 50 | 50 | $msgtype = $_lang["warning"]; |
| 51 | - } else if($content["type"] == 3) { |
|
| 52 | - $icon = $_style['actions_error'] . ' text-danger'; |
|
| 51 | + } else if ($content["type"] == 3) { |
|
| 52 | + $icon = $_style['actions_error'].' text-danger'; |
|
| 53 | 53 | $msgtype = $_lang["error"]; |
| 54 | 54 | } |
| 55 | 55 | ?> |
| 56 | - <p><b><?= $content['source'] . " - " . $_lang['eventlog_viewer'] ?></b></p> |
|
| 56 | + <p><b><?= $content['source']." - ".$_lang['eventlog_viewer'] ?></b></p> |
|
| 57 | 57 | <p> |
| 58 | 58 | <i class="<?= $icon ?>"></i> <?= $msgtype ?> |
| 59 | 59 | </p> |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | if(!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') exit(); |
| 3 | 3 | |
| 4 | 4 | if(!$modx->hasPermission('delete_plugin')) { |
| 5 | - $e->setError(3); |
|
| 6 | - $e->dumpError(); |
|
| 5 | + $e->setError(3); |
|
| 6 | + $e->dumpError(); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | $tbl_site_plugins = $modx->getFullTablename('site_plugins'); |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') exit(); |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') exit(); |
|
| 3 | 3 | |
| 4 | -if(!$modx->hasPermission('delete_plugin')) { |
|
| 4 | +if (!$modx->hasPermission('delete_plugin')) { |
|
| 5 | 5 | $e->setError(3); |
| 6 | 6 | $e->dumpError(); |
| 7 | 7 | } |
@@ -12,18 +12,18 @@ discard block |
||
| 12 | 12 | // Get unique list of latest added plugins by highest sql-id |
| 13 | 13 | $rs = $modx->db->query("SELECT t1.id FROM {$tbl_site_plugins} t1 LEFT JOIN {$tbl_site_plugins} t2 ON (t1.name = t2.name AND t1.id < t2.id) WHERE t2.id IS NULL;"); |
| 14 | 14 | $latestIds = array(); |
| 15 | -while($row = $modx->db->getRow($rs)) { |
|
| 15 | +while ($row = $modx->db->getRow($rs)) { |
|
| 16 | 16 | $latestIds[] = $row['id']; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | // Get list of plugins with disabled and enabled versions |
| 20 | 20 | $rs = $modx->db->query("SELECT id FROM {$tbl_site_plugins} t1 WHERE disabled = 1 AND name IN (SELECT name FROM {$tbl_site_plugins} t2 WHERE t1.name = t2.name AND t1.id != t2.id)"); |
| 21 | 21 | |
| 22 | -while($row = $modx->db->getRow($rs)) { |
|
| 22 | +while ($row = $modx->db->getRow($rs)) { |
|
| 23 | 23 | |
| 24 | 24 | $id = $row['id']; |
| 25 | 25 | |
| 26 | - if(in_array($id,$latestIds)) continue; // Keep latest version of disabled plugins |
|
| 26 | + if (in_array($id, $latestIds)) continue; // Keep latest version of disabled plugins |
|
| 27 | 27 | |
| 28 | 28 | // invoke OnBeforePluginFormDelete event |
| 29 | 29 | $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id)); |
@@ -1,7 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') exit(); |
|
| 2 | +if(!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') { |
|
| 3 | + exit(); |
|
| 4 | +} |
|
| 3 | 5 | |
| 4 | -if(!$modx->hasPermission('delete_plugin')) { |
|
| 6 | +if(!$modx->hasPermission('delete_plugin')) { |
|
| 5 | 7 | $e->setError(3); |
| 6 | 8 | $e->dumpError(); |
| 7 | 9 | } |
@@ -23,7 +25,10 @@ discard block |
||
| 23 | 25 | |
| 24 | 26 | $id = $row['id']; |
| 25 | 27 | |
| 26 | - if(in_array($id,$latestIds)) continue; // Keep latest version of disabled plugins |
|
| 28 | + if(in_array($id,$latestIds)) { |
|
| 29 | + continue; |
|
| 30 | + } |
|
| 31 | + // Keep latest version of disabled plugins |
|
| 27 | 32 | |
| 28 | 33 | // invoke OnBeforePluginFormDelete event |
| 29 | 34 | $modx->invokeEvent('OnBeforePluginFormDelete', array('id'=> $id)); |
@@ -37,7 +42,7 @@ discard block |
||
| 37 | 42 | if (!$modx->db->delete($tbl_site_plugin_events, "pluginid={$id}")) { |
| 38 | 43 | echo "Something went wrong while trying to delete the plugin events for plugin {$id}"; |
| 39 | 44 | exit; |
| 40 | - } else { |
|
| 45 | + } else { |
|
| 41 | 46 | // invoke OnPluginFormDelete event |
| 42 | 47 | $modx->invokeEvent('OnPluginFormDelete', array('id'=>$id)); |
| 43 | 48 | } |
@@ -7,10 +7,10 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | // invoke OnBeforeManagerLogout event |
| 9 | 9 | $modx->invokeEvent("OnBeforeManagerLogout", |
| 10 | - array( |
|
| 11 | - "userid" => $internalKey, |
|
| 12 | - "username" => $username |
|
| 13 | - )); |
|
| 10 | + array( |
|
| 11 | + "userid" => $internalKey, |
|
| 12 | + "username" => $username |
|
| 13 | + )); |
|
| 14 | 14 | |
| 15 | 15 | //// Unset all of the session variables. |
| 16 | 16 | //$_SESSION = array(); |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | // invoke OnManagerLogout event |
| 35 | 35 | $modx->invokeEvent("OnManagerLogout", |
| 36 | - array( |
|
| 37 | - "userid" => $internalKey, |
|
| 38 | - "username" => $username |
|
| 39 | - )); |
|
| 36 | + array( |
|
| 37 | + "userid" => $internalKey, |
|
| 38 | + "username" => $username |
|
| 39 | + )); |
|
| 40 | 40 | |
| 41 | 41 | // show login screen |
| 42 | 42 | header('Location: ' . MODX_MANAGER_URL); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | 3 | |
| 4 | 4 | $internalKey = $modx->getLoginUserID(); |
| 5 | 5 | $username = $_SESSION['mgrShortname']; |
@@ -39,4 +39,4 @@ discard block |
||
| 39 | 39 | )); |
| 40 | 40 | |
| 41 | 41 | // show login screen |
| 42 | -header('Location: ' . MODX_MANAGER_URL); |
|
| 42 | +header('Location: '.MODX_MANAGER_URL); |
|
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 2 | +if(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."); |
|
| 4 | +} |
|
| 3 | 5 | |
| 4 | 6 | $internalKey = $modx->getLoginUserID(); |
| 5 | 7 | $username = $_SESSION['mgrShortname']; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 21 | 21 | $categoryid = 0; |
| 22 | 22 | } else { |
| 23 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 23 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 24 | 24 | $categoryid = checkCategory($_POST['newcategory']); |
| 25 | 25 | if (!$categoryid) { |
| 26 | 26 | $categoryid = newCategory($_POST['newcategory']); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // finished emptying cache - redirect |
| 81 | 81 | if ($_POST['stay'] != '') { |
| 82 | 82 | $a = ($_POST['stay'] == '2') ? "78&id=$newid" : "77"; |
| 83 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 83 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 84 | 84 | header($header); |
| 85 | 85 | } else { |
| 86 | 86 | $header = "Location: index.php?a=76&r=2"; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | // finished emptying cache - redirect |
| 130 | 130 | if ($_POST['stay'] != '') { |
| 131 | 131 | $a = ($_POST['stay'] == '2') ? "78&id=$id" : "77"; |
| 132 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 132 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 133 | 133 | header($header); |
| 134 | 134 | } else { |
| 135 | 135 | $modx->unlockElement(3, $id); |
@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 3 | 3 | if(!$modx->hasPermission('delete_document')) { |
| 4 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 4 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | $rs = $modx->db->select('id', $modx->getFullTableName('site_content'), "deleted=1"); |
@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | // invoke OnBeforeEmptyTrash event |
| 11 | 11 | $modx->invokeEvent("OnBeforeEmptyTrash", |
| 12 | - array( |
|
| 13 | - "ids"=>$ids |
|
| 14 | - )); |
|
| 12 | + array( |
|
| 13 | + "ids"=>$ids |
|
| 14 | + )); |
|
| 15 | 15 | |
| 16 | 16 | // remove the document groups link. |
| 17 | 17 | $sql = "DELETE document_groups |
@@ -30,15 +30,15 @@ discard block |
||
| 30 | 30 | //'undelete' the document. |
| 31 | 31 | $modx->db->delete($modx->getFullTableName('site_content'), "deleted=1"); |
| 32 | 32 | |
| 33 | - // invoke OnEmptyTrash event |
|
| 34 | - $modx->invokeEvent("OnEmptyTrash", |
|
| 35 | - array( |
|
| 36 | - "ids"=>$ids |
|
| 37 | - )); |
|
| 33 | + // invoke OnEmptyTrash event |
|
| 34 | + $modx->invokeEvent("OnEmptyTrash", |
|
| 35 | + array( |
|
| 36 | + "ids"=>$ids |
|
| 37 | + )); |
|
| 38 | 38 | |
| 39 | - // empty cache |
|
| 40 | - $modx->clearCache('full'); |
|
| 39 | + // empty cache |
|
| 40 | + $modx->clearCache('full'); |
|
| 41 | 41 | |
| 42 | - // finished emptying cache - redirect |
|
| 43 | - $header="Location: index.php?a=2&r=1"; |
|
| 44 | - header($header); |
|
| 42 | + // finished emptying cache - redirect |
|
| 43 | + $header="Location: index.php?a=2&r=1"; |
|
| 44 | + header($header); |
|
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | -if(!$modx->hasPermission('delete_document')) { |
|
| 2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | +if (!$modx->hasPermission('delete_document')) { |
|
| 4 | 4 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 5 | 5 | } |
| 6 | 6 | |
@@ -40,5 +40,5 @@ discard block |
||
| 40 | 40 | $modx->clearCache('full'); |
| 41 | 41 | |
| 42 | 42 | // finished emptying cache - redirect |
| 43 | - $header="Location: index.php?a=2&r=1"; |
|
| 43 | + $header = "Location: index.php?a=2&r=1"; |
|
| 44 | 44 | header($header); |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 2 | +if(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."); |
|
| 4 | +} |
|
| 3 | 5 | if(!$modx->hasPermission('delete_document')) { |
| 4 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 5 | 7 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 25 | 25 | $categoryid = 0; |
| 26 | 26 | } else { |
| 27 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 27 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 28 | 28 | $categoryid = getCategory($_POST['newcategory']); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | $moduleguid = isset($parsed['guid']) ? $parsed['guid'] : $moduleguid; |
| 41 | 41 | |
| 42 | 42 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
| 43 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
| 43 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
| 44 | 44 | if ($version) { |
| 45 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 45 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 46 | 46 | } |
| 47 | 47 | if (isset($parsed['modx_category'])) { |
| 48 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 48 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 49 | 49 | $categoryid = getCategory($parsed['modx_category']); |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | // finished emptying cache - redirect |
| 104 | 104 | if ($_POST['stay'] != '') { |
| 105 | 105 | $a = ($_POST['stay'] == '2') ? "102&id=$newid" : '101'; |
| 106 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
| 106 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
| 107 | 107 | header($header); |
| 108 | 108 | } else { |
| 109 | 109 | $header = 'Location: index.php?a=76&r=2'; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // finished emptying cache - redirect |
| 159 | 159 | if ($_POST['stay'] != '') { |
| 160 | 160 | $a = ($_POST['stay'] == '2') ? "102&id=$id" : '101'; |
| 161 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
| 161 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
| 162 | 162 | header($header); |
| 163 | 163 | } else { |
| 164 | 164 | $modx->unlockElement(5, $id); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | // save selected system events |
| 178 | 178 | $formEventList = array(); |
| 179 | 179 | foreach ($sysevents as $evtId) { |
| 180 | - if(!preg_match('@^[1-9][0-9]*$@',$evtId)) $evtId = getEventIdByName($evtId); |
|
| 180 | + if (!preg_match('@^[1-9][0-9]*$@', $evtId)) $evtId = getEventIdByName($evtId); |
|
| 181 | 181 | if ($mode == '101') { |
| 182 | 182 | $rs = $modx->db->select('max(priority) as priority', '[+prefix+]site_plugin_events', "evtid='{$evtId}'"); |
| 183 | 183 | } else { |
@@ -202,13 +202,13 @@ discard block |
||
| 202 | 202 | $rs = $modx->db->select('*', '[+prefix+]site_plugin_events', sprintf("pluginid='%s'", $id)); |
| 203 | 203 | $dbEventList = array(); |
| 204 | 204 | $del = array(); |
| 205 | - while($row = $modx->db->getRow($rs)) { |
|
| 206 | - if(!in_array($row['evtid'], $evtids)) $del[] = $row['evtid']; |
|
| 205 | + while ($row = $modx->db->getRow($rs)) { |
|
| 206 | + if (!in_array($row['evtid'], $evtids)) $del[] = $row['evtid']; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - if(!$del) return; |
|
| 209 | + if (!$del) return; |
|
| 210 | 210 | |
| 211 | - foreach($del as $delid) { |
|
| 211 | + foreach ($del as $delid) { |
|
| 212 | 212 | $modx->db->delete('[+prefix+]site_plugin_events', sprintf("evtid='%s' AND pluginid='%s'", $delid, $id)); |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -216,9 +216,9 @@ discard block |
||
| 216 | 216 | function getEventIdByName($name) |
| 217 | 217 | { |
| 218 | 218 | global $modx; |
| 219 | - static $eventIds=array(); |
|
| 219 | + static $eventIds = array(); |
|
| 220 | 220 | |
| 221 | - if(isset($eventIds[$name])) return $eventIds[$name]; |
|
| 221 | + if (isset($eventIds[$name])) return $eventIds[$name]; |
|
| 222 | 222 | |
| 223 | 223 | $rs = $modx->db->select('id, name', '[+prefix+]system_eventnames'); |
| 224 | 224 | while ($row = $modx->db->getRow($rs)) { |
@@ -177,7 +177,9 @@ discard block |
||
| 177 | 177 | // save selected system events |
| 178 | 178 | $formEventList = array(); |
| 179 | 179 | foreach ($sysevents as $evtId) { |
| 180 | - if(!preg_match('@^[1-9][0-9]*$@',$evtId)) $evtId = getEventIdByName($evtId); |
|
| 180 | + if(!preg_match('@^[1-9][0-9]*$@',$evtId)) { |
|
| 181 | + $evtId = getEventIdByName($evtId); |
|
| 182 | + } |
|
| 181 | 183 | if ($mode == '101') { |
| 182 | 184 | $rs = $modx->db->select('max(priority) as priority', '[+prefix+]site_plugin_events', "evtid='{$evtId}'"); |
| 183 | 185 | } else { |
@@ -203,10 +205,14 @@ discard block |
||
| 203 | 205 | $dbEventList = array(); |
| 204 | 206 | $del = array(); |
| 205 | 207 | while($row = $modx->db->getRow($rs)) { |
| 206 | - if(!in_array($row['evtid'], $evtids)) $del[] = $row['evtid']; |
|
| 208 | + if(!in_array($row['evtid'], $evtids)) { |
|
| 209 | + $del[] = $row['evtid']; |
|
| 210 | + } |
|
| 207 | 211 | } |
| 208 | 212 | |
| 209 | - if(!$del) return; |
|
| 213 | + if(!$del) { |
|
| 214 | + return; |
|
| 215 | + } |
|
| 210 | 216 | |
| 211 | 217 | foreach($del as $delid) { |
| 212 | 218 | $modx->db->delete('[+prefix+]site_plugin_events', sprintf("evtid='%s' AND pluginid='%s'", $delid, $id)); |
@@ -218,7 +224,9 @@ discard block |
||
| 218 | 224 | global $modx; |
| 219 | 225 | static $eventIds=array(); |
| 220 | 226 | |
| 221 | - if(isset($eventIds[$name])) return $eventIds[$name]; |
|
| 227 | + if(isset($eventIds[$name])) { |
|
| 228 | + return $eventIds[$name]; |
|
| 229 | + } |
|
| 222 | 230 | |
| 223 | 231 | $rs = $modx->db->select('id, name', '[+prefix+]system_eventnames'); |
| 224 | 232 | while ($row = $modx->db->getRow($rs)) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 28 | 28 | $categoryid = 0; |
| 29 | 29 | } else { |
| 30 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 30 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 31 | 31 | $categoryid = checkCategory($_POST['newcategory']); |
| 32 | 32 | if (!$categoryid) { |
| 33 | 33 | $categoryid = newCategory($_POST['newcategory']); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // finished emptying cache - redirect |
| 100 | 100 | if ($_POST['stay'] != '') { |
| 101 | 101 | $a = ($_POST['stay'] == '2') ? "301&id=$newid" : "300"; |
| 102 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 102 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 103 | 103 | header($header); |
| 104 | 104 | } else { |
| 105 | 105 | $header = "Location: index.php?a=76&r=2"; |
@@ -160,11 +160,11 @@ discard block |
||
| 160 | 160 | // finished emptying cache - redirect |
| 161 | 161 | if ($_POST['stay'] != '') { |
| 162 | 162 | $a = ($_POST['stay'] == '2') ? "301&id=$id" : "300"; |
| 163 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay'] . "&or=" . $origin . "&oid=" . $originId; |
|
| 163 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']."&or=".$origin."&oid=".$originId; |
|
| 164 | 164 | header($header); |
| 165 | 165 | } else { |
| 166 | 166 | $modx->unlockElement(2, $id); |
| 167 | - $header = "Location: index.php?a=" . $origin . "&r=2" . ($originId != null ? '&id=' . $originId : ''); |
|
| 167 | + $header = "Location: index.php?a=".$origin."&r=2".($originId != null ? '&id='.$originId : ''); |
|
| 168 | 168 | header($header); |
| 169 | 169 | } |
| 170 | 170 | |