@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('edit_template') && $modx->manager->action == '301') { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | if(!$modx->hasPermission('new_template') && $modx->manager->action == '300') { |
9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | // check to see the snippet editor isn't locked |
22 | 22 | if($lockedEl = $modx->elementIsLocked(2, $id)) { |
23 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['tmplvar'])); |
|
23 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['tmplvar'])); |
|
24 | 24 | } |
25 | 25 | // end check for lock |
26 | 26 | |
@@ -30,25 +30,25 @@ discard block |
||
30 | 30 | global $content; |
31 | 31 | $content = array(); |
32 | 32 | if(isset($_GET['id'])) { |
33 | - $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'"); |
|
34 | - $content = $modx->db->getRow($rs); |
|
35 | - if(!$content) { |
|
36 | - header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}"); |
|
37 | - } |
|
38 | - |
|
39 | - $_SESSION['itemname'] = $content['caption']; |
|
40 | - if($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
41 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
42 | - } |
|
33 | + $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'"); |
|
34 | + $content = $modx->db->getRow($rs); |
|
35 | + if(!$content) { |
|
36 | + header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}"); |
|
37 | + } |
|
38 | + |
|
39 | + $_SESSION['itemname'] = $content['caption']; |
|
40 | + if($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
41 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
42 | + } |
|
43 | 43 | } else if(isset($_REQUEST['itemname'])) { |
44 | - $content['name'] = $_REQUEST['itemname']; |
|
44 | + $content['name'] = $_REQUEST['itemname']; |
|
45 | 45 | } else { |
46 | - $_SESSION['itemname'] = $_lang["new_tmplvars"]; |
|
47 | - $content['category'] = (int)$_REQUEST['catid']; |
|
46 | + $_SESSION['itemname'] = $_lang["new_tmplvars"]; |
|
47 | + $content['category'] = (int)$_REQUEST['catid']; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | if($modx->manager->hasFormValues()) { |
51 | - $modx->manager->loadFormValues(); |
|
51 | + $modx->manager->loadFormValues(); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $content = array_merge($content, $_POST); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $RTEditors = ''; |
63 | 63 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister', array('forfrontend' => 1)); |
64 | 64 | if(is_array($evtOut)) { |
65 | - $RTEditors = implode(',', $evtOut); |
|
65 | + $RTEditors = implode(',', $evtOut); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | ?> |
@@ -277,12 +277,12 @@ discard block |
||
277 | 277 | |
278 | 278 | <form name="mutate" method="post" action="index.php" enctype="multipart/form-data"> |
279 | 279 | <?php |
280 | - // invoke OnTVFormPrerender event |
|
281 | - $evtOut = $modx->invokeEvent('OnTVFormPrerender', array('id' => $id)); |
|
282 | - if(is_array($evtOut)) { |
|
283 | - echo implode("", $evtOut); |
|
284 | - } |
|
285 | - ?> |
|
280 | + // invoke OnTVFormPrerender event |
|
281 | + $evtOut = $modx->invokeEvent('OnTVFormPrerender', array('id' => $id)); |
|
282 | + if(is_array($evtOut)) { |
|
283 | + echo implode("", $evtOut); |
|
284 | + } |
|
285 | + ?> |
|
286 | 286 | <input type="hidden" name="id" value="<?= $content['id'] ?>"> |
287 | 287 | <input type="hidden" name="a" value="302"> |
288 | 288 | <input type="hidden" name="or" value="<?= $origin ?>"> |
@@ -343,11 +343,11 @@ discard block |
||
343 | 343 | <select name="categoryid" class="form-control" onChange="documentDirty=true;"> |
344 | 344 | <option> </option> |
345 | 345 | <?php |
346 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
347 | - foreach(getCategories() as $n => $v) { |
|
348 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
349 | - } |
|
350 | - ?> |
|
346 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
347 | + foreach(getCategories() as $n => $v) { |
|
348 | + echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
349 | + } |
|
350 | + ?> |
|
351 | 351 | </select> |
352 | 352 | </div> |
353 | 353 | </div> |
@@ -383,14 +383,14 @@ discard block |
||
383 | 383 | <optgroup label="Custom Type"> |
384 | 384 | <option value="custom_tv" <?= ($content['type'] == 'custom_tv' ? "selected='selected'" : "") ?>>Custom Input</option> |
385 | 385 | <?php |
386 | - $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs'); |
|
387 | - foreach($custom_tvs as $ctv) { |
|
388 | - if(strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
389 | - $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : ""); |
|
390 | - echo '<option value="custom_tv:' . $ctv . '" ' . $selected . '>' . $ctv . '</option>'; |
|
391 | - } |
|
392 | - } |
|
393 | - ?> |
|
386 | + $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs'); |
|
387 | + foreach($custom_tvs as $ctv) { |
|
388 | + if(strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
389 | + $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : ""); |
|
390 | + echo '<option value="custom_tv:' . $ctv . '" ' . $selected . '>' . $ctv . '</option>'; |
|
391 | + } |
|
392 | + } |
|
393 | + ?> |
|
394 | 394 | </optgroup> |
395 | 395 | </select> |
396 | 396 | </div> |
@@ -455,63 +455,63 @@ discard block |
||
455 | 455 | <a class="btn btn-secondary btn-sm" href="javascript:;" onClick="check_toggle(); return false;"><?= $_lang['check_toggle'] ?></a> |
456 | 456 | </div> |
457 | 457 | <?php |
458 | - $rs = $modx->db->select(sprintf("tpl.id AS id, templatename, tpl.description AS tpldescription, tpl.locked AS tpllocked, tpl.selectable AS selectable, tmplvarid, if(isnull(cat.category),'%s',cat.category) AS category, cat.id AS catid", $_lang['no_category']), sprintf("%s as tpl |
|
458 | + $rs = $modx->db->select(sprintf("tpl.id AS id, templatename, tpl.description AS tpldescription, tpl.locked AS tpllocked, tpl.selectable AS selectable, tmplvarid, if(isnull(cat.category),'%s',cat.category) AS category, cat.id AS catid", $_lang['no_category']), sprintf("%s as tpl |
|
459 | 459 | LEFT JOIN %s as stt ON stt.templateid=tpl.id AND stt.tmplvarid='%s' |
460 | 460 | LEFT JOIN %s as cat ON tpl.category=cat.id", $modx->getFullTableName('site_templates'), $modx->getFullTableName('site_tmplvar_templates'), $id, $modx->getFullTableName('categories')), '', "category, templatename"); |
461 | 461 | |
462 | - $tplList = '<ul>'; |
|
463 | - $preCat = ''; |
|
464 | - $insideUl = 0; |
|
465 | - while($row = $modx->db->getRow($rs)) { |
|
466 | - $row['category'] = stripslashes($row['category']); //pixelchutes |
|
467 | - if($preCat !== $row['category']) { |
|
468 | - $tplList .= $insideUl ? '</ul>' : ''; |
|
469 | - $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
470 | - $insideUl = 1; |
|
471 | - } |
|
472 | - |
|
473 | - if($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
474 | - $checked = true; |
|
475 | - } elseif(isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
476 | - $checked = true; |
|
477 | - } elseif($id == 0 && is_array($_POST['template'])) { |
|
478 | - $checked = in_array($row['id'], $_POST['template']); |
|
479 | - } else { |
|
480 | - $checked = $row['tmplvarid']; |
|
481 | - } |
|
482 | - $selectable = !$row['selectable'] ? ' class="disabled"' : ''; |
|
483 | - $checked = $checked ? ' checked="checked"' : ''; |
|
484 | - $tplId = ' <small>(' . $row['id'] . ')</small>'; |
|
485 | - $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : ''; |
|
486 | - |
|
487 | - $tplInfo = array(); |
|
488 | - if($row['tpllocked']) { |
|
489 | - $tplInfo[] = $_lang['locked']; |
|
490 | - } |
|
491 | - if($row['id'] == $modx->config['default_template']) { |
|
492 | - $tplInfo[] = $_lang['defaulttemplate_title']; |
|
493 | - } |
|
494 | - $tplInfo = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
|
495 | - |
|
496 | - $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo); |
|
497 | - $tplList .= '</li>'; |
|
498 | - |
|
499 | - $preCat = $row['category']; |
|
500 | - } |
|
501 | - $tplList .= $insideUl ? '</ul>' : ''; |
|
502 | - $tplList .= '</ul>'; |
|
503 | - echo $tplList; |
|
504 | - |
|
505 | - ?> |
|
462 | + $tplList = '<ul>'; |
|
463 | + $preCat = ''; |
|
464 | + $insideUl = 0; |
|
465 | + while($row = $modx->db->getRow($rs)) { |
|
466 | + $row['category'] = stripslashes($row['category']); //pixelchutes |
|
467 | + if($preCat !== $row['category']) { |
|
468 | + $tplList .= $insideUl ? '</ul>' : ''; |
|
469 | + $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
470 | + $insideUl = 1; |
|
471 | + } |
|
472 | + |
|
473 | + if($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
474 | + $checked = true; |
|
475 | + } elseif(isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
476 | + $checked = true; |
|
477 | + } elseif($id == 0 && is_array($_POST['template'])) { |
|
478 | + $checked = in_array($row['id'], $_POST['template']); |
|
479 | + } else { |
|
480 | + $checked = $row['tmplvarid']; |
|
481 | + } |
|
482 | + $selectable = !$row['selectable'] ? ' class="disabled"' : ''; |
|
483 | + $checked = $checked ? ' checked="checked"' : ''; |
|
484 | + $tplId = ' <small>(' . $row['id'] . ')</small>'; |
|
485 | + $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : ''; |
|
486 | + |
|
487 | + $tplInfo = array(); |
|
488 | + if($row['tpllocked']) { |
|
489 | + $tplInfo[] = $_lang['locked']; |
|
490 | + } |
|
491 | + if($row['id'] == $modx->config['default_template']) { |
|
492 | + $tplInfo[] = $_lang['defaulttemplate_title']; |
|
493 | + } |
|
494 | + $tplInfo = !empty($tplInfo) ? ' <em>(' . implode(', ', $tplInfo) . ')</em>' : ''; |
|
495 | + |
|
496 | + $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo); |
|
497 | + $tplList .= '</li>'; |
|
498 | + |
|
499 | + $preCat = $row['category']; |
|
500 | + } |
|
501 | + $tplList .= $insideUl ? '</ul>' : ''; |
|
502 | + $tplList .= '</ul>'; |
|
503 | + echo $tplList; |
|
504 | + |
|
505 | + ?> |
|
506 | 506 | |
507 | 507 | <!-- Access Permissions --> |
508 | 508 | <?php |
509 | - if($use_udperms == 1) { |
|
510 | - // fetch permissions for the variable |
|
511 | - $rs = $modx->db->select('documentgroup', $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); |
|
512 | - $groupsarray = $modx->db->getColumn('documentgroup', $rs); |
|
509 | + if($use_udperms == 1) { |
|
510 | + // fetch permissions for the variable |
|
511 | + $rs = $modx->db->select('documentgroup', $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); |
|
512 | + $groupsarray = $modx->db->getColumn('documentgroup', $rs); |
|
513 | 513 | |
514 | - ?> |
|
514 | + ?> |
|
515 | 515 | <?php if($modx->hasPermission('access_permissions')) { ?> |
516 | 516 | <script type="text/javascript"> |
517 | 517 | function makePublic(b) { |
@@ -539,29 +539,29 @@ discard block |
||
539 | 539 | <!--<b><?php /*echo $_lang['access_permissions']; */ ?></b>--> |
540 | 540 | <p><?= $_lang['tmplvar_access_msg'] ?></p> |
541 | 541 | <?php |
542 | - $chk = ''; |
|
543 | - $rs = $modx->db->select('name, id', $tbl_documentgroup_names); |
|
544 | - if(empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
545 | - $groupsarray = $_POST['docgroups']; |
|
546 | - } |
|
547 | - while($row = $modx->db->getRow($rs)) { |
|
548 | - $checked = in_array($row['id'], $groupsarray); |
|
549 | - if($modx->hasPermission('access_permissions')) { |
|
550 | - if($checked) { |
|
551 | - $notPublic = true; |
|
552 | - } |
|
553 | - $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>"; |
|
554 | - } else { |
|
555 | - if($checked) { |
|
556 | - echo "<input type='hidden' name='docgroups[]' value='" . $row['id'] . "' />"; |
|
557 | - } |
|
558 | - } |
|
559 | - } |
|
560 | - if($modx->hasPermission('access_permissions')) { |
|
561 | - $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks; |
|
562 | - } |
|
563 | - echo '<ul>' . $chks . '</ul>'; |
|
564 | - ?> |
|
542 | + $chk = ''; |
|
543 | + $rs = $modx->db->select('name, id', $tbl_documentgroup_names); |
|
544 | + if(empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
545 | + $groupsarray = $_POST['docgroups']; |
|
546 | + } |
|
547 | + while($row = $modx->db->getRow($rs)) { |
|
548 | + $checked = in_array($row['id'], $groupsarray); |
|
549 | + if($modx->hasPermission('access_permissions')) { |
|
550 | + if($checked) { |
|
551 | + $notPublic = true; |
|
552 | + } |
|
553 | + $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>"; |
|
554 | + } else { |
|
555 | + if($checked) { |
|
556 | + echo "<input type='hidden' name='docgroups[]' value='" . $row['id'] . "' />"; |
|
557 | + } |
|
558 | + } |
|
559 | + } |
|
560 | + if($modx->hasPermission('access_permissions')) { |
|
561 | + $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks; |
|
562 | + } |
|
563 | + echo '<ul>' . $chks . '</ul>'; |
|
564 | + ?> |
|
565 | 565 | <?php } ?> |
566 | 566 | <?php } ?> |
567 | 567 | |
@@ -571,12 +571,12 @@ discard block |
||
571 | 571 | <input type="submit" name="save" style="display:none"> |
572 | 572 | |
573 | 573 | <?php |
574 | - // invoke OnTVFormRender event |
|
575 | - $evtOut = $modx->invokeEvent('OnTVFormRender', array('id' => $id)); |
|
576 | - if(is_array($evtOut)) { |
|
577 | - echo implode('', $evtOut); |
|
578 | - } |
|
579 | - ?> |
|
574 | + // invoke OnTVFormRender event |
|
575 | + $evtOut = $modx->invokeEvent('OnTVFormRender', array('id' => $id)); |
|
576 | + if(is_array($evtOut)) { |
|
577 | + echo implode('', $evtOut); |
|
578 | + } |
|
579 | + ?> |
|
580 | 580 | </div> |
581 | 581 | </form> |
582 | 582 | <script type="text/javascript">setTimeout('showParameters()', 10);</script> |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | |
6 | 6 | // PROCESSOR FIRST |
7 | 7 | if($_SESSION['mgrRole'] == 1) { |
8 | - if($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) { |
|
9 | - $current = $modx->manager->getSystemChecksum($modx->config['check_files_onlogin']); |
|
10 | - if(!empty($current)) { |
|
11 | - $modx->manager->setSystemChecksum($current); |
|
12 | - $modx->clearCache('full'); |
|
13 | - $modx->config['sys_files_checksum'] = $current; |
|
14 | - }; |
|
15 | - } |
|
8 | + if($_REQUEST['b'] == 'resetSysfilesChecksum' && $modx->hasPermission('settings')) { |
|
9 | + $current = $modx->manager->getSystemChecksum($modx->config['check_files_onlogin']); |
|
10 | + if(!empty($current)) { |
|
11 | + $modx->manager->setSystemChecksum($current); |
|
12 | + $modx->clearCache('full'); |
|
13 | + $modx->config['sys_files_checksum'] = $current; |
|
14 | + }; |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | // NOW CHECK CONFIG |
@@ -20,15 +20,15 @@ discard block |
||
20 | 20 | |
21 | 21 | $sysfiles_check = $modx->manager->checkSystemChecksum(); |
22 | 22 | if ($sysfiles_check!=='0'){ |
23 | - $warningspresent = 1; |
|
24 | - $warnings[] = array($_lang['configcheck_sysfiles_mod']); |
|
23 | + $warningspresent = 1; |
|
24 | + $warnings[] = array($_lang['configcheck_sysfiles_mod']); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | if (is_writable("includes/config.inc.php")){ |
28 | 28 | // Warn if world writable |
29 | 29 | if(@fileperms('includes/config.inc.php') & 0x0002) { |
30 | - $warningspresent = 1; |
|
31 | - $warnings[] = array($_lang['configcheck_configinc']); |
|
30 | + $warningspresent = 1; |
|
31 | + $warnings[] = array($_lang['configcheck_configinc']); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | break; |
180 | 180 | case $_lang['configcheck_sysfiles_mod']: |
181 | 181 | $warnings[$i][1] = $_lang["configcheck_sysfiles_mod_msg"]; |
182 | - $warnings[$i][2] = '<ul><li>'. implode('</li><li>', $sysfiles_check) .'</li></ul>'; |
|
183 | - if($modx->hasPermission('settings')) { |
|
184 | - $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>'; |
|
185 | - } |
|
182 | + $warnings[$i][2] = '<ul><li>'. implode('</li><li>', $sysfiles_check) .'</li></ul>'; |
|
183 | + if($modx->hasPermission('settings')) { |
|
184 | + $warnings[$i][2] .= '<ul class="actionButtons" style="float:right"><li><a href="index.php?a=2&b=resetSysfilesChecksum" onclick="return confirm(\'' . $_lang["reset_sysfiles_checksum_alert"] . '\')">' . $_lang["reset_sysfiles_checksum_button"] . '</a></li></ul>'; |
|
185 | + } |
|
186 | 186 | if(!$_SESSION["mgrConfigCheck"]) $modx->logEvent(0,3,$warnings[$i][1]." ".implode(', ',$sysfiles_check),$_lang['configcheck_sysfiles_mod']); |
187 | 187 | break; |
188 | 188 | case $_lang['configcheck_lang_difference'] : |
@@ -1,20 +1,20 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | switch($modx->manager->action) { |
6 | - case 107: |
|
7 | - if(!$modx->hasPermission('new_module')) { |
|
8 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | - } |
|
10 | - break; |
|
11 | - case 108: |
|
12 | - if(!$modx->hasPermission('edit_module')) { |
|
13 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
14 | - } |
|
15 | - break; |
|
16 | - default: |
|
17 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + case 107: |
|
7 | + if(!$modx->hasPermission('new_module')) { |
|
8 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + } |
|
10 | + break; |
|
11 | + case 108: |
|
12 | + if(!$modx->hasPermission('edit_module')) { |
|
13 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
14 | + } |
|
15 | + break; |
|
16 | + default: |
|
17 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
18 | 18 | } |
19 | 19 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
20 | 20 | // Get table names (alphabetical) |
@@ -34,16 +34,16 @@ discard block |
||
34 | 34 | * @return string |
35 | 35 | */ |
36 | 36 | function createGUID() { |
37 | - srand((double) microtime() * 1000000); |
|
38 | - $r = rand(); |
|
39 | - $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
40 | - $m = md5($u); |
|
41 | - return $m; |
|
37 | + srand((double) microtime() * 1000000); |
|
38 | + $r = rand(); |
|
39 | + $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
40 | + $m = md5($u); |
|
41 | + return $m; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | // check to see the module editor isn't locked |
45 | 45 | if($lockedEl = $modx->elementIsLocked(6, $id)) { |
46 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
46 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
47 | 47 | } |
48 | 48 | // end check for lock |
49 | 49 | |
@@ -51,22 +51,22 @@ discard block |
||
51 | 51 | $modx->lockElement(6, $id); |
52 | 52 | |
53 | 53 | if(isset($_GET['id'])) { |
54 | - $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
|
55 | - $content = $modx->db->getRow($rs); |
|
56 | - if(!$content) { |
|
57 | - $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
|
58 | - } |
|
59 | - $content['properties'] = str_replace("&", "&", $content['properties']); |
|
60 | - $_SESSION['itemname'] = $content['name']; |
|
61 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
62 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
63 | - } |
|
54 | + $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
|
55 | + $content = $modx->db->getRow($rs); |
|
56 | + if(!$content) { |
|
57 | + $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
|
58 | + } |
|
59 | + $content['properties'] = str_replace("&", "&", $content['properties']); |
|
60 | + $_SESSION['itemname'] = $content['name']; |
|
61 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
62 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
63 | + } |
|
64 | 64 | } else { |
65 | - $_SESSION['itemname'] = $_lang["new_module"]; |
|
66 | - $content['wrap'] = '1'; |
|
65 | + $_SESSION['itemname'] = $_lang["new_module"]; |
|
66 | + $content['wrap'] = '1'; |
|
67 | 67 | } |
68 | 68 | if($modx->manager->hasFormValues()) { |
69 | - $modx->manager->loadFormValues(); |
|
69 | + $modx->manager->loadFormValues(); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // Add lock-element JS-Script |
@@ -437,18 +437,18 @@ discard block |
||
437 | 437 | |
438 | 438 | <form name="mutate" id="mutate" class="module" method="post" action="index.php?a=109"> |
439 | 439 | <?php |
440 | - // invoke OnModFormPrerender event |
|
441 | - $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
|
442 | - if(is_array($evtOut)) { |
|
443 | - echo implode('', $evtOut); |
|
444 | - } |
|
445 | - |
|
446 | - // Prepare internal params & info-tab via parseDocBlock |
|
447 | - $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
448 | - $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
449 | - $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
450 | - $internal = array(); |
|
451 | - ?> |
|
440 | + // invoke OnModFormPrerender event |
|
441 | + $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
|
442 | + if(is_array($evtOut)) { |
|
443 | + echo implode('', $evtOut); |
|
444 | + } |
|
445 | + |
|
446 | + // Prepare internal params & info-tab via parseDocBlock |
|
447 | + $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
448 | + $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
449 | + $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
450 | + $internal = array(); |
|
451 | + ?> |
|
452 | 452 | <input type="hidden" name="id" value="<?= $content['id'] ?>"> |
453 | 453 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
454 | 454 | |
@@ -501,11 +501,11 @@ discard block |
||
501 | 501 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
502 | 502 | <option> </option> |
503 | 503 | <?php |
504 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
505 | - foreach(getCategories() as $n => $v) { |
|
506 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
507 | - } |
|
508 | - ?> |
|
504 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
505 | + foreach(getCategories() as $n => $v) { |
|
506 | + echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
507 | + } |
|
508 | + ?> |
|
509 | 509 | </select> |
510 | 510 | </div> |
511 | 511 | </div> |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | <i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang['manage_depends'] ?></a> |
613 | 613 | </div> |
614 | 614 | <?php |
615 | - $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, |
|
615 | + $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, |
|
616 | 616 | CASE smd.type |
617 | 617 | WHEN 10 THEN 'Chunk' |
618 | 618 | WHEN 20 THEN 'Document' |
@@ -628,17 +628,17 @@ discard block |
||
628 | 628 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50 |
629 | 629 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name'); |
630 | 630 | |
631 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
632 | - $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
|
633 | - $grd->noRecordMsg = $_lang['no_records_found']; |
|
634 | - $grd->cssClass = 'grid'; |
|
635 | - $grd->columnHeaderClass = 'gridHeader'; |
|
636 | - $grd->itemClass = 'gridItem'; |
|
637 | - $grd->altItemClass = 'gridAltItem'; |
|
638 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
639 | - $grd->fields = "name,type"; |
|
640 | - echo $grd->render(); |
|
641 | - ?> |
|
631 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
632 | + $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
|
633 | + $grd->noRecordMsg = $_lang['no_records_found']; |
|
634 | + $grd->cssClass = 'grid'; |
|
635 | + $grd->columnHeaderClass = 'gridHeader'; |
|
636 | + $grd->itemClass = 'gridItem'; |
|
637 | + $grd->altItemClass = 'gridAltItem'; |
|
638 | + $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
639 | + $grd->fields = "name,type"; |
|
640 | + echo $grd->render(); |
|
641 | + ?> |
|
642 | 642 | </div> |
643 | 643 | </div> |
644 | 644 | <?php endif; ?> |
@@ -650,12 +650,12 @@ discard block |
||
650 | 650 | <div class="container container-body"> |
651 | 651 | <?php if($use_udperms == 1) : ?> |
652 | 652 | <?php |
653 | - // fetch user access permissions for the module |
|
654 | - $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
|
655 | - $groupsarray = $modx->db->getColumn('usergroup', $rs); |
|
653 | + // fetch user access permissions for the module |
|
654 | + $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
|
655 | + $groupsarray = $modx->db->getColumn('usergroup', $rs); |
|
656 | 656 | |
657 | - if($modx->hasPermission('access_permissions')) { |
|
658 | - ?> |
|
657 | + if($modx->hasPermission('access_permissions')) { |
|
658 | + ?> |
|
659 | 659 | <!-- User Group Access Permissions --> |
660 | 660 | <script type="text/javascript"> |
661 | 661 | function makePublic(b) { |
@@ -679,28 +679,28 @@ discard block |
||
679 | 679 | </script> |
680 | 680 | <p><?= $_lang['module_group_access_msg'] ?></p> |
681 | 681 | <?php |
682 | - } |
|
683 | - $chk = ''; |
|
684 | - $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
|
685 | - while($row = $modx->db->getRow($rs)) { |
|
686 | - $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
687 | - $checked = in_array($row['id'], $groupsarray); |
|
688 | - if($modx->hasPermission('access_permissions')) { |
|
689 | - if($checked) { |
|
690 | - $notPublic = true; |
|
691 | - } |
|
692 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
693 | - } else { |
|
694 | - if($checked) { |
|
695 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
696 | - } |
|
697 | - } |
|
698 | - } |
|
699 | - if($modx->hasPermission('access_permissions')) { |
|
700 | - $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
701 | - } |
|
702 | - echo $chks; |
|
703 | - ?> |
|
682 | + } |
|
683 | + $chk = ''; |
|
684 | + $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
|
685 | + while($row = $modx->db->getRow($rs)) { |
|
686 | + $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
687 | + $checked = in_array($row['id'], $groupsarray); |
|
688 | + if($modx->hasPermission('access_permissions')) { |
|
689 | + if($checked) { |
|
690 | + $notPublic = true; |
|
691 | + } |
|
692 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
693 | + } else { |
|
694 | + if($checked) { |
|
695 | + $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
696 | + } |
|
697 | + } |
|
698 | + } |
|
699 | + if($modx->hasPermission('access_permissions')) { |
|
700 | + $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
701 | + } |
|
702 | + echo $chks; |
|
703 | + ?> |
|
704 | 704 | <?php endif; ?> |
705 | 705 | </div> |
706 | 706 | </div> |
@@ -716,11 +716,11 @@ discard block |
||
716 | 716 | |
717 | 717 | <input type="submit" name="save" style="display:none;"> |
718 | 718 | <?php |
719 | - // invoke OnModFormRender event |
|
720 | - $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
|
721 | - if(is_array($evtOut)) { |
|
722 | - echo implode('', $evtOut); |
|
723 | - } |
|
724 | - ?> |
|
719 | + // invoke OnModFormRender event |
|
720 | + $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
|
721 | + if(is_array($evtOut)) { |
|
722 | + echo implode('', $evtOut); |
|
723 | + } |
|
724 | + ?> |
|
725 | 725 | </form> |
726 | 726 | <script type="text/javascript">setTimeout('showParameters();', 10);</script> |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | } |
5 | 5 | $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
6 | 6 | $downloadLinks = array( |
7 | - 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | - 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | - 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | - 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | - 'http://extras.evolution-cms.com/', |
|
12 | - 'https://github.com/extras-evolution' |
|
13 | - )), |
|
7 | + 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | + 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | + 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | + 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | + 'http://extras.evolution-cms.com/', |
|
12 | + 'https://github.com/extras-evolution' |
|
13 | + )), |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | $translationLinks = array( |
17 | - 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | - 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
17 | + 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | + 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 | /** |
@@ -24,23 +24,23 @@ discard block |
||
24 | 24 | * @return string |
25 | 25 | */ |
26 | 26 | function createList($sectionHeader, $linkArr) { |
27 | - $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
|
28 | - $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
|
29 | - $links = ''; |
|
30 | - foreach($linkArr as $row) { |
|
31 | - if (!is_array($row['link'])) $row['link'] = array($row['link']); |
|
32 | - foreach ($row['link'] as $link) { |
|
33 | - $links .= $links != '' ? '<br/>' : ''; |
|
34 | - $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
35 | - } |
|
36 | - $output .= ' |
|
27 | + $output = '<div class="sectionHeader">'.$sectionHeader.'</div><div class="sectionBody">'."\n"; |
|
28 | + $output .= '<table width="500" border="0" cellspacing="0" cellpadding="0">'."\n"; |
|
29 | + $links = ''; |
|
30 | + foreach($linkArr as $row) { |
|
31 | + if (!is_array($row['link'])) $row['link'] = array($row['link']); |
|
32 | + foreach ($row['link'] as $link) { |
|
33 | + $links .= $links != '' ? '<br/>' : ''; |
|
34 | + $links .= '<a href="' . $link . '" target="_blank">' . $link . '</a>'; |
|
35 | + } |
|
36 | + $output .= ' |
|
37 | 37 | <tr> |
38 | 38 | <td align="left"><strong>' . $row["title"] . '</strong></td> |
39 | 39 | <td align="left">' . $links . '</td> |
40 | 40 | </tr>'; |
41 | - $links = ''; |
|
42 | - } |
|
43 | - $output .= '</table></div>'."\n"; |
|
41 | + $links = ''; |
|
42 | + } |
|
43 | + $output .= '</table></div>'."\n"; |
|
44 | 44 | return $output; |
45 | 45 | } |
46 | 46 | echo $logo; |
@@ -5,133 +5,133 @@ discard block |
||
5 | 5 | |
6 | 6 | // action list |
7 | 7 | $GLOBALS['action_list'] = array( |
8 | - '1' => 'Loading a frame(set)', |
|
9 | - '2' => 'Viewing home page/ online users', |
|
10 | - '3' => 'Viewing data for resource', |
|
11 | - '4' => 'Creating a resource', |
|
12 | - '5' => 'Saving resource', |
|
13 | - '6' => 'Deleting resource', |
|
14 | - '7' => 'Waiting while MODX cleans up', |
|
15 | - '8' => 'Logged out', |
|
16 | - '9' => 'Viewing help', |
|
17 | - '10' => 'Viewing/ composing messages', |
|
18 | - '11' => 'Creating a user', |
|
19 | - '12' => 'Editing user', |
|
20 | - '13' => 'Viewing logging', |
|
21 | - '14' => 'Editing a parser', |
|
22 | - '15' => 'Saving a parser', |
|
23 | - '16' => 'Editing template', |
|
24 | - '17' => 'Editing settings', |
|
25 | - '18' => 'Viewing Credits :)', |
|
26 | - '19' => 'Creating a new template', |
|
27 | - '20' => 'Saving template', |
|
28 | - '21' => 'Deleting template', |
|
29 | - '22' => 'Editing Snippet', |
|
30 | - '23' => 'Creating a new Snippet', |
|
31 | - '24' => 'Saving Snippet', |
|
32 | - '25' => 'Deleting Snippet', |
|
33 | - '26' => 'Refreshing site', |
|
34 | - '27' => 'Editing resource', |
|
35 | - '28' => 'Changing password', |
|
36 | - '29' => 'Error', |
|
37 | - '30' => 'Saving settings', |
|
38 | - '31' => 'Using file manager', |
|
39 | - '32' => 'Saving user', |
|
40 | - '33' => 'Deleting user', |
|
41 | - '34' => 'Saving new password', |
|
42 | - '35' => 'Editing role', |
|
43 | - '36' => 'Saving role', |
|
44 | - '37' => 'Deleting role', |
|
45 | - '38' => 'Creating new role', |
|
46 | - '40' => 'Editing Access Permissions', |
|
47 | - '41' => 'Editing Access Permissions', |
|
48 | - '42' => 'Editing Access Permissions', |
|
49 | - '43' => 'Editing Access Permissions', |
|
50 | - '44' => 'Editing Access Permissions', |
|
51 | - '45' => 'Idle', |
|
52 | - '46' => 'Editing Access Permissions', |
|
53 | - '47' => 'Editing Access Permissions', |
|
54 | - '48' => 'Editing Access Permissions', |
|
55 | - '49' => 'Editing Access Permissions', |
|
56 | - '50' => 'Editing Access Permissions', |
|
57 | - '51' => 'Moving resource', |
|
58 | - '52' => 'Moved resource', |
|
59 | - '53' => 'Viewing system info', |
|
60 | - '54' => 'Optimizing a table', |
|
61 | - '55' => 'Empty logs', |
|
62 | - '56' => 'Refresh resource tree', |
|
63 | - '57' => 'Refresh menu', |
|
64 | - '58' => 'Logged in', |
|
65 | - '59' => 'About MODX', |
|
66 | - '60' => 'Emptying Recycle Bin', |
|
67 | - '61' => 'Publishing a resource', |
|
68 | - '62' => 'Un-publishing a resource', |
|
69 | - '63' => 'Un-deleting a resource', |
|
70 | - '64' => 'Removing deleted content', |
|
71 | - '65' => 'Deleting a message', |
|
72 | - '66' => 'Sending a message', |
|
73 | - '67' => 'Removing locks', |
|
74 | - '68' => 'Viewing site logging', |
|
75 | - '69' => 'Viewing online visitors', |
|
76 | - '70' => 'Viewing site schedule', |
|
77 | - '71' => 'Searching', |
|
78 | - '72' => 'Adding a weblink', |
|
79 | - '73' => 'Editing a weblink', |
|
80 | - //case "74" : return "Changing personal preferences"; break; |
|
81 | - '75' => 'User/ role management', |
|
82 | - '76' => 'Element management', |
|
83 | - '77' => 'Creating a new Chunk (HTML Snippet)', |
|
84 | - '78' => 'Editing Chunk (HTML Snippet)', |
|
85 | - '79' => 'Saving Chunk (HTML Snippet)', |
|
86 | - '80' => 'Deleting Chunk (HTML Snippet)', |
|
87 | - '83' => 'Exporting a resource to HTML', |
|
88 | - '84' => 'Load Element Selector', |
|
89 | - '85' => 'Create Folder', |
|
90 | - '86' => 'Role management', |
|
91 | - '87' => 'Create new web user', |
|
92 | - '88' => 'Editing web user', |
|
93 | - '89' => 'Saving web user', |
|
94 | - '90' => 'Deleting web user', |
|
95 | - '91' => 'Editing Web Access Permissions', |
|
96 | - '92' => 'Editing Access Permissions', |
|
97 | - '93' => 'Backup Manager', |
|
98 | - '94' => 'Duplicate resource', |
|
99 | - '95' => 'Importing resources from HTML', |
|
100 | - '96' => 'Duplicate Template', |
|
101 | - '97' => 'Duplicate Chunk (HTML Snippet)', |
|
102 | - '98' => 'Duplicate Snippet', |
|
103 | - '99' => 'Manage Web Users', |
|
104 | - '100' => 'Previewing resource', |
|
105 | - '101' => 'Create new plugin', |
|
106 | - '102' => 'Edit plugin', |
|
107 | - '103' => 'Saving plugin', |
|
108 | - '104' => 'Delete plugin', |
|
109 | - '105' => 'Duplicate plugin', |
|
110 | - '106' => 'Viewing Modules', |
|
111 | - '107' => 'Create new module', |
|
112 | - '108' => 'Edit module', |
|
113 | - '109' => 'Saving module', |
|
114 | - '110' => 'Delete module', |
|
115 | - '111' => 'Duplicate module', |
|
116 | - '112' => 'Execute module', |
|
117 | - '113' => 'Manage module dependencies', |
|
118 | - '114' => 'View event log', |
|
119 | - '115' => 'View event log details', |
|
120 | - '116' => 'Delete event log', |
|
121 | - '117' => 'Editing tv rank', |
|
122 | - '118' => 'Call settings ajax include', |
|
123 | - '119' => 'Login Fail (Temporary Block)', |
|
8 | + '1' => 'Loading a frame(set)', |
|
9 | + '2' => 'Viewing home page/ online users', |
|
10 | + '3' => 'Viewing data for resource', |
|
11 | + '4' => 'Creating a resource', |
|
12 | + '5' => 'Saving resource', |
|
13 | + '6' => 'Deleting resource', |
|
14 | + '7' => 'Waiting while MODX cleans up', |
|
15 | + '8' => 'Logged out', |
|
16 | + '9' => 'Viewing help', |
|
17 | + '10' => 'Viewing/ composing messages', |
|
18 | + '11' => 'Creating a user', |
|
19 | + '12' => 'Editing user', |
|
20 | + '13' => 'Viewing logging', |
|
21 | + '14' => 'Editing a parser', |
|
22 | + '15' => 'Saving a parser', |
|
23 | + '16' => 'Editing template', |
|
24 | + '17' => 'Editing settings', |
|
25 | + '18' => 'Viewing Credits :)', |
|
26 | + '19' => 'Creating a new template', |
|
27 | + '20' => 'Saving template', |
|
28 | + '21' => 'Deleting template', |
|
29 | + '22' => 'Editing Snippet', |
|
30 | + '23' => 'Creating a new Snippet', |
|
31 | + '24' => 'Saving Snippet', |
|
32 | + '25' => 'Deleting Snippet', |
|
33 | + '26' => 'Refreshing site', |
|
34 | + '27' => 'Editing resource', |
|
35 | + '28' => 'Changing password', |
|
36 | + '29' => 'Error', |
|
37 | + '30' => 'Saving settings', |
|
38 | + '31' => 'Using file manager', |
|
39 | + '32' => 'Saving user', |
|
40 | + '33' => 'Deleting user', |
|
41 | + '34' => 'Saving new password', |
|
42 | + '35' => 'Editing role', |
|
43 | + '36' => 'Saving role', |
|
44 | + '37' => 'Deleting role', |
|
45 | + '38' => 'Creating new role', |
|
46 | + '40' => 'Editing Access Permissions', |
|
47 | + '41' => 'Editing Access Permissions', |
|
48 | + '42' => 'Editing Access Permissions', |
|
49 | + '43' => 'Editing Access Permissions', |
|
50 | + '44' => 'Editing Access Permissions', |
|
51 | + '45' => 'Idle', |
|
52 | + '46' => 'Editing Access Permissions', |
|
53 | + '47' => 'Editing Access Permissions', |
|
54 | + '48' => 'Editing Access Permissions', |
|
55 | + '49' => 'Editing Access Permissions', |
|
56 | + '50' => 'Editing Access Permissions', |
|
57 | + '51' => 'Moving resource', |
|
58 | + '52' => 'Moved resource', |
|
59 | + '53' => 'Viewing system info', |
|
60 | + '54' => 'Optimizing a table', |
|
61 | + '55' => 'Empty logs', |
|
62 | + '56' => 'Refresh resource tree', |
|
63 | + '57' => 'Refresh menu', |
|
64 | + '58' => 'Logged in', |
|
65 | + '59' => 'About MODX', |
|
66 | + '60' => 'Emptying Recycle Bin', |
|
67 | + '61' => 'Publishing a resource', |
|
68 | + '62' => 'Un-publishing a resource', |
|
69 | + '63' => 'Un-deleting a resource', |
|
70 | + '64' => 'Removing deleted content', |
|
71 | + '65' => 'Deleting a message', |
|
72 | + '66' => 'Sending a message', |
|
73 | + '67' => 'Removing locks', |
|
74 | + '68' => 'Viewing site logging', |
|
75 | + '69' => 'Viewing online visitors', |
|
76 | + '70' => 'Viewing site schedule', |
|
77 | + '71' => 'Searching', |
|
78 | + '72' => 'Adding a weblink', |
|
79 | + '73' => 'Editing a weblink', |
|
80 | + //case "74" : return "Changing personal preferences"; break; |
|
81 | + '75' => 'User/ role management', |
|
82 | + '76' => 'Element management', |
|
83 | + '77' => 'Creating a new Chunk (HTML Snippet)', |
|
84 | + '78' => 'Editing Chunk (HTML Snippet)', |
|
85 | + '79' => 'Saving Chunk (HTML Snippet)', |
|
86 | + '80' => 'Deleting Chunk (HTML Snippet)', |
|
87 | + '83' => 'Exporting a resource to HTML', |
|
88 | + '84' => 'Load Element Selector', |
|
89 | + '85' => 'Create Folder', |
|
90 | + '86' => 'Role management', |
|
91 | + '87' => 'Create new web user', |
|
92 | + '88' => 'Editing web user', |
|
93 | + '89' => 'Saving web user', |
|
94 | + '90' => 'Deleting web user', |
|
95 | + '91' => 'Editing Web Access Permissions', |
|
96 | + '92' => 'Editing Access Permissions', |
|
97 | + '93' => 'Backup Manager', |
|
98 | + '94' => 'Duplicate resource', |
|
99 | + '95' => 'Importing resources from HTML', |
|
100 | + '96' => 'Duplicate Template', |
|
101 | + '97' => 'Duplicate Chunk (HTML Snippet)', |
|
102 | + '98' => 'Duplicate Snippet', |
|
103 | + '99' => 'Manage Web Users', |
|
104 | + '100' => 'Previewing resource', |
|
105 | + '101' => 'Create new plugin', |
|
106 | + '102' => 'Edit plugin', |
|
107 | + '103' => 'Saving plugin', |
|
108 | + '104' => 'Delete plugin', |
|
109 | + '105' => 'Duplicate plugin', |
|
110 | + '106' => 'Viewing Modules', |
|
111 | + '107' => 'Create new module', |
|
112 | + '108' => 'Edit module', |
|
113 | + '109' => 'Saving module', |
|
114 | + '110' => 'Delete module', |
|
115 | + '111' => 'Duplicate module', |
|
116 | + '112' => 'Execute module', |
|
117 | + '113' => 'Manage module dependencies', |
|
118 | + '114' => 'View event log', |
|
119 | + '115' => 'View event log details', |
|
120 | + '116' => 'Delete event log', |
|
121 | + '117' => 'Editing tv rank', |
|
122 | + '118' => 'Call settings ajax include', |
|
123 | + '119' => 'Login Fail (Temporary Block)', |
|
124 | 124 | |
125 | - '300' => 'Create Template Variable', |
|
126 | - '301' => 'Edit Template Variable', |
|
127 | - '302' => 'Save Template Variable', |
|
128 | - '303' => 'Delete Template Variable', |
|
129 | - '304' => 'Duplicate Template Variable', |
|
125 | + '300' => 'Create Template Variable', |
|
126 | + '301' => 'Edit Template Variable', |
|
127 | + '302' => 'Save Template Variable', |
|
128 | + '303' => 'Delete Template Variable', |
|
129 | + '304' => 'Duplicate Template Variable', |
|
130 | 130 | |
131 | - '200' => 'Viewing phpInfo()', |
|
132 | - '501' => 'Delete category', |
|
133 | - '998' => 'Viewing web page', |
|
134 | - '999' => 'Viewing test page', |
|
131 | + '200' => 'Viewing phpInfo()', |
|
132 | + '501' => 'Delete category', |
|
133 | + '998' => 'Viewing web page', |
|
134 | + '999' => 'Viewing test page', |
|
135 | 135 | ); |
136 | 136 | |
137 | 137 | /** |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | * @return string |
141 | 141 | */ |
142 | 142 | function getAction($actionId, $itemid='') { |
143 | - global $action_list; |
|
143 | + global $action_list; |
|
144 | 144 | |
145 | - $ret = sprintf($action_list[$actionId], $itemid); |
|
146 | - if (!$ret) $ret = "Idle (unknown)"; |
|
145 | + $ret = sprintf($action_list[$actionId], $itemid); |
|
146 | + if (!$ret) $ret = "Idle (unknown)"; |
|
147 | 147 | |
148 | - return $ret; |
|
148 | + return $ret; |
|
149 | 149 | } |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('new_module')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $id = isset($_GET['id'])? (int)$_GET['id'] : 0; |
10 | 10 | if($id==0) { |
11 | - $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
11 | + $modx->webAlertAndQuit($_lang["error_no_id"]); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | /** |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | * @return string |
18 | 18 | */ |
19 | 19 | function createGUID(){ |
20 | - srand((double)microtime()*1000000); |
|
21 | - $r = rand() ; |
|
22 | - $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1); |
|
23 | - $m = md5 ($u); |
|
24 | - return $m; |
|
20 | + srand((double)microtime()*1000000); |
|
21 | + $r = rand() ; |
|
22 | + $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1); |
|
23 | + $m = md5 ($u); |
|
24 | + return $m; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | // count duplicates |
@@ -32,40 +32,40 @@ discard block |
||
32 | 32 | |
33 | 33 | // duplicate module |
34 | 34 | $newid = $modx->db->insert( |
35 | - array( |
|
36 | - 'name'=>'', |
|
37 | - 'description'=>'', |
|
38 | - 'disabled'=>'', |
|
39 | - 'category'=>'', |
|
40 | - 'wrap'=>'', |
|
41 | - 'icon'=>'', |
|
42 | - 'enable_resource'=>'', |
|
43 | - 'resourcefile'=>'', |
|
44 | - 'createdon'=>'', |
|
45 | - 'editedon'=>'', |
|
46 | - 'guid'=>'', |
|
47 | - 'enable_sharedparams'=>'', |
|
48 | - 'properties'=>'', |
|
49 | - 'modulecode'=>'', |
|
50 | - ), $modx->getFullTableName('site_modules'), // Insert into |
|
51 | - "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, category, wrap, icon, enable_resource, resourcefile, createdon, editedon, '".createGUID()."' AS guid, enable_sharedparams, properties, modulecode", $modx->getFullTableName('site_modules'), "id='{$id}'"); // Copy from |
|
35 | + array( |
|
36 | + 'name'=>'', |
|
37 | + 'description'=>'', |
|
38 | + 'disabled'=>'', |
|
39 | + 'category'=>'', |
|
40 | + 'wrap'=>'', |
|
41 | + 'icon'=>'', |
|
42 | + 'enable_resource'=>'', |
|
43 | + 'resourcefile'=>'', |
|
44 | + 'createdon'=>'', |
|
45 | + 'editedon'=>'', |
|
46 | + 'guid'=>'', |
|
47 | + 'enable_sharedparams'=>'', |
|
48 | + 'properties'=>'', |
|
49 | + 'modulecode'=>'', |
|
50 | + ), $modx->getFullTableName('site_modules'), // Insert into |
|
51 | + "CONCAT(name, ' {$_lang['duplicated_el_suffix']}{$count}') AS name, description, '1' AS disabled, category, wrap, icon, enable_resource, resourcefile, createdon, editedon, '".createGUID()."' AS guid, enable_sharedparams, properties, modulecode", $modx->getFullTableName('site_modules'), "id='{$id}'"); // Copy from |
|
52 | 52 | |
53 | 53 | // duplicate module dependencies |
54 | 54 | $modx->db->insert( |
55 | - array( |
|
56 | - 'module'=>'', |
|
57 | - 'resource'=>'', |
|
58 | - 'type'=>'', |
|
59 | - ), $modx->getFullTableName('site_module_depobj'), // Insert into |
|
60 | - "'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from |
|
55 | + array( |
|
56 | + 'module'=>'', |
|
57 | + 'resource'=>'', |
|
58 | + 'type'=>'', |
|
59 | + ), $modx->getFullTableName('site_module_depobj'), // Insert into |
|
60 | + "'{$newid}', resource, type", $modx->getFullTableName('site_module_depobj'), "module='{$id}'"); // Copy from |
|
61 | 61 | |
62 | 62 | // duplicate module user group access |
63 | 63 | $modx->db->insert( |
64 | - array( |
|
65 | - 'module'=>'', |
|
66 | - 'usergroup'=>'', |
|
67 | - ), $modx->getFullTableName('site_module_access'), // Insert into |
|
68 | - "'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from |
|
64 | + array( |
|
65 | + 'module'=>'', |
|
66 | + 'usergroup'=>'', |
|
67 | + ), $modx->getFullTableName('site_module_access'), // Insert into |
|
68 | + "'{$newid}', usergroup", $modx->getFullTableName('site_module_access'), "module='{$id}'"); // Copy from |
|
69 | 69 | |
70 | 70 | // Set the item name for logger |
71 | 71 | $name = $modx->db->getValue($modx->db->select('name', $modx->getFullTableName('site_modules'), "id='{$newid}'")); |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | $pth = dirname(dirname(dirname(__FILE__)))."/install/"; |
17 | 17 | $pth = str_replace("\\","/",$pth); |
18 | 18 | if(isset($_GET["rminstall"])) { |
19 | - if(is_dir($pth)) { |
|
20 | - if(!rmdirRecursive($pth)) $msg="An error occured while attempting to remove the install folder"; |
|
21 | - } |
|
19 | + if(is_dir($pth)) { |
|
20 | + if(!rmdirRecursive($pth)) $msg="An error occured while attempting to remove the install folder"; |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | if($msg) echo "<script>alert('".addslashes($msg)."');</script>"; |
24 | 24 | echo "<script>window.location='../index.php?a=2';</script>"; |
@@ -31,15 +31,15 @@ discard block |
||
31 | 31 | * @return bool |
32 | 32 | */ |
33 | 33 | function rmdirRecursive($path, $followLinks=false) { |
34 | - $dir = opendir($path) ; |
|
35 | - while ($entry = readdir($dir)) { |
|
36 | - if (is_file("$path/$entry") || ((!$followLinks) && is_link("$path/$entry"))) { |
|
37 | - @unlink( "$path/$entry" ); |
|
38 | - } |
|
39 | - elseif (is_dir("$path/$entry") && $entry!='.' && $entry!='..') { |
|
40 | - rmdirRecursive("$path/$entry"); // recursive |
|
41 | - } |
|
42 | - } |
|
43 | - closedir($dir); |
|
44 | - return @rmdir($path); |
|
34 | + $dir = opendir($path) ; |
|
35 | + while ($entry = readdir($dir)) { |
|
36 | + if (is_file("$path/$entry") || ((!$followLinks) && is_link("$path/$entry"))) { |
|
37 | + @unlink( "$path/$entry" ); |
|
38 | + } |
|
39 | + elseif (is_dir("$path/$entry") && $entry!='.' && $entry!='..') { |
|
40 | + rmdirRecursive("$path/$entry"); // recursive |
|
41 | + } |
|
42 | + } |
|
43 | + closedir($dir); |
|
44 | + return @rmdir($path); |
|
45 | 45 | } |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
10 | 10 | if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
11 | - $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
|
11 | + $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
|
12 | 12 | return $modx->mergeSettingsContent($load_script); |
13 | 13 | } |
14 | 14 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | $autoloader = __DIR__.'/vendor/autoload.php'; |
49 | 49 | if (file_exists($autoloader) && is_readable($autoloader)) { |
50 | - include_once($autoloader); |
|
50 | + include_once($autoloader); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if(!isset($_SERVER['REQUEST_TIME_FLOAT'])) $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true); |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | if(is_file($base_path . 'assets/cache/siteManager.php')) |
57 | 57 | include_once($base_path . 'assets/cache/siteManager.php'); |
58 | 58 | if(!defined('MGR_DIR') && is_dir("{$base_path}manager")) |
59 | - define('MGR_DIR', 'manager'); |
|
59 | + define('MGR_DIR', 'manager'); |
|
60 | 60 | if(is_file($base_path . 'assets/cache/siteHostnames.php')) |
61 | 61 | include_once($base_path . 'assets/cache/siteHostnames.php'); |
62 | 62 | if(!defined('MODX_SITE_HOSTNAMES')) |
63 | - define('MODX_SITE_HOSTNAMES', ''); |
|
63 | + define('MODX_SITE_HOSTNAMES', ''); |
|
64 | 64 | |
65 | 65 | // get start time |
66 | 66 | $mstart = memory_get_usage(); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | define('IN_PARSER_MODE', true); |
86 | 86 | if ( ! defined('IN_MANAGER_MODE')) { |
87 | - define('IN_MANAGER_MODE', false); |
|
87 | + define('IN_MANAGER_MODE', false); |
|
88 | 88 | } |
89 | 89 | if (!defined('MODX_API_MODE')) { |
90 | 90 | define('MODX_API_MODE', false); |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | |
93 | 93 | // get the required includes |
94 | 94 | if(!isset($database_user) || $database_user=="") { |
95 | - $rt = @include_once(dirname(__FILE__).'/'.MGR_DIR.'/includes/config.inc.php'); |
|
96 | - // Be sure config.inc.php is there and that it contains some important values |
|
97 | - if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { |
|
98 | - readfile('install/not_installed.tpl'); |
|
99 | - exit; |
|
100 | - } |
|
95 | + $rt = @include_once(dirname(__FILE__).'/'.MGR_DIR.'/includes/config.inc.php'); |
|
96 | + // Be sure config.inc.php is there and that it contains some important values |
|
97 | + if(!$rt || !$database_type || !$database_server || !$database_user || !$dbase) { |
|
98 | + readfile('install/not_installed.tpl'); |
|
99 | + exit; |
|
100 | + } |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | // start session |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | |
106 | 106 | // initiate a new document parser |
107 | 107 | if (isset($coreClass) && class_exists($coreClass)) { |
108 | - $modx = new $coreClass; |
|
108 | + $modx = new $coreClass; |
|
109 | 109 | } |
110 | 110 | if (!isset($modx) || !($modx instanceof \DocumentParser)) { |
111 | - include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
112 | - $modx = DocumentParser::getInstance(); |
|
111 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
112 | + $modx = DocumentParser::getInstance(); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // set some parser options |