@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $msg = ''; |
39 | -$pth = dirname(dirname(__DIR__)) . '/install/'; |
|
39 | +$pth = dirname(dirname(__DIR__)).'/install/'; |
|
40 | 40 | $pth = str_replace('\\', '/', $pth); |
41 | 41 | |
42 | 42 | if (isset($_GET['rminstall'])) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | } |
49 | 49 | if ($msg) { |
50 | - echo "<script>alert('" . addslashes($msg) . "');</script>"; |
|
50 | + echo "<script>alert('".addslashes($msg)."');</script>"; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | echo "<script>window.location='../index.php?a=2';</script>"; |
@@ -11,12 +11,12 @@ discard block |
||
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 | 13 | if(!$modx->config['lang_code']) { |
14 | - global $modx_lang_attribute; |
|
15 | - $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
|
14 | + global $modx_lang_attribute; |
|
15 | + $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if(!empty($_GET['a']) && $_GET['a'] == 2) { |
19 | - include_once('welcome.php'); |
|
19 | + include_once('welcome.php'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
@@ -274,66 +274,66 @@ discard block |
||
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | 276 | switch($action) { |
277 | - case '3': |
|
278 | - case '4': |
|
279 | - case '27': |
|
280 | - case '72': |
|
281 | - if($modx->hasPermission('new_document')) { |
|
282 | - $addnew = 1; |
|
283 | - } |
|
284 | - break; |
|
285 | - case '16': |
|
286 | - case '19': |
|
287 | - if($modx->hasPermission('new_template')) { |
|
288 | - $addnew = 1; |
|
289 | - } |
|
290 | - break; |
|
291 | - case '300': |
|
292 | - case '301': |
|
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | - $addnew = 1; |
|
295 | - } |
|
296 | - break; |
|
297 | - case '77': |
|
298 | - case '78': |
|
299 | - if($modx->hasPermission('new_chunk')) { |
|
300 | - $addnew = 1; |
|
301 | - } |
|
302 | - break; |
|
303 | - case '22': |
|
304 | - case '23': |
|
305 | - if($modx->hasPermission('new_snippet')) { |
|
306 | - $addnew = 1; |
|
307 | - } |
|
308 | - break; |
|
309 | - case '101': |
|
310 | - case '102': |
|
311 | - if($modx->hasPermission('new_plugin')) { |
|
312 | - $addnew = 1; |
|
313 | - } |
|
314 | - break; |
|
315 | - case '106': |
|
316 | - case '107': |
|
317 | - case '108': |
|
318 | - if($modx->hasPermission('new_module')) { |
|
319 | - $addnew = 1; |
|
320 | - } |
|
321 | - if($modx->hasPermission('exec_module')) { |
|
322 | - $run = 1; |
|
323 | - } |
|
324 | - break; |
|
325 | - case '88': |
|
326 | - if($modx->hasPermission('new_web_user')) { |
|
327 | - $addnew = 1; |
|
328 | - } |
|
329 | - break; |
|
277 | + case '3': |
|
278 | + case '4': |
|
279 | + case '27': |
|
280 | + case '72': |
|
281 | + if($modx->hasPermission('new_document')) { |
|
282 | + $addnew = 1; |
|
283 | + } |
|
284 | + break; |
|
285 | + case '16': |
|
286 | + case '19': |
|
287 | + if($modx->hasPermission('new_template')) { |
|
288 | + $addnew = 1; |
|
289 | + } |
|
290 | + break; |
|
291 | + case '300': |
|
292 | + case '301': |
|
293 | + if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | + $addnew = 1; |
|
295 | + } |
|
296 | + break; |
|
297 | + case '77': |
|
298 | + case '78': |
|
299 | + if($modx->hasPermission('new_chunk')) { |
|
300 | + $addnew = 1; |
|
301 | + } |
|
302 | + break; |
|
303 | + case '22': |
|
304 | + case '23': |
|
305 | + if($modx->hasPermission('new_snippet')) { |
|
306 | + $addnew = 1; |
|
307 | + } |
|
308 | + break; |
|
309 | + case '101': |
|
310 | + case '102': |
|
311 | + if($modx->hasPermission('new_plugin')) { |
|
312 | + $addnew = 1; |
|
313 | + } |
|
314 | + break; |
|
315 | + case '106': |
|
316 | + case '107': |
|
317 | + case '108': |
|
318 | + if($modx->hasPermission('new_module')) { |
|
319 | + $addnew = 1; |
|
320 | + } |
|
321 | + if($modx->hasPermission('exec_module')) { |
|
322 | + $run = 1; |
|
323 | + } |
|
324 | + break; |
|
325 | + case '88': |
|
326 | + if($modx->hasPermission('new_web_user')) { |
|
327 | + $addnew = 1; |
|
328 | + } |
|
329 | + break; |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | $disabled = ($action == '19' || $action == '300' || $action == '77' || $action == '23' || $action == '101' || $action == '4' || $action == '72' || $action == '87' || $action == '11' || $action == '107' || $action == '38') ? ' disabled' : ''; |
333 | 333 | |
334 | 334 | $_style['actionbuttons'] = array( |
335 | - 'dynamic' => array( |
|
336 | - 'document' => '<div id="actions"> |
|
335 | + 'dynamic' => array( |
|
336 | + 'document' => '<div id="actions"> |
|
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | - ($addnew ? ' |
|
351 | + ($addnew ? ' |
|
352 | 352 | <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
353 | 353 | <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
354 | 354 | </a> |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
367 | - 'user' => '<div id="actions"> |
|
367 | + 'user' => '<div id="actions"> |
|
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
390 | - 'element' => '<div id="actions"> |
|
390 | + 'element' => '<div id="actions"> |
|
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -420,21 +420,21 @@ discard block |
||
420 | 420 | ' : '') . ' |
421 | 421 | </div> |
422 | 422 | </div>', |
423 | - 'newmodule' => ($addnew ? '<div id="actions"> |
|
423 | + 'newmodule' => ($addnew ? '<div id="actions"> |
|
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | 426 | <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | - 'close' => '<div id="actions"> |
|
430 | + 'close' => '<div id="actions"> |
|
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | 433 | <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | - 'save' => '<div id="actions"> |
|
437 | + 'save' => '<div id="actions"> |
|
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | 440 | <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | - 'savedelete' => '<div id="actions"> |
|
447 | + 'savedelete' => '<div id="actions"> |
|
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | 450 | <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
@@ -457,14 +457,14 @@ discard block |
||
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | - 'cancel' => '<div id="actions"> |
|
460 | + 'cancel' => '<div id="actions"> |
|
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | 463 | <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | - 'canceldelete' => '<div id="actions"> |
|
467 | + 'canceldelete' => '<div id="actions"> |
|
468 | 468 | <div class="btn-group"> |
469 | 469 | <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
470 | 470 | <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
@@ -474,11 +474,11 @@ discard block |
||
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
477 | - ), |
|
478 | - 'static' => array( |
|
479 | - 'document' => '<div id="actions"> |
|
477 | + ), |
|
478 | + 'static' => array( |
|
479 | + 'document' => '<div id="actions"> |
|
480 | 480 | <div class="btn-group">' . |
481 | - ($addnew ? ' |
|
481 | + ($addnew ? ' |
|
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | 483 | <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
484 | 484 | </a> |
@@ -503,12 +503,12 @@ discard block |
||
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | - 'cancel' => '<div id="actions"> |
|
506 | + 'cancel' => '<div id="actions"> |
|
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | 509 | <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
513 | - ) |
|
513 | + ) |
|
514 | 514 | ); |
@@ -8,19 +8,19 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
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 | |
22 | 22 | // Favicon |
23 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'); |
|
23 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'); |
|
24 | 24 | |
25 | 25 | //Main Menu |
26 | 26 | $_style['menu_search'] = '<i class="fa fa-search"></i>'; |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
100 | 100 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
101 | 101 | |
102 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
103 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
102 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
103 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
104 | 104 | $_style['tree_weblink'] = $style_path.'tree/link.png'; |
105 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
105 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
106 | 106 | |
107 | 107 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
108 | 108 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $_style['icons_edit_document'] = $style_path.'icons/save.png'; |
138 | 138 | $_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
139 | 139 | //locks |
140 | -$_style['icons_preview_resource'] = $style_path.'icons/eye.png';//$style_path.'icons/eye.png'; |
|
141 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
140 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
141 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
142 | 142 | |
143 | 143 | //file manager icons |
144 | 144 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
214 | 214 | |
215 | 215 | //modules |
216 | -$_style['icons_module'] = 'fa fa-cube'; |
|
216 | +$_style['icons_module'] = 'fa fa-cube'; |
|
217 | 217 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
218 | 218 | $_style['icons_run'] = $style_path.'icons/play.png'; |
219 | 219 | |
@@ -273,57 +273,57 @@ discard block |
||
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; |
@@ -337,30 +337,30 @@ discard block |
||
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
340 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
340 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
341 | 341 | </a> |
342 | 342 | <span class="btn btn-success plus dropdown-toggle"></span> |
343 | 343 | <select id="stay" name="stay"> |
344 | 344 | ' . ($addnew ? ' |
345 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
346 | - ' : '') . ' |
|
347 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
348 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
345 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
346 | + ' : '').' |
|
347 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
348 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | 351 | ($addnew ? ' |
352 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
352 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
354 | 354 | </a> |
355 | - ' : '') . ' |
|
356 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
357 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
355 | + ' : '').' |
|
356 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
357 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
358 | 358 | </a> |
359 | 359 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
360 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
360 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
361 | 361 | </a> |
362 | 362 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
363 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
363 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
@@ -368,22 +368,22 @@ discard block |
||
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
371 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
371 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
372 | 372 | </a> |
373 | 373 | <span class="btn btn-success plus dropdown-toggle"></span> |
374 | 374 | <select id="stay" name="stay"> |
375 | 375 | ' . ($addnew ? ' |
376 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
377 | - ' : '') . ' |
|
378 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
379 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
376 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
377 | + ' : '').' |
|
378 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
379 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
380 | 380 | </select> |
381 | 381 | </div> |
382 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
383 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
382 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
383 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
384 | 384 | </a> |
385 | 385 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
386 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
386 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
@@ -391,86 +391,86 @@ discard block |
||
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
394 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
394 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
395 | 395 | </a> |
396 | 396 | <span class="btn btn-success plus dropdown-toggle"></span> |
397 | 397 | <select id="stay" name="stay"> |
398 | 398 | ' . ($addnew ? ' |
399 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
400 | - ' : '') . ' |
|
401 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
402 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
399 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
400 | + ' : '').' |
|
401 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
402 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
403 | 403 | </select> |
404 | 404 | </div> |
405 | 405 | ' . ($addnew ? ' |
406 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
406 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
408 | 408 | </a> |
409 | - ' : '') . ' |
|
410 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
411 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
409 | + ' : '').' |
|
410 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
411 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
412 | 412 | </a> |
413 | 413 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
414 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
414 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
415 | 415 | </a> |
416 | 416 | ' . ($run ? ' |
417 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
418 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
417 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
418 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
419 | 419 | </a> |
420 | - ' : '') . ' |
|
420 | + ' : '').' |
|
421 | 421 | </div> |
422 | 422 | </div>', |
423 | 423 | 'newmodule' => ($addnew ? '<div id="actions"> |
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | - <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
|
426 | + <i class="' . $_style["actions_new"].'"></i><span>'.$_lang['new_module'].'</span> |
|
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | 430 | 'close' => '<div id="actions"> |
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
433 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | 437 | 'save' => '<div id="actions"> |
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
440 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
441 | 441 | </a> |
442 | 442 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
443 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
443 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | 447 | 'savedelete' => '<div id="actions"> |
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
450 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
451 | 451 | </a> |
452 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
453 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
452 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
453 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
454 | 454 | </a> |
455 | 455 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
456 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
456 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | 460 | 'cancel' => '<div id="actions"> |
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
463 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | 467 | 'canceldelete' => '<div id="actions"> |
468 | 468 | <div class="btn-group"> |
469 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
470 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
469 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
470 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
471 | 471 | </a> |
472 | 472 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
473 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
473 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
@@ -480,33 +480,33 @@ discard block |
||
480 | 480 | <div class="btn-group">' . |
481 | 481 | ($addnew ? ' |
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
483 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
484 | 484 | </a> |
485 | 485 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
486 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
486 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
487 | 487 | </a> |
488 | - ' : '') . ' |
|
488 | + ' : '').' |
|
489 | 489 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
490 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
490 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
491 | 491 | </a> |
492 | 492 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
493 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
493 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
494 | 494 | </a> |
495 | 495 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
496 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
496 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
497 | 497 | </a> |
498 | 498 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
499 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
499 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
500 | 500 | </a> |
501 | 501 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
502 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
502 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | 506 | 'cancel' => '<div id="actions"> |
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
509 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
@@ -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; |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | interface CoreInterface |
4 | 4 | { |
5 | 5 | /** |
6 | - * @param $type |
|
7 | - * @param $scanPath |
|
8 | - * @param array $ext |
|
6 | + * @param string $type |
|
7 | + * @param string $scanPath |
|
8 | + * @param string[] $ext |
|
9 | 9 | * |
10 | 10 | * @return array |
11 | 11 | * |
@@ -18,6 +18,7 @@ discard block |
||
18 | 18 | * @param string $phpCode |
19 | 19 | * @param string $namespace |
20 | 20 | * @param array defaultParams |
21 | + * @return void |
|
21 | 22 | */ |
22 | 23 | public function addSnippet($name, $phpCode, $namespace = '#', array $defaultParams = array()); |
23 | 24 | |
@@ -25,6 +26,7 @@ discard block |
||
25 | 26 | * @param string $name |
26 | 27 | * @param string $text |
27 | 28 | * @param string $namespace |
29 | + * @return void |
|
28 | 30 | */ |
29 | 31 | public function addChunk($name, $text, $namespace = '#'); |
30 | 32 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $found = $this->core->findElements( |
39 | 39 | 'chunk', |
40 | - MODX_MANAGER_PATH . 'media/style/' . $this->theme . '/snippets/', |
|
40 | + MODX_MANAGER_PATH.'media/style/'.$this->theme.'/snippets/', |
|
41 | 41 | array('php') |
42 | 42 | ); |
43 | 43 | foreach ($found as $name => $code) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | { |
50 | 50 | $found = $this->core->findElements( |
51 | 51 | 'chunk', |
52 | - MODX_MANAGER_PATH . 'media/style/' . $this->theme . '/chunks/', |
|
52 | + MODX_MANAGER_PATH.'media/style/'.$this->theme.'/chunks/', |
|
53 | 53 | array('tpl', 'html') |
54 | 54 | ); |
55 | 55 | foreach ($found as $name => $code) { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->core->addSnippet( |
63 | 63 | $name, |
64 | 64 | $code, |
65 | - $this->templateNamespace . '#', |
|
65 | + $this->templateNamespace.'#', |
|
66 | 66 | array( |
67 | 67 | 'managerTheme' => $this |
68 | 68 | ) |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | |
72 | 72 | public function addChunk($name, $code) |
73 | 73 | { |
74 | - $this->core->addChunk($name, $code, $this->templateNamespace . '#'); |
|
74 | + $this->core->addChunk($name, $code, $this->templateNamespace.'#'); |
|
75 | 75 | } |
76 | 76 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <?php endif; ?> |
66 | 66 | <?php endif; ?> |
67 | 67 | |
68 | -<?php if ($installLevel >= 2 && $moduleSQLBaseFile) : ?> |
|
68 | +<?php if ($installLevel >= 2 && $moduleSQLBaseFile) : ?> |
|
69 | 69 | <?php if ($sqlParser->installFailed === false) : ?> |
70 | 70 | <p> |
71 | 71 | <?=$_lang['setup_database_creating_tables']?> |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | <?php $sqlErrors = count($sqlParser->mysqlErrors); ?> |
77 | 77 | <?php for ($i = 0; $i < $sqlErrors; $i++) : ?> |
78 | 78 | <em><?=$sqlParser->mysqlErrors[$i]["error"]?></em> |
79 | - <?=$_lang['during_execution_of_sql'];?> |
|
79 | + <?=$_lang['during_execution_of_sql']; ?> |
|
80 | 80 | <span class="mono"><?=strip_tags($sqlParser->mysqlErrors[$i]["sql"])?></span> |
81 | 81 | <hr /> |
82 | 82 | <?php endfor; ?> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | <?php $sqlErrors = count($sqlParser->mysqlErrors); ?> |
113 | 113 | <?php for ($i = 0; $i < $sqlErrors; $i++) : ?> |
114 | 114 | <em><?=$sqlParser->mysqlErrors[$i]["error"]?></em> <?=$_lang['during_execution_of_sql']?> |
115 | - <span class='mono'><?=strip_tags($sqlParser->mysqlErrors[$i]["sql"]);?></span> |
|
115 | + <span class='mono'><?=strip_tags($sqlParser->mysqlErrors[$i]["sql"]); ?></span> |
|
116 | 116 | <hr /> |
117 | 117 | <?php endfor; ?> |
118 | 118 | </p> |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | <h3><?=$_lang['templates']?>:</h3> |
131 | 131 | <?php foreach ($installDataLevel['templates'] as $itemName => $itemData) : ?> |
132 | 132 | <?php if (empty($itemData['error'])) : ?> |
133 | - <?php if($itemData['type'] === 'create') : ?> |
|
133 | + <?php if ($itemData['type'] === 'create') : ?> |
|
134 | 134 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
135 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
135 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
136 | 136 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
137 | 137 | <?php endif; ?> |
138 | 138 | <?php else : ?> |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | <h3><?=$_lang['tvs']?>:</h3> |
155 | 155 | <?php foreach ($installDataLevel['tvs'] as $itemName => $itemData) : ?> |
156 | 156 | <?php if (empty($itemData['error'])) : ?> |
157 | - <?php if($itemData['type'] === 'create') : ?> |
|
157 | + <?php if ($itemData['type'] === 'create') : ?> |
|
158 | 158 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
159 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
159 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
160 | 160 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
161 | - <?php elseif($itemData['type'] === 'skip') : ?> |
|
161 | + <?php elseif ($itemData['type'] === 'skip') : ?> |
|
162 | 162 | <!-- SKIP --> |
163 | 163 | <?php endif; ?> |
164 | 164 | <?php else : ?> |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | <h3><?=$_lang['chunks']?>:</h3> |
174 | 174 | <?php foreach ($installDataLevel['chunks'] as $itemName => $itemData) : ?> |
175 | 175 | <?php if (empty($itemData['error'])) : ?> |
176 | - <?php if($itemData['type'] === 'create') : ?> |
|
176 | + <?php if ($itemData['type'] === 'create') : ?> |
|
177 | 177 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
178 | - <?php elseif($itemData['type'] === 'overwrite') : ?> |
|
178 | + <?php elseif ($itemData['type'] === 'overwrite') : ?> |
|
179 | 179 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
180 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
180 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
181 | 181 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
182 | - <?php elseif($itemData['type'] === 'skip') : ?> |
|
182 | + <?php elseif ($itemData['type'] === 'skip') : ?> |
|
183 | 183 | <!-- SKIP --> |
184 | 184 | <?php endif; ?> |
185 | 185 | <?php else : ?> |
@@ -201,11 +201,11 @@ discard block |
||
201 | 201 | <h3><?=$_lang['modules']?>:</h3> |
202 | 202 | <?php foreach ($installDataLevel['modules'] as $itemName => $itemData) : ?> |
203 | 203 | <?php if (empty($itemData['error'])) : ?> |
204 | - <?php if($itemData['type'] === 'create') : ?> |
|
204 | + <?php if ($itemData['type'] === 'create') : ?> |
|
205 | 205 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
206 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
206 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
207 | 207 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
208 | - <?php elseif($itemData['type'] === 'skip') : ?> |
|
208 | + <?php elseif ($itemData['type'] === 'skip') : ?> |
|
209 | 209 | <!-- SKIP --> |
210 | 210 | <?php endif; ?> |
211 | 211 | <?php else : ?> |
@@ -227,11 +227,11 @@ discard block |
||
227 | 227 | <h3><?=$_lang['plugins']?>:</h3> |
228 | 228 | <?php foreach ($installDataLevel['plugins'] as $itemName => $itemData) : ?> |
229 | 229 | <?php if (empty($itemData['error'])) : ?> |
230 | - <?php if($itemData['type'] === 'create') : ?> |
|
230 | + <?php if ($itemData['type'] === 'create') : ?> |
|
231 | 231 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
232 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
232 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
233 | 233 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
234 | - <?php elseif($itemData['type'] === 'skip') : ?> |
|
234 | + <?php elseif ($itemData['type'] === 'skip') : ?> |
|
235 | 235 | <!-- SKIP --> |
236 | 236 | <?php endif; ?> |
237 | 237 | <?php else : ?> |
@@ -253,13 +253,13 @@ discard block |
||
253 | 253 | <h3><?=$_lang['snippets']?>:</h3> |
254 | 254 | <?php foreach ($installDataLevel['snippets'] as $itemName => $itemData) : ?> |
255 | 255 | <?php if (empty($itemData['error'])) : ?> |
256 | - <?php if($itemData['type'] === 'create') : ?> |
|
256 | + <?php if ($itemData['type'] === 'create') : ?> |
|
257 | 257 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
258 | - <?php elseif($itemData['type'] === 'overwrite') : ?> |
|
258 | + <?php elseif ($itemData['type'] === 'overwrite') : ?> |
|
259 | 259 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['installed']?></span></p> |
260 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
260 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
261 | 261 | <p> ✓ <?=$itemName?>: <span class="ok"><?=$_lang['upgraded']?></span></p> |
262 | - <?php elseif($itemData['type'] === 'skip') : ?> |
|
262 | + <?php elseif ($itemData['type'] === 'skip') : ?> |
|
263 | 263 | <!-- SKIP --> |
264 | 264 | <?php endif; ?> |
265 | 265 | <?php else : ?> |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | <p><?=$_lang['setup_couldnt_install']?></p> |
287 | 287 | <p><?=$_lang['installation_error_occured']?></p> |
288 | 288 | <br /><br /> |
289 | - <?php foreach($installDataLevel['demo']['error'] as $error): ?> |
|
289 | + <?php foreach ($installDataLevel['demo']['error'] as $error): ?> |
|
290 | 290 | <em><?=$error['content']?></em> |
291 | 291 | <?=$_lang['during_execution_of_sql']?> |
292 | 292 | <span class="mono"><?=htmlspecialchars($error['sql'])?></span> |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | <?php if ($installLevel >= 6): ?> |
301 | 301 | <?php foreach ($installDependencyLevel as $itemName => $itemData) : ?> |
302 | 302 | <?php if (empty($itemData['error'])) : ?> |
303 | - <?php if($itemData['type'] === 'create') : ?> |
|
303 | + <?php if ($itemData['type'] === 'create') : ?> |
|
304 | 304 | <p> ✓ <?=$itemName?>Module: <span class="ok"><?=$_lang['depedency_create']?></span></p> |
305 | - <?php elseif($itemData['type'] === 'update') : ?> |
|
305 | + <?php elseif ($itemData['type'] === 'update') : ?> |
|
306 | 306 | <p> ✓ <?=$itemName?>Module: <span class="ok"><?=$_lang['depedency_update']?></span></p> |
307 | 307 | <?php endif; ?> |
308 | 308 | |
@@ -370,10 +370,10 @@ discard block |
||
370 | 370 | var chk = document.install.rminstaller; |
371 | 371 | if (chk && chk.checked) { |
372 | 372 | // remove install folder and files |
373 | - window.location.href = "../<?=MGR_DIR;?>/processors/remove_installer.processor.php?rminstall=1"; |
|
373 | + window.location.href = "../<?=MGR_DIR; ?>/processors/remove_installer.processor.php?rminstall=1"; |
|
374 | 374 | } |
375 | 375 | else { |
376 | - window.location.href = "../<?=MGR_DIR;?>/"; |
|
376 | + window.location.href = "../<?=MGR_DIR; ?>/"; |
|
377 | 377 | } |
378 | 378 | } |
379 | 379 | /* ]]> */ |
@@ -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'] ?>"> |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | |
295 | 295 | if (mysqli_num_rows($rs)) { |
296 | 296 | $installDataLevel['templates'][$moduleTemplate[0]]['type'] = 'update'; |
297 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;"; |
|
297 | + $query = "update $dbase.`" . $table_prefix . "site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;"; |
|
298 | 298 | if (!mysqli_query($sqlParser->conn, $query)) { |
299 | 299 | $errors += 1; |
300 | 300 | $installDataLevel['templates'][$moduleTemplate[0]]['error'] = array( |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | if (mysqli_num_rows($rs)) { |
386 | 386 | $installDataLevel['tvs'][$moduleTV[0]]['type'] = 'update'; |
387 | 387 | while ($row = mysqli_fetch_assoc($rs)) { |
388 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};"; |
|
388 | + $query = "update $dbase.`" . $table_prefix . "site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};"; |
|
389 | 389 | if (!mysqli_query($sqlParser->conn, $query)) { |
390 | 390 | $installDataLevel['tvs'][$moduleTV[0]]['error'] = array( |
391 | 391 | 'type' => 'sql', |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | if ($update) { |
497 | 497 | $installDataLevel['chunks'][$moduleChunk[0]]['type'] = 'update'; |
498 | 498 | if (!mysqli_query($sqlParser->conn, |
499 | - "UPDATE $dbase.`" . $table_prefix . "site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
499 | + "update $dbase.`" . $table_prefix . "site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
500 | 500 | $errors += 1; |
501 | 501 | $installDataLevel['chunks'][$moduleChunk[0]]['error'] = array( |
502 | 502 | 'type' => 'sql', |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | $row = mysqli_fetch_assoc($rs); |
582 | 582 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
583 | 583 | if (!mysqli_query($sqlParser->conn, |
584 | - "UPDATE $dbase.`" . $table_prefix . "site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
584 | + "update $dbase.`" . $table_prefix . "site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
585 | 585 | $installDataLevel['modules'][$moduleModule[0]]['error'] = array( |
586 | 586 | 'type' => 'sql', |
587 | 587 | 'content' => mysqli_error($sqlParser->conn) |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | |
661 | 661 | // disable legacy versions based on legacy_names provided |
662 | 662 | if (!empty($leg_names)) { |
663 | - $update_query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
663 | + $update_query = "update $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
664 | 664 | $rs = mysqli_query($sqlParser->conn, $update_query); |
665 | 665 | } |
666 | 666 | |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | while ($row = mysqli_fetch_assoc($rs)) { |
679 | 679 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
680 | 680 | if ($row['description'] == $desc) { |
681 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};"; |
|
681 | + $query = "update $dbase.`" . $table_prefix . "site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};"; |
|
682 | 682 | if (!mysqli_query($sqlParser->conn, $query)) { |
683 | 683 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
684 | 684 | 'type' => 'sql', |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | } |
690 | 690 | $insert = false; |
691 | 691 | } else { |
692 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE id={$row['id']};"; |
|
692 | + $query = "update $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE id={$row['id']};"; |
|
693 | 693 | if (!mysqli_query($sqlParser->conn, $query)) { |
694 | 694 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
695 | 695 | 'type' => 'sql', |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | $row = mysqli_fetch_assoc($rs); |
793 | 793 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
794 | 794 | if (!mysqli_query($sqlParser->conn, |
795 | - "UPDATE $dbase.`" . $table_prefix . "site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
795 | + "update $dbase.`" . $table_prefix . "site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
796 | 796 | $installDataLevel['snippets'][$moduleSnippet[0]]['error'] = array( |
797 | 797 | 'type' => 'sql', |
798 | 798 | 'content' => mysqli_error($sqlParser->conn) |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | -if (file_exists(dirname(dirname(dirname(__DIR__))) . "/assets/cache/siteManager.php")) { |
|
3 | - include_once(dirname(dirname(dirname(__DIR__))) . "/assets/cache/siteManager.php"); |
|
2 | +if (file_exists(dirname(dirname(dirname(__DIR__)))."/assets/cache/siteManager.php")) { |
|
3 | + include_once(dirname(dirname(dirname(__DIR__)))."/assets/cache/siteManager.php"); |
|
4 | 4 | } else { |
5 | 5 | define('MGR_DIR', 'manager'); |
6 | 6 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | // set timout limit |
26 | 26 | @ set_time_limit(120); // used @ to prevent warning when using safe mode? |
27 | 27 | |
28 | -$installMode = (int)$_POST['installmode']; |
|
29 | -$installData = (int)!empty($_POST['installdata']); |
|
28 | +$installMode = (int) $_POST['installmode']; |
|
29 | +$installData = (int) !empty($_POST['installdata']); |
|
30 | 30 | |
31 | 31 | // get db info from post |
32 | 32 | $database_server = $_POST['databasehost']; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $database_charset = substr($database_collation, 0, strpos($database_collation, '_')); |
37 | 37 | $database_connection_charset = $_POST['database_connection_charset']; |
38 | 38 | $database_connection_method = $_POST['database_connection_method']; |
39 | -$dbase = "`" . $_POST['database_name'] . "`"; |
|
39 | +$dbase = "`".$_POST['database_name']."`"; |
|
40 | 40 | $table_prefix = $_POST['tableprefix']; |
41 | 41 | $adminname = $_POST['cmsadmin']; |
42 | 42 | $adminemail = $_POST['cmsadminemail']; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | // set session name variable |
48 | 48 | if (!isset ($site_sessionname)) { |
49 | - $site_sessionname = 'SN' . uniqid(''); |
|
49 | + $site_sessionname = 'SN'.uniqid(''); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | // get base path and url |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | } |
63 | 63 | $pth = implode('install', $a); |
64 | 64 | unset ($a); |
65 | -$base_url = $url . (substr($url, -1) != '/' ? '/' : ''); |
|
66 | -$base_path = $pth . (substr($pth, -1) != '/' ? '/' : ''); |
|
65 | +$base_url = $url.(substr($url, -1) != '/' ? '/' : ''); |
|
66 | +$base_path = $pth.(substr($pth, -1) != '/' ? '/' : ''); |
|
67 | 67 | |
68 | 68 | // connect to the database |
69 | 69 | $conn = @mysqli_connect($database_server, $database_user, $database_password); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | if ($installLevel === 1) { |
93 | 93 | // check table prefix |
94 | 94 | if ($installMode === 0) { |
95 | - $query = "SELECT COUNT(*) FROM $dbase.`" . $table_prefix . "site_content`"; |
|
95 | + $query = "SELECT COUNT(*) FROM $dbase.`".$table_prefix."site_content`"; |
|
96 | 96 | if (@mysqli_query($conn, $query)) { |
97 | 97 | $errors += 1; |
98 | 98 | } else { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // check status of Inherit Parent Template plugin |
108 | 108 | $auto_template_logic = 'parent'; |
109 | 109 | if ($installMode !== 0) { |
110 | - $query = "SELECT properties, disabled FROM " . $dbase . ".`" . $table_prefix . "site_plugins` WHERE name='Inherit Parent Template'"; |
|
110 | + $query = "SELECT properties, disabled FROM ".$dbase.".`".$table_prefix."site_plugins` WHERE name='Inherit Parent Template'"; |
|
111 | 111 | $rs = mysqli_query($conn, $query); |
112 | 112 | $row = mysqli_fetch_row($rs); |
113 | 113 | if (!$row) { |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | // open db connection |
133 | - include dirname(__DIR__) . '/processor/result.php'; |
|
134 | - include_once dirname(__DIR__) . '/sqlParser.class.php'; |
|
133 | + include dirname(__DIR__).'/processor/result.php'; |
|
134 | + include_once dirname(__DIR__).'/sqlParser.class.php'; |
|
135 | 135 | $sqlParser = new SqlParser( |
136 | 136 | $database_server, |
137 | 137 | $database_user, |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | $confph['lastInstallTime'] = time(); |
178 | 178 | $confph['site_sessionname'] = $site_sessionname; |
179 | 179 | |
180 | - $configString = file_get_contents(dirname(dirname(__DIR__)) . '/stubs/config.tpl'); |
|
180 | + $configString = file_get_contents(dirname(dirname(__DIR__)).'/stubs/config.tpl'); |
|
181 | 181 | $configString = parse($configString, $confph); |
182 | 182 | |
183 | - $filename = dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/config.inc.php'; |
|
183 | + $filename = dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/config.inc.php'; |
|
184 | 184 | $configFileFailed = false; |
185 | 185 | if (@ !$handle = fopen($filename, 'w')) { |
186 | 186 | $configFileFailed = true; |
@@ -208,13 +208,13 @@ discard block |
||
208 | 208 | $siteid = uniqid(''); |
209 | 209 | mysqli_query( |
210 | 210 | $sqlParser->conn, |
211 | - "REPLACE INTO $dbase.`" . $table_prefix . "system_settings` (setting_name,setting_value) VALUES('site_id','$siteid'),('manager_theme','default')" |
|
211 | + "REPLACE INTO $dbase.`".$table_prefix."system_settings` (setting_name,setting_value) VALUES('site_id','$siteid'),('manager_theme','default')" |
|
212 | 212 | ); |
213 | 213 | } else { |
214 | 214 | // update site_id if missing |
215 | 215 | $ds = mysqli_query( |
216 | 216 | $sqlParser->conn, |
217 | - "SELECT setting_name,setting_value FROM $dbase.`" . $table_prefix . "system_settings` WHERE setting_name='site_id'" |
|
217 | + "SELECT setting_name,setting_value FROM $dbase.`".$table_prefix."system_settings` WHERE setting_name='site_id'" |
|
218 | 218 | ); |
219 | 219 | if ($ds) { |
220 | 220 | $r = mysqli_fetch_assoc($ds); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $siteid = uniqid(''); |
224 | 224 | mysqli_query( |
225 | 225 | $sqlParser->conn, |
226 | - "REPLACE INTO $dbase.`" . $table_prefix . "system_settings` (setting_name,setting_value) VALUES('site_id','$siteid')" |
|
226 | + "REPLACE INTO $dbase.`".$table_prefix."system_settings` (setting_name,setting_value) VALUES('site_id','$siteid')" |
|
227 | 227 | ); |
228 | 228 | } |
229 | 229 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if ($installLevel === 5 && (isset ($_POST['template']) || $installData)) { |
250 | 250 | $selTemplates = $_POST['template']; |
251 | 251 | foreach ($moduleTemplates as $k => $moduleTemplate) { |
252 | - if (! is_array($moduleTemplate)) { |
|
252 | + if (!is_array($moduleTemplate)) { |
|
253 | 253 | continue; |
254 | 254 | } |
255 | 255 | $installDataLevel['templates'][$moduleTemplate[0]] = array( |
@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | $template = mysqli_real_escape_string($conn, $template); |
288 | 288 | |
289 | 289 | // See if the template already exists |
290 | - $query = "SELECT * FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name'"; |
|
290 | + $query = "SELECT * FROM $dbase.`".$table_prefix."site_templates` WHERE templatename='$name'"; |
|
291 | 291 | $rs = mysqli_query($sqlParser->conn, $query); |
292 | 292 | |
293 | 293 | if (mysqli_num_rows($rs)) { |
294 | 294 | $installDataLevel['templates'][$moduleTemplate[0]]['type'] = 'update'; |
295 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;"; |
|
295 | + $query = "UPDATE $dbase.`".$table_prefix."site_templates` SET content='$template', description='$desc', category=$category_id, locked='$locked' WHERE templatename='$name' LIMIT 1;"; |
|
296 | 296 | if (!mysqli_query($sqlParser->conn, $query)) { |
297 | 297 | $errors += 1; |
298 | 298 | $installDataLevel['templates'][$moduleTemplate[0]]['error'] = array( |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | if (!is_null($save_sql_id_as)) { |
306 | 306 | $sql_id = @mysqli_insert_id($sqlParser->conn); |
307 | 307 | if (!$sql_id) { |
308 | - $query = "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$name' LIMIT 1;"; |
|
308 | + $query = "SELECT id FROM $dbase.`".$table_prefix."site_templates` WHERE templatename='$name' LIMIT 1;"; |
|
309 | 309 | $idQuery = mysqli_fetch_assoc(mysqli_query($sqlParser->conn, $query)); |
310 | 310 | $sql_id = $idQuery['id']; |
311 | 311 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | } |
314 | 314 | } else { |
315 | 315 | $installDataLevel['templates'][$moduleTemplate[0]]['type'] = 'create'; |
316 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_templates` (templatename,description,content,category,locked) VALUES('$name','$desc','$template',$category_id,'$locked');"; |
|
316 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_templates` (templatename,description,content,category,locked) VALUES('$name','$desc','$template',$category_id,'$locked');"; |
|
317 | 317 | if (!@mysqli_query($sqlParser->conn, $query)) { |
318 | 318 | $errors += 1; |
319 | 319 | $installDataLevel['templates'][$moduleTemplate[0]]['error'] = array( |
@@ -378,12 +378,12 @@ discard block |
||
378 | 378 | // Create the category if it does not already exist |
379 | 379 | $category = getCreateDbCategory($category, $sqlParser); |
380 | 380 | |
381 | - $query = "SELECT * FROM $dbase.`" . $table_prefix . "site_tmplvars` WHERE name='$name'"; |
|
382 | - $rs = mysqli_query($sqlParser->conn,$query); |
|
381 | + $query = "SELECT * FROM $dbase.`".$table_prefix."site_tmplvars` WHERE name='$name'"; |
|
382 | + $rs = mysqli_query($sqlParser->conn, $query); |
|
383 | 383 | if (mysqli_num_rows($rs)) { |
384 | 384 | $installDataLevel['tvs'][$moduleTV[0]]['type'] = 'update'; |
385 | 385 | while ($row = mysqli_fetch_assoc($rs)) { |
386 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};"; |
|
386 | + $query = "UPDATE $dbase.`".$table_prefix."site_tmplvars` SET type='$input_type', caption='$caption', description='$desc', category=$category, locked=$locked, elements='$input_options', display='$output_widget', display_params='$output_widget_params', default_text='$input_default' WHERE id={$row['id']};"; |
|
387 | 387 | if (!mysqli_query($sqlParser->conn, $query)) { |
388 | 388 | $installDataLevel['tvs'][$moduleTV[0]]['error'] = array( |
389 | 389 | 'type' => 'sql', |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | } |
397 | 397 | } else { |
398 | 398 | $installDataLevel['tvs'][$moduleTV[0]]['type'] = 'create'; |
399 | - $q = "INSERT INTO $dbase.`" . $table_prefix . "site_tmplvars` (type,name,caption,description,category,locked,elements,display,display_params,default_text) VALUES('$input_type','$name','$caption','$desc',$category,$locked,'$input_options','$output_widget','$output_widget_params','$input_default');"; |
|
399 | + $q = "INSERT INTO $dbase.`".$table_prefix."site_tmplvars` (type,name,caption,description,category,locked,elements,display,display_params,default_text) VALUES('$input_type','$name','$caption','$desc',$category,$locked,'$input_options','$output_widget','$output_widget_params','$input_default');"; |
|
400 | 400 | if (!mysqli_query($sqlParser->conn, $q)) { |
401 | 401 | $installDataLevel['tvs'][$moduleTV[0]]['error'] = array( |
402 | 402 | 'type' => 'sql', |
@@ -413,23 +413,23 @@ discard block |
||
413 | 413 | if (count($assignments) > 0) { |
414 | 414 | |
415 | 415 | // remove existing tv -> template assignments |
416 | - $query = "SELECT id FROM $dbase.`" . $table_prefix . "site_tmplvars` WHERE name='$name' AND description='$desc';"; |
|
416 | + $query = "SELECT id FROM $dbase.`".$table_prefix."site_tmplvars` WHERE name='$name' AND description='$desc';"; |
|
417 | 417 | $ds = mysqli_query($sqlParser->conn, $query); |
418 | 418 | $row = mysqli_fetch_assoc($ds); |
419 | 419 | $id = $row["id"]; |
420 | - $query = 'DELETE FROM ' . $dbase . '.`' . $table_prefix . 'site_tmplvar_templates` WHERE tmplvarid = \'' . $id . '\''; |
|
420 | + $query = 'DELETE FROM '.$dbase.'.`'.$table_prefix.'site_tmplvar_templates` WHERE tmplvarid = \''.$id.'\''; |
|
421 | 421 | mysqli_query($sqlParser->conn, $query); |
422 | 422 | |
423 | 423 | // add tv -> template assignments |
424 | 424 | foreach ($assignments as $assignment) { |
425 | 425 | $template = mysqli_real_escape_string($conn, $assignment); |
426 | - $query = "SELECT id FROM $dbase.`" . $table_prefix . "site_templates` WHERE templatename='$template';"; |
|
426 | + $query = "SELECT id FROM $dbase.`".$table_prefix."site_templates` WHERE templatename='$template';"; |
|
427 | 427 | $ts = mysqli_query($sqlParser->conn, $query); |
428 | 428 | if ($ds && $ts) { |
429 | 429 | $tRow = mysqli_fetch_assoc($ts); |
430 | 430 | $templateId = $tRow['id']; |
431 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_tmplvar_templates` (tmplvarid, templateid) VALUES($id, $templateId)"; |
|
432 | - mysqli_query($sqlParser->conn,$query); |
|
431 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_tmplvar_templates` (tmplvarid, templateid) VALUES($id, $templateId)"; |
|
432 | + mysqli_query($sqlParser->conn, $query); |
|
433 | 433 | } |
434 | 434 | } |
435 | 435 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | if ($installLevel === 5 && $errorData === false && (isset ($_POST['chunk']) || $installData)) { |
442 | 442 | $selChunks = $_POST['chunk']; |
443 | 443 | foreach ($moduleChunks as $k => $moduleChunk) { |
444 | - if (! is_array($moduleChunk)) { |
|
444 | + if (!is_array($moduleChunk)) { |
|
445 | 445 | continue; |
446 | 446 | } |
447 | 447 | $installDataLevel['chunks'][$moduleChunk[0]] = array( |
@@ -479,14 +479,14 @@ discard block |
||
479 | 479 | $chunk = mysqli_real_escape_string($conn, $chunk); |
480 | 480 | $rs = mysqli_query( |
481 | 481 | $sqlParser->conn, |
482 | - "SELECT * FROM $dbase.`" . $table_prefix . "site_htmlsnippets` WHERE name='$name'" |
|
482 | + "SELECT * FROM $dbase.`".$table_prefix."site_htmlsnippets` WHERE name='$name'" |
|
483 | 483 | ); |
484 | 484 | $count_original_name = mysqli_num_rows($rs); |
485 | 485 | if ($overwrite == 'false') { |
486 | - $newname = $name . '-' . str_replace('.', '_', $modx_version); |
|
486 | + $newname = $name.'-'.str_replace('.', '_', $modx_version); |
|
487 | 487 | $rs = mysqli_query( |
488 | 488 | $sqlParser->conn, |
489 | - "SELECT * FROM $dbase.`" . $table_prefix . "site_htmlsnippets` WHERE name='$newname'" |
|
489 | + "SELECT * FROM $dbase.`".$table_prefix."site_htmlsnippets` WHERE name='$newname'" |
|
490 | 490 | ); |
491 | 491 | $count_new_name = mysqli_num_rows($rs); |
492 | 492 | } |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | if ($update) { |
495 | 495 | $installDataLevel['chunks'][$moduleChunk[0]]['type'] = 'update'; |
496 | 496 | if (!mysqli_query($sqlParser->conn, |
497 | - "UPDATE $dbase.`" . $table_prefix . "site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
497 | + "UPDATE $dbase.`".$table_prefix."site_htmlsnippets` SET snippet='$chunk', description='$desc', category=$category_id WHERE name='$name';")) { |
|
498 | 498 | $errors += 1; |
499 | 499 | $installDataLevel['chunks'][$moduleChunk[0]]['error'] = array( |
500 | 500 | 'type' => 'sql', |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | } else { |
512 | 512 | $installDataLevel['chunks'][$moduleChunk[0]]['type'] = 'create'; |
513 | 513 | } |
514 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_htmlsnippets` (name,description,snippet,category) VALUES('$name','$desc','$chunk',$category_id);"; |
|
514 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_htmlsnippets` (name,description,snippet,category) VALUES('$name','$desc','$chunk',$category_id);"; |
|
515 | 515 | if (!mysqli_query($sqlParser->conn, $query)) { |
516 | 516 | $errors += 1; |
517 | 517 | $installDataLevel['chunks'][$moduleChunk[0]]['error'] = array( |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | if ($installLevel === 5 && $errorData === false && (isset ($_POST['module']) || $installData)) { |
535 | 535 | $selModules = $_POST['module']; |
536 | 536 | foreach ($moduleModules as $k => $moduleModule) { |
537 | - if (! is_array($moduleModule)) { |
|
537 | + if (!is_array($moduleModule)) { |
|
538 | 538 | continue; |
539 | 539 | } |
540 | 540 | $installDataLevel['modules'][$moduleModule[0]] = array( |
@@ -573,13 +573,13 @@ discard block |
||
573 | 573 | // $module = removeDocblock($module, 'module'); // Modules have no fileBinding, keep docblock for info-tab |
574 | 574 | $module = mysqli_real_escape_string($conn, $module); |
575 | 575 | $rs = mysqli_query($sqlParser->conn, |
576 | - "SELECT * FROM $dbase.`" . $table_prefix . "site_modules` WHERE name='$name'"); |
|
576 | + "SELECT * FROM $dbase.`".$table_prefix."site_modules` WHERE name='$name'"); |
|
577 | 577 | if (mysqli_num_rows($rs)) { |
578 | 578 | $installDataLevel['modules'][$moduleModule[0]]['type'] = 'update'; |
579 | 579 | $row = mysqli_fetch_assoc($rs); |
580 | 580 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
581 | 581 | if (!mysqli_query($sqlParser->conn, |
582 | - "UPDATE $dbase.`" . $table_prefix . "site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
582 | + "UPDATE $dbase.`".$table_prefix."site_modules` SET modulecode='$module', description='$desc', properties='$props', enable_sharedparams='$shared' WHERE name='$name';")) { |
|
583 | 583 | $installDataLevel['modules'][$moduleModule[0]]['error'] = array( |
584 | 584 | 'type' => 'sql', |
585 | 585 | 'content' => mysqli_error($sqlParser->conn) |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | $installDataLevel['modules'][$moduleModule[0]]['type'] = 'create'; |
592 | 592 | $properties = mysqli_real_escape_string($conn, parseProperties($properties, true)); |
593 | 593 | if (!mysqli_query($sqlParser->conn, |
594 | - "INSERT INTO $dbase.`" . $table_prefix . "site_modules` (name,description,modulecode,properties,guid,enable_sharedparams,category) VALUES('$name','$desc','$module','$properties','$guid','$shared', $category);")) { |
|
594 | + "INSERT INTO $dbase.`".$table_prefix."site_modules` (name,description,modulecode,properties,guid,enable_sharedparams,category) VALUES('$name','$desc','$module','$properties','$guid','$shared', $category);")) { |
|
595 | 595 | $installDataLevel['modules'][$moduleModule[0]]['error'] = array( |
596 | 596 | 'type' => 'sql', |
597 | 597 | 'content' => mysqli_error($sqlParser->conn) |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | if ($installLevel === 5 && $errorData === false && (isset ($_POST['plugin']) || $installData)) { |
612 | 612 | $selPlugs = $_POST['plugin']; |
613 | 613 | foreach ($modulePlugins as $k => $modulePlugin) { |
614 | - if (! is_array($modulePlugin)) { |
|
614 | + if (!is_array($modulePlugin)) { |
|
615 | 615 | continue; |
616 | 616 | } |
617 | 617 | $installDataLevel['plugins'][$modulePlugin[0]] = array( |
@@ -645,12 +645,12 @@ discard block |
||
645 | 645 | $disabled = $modulePlugin[9]; |
646 | 646 | if (array_key_exists(7, $modulePlugin)) { |
647 | 647 | // parse comma-separated legacy names and prepare them for sql IN clause |
648 | - $leg_names = "'" . implode( |
|
648 | + $leg_names = "'".implode( |
|
649 | 649 | "','", |
650 | 650 | preg_split('/\s*,\s*/', mysqli_real_escape_string($conn, $modulePlugin[7])) |
651 | - ) . "'"; |
|
651 | + )."'"; |
|
652 | 652 | } |
653 | - if (! file_exists($filecontent)) { |
|
653 | + if (!file_exists($filecontent)) { |
|
654 | 654 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
655 | 655 | 'type' => 'file_not_found' |
656 | 656 | ); |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | |
659 | 659 | // disable legacy versions based on legacy_names provided |
660 | 660 | if (!empty($leg_names)) { |
661 | - $update_query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
661 | + $update_query = "UPDATE $dbase.`".$table_prefix."site_plugins` SET disabled='1' WHERE name IN ($leg_names);"; |
|
662 | 662 | $rs = mysqli_query($sqlParser->conn, $update_query); |
663 | 663 | } |
664 | 664 | |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | $plugin = end(preg_split("/(\/\/)?\s*\<\?php/", file_get_contents($filecontent), 2)); |
669 | 669 | $plugin = removeDocblock($plugin, 'plugin'); |
670 | 670 | $plugin = mysqli_real_escape_string($conn, $plugin); |
671 | - $query = "SELECT * FROM $dbase.`" . $table_prefix . "site_plugins` WHERE name='$name'"; |
|
671 | + $query = "SELECT * FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name'"; |
|
672 | 672 | $rs = mysqli_query($sqlParser->conn, $query); |
673 | 673 | if (mysqli_num_rows($rs)) { |
674 | 674 | $installDataLevel['plugins'][$modulePlugin[0]]['type'] = 'update'; |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | while ($row = mysqli_fetch_assoc($rs)) { |
677 | 677 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
678 | 678 | if ($row['description'] == $desc) { |
679 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};"; |
|
679 | + $query = "UPDATE $dbase.`".$table_prefix."site_plugins` SET plugincode='$plugin', description='$desc', properties='$props' WHERE id={$row['id']};"; |
|
680 | 680 | if (!mysqli_query($sqlParser->conn, $query)) { |
681 | 681 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
682 | 682 | 'type' => 'sql', |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | } |
688 | 688 | $insert = false; |
689 | 689 | } else { |
690 | - $query = "UPDATE $dbase.`" . $table_prefix . "site_plugins` SET disabled='1' WHERE id={$row['id']};"; |
|
690 | + $query = "UPDATE $dbase.`".$table_prefix."site_plugins` SET disabled='1' WHERE id={$row['id']};"; |
|
691 | 691 | if (!mysqli_query($sqlParser->conn, $query)) { |
692 | 692 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
693 | 693 | 'type' => 'sql', |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | } |
701 | 701 | if ($insert === true) { |
702 | 702 | $properties = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
703 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_plugins` (name,description,plugincode,properties,moduleguid,disabled,category) VALUES('$name','$desc','$plugin','$properties','$guid','0',$category);"; |
|
703 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_plugins` (name,description,plugincode,properties,moduleguid,disabled,category) VALUES('$name','$desc','$plugin','$properties','$guid','0',$category);"; |
|
704 | 704 | if (!mysqli_query($sqlParser->conn, $query)) { |
705 | 705 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
706 | 706 | 'type' => 'sql', |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | } else { |
714 | 714 | $installDataLevel['plugins'][$modulePlugin[0]]['type'] = 'create'; |
715 | 715 | $properties = mysqli_real_escape_string($conn, parseProperties($properties, true)); |
716 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_plugins` (name,description,plugincode,properties,moduleguid,category,disabled) VALUES('$name','$desc','$plugin','$properties','$guid',$category,$disabled);"; |
|
716 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_plugins` (name,description,plugincode,properties,moduleguid,category,disabled) VALUES('$name','$desc','$plugin','$properties','$guid',$category,$disabled);"; |
|
717 | 717 | if (!mysqli_query($sqlParser->conn, $query)) { |
718 | 718 | $installDataLevel['plugins'][$modulePlugin[0]]['error'] = array( |
719 | 719 | 'type' => 'sql', |
@@ -725,17 +725,17 @@ discard block |
||
725 | 725 | } |
726 | 726 | // add system events |
727 | 727 | if (count($events) > 0) { |
728 | - $query = "SELECT id FROM $dbase.`" . $table_prefix . "site_plugins` WHERE name='$name' AND description='$desc';"; |
|
728 | + $query = "SELECT id FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name' AND description='$desc';"; |
|
729 | 729 | $ds = mysqli_query($sqlParser->conn, $query); |
730 | 730 | if ($ds) { |
731 | 731 | $row = mysqli_fetch_assoc($ds); |
732 | 732 | $id = $row["id"]; |
733 | 733 | // remove existing events |
734 | - $query = 'DELETE FROM ' . $dbase . '.`' . $table_prefix . 'site_plugin_events` WHERE pluginid = \'' . $id . '\''; |
|
734 | + $query = 'DELETE FROM '.$dbase.'.`'.$table_prefix.'site_plugin_events` WHERE pluginid = \''.$id.'\''; |
|
735 | 735 | mysqli_query($sqlParser->conn, $query); |
736 | 736 | // add new events |
737 | - $query = "INSERT INTO $dbase.`" . $table_prefix . "site_plugin_events` (pluginid, evtid) SELECT '$id' as 'pluginid',se.id as 'evtid' FROM $dbase.`" . $table_prefix . "system_eventnames` se WHERE name IN ('" . implode("','", $events) . "')"; |
|
738 | - mysqli_query($sqlParser->conn,$query); |
|
737 | + $query = "INSERT INTO $dbase.`".$table_prefix."site_plugin_events` (pluginid, evtid) SELECT '$id' as 'pluginid',se.id as 'evtid' FROM $dbase.`".$table_prefix."system_eventnames` se WHERE name IN ('".implode("','", $events)."')"; |
|
738 | + mysqli_query($sqlParser->conn, $query); |
|
739 | 739 | } |
740 | 740 | } |
741 | 741 | } |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | if ($installLevel === 5 && $errorData === false && (isset ($_POST['snippet']) || $installData)) { |
750 | 750 | $selSnips = $_POST['snippet']; |
751 | 751 | foreach ($moduleSnippets as $k => $moduleSnippet) { |
752 | - if (! is_array($moduleSnippet)) { |
|
752 | + if (!is_array($moduleSnippet)) { |
|
753 | 753 | continue; |
754 | 754 | } |
755 | 755 | $installDataLevel['snippets'][$moduleSnippet[0]] = array( |
@@ -784,13 +784,13 @@ discard block |
||
784 | 784 | $snippet = removeDocblock($snippet, 'snippet'); |
785 | 785 | $snippet = mysqli_real_escape_string($conn, $snippet); |
786 | 786 | $rs = mysqli_query($sqlParser->conn, |
787 | - "SELECT * FROM $dbase.`" . $table_prefix . "site_snippets` WHERE name='$name'"); |
|
787 | + "SELECT * FROM $dbase.`".$table_prefix."site_snippets` WHERE name='$name'"); |
|
788 | 788 | if (mysqli_num_rows($rs)) { |
789 | 789 | $installDataLevel['snippets'][$moduleSnippet[0]]['type'] = 'update'; |
790 | 790 | $row = mysqli_fetch_assoc($rs); |
791 | 791 | $props = mysqli_real_escape_string($conn, propUpdate($properties, $row['properties'])); |
792 | 792 | if (!mysqli_query($sqlParser->conn, |
793 | - "UPDATE $dbase.`" . $table_prefix . "site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
793 | + "UPDATE $dbase.`".$table_prefix."site_snippets` SET snippet='$snippet', description='$desc', properties='$props' WHERE name='$name';")) { |
|
794 | 794 | $installDataLevel['snippets'][$moduleSnippet[0]]['error'] = array( |
795 | 795 | 'type' => 'sql', |
796 | 796 | 'content' => mysqli_error($sqlParser->conn) |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | $installDataLevel['snippets'][$moduleSnippet[0]]['type'] = 'create'; |
803 | 803 | $properties = mysqli_real_escape_string($conn, parseProperties($properties, true)); |
804 | 804 | if (!mysqli_query($sqlParser->conn, |
805 | - "INSERT INTO $dbase.`" . $table_prefix . "site_snippets` (name,description,snippet,properties,category) VALUES('$name','$desc','$snippet','$properties',$category);")) { |
|
805 | + "INSERT INTO $dbase.`".$table_prefix."site_snippets` (name,description,snippet,properties,category) VALUES('$name','$desc','$snippet','$properties',$category);")) { |
|
806 | 806 | $installDataLevel['snippets'][$moduleSnippet[0]]['error'] = array( |
807 | 807 | 'type' => 'sql', |
808 | 808 | 'content' => mysqli_error($sqlParser->conn) |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | 'content' => '' //dependency name or error message |
870 | 870 | )*/ |
871 | 871 | ); |
872 | - $query = 'SELECT id, guid FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_modules` WHERE name="' . $dependency['module'] . '"'; |
|
872 | + $query = 'SELECT id, guid FROM '.$dbase.'`'.$sqlParser->prefix.'site_modules` WHERE name="'.$dependency['module'].'"'; |
|
873 | 873 | $ds = mysqli_query($sqlParser->conn, $query); |
874 | 874 | if (!$ds) { |
875 | 875 | $installDependencyLevel[$dependency['module']]['error'] = array( |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | $moduleGuid = $row["guid"]; |
885 | 885 | } |
886 | 886 | // get extra id |
887 | - $query = 'SELECT id FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_' . $dependency['table'] . '` WHERE ' . $dependency['column'] . '="' . $dependency['name'] . '"'; |
|
887 | + $query = 'SELECT id FROM '.$dbase.'`'.$sqlParser->prefix.'site_'.$dependency['table'].'` WHERE '.$dependency['column'].'="'.$dependency['name'].'"'; |
|
888 | 888 | $ds = mysqli_query($sqlParser->conn, $query); |
889 | 889 | if (!$ds) { |
890 | 890 | $installDependencyLevel[$dependency['module']]['error'] = array( |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | $extraId = $row["id"]; |
899 | 899 | } |
900 | 900 | // setup extra as module dependency |
901 | - $query = 'SELECT module FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_module_depobj` WHERE module=' . $moduleId . ' AND resource=' . $extraId . ' AND type=' . $dependency['type'] . ' LIMIT 1'; |
|
901 | + $query = 'SELECT module FROM '.$dbase.'`'.$sqlParser->prefix.'site_module_depobj` WHERE module='.$moduleId.' AND resource='.$extraId.' AND type='.$dependency['type'].' LIMIT 1'; |
|
902 | 902 | $ds = mysqli_query($sqlParser->conn, $query); |
903 | 903 | if (!$ds) { |
904 | 904 | $installDependencyLevel[$dependency['module']]['error'] = array( |
@@ -909,17 +909,17 @@ discard block |
||
909 | 909 | break; |
910 | 910 | } else { |
911 | 911 | if (mysqli_num_rows($ds) === 0) { |
912 | - $query = 'INSERT INTO ' . $dbase . '`' . $sqlParser->prefix . 'site_module_depobj` (module, resource, type) VALUES(' . $moduleId . ',' . $extraId . ',' . $dependency['type'] . ')'; |
|
912 | + $query = 'INSERT INTO '.$dbase.'`'.$sqlParser->prefix.'site_module_depobj` (module, resource, type) VALUES('.$moduleId.','.$extraId.','.$dependency['type'].')'; |
|
913 | 913 | mysqli_query($sqlParser->conn, $query); |
914 | 914 | $installDependencyLevel[$dependency['module']]['type'] = 'create'; |
915 | 915 | } else { |
916 | - $query = 'UPDATE ' . $dbase . '`' . $sqlParser->prefix . 'site_module_depobj` SET module = ' . $moduleId . ', resource = ' . $extraId . ', type = ' . $dependency['type'] . ' WHERE module=' . $moduleId . ' AND resource=' . $extraId . ' AND type=' . $dependency['type']; |
|
916 | + $query = 'UPDATE '.$dbase.'`'.$sqlParser->prefix.'site_module_depobj` SET module = '.$moduleId.', resource = '.$extraId.', type = '.$dependency['type'].' WHERE module='.$moduleId.' AND resource='.$extraId.' AND type='.$dependency['type']; |
|
917 | 917 | mysqli_query($sqlParser->conn, $query); |
918 | 918 | $installDependencyLevel[$dependency['module']]['type'] = 'update'; |
919 | 919 | } |
920 | 920 | if ($dependency['type'] == 30 || $dependency['type'] == 40) { |
921 | 921 | // set extra guid for plugins and snippets |
922 | - $query = 'SELECT id FROM ' . $dbase . '`' . $sqlParser->prefix . 'site_' . $dependency['table'] . '` WHERE id=' . $extraId . ' LIMIT 1'; |
|
922 | + $query = 'SELECT id FROM '.$dbase.'`'.$sqlParser->prefix.'site_'.$dependency['table'].'` WHERE id='.$extraId.' LIMIT 1'; |
|
923 | 923 | $ds = mysqli_query($sqlParser->conn, $query); |
924 | 924 | if (!$ds) { |
925 | 925 | $installDependencyLevel[$dependency['module']]['extra'] = array( |
@@ -930,8 +930,8 @@ discard block |
||
930 | 930 | break; |
931 | 931 | } else { |
932 | 932 | if (mysqli_num_rows($ds) != 0) { |
933 | - $query = 'UPDATE ' . $dbase . '`' . $sqlParser->prefix . 'site_' . $dependency['table'] . '` SET moduleguid = ' . $moduleGuid . ' WHERE id=' . $extraId; |
|
934 | - $ds= mysqli_query($sqlParser->conn, $query); |
|
933 | + $query = 'UPDATE '.$dbase.'`'.$sqlParser->prefix.'site_'.$dependency['table'].'` SET moduleguid = '.$moduleGuid.' WHERE id='.$extraId; |
|
934 | + $ds = mysqli_query($sqlParser->conn, $query); |
|
935 | 935 | $installDependencyLevel[$dependency['module']]['extra'] = array( |
936 | 936 | 'type' => 'done', |
937 | 937 | 'content' => $dependency['name'] |
@@ -953,28 +953,28 @@ discard block |
||
953 | 953 | } |
954 | 954 | |
955 | 955 | // Setup the MODX API -- needed for the cache processor |
956 | - if (file_exists(dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/config_mutator.php')) { |
|
957 | - require_once dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/config_mutator.php'; |
|
956 | + if (file_exists(dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/config_mutator.php')) { |
|
957 | + require_once dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/config_mutator.php'; |
|
958 | 958 | } |
959 | 959 | define('MODX_API_MODE', true); |
960 | 960 | if (!defined('MODX_BASE_PATH')) { |
961 | 961 | define('MODX_BASE_PATH', $base_path); |
962 | 962 | } |
963 | 963 | if (!defined('MODX_MANAGER_PATH')) { |
964 | - define('MODX_MANAGER_PATH', $base_path . MGR_DIR . '/'); |
|
964 | + define('MODX_MANAGER_PATH', $base_path.MGR_DIR.'/'); |
|
965 | 965 | } |
966 | 966 | $database_type = 'mysqli'; |
967 | 967 | // initiate a new document parser |
968 | 968 | if (!defined('EVO_BOOTSTRAP_FILE')) { |
969 | 969 | define('EVO_BOOTSTRAP_FILE', |
970 | - dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/bootstrap.php'); |
|
971 | - require_once dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/bootstrap.php'; |
|
970 | + dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/bootstrap.php'); |
|
971 | + require_once dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/bootstrap.php'; |
|
972 | 972 | } |
973 | 973 | |
974 | - if (! defined('EVO_SERVICES_FILE')) { |
|
975 | - define('EVO_SERVICES_FILE', dirname(dirname(dirname(__DIR__))) . '/' . MGR_DIR . '/includes/services.php'); |
|
974 | + if (!defined('EVO_SERVICES_FILE')) { |
|
975 | + define('EVO_SERVICES_FILE', dirname(dirname(dirname(__DIR__))).'/'.MGR_DIR.'/includes/services.php'); |
|
976 | 976 | } |
977 | - if (! defined('MODX_CLASS')) { |
|
977 | + if (!defined('MODX_CLASS')) { |
|
978 | 978 | define('MODX_CLASS', '\EvolutionCMS\Core'); |
979 | 979 | } |
980 | 980 | |
@@ -982,25 +982,25 @@ discard block |
||
982 | 982 | $modx->getDatabase()->connect(); |
983 | 983 | // always empty cache after install |
984 | 984 | $sync = new EvolutionCMS\Cache(); |
985 | - $sync->setCachepath(dirname(dirname(dirname(__DIR__))) . '/assets/cache/'); |
|
985 | + $sync->setCachepath(dirname(dirname(dirname(__DIR__))).'/assets/cache/'); |
|
986 | 986 | $sync->setReport(false); |
987 | 987 | $sync->emptyCache(); // first empty the cache |
988 | 988 | |
989 | 989 | // try to chmod the cache go-rwx (for suexeced php) |
990 | - @chmod(dirname(dirname(dirname(__DIR__))) . '/assets/cache/siteCache.idx.php', 0600); |
|
991 | - @chmod(dirname(dirname(dirname(__DIR__))) . '/assets/cache/sitePublishing.idx.php', 0600); |
|
990 | + @chmod(dirname(dirname(dirname(__DIR__))).'/assets/cache/siteCache.idx.php', 0600); |
|
991 | + @chmod(dirname(dirname(dirname(__DIR__))).'/assets/cache/sitePublishing.idx.php', 0600); |
|
992 | 992 | |
993 | 993 | // remove any locks on the manager functions so initial manager login is not blocked |
994 | - mysqli_query($conn, "TRUNCATE TABLE `" . $table_prefix . "active_users`"); |
|
994 | + mysqli_query($conn, "TRUNCATE TABLE `".$table_prefix."active_users`"); |
|
995 | 995 | |
996 | 996 | // close db connection |
997 | 997 | $sqlParser->close(); |
998 | 998 | |
999 | 999 | // andrazk 20070416 - release manager access |
1000 | - if (file_exists(dirname(dirname(dirname(__DIR__))) . '/assets/cache/installProc.inc.php')) { |
|
1001 | - @chmod(dirname(dirname(dirname(__DIR__))) . '/assets/cache/installProc.inc.php', 0755); |
|
1002 | - unlink(dirname(dirname(dirname(__DIR__))) . '/assets/cache/installProc.inc.php'); |
|
1000 | + if (file_exists(dirname(dirname(dirname(__DIR__))).'/assets/cache/installProc.inc.php')) { |
|
1001 | + @chmod(dirname(dirname(dirname(__DIR__))).'/assets/cache/installProc.inc.php', 0755); |
|
1002 | + unlink(dirname(dirname(dirname(__DIR__))).'/assets/cache/installProc.inc.php'); |
|
1003 | 1003 | } |
1004 | 1004 | } |
1005 | 1005 | } |
1006 | -include_once dirname(__DIR__) . '/template/actions/install.php'; |
|
1006 | +include_once dirname(__DIR__).'/template/actions/install.php'; |