@@ -1,11 +1,11 @@ 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 | // invoke OnManagerTreeInit event |
7 | 7 | $evtOut = $modx->invokeEvent('OnManagerTreeInit', $_REQUEST); |
8 | -if(is_array($evtOut)) { |
|
8 | +if (is_array($evtOut)) { |
|
9 | 9 | echo implode("\n", $evtOut); |
10 | 10 | } |
11 | 11 | ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | <a class="treeButton" id="treeMenu_collapsetree" onclick="modx.tree.collapseTree();" title="<?php echo $_lang['collapse_tree']; ?>"><?php echo $_style['collapse_tree']; ?></a> |
19 | 19 | |
20 | - <?php if($modx->hasPermission('new_document')) { ?> |
|
20 | + <?php if ($modx->hasPermission('new_document')) { ?> |
|
21 | 21 | <a class="treeButton" id="treeMenu_addresource" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=4', title: '<?php echo $_lang['add_resource']; ?>'});" title="<?php echo $_lang['add_resource']; ?>"><?php echo $_style['add_doc_tree']; ?></a> |
22 | 22 | <a class="treeButton" id="treeMenu_addweblink" onclick="modx.tabs({url:'<?= MODX_MANAGER_URL ?>?a=72', title: '<?php echo $_lang['add_weblink']; ?>'});" title="<?php echo $_lang['add_weblink']; ?>"><?php echo $_style['add_weblink_tree']; ?></a> |
23 | 23 | <?php } ?> |
@@ -26,23 +26,23 @@ discard block |
||
26 | 26 | |
27 | 27 | <a class="treeButton" id="treeMenu_sortingtree" onclick="modx.tree.showSorter(event);" title="<?php echo $_lang['sort_tree']; ?>"><?php echo $_style['sort_tree']; ?></a> |
28 | 28 | |
29 | - <?php if($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?> |
|
29 | + <?php if ($modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { ?> |
|
30 | 30 | <a class="treeButton" id="treeMenu_sortingindex" onclick="modx.tabs({url: '<?= MODX_MANAGER_URL ?>?a=56&id=0', title: '<?php echo $_lang['sort_menuindex']; ?>'});" title="<?php echo $_lang['sort_menuindex']; ?>"><?php echo $_style['sort_menuindex']; ?></a> |
31 | 31 | <?php } ?> |
32 | 32 | |
33 | - <?php if($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
34 | - <a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a> |
|
33 | + <?php if ($use_browser && $modx->hasPermission('assets_images')) { ?> |
|
34 | + <a class="treeButton" id="treeMenu_openimages" title="<?php echo $_lang["images_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['images_management']; ?></a> |
|
35 | 35 | <?php } ?> |
36 | 36 | |
37 | - <?php if($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
38 | - <a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a> |
|
37 | + <?php if ($use_browser && $modx->hasPermission('assets_files')) { ?> |
|
38 | + <a class="treeButton" id="treeMenu_openfiles" title="<?php echo $_lang["files_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['files_management']; ?></a> |
|
39 | 39 | <?php } ?> |
40 | 40 | |
41 | - <?php if($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
42 | - <a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"] . "\n" . $_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a> |
|
41 | + <?php if ($modx->hasPermission('edit_template') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('edit_chunk') || $modx->hasPermission('edit_plugin')) { ?> |
|
42 | + <a class="treeButton" id="treeMenu_openelements" title="<?php echo $_lang["element_management"]."\n".$_lang['em_button_shift'] ?>"><?php echo $_style['element_management']; ?></a> |
|
43 | 43 | <?php } ?> |
44 | 44 | |
45 | - <?php if($modx->hasPermission('empty_trash')) { ?> |
|
45 | + <?php if ($modx->hasPermission('empty_trash')) { ?> |
|
46 | 46 | <a class="treeButton treeButtonDisabled" id="treeMenu_emptytrash" title="<?php echo $_lang['empty_recycle_bin_empty']; ?>"><?php echo $_style['empty_recycle_bin_empty']; ?></a> |
47 | 47 | <?php } ?> |
48 | 48 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | // invoke OnManagerTreePrerender event |
56 | 56 | $evtOut = $modx->invokeEvent('OnManagerTreePrerender', $modx->getDatabase()->escape($_REQUEST)); |
57 | - if(is_array($evtOut)) { |
|
57 | + if (is_array($evtOut)) { |
|
58 | 58 | echo implode("\n", $evtOut); |
59 | 59 | } |
60 | 60 | ?> |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <?php |
67 | 67 | // invoke OnManagerTreeRender event |
68 | 68 | $evtOut = $modx->invokeEvent('OnManagerTreeRender', $modx->getDatabase()->escape($_REQUEST)); |
69 | - if(is_array($evtOut)) { |
|
69 | + if (is_array($evtOut)) { |
|
70 | 70 | echo implode("\n", $evtOut); |
71 | 71 | } |
72 | 72 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('file_manager')) { |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | $newToken = makeToken(); |
10 | 10 | |
11 | 11 | // settings |
12 | -$theme_image_path = $modx->config['site_manager_url'] . 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
12 | +$theme_image_path = $modx->config['site_manager_url'].'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
13 | 13 | $excludes = array( |
14 | 14 | '.', |
15 | 15 | '..', |
16 | 16 | '.svn' |
17 | 17 | ); |
18 | -$alias_suffix = (!empty($friendly_url_suffix)) ? ',' . ltrim($friendly_url_suffix, '.') : ''; |
|
19 | -$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix); |
|
20 | -$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini' . $alias_suffix); |
|
18 | +$alias_suffix = (!empty($friendly_url_suffix)) ? ','.ltrim($friendly_url_suffix, '.') : ''; |
|
19 | +$editablefiles = explode(',', 'txt,php,tpl,less,sass,shtml,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix); |
|
20 | +$inlineviewablefiles = explode(',', 'txt,php,tpl,less,sass,html,htm,xml,js,css,pageCache,htaccess,json,ini'.$alias_suffix); |
|
21 | 21 | $viewablefiles = explode(',', 'jpg,gif,png,ico'); |
22 | 22 | |
23 | 23 | $editablefiles = add_dot($editablefiles); |
@@ -30,31 +30,31 @@ discard block |
||
30 | 30 | { |
31 | 31 | */ |
32 | 32 | $protected_path[] = $modx->config['site_manager_path']; |
33 | -$protected_path[] = $modx->config['base_path'] . 'temp/backup'; |
|
34 | -$protected_path[] = $modx->config['base_path'] . 'assets/backup'; |
|
33 | +$protected_path[] = $modx->config['base_path'].'temp/backup'; |
|
34 | +$protected_path[] = $modx->config['base_path'].'assets/backup'; |
|
35 | 35 | |
36 | 36 | if (!$modx->hasPermission('save_plugin')) { |
37 | - $protected_path[] = $modx->config['base_path'] . 'assets/plugins'; |
|
37 | + $protected_path[] = $modx->config['base_path'].'assets/plugins'; |
|
38 | 38 | } |
39 | 39 | if (!$modx->hasPermission('save_snippet')) { |
40 | - $protected_path[] = $modx->config['base_path'] . 'assets/snippets'; |
|
40 | + $protected_path[] = $modx->config['base_path'].'assets/snippets'; |
|
41 | 41 | } |
42 | 42 | if (!$modx->hasPermission('save_template')) { |
43 | - $protected_path[] = $modx->config['base_path'] . 'assets/templates'; |
|
43 | + $protected_path[] = $modx->config['base_path'].'assets/templates'; |
|
44 | 44 | } |
45 | 45 | if (!$modx->hasPermission('save_module')) { |
46 | - $protected_path[] = $modx->config['base_path'] . 'assets/modules'; |
|
46 | + $protected_path[] = $modx->config['base_path'].'assets/modules'; |
|
47 | 47 | } |
48 | 48 | if (!$modx->hasPermission('empty_cache')) { |
49 | - $protected_path[] = $modx->config['base_path'] . 'assets/cache'; |
|
49 | + $protected_path[] = $modx->config['base_path'].'assets/cache'; |
|
50 | 50 | } |
51 | 51 | if (!$modx->hasPermission('import_static')) { |
52 | - $protected_path[] = $modx->config['base_path'] . 'temp/import'; |
|
53 | - $protected_path[] = $modx->config['base_path'] . 'assets/import'; |
|
52 | + $protected_path[] = $modx->config['base_path'].'temp/import'; |
|
53 | + $protected_path[] = $modx->config['base_path'].'assets/import'; |
|
54 | 54 | } |
55 | 55 | if (!$modx->hasPermission('export_static')) { |
56 | - $protected_path[] = $modx->config['base_path'] . 'temp/export'; |
|
57 | - $protected_path[] = $modx->config['base_path'] . 'assets/export'; |
|
56 | + $protected_path[] = $modx->config['base_path'].'temp/export'; |
|
57 | + $protected_path[] = $modx->config['base_path'].'assets/export'; |
|
58 | 58 | } |
59 | 59 | /* |
60 | 60 | } |
@@ -96,15 +96,15 @@ discard block |
||
96 | 96 | $rw = realpath('../'); |
97 | 97 | $webstart_path = str_replace('\\', '/', str_replace($rw, '', $rf)); |
98 | 98 | if (substr($webstart_path, 0, 1) == '/') { |
99 | - $webstart_path = '..' . $webstart_path; |
|
99 | + $webstart_path = '..'.$webstart_path; |
|
100 | 100 | } else { |
101 | - $webstart_path = '../' . $webstart_path; |
|
101 | + $webstart_path = '../'.$webstart_path; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | ?> |
105 | 105 | <script type="text/javascript"> |
106 | 106 | |
107 | - var current_path = '<?= $startpath;?>'; |
|
107 | + var current_path = '<?= $startpath; ?>'; |
|
108 | 108 | |
109 | 109 | function viewfile (url) |
110 | 110 | { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | function unzipFile (file) |
141 | 141 | { |
142 | 142 | if (confirmUnzip()) { |
143 | - window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken;?>"; |
|
143 | + window.location.href = "index.php?a=31&mode=unzip&path=" + current_path + '/&file=' + file + "&token=<?= $newToken; ?>"; |
|
144 | 144 | return false; |
145 | 145 | } |
146 | 146 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | function deleteFolder (folder, status) |
163 | 163 | { |
164 | 164 | if (confirmDeleteFolder(status)) { |
165 | - window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken;?>"; |
|
165 | + window.location.href = "index.php?a=31&mode=deletefolder&path=" + current_path + "&folderpath=" + current_path + '/' + folder + "&token=<?= $newToken; ?>"; |
|
166 | 166 | return false; |
167 | 167 | } |
168 | 168 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | function deleteFile (file) |
171 | 171 | { |
172 | 172 | if (confirmDelete()) { |
173 | - window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken;?>"; |
|
173 | + window.location.href = "index.php?a=31&mode=delete&path=" + current_path + '/' + file + "&token=<?= $newToken; ?>"; |
|
174 | 174 | return false; |
175 | 175 | } |
176 | 176 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file); |
181 | 181 | if (newFilename !== null && newFilename !== file) { |
182 | - window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>"; |
|
182 | + window.location.href = "index.php?a=31&mode=duplicate&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>"; |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | { |
188 | 188 | var newDirname = prompt("<?= $_lang["files_dynamic_new_folder_name"] ?>", dir); |
189 | 189 | if (newDirname !== null && newDirname !== dir) { |
190 | - window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken;?>"; |
|
190 | + window.location.href = "index.php?a=31&mode=renameFolder&path=" + current_path + '&dirname=' + dir + "&newDirname=" + newDirname + "&token=<?= $newToken; ?>"; |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | { |
196 | 196 | var newFilename = prompt("<?= $_lang["files_dynamic_new_file_name"] ?>", file); |
197 | 197 | if (newFilename !== null && newFilename !== file) { |
198 | - window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken;?>"; |
|
198 | + window.location.href = "index.php?a=31&mode=renameFile&path=" + current_path + '/' + file + "&newFilename=" + newFilename + "&token=<?= $newToken; ?>"; |
|
199 | 199 | } |
200 | 200 | } |
201 | 201 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | <?php endif ?> |
215 | 215 | <?php |
216 | 216 | if (isset($_GET['mode']) && $_GET['mode'] !== 'drill') { |
217 | - $href = 'a=31&path=' . urlencode($_REQUEST['path']); |
|
217 | + $href = 'a=31&path='.urlencode($_REQUEST['path']); |
|
218 | 218 | } else { |
219 | 219 | $href = 'a=2'; |
220 | 220 | } |
@@ -224,12 +224,12 @@ discard block |
||
224 | 224 | $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFolderName(this);"><i class="[+image+]"></i><span>[+subject+]</span></a>'; |
225 | 225 | $ph['image'] = $_style['files_folder-open']; |
226 | 226 | $ph['subject'] = $_lang['add_folder']; |
227 | - $ph['href'] = 'index.php?a=31&mode=newfolder&path=' . urlencode($startpath) . '&name='; |
|
227 | + $ph['href'] = 'index.php?a=31&mode=newfolder&path='.urlencode($startpath).'&name='; |
|
228 | 228 | $_ = parsePlaceholder($tpl, $ph); |
229 | 229 | |
230 | - $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>' . $_lang['files.dynamic.php1'] . '</span></a>'; |
|
230 | + $tpl = '<a class="btn btn-secondary" href="[+href+]" onclick="return getFileName(this);"><i class="[+image+]"></i><span>'.$_lang['files.dynamic.php1'].'</span></a>'; |
|
231 | 231 | $ph['image'] = $_style['files_page_html']; |
232 | - $ph['href'] = 'index.php?a=31&mode=newfile&path=' . urlencode($startpath) . '&name='; |
|
232 | + $ph['href'] = 'index.php?a=31&mode=newfile&path='.urlencode($startpath).'&name='; |
|
233 | 233 | $_ .= parsePlaceholder($tpl, $ph); |
234 | 234 | echo $_; |
235 | 235 | } |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | $ph = array(); |
260 | 260 | $ph['style_path'] = $theme_image_path; |
261 | 261 | // To Top Level with folder icon to the left |
262 | - if ($startpath == $filemanager_path || $startpath . '/' == $filemanager_path) { |
|
263 | - $ph['image'] = '' . $_style['files_top'] . ''; |
|
262 | + if ($startpath == $filemanager_path || $startpath.'/' == $filemanager_path) { |
|
263 | + $ph['image'] = ''.$_style['files_top'].''; |
|
264 | 264 | $ph['subject'] = '<span>Top</span>'; |
265 | 265 | } else { |
266 | - $ph['image'] = '' . $_style['files_top'] . ''; |
|
267 | - $ph['subject'] = '<a href="index.php?a=31&mode=drill&path=' . $filemanager_path . '">Top</a>/'; |
|
266 | + $ph['image'] = ''.$_style['files_top'].''; |
|
267 | + $ph['subject'] = '<a href="index.php?a=31&mode=drill&path='.$filemanager_path.'">Top</a>/'; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | echo parsePlaceholder($tpl, $ph); |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | if (empty($v)) { |
282 | 282 | continue; |
283 | 283 | } |
284 | - $path .= rtrim($v, '/') . '/'; |
|
284 | + $path .= rtrim($v, '/').'/'; |
|
285 | 285 | if (1 < $count) { |
286 | - $href = 'index.php?a=31&mode=drill&path=' . urlencode($filemanager_path . $path); |
|
287 | - $pieces[$i] = '<a href="' . $href . '">' . trim($v, '/') . '</a>'; |
|
286 | + $href = 'index.php?a=31&mode=drill&path='.urlencode($filemanager_path.$path); |
|
287 | + $pieces[$i] = '<a href="'.$href.'">'.trim($v, '/').'</a>'; |
|
288 | 288 | } else { |
289 | - $pieces[$i] = '<span>' . trim($v, '/') . '</span>'; |
|
289 | + $pieces[$i] = '<span>'.trim($v, '/').'</span>'; |
|
290 | 290 | } |
291 | 291 | $count--; |
292 | 292 | } |
@@ -299,16 +299,16 @@ discard block |
||
299 | 299 | </div> |
300 | 300 | <?php |
301 | 301 | // check to see user isn't trying to move below the document_root |
302 | - if (substr(strtolower(str_replace('//', '/', $startpath . "/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path . '/'))) { |
|
302 | + if (substr(strtolower(str_replace('//', '/', $startpath."/")), 0, $len) != strtolower(str_replace('//', '/', $filemanager_path.'/'))) { |
|
303 | 303 | $modx->webAlertAndQuit($_lang["files_access_denied"]); |
304 | 304 | } |
305 | 305 | |
306 | 306 | // Unzip .zip files - by Raymond |
307 | 307 | if ($enablefileunzip && $_REQUEST['mode'] == 'unzip' && is_writable($startpath)) { |
308 | - if (!$err = unzip(realpath("{$startpath}/" . $_REQUEST['file']), realpath($startpath))) { |
|
309 | - echo '<span class="warning"><b>' . $_lang['file_unzip_fail'] . ($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '') . '</b></span><br /><br />'; |
|
308 | + if (!$err = unzip(realpath("{$startpath}/".$_REQUEST['file']), realpath($startpath))) { |
|
309 | + echo '<span class="warning"><b>'.$_lang['file_unzip_fail'].($err === 0 ? 'Missing zip library (php_zip.dll / zip.so)' : '').'</b></span><br /><br />'; |
|
310 | 310 | } else { |
311 | - echo '<span class="success"><b>' . $_lang['file_unzip'] . '</b></span><br /><br />'; |
|
311 | + echo '<span class="success"><b>'.$_lang['file_unzip'].'</b></span><br /><br />'; |
|
312 | 312 | } |
313 | 313 | } |
314 | 314 | // End Unzip - Raymond |
@@ -320,9 +320,9 @@ discard block |
||
320 | 320 | if ($_REQUEST['mode'] == 'deletefolder') { |
321 | 321 | $folder = $_REQUEST['folderpath']; |
322 | 322 | if (!$token_check || !@rrmdir($folder)) { |
323 | - echo '<span class="warning"><b>' . $_lang['file_folder_not_deleted'] . '</b></span><br /><br />'; |
|
323 | + echo '<span class="warning"><b>'.$_lang['file_folder_not_deleted'].'</b></span><br /><br />'; |
|
324 | 324 | } else { |
325 | - echo '<span class="success"><b>' . $_lang['file_folder_deleted'] . '</b></span><br /><br />'; |
|
325 | + echo '<span class="success"><b>'.$_lang['file_folder_deleted'].'</b></span><br /><br />'; |
|
326 | 326 | } |
327 | 327 | } |
328 | 328 | |
@@ -333,10 +333,10 @@ discard block |
||
333 | 333 | if (!mkdirs("{$startpath}/{$foldername}", 0777)) { |
334 | 334 | echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />'; |
335 | 335 | } else { |
336 | - if (!@chmod($startpath . '/' . $foldername, $newfolderaccessmode)) { |
|
337 | - echo '<span class="warning"><b>' . $_lang['file_folder_chmod_error'] . '</b></span><br /><br />'; |
|
336 | + if (!@chmod($startpath.'/'.$foldername, $newfolderaccessmode)) { |
|
337 | + echo '<span class="warning"><b>'.$_lang['file_folder_chmod_error'].'</b></span><br /><br />'; |
|
338 | 338 | } else { |
339 | - echo '<span class="success"><b>' . $_lang['file_folder_created'] . '</b></span><br /><br />'; |
|
339 | + echo '<span class="success"><b>'.$_lang['file_folder_created'].'</b></span><br /><br />'; |
|
340 | 340 | } |
341 | 341 | } |
342 | 342 | umask($old_umask); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | $filename = $modx->getDatabase()->escape($filename); |
349 | 349 | |
350 | 350 | if (!checkExtension($filename)) { |
351 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
351 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
352 | 352 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $filename) !== 0) { |
353 | 353 | echo $_lang['files.dynamic.php3']; |
354 | 354 | } else { |
@@ -370,11 +370,11 @@ discard block |
||
370 | 370 | $newFilename = $modx->getDatabase()->escape($newFilename); |
371 | 371 | |
372 | 372 | if (!checkExtension($newFilename)) { |
373 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
373 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
374 | 374 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) { |
375 | 375 | echo $_lang['files.dynamic.php3']; |
376 | 376 | } else { |
377 | - if (!copy($filename, MODX_BASE_PATH . $newFilename)) { |
|
377 | + if (!copy($filename, MODX_BASE_PATH.$newFilename)) { |
|
378 | 378 | echo $_lang['files.dynamic.php5']; |
379 | 379 | } |
380 | 380 | umask($old_umask); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | // Rename folder here |
384 | 384 | if ($_REQUEST['mode'] == 'renameFolder') { |
385 | 385 | $old_umask = umask(0); |
386 | - $dirname = $_REQUEST['path'] . '/' . $_REQUEST['dirname']; |
|
386 | + $dirname = $_REQUEST['path'].'/'.$_REQUEST['dirname']; |
|
387 | 387 | $dirname = $modx->getDatabase()->escape($dirname); |
388 | 388 | $newDirname = str_replace(array( |
389 | 389 | '..\\', |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | |
396 | 396 | if (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newDirname) !== 0) { |
397 | 397 | echo $_lang['files.dynamic.php3']; |
398 | - } else if (!rename($dirname, $_REQUEST['path'] . '/' . $newDirname)) { |
|
398 | + } else if (!rename($dirname, $_REQUEST['path'].'/'.$newDirname)) { |
|
399 | 399 | echo '<span class="warning"><b>', $_lang['file_folder_not_created'], '</b></span><br /><br />'; |
400 | 400 | } |
401 | 401 | umask($old_umask); |
@@ -415,11 +415,11 @@ discard block |
||
415 | 415 | $newFilename = $modx->getDatabase()->escape($newFilename); |
416 | 416 | |
417 | 417 | if (!checkExtension($newFilename)) { |
418 | - echo '<span class="warning"><b>' . $_lang['files_filetype_notok'] . '</b></span><br /><br />'; |
|
418 | + echo '<span class="warning"><b>'.$_lang['files_filetype_notok'].'</b></span><br /><br />'; |
|
419 | 419 | } elseif (preg_match('@(\\\\|\/|\:|\;|\,|\*|\?|\"|\<|\>|\||\?)@', $newFilename) !== 0) { |
420 | 420 | echo $_lang['files.dynamic.php3']; |
421 | 421 | } else { |
422 | - if (!rename($filename, $path . '/' . $newFilename)) { |
|
422 | + if (!rename($filename, $path.'/'.$newFilename)) { |
|
423 | 423 | echo $_lang['files.dynamic.php5']; |
424 | 424 | } |
425 | 425 | umask($old_umask); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | ls($startpath); |
453 | 453 | echo "\n\n\n"; |
454 | 454 | if ($folders == 0 && $files == 0) { |
455 | - echo '<tr><td colspan="4"><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> ' . $_lang['files_directory_is_empty'] . ' </span></td></tr>'; |
|
455 | + echo '<tr><td colspan="4"><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> <span style="color:#888;cursor:default;"> '.$_lang['files_directory_is_empty'].' </span></td></tr>'; |
|
456 | 456 | } |
457 | 457 | ?> |
458 | 458 | </table> |
@@ -461,10 +461,10 @@ discard block |
||
461 | 461 | <div class="container"> |
462 | 462 | <p> |
463 | 463 | <?php |
464 | - echo $_lang['files_directories'] . ': <b>' . $folders . '</b> '; |
|
465 | - echo $_lang['files_files'] . ': <b>' . $files . '</b> '; |
|
466 | - echo $_lang['files_data'] . ': <b><span dir="ltr">' . $modx->nicesize($filesizes) . '</span></b> '; |
|
467 | - echo $_lang['files_dirwritable'] . ' <b>' . (is_writable($startpath) == 1 ? $_lang['yes'] . '.' : $_lang['no']) . '.</b>' |
|
464 | + echo $_lang['files_directories'].': <b>'.$folders.'</b> '; |
|
465 | + echo $_lang['files_files'].': <b>'.$files.'</b> '; |
|
466 | + echo $_lang['files_data'].': <b><span dir="ltr">'.$modx->nicesize($filesizes).'</span></b> '; |
|
467 | + echo $_lang['files_dirwritable'].' <b>'.(is_writable($startpath) == 1 ? $_lang['yes'].'.' : $_lang['no']).'.</b>' |
|
468 | 468 | ?> |
469 | 469 | </p> |
470 | 470 | |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | </form> |
490 | 490 | <?php |
491 | 491 | } else { |
492 | - echo "<p>" . $_lang['files_upload_inhibited_msg'] . "</p>"; |
|
492 | + echo "<p>".$_lang['files_upload_inhibited_msg']."</p>"; |
|
493 | 493 | } |
494 | 494 | ?> |
495 | 495 | <div id="imageviewer"></div> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('logs')) { |
@@ -12,14 +12,14 @@ discard block |
||
12 | 12 | $collation = $modx->getDatabase()->getRow($res, 'num'); |
13 | 13 | |
14 | 14 | $serverArr = array( |
15 | - $_lang['modx_version'] => $modx->getVersionData('version') . ' ' . $newversiontext, |
|
15 | + $_lang['modx_version'] => $modx->getVersionData('version').' '.$newversiontext, |
|
16 | 16 | $_lang['release_date'] => $modx->getVersionData('release_date'), |
17 | 17 | 'PHP Version' => phpversion(), |
18 | - 'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">' . $_lang['view'] . '</a>', |
|
18 | + 'phpInfo()' => '<a class="text-underline" href="javascript:;" onclick="viewPHPInfo();return false;">'.$_lang['view'].'</a>', |
|
19 | 19 | $_lang['access_permissions'] => ($use_udperms == 1 ? $_lang['enabled'] : $_lang['disabled']), |
20 | 20 | $_lang['servertime'] => strftime('%H:%M:%S', time()), |
21 | 21 | $_lang['localtime'] => strftime('%H:%M:%S', time() + $server_offset_time), |
22 | - $_lang['serveroffset'] => $server_offset_time / (60 * 60) . ' h', |
|
22 | + $_lang['serveroffset'] => $server_offset_time / (60 * 60).' h', |
|
23 | 23 | $_lang['database_name'] => trim($dbase, '`'), |
24 | 24 | $_lang['database_server'] => $database_server, |
25 | 25 | $_lang['database_version'] => $modx->getDatabase()->getVersion(), |
@@ -95,33 +95,33 @@ discard block |
||
95 | 95 | </thead> |
96 | 96 | <tbody> |
97 | 97 | <?php |
98 | - $sql = "SHOW TABLE STATUS FROM $dbase LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%';"; |
|
98 | + $sql = "SHOW TABLE STATUS FROM $dbase LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%';"; |
|
99 | 99 | $rs = $modx->getDatabase()->query($sql); |
100 | 100 | $i = 0; |
101 | 101 | while ($log_status = $modx->getDatabase()->getRow($rs)) { |
102 | 102 | ?> |
103 | 103 | <tr> |
104 | 104 | <td class="text-primary"><b><?= $log_status['Name'] ?></b></td> |
105 | - <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="' . $_style['actions_help'] . '" data-tooltip="' . $log_status['Comment'] . '"></i>' : '') ?></td> |
|
105 | + <td class="text-xs-center"><?= (!empty($log_status['Comment']) ? '<i class="'.$_style['actions_help'].'" data-tooltip="'.$log_status['Comment'].'"></i>' : '') ?></td> |
|
106 | 106 | <td class="text-xs-right"><?= $log_status['Rows'] ?></td> |
107 | 107 | |
108 | 108 | <?php |
109 | 109 | $truncateable = array( |
110 | - $modx->getDatabase()->config['table_prefix'] . 'event_log', |
|
111 | - $modx->getDatabase()->config['table_prefix'] . 'manager_log', |
|
110 | + $modx->getDatabase()->config['table_prefix'].'event_log', |
|
111 | + $modx->getDatabase()->config['table_prefix'].'manager_log', |
|
112 | 112 | ); |
113 | 113 | if ($modx->hasPermission('settings') && in_array($log_status['Name'], $truncateable)) { |
114 | 114 | echo "<td class=\"text-xs-right\">"; |
115 | - echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=" . $log_status['Name'] . "' title='" . $_lang['truncate_table'] . "'>" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</a>"; |
|
115 | + echo "<a class=\"text-danger\" href='index.php?a=54&mode=$action&u=".$log_status['Name']."' title='".$_lang['truncate_table']."'>".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</a>"; |
|
116 | 116 | echo "</td>"; |
117 | 117 | } else { |
118 | - echo "<td class=\"text-xs-right\">" . $modx->nicesize($log_status['Data_length'] + $log_status['Data_free']) . "</td>"; |
|
118 | + echo "<td class=\"text-xs-right\">".$modx->nicesize($log_status['Data_length'] + $log_status['Data_free'])."</td>"; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | if ($modx->hasPermission('settings')) { |
122 | - echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=" . $log_status['Name'] . "' title='" . $_lang['optimize_table'] . "' ><span>" . $modx->nicesize($log_status['Data_free']) . "</span></a>" : "-") . "</td>"; |
|
122 | + echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? "<a class=\"text-danger\" href='index.php?a=54&mode=$action&t=".$log_status['Name']."' title='".$_lang['optimize_table']."' ><span>".$modx->nicesize($log_status['Data_free'])."</span></a>" : "-")."</td>"; |
|
123 | 123 | } else { |
124 | - echo "<td class=\"text-xs-right\">" . ($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-") . "</td>"; |
|
124 | + echo "<td class=\"text-xs-right\">".($log_status['Data_free'] > 0 ? $modx->nicesize($log_status['Data_free']) : "-")."</td>"; |
|
125 | 125 | } |
126 | 126 | ?> |
127 | 127 | <td class="text-xs-right"><?= $modx->nicesize($log_status['Data_length'] - $log_status['Data_free']) ?></td> |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | <tr class="unstyled"> |
137 | 137 | <td class="text-xs-right"><?= $_lang['database_table_totals'] ?></td> |
138 | 138 | <td colspan="3"> </td> |
139 | - <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">" . $modx->nicesize($totaloverhead) . "</b><br />(" . number_format($totaloverhead) . " B)" : "-" ?></td> |
|
139 | + <td class="text-xs-right"><?= $totaloverhead > 0 ? "<b class=\"text-danger\">".$modx->nicesize($totaloverhead)."</b><br />(".number_format($totaloverhead)." B)" : "-" ?></td> |
|
140 | 140 | <td colspan="2"> </td> |
141 | - <td class="text-xs-right"><?= "<b>" . $modx->nicesize($total) . "</b><br />(" . number_format($total) . " B)" ?></td> |
|
141 | + <td class="text-xs-right"><?= "<b>".$modx->nicesize($total)."</b><br />(".number_format($total)." B)" ?></td> |
|
142 | 142 | </tr> |
143 | 143 | </tbody> |
144 | 144 | </table> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('save_template')) { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $updateMsg = ''; |
16 | 16 | |
17 | 17 | if (isset($_POST['listSubmitted'])) { |
18 | - $updateMsg .= '<span class="text-success" id="updated">' . $_lang['sort_updated'] . '</span>'; |
|
18 | + $updateMsg .= '<span class="text-success" id="updated">'.$_lang['sort_updated'].'</span>'; |
|
19 | 19 | foreach ($_POST as $listName => $listValue) { |
20 | 20 | if ($listName == 'listSubmitted' || $listName == 'reset') { |
21 | 21 | continue; |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | $sortableList = '<div class="clearfix"><ul id="sortlist" class="sortableList">'; |
41 | 41 | while ($row = $modx->getDatabase()->getRow($rs)) { |
42 | 42 | $caption = $row['caption'] != '' ? $row['caption'] : $row['name']; |
43 | - $sortableList .= '<li id="item_' . $row['id'] . '"><i class="fa fa-list-alt"></i> ' . $caption . ' <small class="protectedNode" style="float:right">[*' . $row['name'] . '*]</small></li>'; |
|
43 | + $sortableList .= '<li id="item_'.$row['id'].'"><i class="fa fa-list-alt"></i> '.$caption.' <small class="protectedNode" style="float:right">[*'.$row['name'].'*]</small></li>'; |
|
44 | 44 | } |
45 | 45 | $sortableList .= '</ul></div>'; |
46 | 46 | } else { |
47 | - $updateMsg = '<p class="text-danger">' . $_lang['tmplvars_novars'] . '</p>'; |
|
47 | + $updateMsg = '<p class="text-danger">'.$_lang['tmplvars_novars'].'</p>'; |
|
48 | 48 | } |
49 | 49 | ?> |
50 | 50 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('bk_manager')) { |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | $dbase = trim($dbase, '`'); |
10 | 10 | |
11 | 11 | if (!isset($modx->config['snapshot_path'])) { |
12 | - if (is_dir(MODX_BASE_PATH . 'temp/backup/')) { |
|
13 | - $modx->config['snapshot_path'] = MODX_BASE_PATH . 'temp/backup/'; |
|
12 | + if (is_dir(MODX_BASE_PATH.'temp/backup/')) { |
|
13 | + $modx->config['snapshot_path'] = MODX_BASE_PATH.'temp/backup/'; |
|
14 | 14 | } else { |
15 | - $modx->config['snapshot_path'] = MODX_BASE_PATH . 'assets/backup/'; |
|
15 | + $modx->config['snapshot_path'] = MODX_BASE_PATH.'assets/backup/'; |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | if ($mode == 'restore1') { |
24 | 24 | if (isset($_POST['textarea']) && !empty($_POST['textarea'])) { |
25 | 25 | $source = trim($_POST['textarea']); |
26 | - $_SESSION['textarea'] = $source . "\n"; |
|
26 | + $_SESSION['textarea'] = $source."\n"; |
|
27 | 27 | } else { |
28 | 28 | $source = file_get_contents($_FILES['sqlfile']['tmp_name']); |
29 | 29 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | header('Location: index.php?r=9&a=93'); |
32 | 32 | exit; |
33 | 33 | } elseif ($mode == 'restore2') { |
34 | - $path = $modx->config['snapshot_path'] . $_POST['filename']; |
|
34 | + $path = $modx->config['snapshot_path'].$_POST['filename']; |
|
35 | 35 | if (file_exists($path)) { |
36 | 36 | $source = file_get_contents($path); |
37 | 37 | import_sql($source); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!is_writable(rtrim($modx->config['snapshot_path'], '/'))) { |
78 | 78 | $modx->webAlertAndQuit(parsePlaceholder($_lang["bkmgr_alert_mkdir"], array('snapshot_path' => $modx->config['snapshot_path']))); |
79 | 79 | } |
80 | - $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%'"; |
|
80 | + $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%'"; |
|
81 | 81 | $rs = $modx->getDatabase()->query($sql); |
82 | 82 | $tables = $modx->getDatabase()->getColumn('Name', $rs); |
83 | 83 | $today = date('Y-m-d_H-i-s'); |
@@ -109,18 +109,18 @@ discard block |
||
109 | 109 | $modx->webAlertAndQuit('Unable to Backup Database'); |
110 | 110 | } |
111 | 111 | } else { |
112 | - include_once MODX_MANAGER_PATH . "includes/header.inc.php"; // start normal header |
|
112 | + include_once MODX_MANAGER_PATH."includes/header.inc.php"; // start normal header |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | if (isset($_SESSION['result_msg']) && $_SESSION['result_msg'] != '') { |
116 | 116 | switch ($_SESSION['result_msg']) { |
117 | 117 | case 'import_ok': |
118 | - $ph['result_msg_import'] = '<div class="alert alert-success">' . $_lang["bkmgr_import_ok"] . '</div>'; |
|
119 | - $ph['result_msg_snapshot'] = '<div class="alert alert-success">' . $_lang["bkmgr_import_ok"] . '</div>'; |
|
118 | + $ph['result_msg_import'] = '<div class="alert alert-success">'.$_lang["bkmgr_import_ok"].'</div>'; |
|
119 | + $ph['result_msg_snapshot'] = '<div class="alert alert-success">'.$_lang["bkmgr_import_ok"].'</div>'; |
|
120 | 120 | break; |
121 | 121 | case 'snapshot_ok': |
122 | 122 | $ph['result_msg_import'] = ''; |
123 | - $ph['result_msg_snapshot'] = '<div class="alert alert-success">' . $_lang["bkmgr_snapshot_ok"] . '</div>'; |
|
123 | + $ph['result_msg_snapshot'] = '<div class="alert alert-success">'.$_lang["bkmgr_snapshot_ok"].'</div>'; |
|
124 | 124 | break; |
125 | 125 | } |
126 | 126 | $_SESSION['result_msg'] = ''; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | f.style.display = 'none'; |
180 | 180 | } |
181 | 181 | } |
182 | - <?= (isset($_REQUEST['r']) ? " doRefresh(" . $_REQUEST['r'] . ");" : "") ?> |
|
182 | + <?= (isset($_REQUEST['r']) ? " doRefresh(".$_REQUEST['r'].");" : "") ?> |
|
183 | 183 | |
184 | 184 | </script> |
185 | 185 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | </thead> |
224 | 224 | <tbody> |
225 | 225 | <?php |
226 | - $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '" . $modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix']) . "%'"; |
|
226 | + $sql = "SHOW TABLE STATUS FROM `{$dbase}` LIKE '".$modx->getDatabase()->escape($modx->getDatabase()->config['table_prefix'])."%'"; |
|
227 | 227 | $rs = $modx->getDatabase()->query($sql); |
228 | 228 | $i = 0; |
229 | 229 | while ($db_status = $modx->getDatabase()->getRow($rs)) { |
@@ -233,29 +233,29 @@ discard block |
||
233 | 233 | $table_string = ''; |
234 | 234 | } |
235 | 235 | |
236 | - echo '<tr>' . "\n" . '<td><label class="form-check form-check-label"><input type="checkbox" name="chk[]" class="form-check-input" value="' . $db_status['Name'] . '"' . (strstr($table_string, $db_status['Name']) === false ? '' : ' checked="checked"') . ' /><b class="text-primary">' . $db_status['Name'] . '</b></label></td>' . "\n"; |
|
237 | - echo '<td class="text-xs-center">' . (!empty($db_status['Comment']) ? '<i class="' . $_style['actions_help'] . '" data-tooltip="' . $db_status['Comment'] . '"></i>' : '') . '</td>' . "\n"; |
|
238 | - echo '<td class="text-xs-right">' . $db_status['Rows'] . '</td>' . "\n"; |
|
239 | - echo '<td class="text-xs-right">' . $db_status['Collation'] . '</td>' . "\n"; |
|
236 | + echo '<tr>'."\n".'<td><label class="form-check form-check-label"><input type="checkbox" name="chk[]" class="form-check-input" value="'.$db_status['Name'].'"'.(strstr($table_string, $db_status['Name']) === false ? '' : ' checked="checked"').' /><b class="text-primary">'.$db_status['Name'].'</b></label></td>'."\n"; |
|
237 | + echo '<td class="text-xs-center">'.(!empty($db_status['Comment']) ? '<i class="'.$_style['actions_help'].'" data-tooltip="'.$db_status['Comment'].'"></i>' : '').'</td>'."\n"; |
|
238 | + echo '<td class="text-xs-right">'.$db_status['Rows'].'</td>'."\n"; |
|
239 | + echo '<td class="text-xs-right">'.$db_status['Collation'].'</td>'."\n"; |
|
240 | 240 | |
241 | 241 | // Enable record deletion for certain tables (TRUNCATE TABLE) if they're not already empty |
242 | 242 | $truncateable = array( |
243 | - $modx->getDatabase()->config['table_prefix'] . 'event_log', |
|
244 | - $modx->getDatabase()->config['table_prefix'] . 'manager_log', |
|
243 | + $modx->getDatabase()->config['table_prefix'].'event_log', |
|
244 | + $modx->getDatabase()->config['table_prefix'].'manager_log', |
|
245 | 245 | ); |
246 | 246 | if ($modx->hasPermission('settings') && in_array($db_status['Name'], $truncateable) && $db_status['Rows'] > 0) { |
247 | - echo '<td class="text-xs-right"><a class="text-danger" href="index.php?a=54&mode=' . $action . '&u=' . $db_status['Name'] . '" title="' . $_lang['truncate_table'] . '">' . $modx->nicesize($db_status['Data_length'] + $db_status['Data_free']) . '</a>' . '</td>' . "\n"; |
|
247 | + echo '<td class="text-xs-right"><a class="text-danger" href="index.php?a=54&mode='.$action.'&u='.$db_status['Name'].'" title="'.$_lang['truncate_table'].'">'.$modx->nicesize($db_status['Data_length'] + $db_status['Data_free']).'</a>'.'</td>'."\n"; |
|
248 | 248 | } else { |
249 | - echo '<td class="text-xs-right">' . $modx->nicesize($db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n"; |
|
249 | + echo '<td class="text-xs-right">'.$modx->nicesize($db_status['Data_length'] + $db_status['Data_free']).'</td>'."\n"; |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | if ($modx->hasPermission('settings')) { |
253 | - echo '<td class="text-xs-right">' . ($db_status['Data_free'] > 0 ? '<a class="text-danger" href="index.php?a=54&mode=' . $action . '&t=' . $db_status['Name'] . '" title="' . $_lang['optimize_table'] . '">' . $modx->nicesize($db_status['Data_free']) . '</a>' : '-') . '</td>' . "\n"; |
|
253 | + echo '<td class="text-xs-right">'.($db_status['Data_free'] > 0 ? '<a class="text-danger" href="index.php?a=54&mode='.$action.'&t='.$db_status['Name'].'" title="'.$_lang['optimize_table'].'">'.$modx->nicesize($db_status['Data_free']).'</a>' : '-').'</td>'."\n"; |
|
254 | 254 | } else { |
255 | - echo '<td class="text-xs-right">' . ($db_status['Data_free'] > 0 ? $modx->nicesize($db_status['Data_free']) : '-') . '</td>' . "\n"; |
|
255 | + echo '<td class="text-xs-right">'.($db_status['Data_free'] > 0 ? $modx->nicesize($db_status['Data_free']) : '-').'</td>'."\n"; |
|
256 | 256 | } |
257 | 257 | |
258 | - echo '<td class="text-xs-right">' . $modx->nicesize($db_status['Data_length'] - $db_status['Data_free']) . '</td>' . "\n" . '<td class="text-xs-right">' . $modx->nicesize($db_status['Index_length']) . '</td>' . "\n" . '<td class="text-xs-right">' . $modx->nicesize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']) . '</td>' . "\n" . "</tr>"; |
|
258 | + echo '<td class="text-xs-right">'.$modx->nicesize($db_status['Data_length'] - $db_status['Data_free']).'</td>'."\n".'<td class="text-xs-right">'.$modx->nicesize($db_status['Index_length']).'</td>'."\n".'<td class="text-xs-right">'.$modx->nicesize($db_status['Index_length'] + $db_status['Data_length'] + $db_status['Data_free']).'</td>'."\n"."</tr>"; |
|
259 | 259 | |
260 | 260 | $total = $total + $db_status['Index_length'] + $db_status['Data_length']; |
261 | 261 | $totaloverhead = $totaloverhead + $db_status['Data_free']; |
@@ -266,9 +266,9 @@ discard block |
||
266 | 266 | <tr> |
267 | 267 | <td class="text-xs-right"><?= $_lang['database_table_totals'] ?></td> |
268 | 268 | <td colspan="4"> </td> |
269 | - <td class="text-xs-right"><?= $totaloverhead > 0 ? '<b class="text-danger">' . $modx->nicesize($totaloverhead) . '</b><br />(' . number_format($totaloverhead) . ' B)' : '-' ?></td> |
|
269 | + <td class="text-xs-right"><?= $totaloverhead > 0 ? '<b class="text-danger">'.$modx->nicesize($totaloverhead).'</b><br />('.number_format($totaloverhead).' B)' : '-' ?></td> |
|
270 | 270 | <td colspan="2"> </td> |
271 | - <td class="text-xs-right"><?= "<b>" . $modx->nicesize($total) . "</b><br />(" . number_format($total) . " B)" ?></td> |
|
271 | + <td class="text-xs-right"><?= "<b>".$modx->nicesize($total)."</b><br />(".number_format($total)." B)" ?></td> |
|
272 | 272 | </tr> |
273 | 273 | </tfoot> |
274 | 274 | </table> |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | foreach ($last_result['0'] as $k => $v) { |
320 | 320 | $title[] = $k; |
321 | 321 | } |
322 | - $result = '<thead><tr><th>' . implode('</th><th>', $title) . '</th></tr></thead>'; |
|
322 | + $result = '<thead><tr><th>'.implode('</th><th>', $title).'</th></tr></thead>'; |
|
323 | 323 | $result .= '<tbody>'; |
324 | 324 | foreach ($last_result as $row) { |
325 | 325 | $result_value = array(); |
@@ -327,11 +327,11 @@ discard block |
||
327 | 327 | foreach ($row as $k => $v) { |
328 | 328 | $result_value[] = $v; |
329 | 329 | } |
330 | - $result .= '<tr><td>' . implode('</td><td>', $result_value) . '</td></tr>'; |
|
330 | + $result .= '<tr><td>'.implode('</td><td>', $result_value).'</td></tr>'; |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | $result .= '</tbody>'; |
334 | - $result = '<table class="table data">' . $result . '</table>'; |
|
334 | + $result = '<table class="table data">'.$result.'</table>'; |
|
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | while ($count < 11) { |
434 | 434 | $line = fgets($file); |
435 | 435 | foreach ($detailFields as $label) { |
436 | - $fileLabel = '# ' . $label; |
|
436 | + $fileLabel = '# '.$label; |
|
437 | 437 | if (strpos($line, $fileLabel) !== false) { |
438 | 438 | $details[$label] = htmlentities(trim(str_replace(array( |
439 | 439 | $fileLabel, |
@@ -446,10 +446,10 @@ discard block |
||
446 | 446 | }; |
447 | 447 | fclose($file); |
448 | 448 | |
449 | - $tooltip = "Generation Time: " . $details["Generation Time"] . "\n"; |
|
450 | - $tooltip .= "Server version: " . $details["Server version"] . "\n"; |
|
451 | - $tooltip .= "PHP Version: " . $details["PHP Version"] . "\n"; |
|
452 | - $tooltip .= "Host: " . $details["Host"] . "\n"; |
|
449 | + $tooltip = "Generation Time: ".$details["Generation Time"]."\n"; |
|
450 | + $tooltip .= "Server version: ".$details["Server version"]."\n"; |
|
451 | + $tooltip .= "PHP Version: ".$details["PHP Version"]."\n"; |
|
452 | + $tooltip .= "Host: ".$details["Host"]."\n"; |
|
453 | 453 | ?> |
454 | 454 | <tr> |
455 | 455 | <td><?= $filename ?></td> |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | <?php |
482 | 482 | |
483 | 483 | if (is_numeric($_GET['tab'])) { |
484 | - echo '<script type="text/javascript">tpDBM.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
484 | + echo '<script type="text/javascript">tpDBM.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | include_once "footer.inc.php"; // send footer |
@@ -1,8 +1,8 @@ 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 | -if(!$modx->hasPermission('access_permissions')) { |
|
5 | +if (!$modx->hasPermission('access_permissions')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -17,23 +17,23 @@ discard block |
||
17 | 17 | |
18 | 18 | // find all document groups, for the select :) |
19 | 19 | $rs = $modx->getDatabase()->select('*', $tbl_documentgroup_names, '', 'name'); |
20 | -if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
20 | +if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
21 | 21 | $docgroupselector = '[no groups to add]'; |
22 | 22 | } else { |
23 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
24 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
25 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
23 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
24 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
25 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
26 | 26 | } |
27 | 27 | $docgroupselector .= "</select>\n"; |
28 | 28 | } |
29 | 29 | |
30 | 30 | $rs = $modx->getDatabase()->select('*', $tbl_membergroup_names, '', 'name'); |
31 | -if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
31 | +if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
32 | 32 | $usrgroupselector = '[no user groups]'; |
33 | 33 | } else { |
34 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
35 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
36 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
34 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
35 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
36 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
37 | 37 | } |
38 | 38 | $usrgroupselector .= "</select>\n"; |
39 | 39 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
70 | 70 | </div> |
71 | 71 | |
72 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
72 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
73 | 73 | |
74 | 74 | <div class="tab-pane" id="uapPane"> |
75 | 75 | <script type="text/javascript"> |
@@ -96,10 +96,10 @@ discard block |
||
96 | 96 | </form> |
97 | 97 | </div> |
98 | 98 | <?php |
99 | - $rs = $modx->getDatabase()->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
100 | - LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id |
|
101 | - LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
102 | - if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
99 | + $rs = $modx->getDatabase()->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names.' AS groupnames |
|
100 | + LEFT JOIN ' . $tbl_member_groups.' AS groups ON groups.user_group = groupnames.id |
|
101 | + LEFT JOIN ' . $tbl_manager_users.' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
102 | + if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
103 | 103 | ?> |
104 | 104 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
105 | 105 | <?php |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | <div class="form-group"> |
109 | 109 | <?php |
110 | 110 | $pid = ''; |
111 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
112 | - if($pid != $row['id']) { |
|
113 | - if($pid != '') { |
|
111 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
112 | + if ($pid != $row['id']) { |
|
113 | + if ($pid != '') { |
|
114 | 114 | echo '</div><div class="form-group">'; |
115 | 115 | } |
116 | 116 | ?> |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | <?= $_lang['access_permissions_users_in_group'] ?> |
130 | 130 | <?php |
131 | 131 | } |
132 | - if(!$row['user_id']) { |
|
132 | + if (!$row['user_id']) { |
|
133 | 133 | ?> |
134 | 134 | <i><?= $_lang['access_permissions_no_users_in_group'] ?></i> |
135 | 135 | <?php |
@@ -167,10 +167,10 @@ discard block |
||
167 | 167 | </form> |
168 | 168 | </div> |
169 | 169 | <?php |
170 | - $rs = $modx->getDatabase()->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
171 | - LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id |
|
172 | - LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
173 | - if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
170 | + $rs = $modx->getDatabase()->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names.' AS dgnames |
|
171 | + LEFT JOIN ' . $tbl_document_groups.' AS dg ON dg.document_group = dgnames.id |
|
172 | + LEFT JOIN ' . $tbl_site_content.' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
173 | + if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
174 | 174 | ?> |
175 | 175 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
176 | 176 | <?php |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | <div class="form-group"> |
180 | 180 | <?php |
181 | 181 | $pid = ''; |
182 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
183 | - if($pid != $row['id']) { |
|
184 | - if($pid != '') { |
|
182 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
183 | + if ($pid != $row['id']) { |
|
184 | + if ($pid != '') { |
|
185 | 185 | echo '</div><div class="form-group">'; |
186 | 186 | } |
187 | 187 | ?> |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | <?= $_lang['access_permissions_resources_in_group'] ?> |
201 | 201 | <?php |
202 | 202 | } |
203 | - if(!$row['doc_id']) { |
|
203 | + if (!$row['doc_id']) { |
|
204 | 204 | ?> |
205 | 205 | <i><?= $_lang['access_permissions_no_resources_in_group'] ?></i> |
206 | 206 | <?php |
@@ -226,10 +226,10 @@ discard block |
||
226 | 226 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
227 | 227 | <?php |
228 | 228 | // User/Document Group Links |
229 | - $rs = $modx->getDatabase()->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
230 | - LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id |
|
231 | - LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
232 | - if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
229 | + $rs = $modx->getDatabase()->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names.' AS groupnames |
|
230 | + LEFT JOIN ' . $tbl_membergroup_access.' AS groupacc ON groupacc.membergroup = groupnames.id |
|
231 | + LEFT JOIN ' . $tbl_documentgroup_names.' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
232 | + if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
233 | 233 | ?> |
234 | 234 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
235 | 235 | <?php |
@@ -251,23 +251,23 @@ discard block |
||
251 | 251 | <ul> |
252 | 252 | <?php |
253 | 253 | $pid = ''; |
254 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
255 | - if($row['id'] != $pid) { |
|
256 | - if($pid != '') { |
|
254 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
255 | + if ($row['id'] != $pid) { |
|
256 | + if ($pid != '') { |
|
257 | 257 | echo '</ul></li>'; |
258 | 258 | } // close previous one |
259 | 259 | ?> |
260 | 260 | <li><b><?= $row['name'] ?></b></li> |
261 | 261 | <?php |
262 | - if(!$row['dg_id']) { |
|
263 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
262 | + if (!$row['dg_id']) { |
|
263 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
264 | 264 | $pid = ''; |
265 | 265 | continue; |
266 | 266 | } else { |
267 | 267 | echo '<ul>'; |
268 | 268 | } |
269 | 269 | } |
270 | - if(!$row['dg_id']) { |
|
270 | + if (!$row['dg_id']) { |
|
271 | 271 | continue; |
272 | 272 | } |
273 | 273 | ?> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
3 | + if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
5 | 5 | } else { |
6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | <tr> |
16 | 16 | <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th> |
17 | 17 | <td> |
18 | -<?php echo wrap_label($_lang['allow_eval_with_scan'] , form_radio('allow_eval','with_scan'));?><br /> |
|
19 | -<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br /> |
|
20 | -<?php echo wrap_label($_lang['allow_eval_everytime_eval'] , form_radio('allow_eval','everytime_eval'));?><br /> |
|
21 | -<?php echo wrap_label($_lang['allow_eval_dont_eval'] , form_radio('allow_eval','dont_eval'));?> |
|
18 | +<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br /> |
|
19 | +<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br /> |
|
20 | +<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br /> |
|
21 | +<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?> |
|
22 | 22 | <div class="comment"> |
23 | 23 | <?php echo $_lang['allow_eval_msg'] ?> |
24 | 24 | </div> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <tr> |
44 | 44 | <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th> |
45 | 45 | <td> |
46 | - <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br /> |
|
46 | + <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br /> |
|
47 | 47 | |
48 | 48 | </td> |
49 | 49 | </tr> |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | <tr> |
54 | 54 | <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td> |
55 | 55 | <td> |
56 | - <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br /> |
|
57 | - <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?> |
|
56 | + <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br /> |
|
57 | + <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?> |
|
58 | 58 | </td> |
59 | 59 | </tr> |
60 | 60 | <tr> |
@@ -89,25 +89,25 @@ discard block |
||
89 | 89 | <tr> |
90 | 90 | <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th> |
91 | 91 | <td> |
92 | -<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br /> |
|
93 | -<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br /> |
|
94 | -<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br /> |
|
95 | -<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?> |
|
92 | +<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br /> |
|
93 | +<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br /> |
|
94 | +<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br /> |
|
95 | +<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?> |
|
96 | 96 | </td> |
97 | 97 | </tr> |
98 | 98 | <tr> |
99 | 99 | <td width="200"> </td> |
100 | - <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td> |
|
100 | + <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td> |
|
101 | 101 | </tr> |
102 | 102 | <tr><td colspan="2"><div class="split"></div></td></tr> |
103 | 103 | <tr> |
104 | 104 | <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th> |
105 | 105 | <td> |
106 | -<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br /> |
|
107 | -<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br /> |
|
108 | -<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br /> |
|
109 | -<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br /> |
|
110 | -<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td> |
|
106 | +<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br /> |
|
107 | +<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br /> |
|
108 | +<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br /> |
|
109 | +<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br /> |
|
110 | +<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td> |
|
111 | 111 | </tr> |
112 | 112 | <tr> |
113 | 113 | <td colspan="2"><div class="split"></div></td> |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | <tr> |
116 | 116 | <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th> |
117 | 117 | <td> |
118 | -<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br /> |
|
119 | -<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?> |
|
118 | +<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br /> |
|
119 | +<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?> |
|
120 | 120 | |
121 | 121 | </td> |
122 | 122 | </tr> |
@@ -157,20 +157,20 @@ discard block |
||
157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
158 | 158 | <td> |
159 | 159 | <?php |
160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | -$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
|
162 | -$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
|
163 | -$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1; |
|
164 | -$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0:1; |
|
165 | -$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0:1; |
|
166 | -$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0:1; |
|
160 | +if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | +$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1; |
|
162 | +$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1; |
|
163 | +$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0 : 1; |
|
164 | +$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0 : 1; |
|
165 | +$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0 : 1; |
|
166 | +$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0 : 1; |
|
167 | 167 | ?> |
168 | -<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br /> |
|
169 | -<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br /> |
|
170 | -<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA512' , '', $phm['e']['SHA512']));?><br /> |
|
171 | -<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA256' , '', $phm['e']['SHA256']));?><br /> |
|
172 | -<?php echo wrap_label('CRYPT_MD5 (salt & stretch)' ,form_radio('pwd_hash_algo','MD5' , '', $phm['e']['MD5']));?><br /> |
|
173 | -<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)' ,form_radio('pwd_hash_algo','UNCRYPT' , '', $phm['e']['UNCRYPT']));?> |
|
168 | +<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br /> |
|
169 | +<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br /> |
|
170 | +<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br /> |
|
171 | +<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br /> |
|
172 | +<?php echo wrap_label('CRYPT_MD5 (salt & stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br /> |
|
173 | +<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?> |
|
174 | 174 | </td> |
175 | 175 | </tr> |
176 | 176 | <tr> |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | ?> |
187 | 187 | <?php |
188 | 188 | $gdAvailable = extension_loaded('gd'); |
189 | -if(!$gdAvailable) $use_captcha = 0; |
|
189 | +if (!$gdAvailable) $use_captcha = 0; |
|
190 | 190 | ?> |
191 | 191 | <tr> |
192 | 192 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
193 | - <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> /> |
|
193 | + <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
194 | 194 | <?php echo $_lang['yes']?></label><br /> |
195 | - <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> /> |
|
195 | + <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
196 | 196 | <?php echo $_lang['no']?></label> </td> |
197 | 197 | </tr> |
198 | 198 | <tr> |
@@ -202,23 +202,23 @@ discard block |
||
202 | 202 | <tr> |
203 | 203 | <td colspan="2"><div class="split"></div></td> |
204 | 204 | </tr> |
205 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
205 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
206 | 206 | <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small> |
207 | 207 | <br /> |
208 | 208 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
209 | 209 | <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');"> |
210 | -<?php echo get_lang_options('captcha_words_default');?> |
|
210 | +<?php echo get_lang_options('captcha_words_default'); ?> |
|
211 | 211 | </select> |
212 | 212 | </td> |
213 | 213 | <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" /> |
214 | - <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" /> |
|
214 | + <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" /> |
|
215 | 215 | </td> |
216 | 216 | </tr> |
217 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
217 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
218 | 218 | <td width="200"> </td> |
219 | 219 | <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td> |
220 | 220 | </tr> |
221 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
221 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
222 | 222 | <td colspan="2"><div class="split"></div></td> |
223 | 223 | </tr> |
224 | 224 | <tr> |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | <?php |
227 | 227 | // invoke OnMiscSettingsRender event |
228 | 228 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender'); |
229 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
229 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
230 | 230 | ?> |
231 | 231 | </td> |
232 | 232 | </tr> |
@@ -1,8 +1,8 @@ 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 | -if(!$modx->hasPermission('web_access_permissions')) { |
|
5 | +if (!$modx->hasPermission('web_access_permissions')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | switch ($operation) { |
23 | 23 | case "add_user_group" : |
24 | 24 | $newgroup = $_REQUEST['newusergroup']; |
25 | - if(empty($newgroup)) { |
|
25 | + if (empty($newgroup)) { |
|
26 | 26 | $modx->webAlertAndQuit("No group name specified."); |
27 | 27 | } else { |
28 | 28 | $id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_webgroup_names); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | break; |
37 | 37 | case "add_document_group" : |
38 | 38 | $newgroup = $_REQUEST['newdocgroup']; |
39 | - if(empty($newgroup)) { |
|
39 | + if (empty($newgroup)) { |
|
40 | 40 | $modx->webAlertAndQuit("No group name specified."); |
41 | 41 | } else { |
42 | 42 | $id = $modx->getDatabase()->insert(array('name'=>$modx->getDatabase()->escape($newgroup)), $tbl_documentgroup_names); |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | break; |
51 | 51 | case "delete_user_group" : |
52 | 52 | $updategroupaccess = true; |
53 | - $usergroup = (int)$_REQUEST['usergroup']; |
|
54 | - if(empty($usergroup)) { |
|
53 | + $usergroup = (int) $_REQUEST['usergroup']; |
|
54 | + if (empty($usergroup)) { |
|
55 | 55 | $modx->webAlertAndQuit("No user group id specified for deletion."); |
56 | 56 | } else { |
57 | 57 | $modx->getDatabase()->delete($tbl_webgroup_names, "id='{$usergroup}'"); |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | } |
63 | 63 | break; |
64 | 64 | case "delete_document_group" : |
65 | - $group = (int)$_REQUEST['documentgroup']; |
|
66 | - if(empty($group)) { |
|
65 | + $group = (int) $_REQUEST['documentgroup']; |
|
66 | + if (empty($group)) { |
|
67 | 67 | $modx->webAlertAndQuit("No document group id specified for deletion."); |
68 | 68 | } else { |
69 | 69 | $modx->getDatabase()->delete($tbl_documentgroup_names, "id='{$group}'"); |
@@ -75,33 +75,33 @@ discard block |
||
75 | 75 | break; |
76 | 76 | case "rename_user_group" : |
77 | 77 | $newgroupname = $_REQUEST['newgroupname']; |
78 | - if(empty($newgroupname)) { |
|
78 | + if (empty($newgroupname)) { |
|
79 | 79 | $modx->webAlertAndQuit("No group name specified."); |
80 | 80 | } |
81 | - $groupid = (int)$_REQUEST['groupid']; |
|
82 | - if(empty($groupid)) { |
|
81 | + $groupid = (int) $_REQUEST['groupid']; |
|
82 | + if (empty($groupid)) { |
|
83 | 83 | $modx->webAlertAndQuit("No user group id specified for rename."); |
84 | 84 | } |
85 | 85 | $modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_webgroup_names, "id='{$groupid}'"); |
86 | 86 | break; |
87 | 87 | case "rename_document_group" : |
88 | 88 | $newgroupname = $_REQUEST['newgroupname']; |
89 | - if(empty($newgroupname)) { |
|
89 | + if (empty($newgroupname)) { |
|
90 | 90 | $modx->webAlertAndQuit("No group name specified."); |
91 | 91 | } |
92 | - $groupid = (int)$_REQUEST['groupid']; |
|
93 | - if(empty($groupid)) { |
|
92 | + $groupid = (int) $_REQUEST['groupid']; |
|
93 | + if (empty($groupid)) { |
|
94 | 94 | $modx->webAlertAndQuit("No document group id specified for rename."); |
95 | 95 | } |
96 | 96 | $modx->getDatabase()->update(array('name' => $modx->getDatabase()->escape($newgroupname)), $tbl_documentgroup_names, "id='{$groupid}'"); |
97 | 97 | break; |
98 | 98 | case "add_document_group_to_user_group" : |
99 | 99 | $updategroupaccess = true; |
100 | - $usergroup = (int)$_REQUEST['usergroup']; |
|
101 | - $docgroup = (int)$_REQUEST['docgroup']; |
|
100 | + $usergroup = (int) $_REQUEST['usergroup']; |
|
101 | + $docgroup = (int) $_REQUEST['docgroup']; |
|
102 | 102 | $rs = $modx->getDatabase()->select('COUNT(*)', $tbl_webgroup_access, "webgroup='{$usergroup}' AND documentgroup='{$docgroup}'"); |
103 | 103 | $limit = $modx->getDatabase()->getValue($rs); |
104 | - if($limit<=0) { |
|
104 | + if ($limit <= 0) { |
|
105 | 105 | $modx->getDatabase()->insert(array('webgroup'=>$usergroup, 'documentgroup'=>$docgroup), $tbl_webgroup_access); |
106 | 106 | } else { |
107 | 107 | //alert user that coupling already exists? |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | break; |
110 | 110 | case "remove_document_group_from_user_group" : |
111 | 111 | $updategroupaccess = true; |
112 | - $coupling = (int)$_REQUEST['coupling']; |
|
112 | + $coupling = (int) $_REQUEST['coupling']; |
|
113 | 113 | $modx->getDatabase()->delete($tbl_webgroup_access, "id='{$coupling}'"); |
114 | 114 | break; |
115 | 115 | default : |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | // secure web documents - flag as private |
120 | -if($updategroupaccess==true){ |
|
120 | +if ($updategroupaccess == true) { |
|
121 | 121 | include MODX_MANAGER_PATH."includes/secure_web_documents.inc.php"; |
122 | 122 | secureWebDocument(); |
123 | 123 |
@@ -1,12 +1,12 @@ 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 | if (!$modx->hasPermission('save_plugin')) { |
6 | 6 | $modx->webAlertAndQuit($_lang['error_no_privileges']); |
7 | 7 | } |
8 | 8 | |
9 | -$id = (int)$_POST['id']; |
|
9 | +$id = (int) $_POST['id']; |
|
10 | 10 | $name = $modx->getDatabase()->escape(trim($_POST['name'])); |
11 | 11 | $description = $modx->getDatabase()->escape($_POST['description']); |
12 | 12 | $locked = $_POST['locked'] == 'on' ? '1' : '0'; |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | |
21 | 21 | //Kyle Jaebker - added category support |
22 | 22 | if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) { |
23 | - $categoryid = (int)$_POST['categoryid']; |
|
23 | + $categoryid = (int) $_POST['categoryid']; |
|
24 | 24 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
25 | 25 | $categoryid = 0; |
26 | 26 | } else { |
27 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
27 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
28 | 28 | $categoryid = getCategory($_POST['newcategory']); |
29 | 29 | } |
30 | 30 | |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | $moduleguid = isset($parsed['guid']) ? $parsed['guid'] : $moduleguid; |
41 | 41 | |
42 | 42 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
43 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
43 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
44 | 44 | if ($version) { |
45 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
45 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
46 | 46 | } |
47 | 47 | if (isset($parsed['modx_category'])) { |
48 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
48 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
49 | 49 | $categoryid = getCategory($parsed['modx_category']); |
50 | 50 | } |
51 | 51 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // finished emptying cache - redirect |
104 | 104 | if ($_POST['stay'] != '') { |
105 | 105 | $a = ($_POST['stay'] == '2') ? "102&id=$newid" : '101'; |
106 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
106 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
107 | 107 | header($header); |
108 | 108 | } else { |
109 | 109 | $header = 'Location: index.php?a=76&r=2'; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // finished emptying cache - redirect |
159 | 159 | if ($_POST['stay'] != '') { |
160 | 160 | $a = ($_POST['stay'] == '2') ? "102&id=$id" : '101'; |
161 | - $header = 'Location: index.php?a=' . $a . '&r=2&stay=' . $_POST['stay']; |
|
161 | + $header = 'Location: index.php?a='.$a.'&r=2&stay='.$_POST['stay']; |
|
162 | 162 | header($header); |
163 | 163 | } else { |
164 | 164 | $modx->unlockElement(5, $id); |