@@ -18,9 +18,9 @@ |
||
| 18 | 18 | exit('send some data'); |
| 19 | 19 | } //?? |
| 20 | 20 | |
| 21 | -$indent = (int)$_REQUEST['indent']; |
|
| 22 | -$parent = (int)$_REQUEST['parent']; |
|
| 23 | -$expandAll = (int)$_REQUEST['expandAll']; |
|
| 21 | +$indent = (int) $_REQUEST['indent']; |
|
| 22 | +$parent = (int) $_REQUEST['parent']; |
|
| 23 | +$expandAll = (int) $_REQUEST['expandAll']; |
|
| 24 | 24 | $output = ''; |
| 25 | 25 | $hereid = isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) ? $_REQUEST['id'] : ''; |
| 26 | 26 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | class DATEPICKER {
|
| 4 | - function __construct() {
|
|
| 5 | - } |
|
| 4 | + function __construct() {
|
|
| 5 | + } |
|
| 6 | 6 | |
| 7 | - function getDP() {
|
|
| 8 | - $modx = evolutionCMS(); global $_lang; |
|
| 7 | + function getDP() {
|
|
| 8 | + $modx = evolutionCMS(); global $_lang; |
|
| 9 | 9 | |
| 10 | - $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
|
| 11 | - return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
| 12 | - } |
|
| 10 | + $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
|
| 11 | + return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
| 12 | + } |
|
| 13 | 13 | } |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -class DATEPICKER {
|
|
| 4 | - function __construct() {
|
|
| 3 | +class DATEPICKER{
|
|
| 4 | + function __construct(){
|
|
| 5 | 5 | } |
| 6 | 6 | |
| 7 | - function getDP() {
|
|
| 7 | + function getDP(){
|
|
| 8 | 8 | $modx = evolutionCMS(); global $_lang; |
| 9 | 9 | |
| 10 | - $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
|
| 10 | + $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
|
| 11 | 11 | return $modx->parseText($tpl, $_lang, '[%', '%]'); |
| 12 | 12 | } |
| 13 | 13 | } |
@@ -1,10 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -class DATEPICKER {
|
|
| 4 | - function __construct() {
|
|
| 3 | +class DATEPICKER |
|
| 4 | +{ |
|
| 5 | + function __construct() |
|
| 6 | + { |
|
| 5 | 7 | } |
| 6 | 8 | |
| 7 | - function getDP() {
|
|
| 9 | + function getDP() |
|
| 10 | + { |
|
| 8 | 11 | $modx = evolutionCMS(); global $_lang; |
| 9 | 12 | |
| 10 | 13 | $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | -class DATEPICKER { |
|
| 3 | - function __construct() { |
|
| 2 | +class DATEPICKER{ |
|
| 3 | + function __construct(){ |
|
| 4 | 4 | } |
| 5 | - function getDP() { |
|
| 5 | + function getDP(){ |
|
| 6 | 6 | $modx = evolutionCMS(); global$_lang; |
| 7 | 7 | |
| 8 | 8 | $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
| 9 | - return $modx->parseText($tpl,$_lang,'[%','%]'); |
|
| 9 | + return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
| 10 | 10 | } |
| 11 | 11 | } |
@@ -1,8 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | -class DATEPICKER { |
|
| 3 | - function __construct() { |
|
| 2 | +class DATEPICKER |
|
| 3 | +{ |
|
| 4 | + function __construct() |
|
| 5 | + { |
|
| 4 | 6 | } |
| 5 | - function getDP() { |
|
| 7 | + function getDP() |
|
| 8 | + { |
|
| 6 | 9 | $modx = evolutionCMS(); global$_lang; |
| 7 | 10 | |
| 8 | 11 | $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
@@ -492,7 +492,7 @@ |
||
| 492 | 492 | }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) { |
| 493 | 493 | $publishedon = $pub_date; |
| 494 | 494 | $publishedby = $modx->getLoginUserID(); |
| 495 | - }elseif ($was_published && !$published) { |
|
| 495 | + }elseif ($was_published && !$published) { |
|
| 496 | 496 | $publishedon = 0; |
| 497 | 497 | $publishedby = 0; |
| 498 | 498 | } else { |
@@ -279,19 +279,19 @@ |
||
| 279 | 279 | // invoke OnBeforeDocFormSave event |
| 280 | 280 | switch($modx->config['docid_incrmnt_method']) |
| 281 | 281 | { |
| 282 | - case '1': |
|
| 283 | - $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id"; |
|
| 284 | - $where = "T1.id IS NULL"; |
|
| 285 | - $rs = $modx->getDatabase()->select('MIN(T0.id)+1', $from, "T1.id IS NULL"); |
|
| 286 | - $id = $modx->getDatabase()->getValue($rs); |
|
| 282 | + case '1': |
|
| 283 | + $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id"; |
|
| 284 | + $where = "T1.id IS NULL"; |
|
| 285 | + $rs = $modx->getDatabase()->select('MIN(T0.id)+1', $from, "T1.id IS NULL"); |
|
| 286 | + $id = $modx->getDatabase()->getValue($rs); |
|
| 287 | + break; |
|
| 288 | + case '2': |
|
| 289 | + $rs = $modx->getDatabase()->select('MAX(id)+1', $tbl_site_content); |
|
| 290 | + $id = $modx->getDatabase()->getValue($rs); |
|
| 287 | 291 | break; |
| 288 | - case '2': |
|
| 289 | - $rs = $modx->getDatabase()->select('MAX(id)+1', $tbl_site_content); |
|
| 290 | - $id = $modx->getDatabase()->getValue($rs); |
|
| 291 | - break; |
|
| 292 | 292 | |
| 293 | - default: |
|
| 294 | - $id = ''; |
|
| 293 | + default: |
|
| 294 | + $id = ''; |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | $modx->invokeEvent("OnBeforeDocFormSave", array( |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | case 'new' : |
| 278 | 278 | |
| 279 | 279 | // invoke OnBeforeDocFormSave event |
| 280 | - switch($modx->config['docid_incrmnt_method']) |
|
| 280 | + switch ($modx->config['docid_incrmnt_method']) |
|
| 281 | 281 | { |
| 282 | 282 | case '1': |
| 283 | 283 | $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id"; |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | if (!$was_published && $published) { |
| 489 | 489 | $publishedon = $currentdate; |
| 490 | 490 | $publishedby = $modx->getLoginUserID(); |
| 491 | - }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) { |
|
| 491 | + }elseif ((!empty($pub_date) && $pub_date <= $currentdate && $published)) { |
|
| 492 | 492 | $publishedon = $pub_date; |
| 493 | 493 | $publishedby = $modx->getLoginUserID(); |
| 494 | 494 | }elseif ($was_published && !$published) { |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | // invoke OnBeforeDocFormSave event |
| 503 | - $modx->invokeEvent("OnBeforeDocFormSave", array ( |
|
| 503 | + $modx->invokeEvent("OnBeforeDocFormSave", array( |
|
| 504 | 504 | "mode" => "upd", |
| 505 | 505 | "id" => $id |
| 506 | 506 | )); |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | . "menuindex={$menuindex}, " |
| 526 | 526 | . "searchable={$searchable}, " |
| 527 | 527 | . "cacheable={$cacheable}, " |
| 528 | - . "editedby=" . $modx->getLoginUserID() . ", " |
|
| 528 | + . "editedby=".$modx->getLoginUserID().", " |
|
| 529 | 529 | . "editedon={$currentdate}, " |
| 530 | 530 | . "publishedon={$publishedon}, " |
| 531 | 531 | . "publishedby={$publishedby}, " |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | |
| 540 | 540 | // update template variables |
| 541 | 541 | $rs = $modx->getDatabase()->select('id, tmplvarid', $tbl_site_tmplvar_contentvalues, "contentid='{$id}'"); |
| 542 | - $tvIds = array (); |
|
| 542 | + $tvIds = array(); |
|
| 543 | 543 | while ($row = $modx->getDatabase()->getRow($rs)) { |
| 544 | 544 | $tvIds[$row['tmplvarid']] = $row['id']; |
| 545 | 545 | } |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | 'groups.id, groups.document_group', |
| 593 | 593 | "{$tbl_document_groups} AS groups |
| 594 | 594 | LEFT JOIN {$tbl_documentgroup_names} AS dgn ON dgn.id = groups.document_group", |
| 595 | - "((1=".(int)$isManager." AND dgn.private_memgroup) OR (1=".(int)$isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'" |
|
| 595 | + "((1=".(int) $isManager." AND dgn.private_memgroup) OR (1=".(int) $isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'" |
|
| 596 | 596 | ); |
| 597 | 597 | $old_groups = array(); |
| 598 | 598 | while ($row = $modx->getDatabase()->getRow($rs)) $old_groups[$row['document_group']] = $row['id']; |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | unset($old_groups[$group]); |
| 605 | 605 | continue; |
| 606 | 606 | } elseif ($link_id == 'new') { |
| 607 | - $insertions[] = '('.(int)$group.','.$id.')'; |
|
| 607 | + $insertions[] = '('.(int) $group.','.$id.')'; |
|
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | if (!empty($insertions)) { |
@@ -636,17 +636,17 @@ discard block |
||
| 636 | 636 | |
| 637 | 637 | |
| 638 | 638 | // invoke OnDocFormSave event |
| 639 | - $modx->invokeEvent("OnDocFormSave", array ( |
|
| 639 | + $modx->invokeEvent("OnDocFormSave", array( |
|
| 640 | 640 | "mode" => "upd", |
| 641 | 641 | "id" => $id |
| 642 | 642 | )); |
| 643 | 643 | |
| 644 | 644 | // secure web documents - flag as private |
| 645 | - include MODX_MANAGER_PATH . "includes/secure_web_documents.inc.php"; |
|
| 645 | + include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php"; |
|
| 646 | 646 | secureWebDocument($id); |
| 647 | 647 | |
| 648 | 648 | // secure manager documents - flag as private |
| 649 | - include MODX_MANAGER_PATH . "includes/secure_mgr_documents.inc.php"; |
|
| 649 | + include MODX_MANAGER_PATH."includes/secure_mgr_documents.inc.php"; |
|
| 650 | 650 | secureMgrDocument($id); |
| 651 | 651 | |
| 652 | 652 | // Set the item name for logger |
@@ -672,13 +672,13 @@ discard block |
||
| 672 | 672 | // document |
| 673 | 673 | $a = ($_POST['stay'] == '2') ? "27&id=$id" : "4&pid=$parent"; |
| 674 | 674 | } |
| 675 | - $header = "Location: index.php?a=" . $a . "&r=1&stay=" . $_POST['stay'].$add_path; |
|
| 675 | + $header = "Location: index.php?a=".$a."&r=1&stay=".$_POST['stay'].$add_path; |
|
| 676 | 676 | } else { |
| 677 | 677 | $header = "Location: index.php?a=3&id=$id&r=1".$add_path; |
| 678 | 678 | } |
| 679 | 679 | } |
| 680 | 680 | if (headers_sent()) { |
| 681 | - $header = str_replace('Location: ','',$header); |
|
| 681 | + $header = str_replace('Location: ', '', $header); |
|
| 682 | 682 | echo "<script>document.location.href='$header';</script>\n"; |
| 683 | 683 | } else { |
| 684 | 684 | header($header); |
@@ -134,8 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | //end webber |
| 136 | 136 | } |
| 137 | -} |
|
| 138 | -elseif ($alias) { |
|
| 137 | +} elseif ($alias) { |
|
| 139 | 138 | $alias = $modx->stripAlias($alias); |
| 140 | 139 | } |
| 141 | 140 | |
@@ -149,8 +148,7 @@ discard block |
||
| 149 | 148 | |
| 150 | 149 | if ($pub_date < $currentdate) { |
| 151 | 150 | $published = 1; |
| 152 | - } |
|
| 153 | - elseif ($pub_date > $currentdate) { |
|
| 151 | + } elseif ($pub_date > $currentdate) { |
|
| 154 | 152 | $published = 0; |
| 155 | 153 | } |
| 156 | 154 | } |
@@ -277,8 +275,7 @@ discard block |
||
| 277 | 275 | case 'new' : |
| 278 | 276 | |
| 279 | 277 | // invoke OnBeforeDocFormSave event |
| 280 | - switch($modx->config['docid_incrmnt_method']) |
|
| 281 | - { |
|
| 278 | + switch($modx->config['docid_incrmnt_method']) { |
|
| 282 | 279 | case '1': |
| 283 | 280 | $from = "{$tbl_site_content} AS T0 LEFT JOIN {$tbl_site_content} AS T1 ON T0.id + 1 = T1.id"; |
| 284 | 281 | $where = "T1.id IS NULL"; |
@@ -346,8 +343,9 @@ discard block |
||
| 346 | 343 | "alias_visible" => $aliasvisible |
| 347 | 344 | ); |
| 348 | 345 | |
| 349 | - if ($id != '') |
|
| 350 | - $dbInsert["id"] = $id; |
|
| 346 | + if ($id != '') { |
|
| 347 | + $dbInsert["id"] = $id; |
|
| 348 | + } |
|
| 351 | 349 | |
| 352 | 350 | $key = $modx->getDatabase()->insert($dbInsert, $tbl_site_content); |
| 353 | 351 | |
@@ -423,11 +421,13 @@ discard block |
||
| 423 | 421 | // redirect/stay options |
| 424 | 422 | if ($_POST['stay'] != '') { |
| 425 | 423 | // weblink |
| 426 | - if ($_POST['mode'] == "72") |
|
| 427 | - $a = ($_POST['stay'] == '2') ? "27&id=$key" : "72&pid=$parent"; |
|
| 424 | + if ($_POST['mode'] == "72") { |
|
| 425 | + $a = ($_POST['stay'] == '2') ? "27&id=$key" : "72&pid=$parent"; |
|
| 426 | + } |
|
| 428 | 427 | // document |
| 429 | - if ($_POST['mode'] == "4") |
|
| 430 | - $a = ($_POST['stay'] == '2') ? "27&id=$key" : "4&pid=$parent"; |
|
| 428 | + if ($_POST['mode'] == "4") { |
|
| 429 | + $a = ($_POST['stay'] == '2') ? "27&id=$key" : "4&pid=$parent"; |
|
| 430 | + } |
|
| 431 | 431 | $header = "Location: index.php?a=".$a."&r=1&stay=".$_POST['stay']; |
| 432 | 432 | } else { |
| 433 | 433 | $header = "Location: index.php?a=3&id=$key&r=1"; |
@@ -488,10 +488,10 @@ discard block |
||
| 488 | 488 | if (!$was_published && $published) { |
| 489 | 489 | $publishedon = $currentdate; |
| 490 | 490 | $publishedby = $modx->getLoginUserID(); |
| 491 | - }elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) { |
|
| 491 | + } elseif ((!empty($pub_date)&& $pub_date<=$currentdate && $published)) { |
|
| 492 | 492 | $publishedon = $pub_date; |
| 493 | 493 | $publishedby = $modx->getLoginUserID(); |
| 494 | - }elseif ($was_published && !$published) { |
|
| 494 | + } elseif ($was_published && !$published) { |
|
| 495 | 495 | $publishedon = 0; |
| 496 | 496 | $publishedby = 0; |
| 497 | 497 | } else { |
@@ -547,7 +547,9 @@ discard block |
||
| 547 | 547 | $tvChanges = array(); |
| 548 | 548 | foreach ($tmplvars as $field => $value) { |
| 549 | 549 | if (!is_array($value)) { |
| 550 | - if (isset($tvIds[$value])) $tvDeletions[] = $tvIds[$value]; |
|
| 550 | + if (isset($tvIds[$value])) { |
|
| 551 | + $tvDeletions[] = $tvIds[$value]; |
|
| 552 | + } |
|
| 551 | 553 | } else { |
| 552 | 554 | $tvId = $value[0]; |
| 553 | 555 | $tvVal = $value[1]; |
@@ -595,7 +597,9 @@ discard block |
||
| 595 | 597 | "((1=".(int)$isManager." AND dgn.private_memgroup) OR (1=".(int)$isWeb." AND dgn.private_webgroup)) AND groups.document = '{$id}'" |
| 596 | 598 | ); |
| 597 | 599 | $old_groups = array(); |
| 598 | - while ($row = $modx->getDatabase()->getRow($rs)) $old_groups[$row['document_group']] = $row['id']; |
|
| 600 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
| 601 | + $old_groups[$row['document_group']] = $row['id']; |
|
| 602 | + } |
|
| 599 | 603 | |
| 600 | 604 | // update the permissions in the database |
| 601 | 605 | $insertions = $deletions = array(); |
@@ -657,9 +661,9 @@ discard block |
||
| 657 | 661 | $modx->clearCache('full'); |
| 658 | 662 | } |
| 659 | 663 | |
| 660 | - if ($_POST['refresh_preview'] == '1') |
|
| 661 | - $header = "Location: ".MODX_SITE_URL."index.php?id=$id&z=manprev"; |
|
| 662 | - else { |
|
| 664 | + if ($_POST['refresh_preview'] == '1') { |
|
| 665 | + $header = "Location: ".MODX_SITE_URL."index.php?id=$id&z=manprev"; |
|
| 666 | + } else { |
|
| 663 | 667 | if ($_POST['stay'] != '2' && $id > 0) { |
| 664 | 668 | $modx->unlockElement(7, $id); |
| 665 | 669 | } |
@@ -1,5 +1,5 @@ |
||
| 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 | ?> |
@@ -1,5 +1,5 @@ |
||
| 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 | ?> |
@@ -1,5 +1,5 @@ |
||
| 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 | ?> |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | <?php |
| 114 | 114 | // invoke OnMiscSettingsRender event |
| 115 | 115 | $evtOut = $modx->invokeEvent('OnFileManagerSettingsRender');
|
| 116 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 116 | + if (is_array($evtOut)) echo implode("", $evtOut);
|
|
| 117 | 117 | ?> |
| 118 | 118 | </td> |
| 119 | 119 | </tr> |
@@ -113,7 +113,9 @@ |
||
| 113 | 113 | <?php |
| 114 | 114 | // invoke OnMiscSettingsRender event |
| 115 | 115 | $evtOut = $modx->invokeEvent('OnFileManagerSettingsRender');
|
| 116 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 116 | + if(is_array($evtOut)) { |
|
| 117 | + echo implode("",$evtOut); |
|
| 118 | + } |
|
| 117 | 119 | ?> |
| 118 | 120 | </td> |
| 119 | 121 | </tr> |
@@ -20,28 +20,28 @@ discard block |
||
| 20 | 20 | $body_class = ''; |
| 21 | 21 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
|
| 22 | 22 | if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
|
| 23 | - $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
|
| 23 | + $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']]; |
|
| 24 | 24 | } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
|
| 25 | - $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
|
| 25 | + $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']]; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | -$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime; |
|
| 28 | +$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime; |
|
| 29 | 29 | |
| 30 | 30 | if ($modx->config['manager_theme'] == 'default') {
|
| 31 | - if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') |
|
| 32 | - && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
|
|
| 31 | + if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css') |
|
| 32 | + && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) {
|
|
| 33 | 33 | $files = array( |
| 34 | - 'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css', |
|
| 35 | - 'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css', |
|
| 36 | - 'fonts' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css', |
|
| 37 | - 'forms' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css', |
|
| 38 | - 'mainmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css', |
|
| 39 | - 'tree' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css', |
|
| 40 | - 'custom' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css', |
|
| 41 | - 'tabpane' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css', |
|
| 42 | - 'contextmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css', |
|
| 43 | - 'index' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css', |
|
| 44 | - 'main' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css' |
|
| 34 | + 'bootstrap' => MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css', |
|
| 35 | + 'font-awesome' => MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css', |
|
| 36 | + 'fonts' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css', |
|
| 37 | + 'forms' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css', |
|
| 38 | + 'mainmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css', |
|
| 39 | + 'tree' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css', |
|
| 40 | + 'custom' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css', |
|
| 41 | + 'tabpane' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css', |
|
| 42 | + 'contextmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css', |
|
| 43 | + 'index' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css', |
|
| 44 | + 'main' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css' |
|
| 45 | 45 | ); |
| 46 | 46 | $evtOut = $modx->invokeEvent('OnBeforeMinifyCss', array(
|
| 47 | 47 | 'files' => $files, |
@@ -58,16 +58,16 @@ discard block |
||
| 58 | 58 | default: |
| 59 | 59 | $modx->webAlertAndQuit(sprintf($_lang['invalid_event_response'], 'OnBeforeMinifyManagerCss')); |
| 60 | 60 | } |
| 61 | - require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php'; |
|
| 61 | + require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php'; |
|
| 62 | 62 | $minifier = new Formatter\CSSMinify($files); |
| 63 | 63 | $css = $minifier->minify(); |
| 64 | 64 | file_put_contents( |
| 65 | - MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css', |
|
| 65 | + MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css', |
|
| 66 | 66 | $css |
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
|
|
| 70 | - $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
|
| 69 | + if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
|
|
| 70 | + $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | <meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
| 83 | 83 | <link rel="stylesheet" type="text/css" href="<?= $css ?>"/> |
| 84 | 84 | <script type="text/javascript" src="media/script/tabpane.js"></script> |
| 85 | - <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
|
|
| 85 | + <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
|
|
| 86 | 86 | <?php if ($modx->config['show_picker'] != "0") { ?>
|
| 87 | 87 | <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js" |
| 88 | 88 | type="text/javascript"></script> |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | <?php } ?> |
| 96 | 96 | |
| 97 | 97 | <!-- OnManagerMainFrameHeaderHTMLBlock --> |
| 98 | - <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?> |
|
| 98 | + <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?> |
|
| 99 | 99 | |
| 100 | 100 | <script type="text/javascript"> |
| 101 | 101 | if (!evo) {
|
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | <script> |
| 126 | 126 | <?php |
| 127 | 127 | if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
|
| 128 | - echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
|
|
| 128 | + echo 'doRefresh('.$_REQUEST['r'].");\n";
|
|
| 129 | 129 | } |
| 130 | 130 | ?> |
| 131 | 131 | </script> |
@@ -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 />
|
| 4 | 4 | Please use the EVO Content Manager instead of accessing this file directly."); |
| 5 | 5 | } |
@@ -10,26 +10,26 @@ discard block |
||
| 10 | 10 | $modx_textdir = isset($modx_textdir) ? $modx_textdir : null; |
| 11 | 11 | $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
|
| 12 | 12 | $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr'; |
| 13 | -if (!isset($modx->config['mgr_jquery_path'])) {
|
|
| 13 | +if (!isset($modx->config['mgr_jquery_path'])) { |
|
| 14 | 14 | $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js'; |
| 15 | 15 | } |
| 16 | -if (!isset($modx->config['mgr_date_picker_path'])) {
|
|
| 16 | +if (!isset($modx->config['mgr_date_picker_path'])) { |
|
| 17 | 17 | $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php'; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $body_class = ''; |
| 21 | 21 | $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
|
| 22 | -if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
|
|
| 22 | +if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) { |
|
| 23 | 23 | $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']]; |
| 24 | -} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
|
|
| 24 | +} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) { |
|
| 25 | 25 | $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']]; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime; |
| 29 | 29 | |
| 30 | -if ($modx->config['manager_theme'] == 'default') {
|
|
| 30 | +if ($modx->config['manager_theme'] == 'default') { |
|
| 31 | 31 | if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css') |
| 32 | - && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
|
|
| 32 | + && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) { |
|
| 33 | 33 | $files = array( |
| 34 | 34 | 'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css', |
| 35 | 35 | 'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css', |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | 'source' => 'manager', |
| 49 | 49 | 'theme' => $modx->config['manager_theme'] |
| 50 | 50 | )); |
| 51 | - switch (true) {
|
|
| 51 | + switch (true) { |
|
| 52 | 52 | case empty($evtOut): |
| 53 | 53 | case is_array($evtOut) && count($evtOut) === 0: |
| 54 | 54 | break; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $css |
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | - if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
|
|
| 69 | + if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) { |
|
| 70 | 70 | $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime; |
| 71 | 71 | } |
| 72 | 72 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | <script src="media/script/main.js"></script> |
| 125 | 125 | <script> |
| 126 | 126 | <?php |
| 127 | - if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
|
|
| 127 | + if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) { |
|
| 128 | 128 | echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
|
| 129 | 129 | } |
| 130 | 130 | ?> |