@@ -6,4 +6,6 @@ |
||
| 6 | 6 | /** |
| 7 | 7 | * Don't delete |
| 8 | 8 | */ |
| 9 | -class mgrResources extends EvolutionCMS\Legacy\mgrResources{} |
|
| 9 | +class mgrResources extends EvolutionCMS\Legacy\mgrResources |
|
| 10 | +{ |
|
| 11 | +} |
|
@@ -1,3 +1,5 @@ |
||
| 1 | 1 | <?php namespace EvolutionCMS\Interfaces; |
| 2 | 2 | |
| 3 | -interface ManagerThemeInterface{} |
|
| 3 | +interface ManagerThemeInterface |
|
| 4 | +{ |
|
| 5 | +} |
|
@@ -10,12 +10,12 @@ discard block |
||
| 10 | 10 | */ |
| 11 | 11 | $style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
| 12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
| 13 | -if(!$modx->config['lang_code']) {
|
|
| 13 | +if(!$modx->config['lang_code']) { |
|
| 14 | 14 | global $modx_lang_attribute; |
| 15 | 15 | $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | -if(!empty($_GET['a']) && $_GET['a'] == 2) {
|
|
| 18 | +if(!empty($_GET['a']) && $_GET['a'] == 2) { |
|
| 19 | 19 | include_once('welcome.php');
|
| 20 | 20 | } |
| 21 | 21 | |
@@ -262,68 +262,68 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | // actions buttons templates |
| 264 | 264 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
| 265 | -if (!empty($modx->config['global_tabs']) && !isset($_SESSION['stay'])) {
|
|
| 265 | +if (!empty($modx->config['global_tabs']) && !isset($_SESSION['stay'])) { |
|
| 266 | 266 | $_REQUEST['stay'] = 2; |
| 267 | 267 | } |
| 268 | -if (isset($_REQUEST['stay'])) {
|
|
| 268 | +if (isset($_REQUEST['stay'])) { |
|
| 269 | 269 | $_SESSION['stay'] = $_REQUEST['stay']; |
| 270 | -} else if (isset($_SESSION['stay'])) {
|
|
| 270 | +} else if (isset($_SESSION['stay'])) { |
|
| 271 | 271 | $_REQUEST['stay'] = $_SESSION['stay']; |
| 272 | 272 | } |
| 273 | 273 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
| 274 | 274 | $addnew = 0; |
| 275 | 275 | $run = 0; |
| 276 | -switch($action) {
|
|
| 276 | +switch($action) { |
|
| 277 | 277 | case '3': |
| 278 | 278 | case '4': |
| 279 | 279 | case '27': |
| 280 | 280 | case '72': |
| 281 | - if($modx->hasPermission('new_document')) {
|
|
| 281 | + if($modx->hasPermission('new_document')) { |
|
| 282 | 282 | $addnew = 1; |
| 283 | 283 | } |
| 284 | 284 | break; |
| 285 | 285 | case '16': |
| 286 | 286 | case '19': |
| 287 | - if($modx->hasPermission('new_template')) {
|
|
| 287 | + if($modx->hasPermission('new_template')) { |
|
| 288 | 288 | $addnew = 1; |
| 289 | 289 | } |
| 290 | 290 | break; |
| 291 | 291 | case '300': |
| 292 | 292 | case '301': |
| 293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) {
|
|
| 293 | + if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
| 294 | 294 | $addnew = 1; |
| 295 | 295 | } |
| 296 | 296 | break; |
| 297 | 297 | case '77': |
| 298 | 298 | case '78': |
| 299 | - if($modx->hasPermission('new_chunk')) {
|
|
| 299 | + if($modx->hasPermission('new_chunk')) { |
|
| 300 | 300 | $addnew = 1; |
| 301 | 301 | } |
| 302 | 302 | break; |
| 303 | 303 | case '22': |
| 304 | 304 | case '23': |
| 305 | - if($modx->hasPermission('new_snippet')) {
|
|
| 305 | + if($modx->hasPermission('new_snippet')) { |
|
| 306 | 306 | $addnew = 1; |
| 307 | 307 | } |
| 308 | 308 | break; |
| 309 | 309 | case '101': |
| 310 | 310 | case '102': |
| 311 | - if($modx->hasPermission('new_plugin')) {
|
|
| 311 | + if($modx->hasPermission('new_plugin')) { |
|
| 312 | 312 | $addnew = 1; |
| 313 | 313 | } |
| 314 | 314 | break; |
| 315 | 315 | case '106': |
| 316 | 316 | case '107': |
| 317 | 317 | case '108': |
| 318 | - if($modx->hasPermission('new_module')) {
|
|
| 318 | + if($modx->hasPermission('new_module')) { |
|
| 319 | 319 | $addnew = 1; |
| 320 | 320 | } |
| 321 | - if($modx->hasPermission('exec_module')) {
|
|
| 321 | + if($modx->hasPermission('exec_module')) { |
|
| 322 | 322 | $run = 1; |
| 323 | 323 | } |
| 324 | 324 | break; |
| 325 | 325 | case '88': |
| 326 | - if($modx->hasPermission('new_web_user')) {
|
|
| 326 | + if($modx->hasPermission('new_web_user')) { |
|
| 327 | 327 | $addnew = 1; |
| 328 | 328 | } |
| 329 | 329 | break; |
@@ -16,7 +16,8 @@ discard block |
||
| 16 | 16 | <span class="notok"><?=$_lang['setup_database_create_connection_failed']?></span> |
| 17 | 17 | </p> |
| 18 | 18 | <p><?=$_lang['setup_database_create_connection_failed_note']?></p> |
| 19 | -<?php else : ?> |
|
| 19 | +<?php else { |
|
| 20 | + : ?> |
|
| 20 | 21 | <p><?=$_lang['setup_database_create_connection']?> <span class="ok"><?=$_lang['ok']?></span></p> |
| 21 | 22 | <?php if ($selectDatabase === false) : ?> |
| 22 | 23 | <p><?=rtrim($_lang['setup_database_selection'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
@@ -41,13 +42,18 @@ discard block |
||
| 41 | 42 | <?=rtrim($_lang['setup_database_creation'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
| 42 | 43 | <span class="ok"><?=$_lang['ok']?></span> |
| 43 | 44 | </p> |
| 44 | - <?php endif; ?> |
|
| 45 | - <?php else : ?> |
|
| 45 | + <?php endif; |
|
| 46 | +} |
|
| 47 | +?> |
|
| 48 | + <?php else { |
|
| 49 | + : ?> |
|
| 46 | 50 | <p> |
| 47 | 51 | <?=rtrim($_lang['setup_database_selection'], '`')?> <strong><?=trim($dbase, '`')?></strong>: |
| 48 | 52 | <span class="ok"><?=$_lang['ok']?></span> |
| 49 | 53 | </p> |
| 50 | - <?php endif; ?> |
|
| 54 | + <?php endif; |
|
| 55 | +} |
|
| 56 | +?> |
|
| 51 | 57 | <?php endif; ?> |
| 52 | 58 | |
| 53 | 59 | <?php if ($installLevel >= 1) : ?> |
@@ -57,12 +63,15 @@ discard block |
||
| 57 | 63 | <span class="notok"><?=$_lang['failed']?></span> <?=$_lang['table_prefix_already_inuse']?> |
| 58 | 64 | </p> |
| 59 | 65 | <p><?=$_lang['table_prefix_already_inuse_note']?></p> |
| 60 | - <?php else : ?> |
|
| 66 | + <?php else { |
|
| 67 | + : ?> |
|
| 61 | 68 | <p> |
| 62 | 69 | <?=rtrim($_lang['checking_table_prefix'], '`')?> <strong><?=trim($table_prefix, '`')?></strong>: |
| 63 | 70 | <span class="ok"><?=$_lang['ok']?></span> |
| 64 | 71 | </p> |
| 65 | - <?php endif; ?> |
|
| 72 | + <?php endif; |
|
| 73 | +} |
|
| 74 | +?> |
|
| 66 | 75 | <?php endif; ?> |
| 67 | 76 | |
| 68 | 77 | <?php if ($installLevel >= 2 && $moduleSQLBaseFile) : ?> |
@@ -81,9 +90,12 @@ discard block |
||
| 81 | 90 | <hr /> |
| 82 | 91 | <?php endfor; ?> |
| 83 | 92 | <p><?=$_lang['some_tables_not_updated']?></p> |
| 84 | - <?php else : ?> |
|
| 93 | + <?php else { |
|
| 94 | + : ?> |
|
| 85 | 95 | <p><?=$_lang['setup_database_creating_tables']?> <span class="ok"><?=$_lang['ok']?></span></p> |
| 86 | - <?php endif; ?> |
|
| 96 | + <?php endif; |
|
| 97 | +} |
|
| 98 | +?> |
|
| 87 | 99 | <?php endif; ?> |
| 88 | 100 | |
| 89 | 101 | <?php if ($installLevel >= 3) : ?> |
@@ -94,11 +106,14 @@ discard block |
||
| 94 | 106 | <p><?=$_lang['cant_write_config_file']?> <span class="mono"><?=MGR_DIR?>/includes/config.inc.php</span></p> |
| 95 | 107 | <textarea style="width:400px; height:160px;"><?=$configString?></textarea> |
| 96 | 108 | <p><?=$_lang['cant_write_config_file_note']?></p> |
| 97 | - <?php else : ?> |
|
| 109 | + <?php else { |
|
| 110 | + : ?> |
|
| 98 | 111 | <p> |
| 99 | 112 | <?=$_lang['writing_config_file']?> <span class="ok"><?=$_lang['ok']?></span> |
| 100 | 113 | </p> |
| 101 | - <?php endif; ?> |
|
| 114 | + <?php endif; |
|
| 115 | +} |
|
| 116 | +?> |
|
| 102 | 117 | <?php endif; ?> |
| 103 | 118 | |
| 104 | 119 | <?php if ($installLevel >= 4 && $installData && $moduleSQLDataFile && $moduleSQLResetFile) : ?> |
@@ -117,12 +132,15 @@ discard block |
||
| 117 | 132 | <?php endfor; ?> |
| 118 | 133 | </p> |
| 119 | 134 | <p><?=$_lang['some_tables_not_updated']?></p> |
| 120 | - <?php else : ?> |
|
| 135 | + <?php else { |
|
| 136 | + : ?> |
|
| 121 | 137 | <p> |
| 122 | 138 | <?=$_lang['resetting_database']?> |
| 123 | 139 | <span class="ok"><?=$_lang['ok']?></span> |
| 124 | 140 | </p> |
| 125 | - <?php endif; ?> |
|
| 141 | + <?php endif; |
|
| 142 | +} |
|
| 143 | +?> |
|
| 126 | 144 | <?php endif; ?> |
| 127 | 145 | |
| 128 | 146 | <?php if ($installLevel >= 5) : ?> |
@@ -135,7 +153,8 @@ discard block |
||
| 135 | 153 | <?php elseif($itemData['type'] === 'update') : ?> |
| 136 | 154 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
| 137 | 155 | <?php endif; ?> |
| 138 | - <?php else : ?> |
|
| 156 | + <?php else { |
|
| 157 | + : ?> |
|
| 139 | 158 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 140 | 159 | <p>❌ <?=$itemData['error']['content']?></p> |
| 141 | 160 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -145,7 +164,9 @@ discard block |
||
| 145 | 164 | <?=$_lang['not_found']?>. |
| 146 | 165 | </span> |
| 147 | 166 | </p> |
| 148 | - <?php endif; ?> |
|
| 167 | + <?php endif; |
|
| 168 | +} |
|
| 169 | +?> |
|
| 149 | 170 | <?php endif; ?> |
| 150 | 171 | <?php endforeach; ?> |
| 151 | 172 | <?php endif; ?> |
@@ -161,10 +182,13 @@ discard block |
||
| 161 | 182 | <?php elseif($itemData['type'] === 'skip') : ?> |
| 162 | 183 | <!-- SKIP --> |
| 163 | 184 | <?php endif; ?> |
| 164 | - <?php else : ?> |
|
| 185 | + <?php else { |
|
| 186 | + : ?> |
|
| 165 | 187 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 166 | 188 | <p>❌ <?=$itemData['error']['content']?></p> |
| 167 | - <?php endif; ?> |
|
| 189 | + <?php endif; |
|
| 190 | +} |
|
| 191 | +?> |
|
| 168 | 192 | <?php endif; ?> |
| 169 | 193 | <?php endforeach; ?> |
| 170 | 194 | <?php endif; ?> |
@@ -182,7 +206,8 @@ discard block |
||
| 182 | 206 | <?php elseif($itemData['type'] === 'skip') : ?> |
| 183 | 207 | <!-- SKIP --> |
| 184 | 208 | <?php endif; ?> |
| 185 | - <?php else : ?> |
|
| 209 | + <?php else { |
|
| 210 | + : ?> |
|
| 186 | 211 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 187 | 212 | <p>❌ <?=$itemData['error']['content']?></p> |
| 188 | 213 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -192,7 +217,9 @@ discard block |
||
| 192 | 217 | <?=$_lang['not_found']?>. |
| 193 | 218 | </span> |
| 194 | 219 | </p> |
| 195 | - <?php endif; ?> |
|
| 220 | + <?php endif; |
|
| 221 | +} |
|
| 222 | +?> |
|
| 196 | 223 | <?php endif; ?> |
| 197 | 224 | <?php endforeach; ?> |
| 198 | 225 | <?php endif; ?> |
@@ -208,7 +235,8 @@ discard block |
||
| 208 | 235 | <?php elseif($itemData['type'] === 'skip') : ?> |
| 209 | 236 | <!-- SKIP --> |
| 210 | 237 | <?php endif; ?> |
| 211 | - <?php else : ?> |
|
| 238 | + <?php else { |
|
| 239 | + : ?> |
|
| 212 | 240 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 213 | 241 | <p>❌ <?=$itemData['error']['content']?></p> |
| 214 | 242 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -218,7 +246,9 @@ discard block |
||
| 218 | 246 | <?=$_lang['not_found']?>. |
| 219 | 247 | </span> |
| 220 | 248 | </p> |
| 221 | - <?php endif; ?> |
|
| 249 | + <?php endif; |
|
| 250 | +} |
|
| 251 | +?> |
|
| 222 | 252 | <?php endif; ?> |
| 223 | 253 | <?php endforeach; ?> |
| 224 | 254 | <?php endif; ?> |
@@ -234,7 +264,8 @@ discard block |
||
| 234 | 264 | <?php elseif($itemData['type'] === 'skip') : ?> |
| 235 | 265 | <!-- SKIP --> |
| 236 | 266 | <?php endif; ?> |
| 237 | - <?php else : ?> |
|
| 267 | + <?php else { |
|
| 268 | + : ?> |
|
| 238 | 269 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 239 | 270 | <p>❌ <?=$itemData['error']['content']?></p> |
| 240 | 271 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -244,7 +275,9 @@ discard block |
||
| 244 | 275 | <?=$_lang['not_found']?>. |
| 245 | 276 | </span> |
| 246 | 277 | </p> |
| 247 | - <?php endif; ?> |
|
| 278 | + <?php endif; |
|
| 279 | +} |
|
| 280 | +?> |
|
| 248 | 281 | <?php endif; ?> |
| 249 | 282 | <?php endforeach; ?> |
| 250 | 283 | <?php endif; ?> |
@@ -262,7 +295,8 @@ discard block |
||
| 262 | 295 | <?php elseif($itemData['type'] === 'skip') : ?> |
| 263 | 296 | <!-- SKIP --> |
| 264 | 297 | <?php endif; ?> |
| 265 | - <?php else : ?> |
|
| 298 | + <?php else { |
|
| 299 | + : ?> |
|
| 266 | 300 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 267 | 301 | <p>❌ <?=$itemData['error']['content']?></p> |
| 268 | 302 | <?php elseif ($itemData['error']['type'] === 'file_not_found') : ?> |
@@ -272,7 +306,9 @@ discard block |
||
| 272 | 306 | <?=$_lang['not_found']?>. |
| 273 | 307 | </span> |
| 274 | 308 | </p> |
| 275 | - <?php endif; ?> |
|
| 309 | + <?php endif; |
|
| 310 | +} |
|
| 311 | +?> |
|
| 276 | 312 | <?php endif; ?> |
| 277 | 313 | <?php endforeach; ?> |
| 278 | 314 | <?php endif; ?> |
@@ -281,7 +317,8 @@ discard block |
||
| 281 | 317 | <h3><?=$_lang['installing_demo_site']?></h3> |
| 282 | 318 | <?php if (empty($installDataLevel['demo']['error'])) : ?> |
| 283 | 319 | <p> ✓  <span class="ok"><?=$_lang['ok']?></span></p> |
| 284 | - <?php else : ?> |
|
| 320 | + <?php else { |
|
| 321 | + : ?> |
|
| 285 | 322 | <p><span class="notok"><b><?=$_lang['database_alerts']?></span></p> |
| 286 | 323 | <p><?=$_lang['setup_couldnt_install']?></p> |
| 287 | 324 | <p><?=$_lang['installation_error_occured']?></p> |
@@ -291,7 +328,9 @@ discard block |
||
| 291 | 328 | <?=$_lang['during_execution_of_sql']?> |
| 292 | 329 | <span class="mono"><?=htmlspecialchars($error['sql'])?></span> |
| 293 | 330 | <hr /> |
| 294 | - <?php endforeach; ?> |
|
| 331 | + <?php endforeach; |
|
| 332 | +} |
|
| 333 | +?> |
|
| 295 | 334 | <p><?=$_lang['some_tables_not_updated']?></p> |
| 296 | 335 | <?php endif; ?> |
| 297 | 336 | <?php endif; ?> |
@@ -316,10 +355,13 @@ discard block |
||
| 316 | 355 | <span class="ok"><?=$_lang['guid_set']?></span> |
| 317 | 356 | </p> |
| 318 | 357 | <?php endif; ?> |
| 319 | - <?php else : ?> |
|
| 358 | + <?php else { |
|
| 359 | + : ?> |
|
| 320 | 360 | <?php if ($itemData['error']['type'] === 'sql') : ?> |
| 321 | 361 | <p>❌ <?=$itemData['error']['content']?></p> |
| 322 | - <?php endif; ?> |
|
| 362 | + <?php endif; |
|
| 363 | +} |
|
| 364 | +?> |
|
| 323 | 365 | <?php endif; ?> |
| 324 | 366 | <?php endforeach; ?> |
| 325 | 367 | <?php endif; ?> |
@@ -332,12 +374,15 @@ discard block |
||
| 332 | 374 | <img src="img/ico_info.png" width="40" height="42" align="left" style="margin-right:10px;" /> |
| 333 | 375 | <?=$_lang['installation_note']?> |
| 334 | 376 | </p> |
| 335 | - <?php else : ?> |
|
| 377 | + <?php else { |
|
| 378 | + : ?> |
|
| 336 | 379 | <p> |
| 337 | 380 | <img src="img/ico_info.png" width="40" height="42" align="left" style="margin-right:10px;" /> |
| 338 | 381 | <?=$_lang['upgrade_note']?> |
| 339 | 382 | </p> |
| 340 | - <?php endif; ?> |
|
| 383 | + <?php endif; |
|
| 384 | +} |
|
| 385 | +?> |
|
| 341 | 386 | |
| 342 | 387 | <form name="install" id="install_form" action="index.php?action=options" method="post"> |
| 343 | 388 | <?php if ($errors === 0) : ?> |
@@ -350,11 +395,14 @@ discard block |
||
| 350 | 395 | /> |
| 351 | 396 | <?=$_lang['remove_install_folder_auto'] ?> |
| 352 | 397 | </span> |
| 353 | - <?php else : ?> |
|
| 398 | + <?php else { |
|
| 399 | + : ?> |
|
| 354 | 400 | <span id="removeinstall" style="float:left;color:#505050;line-height:18px;"> |
| 355 | 401 | <?=$_lang['remove_install_folder_manual'] ?> |
| 356 | 402 | </span> |
| 357 | - <?php endif; ?> |
|
| 403 | + <?php endif; |
|
| 404 | +} |
|
| 405 | +?> |
|
| 358 | 406 | <?php endif; ?> |
| 359 | 407 | <p class="buttonlinks"> |
| 360 | 408 | <a href="javascript:closepage();" title="<?=$_lang['btnclose_value'] ?>"> |
@@ -3,7 +3,7 @@ discard block |
||
| 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 | -if($modx->getManagerApi()->action!='8' && isset($_SESSION['mgrValidated'])){ |
|
| 6 | +if($modx->getManagerApi()->action!='8' && isset($_SESSION['mgrValidated'])) { |
|
| 7 | 7 | |
| 8 | 8 | $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start); |
| 9 | 9 | $logouturl = MODX_MANAGER_URL.'index.php?a=8'; |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | if(substr($target,0,6)==='@CHUNK') { |
| 36 | 36 | $target = trim(substr($target,7)); |
| 37 | 37 | $lockout_tpl = $modx->getChunk($target); |
| 38 | - } |
|
| 39 | - elseif(substr($target,0,5)==='@FILE') { |
|
| 38 | + } elseif(substr($target,0,5)==='@FILE') { |
|
| 40 | 39 | $target = trim(substr($target,6)); |
| 41 | 40 | $lockout_tpl = file_get_contents($target); |
| 42 | 41 | } |
@@ -44,24 +43,20 @@ discard block |
||
| 44 | 43 | $chunk = $modx->getChunk($target); |
| 45 | 44 | if($chunk!==false && !empty($chunk)) { |
| 46 | 45 | $lockout_tpl = $chunk; |
| 47 | - } |
|
| 48 | - elseif(is_file(MODX_BASE_PATH . $target)) { |
|
| 46 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
| 49 | 47 | $target = MODX_BASE_PATH . $target; |
| 50 | 48 | $lockout_tpl = file_get_contents($target); |
| 51 | - } |
|
| 52 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) { |
|
| 49 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) { |
|
| 53 | 50 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl'; |
| 54 | 51 | $lockout_tpl = file_get_contents($target); |
| 55 | - } |
|
| 56 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) { |
|
| 52 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) { |
|
| 57 | 53 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl'; |
| 58 | 54 | $login_tpl = file_get_contents($target); |
| 59 | - } |
|
| 60 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible |
|
| 55 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { |
|
| 56 | +// ClipperCMS compatible |
|
| 61 | 57 | $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html'; |
| 62 | 58 | $lockout_tpl = file_get_contents($target); |
| 63 | - } |
|
| 64 | - else { |
|
| 59 | + } else { |
|
| 65 | 60 | $target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl'; |
| 66 | 61 | $lockout_tpl = file_get_contents($target); |
| 67 | 62 | } |
@@ -19,12 +19,12 @@ discard block |
||
| 19 | 19 | $warningspresent = 0; |
| 20 | 20 | |
| 21 | 21 | $sysfiles_check = $modx->getManagerApi()->checkSystemChecksum(); |
| 22 | -if ($sysfiles_check!=='0'){ |
|
| 22 | +if ($sysfiles_check!=='0') { |
|
| 23 | 23 | $warningspresent = 1; |
| 24 | 24 | $warnings[] = array($_lang['configcheck_sysfiles_mod']); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | -if (is_writable("includes/config.inc.php")){ |
|
| 27 | +if (is_writable("includes/config.inc.php")) { |
|
| 28 | 28 | // Warn if world writable |
| 29 | 29 | if(@fileperms('includes/config.inc.php') & 0x0002) { |
| 30 | 30 | $warningspresent = 1; |
@@ -120,7 +120,8 @@ discard block |
||
| 120 | 120 | /** |
| 121 | 121 | * @return bool |
| 122 | 122 | */ |
| 123 | - function checkSiteCache() { |
|
| 123 | + function checkSiteCache() |
|
| 124 | + { |
|
| 124 | 125 | $modx = evolutionCMS(); |
| 125 | 126 | $checked= true; |
| 126 | 127 | if (file_exists($modx->config['base_path'] . 'assets/cache/siteCache.idx.php')) { |
@@ -159,26 +160,36 @@ discard block |
||
| 159 | 160 | |
| 160 | 161 | if ($warningspresent==1) { |
| 161 | 162 | |
| 162 | -if(!isset($modx->config['send_errormail'])) $modx->config['send_errormail']='3'; |
|
| 163 | +if(!isset($modx->config['send_errormail'])) { |
|
| 164 | + $modx->config['send_errormail']='3'; |
|
| 165 | +} |
|
| 163 | 166 | $config_check_results = "<h3>".$_lang['configcheck_notok']."</h3>"; |
| 164 | 167 | |
| 165 | 168 | for ($i=0;$i<count($warnings);$i++) { |
| 166 | 169 | switch ($warnings[$i][0]) { |
| 167 | 170 | case $_lang['configcheck_configinc']; |
| 168 | 171 | $warnings[$i][1] = $_lang['configcheck_configinc_msg']; |
| 169 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']); |
|
| 172 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
| 173 | + $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_configinc']); |
|
| 174 | + } |
|
| 170 | 175 | break; |
| 171 | 176 | case $_lang['configcheck_installer'] : |
| 172 | 177 | $warnings[$i][1] = $_lang['configcheck_installer_msg']; |
| 173 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']); |
|
| 178 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
| 179 | + $modx->logEvent(0,3,$warnings[$i][1],$_lang['configcheck_installer']); |
|
| 180 | + } |
|
| 174 | 181 | break; |
| 175 | 182 | case $_lang['configcheck_cache'] : |
| 176 | 183 | $warnings[$i][1] = $_lang['configcheck_cache_msg']; |
| 177 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']); |
|
| 184 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
| 185 | + $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_cache']); |
|
| 186 | + } |
|
| 178 | 187 | break; |
| 179 | 188 | case $_lang['configcheck_images'] : |
| 180 | 189 | $warnings[$i][1] = $_lang['configcheck_images_msg']; |
| 181 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']); |
|
| 190 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
| 191 | + $modx->logEvent(0,2,$warnings[$i][1],$_lang['configcheck_images']); |
|
| 192 | + } |
|
| 182 | 193 | break; |
| 183 | 194 | case $_lang['configcheck_sysfiles_mod']: |
| 184 | 195 | $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"]; |
@@ -186,7 +197,9 @@ discard block |
||
| 186 | 197 | if($modx->hasPermission('settings')) { |
| 187 | 198 | $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>'; |
| 188 | 199 | } |
| 189 | - if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1]." ".implode(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
|
| 200 | + if(!$_SESSION["mgrConfigCheck"]) { |
|
| 201 | + $modx->logEvent(0,3,$warnings[$i][1]." ".implode(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
|
| 202 | + } |
|
| 190 | 203 | break; |
| 191 | 204 | case $_lang['configcheck_lang_difference'] : |
| 192 | 205 | $warnings[$i][1] = $_lang['configcheck_lang_difference_msg']; |
@@ -116,7 +116,8 @@ discard block |
||
| 116 | 116 | * @return string |
| 117 | 117 | */ |
| 118 | 118 | public function getHashType($db_value = '') |
| 119 | - { // md5 | v1 | phpass |
|
| 119 | + { |
|
| 120 | +// md5 | v1 | phpass |
|
| 120 | 121 | $c = substr($db_value, 0, 1); |
| 121 | 122 | if ($c === '$') { |
| 122 | 123 | return 'phpass'; |
@@ -135,7 +136,8 @@ discard block |
||
| 135 | 136 | * @return string |
| 136 | 137 | */ |
| 137 | 138 | public function genV1Hash($password, $seed = '1') |
| 138 | - { // $seed is user_id basically |
|
| 139 | + { |
|
| 140 | +// $seed is user_id basically |
|
| 139 | 141 | $modx = evolutionCMS(); |
| 140 | 142 | |
| 141 | 143 | if (isset($modx->config['pwd_hash_algo']) && !empty($modx->config['pwd_hash_algo'])) { |
@@ -279,7 +279,8 @@ discard block |
||
| 279 | 279 | $row['count'] = $this->count; |
| 280 | 280 | $row['url'] = $modx->makeUrl($row['id']); |
| 281 | 281 | |
| 282 | - if (!$row['wasNull']) { // needs writing a document |
|
| 282 | + if (!$row['wasNull']) { |
|
| 283 | +// needs writing a document |
|
| 283 | 284 | $docname = $this->getFileName($row['id'], $row['alias'], $prefix, $suffix); |
| 284 | 285 | $filename = $dirpath . $docname; |
| 285 | 286 | if (!is_file($filename)) { |
@@ -307,7 +308,8 @@ discard block |
||
| 307 | 308 | $this->output[] = $this->parsePlaceholder($_lang['export_site_exporting_document'], $row); |
| 308 | 309 | } |
| 309 | 310 | if ($row['isfolder'] === '1' && ($modx->config['suffix_mode'] !== '1' || strpos($row['alias'], |
| 310 | - '.') === false)) { // needs making a folder |
|
| 311 | + '.') === false)) { |
|
| 312 | +// needs making a folder |
|
| 311 | 313 | $end_dir = ($row['alias'] !== '') ? $row['alias'] : $row['id']; |
| 312 | 314 | $dir_path = $dirpath . $end_dir; |
| 313 | 315 | if (strpos($dir_path, MODX_BASE_PATH) === false) { |
@@ -177,7 +177,8 @@ |
||
| 177 | 177 | * @return bool|string |
| 178 | 178 | */ |
| 179 | 179 | public function putChunk($chunkName) |
| 180 | - { // alias name >.< |
|
| 180 | + { |
|
| 181 | +// alias name >.< |
|
| 181 | 182 | $modx = evolutionCMS(); |
| 182 | 183 | |
| 183 | 184 | return $modx->getChunk($chunkName); |