@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
| 10 | 10 | if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
| 11 | - $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
|
| 11 | + $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
|
| 12 | 12 | return $modx->mergeSettingsContent($load_script); |
| 13 | 13 | } |
| 14 | 14 | |
@@ -1,13 +1,13 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -class DATEPICKER { |
|
| 2 | +class DATEPICKER{ |
|
| 3 | 3 | /** |
| 4 | 4 | * @return string |
| 5 | 5 | */ |
| 6 | - public function getDP() { |
|
| 6 | + public function getDP(){ |
|
| 7 | 7 | $modx = evolutionCMS(); |
| 8 | 8 | |
| 9 | 9 | $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
| 10 | - if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
|
| 10 | + if (!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
|
| 11 | 11 | $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
| 12 | 12 | return $modx->mergeSettingsContent($load_script); |
| 13 | 13 | } |
@@ -15,14 +15,14 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @return string |
| 17 | 17 | */ |
| 18 | - public function getLangCode() { |
|
| 18 | + public function getLangCode(){ |
|
| 19 | 19 | $modx = evolutionCMS(); global $modx_lang_attribute; |
| 20 | 20 | |
| 21 | - if(!$modx_lang_attribute) return 'en'; |
|
| 21 | + if (!$modx_lang_attribute) return 'en'; |
|
| 22 | 22 | |
| 23 | 23 | $lc = $modx_lang_attribute; |
| 24 | - if($lc === 'uk') return 'ru'; |
|
| 25 | - $dp_path = str_replace('\\','/',dirname(__FILE__)); |
|
| 24 | + if ($lc === 'uk') return 'ru'; |
|
| 25 | + $dp_path = str_replace('\\', '/', dirname(__FILE__)); |
|
| 26 | 26 | |
| 27 | 27 | return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en'; |
| 28 | 28 | } |
@@ -1,13 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -class DATEPICKER { |
|
| 2 | +class DATEPICKER |
|
| 3 | +{ |
|
| 3 | 4 | /** |
| 4 | 5 | * @return string |
| 5 | 6 | */ |
| 6 | - public function getDP() { |
|
| 7 | + public function getDP() |
|
| 8 | + { |
|
| 7 | 9 | $modx = evolutionCMS(); |
| 8 | 10 | |
| 9 | 11 | $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
| 10 | - if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
|
| 12 | + if(!isset($modx->config['lang_code'])) { |
|
| 13 | + $modx->config['lang_code'] = $this->getLangCode(); |
|
| 14 | + } |
|
| 11 | 15 | $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
| 12 | 16 | return $modx->mergeSettingsContent($load_script); |
| 13 | 17 | } |
@@ -15,13 +19,18 @@ discard block |
||
| 15 | 19 | /** |
| 16 | 20 | * @return string |
| 17 | 21 | */ |
| 18 | - public function getLangCode() { |
|
| 22 | + public function getLangCode() |
|
| 23 | + { |
|
| 19 | 24 | $modx = evolutionCMS(); global $modx_lang_attribute; |
| 20 | 25 | |
| 21 | - if(!$modx_lang_attribute) return 'en'; |
|
| 26 | + if(!$modx_lang_attribute) { |
|
| 27 | + return 'en'; |
|
| 28 | + } |
|
| 22 | 29 | |
| 23 | 30 | $lc = $modx_lang_attribute; |
| 24 | - if($lc === 'uk') return 'ru'; |
|
| 31 | + if($lc === 'uk') { |
|
| 32 | + return 'ru'; |
|
| 33 | + } |
|
| 25 | 34 | $dp_path = str_replace('\\','/',dirname(__FILE__)); |
| 26 | 35 | |
| 27 | 36 | return (is_file("{$dp_path}/i18n/datepicker.{$lc}.js")) ? $modx_lang_attribute : 'en'; |
@@ -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> |