@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! function_exists('install_sessionCheck')) { |
|
2 | +if (!function_exists('install_sessionCheck')) { |
|
3 | 3 | function install_sessionCheck() |
4 | 4 | { |
5 | 5 | global $_lang; |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | </head> |
22 | 22 | <body> |
23 | 23 | <div class="install"> |
24 | - <p>' . $_lang["session_problem"] . '</p> |
|
25 | - <p><a href="./">' . $_lang["session_problem_try_again"] . '</a></p> |
|
24 | + <p>' . $_lang["session_problem"].'</p> |
|
25 | + <p><a href="./">' . $_lang["session_problem_try_again"].'</a></p> |
|
26 | 26 | </div> |
27 | 27 | </body> |
28 | 28 | </html>'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | -if( ! function_exists('parse')) { |
|
35 | +if (!function_exists('parse')) { |
|
36 | 36 | /** |
37 | 37 | * @param string $src |
38 | 38 | * @param array $ph |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | function parse($src, $ph, $left = '[+', $right = '+]') |
44 | 44 | { |
45 | 45 | foreach ($ph as $k => $v) { |
46 | - $k = $left . $k . $right; |
|
46 | + $k = $left.$k.$right; |
|
47 | 47 | $src = str_replace($k, $v, $src); |
48 | 48 | } |
49 | 49 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | -if( ! function_exists('ph')) { |
|
54 | +if (!function_exists('ph')) { |
|
55 | 55 | /** |
56 | 56 | * @return array |
57 | 57 | */ |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $ph['textdir'] = $modx_textdir ? ' id="rtl"' : ''; |
71 | 71 | $ph['help_link'] = $installmode == 0 ? $_lang['help_link_new'] : $_lang['help_link_upd']; |
72 | 72 | $ph['version'] = $moduleVersion; |
73 | - $ph['release_date'] = ($modx_textdir ? '‏' : '') . $modx_release_date; |
|
73 | + $ph['release_date'] = ($modx_textdir ? '‏' : '').$modx_release_date; |
|
74 | 74 | $ph['footer1'] = $_lang['modx_footer1']; |
75 | 75 | $ph['footer2'] = $_lang['modx_footer2']; |
76 | 76 | $ph['current_year'] = date('Y'); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | -if( ! function_exists('get_installmode')) { |
|
82 | +if (!function_exists('get_installmode')) { |
|
83 | 83 | /** |
84 | 84 | * @return int |
85 | 85 | */ |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | } |
143 | 143 | |
144 | -if( ! function_exists('getLangs')) { |
|
144 | +if (!function_exists('getLangs')) { |
|
145 | 145 | /** |
146 | 146 | * @param string $install_language |
147 | 147 | * @return string |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | $langs = array(); |
158 | - if ($handle = opendir("../" . MGR_DIR . "/includes/lang")) { |
|
158 | + if ($handle = opendir("../".MGR_DIR."/includes/lang")) { |
|
159 | 159 | while (false !== ($file = readdir($handle))) { |
160 | 160 | if (strpos($file, '.inc.') !== false) { |
161 | 161 | $langs[] = $file; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | function get_lang_keys($filename) |
9 | 9 | { |
10 | - $file = MODX_MANAGER_PATH . 'includes/lang' . DIRECTORY_SEPARATOR . $filename; |
|
10 | + $file = MODX_MANAGER_PATH.'includes/lang'.DIRECTORY_SEPARATOR.$filename; |
|
11 | 11 | if (is_file($file) && is_readable($file)) { |
12 | 12 | include($file); |
13 | 13 | $out = isset($_lang) ? array_keys($_lang) : array(); |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | if (!empty($key)) { |
54 | 54 | $languages = get_langs_by_key($key); |
55 | 55 | sort($languages); |
56 | - $lang_options .= '<option value="">' . $_lang['language_title'] . '</option>'; |
|
56 | + $lang_options .= '<option value="">'.$_lang['language_title'].'</option>'; |
|
57 | 57 | |
58 | 58 | foreach ($languages as $language_name) { |
59 | 59 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
60 | - $lang_options .= '<option value="' . $language_name . '">' . $uclanguage_name . '</option>'; |
|
60 | + $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | return $lang_options; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | foreach ($languages as $language_name) { |
68 | 68 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
69 | 69 | $sel = $language_name === $selected_lang ? ' selected="selected"' : ''; |
70 | - $lang_options .= '<option value="' . $language_name . '" ' . $sel . '>' . $uclanguage_name . '</option>'; |
|
70 | + $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>'; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $lang_options; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $disabled = ''; |
93 | 93 | } |
94 | 94 | if ($add) { |
95 | - $add = ' ' . $add; |
|
95 | + $add = ' '.$add; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | return sprintf('<input onchange="documentDirty=true;" type="radio" name="%s" value="%s" %s %s %s />', $name, $value, |
@@ -5,13 +5,13 @@ discard block |
||
5 | 5 | * @param string $filename |
6 | 6 | * @return array of keys from a language file |
7 | 7 | */ |
8 | -function get_lang_keys($filename) |
|
9 | -{ |
|
8 | +function get_lang_keys($filename) |
|
9 | +{ |
|
10 | 10 | $file = MODX_MANAGER_PATH . 'includes/lang' . DIRECTORY_SEPARATOR . $filename; |
11 | - if (is_file($file) && is_readable($file)) { |
|
11 | + if (is_file($file) && is_readable($file)) { |
|
12 | 12 | include($file); |
13 | 13 | $out = isset($_lang) ? array_keys($_lang) : array(); |
14 | - } else { |
|
14 | + } else { |
|
15 | 15 | $out = array(); |
16 | 16 | } |
17 | 17 | |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | * @param string $key |
25 | 25 | * @return array of languages that define the key in their file |
26 | 26 | */ |
27 | -function get_langs_by_key($key) |
|
28 | -{ |
|
27 | +function get_langs_by_key($key) |
|
28 | +{ |
|
29 | 29 | global $lang_keys; |
30 | 30 | $lang_return = array(); |
31 | - foreach ($lang_keys as $lang => $keys) { |
|
32 | - if (in_array($key, $keys)) { |
|
31 | + foreach ($lang_keys as $lang => $keys) { |
|
32 | + if (in_array($key, $keys)) { |
|
33 | 33 | $lang_return[] = $lang; |
34 | 34 | } |
35 | 35 | } |
@@ -46,25 +46,25 @@ discard block |
||
46 | 46 | * @param string $selected_lang specify language to select in option list, default none |
47 | 47 | * @return string html option list |
48 | 48 | */ |
49 | -function get_lang_options($key = '', $selected_lang = '') |
|
50 | -{ |
|
49 | +function get_lang_options($key = '', $selected_lang = '') |
|
50 | +{ |
|
51 | 51 | global $lang_keys, $_lang; |
52 | 52 | $lang_options = ''; |
53 | - if (!empty($key)) { |
|
53 | + if (!empty($key)) { |
|
54 | 54 | $languages = get_langs_by_key($key); |
55 | 55 | sort($languages); |
56 | 56 | $lang_options .= '<option value="">' . $_lang['language_title'] . '</option>'; |
57 | 57 | |
58 | - foreach ($languages as $language_name) { |
|
58 | + foreach ($languages as $language_name) { |
|
59 | 59 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
60 | 60 | $lang_options .= '<option value="' . $language_name . '">' . $uclanguage_name . '</option>'; |
61 | 61 | } |
62 | 62 | |
63 | 63 | return $lang_options; |
64 | - } else { |
|
64 | + } else { |
|
65 | 65 | $languages = array_keys($lang_keys); |
66 | 66 | sort($languages); |
67 | - foreach ($languages as $language_name) { |
|
67 | + foreach ($languages as $language_name) { |
|
68 | 68 | $uclanguage_name = ucwords(str_replace("_", " ", $language_name)); |
69 | 69 | $sel = $language_name === $selected_lang ? ' selected="selected"' : ''; |
70 | 70 | $lang_options .= '<option value="' . $language_name . '" ' . $sel . '>' . $uclanguage_name . '</option>'; |
@@ -81,17 +81,17 @@ discard block |
||
81 | 81 | * @param bool $disabled |
82 | 82 | * @return string |
83 | 83 | */ |
84 | -function form_radio($name, $value, $add = '', $disabled = false) |
|
85 | -{ |
|
84 | +function form_radio($name, $value, $add = '', $disabled = false) |
|
85 | +{ |
|
86 | 86 | global ${$name}; |
87 | 87 | $var = ${$name}; |
88 | 88 | $checked = ($var == $value) ? ' checked="checked"' : ''; |
89 | - if ($disabled) { |
|
89 | + if ($disabled) { |
|
90 | 90 | $disabled = ' disabled'; |
91 | - } else { |
|
91 | + } else { |
|
92 | 92 | $disabled = ''; |
93 | 93 | } |
94 | - if ($add) { |
|
94 | + if ($add) { |
|
95 | 95 | $add = ' ' . $add; |
96 | 96 | } |
97 | 97 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $object |
105 | 105 | * @return string |
106 | 106 | */ |
107 | -function wrap_label($str = '', $object) |
|
108 | -{ |
|
107 | +function wrap_label($str = '', $object) |
|
108 | +{ |
|
109 | 109 | return "<label>{$object}\n{$str}</label>"; |
110 | 110 | } |
111 | 111 | |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | * @param array $ph |
115 | 115 | * @return string |
116 | 116 | */ |
117 | -function parseText($tpl = '', $ph = array()) |
|
118 | -{ |
|
119 | - if (empty($ph) || empty($tpl)) { |
|
117 | +function parseText($tpl = '', $ph = array()) |
|
118 | +{ |
|
119 | + if (empty($ph) || empty($tpl)) { |
|
120 | 120 | return $tpl; |
121 | 121 | } |
122 | 122 | |
123 | - foreach ($ph as $k => $v) { |
|
123 | + foreach ($ph as $k => $v) { |
|
124 | 124 | $k = "[+{$k}+]"; |
125 | 125 | $tpl = str_replace($k, $v, $tpl); |
126 | 126 | } |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | * @param bool $cond |
133 | 133 | * @return string |
134 | 134 | */ |
135 | -function showHide($cond = true) |
|
136 | -{ |
|
135 | +function showHide($cond = true) |
|
136 | +{ |
|
137 | 137 | global $displayStyle; |
138 | 138 | $showHide = $cond ? $displayStyle : 'none'; |
139 | 139 |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | } |
5 | 5 | $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
6 | 6 | $downloadLinks = array( |
7 | - 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | - 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | - 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | - 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | - 'http://extras.evolution-cms.com/', |
|
12 | - 'https://github.com/extras-evolution' |
|
13 | - )), |
|
7 | + 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | + 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | + 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | + 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | + 'http://extras.evolution-cms.com/', |
|
12 | + 'https://github.com/extras-evolution' |
|
13 | + )), |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | $translationLinks = array( |
17 | - 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | - 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
17 | + 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | + 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 | /** |
@@ -24,23 +24,23 @@ discard block |
||
24 | 24 | * @return string |
25 | 25 | */ |
26 | 26 | function createList($sectionHeader, $linkArr) { |
27 | - $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
|
28 | - $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
|
29 | - $links = ''; |
|
30 | - foreach($linkArr as $row) { |
|
31 | - if (!is_array($row['link'])) $row['link'] = array($row['link']); |
|
32 | - foreach ($row['link'] as $link) { |
|
33 | - $links .= $links != '' ? '<br/>' : ''; |
|
34 | - $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
35 | - } |
|
36 | - $output .= ' |
|
27 | + $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
|
28 | + $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
|
29 | + $links = ''; |
|
30 | + foreach($linkArr as $row) { |
|
31 | + if (!is_array($row['link'])) $row['link'] = array($row['link']); |
|
32 | + foreach ($row['link'] as $link) { |
|
33 | + $links .= $links != '' ? '<br/>' : ''; |
|
34 | + $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
35 | + } |
|
36 | + $output .= ' |
|
37 | 37 | <tr> |
38 | 38 | <td align="left"><strong>' . $row["title"] . '</strong></td> |
39 | 39 | <td align="left">' . $links . '</td> |
40 | 40 | </tr>'; |
41 | - $links = ''; |
|
42 | - } |
|
43 | - $output .= '</table></div>'."\n"; |
|
41 | + $links = ''; |
|
42 | + } |
|
43 | + $output .= '</table></div>'."\n"; |
|
44 | 44 | return $output; |
45 | 45 | } |
46 | 46 | echo $logo; |
@@ -1,21 +1,21 @@ 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 | -$logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
|
5 | +$logo = '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
|
6 | 6 | $downloadLinks = array( |
7 | - 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | - 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | - 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | - 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
7 | + 0=>array('title'=>$_lang["information"], 'link'=>'https://evo.im/'), |
|
8 | + 1=>array('title'=>$_lang["download"], 'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | + 2=>array('title'=>$_lang["previous_releases"], 'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | + 3=>array('title'=>$_lang["extras"], 'link'=>array( |
|
11 | 11 | 'http://extras.evolution-cms.com/', |
12 | 12 | 'https://github.com/extras-evolution' |
13 | 13 | )), |
14 | 14 | ); |
15 | 15 | |
16 | 16 | $translationLinks = array( |
17 | - 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | - 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
17 | + 0=>array('title'=>'Evolution CMS', 'link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | + 1=>array('title'=>$_lang["extras"], 'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 | /** |
@@ -23,20 +23,20 @@ discard block |
||
23 | 23 | * @param array $linkArr |
24 | 24 | * @return string |
25 | 25 | */ |
26 | -function createList($sectionHeader, $linkArr) { |
|
26 | +function createList($sectionHeader, $linkArr){ |
|
27 | 27 | $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
28 | 28 | $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
29 | 29 | $links = ''; |
30 | - foreach($linkArr as $row) { |
|
30 | + foreach ($linkArr as $row) { |
|
31 | 31 | if (!is_array($row['link'])) $row['link'] = array($row['link']); |
32 | 32 | foreach ($row['link'] as $link) { |
33 | 33 | $links .= $links != '' ? '<br/>' : ''; |
34 | - $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
34 | + $links .= '<a href="'.$link.'" target="_blank">'.$link.'</a>'; |
|
35 | 35 | } |
36 | 36 | $output .= ' |
37 | 37 | <tr> |
38 | - <td align="left"><strong>' . $row["title"] . '</strong></td> |
|
39 | - <td align="left">' . $links . '</td> |
|
38 | + <td align="left"><strong>' . $row["title"].'</strong></td> |
|
39 | + <td align="left">' . $links.'</td> |
|
40 | 40 | </tr>'; |
41 | 41 | $links = ''; |
42 | 42 | } |
@@ -23,12 +23,15 @@ |
||
23 | 23 | * @param array $linkArr |
24 | 24 | * @return string |
25 | 25 | */ |
26 | -function createList($sectionHeader, $linkArr) { |
|
26 | +function createList($sectionHeader, $linkArr) |
|
27 | +{ |
|
27 | 28 | $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
28 | 29 | $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
29 | 30 | $links = ''; |
30 | 31 | foreach($linkArr as $row) { |
31 | - if (!is_array($row['link'])) $row['link'] = array($row['link']); |
|
32 | + if (!is_array($row['link'])) { |
|
33 | + $row['link'] = array($row['link']); |
|
34 | + } |
|
32 | 35 | foreach ($row['link'] as $link) { |
33 | 36 | $links .= $links != '' ? '<br/>' : ''; |
34 | 37 | $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this->db_tbl['categories'] = $modx->getFullTableName('categories'); |
21 | 21 | |
22 | 22 | foreach ($this->elements as $element) { |
23 | - $this->db_tbl[$element] = $modx->getFullTableName('site_' . $element); |
|
23 | + $this->db_tbl[$element] = $modx->getFullTableName('site_'.$element); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->db->select( |
55 | 55 | '*', |
56 | 56 | $this->db_tbl['categories'], |
57 | - "`" . $where . "` = '" . $this->db->escape($search) . "'" |
|
57 | + "`".$where."` = '".$this->db->escape($search)."'" |
|
58 | 58 | ) |
59 | 59 | ); |
60 | 60 | |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | { |
72 | 72 | $_value = $this->db->getValue( |
73 | 73 | $this->db->select( |
74 | - '`' . $value . '`', |
|
74 | + '`'.$value.'`', |
|
75 | 75 | $this->db_tbl['categories'], |
76 | - "`" . $where . "` = '" . $this->db->escape($search) . "'" |
|
76 | + "`".$where."` = '".$this->db->escape($search)."'" |
|
77 | 77 | ) |
78 | 78 | ); |
79 | 79 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->db->select( |
93 | 93 | '*', |
94 | 94 | $this->db_tbl[$element], |
95 | - "`category` = '" . (int)$category_id . "'" |
|
95 | + "`category` = '".(int) $category_id."'" |
|
96 | 96 | ) |
97 | 97 | ); |
98 | 98 | |
@@ -135,13 +135,13 @@ discard block |
||
135 | 135 | $this->db->update( |
136 | 136 | $_update, |
137 | 137 | $this->db_tbl[$element], |
138 | - "`category` = '" . (int)$category_id . "'" |
|
138 | + "`category` = '".(int) $category_id."'" |
|
139 | 139 | ); |
140 | 140 | } |
141 | 141 | |
142 | 142 | $this->db->delete( |
143 | 143 | $this->db_tbl['categories'], |
144 | - "`id` = '" . (int)$category_id . "'" |
|
144 | + "`id` = '".(int) $category_id."'" |
|
145 | 145 | ); |
146 | 146 | |
147 | 147 | return $this->db->getAffectedRows() === 1; |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | |
161 | 161 | $_update = array( |
162 | 162 | 'category' => $this->db->escape($data['category']), |
163 | - 'rank' => (int)$data['rank'] |
|
163 | + 'rank' => (int) $data['rank'] |
|
164 | 164 | ); |
165 | 165 | |
166 | 166 | $this->db->update( |
167 | 167 | $_update, |
168 | 168 | $this->db_tbl['categories'], |
169 | - "`id` = '" . (int)$category_id . "'" |
|
169 | + "`id` = '".(int) $category_id."'" |
|
170 | 170 | ); |
171 | 171 | |
172 | 172 | if ($this->db->getAffectedRows() === 1) { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | $_insert = array( |
191 | 191 | 'category' => $this->db->escape($category_name), |
192 | - 'rank' => (int)$category_rank |
|
192 | + 'rank' => (int) $category_rank |
|
193 | 193 | ); |
194 | 194 | |
195 | 195 | $this->db->insert( |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $this->db->select( |
217 | 217 | '`id`', |
218 | 218 | $this->db_tbl['categories'], |
219 | - "`category` = '" . $category . "'" |
|
219 | + "`category` = '".$category."'" |
|
220 | 220 | ) |
221 | 221 | ); |
222 | 222 |
@@ -20,14 +20,14 @@ |
||
20 | 20 | ($docid > 0 ? "id='$docid'" : "privatemgr = 1")); |
21 | 21 | $rs = $modx->db->select( |
22 | 22 | 'DISTINCT sc.id', |
23 | - $modx->getFullTableName("site_content") . " sc |
|
24 | - LEFT JOIN " . $modx->getFullTableName("document_groups") . " dg ON dg.document = sc.id |
|
25 | - LEFT JOIN " . $modx->getFullTableName("membergroup_access") . " mga ON mga.documentgroup = dg.document_group", |
|
26 | - ($docid > 0 ? " sc.id='{$docid}' AND " : "") . "mga.id>0" |
|
23 | + $modx->getFullTableName("site_content")." sc |
|
24 | + LEFT JOIN " . $modx->getFullTableName("document_groups")." dg ON dg.document = sc.id |
|
25 | + LEFT JOIN " . $modx->getFullTableName("membergroup_access")." mga ON mga.documentgroup = dg.document_group", |
|
26 | + ($docid > 0 ? " sc.id='{$docid}' AND " : "")."mga.id>0" |
|
27 | 27 | ); |
28 | 28 | $ids = $modx->db->getColumn("id", $rs); |
29 | 29 | if (count($ids) > 0) { |
30 | 30 | $modx->db->update('privatemgr = 1', $modx->getFullTableName("site_content"), |
31 | - "id IN (" . implode(", ", $ids) . ")"); |
|
31 | + "id IN (".implode(", ", $ids).")"); |
|
32 | 32 | } |
33 | 33 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | if (!empty($user_id)) { |
15 | 15 | // Raymond: grab the user settings from the database. |
16 | 16 | $rs = $modx->db->select('setting_name, setting_value', $modx->getFullTableName('user_settings'), |
17 | - "user=" . $modx->getLoginUserID()); |
|
17 | + "user=".$modx->getLoginUserID()); |
|
18 | 18 | |
19 | 19 | $which_browser_default = $which_browser; |
20 | 20 | while ($row = $modx->db->getRow($rs)) { |
@@ -20,14 +20,14 @@ |
||
20 | 20 | ($docid > 0 ? "id='$docid'" : "privateweb = 1")); |
21 | 21 | $rs = $modx->db->select( |
22 | 22 | 'DISTINCT sc.id', |
23 | - $modx->getFullTableName("site_content") . " sc |
|
24 | - LEFT JOIN " . $modx->getFullTableName("document_groups") . " dg ON dg.document = sc.id |
|
25 | - LEFT JOIN " . $modx->getFullTableName("webgroup_access") . " wga ON wga.documentgroup = dg.document_group", |
|
26 | - ($docid > 0 ? " sc.id='{$docid}' AND " : "") . "wga.id>0" |
|
23 | + $modx->getFullTableName("site_content")." sc |
|
24 | + LEFT JOIN " . $modx->getFullTableName("document_groups")." dg ON dg.document = sc.id |
|
25 | + LEFT JOIN " . $modx->getFullTableName("webgroup_access")." wga ON wga.documentgroup = dg.document_group", |
|
26 | + ($docid > 0 ? " sc.id='{$docid}' AND " : "")."wga.id>0" |
|
27 | 27 | ); |
28 | 28 | $ids = $modx->db->getColumn("id", $rs); |
29 | 29 | if (count($ids) > 0) { |
30 | 30 | $modx->db->update('privateweb = 1', $modx->getFullTableName("site_content"), |
31 | - "id IN (" . implode(", ", $ids) . ")"); |
|
31 | + "id IN (".implode(", ", $ids).")"); |
|
32 | 32 | } |
33 | 33 | } |
@@ -4,15 +4,15 @@ |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), |
7 | - "recipient=" . $modx->getLoginUserID() . " AND messageread=0"); |
|
7 | + "recipient=".$modx->getLoginUserID()." AND messageread=0"); |
|
8 | 8 | $nrnewmessages = $modx->db->getValue($rs); |
9 | -$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=" . $modx->getLoginUserID()); |
|
9 | +$rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('user_messages'), "recipient=".$modx->getLoginUserID()); |
|
10 | 10 | $nrtotalmessages = $modx->db->getValue($rs); |
11 | 11 | $messagesallowed = $modx->hasPermission('messages'); |
12 | 12 | |
13 | 13 | // ajax response |
14 | 14 | if (isset($_POST['updateMsgCount'])) { |
15 | 15 | header("Content-Type: application/json; charset=utf-8"); |
16 | - print $nrnewmessages . ',' . $nrtotalmessages; |
|
16 | + print $nrnewmessages.','.$nrtotalmessages; |
|
17 | 17 | exit; |
18 | 18 | } |
@@ -71,11 +71,11 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | if ($context === 'common') { |
74 | - $lang_path = MODX_MANAGER_PATH . 'includes/lang/'; |
|
74 | + $lang_path = MODX_MANAGER_PATH.'includes/lang/'; |
|
75 | 75 | } else { |
76 | - $lang_path = MODX_MANAGER_PATH . "includes/lang/{$context}/"; |
|
76 | + $lang_path = MODX_MANAGER_PATH."includes/lang/{$context}/"; |
|
77 | 77 | } |
78 | - include_once($lang_path . 'english.inc.php'); |
|
78 | + include_once($lang_path.'english.inc.php'); |
|
79 | 79 | $manager_language = $modx->config['manager_language']; |
80 | 80 | if (is_file("{$lang_path}{$manager_language}.inc.php")) { |
81 | 81 | include_once("{$lang_path}{$manager_language}.inc.php"); |