@@ -11,7 +11,8 @@ discard block |
||
| 11 | 11 | # ----------------------------------------- |
| 12 | 12 | # |
| 13 | 13 | |
| 14 | -class DataSetPager implements DataSetPagerInterface{ |
|
| 14 | +class DataSetPager implements DataSetPagerInterface |
|
| 15 | +{ |
|
| 15 | 16 | |
| 16 | 17 | public $ds; // datasource |
| 17 | 18 | public $pageSize; |
@@ -33,7 +34,8 @@ discard block |
||
| 33 | 34 | public $renderPagerFncArgs; |
| 34 | 35 | public static $dataSetPagerCnt; |
| 35 | 36 | |
| 36 | - public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) { |
|
| 37 | + public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) |
|
| 38 | + { |
|
| 37 | 39 | global $_PAGE; // use view state object |
| 38 | 40 | |
| 39 | 41 | // set id |
@@ -61,35 +63,42 @@ discard block |
||
| 61 | 63 | $this->pager = ''; |
| 62 | 64 | } |
| 63 | 65 | |
| 64 | - public function getRenderedPager() { |
|
| 66 | + public function getRenderedPager() |
|
| 67 | + { |
|
| 65 | 68 | return $this->pager; |
| 66 | 69 | } |
| 67 | 70 | |
| 68 | - public function getRenderedRows() { |
|
| 71 | + public function getRenderedRows() |
|
| 72 | + { |
|
| 69 | 73 | return $this->rows; |
| 70 | 74 | } |
| 71 | 75 | |
| 72 | - public function setDataSource($ds) { |
|
| 76 | + public function setDataSource($ds) |
|
| 77 | + { |
|
| 73 | 78 | $this->ds = $ds; |
| 74 | 79 | } |
| 75 | 80 | |
| 76 | - public function setPageSize($ps) { |
|
| 81 | + public function setPageSize($ps) |
|
| 82 | + { |
|
| 77 | 83 | $this->pageSize = $ps; |
| 78 | 84 | } |
| 79 | 85 | |
| 80 | - public function setRenderRowFnc($fncName, $args = "") { |
|
| 86 | + public function setRenderRowFnc($fncName, $args = "") |
|
| 87 | + { |
|
| 81 | 88 | $this->renderRowFnc = &$fncName; |
| 82 | 89 | $this->renderRowFncArgs = $args; // extra agruments |
| 83 | 90 | |
| 84 | 91 | |
| 85 | 92 | } |
| 86 | 93 | |
| 87 | - public function setRenderPagerFnc($fncName, $args = "") { |
|
| 94 | + public function setRenderPagerFnc($fncName, $args = "") |
|
| 95 | + { |
|
| 88 | 96 | $this->renderPagerFnc = $fncName; |
| 89 | 97 | $this->renderPagerFncArgs = $args; // extra agruments |
| 90 | 98 | } |
| 91 | 99 | |
| 92 | - public function render() { |
|
| 100 | + public function render() |
|
| 101 | + { |
|
| 93 | 102 | $modx = evolutionCMS(); global $_PAGE; |
| 94 | 103 | |
| 95 | 104 | $isDataset = $modx->getDatabase()->isResult($this->ds); |
@@ -142,8 +151,10 @@ discard block |
||
| 142 | 151 | $url = $_SERVER['PHP_SELF'] . '?'; |
| 143 | 152 | } |
| 144 | 153 | $i = 0; |
| 145 | - foreach($_GET as $n => $v) if($n != 'dpgn' . $this->id) { |
|
| 154 | + foreach($_GET as $n => $v) { |
|
| 155 | + if($n != 'dpgn' . $this->id) { |
|
| 146 | 156 | $i++; |
| 157 | + } |
|
| 147 | 158 | $url .= (($i > 1) ? "&" : "") . "$n=$v"; |
| 148 | 159 | } |
| 149 | 160 | if($i >= 1) { |
@@ -1,8 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $userid = (int)$value; |
| 3 | 3 | if (!isset($modx->getModifiers()->cache['ui'][$userid])) { |
| 4 | - if ($userid < 0) $user = $modx->getWebUserInfo(abs($userid)); |
|
| 5 | - else $user = $modx->getUserInfo($userid); |
|
| 4 | + if ($userid < 0) { |
|
| 5 | + $user = $modx->getWebUserInfo(abs($userid)); |
|
| 6 | + } else { |
|
| 7 | + $user = $modx->getUserInfo($userid); |
|
| 8 | + } |
|
| 6 | 9 | $modx->getModifiers()->cache['ui'][$userid] = $user; |
| 7 | 10 | } else { |
| 8 | 11 | $user = $modx->getModifiers()->cache['ui'][$userid]; |
@@ -1,9 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(strpos($opt,',')) list($limit,$delim) = explode(',', $opt); |
|
| 3 | -elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';} |
|
| 4 | -else {$limit=124;$delim='';} |
|
| 2 | +if(strpos($opt,',')) { |
|
| 3 | + list($limit,$delim) = explode(',', $opt); |
|
| 4 | +} elseif(preg_match('/^[1-9][0-9]*$/',$opt)) {$limit=$opt;$delim='';} else {$limit=124;$delim='';} |
|
| 5 | 5 | |
| 6 | -if($delim==='') $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.'; |
|
| 6 | +if($delim==='') { |
|
| 7 | + $delim = $modx->config['manager_language']==='japanese-utf8' ? '。' : '.'; |
|
| 8 | +} |
|
| 7 | 9 | $limit = (int)$limit; |
| 8 | 10 | |
| 9 | 11 | $content = $modx->getModifiers()->parseDocumentSource($value); |
@@ -11,8 +13,9 @@ discard block |
||
| 11 | 13 | $content = strip_tags($content); |
| 12 | 14 | |
| 13 | 15 | $content = str_replace(array("\r\n","\r","\n","\t",' '),' ',$content); |
| 14 | -if(preg_match('/\s+/',$content)) |
|
| 16 | +if(preg_match('/\s+/',$content)) { |
|
| 15 | 17 | $content = preg_replace('/\s+/',' ',$content); |
| 18 | +} |
|
| 16 | 19 | $content = trim($content); |
| 17 | 20 | |
| 18 | 21 | $pos = $modx->getModifiers()->strpos($content, $delim); |
@@ -21,23 +24,35 @@ discard block |
||
| 21 | 24 | $_ = explode($delim, $content); |
| 22 | 25 | $text = ''; |
| 23 | 26 | foreach($_ as $v) { |
| 24 | - if($limit <= $modx->getModifiers()->strlen($text.$v.$delim)) break; |
|
| 27 | + if($limit <= $modx->getModifiers()->strlen($text.$v.$delim)) { |
|
| 28 | + break; |
|
| 29 | + } |
|
| 25 | 30 | $text .= $v.$delim; |
| 26 | 31 | } |
| 27 | - if($text) $content = $text; |
|
| 28 | -} |
|
| 32 | + if($text) { |
|
| 33 | + $content = $text; |
|
| 34 | + } |
|
| 35 | + } |
|
| 29 | 36 | |
| 30 | 37 | if($limit<$modx->getModifiers()->strlen($content) && strpos($content,' ')!==false) { |
| 31 | 38 | $_ = explode(' ', $content); |
| 32 | 39 | $text = ''; |
| 33 | 40 | foreach($_ as $v) { |
| 34 | - if($limit <= $modx->getModifiers()->strlen($text.$v.' ')) break; |
|
| 41 | + if($limit <= $modx->getModifiers()->strlen($text.$v.' ')) { |
|
| 42 | + break; |
|
| 43 | + } |
|
| 35 | 44 | $text .= $v . ' '; |
| 36 | 45 | } |
| 37 | - if($text!=='') $content = $text; |
|
| 38 | -} |
|
| 46 | + if($text!=='') { |
|
| 47 | + $content = $text; |
|
| 48 | + } |
|
| 49 | + } |
|
| 39 | 50 | |
| 40 | -if($limit < $modx->getModifiers()->strlen($content)) $content = $modx->getModifiers()->substr($content, 0, $limit); |
|
| 41 | -if($modx->getModifiers()->substr($content,-1)==$delim) $content = rtrim($content,$delim) . $delim; |
|
| 51 | +if($limit < $modx->getModifiers()->strlen($content)) { |
|
| 52 | + $content = $modx->getModifiers()->substr($content, 0, $limit); |
|
| 53 | +} |
|
| 54 | +if($modx->getModifiers()->substr($content,-1)==$delim) { |
|
| 55 | + $content = rtrim($content,$delim) . $delim; |
|
| 56 | +} |
|
| 42 | 57 | |
| 43 | 58 | return $content; |
@@ -573,7 +573,8 @@ |
||
| 573 | 573 | * @return array|string |
| 574 | 574 | */ |
| 575 | 575 | function parseInput($src, $delim = "||", $type = "string", $columns = true) |
| 576 | - { // type can be: string, array |
|
| 576 | + { |
|
| 577 | +// type can be: string, array |
|
| 577 | 578 | $modx = evolutionCMS(); |
| 578 | 579 | if ($modx->getDatabase()->isResult($src)) { |
| 579 | 580 | // must be a recordset |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | * @see https://github.com/theseer/Autoload |
| 4 | 4 | */ |
| 5 | 5 | spl_autoload_register( |
| 6 | - function($class) { |
|
| 6 | + function($class){ |
|
| 7 | 7 | static $classes = null; |
| 8 | 8 | if ($classes === null) { |
| 9 | 9 | $classes = array( |
@@ -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->getDatabase()->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->getDatabase()->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");
|
@@ -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,29 +35,29 @@ 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 | 48 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
|
| 49 | -if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
|
|
| 49 | +if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
| 50 | 50 | $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
| 51 | -} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
|
|
| 51 | +} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
| 52 | 52 | $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $navbar_position = $modx->config['manager_menu_position']; |
| 56 | -if ($navbar_position == 'left') {
|
|
| 56 | +if ($navbar_position == 'left') { |
|
| 57 | 57 | $body_class .= ' navbar-left navbar-left-icon-and-text'; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | -if (isset($modx->pluginCache['ElementsInTree'])) {
|
|
| 60 | +if (isset($modx->pluginCache['ElementsInTree'])) { |
|
| 61 | 61 | $body_class .= ' ElementsInTree'; |
| 62 | 62 | } |
| 63 | 63 | |
@@ -73,19 +73,19 @@ discard block |
||
| 73 | 73 | 'type8' => $_lang["lock_element_type_8"] |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | -foreach ($unlockTranslations as $key => $value) {
|
|
| 76 | +foreach ($unlockTranslations as $key => $value) { |
|
| 77 | 77 | $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $user = $modx->getUserInfo($modx->getLoginUserID()); |
| 81 | -if ($user['which_browser'] == 'default') {
|
|
| 81 | +if ($user['which_browser'] == 'default') { |
|
| 82 | 82 | $user['which_browser'] = $modx->config['which_browser']; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/page.css?v=' . $lastInstallTime; |
| 86 | 86 | |
| 87 | -if ($modx->config['manager_theme'] == 'default') {
|
|
| 88 | - 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')) {
|
|
| 87 | +if ($modx->config['manager_theme'] == 'default') { |
|
| 88 | + 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')) { |
|
| 89 | 89 | require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
| 90 | 90 | $minifier = new Formatter\CSSMinify(); |
| 91 | 91 | $minifier->addFile(MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css'); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $css = $minifier->minify(); |
| 103 | 103 | file_put_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', $css); |
| 104 | 104 | } |
| 105 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
|
|
| 105 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
| 106 | 106 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <?php |
| 258 | 258 | // invoke OnManagerTopPrerender event |
| 259 | 259 | $evtOut = $modx->invokeEvent('OnManagerTopPrerender', $_REQUEST);
|
| 260 | - if (is_array($evtOut)) {
|
|
| 260 | + if (is_array($evtOut)) { |
|
| 261 | 261 | echo implode("\n", $evtOut);
|
| 262 | 262 | } |
| 263 | 263 | ?> |
@@ -428,11 +428,14 @@ discard block |
||
| 428 | 428 | <div id="evo-tab-page-home" class="evo-tab-page show iframe-scroller"> |
| 429 | 429 | <iframe id="mainframe" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
| 430 | 430 | </div> |
| 431 | - <?php else: ?> |
|
| 431 | + <?php else { |
|
| 432 | + : ?> |
|
| 432 | 433 | <div class="iframe-scroller"> |
| 433 | 434 | <iframe id="mainframe" name="main" src="index.php?a=<?= $initMainframeAction ?>" scrolling="auto" frameborder="0" onload="modx.main.onload(event);"></iframe> |
| 434 | 435 | </div> |
| 435 | - <?php endif; ?> |
|
| 436 | + <?php endif; |
|
| 437 | +} |
|
| 438 | +?> |
|
| 436 | 439 | <script> |
| 437 | 440 | if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
| 438 | 441 | document.getElementById('mainframe').setAttribute('scrolling', 'no');
|
@@ -451,11 +454,11 @@ discard block |
||
| 451 | 454 | 'tree_sortdir', |
| 452 | 455 | 'tree_nodename' |
| 453 | 456 | ); |
| 454 | - foreach ($sortParams as $param) {
|
|
| 455 | - if (isset($_REQUEST[$param])) {
|
|
| 457 | + foreach ($sortParams as $param) { |
|
| 458 | + if (isset($_REQUEST[$param])) { |
|
| 456 | 459 | $modx->getManagerApi()->saveLastUserSetting($param, $_REQUEST[$param]); |
| 457 | 460 | $_SESSION[$param] = $_REQUEST[$param]; |
| 458 | - } else if (!isset($_SESSION[$param])) {
|
|
| 461 | + } else if (!isset($_SESSION[$param])) { |
|
| 459 | 462 | $_SESSION[$param] = $modx->getManagerApi()->getLastUserSetting($param); |
| 460 | 463 | } |
| 461 | 464 | } |
@@ -506,16 +509,16 @@ discard block |
||
| 506 | 509 | </div> |
| 507 | 510 | |
| 508 | 511 | <?php |
| 509 | - if(!function_exists('constructLink')) {
|
|
| 512 | + if(!function_exists('constructLink')) { |
|
| 510 | 513 | /** |
| 511 | 514 | * @param string $action |
| 512 | 515 | * @param string $img |
| 513 | 516 | * @param string $text |
| 514 | 517 | * @param bool $allowed |
| 515 | 518 | */ |
| 516 | - function constructLink($action, $img, $text, $allowed) |
|
| 517 | - {
|
|
| 518 | - if ((bool)$allowed) {
|
|
| 519 | + function constructLink($action, $img, $text, $allowed) |
|
| 520 | + { |
|
| 521 | + if ((bool)$allowed) { |
|
| 519 | 522 | echo sprintf('<div class="menuLink" id="item%s" onclick="modx.tree.menuHandler(%s);">', $action,
|
| 520 | 523 | $action); |
| 521 | 524 | echo sprintf('<i class="%s"></i> %s</div>', $img, $text);
|
@@ -650,7 +653,7 @@ discard block |
||
| 650 | 653 | ?> |
| 651 | 654 | |
| 652 | 655 | </div> |
| 653 | -<?php if ($modx->config['show_picker'] != "0") {
|
|
| 656 | +<?php if ($modx->config['show_picker'] != "0") { |
|
| 654 | 657 | include('media/style/' . $modx->config['manager_theme'] . '/color.switcher.php');
|
| 655 | 658 | } ?> |
| 656 | 659 | </body> |
@@ -476,7 +476,8 @@ discard block |
||
| 476 | 476 | return s; |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | - <?php if ($content['type'] == 'reference' || $modx->getManagerApi()->action == '72') { // Web Link specific ?> |
|
| 479 | + <?php if ($content['type'] == 'reference' || $modx->getManagerApi()->action == '72') { |
|
| 480 | +// Web Link specific ?> |
|
| 480 | 481 | var lastImageCtrl; |
| 481 | 482 | var lastFileCtrl; |
| 482 | 483 | |
@@ -692,7 +693,8 @@ discard block |
||
| 692 | 693 | </td> |
| 693 | 694 | </tr> |
| 694 | 695 | |
| 695 | - <?php if($content['type'] == 'reference' || $modx->getManagerApi()->action == '72') { // Web Link specific ?> |
|
| 696 | + <?php if($content['type'] == 'reference' || $modx->getManagerApi()->action == '72') { |
|
| 697 | +// Web Link specific ?> |
|
| 696 | 698 | |
| 697 | 699 | <tr> |
| 698 | 700 | <td><span class="warning"><?= $_lang['weblink'] ?></span> |
@@ -1370,7 +1372,9 @@ discard block |
||
| 1370 | 1372 | if($documentId > 0) { |
| 1371 | 1373 | // Load up, the permissions from the parent (if new document) or existing document |
| 1372 | 1374 | $rs = $modx->getDatabase()->select('id, document_group', $tbl_document_groups, "document='{$documentId}'"); |
| 1373 | - while($currentgroup = $modx->getDatabase()->getRow($rs)) $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id']; |
|
| 1375 | + while($currentgroup = $modx->getDatabase()->getRow($rs)) { |
|
| 1376 | + $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id']; |
|
| 1377 | + } |
|
| 1374 | 1378 | |
| 1375 | 1379 | // Load up the current permissions and names |
| 1376 | 1380 | $vs = array( |
@@ -1432,7 +1436,9 @@ discard block |
||
| 1432 | 1436 | |
| 1433 | 1437 | // Create attribute string list |
| 1434 | 1438 | $inputString = array(); |
| 1435 | - foreach($inputAttributes as $k => $v) $inputString[] = $k . '="' . $v . '"'; |
|
| 1439 | + foreach($inputAttributes as $k => $v) { |
|
| 1440 | + $inputString[] = $k . '="' . $v . '"'; |
|
| 1441 | + } |
|
| 1436 | 1442 | |
| 1437 | 1443 | // Make the <input> HTML |
| 1438 | 1444 | $inputHTML = '<input ' . implode(' ', $inputString) . ' />'; |
@@ -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('logs')) {
|
|
| 5 | +if (!$modx->hasPermission('logs')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | <table class="table data table-sm nowrap"> |
| 56 | 56 | <tbody> |
| 57 | 57 | <?php |
| 58 | - foreach ($serverArr as $key => $value) {
|
|
| 58 | + foreach ($serverArr as $key => $value) { |
|
| 59 | 59 | ?> |
| 60 | 60 | <tr> |
| 61 | 61 | <td width="1%"><?= $key ?></td> |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $sql = "SHOW TABLE STATUS FROM $dbase LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%';"; |
| 99 | 99 | $rs = $modx->getDatabase()->query($sql); |
| 100 | 100 | $i = 0; |
| 101 | - while ($log_status = $modx->getDatabase()->getRow($rs)) {
|
|
| 101 | + while ($log_status = $modx->getDatabase()->getRow($rs)) { |
|
| 102 | 102 | ?> |
| 103 | 103 | <tr> |
| 104 | 104 | <td class="text-primary"><b><?= $log_status['Name'] ?></b></td> |
@@ -110,17 +110,17 @@ discard block |
||
| 110 | 110 | $modx->getDatabase()->config['table_prefix'] . 'event_log', |
| 111 | 111 | $modx->getDatabase()->config['table_prefix'] . 'manager_log', |
| 112 | 112 | ); |
| 113 | - if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) {
|
|
| 113 | + if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) { |
|
| 114 | 114 | echo "<td class=\"text-xs-right\">"; |
| 115 | 115 | echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=" . $log_status['Name'] . "' title='" . $_lang['truncate_table'] . "'>" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</a>"; |
| 116 | 116 | echo "</td>"; |
| 117 | - } else {
|
|
| 117 | + } else { |
|
| 118 | 118 | echo "<td class=\"text-xs-right\">" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</td>"; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if ($modx->hasPermission('settings')) {
|
|
| 121 | + if ($modx->hasPermission('settings')) { |
|
| 122 | 122 | echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=" . $log_status['Name'] . "' title='" . $_lang['optimize_table'] . "' ><span>" . $modx->nicesize($log_status['Data_free']) . "</span></a>" : "-") . "</td>"; |
| 123 | - } else {
|
|
| 123 | + } else { |
|
| 124 | 124 | echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-") . "</td>"; |
| 125 | 125 | } |
| 126 | 126 | ?> |