@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | * mutate_settings.ajax.php |
4 | 4 | * |
5 | 5 | */ |
6 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
6 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
7 | 7 | |
8 | -require_once(dirname(__FILE__) . '/protect.inc.php'); |
|
8 | +require_once(dirname(__FILE__).'/protect.inc.php'); |
|
9 | 9 | |
10 | 10 | $action = preg_replace('/[^A-Za-z0-9_\-\.\/]/', '', $_POST['action']); |
11 | 11 | $lang = preg_replace('/[^A-Za-z0-9_\s\+\-\.\/]/', '', $_POST['lang']); |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | $str = ''; |
21 | 21 | $emptyCache = false; |
22 | 22 | |
23 | -switch(true){ |
|
24 | - case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/',$lang) && file_exists(dirname(__FILE__) . '/lang/'.$lang.'.inc.php')):{ |
|
25 | - include(dirname(__FILE__) . '/lang/'.$lang.'.inc.php'); |
|
26 | - $str = isset($key,$_lang,$_lang[$key]) ? $_lang[$key] : "" ; |
|
23 | +switch (true) { |
|
24 | + case ($action == 'get' && preg_match('/^[A-z0-9_-]+$/', $lang) && file_exists(dirname(__FILE__).'/lang/'.$lang.'.inc.php')):{ |
|
25 | + include(dirname(__FILE__).'/lang/'.$lang.'.inc.php'); |
|
26 | + $str = isset($key, $_lang, $_lang[$key]) ? $_lang[$key] : ""; |
|
27 | 27 | break; |
28 | 28 | } |
29 | 29 | case ($action == 'setsetting' && !empty($key) && !empty($value)):{ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | -if($emptyCache) { |
|
53 | +if ($emptyCache) { |
|
54 | 54 | $modx->clearCache('full'); |
55 | 55 | } |
56 | 56 |
@@ -3,10 +3,10 @@ discard block |
||
3 | 3 | global $site_sessionname; |
4 | 4 | $site_sessionname = genEvoSessionName(); // For legacy extras not using startCMSSession |
5 | 5 | |
6 | -function genEvoSessionName() { |
|
6 | +function genEvoSessionName(){ |
|
7 | 7 | $_ = crc32(__FILE__); |
8 | 8 | $_ = sprintf('%u', $_); |
9 | - return 'evo' . base_convert($_,10,36); |
|
9 | + return 'evo'.base_convert($_, 10, 36); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | function startCMSSession(){ |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | session_name($site_sessionname); |
17 | 17 | removeInvalidCmsSessionIds($site_sessionname); |
18 | - $cookieExpiration= 0; |
|
18 | + $cookieExpiration = 0; |
|
19 | 19 | $secure = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port); |
20 | 20 | $cookiePath = !empty($session_cookie_path) ? $session_cookie_path : MODX_BASE_URL; |
21 | 21 | $cookieDomain = !empty($session_cookie_domain) ? $session_cookie_domain : ''; |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | |
25 | 25 | $key = "modx.{$context}.session.cookie.lifetime"; |
26 | 26 | if (isset($_SESSION[$key]) && is_numeric($_SESSION[$key])) { |
27 | - $cookieLifetime= intval($_SESSION[$key]); |
|
28 | - if($cookieLifetime) $cookieExpiration = $_SERVER['REQUEST_TIME']+$cookieLifetime; |
|
27 | + $cookieLifetime = intval($_SESSION[$key]); |
|
28 | + if ($cookieLifetime) $cookieExpiration = $_SERVER['REQUEST_TIME'] + $cookieLifetime; |
|
29 | 29 | setcookie(session_name(), session_id(), $cookieExpiration, $cookiePath, $cookieDomain, $secure, true); |
30 | 30 | } |
31 | 31 | if (!isset($_SESSION['modx.session.created.time'])) { |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | -function removeInvalidCmsSessionFromStorage(&$storage, $session_name) { |
|
36 | +function removeInvalidCmsSessionFromStorage(&$storage, $session_name){ |
|
37 | 37 | if (isset($storage[$session_name]) && ($storage[$session_name] === '' || $storage[$session_name] === 'deleted')) |
38 | 38 | { |
39 | 39 | unset($storage[$session_name]); |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -function removeInvalidCmsSessionIds($session_name) { |
|
43 | +function removeInvalidCmsSessionIds($session_name){ |
|
44 | 44 | // session ids is invalid iff it is empty string |
45 | 45 | // storage priorioty can see in PHP source ext/session/session.c |
46 | 46 | removeInvalidCmsSessionFromStorage($_COOKIE, $session_name); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | //Kyle Jaebker - 08/07/06 |
4 | 4 | |
5 | 5 | //Create a new category |
6 | -function newCategory($newCat) { |
|
6 | +function newCategory($newCat){ |
|
7 | 7 | global $modx; |
8 | 8 | $useTable = $modx->getFullTableName('categories'); |
9 | 9 | $categoryId = $modx->db->insert( |
@@ -14,36 +14,36 @@ discard block |
||
14 | 14 | return $categoryId; |
15 | 15 | } |
16 | 16 | //check if new category already exists |
17 | -function checkCategory($newCat = '') { |
|
17 | +function checkCategory($newCat = ''){ |
|
18 | 18 | global $modx; |
19 | 19 | $useTable = $modx->getFullTableName('categories'); |
20 | 20 | $newCat = $modx->db->escape($newCat); |
21 | 21 | $cats = $modx->db->select('id', $modx->getFullTableName('categories'), "category='{$newCat}'"); |
22 | - if($cat = $modx->db->getValue($cats)) { |
|
22 | + if ($cat = $modx->db->getValue($cats)) { |
|
23 | 23 | return $cat; |
24 | 24 | } |
25 | 25 | return 0; |
26 | 26 | } |
27 | 27 | //Check for category, create new if not exists |
28 | -function getCategory($category='') { |
|
28 | +function getCategory($category = ''){ |
|
29 | 29 | $categoryId = checkCategory($category); |
30 | - if(!$categoryId) $categoryId = newCategory($category); |
|
30 | + if (!$categoryId) $categoryId = newCategory($category); |
|
31 | 31 | return $categoryId; |
32 | 32 | } |
33 | 33 | //Get all categories |
34 | -function getCategories() { |
|
34 | +function getCategories(){ |
|
35 | 35 | global $modx; |
36 | 36 | $useTable = $modx->getFullTableName('categories'); |
37 | 37 | $cats = $modx->db->select('id, category', $modx->getFullTableName('categories'), '', 'category'); |
38 | 38 | $resourceArray = array(); |
39 | - while($row = $modx->db->getRow($cats)) { |
|
39 | + while ($row = $modx->db->getRow($cats)) { |
|
40 | 40 | $row['category'] = stripslashes($row['category']); |
41 | 41 | $resourceArray[] = $row; |
42 | 42 | } |
43 | 43 | return $resourceArray; |
44 | 44 | } |
45 | 45 | //Delete category & associations |
46 | -function deleteCategory($catId=0) { |
|
46 | +function deleteCategory($catId = 0){ |
|
47 | 47 | global $modx; |
48 | 48 | if ($catId) { |
49 | 49 | $resetTables = array('site_plugins', 'site_snippets', 'site_htmlsnippets', 'site_templates', 'site_tmplvars', 'site_modules'); |
@@ -10,13 +10,13 @@ discard block |
||
10 | 10 | die(); |
11 | 11 | |
12 | 12 | global $sanitize_seed; |
13 | -$sanitize_seed = 'sanitize_seed_' . base_convert(md5(__FILE__),16,36); |
|
13 | +$sanitize_seed = 'sanitize_seed_'.base_convert(md5(__FILE__), 16, 36); |
|
14 | 14 | |
15 | 15 | // sanitize array |
16 | 16 | if (!function_exists('modx_sanitize_gpc')) { |
17 | - function modx_sanitize_gpc(& $values, $depth=0) { |
|
18 | - if(200 < $depth) exit('GPC Array nested too deep!'); |
|
19 | - if(is_array($values)) { |
|
17 | + function modx_sanitize_gpc(& $values, $depth = 0){ |
|
18 | + if (200 < $depth) exit('GPC Array nested too deep!'); |
|
19 | + if (is_array($values)) { |
|
20 | 20 | $depth++; |
21 | 21 | foreach ($values as $key => $value) { |
22 | 22 | if (is_array($value)) modx_sanitize_gpc($value, $depth); |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -function getSanitizedValue($value='') { |
|
32 | +function getSanitizedValue($value = ''){ |
|
33 | 33 | global $sanitize_seed; |
34 | 34 | |
35 | - if(!$value) return $value; |
|
35 | + if (!$value) return $value; |
|
36 | 36 | |
37 | 37 | $brackets = explode(' ', '[[ ]] [! !] [* *] [( )] {{ }} [+ +] [~ ~] [^ ^]'); |
38 | - foreach($brackets as $bracket) { |
|
39 | - if(strpos($value,$bracket)===false) continue; |
|
40 | - $sanitizedBracket = str_replace('#', $sanitize_seed, sprintf('#%s#%s#', substr($bracket,0,1), substr($bracket,1,1))); |
|
41 | - $value = str_replace($bracket,$sanitizedBracket,$value); |
|
38 | + foreach ($brackets as $bracket) { |
|
39 | + if (strpos($value, $bracket) === false) continue; |
|
40 | + $sanitizedBracket = str_replace('#', $sanitize_seed, sprintf('#%s#%s#', substr($bracket, 0, 1), substr($bracket, 1, 1))); |
|
41 | + $value = str_replace($bracket, $sanitizedBracket, $value); |
|
42 | 42 | } |
43 | 43 | $value = str_ireplace('<script', 'sanitized_by_modx<s cript', $value); |
44 | 44 | $value = preg_replace('/&#(\d+);/', 'sanitized_by_modx& #$1', $value); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | modx_sanitize_gpc($_COOKIE); |
53 | 53 | modx_sanitize_gpc($_REQUEST); |
54 | 54 | |
55 | -foreach (array ('PHP_SELF', 'HTTP_USER_AGENT', 'HTTP_REFERER', 'QUERY_STRING') as $key) { |
|
55 | +foreach (array('PHP_SELF', 'HTTP_USER_AGENT', 'HTTP_REFERER', 'QUERY_STRING') as $key) { |
|
56 | 56 | $_SERVER[$key] = isset ($_SERVER[$key]) ? htmlspecialchars($_SERVER[$key], ENT_QUOTES) : null; |
57 | 57 | } |
58 | 58 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | 3 | |
4 | 4 | $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()." AND messageread=0"); |
5 | 5 | $nrnewmessages = $modx->db->getValue($rs); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | var $errorcode; |
6 | 6 | var $errors = array(); |
7 | 7 | |
8 | - function __construct() { |
|
8 | + function __construct(){ |
|
9 | 9 | |
10 | 10 | $_lang = $this->include_lang('errormsg'); |
11 | 11 | |
@@ -40,33 +40,33 @@ discard block |
||
40 | 40 | ); |
41 | 41 | } |
42 | 42 | |
43 | - function include_lang($context='common') { |
|
43 | + function include_lang($context = 'common'){ |
|
44 | 44 | global $modx; |
45 | 45 | $_lang = array(); |
46 | 46 | |
47 | - $context = trim($context,'/'); |
|
48 | - if(strpos($context,'..')!==false) return; |
|
47 | + $context = trim($context, '/'); |
|
48 | + if (strpos($context, '..') !== false) return; |
|
49 | 49 | |
50 | - if($context === 'common') |
|
51 | - $lang_path = MODX_MANAGER_PATH . 'includes/lang/'; |
|
50 | + if ($context === 'common') |
|
51 | + $lang_path = MODX_MANAGER_PATH.'includes/lang/'; |
|
52 | 52 | else |
53 | - $lang_path = MODX_MANAGER_PATH . "includes/lang/{$context}/"; |
|
54 | - include_once($lang_path . 'english.inc.php'); |
|
53 | + $lang_path = MODX_MANAGER_PATH."includes/lang/{$context}/"; |
|
54 | + include_once($lang_path.'english.inc.php'); |
|
55 | 55 | $manager_language = $modx->config['manager_language']; |
56 | - if(is_file("{$lang_path}{$manager_language}.inc.php")) |
|
56 | + if (is_file("{$lang_path}{$manager_language}.inc.php")) |
|
57 | 57 | include_once("{$lang_path}{$manager_language}.inc.php"); |
58 | 58 | return $_lang; |
59 | 59 | } |
60 | 60 | |
61 | - function setError($errorcode, $custommessage=""){ |
|
62 | - $this->errorcode=$errorcode; |
|
63 | - $this->errormessage=$this->errors[$errorcode]; |
|
64 | - if($custommessage!="") { |
|
65 | - $this->errormessage=$custommessage; |
|
61 | + function setError($errorcode, $custommessage = ""){ |
|
62 | + $this->errorcode = $errorcode; |
|
63 | + $this->errormessage = $this->errors[$errorcode]; |
|
64 | + if ($custommessage != "") { |
|
65 | + $this->errormessage = $custommessage; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | - function getError() { |
|
69 | + function getError(){ |
|
70 | 70 | return $this->errorcode; |
71 | 71 | } |
72 | 72 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $modx->db->connect(); |
8 | 8 | $modx->getSettings(); |
9 | 9 | |
10 | -$vword = new VeriWord(148,60); |
|
10 | +$vword = new VeriWord(148, 60); |
|
11 | 11 | $vword->output_image(); |
12 | 12 | $vword->destroy_image(); |
13 | 13 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ## see sample.php for test and usage |
44 | 44 | ## sample URL: http://www.program-ruti.org/veriword/ |
45 | 45 | #### |
46 | -class VeriWord { |
|
46 | +class VeriWord{ |
|
47 | 47 | |
48 | 48 | /* path to font directory*/ |
49 | 49 | var $dir_font = "ttf/"; |
@@ -53,45 +53,45 @@ discard block |
||
53 | 53 | var $im_width = 0; |
54 | 54 | var $im_height = 0; |
55 | 55 | |
56 | - function __construct($w=200, $h=80) { |
|
56 | + function __construct($w = 200, $h = 80){ |
|
57 | 57 | /* create session to set word for verification */ |
58 | 58 | startCMSSession(); |
59 | 59 | $this->set_veriword(); |
60 | - $this->dir_font = dirname(__FILE__) . '/' . $this->dir_font; |
|
60 | + $this->dir_font = dirname(__FILE__).'/'.$this->dir_font; |
|
61 | 61 | $this->im_width = $w; |
62 | 62 | $this->im_height = $h; |
63 | 63 | } |
64 | 64 | |
65 | - function set_veriword() { |
|
65 | + function set_veriword(){ |
|
66 | 66 | /* create session variable for verification, |
67 | 67 | you may change the session variable name */ |
68 | 68 | $this->word = $this->pick_word(); |
69 | 69 | $_SESSION['veriword'] = $this->word; |
70 | 70 | } |
71 | 71 | |
72 | - function output_image() { |
|
72 | + function output_image(){ |
|
73 | 73 | /* output the image as jpeg */ |
74 | 74 | $this->draw_image(); |
75 | 75 | header("Content-type: image/jpeg"); |
76 | 76 | imagejpeg($this->im); |
77 | 77 | } |
78 | 78 | |
79 | - function pick_word() { |
|
79 | + function pick_word(){ |
|
80 | 80 | global $modx; |
81 | 81 | // set default words |
82 | - $words="MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
|
82 | + $words = "MODX,Access,Better,BitCode,Chunk,Cache,Desc,Design,Excell,Enjoy,URLs,TechView,Gerald,Griff,Humphrey,Holiday,Intel,Integration,Joystick,Join(),Oscope,Genetic,Light,Likeness,Marit,Maaike,Niche,Netherlands,Ordinance,Oscillo,Parser,Phusion,Query,Question,Regalia,Righteous,Snippet,Sentinel,Template,Thespian,Unity,Enterprise,Verily,Veri,Website,WideWeb,Yap,Yellow,Zebra,Zygote"; |
|
83 | 83 | $words = $modx->config['captcha_words'] ? $modx->config['captcha_words'] : $words; |
84 | 84 | $arr_words = array_filter(array_map('trim', explode(',', $words))); |
85 | 85 | |
86 | 86 | /* pick one randomly for text verification */ |
87 | - return (string) $arr_words[array_rand($arr_words)].rand(10,999); |
|
87 | + return (string) $arr_words[array_rand($arr_words)].rand(10, 999); |
|
88 | 88 | } |
89 | 89 | |
90 | - function draw_text() { |
|
90 | + function draw_text(){ |
|
91 | 91 | $dir = dir($this->dir_font); |
92 | 92 | $fontstmp = array(); |
93 | 93 | while (false !== ($file = $dir->read())) { |
94 | - if(substr($file, -4) == '.ttf') { |
|
94 | + if (substr($file, -4) == '.ttf') { |
|
95 | 95 | $fontstmp[] = $this->dir_font.$file; |
96 | 96 | } |
97 | 97 | } |
@@ -99,35 +99,35 @@ discard block |
||
99 | 99 | $text_font = (string) $fontstmp[array_rand($fontstmp)]; |
100 | 100 | |
101 | 101 | /* angle for text inclination */ |
102 | - $text_angle = rand(-9,9); |
|
102 | + $text_angle = rand(-9, 9); |
|
103 | 103 | /* initial text size */ |
104 | 104 | $text_size = 30; |
105 | 105 | /* calculate text width and height */ |
106 | - $box = imagettfbbox ( $text_size, $text_angle, $text_font, $this->word); |
|
107 | - $text_width = $box[2]-$box[0]; //text width |
|
108 | - $text_height= $box[5]-$box[3]; //text height |
|
106 | + $box = imagettfbbox($text_size, $text_angle, $text_font, $this->word); |
|
107 | + $text_width = $box[2] - $box[0]; //text width |
|
108 | + $text_height = $box[5] - $box[3]; //text height |
|
109 | 109 | |
110 | 110 | /* adjust text size */ |
111 | - $text_size = round((20 * $this->im_width)/$text_width); |
|
111 | + $text_size = round((20 * $this->im_width) / $text_width); |
|
112 | 112 | |
113 | 113 | /* recalculate text width and height */ |
114 | - $box = imagettfbbox ( $text_size, $text_angle, $text_font, $this->word); |
|
115 | - $text_width = $box[2]-$box[0]; //text width |
|
116 | - $text_height= $box[5]-$box[3]; //text height |
|
114 | + $box = imagettfbbox($text_size, $text_angle, $text_font, $this->word); |
|
115 | + $text_width = $box[2] - $box[0]; //text width |
|
116 | + $text_height = $box[5] - $box[3]; //text height |
|
117 | 117 | |
118 | 118 | /* calculate center position of text */ |
119 | - $text_x = ($this->im_width - $text_width)/2; |
|
120 | - $text_y = ($this->im_height - $text_height)/2; |
|
119 | + $text_x = ($this->im_width - $text_width) / 2; |
|
120 | + $text_y = ($this->im_height - $text_height) / 2; |
|
121 | 121 | |
122 | 122 | /* create canvas for text drawing */ |
123 | - $im_text = imagecreate ($this->im_width, $this->im_height); |
|
124 | - $bg_color = imagecolorallocate ($im_text, 255, 255, 255); |
|
123 | + $im_text = imagecreate($this->im_width, $this->im_height); |
|
124 | + $bg_color = imagecolorallocate($im_text, 255, 255, 255); |
|
125 | 125 | |
126 | 126 | /* pick color for text */ |
127 | - $text_color = imagecolorallocate ($im_text, 0, 51, 153); |
|
127 | + $text_color = imagecolorallocate($im_text, 0, 51, 153); |
|
128 | 128 | |
129 | 129 | /* draw text into canvas */ |
130 | - imagettftext ( $im_text, |
|
130 | + imagettftext($im_text, |
|
131 | 131 | $text_size, |
132 | 132 | $text_angle, |
133 | 133 | $text_x, |
@@ -143,19 +143,19 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | |
146 | - function draw_image() { |
|
146 | + function draw_image(){ |
|
147 | 147 | |
148 | 148 | /* pick one background image randomly from image directory */ |
149 | - $img_file = $this->dir_noise."noise".rand(1,4).".jpg"; |
|
149 | + $img_file = $this->dir_noise."noise".rand(1, 4).".jpg"; |
|
150 | 150 | |
151 | 151 | /* create "noise" background image from your image stock*/ |
152 | - $noise_img = @imagecreatefromjpeg ($img_file); |
|
152 | + $noise_img = @imagecreatefromjpeg($img_file); |
|
153 | 153 | $noise_width = imagesx($noise_img); |
154 | 154 | $noise_height = imagesy($noise_img); |
155 | 155 | |
156 | 156 | /* resize the background image to fit the size of image output */ |
157 | - $this->im = imagecreatetruecolor($this->im_width,$this->im_height); |
|
158 | - imagecopyresampled ($this->im, |
|
157 | + $this->im = imagecreatetruecolor($this->im_width, $this->im_height); |
|
158 | + imagecopyresampled($this->im, |
|
159 | 159 | $noise_img, |
160 | 160 | 0, 0, 0, 0, |
161 | 161 | $this->im_width, |
@@ -164,17 +164,17 @@ discard block |
||
164 | 164 | $noise_height); |
165 | 165 | |
166 | 166 | /* put text image into background image */ |
167 | - imagecopymerge ( $this->im, |
|
167 | + imagecopymerge($this->im, |
|
168 | 168 | $this->draw_text(), |
169 | 169 | 0, 0, 0, 0, |
170 | 170 | $this->im_width, |
171 | 171 | $this->im_height, |
172 | - 70 ); |
|
172 | + 70); |
|
173 | 173 | |
174 | 174 | return $this->im; |
175 | 175 | } |
176 | 176 | |
177 | - function destroy_image() { |
|
177 | + function destroy_image(){ |
|
178 | 178 | |
179 | 179 | imagedestroy($this->im); |
180 | 180 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
2 | +if (IN_MANAGER_MODE != "true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | 3 | |
4 | 4 | // START HACK |
5 | 5 | if (isset ($modx)) { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | $which_browser_default = $which_browser; |
17 | 17 | while ($row = $modx->db->getRow($rs)) { |
18 | - if($row['setting_name'] == 'which_browser' && $row['setting_value'] == 'default') $row['setting_value'] = $which_browser_default; |
|
18 | + if ($row['setting_name'] == 'which_browser' && $row['setting_value'] == 'default') $row['setting_value'] = $which_browser_default; |
|
19 | 19 | $settings[$row['setting_name']] = $row['setting_value']; |
20 | 20 | if (isset($modx->config)) { |
21 | 21 | $modx->config[$row['setting_name']] = $row['setting_value']; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | var stay = document.getElementById('stay'); |
19 | 19 | // Trigger unlock |
20 | 20 | if ((stay && stay.value !== '2') || !form_save) { |
21 | - var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType;?>&id=<?php echo $lockElementId;?>&o=' + Math.random(); |
|
21 | + var url = '<?php echo MODX_MANAGER_URL; ?>?a=67&type=<?php echo $lockElementType; ?>&id=<?php echo $lockElementId; ?>&o=' + Math.random(); |
|
22 | 22 | if (navigator.sendBeacon) { |
23 | 23 | navigator.sendBeacon(url) |
24 | 24 | } else { |