@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $this->get['dir'] = $dir; |
43 | 43 | } |
44 | 44 | |
45 | - $thumbsDir = $this->config['uploadDir'] . "/" . $this->config['thumbsDir']; |
|
45 | + $thumbsDir = $this->config['uploadDir']."/".$this->config['thumbsDir']; |
|
46 | 46 | if (( |
47 | 47 | !is_dir($thumbsDir) && |
48 | 48 | !@mkdir($thumbsDir, $this->config['dirPerms']) |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->session['dir'] = $this->type; |
115 | 115 | } else { |
116 | 116 | $type = $this->getTypeFromPath($this->session['dir']); |
117 | - $dir = $this->config['uploadDir'] . "/" . $this->session['dir']; |
|
117 | + $dir = $this->config['uploadDir']."/".$this->session['dir']; |
|
118 | 118 | if (($type != $this->type) || !is_dir($dir) || !is_readable($dir)) { |
119 | 119 | $this->session['dir'] = $this->type; |
120 | 120 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | $file = "{$this->thumbsDir}/{$this->type}/{$this->get['dir']}/$file"; |
190 | 190 | if (!is_file($file) || !is_readable($file)) { |
191 | - $file = "{$this->config['uploadDir']}/{$this->type}/{$this->get['dir']}/" . basename($file); |
|
191 | + $file = "{$this->config['uploadDir']}/{$this->type}/{$this->get['dir']}/".basename($file); |
|
192 | 192 | if (!is_file($file) || !is_readable($file)) { |
193 | 193 | $this->sendDefaultThumb($file); |
194 | 194 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | protected function act_chDir() |
228 | 228 | { |
229 | 229 | $this->postDir(); // Just for existing check |
230 | - $this->session['dir'] = $this->type . "/" . $this->post['dir']; |
|
230 | + $this->session['dir'] = $this->type."/".$this->post['dir']; |
|
231 | 231 | $dirWritable = dir::isWritable("{$this->config['uploadDir']}/{$this->session['dir']}"); |
232 | 232 | |
233 | 233 | return json_encode(array( |
@@ -300,12 +300,12 @@ discard block |
||
300 | 300 | if (is_array($evtOut) && !empty($evtOut)) { |
301 | 301 | $this->errorMsg(implode('\n', $evtOut)); |
302 | 302 | } |
303 | - if (!@rename($dir, dirname($dir) . "/$newName")) { |
|
303 | + if (!@rename($dir, dirname($dir)."/$newName")) { |
|
304 | 304 | $this->errorMsg("Cannot rename the folder."); |
305 | 305 | } |
306 | 306 | $thumbDir = "$this->thumbsTypeDir/{$this->post['dir']}"; |
307 | 307 | if (is_dir($thumbDir)) { |
308 | - @rename($thumbDir, dirname($thumbDir) . "/$newName"); |
|
308 | + @rename($thumbDir, dirname($thumbDir)."/$newName"); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | $this->modx->invokeEvent('OnFileBrowserRename', array( |
@@ -401,9 +401,9 @@ discard block |
||
401 | 401 | header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); |
402 | 402 | header("Cache-Control: private", false); |
403 | 403 | header("Content-Type: application/octet-stream"); |
404 | - header('Content-Disposition: attachment; filename="' . str_replace('"', "_", $this->post['file']) . '"'); |
|
404 | + header('Content-Disposition: attachment; filename="'.str_replace('"', "_", $this->post['file']).'"'); |
|
405 | 405 | header("Content-Transfer-Encoding: binary"); |
406 | - header("Content-Length: " . filesize($file)); |
|
406 | + header("Content-Length: ".filesize($file)); |
|
407 | 407 | readfile($file); |
408 | 408 | die; |
409 | 409 | } |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | $thumbFile = "$thumbDir/{$this->post['file']}"; |
476 | 476 | |
477 | 477 | if (file_exists($thumbFile)) { |
478 | - @rename($thumbFile, "$thumbDir/" . basename($newName)); |
|
478 | + @rename($thumbFile, "$thumbDir/".basename($newName)); |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | return true; |
@@ -564,11 +564,11 @@ discard block |
||
564 | 564 | } elseif (!file_exists($path)) { |
565 | 565 | $error[] = $this->label("The file '{file}' does not exist.", $replace); |
566 | 566 | } elseif (substr($base, 0, 1) == ".") { |
567 | - $error[] = "$base: " . $this->label("File name shouldn't begins with '.'"); |
|
567 | + $error[] = "$base: ".$this->label("File name shouldn't begins with '.'"); |
|
568 | 568 | } elseif (!$this->validateExtension($ext, $type)) { |
569 | - $error[] = "$base: " . $this->label("Denied file extension."); |
|
569 | + $error[] = "$base: ".$this->label("Denied file extension."); |
|
570 | 570 | } elseif (file_exists("$dir/$base")) { |
571 | - $error[] = "$base: " . $this->label("A file or folder with that name already exists."); |
|
571 | + $error[] = "$base: ".$this->label("A file or folder with that name already exists."); |
|
572 | 572 | } elseif (!is_readable($path) || !is_file($path)) { |
573 | 573 | $error[] = $this->label("Cannot read '{file}'.", $replace); |
574 | 574 | } elseif (!@copy($path, "$dir/$base")) { |
@@ -640,11 +640,11 @@ discard block |
||
640 | 640 | } elseif (!file_exists($path)) { |
641 | 641 | $error[] = $this->label("The file '{file}' does not exist.", $replace); |
642 | 642 | } elseif (substr($base, 0, 1) == ".") { |
643 | - $error[] = "$base: " . $this->label("File name shouldn't begins with '.'"); |
|
643 | + $error[] = "$base: ".$this->label("File name shouldn't begins with '.'"); |
|
644 | 644 | } elseif (!$this->validateExtension($ext, $type)) { |
645 | - $error[] = "$base: " . $this->label("Denied file extension."); |
|
645 | + $error[] = "$base: ".$this->label("Denied file extension."); |
|
646 | 646 | } elseif (file_exists("$dir/$base")) { |
647 | - $error[] = "$base: " . $this->label("A file or folder with that name already exists."); |
|
647 | + $error[] = "$base: ".$this->label("A file or folder with that name already exists."); |
|
648 | 648 | } elseif (!is_readable($path) || !is_file($path)) { |
649 | 649 | $error[] = $this->label("Cannot read '{file}'.", $replace); |
650 | 650 | } elseif (!file::isWritable($path) || !@rename($path, "$dir/$base")) { |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | } |
703 | 703 | $path = "{$this->config['uploadDir']}/$file"; |
704 | 704 | $base = basename($file); |
705 | - $filepath = str_replace('/' . $base, '', $path); |
|
705 | + $filepath = str_replace('/'.$base, '', $path); |
|
706 | 706 | $replace = array('file' => $base); |
707 | 707 | if (!is_file($path)) { |
708 | 708 | $error[] = $this->label("The file '{file}' does not exist.", $replace); |
@@ -748,15 +748,15 @@ discard block |
||
748 | 748 | if (!isset($this->post['dir']) || $this->config['denyZipDownload']) { |
749 | 749 | $this->errorMsg("Unknown error."); |
750 | 750 | } |
751 | - $filename = basename($dir) . ".zip"; |
|
751 | + $filename = basename($dir).".zip"; |
|
752 | 752 | do { |
753 | - $file = md5(time() . session_id()); |
|
753 | + $file = md5(time().session_id()); |
|
754 | 754 | $file = "{$this->config['uploadDir']}/$file.zip"; |
755 | 755 | } while (file_exists($file)); |
756 | 756 | new zipFolder($file, $dir); |
757 | 757 | header("Content-Type: application/x-zip"); |
758 | - header('Content-Disposition: attachment; filename="' . str_replace('"', "_", $filename) . '"'); |
|
759 | - header("Content-Length: " . filesize($file)); |
|
758 | + header('Content-Disposition: attachment; filename="'.str_replace('"', "_", $filename).'"'); |
|
759 | + header("Content-Length: ".filesize($file)); |
|
760 | 760 | readfile($file); |
761 | 761 | unlink($file); |
762 | 762 | die; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | } |
791 | 791 | |
792 | 792 | do { |
793 | - $file = md5(time() . session_id()); |
|
793 | + $file = md5(time().session_id()); |
|
794 | 794 | $file = "{$this->config['uploadDir']}/$file.zip"; |
795 | 795 | } while (file_exists($file)); |
796 | 796 | |
@@ -803,8 +803,8 @@ discard block |
||
803 | 803 | $zip->close(); |
804 | 804 | } |
805 | 805 | header("Content-Type: application/x-zip"); |
806 | - header('Content-Disposition: attachment; filename="selected_files_' . basename($file) . '"'); |
|
807 | - header("Content-Length: " . filesize($file)); |
|
806 | + header('Content-Disposition: attachment; filename="selected_files_'.basename($file).'"'); |
|
807 | + header("Content-Length: ".filesize($file)); |
|
808 | 808 | readfile($file); |
809 | 809 | unlink($file); |
810 | 810 | die; |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | if ($type != $this->type) { |
834 | 834 | continue; |
835 | 835 | } |
836 | - $file = $this->config['uploadDir'] . "/$file"; |
|
836 | + $file = $this->config['uploadDir']."/$file"; |
|
837 | 837 | if (!is_file($file) || !is_readable($file)) { |
838 | 838 | continue; |
839 | 839 | } |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | } |
842 | 842 | |
843 | 843 | do { |
844 | - $file = md5(time() . session_id()); |
|
844 | + $file = md5(time().session_id()); |
|
845 | 845 | $file = "{$this->config['uploadDir']}/$file.zip"; |
846 | 846 | } while (file_exists($file)); |
847 | 847 | |
@@ -854,8 +854,8 @@ discard block |
||
854 | 854 | $zip->close(); |
855 | 855 | } |
856 | 856 | header("Content-Type: application/x-zip"); |
857 | - header('Content-Disposition: attachment; filename="clipboard_' . basename($file) . '"'); |
|
858 | - header("Content-Length: " . filesize($file)); |
|
857 | + header('Content-Disposition: attachment; filename="clipboard_'.basename($file).'"'); |
|
858 | + header("Content-Length: ".filesize($file)); |
|
859 | 859 | readfile($file); |
860 | 860 | unlink($file); |
861 | 861 | die; |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | return $response; |
892 | 892 | } |
893 | 893 | $filename = $this->normalizeFilename($file['name']); |
894 | - $target = "$dir/" . file::getInexistantFilename($filename, $dir); |
|
894 | + $target = "$dir/".file::getInexistantFilename($filename, $dir); |
|
895 | 895 | |
896 | 896 | if (!@move_uploaded_file($file['tmp_name'], $target) && |
897 | 897 | !@rename($file['tmp_name'], $target) && |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | if (is_array($size) && count($size)) { |
958 | 958 | $preview = true; |
959 | 959 | if (!$this->config['noThumbnailsRecreation']) { |
960 | - $thumb_file = "$thumbDir/" . basename($file); |
|
960 | + $thumb_file = "$thumbDir/".basename($file); |
|
961 | 961 | if (!is_file($thumb_file) || filemtime($file) > filemtime($thumb_file)) { |
962 | 962 | $this->makeThumb($file); |
963 | 963 | } |
@@ -974,7 +974,7 @@ discard block |
||
974 | 974 | } |
975 | 975 | $name = basename($file); |
976 | 976 | $types = $this->config['types']; |
977 | - $types = explode(' ', $types['images'] . ' ' . $types['image']); |
|
977 | + $types = explode(' ', $types['images'].' '.$types['image']); |
|
978 | 978 | if (substr($name, 0, 1) == '.' && !$this->config['showHiddenFiles']) { |
979 | 979 | continue; |
980 | 980 | } |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | { |
1055 | 1055 | $dir = $this->typeDir; |
1056 | 1056 | if (isset($this->post['dir'])) { |
1057 | - $dir .= "/" . $this->post['dir']; |
|
1057 | + $dir .= "/".$this->post['dir']; |
|
1058 | 1058 | } |
1059 | 1059 | if ($existent && (!is_dir($dir) || !is_readable($dir))) { |
1060 | 1060 | $this->errorMsg("Inexistant or inaccessible folder."); |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | { |
1072 | 1072 | $dir = $this->typeDir; |
1073 | 1073 | if (isset($this->get['dir'])) { |
1074 | - $dir .= "/" . $this->get['dir']; |
|
1074 | + $dir .= "/".$this->get['dir']; |
|
1075 | 1075 | } |
1076 | 1076 | if ($existent && (!is_dir($dir) || !is_readable($dir))) { |
1077 | 1077 | $this->errorMsg("Inexistant or inaccessible folder."); |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | if (empty ($modx->config)) { |
27 | 27 | $modx->getSettings(); |
28 | 28 | } |
29 | -if(!isset($_SESSION['mgrValidated'])) { |
|
29 | +if (!isset($_SESSION['mgrValidated'])) { |
|
30 | 30 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
31 | 31 | } |
32 | 32 | $manager_language = ManagerTheme::getLangName(); |
33 | 33 | $_GET['langCode'] = ManagerTheme::getLang(); |
34 | 34 | |
35 | 35 | // MAGIC AUTOLOAD CLASSES FUNCTION |
36 | -function autoloadda9d06472ccb71b84928677ce2a6ca89($class) { |
|
36 | +function autoloadda9d06472ccb71b84928677ce2a6ca89($class){ |
|
37 | 37 | static $classes = null; |
38 | 38 | if ($classes === null) { |
39 | 39 | $classes = array( |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | ); |
58 | 58 | } |
59 | 59 | if (isset($classes[$class])) { |
60 | - require __DIR__ . $classes[$class]; |
|
60 | + require __DIR__.$classes[$class]; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | spl_autoload_register('autoloadda9d06472ccb71b84928677ce2a6ca89', true); |
@@ -21,13 +21,13 @@ |
||
21 | 21 | |
22 | 22 | switch (true) { |
23 | 23 | case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/', |
24 | - $lang) && file_exists(MODX_MANAGER_PATH . 'includes/lang/' . $lang . '.inc.php')): { |
|
25 | - include MODX_MANAGER_PATH . 'includes/lang/' . $lang . '.inc.php'; |
|
24 | + $lang) && file_exists(MODX_MANAGER_PATH.'includes/lang/'.$lang.'.inc.php')): { |
|
25 | + include MODX_MANAGER_PATH.'includes/lang/'.$lang.'.inc.php'; |
|
26 | 26 | $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : ""; |
27 | 27 | break; |
28 | 28 | } |
29 | 29 | case ($action == 'setsetting' && !empty($key) && !empty($value)): { |
30 | - $sql = "REPLACE INTO " . $modx->getDatabase()->getFullTableName("system_settings") . " (setting_name, setting_value) VALUES('{$key}', '{$value}');"; |
|
30 | + $sql = "REPLACE INTO ".$modx->getDatabase()->getFullTableName("system_settings")." (setting_name, setting_value) VALUES('{$key}', '{$value}');"; |
|
31 | 31 | $str = "true"; |
32 | 32 | $modx->getDatabase()->query($sql); |
33 | 33 | $emptyCache = true; |
@@ -1,13 +1,13 @@ 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 | // PROCESSOR FIRST |
7 | -if($_SESSION['mgrRole'] == 1) { |
|
8 | - if(!empty($_REQUEST['b']) && $_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) { |
|
7 | +if ($_SESSION['mgrRole'] == 1) { |
|
8 | + if (!empty($_REQUEST['b']) && $_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) { |
|
9 | 9 | $current = $modx->getManagerApi()->getSystemChecksum($modx->config['check_files_onlogin']); |
10 | - if(!empty($current)) { |
|
10 | + if (!empty($current)) { |
|
11 | 11 | $modx->getManagerApi()->setSystemChecksum($current); |
12 | 12 | $modx->clearCache('full'); |
13 | 13 | $modx->config['sys_files_checksum'] = $current; |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | $warningspresent = 0; |
20 | 20 | |
21 | 21 | $sysfiles_check = $modx->getManagerApi()->checkSystemChecksum(); |
22 | -if ($sysfiles_check!=='0'){ |
|
22 | +if ($sysfiles_check !== '0') { |
|
23 | 23 | $warningspresent = 1; |
24 | 24 | $warnings[] = array($_lang['configcheck_sysfiles_mod']); |
25 | 25 | } |
26 | 26 | |
27 | -if (is_writable("includes/config.inc.php")){ |
|
27 | +if (is_writable("includes/config.inc.php")) { |
|
28 | 28 | // Warn if world writable |
29 | - if(@fileperms('includes/config.inc.php') & 0x0002) { |
|
29 | + if (@fileperms('includes/config.inc.php') & 0x0002) { |
|
30 | 30 | $warningspresent = 1; |
31 | 31 | $warnings[] = array($_lang['configcheck_configinc']); |
32 | 32 | } |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | $warnings[] = array($_lang['configcheck_php_gdzip']); |
43 | 43 | } |
44 | 44 | |
45 | -if(!isset($modx->config['_hide_configcheck_validate_referer']) || $modx->config['_hide_configcheck_validate_referer'] !== '1') { |
|
46 | - if(isset($_SESSION['mgrPermissions']['settings']) && $_SESSION['mgrPermissions']['settings'] == '1') { |
|
45 | +if (!isset($modx->config['_hide_configcheck_validate_referer']) || $modx->config['_hide_configcheck_validate_referer'] !== '1') { |
|
46 | + if (isset($_SESSION['mgrPermissions']['settings']) && $_SESSION['mgrPermissions']['settings'] == '1') { |
|
47 | 47 | if ($modx->getDatabase()->getValue($modx->getDatabase()->select('COUNT(setting_value)', $modx->getDatabase()->getFullTableName('system_settings'), "setting_name='validate_referer' AND setting_value='0'"))) { |
48 | 48 | $warningspresent = 1; |
49 | 49 | $warnings[] = array($_lang['configcheck_validate_referer']); |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // check for Template Switcher plugin |
55 | -if(!isset($modx->config['_hide_configcheck_templateswitcher_present']) || $modx->config['_hide_configcheck_templateswitcher_present'] !== '1') { |
|
56 | - if(isset($_SESSION['mgrPermissions']['edit_plugin']) && $_SESSION['mgrPermissions']['edit_plugin'] == '1') { |
|
55 | +if (!isset($modx->config['_hide_configcheck_templateswitcher_present']) || $modx->config['_hide_configcheck_templateswitcher_present'] !== '1') { |
|
56 | + if (isset($_SESSION['mgrPermissions']['edit_plugin']) && $_SESSION['mgrPermissions']['edit_plugin'] == '1') { |
|
57 | 57 | $rs = $modx->getDatabase()->select('name, disabled', $modx->getDatabase()->getFullTableName('site_plugins'), "name IN ('TemplateSwitcher', 'Template Switcher', 'templateswitcher', 'template_switcher', 'template switcher') OR plugincode LIKE '%TemplateSwitcher%'"); |
58 | 58 | $row = $modx->getDatabase()->getRow($rs); |
59 | - if($row && $row['disabled'] == 0) { |
|
59 | + if ($row && $row['disabled'] == 0) { |
|
60 | 60 | $warningspresent = 1; |
61 | 61 | $warnings[] = array($_lang['configcheck_templateswitcher_present']); |
62 | 62 | $tplName = $row['name']; |
@@ -120,36 +120,36 @@ discard block |
||
120 | 120 | /** |
121 | 121 | * @return bool |
122 | 122 | */ |
123 | - function checkSiteCache() { |
|
123 | + function checkSiteCache(){ |
|
124 | 124 | $modx = evolutionCMS(); |
125 | - $checked= true; |
|
126 | - if (file_exists(MODX_BASE_PATH . 'assets/cache/siteCache.idx.php')) { |
|
127 | - $checked= @include_once (MODX_BASE_PATH . 'assets/cache/siteCache.idx.php'); |
|
125 | + $checked = true; |
|
126 | + if (file_exists(MODX_BASE_PATH.'assets/cache/siteCache.idx.php')) { |
|
127 | + $checked = @include_once (MODX_BASE_PATH.'assets/cache/siteCache.idx.php'); |
|
128 | 128 | } |
129 | 129 | return $checked; |
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | -if (!is_writable(MODX_BASE_PATH . "assets/cache/")) { |
|
133 | +if (!is_writable(MODX_BASE_PATH."assets/cache/")) { |
|
134 | 134 | $warningspresent = 1; |
135 | 135 | $warnings[] = array($_lang['configcheck_cache']); |
136 | 136 | } |
137 | 137 | |
138 | 138 | if (!checkSiteCache()) { |
139 | 139 | $warningspresent = 1; |
140 | - $warnings[]= array($lang['configcheck_sitecache_integrity']); |
|
140 | + $warnings[] = array($lang['configcheck_sitecache_integrity']); |
|
141 | 141 | } |
142 | 142 | |
143 | -if (!is_writable(MODX_BASE_PATH . "assets/images/")) { |
|
143 | +if (!is_writable(MODX_BASE_PATH."assets/images/")) { |
|
144 | 144 | $warningspresent = 1; |
145 | 145 | $warnings[] = array($_lang['configcheck_images']); |
146 | 146 | } |
147 | 147 | |
148 | -if(strpos($modx->config['rb_base_dir'],MODX_BASE_PATH)!==0) { |
|
148 | +if (strpos($modx->config['rb_base_dir'], MODX_BASE_PATH) !== 0) { |
|
149 | 149 | $warningspresent = 1; |
150 | 150 | $warnings[] = array($_lang['configcheck_rb_base_dir']); |
151 | 151 | } |
152 | -if(strpos($modx->config['filemanager_path'],MODX_BASE_PATH)!==0) { |
|
152 | +if (strpos($modx->config['filemanager_path'], MODX_BASE_PATH) !== 0) { |
|
153 | 153 | $warningspresent = 1; |
154 | 154 | $warnings[] = array($_lang['configcheck_filemanager_path']); |
155 | 155 | } |
@@ -157,36 +157,36 @@ discard block |
||
157 | 157 | // clear file info cache |
158 | 158 | clearstatcache(); |
159 | 159 | |
160 | -if ($warningspresent==1) { |
|
160 | +if ($warningspresent == 1) { |
|
161 | 161 | |
162 | -if(!isset($modx->config['send_errormail'])) $modx->config['send_errormail']='3'; |
|
162 | +if (!isset($modx->config['send_errormail'])) $modx->config['send_errormail'] = '3'; |
|
163 | 163 | $config_check_results = "<h3>".$_lang['configcheck_notok']."</h3>"; |
164 | 164 | |
165 | -for ($i=0;$i<count($warnings);$i++) { |
|
165 | +for ($i = 0; $i < count($warnings); $i++) { |
|
166 | 166 | switch ($warnings[$i][0]) { |
167 | 167 | case $_lang['configcheck_configinc']; |
168 | 168 | $warnings[$i][1] = $_lang['configcheck_configinc_msg']; |
169 | - if(empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']); |
|
169 | + if (empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0, 3, $warnings[$i][1], $_lang['configcheck_configinc']); |
|
170 | 170 | break; |
171 | 171 | case $_lang['configcheck_installer'] : |
172 | 172 | $warnings[$i][1] = $_lang['configcheck_installer_msg']; |
173 | - if(empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']); |
|
173 | + if (empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0, 3, $warnings[$i][1], $_lang['configcheck_installer']); |
|
174 | 174 | break; |
175 | 175 | case $_lang['configcheck_cache'] : |
176 | 176 | $warnings[$i][1] = $_lang['configcheck_cache_msg']; |
177 | - if(empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']); |
|
177 | + if (empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0, 2, $warnings[$i][1], $_lang['configcheck_cache']); |
|
178 | 178 | break; |
179 | 179 | case $_lang['configcheck_images'] : |
180 | 180 | $warnings[$i][1] = $_lang['configcheck_images_msg']; |
181 | - if(empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']); |
|
181 | + if (empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0, 2, $warnings[$i][1], $_lang['configcheck_images']); |
|
182 | 182 | break; |
183 | 183 | case $_lang['configcheck_sysfiles_mod']: |
184 | 184 | $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"]; |
185 | - $warnings[$i][2] = '<ul><li>'. implode('</li><li>', $sysfiles_check) .'</li></ul>'; |
|
186 | - if($modx->hasPermission('settings')) { |
|
187 | - $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>'; |
|
185 | + $warnings[$i][2] = '<ul><li>'.implode('</li><li>', $sysfiles_check).'</li></ul>'; |
|
186 | + if ($modx->hasPermission('settings')) { |
|
187 | + $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\''.$_lang["reset_sysfiles_checksum_alert"].'\')">'.$_lang["reset_sysfiles_checksum_button"].'</a></li></ul>'; |
|
188 | 188 | } |
189 | - if(empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0,3,$warnings[$i][1]." ".implode(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
|
189 | + if (empty($_SESSION["mgrConfigCheck"])) $modx->logEvent(0, 3, $warnings[$i][1]." ".implode(', ', $sysfiles_check), $_lang['configcheck_sysfiles_mod']); |
|
190 | 190 | break; |
191 | 191 | case $_lang['configcheck_lang_difference'] : |
192 | 192 | $warnings[$i][1] = $_lang['configcheck_lang_difference_msg']; |
@@ -208,18 +208,18 @@ discard block |
||
208 | 208 | break; |
209 | 209 | case $_lang['configcheck_validate_referer'] : |
210 | 210 | $msg = $_lang['configcheck_validate_referer_msg']; |
211 | - $msg .= '<br />' . sprintf($_lang["configcheck_hide_warning"], 'validate_referer'); |
|
211 | + $msg .= '<br />'.sprintf($_lang["configcheck_hide_warning"], 'validate_referer'); |
|
212 | 212 | $warnings[$i][1] = "<span id=\"validate_referer_warning_wrapper\">{$msg}</span>\n"; |
213 | 213 | break; |
214 | 214 | case $_lang['configcheck_templateswitcher_present'] : |
215 | 215 | $msg = $_lang["configcheck_templateswitcher_present_msg"]; |
216 | - if(isset($_SESSION['mgrPermissions']['save_plugin']) && $_SESSION['mgrPermissions']['save_plugin'] == '1') { |
|
217 | - $msg .= '<br />' . $_lang["configcheck_templateswitcher_present_disable"]; |
|
216 | + if (isset($_SESSION['mgrPermissions']['save_plugin']) && $_SESSION['mgrPermissions']['save_plugin'] == '1') { |
|
217 | + $msg .= '<br />'.$_lang["configcheck_templateswitcher_present_disable"]; |
|
218 | 218 | } |
219 | - if(isset($_SESSION['mgrPermissions']['delete_plugin']) && $_SESSION['mgrPermissions']['delete_plugin'] == '1') { |
|
220 | - $msg .= '<br />' . $_lang["configcheck_templateswitcher_present_delete"]; |
|
219 | + if (isset($_SESSION['mgrPermissions']['delete_plugin']) && $_SESSION['mgrPermissions']['delete_plugin'] == '1') { |
|
220 | + $msg .= '<br />'.$_lang["configcheck_templateswitcher_present_delete"]; |
|
221 | 221 | } |
222 | - $msg .= '<br />' . sprintf($_lang["configcheck_hide_warning"], 'templateswitcher_present'); |
|
222 | + $msg .= '<br />'.sprintf($_lang["configcheck_hide_warning"], 'templateswitcher_present'); |
|
223 | 223 | $warnings[$i][1] = "<span id=\"templateswitcher_present_warning_wrapper\">{$msg}</span>\n"; |
224 | 224 | break; |
225 | 225 | case $_lang['configcheck_rb_base_dir'] : |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $warnings[$i][1] = $_lang['configcheck_default_msg']; |
233 | 233 | } |
234 | 234 | |
235 | - $admin_warning = $_SESSION['mgrRole']!=1 ? $_lang['configcheck_admin'] : "" ; |
|
235 | + $admin_warning = $_SESSION['mgrRole'] != 1 ? $_lang['configcheck_admin'] : ""; |
|
236 | 236 | $config_check_results .= " |
237 | 237 | <fieldset> |
238 | 238 | <p><strong>".$_lang['configcheck_warning']."</strong> '".$warnings[$i][0]."'</p> |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | ".(isset($warnings[$i][2]) ? '<div style="padding-left:1em">'.$warnings[$i][2].'</div>' : '')." |
242 | 242 | </fieldset> |
243 | 243 | "; |
244 | - if ($i!=count($warnings)-1) { |
|
244 | + if ($i != count($warnings) - 1) { |
|
245 | 245 | $config_check_results .= "<br />"; |
246 | 246 | } |
247 | 247 | } |
248 | - $_SESSION["mgrConfigCheck"]=true; |
|
248 | + $_SESSION["mgrConfigCheck"] = true; |
|
249 | 249 | } else { |
250 | 250 | $config_check_results = $_lang['configcheck_ok']; |
251 | 251 | } |
@@ -1,8 +1,8 @@ |
||
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 | -$action = isset($_REQUEST['a']) ? (int)$_REQUEST['a'] : 1; |
|
5 | +$action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
6 | 6 | |
7 | 7 | if (8 !== $action && ManagerTheme::hasManagerAccess() === false) { |
8 | 8 | echo ManagerTheme::renderAccessPage(); |
@@ -1,6 +1,6 @@ |
||
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 | -$GLOBALS['action_list'] = include EVO_CORE_PATH . 'factory/actionlist.php'; |
|
6 | +$GLOBALS['action_list'] = include EVO_CORE_PATH.'factory/actionlist.php'; |
@@ -5,4 +5,4 @@ |
||
5 | 5 | * |
6 | 6 | */ |
7 | 7 | |
8 | -include_once EVO_CORE_PATH . 'includes/legacy.inc.php'; |
|
8 | +include_once EVO_CORE_PATH.'includes/legacy.inc.php'; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -$data = include EVO_CORE_PATH . 'factory/version.php'; |
|
2 | +$data = include EVO_CORE_PATH.'factory/version.php'; |
|
3 | 3 | |
4 | 4 | $modx_version = $data['version']; // Current version number |
5 | 5 | $modx_release_date = $data['release_date']; // Date of release |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $sysMsgs = ''; |
12 | 12 | $limit = count($SystemAlertMsgQueque); |
13 | 13 | for ($i = 0; $i < $limit; $i++) { |
14 | - $sysMsgs .= $SystemAlertMsgQueque[$i] . '<hr sys/>'; |
|
14 | + $sysMsgs .= $SystemAlertMsgQueque[$i].'<hr sys/>'; |
|
15 | 15 | } |
16 | 16 | // reset message queque |
17 | 17 | unset($_SESSION['SystemAlertMsgQueque']); |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
20 | 20 | |
21 | 21 | if ($sysMsgs != '') : ?> |
22 | - <link rel="stylesheet" type="text/css" href="<?=MODX_MANAGER_URL;?>media/style/<?=ManagerTheme::getTheme();?>/style.css" /> |
|
22 | + <link rel="stylesheet" type="text/css" href="<?=MODX_MANAGER_URL; ?>media/style/<?=ManagerTheme::getTheme(); ?>/style.css" /> |
|
23 | 23 | <script> |
24 | 24 | document.addEventListener('DOMContentLoaded', function() { |
25 | 25 | if (parent.modx) { |
26 | 26 | parent.modx.popup({ |
27 | 27 | title: '<?php echo $_lang['sys_alert']; ?>', |
28 | - content: '<?php echo $modx->getDatabase()->escape($sysMsgs);?>', |
|
28 | + content: '<?php echo $modx->getDatabase()->escape($sysMsgs); ?>', |
|
29 | 29 | wrap: document.body, |
30 | 30 | type: 'warning', |
31 | 31 | width: '400px', |