@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch($modx->manager->action) {
|
| 7 | - case 88: |
|
| 8 | - if(!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 87: |
|
| 13 | - if(!$modx->hasPermission('new_web_user')) {
|
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 88: |
|
| 8 | + if(!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 87: |
|
| 13 | + if(!$modx->hasPermission('new_web_user')) {
|
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 18 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $user = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -1,21 +1,21 @@ 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 | |
| 6 | 6 | switch($modx->manager->action) {
|
| 7 | - case 88: |
|
| 8 | - if(!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 87: |
|
| 13 | - if(!$modx->hasPermission('new_web_user')) {
|
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 88: |
|
| 8 | + if(!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 87: |
|
| 13 | + if(!$modx->hasPermission('new_web_user')) {
|
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 18 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $user = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -24,64 +24,64 @@ discard block |
||
| 24 | 24 | // check to see the snippet editor isn't locked |
| 25 | 25 | $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
|
| 26 | 26 | if($username = $modx->db->getValue($rs)) {
|
| 27 | - $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
|
| 27 | + $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
|
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
| 30 | 30 | |
| 31 | 31 | if($modx->manager->action == '88') {
|
| 32 | - // get user attributes |
|
| 33 | - $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
|
|
| 34 | - $userdata = $modx->db->getRow($rs); |
|
| 35 | - if(!$userdata) {
|
|
| 36 | - $modx->webAlertAndQuit("No user returned!");
|
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - // get user settings |
|
| 40 | - $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
|
|
| 41 | - $usersettings = array(); |
|
| 42 | - while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 43 | - extract($usersettings, EXTR_OVERWRITE); |
|
| 44 | - |
|
| 45 | - // get user name |
|
| 46 | - $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
|
|
| 47 | - $usernamedata = $modx->db->getRow($rs); |
|
| 48 | - if(!$usernamedata) {
|
|
| 49 | - $modx->webAlertAndQuit("No user returned while getting username!");
|
|
| 50 | - } |
|
| 51 | - $_SESSION['itemname'] = $usernamedata['username']; |
|
| 32 | + // get user attributes |
|
| 33 | + $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
|
|
| 34 | + $userdata = $modx->db->getRow($rs); |
|
| 35 | + if(!$userdata) {
|
|
| 36 | + $modx->webAlertAndQuit("No user returned!");
|
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + // get user settings |
|
| 40 | + $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
|
|
| 41 | + $usersettings = array(); |
|
| 42 | + while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 43 | + extract($usersettings, EXTR_OVERWRITE); |
|
| 44 | + |
|
| 45 | + // get user name |
|
| 46 | + $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
|
|
| 47 | + $usernamedata = $modx->db->getRow($rs); |
|
| 48 | + if(!$usernamedata) {
|
|
| 49 | + $modx->webAlertAndQuit("No user returned while getting username!");
|
|
| 50 | + } |
|
| 51 | + $_SESSION['itemname'] = $usernamedata['username']; |
|
| 52 | 52 | } else {
|
| 53 | - $userdata = array(); |
|
| 54 | - $usersettings = array(); |
|
| 55 | - $usernamedata = array(); |
|
| 56 | - $_SESSION['itemname'] = $_lang["new_web_user"]; |
|
| 53 | + $userdata = array(); |
|
| 54 | + $usersettings = array(); |
|
| 55 | + $usernamedata = array(); |
|
| 56 | + $_SESSION['itemname'] = $_lang["new_web_user"]; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // avoid doubling htmlspecialchars (already encoded in DB) |
| 60 | 60 | foreach($userdata as $key => $val) {
|
| 61 | - $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
| 61 | + $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
| 62 | 62 | }; |
| 63 | 63 | $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']); |
| 64 | 64 | |
| 65 | 65 | // restore saved form |
| 66 | 66 | $formRestored = false; |
| 67 | 67 | if($modx->manager->hasFormValues()) {
|
| 68 | - $modx->manager->loadFormValues(); |
|
| 69 | - // restore post values |
|
| 70 | - $userdata = array_merge($userdata, $_POST); |
|
| 71 | - $userdata['dob'] = $modx->toTimeStamp($userdata['dob']); |
|
| 72 | - $usernamedata['username'] = $userdata['newusername']; |
|
| 73 | - $usernamedata['oldusername'] = $_POST['oldusername']; |
|
| 74 | - $usersettings = array_merge($usersettings, $userdata); |
|
| 75 | - $usersettings['allowed_days'] = is_array($_POST['allowed_days']) ? implode(",", $_POST['allowed_days']) : "";
|
|
| 76 | - extract($usersettings, EXTR_OVERWRITE); |
|
| 68 | + $modx->manager->loadFormValues(); |
|
| 69 | + // restore post values |
|
| 70 | + $userdata = array_merge($userdata, $_POST); |
|
| 71 | + $userdata['dob'] = $modx->toTimeStamp($userdata['dob']); |
|
| 72 | + $usernamedata['username'] = $userdata['newusername']; |
|
| 73 | + $usernamedata['oldusername'] = $_POST['oldusername']; |
|
| 74 | + $usersettings = array_merge($usersettings, $userdata); |
|
| 75 | + $usersettings['allowed_days'] = is_array($_POST['allowed_days']) ? implode(",", $_POST['allowed_days']) : "";
|
|
| 76 | + extract($usersettings, EXTR_OVERWRITE); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // include the country list language file |
| 80 | 80 | $_country_lang = array(); |
| 81 | 81 | if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
|
| 82 | - include_once "lang/country/" . $manager_language . "_country.inc.php"; |
|
| 82 | + include_once "lang/country/" . $manager_language . "_country.inc.php"; |
|
| 83 | 83 | } else {
|
| 84 | - include_once "lang/country/english_country.inc.php"; |
|
| 84 | + include_once "lang/country/english_country.inc.php"; |
|
| 85 | 85 | } |
| 86 | 86 | asort($_country_lang); |
| 87 | 87 | |
@@ -189,12 +189,12 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | <form action="index.php?a=89" method="post" name="userform"> |
| 191 | 191 | <?php |
| 192 | - // invoke OnWUsrFormPrerender event |
|
| 193 | - $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
|
|
| 194 | - if(is_array($evtOut)) {
|
|
| 195 | - echo implode("", $evtOut);
|
|
| 196 | - } |
|
| 197 | - ?> |
|
| 192 | + // invoke OnWUsrFormPrerender event |
|
| 193 | + $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
|
|
| 194 | + if(is_array($evtOut)) {
|
|
| 195 | + echo implode("", $evtOut);
|
|
| 196 | + } |
|
| 197 | + ?> |
|
| 198 | 198 | <input type="hidden" name="mode" value="<?php echo $modx->manager->action; ?>" /> |
| 199 | 199 | <input type="hidden" name="id" value="<?php echo $user ?>" /> |
| 200 | 200 | <input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" /> |
@@ -324,10 +324,10 @@ discard block |
||
| 324 | 324 | <?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?> |
| 325 | 325 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
| 326 | 326 | <?php |
| 327 | - foreach($_country_lang as $key => $country) {
|
|
| 328 | - echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
|
| 329 | - } |
|
| 330 | - ?> |
|
| 327 | + foreach($_country_lang as $key => $country) {
|
|
| 328 | + echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
|
| 329 | + } |
|
| 330 | + ?> |
|
| 331 | 331 | </select></td> |
| 332 | 332 | </tr> |
| 333 | 333 | <tr> |
@@ -387,8 +387,8 @@ discard block |
||
| 387 | 387 | <i onClick="document.userform.blockedafter.value=''; return true;" class="clearDate <?php echo $_style["actions_calendar_delete"] ?>" data-tooltip="<?php echo $_lang['remove_date']; ?>"></i></td> |
| 388 | 388 | </tr> |
| 389 | 389 | <?php |
| 390 | - } |
|
| 391 | - ?> |
|
| 390 | + } |
|
| 391 | + ?> |
|
| 392 | 392 | </table> |
| 393 | 393 | </div> |
| 394 | 394 | |
@@ -496,40 +496,40 @@ discard block |
||
| 496 | 496 | </table> |
| 497 | 497 | </div> |
| 498 | 498 | <?php |
| 499 | - if($use_udperms == 1) {
|
|
| 500 | - |
|
| 501 | - $groupsarray = array(); |
|
| 502 | - |
|
| 503 | - if($modx->manager->action == '88') { // only do this bit if the user is being edited
|
|
| 504 | - $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
|
|
| 505 | - $groupsarray = $modx->db->getColumn('webgroup', $rs);
|
|
| 506 | - } |
|
| 507 | - // retain selected user groups between post |
|
| 508 | - if(is_array($_POST['user_groups'])) {
|
|
| 509 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 510 | - } |
|
| 511 | - ?> |
|
| 499 | + if($use_udperms == 1) {
|
|
| 500 | + |
|
| 501 | + $groupsarray = array(); |
|
| 502 | + |
|
| 503 | + if($modx->manager->action == '88') { // only do this bit if the user is being edited
|
|
| 504 | + $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
|
|
| 505 | + $groupsarray = $modx->db->getColumn('webgroup', $rs);
|
|
| 506 | + } |
|
| 507 | + // retain selected user groups between post |
|
| 508 | + if(is_array($_POST['user_groups'])) {
|
|
| 509 | + foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 510 | + } |
|
| 511 | + ?> |
|
| 512 | 512 | <div class="tab-page" id="tabPermissions"> |
| 513 | 513 | <h2 class="tab"><?php echo $_lang['web_access_permissions'] ?></h2> |
| 514 | 514 | <script type="text/javascript">tpUser.addTabPage(document.getElementById("tabPermissions"));</script>
|
| 515 | 515 | <p><?php echo $_lang['access_permissions_user_message'] ?></p> |
| 516 | 516 | <?php |
| 517 | - $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
|
|
| 518 | - while($row = $modx->db->getRow($rs)) {
|
|
| 519 | - echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
|
| 520 | - } |
|
| 521 | - } |
|
| 522 | - ?> |
|
| 517 | + $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
|
|
| 518 | + while($row = $modx->db->getRow($rs)) {
|
|
| 519 | + echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
|
| 520 | + } |
|
| 521 | + } |
|
| 522 | + ?> |
|
| 523 | 523 | </div> |
| 524 | 524 | <?php |
| 525 | - // invoke OnWUsrFormRender event |
|
| 526 | - $evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
|
|
| 527 | - "id" => $user |
|
| 528 | - )); |
|
| 529 | - if(is_array($evtOut)) {
|
|
| 530 | - echo implode("", $evtOut);
|
|
| 531 | - } |
|
| 532 | - ?> |
|
| 525 | + // invoke OnWUsrFormRender event |
|
| 526 | + $evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
|
|
| 527 | + "id" => $user |
|
| 528 | + )); |
|
| 529 | + if(is_array($evtOut)) {
|
|
| 530 | + echo implode("", $evtOut);
|
|
| 531 | + } |
|
| 532 | + ?> |
|
| 533 | 533 | </div> |
| 534 | 534 | </div> |
| 535 | 535 | <input type="submit" name="save" style="display:none"> |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -switch($modx->manager->action) {
|
|
| 6 | +switch ($modx->manager->action) {
|
|
| 7 | 7 | case 88: |
| 8 | - if(!$modx->hasPermission('edit_web_user')) {
|
|
| 8 | + if (!$modx->hasPermission('edit_web_user')) {
|
|
| 9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 10 | 10 | } |
| 11 | 11 | break; |
| 12 | 12 | case 87: |
| 13 | - if(!$modx->hasPermission('new_web_user')) {
|
|
| 13 | + if (!$modx->hasPermission('new_web_user')) {
|
|
| 14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | 15 | } |
| 16 | 16 | break; |
@@ -22,30 +22,30 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | // check to see the snippet editor isn't locked |
| 25 | -$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
|
|
| 26 | -if($username = $modx->db->getValue($rs)) {
|
|
| 25 | +$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='".$modx->getLoginUserID()."'");
|
|
| 26 | +if ($username = $modx->db->getValue($rs)) {
|
|
| 27 | 27 | $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
| 30 | 30 | |
| 31 | -if($modx->manager->action == '88') {
|
|
| 31 | +if ($modx->manager->action == '88') {
|
|
| 32 | 32 | // get user attributes |
| 33 | 33 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
|
| 34 | 34 | $userdata = $modx->db->getRow($rs); |
| 35 | - if(!$userdata) {
|
|
| 35 | + if (!$userdata) {
|
|
| 36 | 36 | $modx->webAlertAndQuit("No user returned!");
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // get user settings |
| 40 | 40 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
|
| 41 | 41 | $usersettings = array(); |
| 42 | - while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 42 | + while ($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 43 | 43 | extract($usersettings, EXTR_OVERWRITE); |
| 44 | 44 | |
| 45 | 45 | // get user name |
| 46 | 46 | $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
|
| 47 | 47 | $usernamedata = $modx->db->getRow($rs); |
| 48 | - if(!$usernamedata) {
|
|
| 48 | + if (!$usernamedata) {
|
|
| 49 | 49 | $modx->webAlertAndQuit("No user returned while getting username!");
|
| 50 | 50 | } |
| 51 | 51 | $_SESSION['itemname'] = $usernamedata['username']; |
@@ -57,14 +57,14 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // avoid doubling htmlspecialchars (already encoded in DB) |
| 60 | -foreach($userdata as $key => $val) {
|
|
| 60 | +foreach ($userdata as $key => $val) {
|
|
| 61 | 61 | $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
| 62 | 62 | }; |
| 63 | 63 | $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']); |
| 64 | 64 | |
| 65 | 65 | // restore saved form |
| 66 | 66 | $formRestored = false; |
| 67 | -if($modx->manager->hasFormValues()) {
|
|
| 67 | +if ($modx->manager->hasFormValues()) {
|
|
| 68 | 68 | $modx->manager->loadFormValues(); |
| 69 | 69 | // restore post values |
| 70 | 70 | $userdata = array_merge($userdata, $_POST); |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // include the country list language file |
| 80 | 80 | $_country_lang = array(); |
| 81 | -if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
|
|
| 82 | - include_once "lang/country/" . $manager_language . "_country.inc.php"; |
|
| 81 | +if ($manager_language != "english" && file_exists($modx->config['site_manager_path']."includes/lang/country/".$manager_language."_country.inc.php")) {
|
|
| 82 | + include_once "lang/country/".$manager_language."_country.inc.php"; |
|
| 83 | 83 | } else {
|
| 84 | 84 | include_once "lang/country/english_country.inc.php"; |
| 85 | 85 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | <?php |
| 192 | 192 | // invoke OnWUsrFormPrerender event |
| 193 | 193 | $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
|
| 194 | - if(is_array($evtOut)) {
|
|
| 194 | + if (is_array($evtOut)) {
|
|
| 195 | 195 | echo implode("", $evtOut);
|
| 196 | 196 | } |
| 197 | 197 | ?> |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | <input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" /> |
| 201 | 201 | |
| 202 | 202 | <h1> |
| 203 | - <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'] . '<small>(' . $usernamedata['id'] . ')</small>' : $_lang['web_user_title']) ?>
|
|
| 203 | + <i class="fa fa fa-users"></i><?= ($usernamedata['username'] ? $usernamedata['username'].'<small>('.$usernamedata['id'].')</small>' : $_lang['web_user_title']) ?>
|
|
| 204 | 204 | </h1> |
| 205 | 205 | |
| 206 | 206 | <?php echo $_style['actionbuttons']['dynamic']['user'] ?> |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | <table border="0" cellspacing="0" cellpadding="3" class="table table--edit table--editUser"> |
| 219 | 219 | <tr> |
| 220 | 220 | <td colspan="3"><span id="blocked" class="warning"> |
| 221 | - <?php if($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { ?>
|
|
| 221 | + <?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) { ?>
|
|
| 222 | 222 | <b><?php echo $_lang['user_is_blocked']; ?></b> |
| 223 | 223 | <?php } ?> |
| 224 | 224 | </span> |
| 225 | 225 | <br /></td> |
| 226 | 226 | </tr> |
| 227 | - <?php if(!empty($userdata['id'])) { ?>
|
|
| 227 | + <?php if (!empty($userdata['id'])) { ?>
|
|
| 228 | 228 | <tr id="showname" style="display: <?php echo ($modx->manager->action == '88' && (!isset($usernamedata['oldusername']) || $usernamedata['oldusername'] == $usernamedata['username'])) ? $displayStyle : 'none'; ?> "> |
| 229 | 229 | <td colspan="3"><i class="<?php echo $_style["icons_user"] ?>"></i> <b><?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?></b> - <span class="comment"><a href="javascript:;" onClick="changeName();return false;"><?php echo $_lang["change_name"]; ?></a></span> |
| 230 | 230 | <input type="hidden" name="oldusername" value="<?php echo $modx->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?>" /> |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | <td><input type="text" name="newusername" class="inputBox" value="<?php echo $modx->htmlspecialchars(isset($_POST['newusername']) ? $_POST['newusername'] : $usernamedata['username']); ?>" onChange='documentDirty=true;' maxlength="100" /></td> |
| 238 | 238 | </tr> |
| 239 | 239 | <tr> |
| 240 | - <th><?php echo $modx->manager->action == '87' ? $_lang['password'] . ":" : $_lang['change_password_new'] . ":"; ?></th> |
|
| 240 | + <th><?php echo $modx->manager->action == '87' ? $_lang['password'].":" : $_lang['change_password_new'].":"; ?></th> |
|
| 241 | 241 | <td> </td> |
| 242 | 242 | <td><input name="newpasswordcheck" type="checkbox" onClick="changestate(document.userform.newpassword);changePasswordState(document.userform.newpassword);"<?php echo $modx->manager->action == "87" ? " checked disabled" : ""; ?>> |
| 243 | 243 | <input type="hidden" name="newpassword" value="<?php echo $modx->manager->action == "87" ? 1 : 0; ?>" onChange="documentDirty=true;" /> |
@@ -324,8 +324,8 @@ discard block |
||
| 324 | 324 | <?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?> |
| 325 | 325 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
| 326 | 326 | <?php |
| 327 | - foreach($_country_lang as $key => $country) {
|
|
| 328 | - echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
|
| 327 | + foreach ($_country_lang as $key => $country) {
|
|
| 328 | + echo "<option value=\"$key\"".(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').">$country</option>"; |
|
| 329 | 329 | } |
| 330 | 330 | ?> |
| 331 | 331 | </select></td> |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | <td> </td> |
| 352 | 352 | <td><textarea type="text" name="comment" class="inputBox" rows="5" onChange="documentDirty=true;"><?php echo $modx->htmlspecialchars(isset($_POST['comment']) ? $_POST['comment'] : $userdata['comment']); ?></textarea></td> |
| 353 | 353 | </tr> |
| 354 | - <?php if($modx->manager->action == '88') { ?>
|
|
| 354 | + <?php if ($modx->manager->action == '88') { ?>
|
|
| 355 | 355 | <tr> |
| 356 | 356 | <th><?php echo $_lang['user_logincount']; ?>:</th> |
| 357 | 357 | <td> </td> |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | function BrowseServer() {
|
| 473 | 473 | var w = screen.width * 0.7; |
| 474 | 474 | var h = screen.height * 0.7; |
| 475 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL;?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h);
|
|
| 475 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h);
|
|
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | function SetUrl(url, width, height, alt) {
|
@@ -491,22 +491,22 @@ discard block |
||
| 491 | 491 | <td class='comment'><?php echo $_lang["user_photo_message"] ?></td> |
| 492 | 492 | </tr> |
| 493 | 493 | <tr> |
| 494 | - <td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "") . $_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "") . $userdata['photo'] : $_style["tx"]; ?>" /></td> |
|
| 494 | + <td colspan="2" align="center"><img name="iphoto" src="<?php echo isset($_POST['photo']) ? (strpos($_POST['photo'], "http://") === false ? MODX_SITE_URL : "").$_POST['photo'] : !empty($userdata['photo']) ? (strpos($userdata['photo'], "http://") === false ? MODX_SITE_URL : "").$userdata['photo'] : $_style["tx"]; ?>" /></td> |
|
| 495 | 495 | </tr> |
| 496 | 496 | </table> |
| 497 | 497 | </div> |
| 498 | 498 | <?php |
| 499 | - if($use_udperms == 1) {
|
|
| 499 | + if ($use_udperms == 1) {
|
|
| 500 | 500 | |
| 501 | 501 | $groupsarray = array(); |
| 502 | 502 | |
| 503 | - if($modx->manager->action == '88') { // only do this bit if the user is being edited
|
|
| 503 | + if ($modx->manager->action == '88') { // only do this bit if the user is being edited
|
|
| 504 | 504 | $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
|
| 505 | 505 | $groupsarray = $modx->db->getColumn('webgroup', $rs);
|
| 506 | 506 | } |
| 507 | 507 | // retain selected user groups between post |
| 508 | - if(is_array($_POST['user_groups'])) {
|
|
| 509 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 508 | + if (is_array($_POST['user_groups'])) {
|
|
| 509 | + foreach ($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 510 | 510 | } |
| 511 | 511 | ?> |
| 512 | 512 | <div class="tab-page" id="tabPermissions"> |
@@ -515,8 +515,8 @@ discard block |
||
| 515 | 515 | <p><?php echo $_lang['access_permissions_user_message'] ?></p> |
| 516 | 516 | <?php |
| 517 | 517 | $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
|
| 518 | - while($row = $modx->db->getRow($rs)) {
|
|
| 519 | - echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
|
| 518 | + while ($row = $modx->db->getRow($rs)) {
|
|
| 519 | + echo '<label><input type="checkbox" name="user_groups[]" value="'.$row['id'].'"'.(in_array($row['id'], $groupsarray) ? ' checked="checked"' : '').' />'.$row['name'].'</label><br />'; |
|
| 520 | 520 | } |
| 521 | 521 | } |
| 522 | 522 | ?> |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | $evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
|
| 527 | 527 | "id" => $user |
| 528 | 528 | )); |
| 529 | - if(is_array($evtOut)) {
|
|
| 529 | + if (is_array($evtOut)) {
|
|
| 530 | 530 | echo implode("", $evtOut);
|
| 531 | 531 | } |
| 532 | 532 | ?> |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -switch($modx->manager->action) {
|
|
| 6 | +switch($modx->manager->action) { |
|
| 7 | 7 | case 88: |
| 8 | - if(!$modx->hasPermission('edit_web_user')) {
|
|
| 8 | + if(!$modx->hasPermission('edit_web_user')) { |
|
| 9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 10 | 10 | } |
| 11 | 11 | break; |
| 12 | 12 | case 87: |
| 13 | - if(!$modx->hasPermission('new_web_user')) {
|
|
| 13 | + if(!$modx->hasPermission('new_web_user')) { |
|
| 14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | 15 | } |
| 16 | 16 | break; |
@@ -23,33 +23,35 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | // check to see the snippet editor isn't locked |
| 25 | 25 | $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=88 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'");
|
| 26 | -if($username = $modx->db->getValue($rs)) {
|
|
| 26 | +if($username = $modx->db->getValue($rs)) { |
|
| 27 | 27 | $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "web user")); |
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
| 30 | 30 | |
| 31 | -if($modx->manager->action == '88') {
|
|
| 31 | +if($modx->manager->action == '88') { |
|
| 32 | 32 | // get user attributes |
| 33 | 33 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_attributes'), "internalKey = '{$user}'");
|
| 34 | 34 | $userdata = $modx->db->getRow($rs); |
| 35 | - if(!$userdata) {
|
|
| 35 | + if(!$userdata) { |
|
| 36 | 36 | $modx->webAlertAndQuit("No user returned!");
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // get user settings |
| 40 | 40 | $rs = $modx->db->select('*', $modx->getFullTableName('web_user_settings'), "webuser = '{$user}'");
|
| 41 | 41 | $usersettings = array(); |
| 42 | - while($row = $modx->db->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 42 | + while($row = $modx->db->getRow($rs)) { |
|
| 43 | + $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 44 | + } |
|
| 43 | 45 | extract($usersettings, EXTR_OVERWRITE); |
| 44 | 46 | |
| 45 | 47 | // get user name |
| 46 | 48 | $rs = $modx->db->select('*', $modx->getFullTableName('web_users'), "id = '{$user}'");
|
| 47 | 49 | $usernamedata = $modx->db->getRow($rs); |
| 48 | - if(!$usernamedata) {
|
|
| 50 | + if(!$usernamedata) { |
|
| 49 | 51 | $modx->webAlertAndQuit("No user returned while getting username!");
|
| 50 | 52 | } |
| 51 | 53 | $_SESSION['itemname'] = $usernamedata['username']; |
| 52 | -} else {
|
|
| 54 | +} else { |
|
| 53 | 55 | $userdata = array(); |
| 54 | 56 | $usersettings = array(); |
| 55 | 57 | $usernamedata = array(); |
@@ -57,14 +59,14 @@ discard block |
||
| 57 | 59 | } |
| 58 | 60 | |
| 59 | 61 | // avoid doubling htmlspecialchars (already encoded in DB) |
| 60 | -foreach($userdata as $key => $val) {
|
|
| 62 | +foreach($userdata as $key => $val) { |
|
| 61 | 63 | $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
| 62 | 64 | }; |
| 63 | 65 | $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']); |
| 64 | 66 | |
| 65 | 67 | // restore saved form |
| 66 | 68 | $formRestored = false; |
| 67 | -if($modx->manager->hasFormValues()) {
|
|
| 69 | +if($modx->manager->hasFormValues()) { |
|
| 68 | 70 | $modx->manager->loadFormValues(); |
| 69 | 71 | // restore post values |
| 70 | 72 | $userdata = array_merge($userdata, $_POST); |
@@ -78,9 +80,9 @@ discard block |
||
| 78 | 80 | |
| 79 | 81 | // include the country list language file |
| 80 | 82 | $_country_lang = array(); |
| 81 | -if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) {
|
|
| 83 | +if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) { |
|
| 82 | 84 | include_once "lang/country/" . $manager_language . "_country.inc.php"; |
| 83 | -} else {
|
|
| 85 | +} else { |
|
| 84 | 86 | include_once "lang/country/english_country.inc.php"; |
| 85 | 87 | } |
| 86 | 88 | asort($_country_lang); |
@@ -191,7 +193,7 @@ discard block |
||
| 191 | 193 | <?php |
| 192 | 194 | // invoke OnWUsrFormPrerender event |
| 193 | 195 | $evtOut = $modx->invokeEvent("OnWUsrFormPrerender", array("id" => $user));
|
| 194 | - if(is_array($evtOut)) {
|
|
| 196 | + if(is_array($evtOut)) { |
|
| 195 | 197 | echo implode("", $evtOut);
|
| 196 | 198 | } |
| 197 | 199 | ?> |
@@ -324,7 +326,7 @@ discard block |
||
| 324 | 326 | <?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?> |
| 325 | 327 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
| 326 | 328 | <?php |
| 327 | - foreach($_country_lang as $key => $country) {
|
|
| 329 | + foreach($_country_lang as $key => $country) { |
|
| 328 | 330 | echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
| 329 | 331 | } |
| 330 | 332 | ?> |
@@ -496,17 +498,20 @@ discard block |
||
| 496 | 498 | </table> |
| 497 | 499 | </div> |
| 498 | 500 | <?php |
| 499 | - if($use_udperms == 1) {
|
|
| 501 | + if($use_udperms == 1) { |
|
| 500 | 502 | |
| 501 | 503 | $groupsarray = array(); |
| 502 | 504 | |
| 503 | - if($modx->manager->action == '88') { // only do this bit if the user is being edited
|
|
| 505 | + if($modx->manager->action == '88') { |
|
| 506 | +// only do this bit if the user is being edited |
|
| 504 | 507 | $rs = $modx->db->select('webgroup', $modx->getFullTableName('web_groups'), "webuser='{$user}'");
|
| 505 | 508 | $groupsarray = $modx->db->getColumn('webgroup', $rs);
|
| 506 | 509 | } |
| 507 | 510 | // retain selected user groups between post |
| 508 | - if(is_array($_POST['user_groups'])) {
|
|
| 509 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 511 | + if(is_array($_POST['user_groups'])) { |
|
| 512 | + foreach($_POST['user_groups'] as $n => $v) { |
|
| 513 | + $groupsarray[] = $v; |
|
| 514 | + } |
|
| 510 | 515 | } |
| 511 | 516 | ?> |
| 512 | 517 | <div class="tab-page" id="tabPermissions"> |
@@ -515,7 +520,7 @@ discard block |
||
| 515 | 520 | <p><?php echo $_lang['access_permissions_user_message'] ?></p> |
| 516 | 521 | <?php |
| 517 | 522 | $rs = $modx->db->select('name, id', $modx->getFullTableName('webgroup_names'), '', 'name');
|
| 518 | - while($row = $modx->db->getRow($rs)) {
|
|
| 523 | + while($row = $modx->db->getRow($rs)) { |
|
| 519 | 524 | echo '<label><input type="checkbox" name="user_groups[]" value="' . $row['id'] . '"' . (in_array($row['id'], $groupsarray) ? ' checked="checked"' : '') . ' />' . $row['name'] . '</label><br />'; |
| 520 | 525 | } |
| 521 | 526 | } |
@@ -526,7 +531,7 @@ discard block |
||
| 526 | 531 | $evtOut = $modx->invokeEvent("OnWUsrFormRender", array(
|
| 527 | 532 | "id" => $user |
| 528 | 533 | )); |
| 529 | - if(is_array($evtOut)) {
|
|
| 534 | + if(is_array($evtOut)) { |
|
| 530 | 535 | echo implode("", $evtOut);
|
| 531 | 536 | } |
| 532 | 537 | ?> |
@@ -28,7 +28,9 @@ discard block |
||
| 28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
| 29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
| 30 | 30 | ); |
| 31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 31 | +foreach($unlockTranslations as $key => $value) { |
|
| 32 | + $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 33 | +} |
|
| 32 | 34 | |
| 33 | 35 | // Prepare lang-strings for mgrResAction() |
| 34 | 36 | $mraTranslations = array( |
@@ -44,7 +46,9 @@ discard block |
||
| 44 | 46 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
| 45 | 47 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
| 46 | 48 | ); |
| 47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 49 | +foreach($mraTranslations as $key => $value) { |
|
| 50 | + $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 51 | +} |
|
| 48 | 52 | ?> |
| 49 | 53 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
| 50 | 54 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -1,48 +1,48 @@ 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 | |
| 6 | 6 | if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
| 7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
| 7 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
| 8 | 8 | } else { |
| 9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
| 9 | + include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
| 10 | 10 | } |
| 11 | 11 | if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
| 12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
| 12 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
| 13 | 13 | } else { |
| 14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
| 14 | + include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $resources = new mgrResources(); |
| 18 | 18 | |
| 19 | 19 | // Prepare lang-strings for "Lock Elements" |
| 20 | 20 | $unlockTranslations = array( |
| 21 | - 'msg' => $_lang["unlock_element_id_warning"], |
|
| 22 | - 'type1' => $_lang["lock_element_type_1"], |
|
| 23 | - 'type2' => $_lang["lock_element_type_2"], |
|
| 24 | - 'type3' => $_lang["lock_element_type_3"], |
|
| 25 | - 'type4' => $_lang["lock_element_type_4"], |
|
| 26 | - 'type5' => $_lang["lock_element_type_5"], |
|
| 27 | - 'type6' => $_lang["lock_element_type_6"], |
|
| 28 | - 'type7' => $_lang["lock_element_type_7"], |
|
| 29 | - 'type8' => $_lang["lock_element_type_8"] |
|
| 21 | + 'msg' => $_lang["unlock_element_id_warning"], |
|
| 22 | + 'type1' => $_lang["lock_element_type_1"], |
|
| 23 | + 'type2' => $_lang["lock_element_type_2"], |
|
| 24 | + 'type3' => $_lang["lock_element_type_3"], |
|
| 25 | + 'type4' => $_lang["lock_element_type_4"], |
|
| 26 | + 'type5' => $_lang["lock_element_type_5"], |
|
| 27 | + 'type6' => $_lang["lock_element_type_6"], |
|
| 28 | + 'type7' => $_lang["lock_element_type_7"], |
|
| 29 | + 'type8' => $_lang["lock_element_type_8"] |
|
| 30 | 30 | ); |
| 31 | 31 | foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
| 32 | 32 | |
| 33 | 33 | // Prepare lang-strings for mgrResAction() |
| 34 | 34 | $mraTranslations = array( |
| 35 | - 'create_new' => $_lang["create_new"], |
|
| 36 | - 'edit' => $_lang["edit"], |
|
| 37 | - 'duplicate' => $_lang["duplicate"], |
|
| 38 | - 'remove' => $_lang["remove"], |
|
| 39 | - 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], |
|
| 40 | - 'confirm_delete_template' => $_lang["confirm_delete_template"], |
|
| 41 | - 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], |
|
| 42 | - 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], |
|
| 43 | - 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], |
|
| 44 | - 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
|
| 45 | - 'confirm_delete_module' => $_lang["confirm_delete_module"], |
|
| 35 | + 'create_new' => $_lang["create_new"], |
|
| 36 | + 'edit' => $_lang["edit"], |
|
| 37 | + 'duplicate' => $_lang["duplicate"], |
|
| 38 | + 'remove' => $_lang["remove"], |
|
| 39 | + 'confirm_duplicate_record' => $_lang["confirm_duplicate_record"], |
|
| 40 | + 'confirm_delete_template' => $_lang["confirm_delete_template"], |
|
| 41 | + 'confirm_delete_tmplvars' => $_lang["confirm_delete_tmplvars"], |
|
| 42 | + 'confirm_delete_htmlsnippet' => $_lang["confirm_delete_htmlsnippet"], |
|
| 43 | + 'confirm_delete_snippet' => $_lang["confirm_delete_htmlsnippet"], |
|
| 44 | + 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
|
| 45 | + 'confirm_delete_module' => $_lang["confirm_delete_module"], |
|
| 46 | 46 | ); |
| 47 | 47 | foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
| 48 | 48 | ?> |
@@ -65,46 +65,46 @@ discard block |
||
| 65 | 65 | </script> |
| 66 | 66 | |
| 67 | 67 | <?php |
| 68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
| 70 | - } else { |
|
| 71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
| 72 | - } |
|
| 68 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
| 70 | + } else { |
|
| 71 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
| 72 | + } |
|
| 73 | 73 | |
| 74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 76 | - } else { |
|
| 77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 78 | - } |
|
| 74 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 76 | + } else { |
|
| 77 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
| 82 | - } else { |
|
| 83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
| 84 | - } |
|
| 80 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
| 82 | + } else { |
|
| 83 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
| 88 | - } else { |
|
| 89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
| 90 | - } |
|
| 86 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
| 88 | + } else { |
|
| 89 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
| 94 | - } else { |
|
| 95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
| 96 | - } |
|
| 92 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
| 94 | + } else { |
|
| 95 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 100 | - } else { |
|
| 101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 102 | - } |
|
| 98 | + if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | + include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 100 | + } else { |
|
| 101 | + include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 102 | + } |
|
| 103 | 103 | |
| 104 | 104 | |
| 105 | - if(is_numeric($_GET['tab'])) { |
|
| 106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 107 | - } |
|
| 108 | - ?> |
|
| 105 | + if(is_numeric($_GET['tab'])) { |
|
| 106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 107 | + } |
|
| 108 | + ?> |
|
| 109 | 109 | </div> |
| 110 | 110 | </div> |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
|
| 7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
| 6 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) { |
|
| 7 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php'); |
|
| 8 | 8 | } else { |
| 9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
| 9 | + include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php'); |
|
| 10 | 10 | } |
| 11 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
|
| 12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
| 11 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) { |
|
| 12 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php'); |
|
| 13 | 13 | } else { |
| 14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
| 14 | + include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $resources = new mgrResources(); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
| 29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
| 30 | 30 | ); |
| 31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 31 | +foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 32 | 32 | |
| 33 | 33 | // Prepare lang-strings for mgrResAction() |
| 34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
| 45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
| 46 | 46 | ); |
| 47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 48 | 48 | ?> |
| 49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
| 50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ discard block |
||
| 65 | 65 | </script> |
| 66 | 66 | |
| 67 | 67 | <?php |
| 68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
| 68 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php'); |
|
| 70 | 70 | } else { |
| 71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
| 71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 74 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php'); |
|
| 76 | 76 | } else { |
| 77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
| 80 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php'); |
|
| 82 | 82 | } else { |
| 83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
| 83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
| 86 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php'); |
|
| 88 | 88 | } else { |
| 89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
| 89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
| 92 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php'); |
|
| 94 | 94 | } else { |
| 95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
| 95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 98 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php'); |
|
| 100 | 100 | } else { |
| 101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | |
| 105 | - if(is_numeric($_GET['tab'])) { |
|
| 106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 105 | + if (is_numeric($_GET['tab'])) { |
|
| 106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
| 107 | 107 | } |
| 108 | 108 | ?> |
| 109 | 109 | </div> |
@@ -3,18 +3,18 @@ |
||
| 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 | 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']) ? intval($_REQUEST['id']) : 0; |
| 20 | 20 | // Get table names (alphabetical) |
@@ -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']) ? intval($_REQUEST['id']) : 0; |
| 20 | 20 | // Get table names (alphabetical) |
@@ -30,16 +30,16 @@ discard block |
||
| 30 | 30 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
|
| 31 | 31 | // create globally unique identifiers (guid) |
| 32 | 32 | function createGUID() {
|
| 33 | - srand((double) microtime() * 1000000); |
|
| 34 | - $r = rand(); |
|
| 35 | - $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
| 36 | - $m = md5($u); |
|
| 37 | - return $m; |
|
| 33 | + srand((double) microtime() * 1000000); |
|
| 34 | + $r = rand(); |
|
| 35 | + $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
| 36 | + $m = md5($u); |
|
| 37 | + return $m; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // check to see the module editor isn't locked |
| 41 | 41 | if($lockedEl = $modx->elementIsLocked(6, $id)) {
|
| 42 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
| 42 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
| 43 | 43 | } |
| 44 | 44 | // end check for lock |
| 45 | 45 | |
@@ -47,22 +47,22 @@ discard block |
||
| 47 | 47 | $modx->lockElement(6, $id); |
| 48 | 48 | |
| 49 | 49 | if(isset($_GET['id'])) {
|
| 50 | - $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
|
|
| 51 | - $content = $modx->db->getRow($rs); |
|
| 52 | - if(!$content) {
|
|
| 53 | - $modx->webAlertAndQuit("Module not found for id '{$id}'.");
|
|
| 54 | - } |
|
| 55 | - $content['properties'] = str_replace("&", "&", $content['properties']);
|
|
| 56 | - $_SESSION['itemname'] = $content['name']; |
|
| 57 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
|
|
| 58 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 59 | - } |
|
| 50 | + $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
|
|
| 51 | + $content = $modx->db->getRow($rs); |
|
| 52 | + if(!$content) {
|
|
| 53 | + $modx->webAlertAndQuit("Module not found for id '{$id}'.");
|
|
| 54 | + } |
|
| 55 | + $content['properties'] = str_replace("&", "&", $content['properties']);
|
|
| 56 | + $_SESSION['itemname'] = $content['name']; |
|
| 57 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
|
|
| 58 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 59 | + } |
|
| 60 | 60 | } else {
|
| 61 | - $_SESSION['itemname'] = $_lang["new_module"]; |
|
| 62 | - $content['wrap'] = '1'; |
|
| 61 | + $_SESSION['itemname'] = $_lang["new_module"]; |
|
| 62 | + $content['wrap'] = '1'; |
|
| 63 | 63 | } |
| 64 | 64 | if($modx->manager->hasFormValues()) {
|
| 65 | - $modx->manager->loadFormValues(); |
|
| 65 | + $modx->manager->loadFormValues(); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // Add lock-element JS-Script |
@@ -433,18 +433,18 @@ discard block |
||
| 433 | 433 | |
| 434 | 434 | <form name="mutate" id="mutate" class="module" method="post" action="index.php?a=109"> |
| 435 | 435 | <?php |
| 436 | - // invoke OnModFormPrerender event |
|
| 437 | - $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
|
|
| 438 | - if(is_array($evtOut)) {
|
|
| 439 | - echo implode('', $evtOut);
|
|
| 440 | - } |
|
| 441 | - |
|
| 442 | - // Prepare internal params & info-tab via parseDocBlock |
|
| 443 | - $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
| 444 | - $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
| 445 | - $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
| 446 | - $internal = array(); |
|
| 447 | - ?> |
|
| 436 | + // invoke OnModFormPrerender event |
|
| 437 | + $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
|
|
| 438 | + if(is_array($evtOut)) {
|
|
| 439 | + echo implode('', $evtOut);
|
|
| 440 | + } |
|
| 441 | + |
|
| 442 | + // Prepare internal params & info-tab via parseDocBlock |
|
| 443 | + $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
| 444 | + $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
| 445 | + $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
| 446 | + $internal = array(); |
|
| 447 | + ?> |
|
| 448 | 448 | <input type="hidden" name="id" value="<?= $content['id'] ?>"> |
| 449 | 449 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
| 450 | 450 | |
@@ -497,11 +497,11 @@ discard block |
||
| 497 | 497 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 498 | 498 | <option> </option> |
| 499 | 499 | <?php |
| 500 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 501 | - foreach(getCategories() as $n => $v) {
|
|
| 502 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
| 503 | - } |
|
| 504 | - ?> |
|
| 500 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 501 | + foreach(getCategories() as $n => $v) {
|
|
| 502 | + echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
| 503 | + } |
|
| 504 | + ?> |
|
| 505 | 505 | </select> |
| 506 | 506 | </div> |
| 507 | 507 | </div> |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | <i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang['manage_depends'] ?></a> |
| 609 | 609 | </div> |
| 610 | 610 | <?php |
| 611 | - $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name,
|
|
| 611 | + $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name,
|
|
| 612 | 612 | CASE smd.type |
| 613 | 613 | WHEN 10 THEN 'Chunk' |
| 614 | 614 | WHEN 20 THEN 'Document' |
@@ -624,17 +624,17 @@ discard block |
||
| 624 | 624 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50
|
| 625 | 625 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name');
|
| 626 | 626 | |
| 627 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 628 | - $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
|
|
| 629 | - $grd->noRecordMsg = $_lang['no_records_found']; |
|
| 630 | - $grd->cssClass = 'grid'; |
|
| 631 | - $grd->columnHeaderClass = 'gridHeader'; |
|
| 632 | - $grd->itemClass = 'gridItem'; |
|
| 633 | - $grd->altItemClass = 'gridAltItem'; |
|
| 634 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
| 635 | - $grd->fields = "name,type"; |
|
| 636 | - echo $grd->render(); |
|
| 637 | - ?> |
|
| 627 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 628 | + $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
|
|
| 629 | + $grd->noRecordMsg = $_lang['no_records_found']; |
|
| 630 | + $grd->cssClass = 'grid'; |
|
| 631 | + $grd->columnHeaderClass = 'gridHeader'; |
|
| 632 | + $grd->itemClass = 'gridItem'; |
|
| 633 | + $grd->altItemClass = 'gridAltItem'; |
|
| 634 | + $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
| 635 | + $grd->fields = "name,type"; |
|
| 636 | + echo $grd->render(); |
|
| 637 | + ?> |
|
| 638 | 638 | </div> |
| 639 | 639 | </div> |
| 640 | 640 | <?php endif; ?> |
@@ -646,12 +646,12 @@ discard block |
||
| 646 | 646 | <div class="container container-body"> |
| 647 | 647 | <?php if($use_udperms == 1) : ?> |
| 648 | 648 | <?php |
| 649 | - // fetch user access permissions for the module |
|
| 650 | - $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
|
|
| 651 | - $groupsarray = $modx->db->getColumn('usergroup', $rs);
|
|
| 649 | + // fetch user access permissions for the module |
|
| 650 | + $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
|
|
| 651 | + $groupsarray = $modx->db->getColumn('usergroup', $rs);
|
|
| 652 | 652 | |
| 653 | - if($modx->hasPermission('access_permissions')) {
|
|
| 654 | - ?> |
|
| 653 | + if($modx->hasPermission('access_permissions')) {
|
|
| 654 | + ?> |
|
| 655 | 655 | <!-- User Group Access Permissions --> |
| 656 | 656 | <script type="text/javascript"> |
| 657 | 657 | function makePublic(b) {
|
@@ -675,28 +675,28 @@ discard block |
||
| 675 | 675 | </script> |
| 676 | 676 | <p><?= $_lang['module_group_access_msg'] ?></p> |
| 677 | 677 | <?php |
| 678 | - } |
|
| 679 | - $chk = ''; |
|
| 680 | - $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
|
|
| 681 | - while($row = $modx->db->getRow($rs)) {
|
|
| 682 | - $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
| 683 | - $checked = in_array($row['id'], $groupsarray); |
|
| 684 | - if($modx->hasPermission('access_permissions')) {
|
|
| 685 | - if($checked) {
|
|
| 686 | - $notPublic = true; |
|
| 687 | - } |
|
| 688 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
| 689 | - } else {
|
|
| 690 | - if($checked) {
|
|
| 691 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
| 692 | - } |
|
| 693 | - } |
|
| 694 | - } |
|
| 695 | - if($modx->hasPermission('access_permissions')) {
|
|
| 696 | - $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; |
|
| 697 | - } |
|
| 698 | - echo $chks; |
|
| 699 | - ?> |
|
| 678 | + } |
|
| 679 | + $chk = ''; |
|
| 680 | + $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
|
|
| 681 | + while($row = $modx->db->getRow($rs)) {
|
|
| 682 | + $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
| 683 | + $checked = in_array($row['id'], $groupsarray); |
|
| 684 | + if($modx->hasPermission('access_permissions')) {
|
|
| 685 | + if($checked) {
|
|
| 686 | + $notPublic = true; |
|
| 687 | + } |
|
| 688 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
| 689 | + } else {
|
|
| 690 | + if($checked) {
|
|
| 691 | + $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
| 692 | + } |
|
| 693 | + } |
|
| 694 | + } |
|
| 695 | + if($modx->hasPermission('access_permissions')) {
|
|
| 696 | + $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; |
|
| 697 | + } |
|
| 698 | + echo $chks; |
|
| 699 | + ?> |
|
| 700 | 700 | <?php endif; ?> |
| 701 | 701 | </div> |
| 702 | 702 | </div> |
@@ -712,11 +712,11 @@ discard block |
||
| 712 | 712 | |
| 713 | 713 | <input type="submit" name="save" style="display:none;"> |
| 714 | 714 | <?php |
| 715 | - // invoke OnModFormRender event |
|
| 716 | - $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
|
|
| 717 | - if(is_array($evtOut)) {
|
|
| 718 | - echo implode('', $evtOut);
|
|
| 719 | - } |
|
| 720 | - ?> |
|
| 715 | + // invoke OnModFormRender event |
|
| 716 | + $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
|
|
| 717 | + if(is_array($evtOut)) {
|
|
| 718 | + echo implode('', $evtOut);
|
|
| 719 | + } |
|
| 720 | + ?> |
|
| 721 | 721 | </form> |
| 722 | 722 | <script type="text/javascript">setTimeout('showParameters();', 10);</script>
|
@@ -1,15 +1,15 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -switch($modx->manager->action) {
|
|
| 5 | +switch ($modx->manager->action) {
|
|
| 6 | 6 | case 107: |
| 7 | - if(!$modx->hasPermission('new_module')) {
|
|
| 7 | + if (!$modx->hasPermission('new_module')) {
|
|
| 8 | 8 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 9 | 9 | } |
| 10 | 10 | break; |
| 11 | 11 | case 108: |
| 12 | - if(!$modx->hasPermission('edit_module')) {
|
|
| 12 | + if (!$modx->hasPermission('edit_module')) {
|
|
| 13 | 13 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 14 | 14 | } |
| 15 | 15 | break; |
@@ -29,16 +29,16 @@ discard block |
||
| 29 | 29 | $tbl_site_templates = $modx->getFullTableName('site_templates');
|
| 30 | 30 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
|
| 31 | 31 | // create globally unique identifiers (guid) |
| 32 | -function createGUID() {
|
|
| 32 | +function createGUID(){
|
|
| 33 | 33 | srand((double) microtime() * 1000000); |
| 34 | 34 | $r = rand(); |
| 35 | - $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
|
| 35 | + $u = uniqid(getmypid().$r.(double) microtime() * 1000000, 1); |
|
| 36 | 36 | $m = md5($u); |
| 37 | 37 | return $m; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | // check to see the module editor isn't locked |
| 41 | -if($lockedEl = $modx->elementIsLocked(6, $id)) {
|
|
| 41 | +if ($lockedEl = $modx->elementIsLocked(6, $id)) {
|
|
| 42 | 42 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
| 43 | 43 | } |
| 44 | 44 | // end check for lock |
@@ -46,29 +46,29 @@ discard block |
||
| 46 | 46 | // Lock snippet for other users to edit |
| 47 | 47 | $modx->lockElement(6, $id); |
| 48 | 48 | |
| 49 | -if(isset($_GET['id'])) {
|
|
| 49 | +if (isset($_GET['id'])) {
|
|
| 50 | 50 | $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
|
| 51 | 51 | $content = $modx->db->getRow($rs); |
| 52 | - if(!$content) {
|
|
| 52 | + if (!$content) {
|
|
| 53 | 53 | $modx->webAlertAndQuit("Module not found for id '{$id}'.");
|
| 54 | 54 | } |
| 55 | 55 | $content['properties'] = str_replace("&", "&", $content['properties']);
|
| 56 | 56 | $_SESSION['itemname'] = $content['name']; |
| 57 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
|
|
| 57 | + if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
|
|
| 58 | 58 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 59 | 59 | } |
| 60 | 60 | } else {
|
| 61 | 61 | $_SESSION['itemname'] = $_lang["new_module"]; |
| 62 | 62 | $content['wrap'] = '1'; |
| 63 | 63 | } |
| 64 | -if($modx->manager->hasFormValues()) {
|
|
| 64 | +if ($modx->manager->hasFormValues()) {
|
|
| 65 | 65 | $modx->manager->loadFormValues(); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | // Add lock-element JS-Script |
| 69 | 69 | $lockElementId = $id; |
| 70 | 70 | $lockElementType = 6; |
| 71 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 71 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 72 | 72 | ?> |
| 73 | 73 | <script type="text/javascript"> |
| 74 | 74 | function loadDependencies() {
|
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | function BrowseServer() {
|
| 416 | 416 | var w = screen.width * 0.7; |
| 417 | 417 | var h = screen.height * 0.7; |
| 418 | - OpenServerBrowser("<?= MODX_MANAGER_URL;?>media/browser/<?= $which_browser;?>/browser.php?Type=images", w, h);
|
|
| 418 | + OpenServerBrowser("<?= MODX_MANAGER_URL; ?>media/browser/<?= $which_browser; ?>/browser.php?Type=images", w, h);
|
|
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | function SetUrl(url, width, height, alt) {
|
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | <?php |
| 436 | 436 | // invoke OnModFormPrerender event |
| 437 | 437 | $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
|
| 438 | - if(is_array($evtOut)) {
|
|
| 438 | + if (is_array($evtOut)) {
|
|
| 439 | 439 | echo implode('', $evtOut);
|
| 440 | 440 | } |
| 441 | 441 | |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
| 450 | 450 | |
| 451 | 451 | <h1> |
| 452 | - <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i>
|
|
| 452 | + <i class="<?= ($content['icon'] != '' ? $content['icon'] : $_style['icons_module']) ?>"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_module']) ?><i class="fa fa-question-circle help"></i>
|
|
| 453 | 453 | </h1> |
| 454 | 454 | |
| 455 | 455 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -474,8 +474,8 @@ discard block |
||
| 474 | 474 | <div class="col-md-9 col-lg-10"> |
| 475 | 475 | <div class="form-control-name clearfix"> |
| 476 | 476 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
| 477 | - <?php if($modx->hasPermission('save_role')): ?>
|
|
| 478 | - <label class="custom-control" title="<?= $_lang['lock_module'] . "\n" . $_lang['lock_module_msg'] ?>" tooltip> |
|
| 477 | + <?php if ($modx->hasPermission('save_role')): ?>
|
|
| 478 | + <label class="custom-control" title="<?= $_lang['lock_module']."\n".$_lang['lock_module_msg'] ?>" tooltip> |
|
| 479 | 479 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
| 480 | 480 | <i class="fa fa-lock"></i> |
| 481 | 481 | </label> |
@@ -497,9 +497,9 @@ discard block |
||
| 497 | 497 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 498 | 498 | <option> </option> |
| 499 | 499 | <?php |
| 500 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 501 | - foreach(getCategories() as $n => $v) {
|
|
| 502 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
| 500 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 501 | + foreach (getCategories() as $n => $v) {
|
|
| 502 | + echo "\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n"; |
|
| 503 | 503 | } |
| 504 | 504 | ?> |
| 505 | 505 | </select> |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | <div class="form-group"> |
| 532 | 532 | <div class="form-row"> |
| 533 | 533 | <label for="disabled"><input name="disabled" id="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> |
| 534 | - <?= ($content['disabled'] == 1 ? '<span class="text-danger">' . $_lang['module_disabled'] . '</span>' : $_lang['module_disabled']) ?></label> |
|
| 534 | + <?= ($content['disabled'] == 1 ? '<span class="text-danger">'.$_lang['module_disabled'].'</span>' : $_lang['module_disabled']) ?></label> |
|
| 535 | 535 | </div> |
| 536 | 536 | <div class="form-row"> |
| 537 | 537 | <label for="parse_docblock"> |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | </div> |
| 597 | 597 | <!-- HTML text editor end --> |
| 598 | 598 | </div> |
| 599 | - <?php if($modx->manager->action == '108'): ?> |
|
| 599 | + <?php if ($modx->manager->action == '108'): ?> |
|
| 600 | 600 | <!-- Dependencies --> |
| 601 | 601 | <div class="tab-page" id="tabDepend"> |
| 602 | 602 | <h2 class="tab"><?= $_lang['settings_dependencies'] ?></h2> |
@@ -624,14 +624,14 @@ discard block |
||
| 624 | 624 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50
|
| 625 | 625 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name');
|
| 626 | 626 | |
| 627 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 627 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
| 628 | 628 | $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items
|
| 629 | 629 | $grd->noRecordMsg = $_lang['no_records_found']; |
| 630 | 630 | $grd->cssClass = 'grid'; |
| 631 | 631 | $grd->columnHeaderClass = 'gridHeader'; |
| 632 | 632 | $grd->itemClass = 'gridItem'; |
| 633 | 633 | $grd->altItemClass = 'gridAltItem'; |
| 634 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
| 634 | + $grd->columns = $_lang['element_name']." ,".$_lang['type']; |
|
| 635 | 635 | $grd->fields = "name,type"; |
| 636 | 636 | echo $grd->render(); |
| 637 | 637 | ?> |
@@ -644,13 +644,13 @@ discard block |
||
| 644 | 644 | <h2 class="tab"><?= $_lang['access_permissions'] ?></h2> |
| 645 | 645 | <script type="text/javascript">tp.addTabPage(document.getElementById("tabPermissions"));</script>
|
| 646 | 646 | <div class="container container-body"> |
| 647 | - <?php if($use_udperms == 1) : ?> |
|
| 647 | + <?php if ($use_udperms == 1) : ?> |
|
| 648 | 648 | <?php |
| 649 | 649 | // fetch user access permissions for the module |
| 650 | 650 | $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
|
| 651 | 651 | $groupsarray = $modx->db->getColumn('usergroup', $rs);
|
| 652 | 652 | |
| 653 | - if($modx->hasPermission('access_permissions')) {
|
|
| 653 | + if ($modx->hasPermission('access_permissions')) {
|
|
| 654 | 654 | ?> |
| 655 | 655 | <!-- User Group Access Permissions --> |
| 656 | 656 | <script type="text/javascript"> |
@@ -678,22 +678,22 @@ discard block |
||
| 678 | 678 | } |
| 679 | 679 | $chk = ''; |
| 680 | 680 | $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
|
| 681 | - while($row = $modx->db->getRow($rs)) {
|
|
| 681 | + while ($row = $modx->db->getRow($rs)) {
|
|
| 682 | 682 | $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
| 683 | 683 | $checked = in_array($row['id'], $groupsarray); |
| 684 | - if($modx->hasPermission('access_permissions')) {
|
|
| 685 | - if($checked) {
|
|
| 684 | + if ($modx->hasPermission('access_permissions')) {
|
|
| 685 | + if ($checked) {
|
|
| 686 | 686 | $notPublic = true; |
| 687 | 687 | } |
| 688 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
| 688 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="'.$row['id'].'"'.($checked ? ' checked="checked"' : '').' onclick="makePublic(false)" /> '.$row['name']."</label><br />\n"; |
|
| 689 | 689 | } else {
|
| 690 | - if($checked) {
|
|
| 691 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
| 690 | + if ($checked) {
|
|
| 691 | + $chks = '<input type="hidden" name="usrgroups[]" value="'.$row['id'].'" />'."\n".$chks; |
|
| 692 | 692 | } |
| 693 | 693 | } |
| 694 | 694 | } |
| 695 | - if($modx->hasPermission('access_permissions')) {
|
|
| 696 | - $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; |
|
| 695 | + if ($modx->hasPermission('access_permissions')) {
|
|
| 696 | + $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; |
|
| 697 | 697 | } |
| 698 | 698 | echo $chks; |
| 699 | 699 | ?> |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | <?php |
| 715 | 715 | // invoke OnModFormRender event |
| 716 | 716 | $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
|
| 717 | - if(is_array($evtOut)) {
|
|
| 717 | + if (is_array($evtOut)) {
|
|
| 718 | 718 | echo implode('', $evtOut);
|
| 719 | 719 | } |
| 720 | 720 | ?> |
@@ -1,15 +1,15 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -switch($modx->manager->action) {
|
|
| 5 | +switch($modx->manager->action) { |
|
| 6 | 6 | case 107: |
| 7 | - if(!$modx->hasPermission('new_module')) {
|
|
| 7 | + if(!$modx->hasPermission('new_module')) { |
|
| 8 | 8 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 9 | 9 | } |
| 10 | 10 | break; |
| 11 | 11 | case 108: |
| 12 | - if(!$modx->hasPermission('edit_module')) {
|
|
| 12 | + if(!$modx->hasPermission('edit_module')) { |
|
| 13 | 13 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 14 | 14 | } |
| 15 | 15 | break; |
@@ -29,7 +29,8 @@ discard block |
||
| 29 | 29 | $tbl_site_templates = $modx->getFullTableName('site_templates');
|
| 30 | 30 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars');
|
| 31 | 31 | // create globally unique identifiers (guid) |
| 32 | -function createGUID() {
|
|
| 32 | +function createGUID() |
|
| 33 | +{ |
|
| 33 | 34 | srand((double) microtime() * 1000000); |
| 34 | 35 | $r = rand(); |
| 35 | 36 | $u = uniqid(getmypid() . $r . (double) microtime() * 1000000, 1); |
@@ -38,7 +39,7 @@ discard block |
||
| 38 | 39 | } |
| 39 | 40 | |
| 40 | 41 | // check to see the module editor isn't locked |
| 41 | -if($lockedEl = $modx->elementIsLocked(6, $id)) {
|
|
| 42 | +if($lockedEl = $modx->elementIsLocked(6, $id)) { |
|
| 42 | 43 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
| 43 | 44 | } |
| 44 | 45 | // end check for lock |
@@ -46,22 +47,22 @@ discard block |
||
| 46 | 47 | // Lock snippet for other users to edit |
| 47 | 48 | $modx->lockElement(6, $id); |
| 48 | 49 | |
| 49 | -if(isset($_GET['id'])) {
|
|
| 50 | +if(isset($_GET['id'])) { |
|
| 50 | 51 | $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'");
|
| 51 | 52 | $content = $modx->db->getRow($rs); |
| 52 | - if(!$content) {
|
|
| 53 | + if(!$content) { |
|
| 53 | 54 | $modx->webAlertAndQuit("Module not found for id '{$id}'.");
|
| 54 | 55 | } |
| 55 | 56 | $content['properties'] = str_replace("&", "&", $content['properties']);
|
| 56 | 57 | $_SESSION['itemname'] = $content['name']; |
| 57 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) {
|
|
| 58 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
| 58 | 59 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 59 | 60 | } |
| 60 | -} else {
|
|
| 61 | +} else { |
|
| 61 | 62 | $_SESSION['itemname'] = $_lang["new_module"]; |
| 62 | 63 | $content['wrap'] = '1'; |
| 63 | 64 | } |
| 64 | -if($modx->manager->hasFormValues()) {
|
|
| 65 | +if($modx->manager->hasFormValues()) { |
|
| 65 | 66 | $modx->manager->loadFormValues(); |
| 66 | 67 | } |
| 67 | 68 | |
@@ -435,7 +436,7 @@ discard block |
||
| 435 | 436 | <?php |
| 436 | 437 | // invoke OnModFormPrerender event |
| 437 | 438 | $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id));
|
| 438 | - if(is_array($evtOut)) {
|
|
| 439 | + if(is_array($evtOut)) { |
|
| 439 | 440 | echo implode('', $evtOut);
|
| 440 | 441 | } |
| 441 | 442 | |
@@ -498,7 +499,7 @@ discard block |
||
| 498 | 499 | <option> </option> |
| 499 | 500 | <?php |
| 500 | 501 | include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
| 501 | - foreach(getCategories() as $n => $v) {
|
|
| 502 | + foreach(getCategories() as $n => $v) { |
|
| 502 | 503 | echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
| 503 | 504 | } |
| 504 | 505 | ?> |
@@ -650,7 +651,7 @@ discard block |
||
| 650 | 651 | $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'");
|
| 651 | 652 | $groupsarray = $modx->db->getColumn('usergroup', $rs);
|
| 652 | 653 | |
| 653 | - if($modx->hasPermission('access_permissions')) {
|
|
| 654 | + if($modx->hasPermission('access_permissions')) { |
|
| 654 | 655 | ?> |
| 655 | 656 | <!-- User Group Access Permissions --> |
| 656 | 657 | <script type="text/javascript"> |
@@ -678,21 +679,21 @@ discard block |
||
| 678 | 679 | } |
| 679 | 680 | $chk = ''; |
| 680 | 681 | $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name');
|
| 681 | - while($row = $modx->db->getRow($rs)) {
|
|
| 682 | + while($row = $modx->db->getRow($rs)) { |
|
| 682 | 683 | $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
| 683 | 684 | $checked = in_array($row['id'], $groupsarray); |
| 684 | - if($modx->hasPermission('access_permissions')) {
|
|
| 685 | - if($checked) {
|
|
| 685 | + if($modx->hasPermission('access_permissions')) { |
|
| 686 | + if($checked) { |
|
| 686 | 687 | $notPublic = true; |
| 687 | 688 | } |
| 688 | 689 | $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
| 689 | - } else {
|
|
| 690 | - if($checked) {
|
|
| 690 | + } else { |
|
| 691 | + if($checked) { |
|
| 691 | 692 | $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
| 692 | 693 | } |
| 693 | 694 | } |
| 694 | 695 | } |
| 695 | - if($modx->hasPermission('access_permissions')) {
|
|
| 696 | + if($modx->hasPermission('access_permissions')) { |
|
| 696 | 697 | $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; |
| 697 | 698 | } |
| 698 | 699 | echo $chks; |
@@ -714,7 +715,7 @@ discard block |
||
| 714 | 715 | <?php |
| 715 | 716 | // invoke OnModFormRender event |
| 716 | 717 | $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id));
|
| 717 | - if(is_array($evtOut)) {
|
|
| 718 | + if(is_array($evtOut)) { |
|
| 718 | 719 | echo implode('', $evtOut);
|
| 719 | 720 | } |
| 720 | 721 | ?> |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 102: |
|
| 8 | - if (!$modx->hasPermission('edit_plugin')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 101: |
|
| 13 | - if (!$modx->hasPermission('new_plugin')) { |
|
| 7 | + case 102: |
|
| 8 | + if (!$modx->hasPermission('edit_plugin')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 101: |
|
| 13 | + if (!$modx->hasPermission('new_plugin')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 14 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | // Add lock-element JS-Script |
| 57 | 57 | $lockElementId = $id; |
| 58 | 58 | $lockElementType = 5; |
| 59 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 59 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 60 | 60 | |
| 61 | 61 | function bold($cond = false) |
| 62 | 62 | { |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
| 479 | 479 | |
| 480 | 480 | <h1> |
| 481 | - <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
| 481 | + <i class="fa fa-plug"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_plugin']) ?><i class="fa fa-question-circle help"></i> |
|
| 482 | 482 | </h1> |
| 483 | 483 | |
| 484 | 484 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -504,7 +504,7 @@ discard block |
||
| 504 | 504 | <div class="form-control-name clearfix"> |
| 505 | 505 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
| 506 | 506 | <?php if ($modx->hasPermission('save_role')): ?> |
| 507 | - <label class="custom-control" title="<?= $_lang['lock_plugin'] . "\n" . $_lang['lock_plugin_msg'] ?>" tooltip> |
|
| 507 | + <label class="custom-control" title="<?= $_lang['lock_plugin']."\n".$_lang['lock_plugin_msg'] ?>" tooltip> |
|
| 508 | 508 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
| 509 | 509 | <i class="fa fa-lock"></i> |
| 510 | 510 | </label> |
@@ -528,9 +528,9 @@ discard block |
||
| 528 | 528 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 529 | 529 | <option> </option> |
| 530 | 530 | <?php |
| 531 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 531 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 532 | 532 | foreach (getCategories() as $n => $v) { |
| 533 | - echo '<option value="' . $v['id'] . '"' . ($content["category"] == $v["id"] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 533 | + echo '<option value="'.$v['id'].'"'.($content["category"] == $v["id"] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v["category"])."</option>"; |
|
| 534 | 534 | } |
| 535 | 535 | ?> |
| 536 | 536 | </select> |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | <?php if ($modx->hasPermission('save_role')): ?> |
| 547 | 547 | <div class="form-group"> |
| 548 | 548 | <div class="form-row"> |
| 549 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['plugin_disabled'] . "</span>" : $_lang['plugin_disabled']) ?></label> |
|
| 549 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['plugin_disabled']."</span>" : $_lang['plugin_disabled']) ?></label> |
|
| 550 | 550 | </div> |
| 551 | 551 | <div class="form-row"> |
| 552 | 552 | <label> |
@@ -593,11 +593,11 @@ discard block |
||
| 593 | 593 | <select name="moduleguid" class="form-control" onchange="documentDirty=true;"> |
| 594 | 594 | <option> </option> |
| 595 | 595 | <?php |
| 596 | - $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules") . " sm |
|
| 597 | - INNER JOIN " . $modx->getFullTableName("site_module_depobj") . " smd ON smd.module=sm.id AND smd.type=30 |
|
| 598 | - INNER JOIN " . $modx->getFullTableName("site_plugins") . " sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
| 596 | + $ds = $modx->db->select('sm.id,sm.name,sm.guid', $modx->getFullTableName("site_modules")." sm |
|
| 597 | + INNER JOIN " . $modx->getFullTableName("site_module_depobj")." smd ON smd.module=sm.id AND smd.type=30 |
|
| 598 | + INNER JOIN " . $modx->getFullTableName("site_plugins")." sp ON sp.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams='1'", 'sm.name'); |
|
| 599 | 599 | while ($row = $modx->db->getRow($ds)) { |
| 600 | - echo "<option value='" . $row['guid'] . "'" . ($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row["name"]) . "</option>"; |
|
| 600 | + echo "<option value='".$row['guid']."'".($content["moduleguid"] == $row["guid"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row["name"])."</option>"; |
|
| 601 | 601 | } |
| 602 | 602 | ?> |
| 603 | 603 | </select> |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | echoEventRows($evtnames); |
| 659 | 659 | } |
| 660 | 660 | echo '<hr class="clear">'; |
| 661 | - echo '<div class="form-group"><b>' . $services[$srv - 1] . '</b></div>'; |
|
| 661 | + echo '<div class="form-group"><b>'.$services[$srv - 1].'</b></div>'; |
|
| 662 | 662 | } |
| 663 | 663 | // display group name |
| 664 | 664 | if ($grp != $row['groupname']) { |
@@ -667,9 +667,9 @@ discard block |
||
| 667 | 667 | echoEventRows($evtnames); |
| 668 | 668 | } |
| 669 | 669 | echo '<hr class="clear">'; |
| 670 | - echo '<div class="form-group"><b>' . $row['groupname'] . '</b></div>'; |
|
| 670 | + echo '<div class="form-group"><b>'.$row['groupname'].'</b></div>'; |
|
| 671 | 671 | } |
| 672 | - $evtnames[] = '<input name="sysevents[]" id="' . $row['name'] . '" type="checkbox" ' . (in_array($row['id'], $evts) ? ' checked="checked" ' : '') . 'class="inputBox" value="' . $row['id'] . '" /> <label for="' . $row['name'] . '" ' . bold(in_array($row['id'], $evts)) . '> ' . $row['name'] . '</label>' . "\n"; |
|
| 672 | + $evtnames[] = '<input name="sysevents[]" id="'.$row['name'].'" type="checkbox" '.(in_array($row['id'], $evts) ? ' checked="checked" ' : '').'class="inputBox" value="'.$row['id'].'" /> <label for="'.$row['name'].'" '.bold(in_array($row['id'], $evts)).'> '.$row['name'].'</label>'."\n"; |
|
| 673 | 673 | if (count($evtnames) == 2) { |
| 674 | 674 | echoEventRows($evtnames); |
| 675 | 675 | } |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | |
| 682 | 682 | function echoEventRows(&$evtnames) |
| 683 | 683 | { |
| 684 | - echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">' . implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames) . '</div></div>'; |
|
| 684 | + echo '<div class="row form-row"><div class="col-sm-6 col-md-4 col-lg-3">'.implode('</div><div class="col-sm-6 col-md-4 col-lg-3">', $evtnames).'</div></div>'; |
|
| 685 | 685 | $evtnames = array(); |
| 686 | 686 | } |
| 687 | 687 | |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch($modx->manager->action) { |
| 7 | - case 16: |
|
| 8 | - if(!$modx->hasPermission('edit_template')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 19: |
|
| 13 | - if(!$modx->hasPermission('new_template')) { |
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 16: |
|
| 8 | + if(!$modx->hasPermission('edit_template')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 19: |
|
| 13 | + if(!$modx->hasPermission('new_template')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 18 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -1,21 +1,21 @@ 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 | |
| 6 | 6 | switch($modx->manager->action) { |
| 7 | - case 16: |
|
| 8 | - if(!$modx->hasPermission('edit_template')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 19: |
|
| 13 | - if(!$modx->hasPermission('new_template')) { |
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 16: |
|
| 8 | + if(!$modx->hasPermission('edit_template')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 19: |
|
| 13 | + if(!$modx->hasPermission('new_template')) { |
|
| 14 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | + } |
|
| 16 | + break; |
|
| 17 | + default: |
|
| 18 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | // check to see the snippet editor isn't locked |
| 26 | 26 | if($lockedEl = $modx->elementIsLocked(1, $id)) { |
| 27 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['template'])); |
|
| 27 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['template'])); |
|
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
| 30 | 30 | |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $content = array(); |
| 35 | 35 | if(!empty($id)) { |
| 36 | - $rs = $modx->db->select('*', $tbl_site_templates, "id='{$id}'"); |
|
| 37 | - $content = $modx->db->getRow($rs); |
|
| 38 | - if(!$content) { |
|
| 39 | - $modx->webAlertAndQuit("No database record has been found for this template."); |
|
| 40 | - } |
|
| 41 | - |
|
| 42 | - $_SESSION['itemname'] = $content['templatename']; |
|
| 43 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
| 44 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 45 | - } |
|
| 36 | + $rs = $modx->db->select('*', $tbl_site_templates, "id='{$id}'"); |
|
| 37 | + $content = $modx->db->getRow($rs); |
|
| 38 | + if(!$content) { |
|
| 39 | + $modx->webAlertAndQuit("No database record has been found for this template."); |
|
| 40 | + } |
|
| 41 | + |
|
| 42 | + $_SESSION['itemname'] = $content['templatename']; |
|
| 43 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
| 44 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 45 | + } |
|
| 46 | 46 | } else { |
| 47 | - $_SESSION['itemname'] = $_lang["new_template"]; |
|
| 48 | - $content['category'] = intval($_REQUEST['catid']); |
|
| 47 | + $_SESSION['itemname'] = $_lang["new_template"]; |
|
| 48 | + $content['category'] = intval($_REQUEST['catid']); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if($modx->manager->hasFormValues()) { |
| 52 | - $modx->manager->loadFormValues(); |
|
| 52 | + $modx->manager->loadFormValues(); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $content = array_merge($content, $_POST); |
@@ -98,12 +98,12 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | <form name="mutate" method="post" action="index.php"> |
| 100 | 100 | <?php |
| 101 | - // invoke OnTempFormPrerender event |
|
| 102 | - $evtOut = $modx->invokeEvent("OnTempFormPrerender", array("id" => $id)); |
|
| 103 | - if(is_array($evtOut)) { |
|
| 104 | - echo implode("", $evtOut); |
|
| 105 | - } |
|
| 106 | - ?> |
|
| 101 | + // invoke OnTempFormPrerender event |
|
| 102 | + $evtOut = $modx->invokeEvent("OnTempFormPrerender", array("id" => $id)); |
|
| 103 | + if(is_array($evtOut)) { |
|
| 104 | + echo implode("", $evtOut); |
|
| 105 | + } |
|
| 106 | + ?> |
|
| 107 | 107 | <input type="hidden" name="a" value="20"> |
| 108 | 108 | <input type="hidden" name="id" value="<?= $_REQUEST['id'] ?>"> |
| 109 | 109 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | <label class="col-md-3 col-lg-2"> |
| 134 | 134 | <?= $_lang['template_name'] ?> |
| 135 | 135 | <?php if($id == $modx->config['default_template']) { |
| 136 | - echo '<small class="form-text text-danger">' . mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset) . '</small>'; |
|
| 137 | - } ?> |
|
| 136 | + echo '<small class="form-text text-danger">' . mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset) . '</small>'; |
|
| 137 | + } ?> |
|
| 138 | 138 | </label> |
| 139 | 139 | <div class="col-md-9 col-lg-10"> |
| 140 | 140 | <div class="form-control-name clearfix"> |
@@ -162,11 +162,11 @@ discard block |
||
| 162 | 162 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 163 | 163 | <option> </option> |
| 164 | 164 | <?php |
| 165 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 166 | - foreach(getCategories() as $n => $v) { |
|
| 167 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 168 | - } |
|
| 169 | - ?> |
|
| 165 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 166 | + foreach(getCategories() as $n => $v) { |
|
| 167 | + echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 168 | + } |
|
| 169 | + ?> |
|
| 170 | 170 | </select> |
| 171 | 171 | </div> |
| 172 | 172 | </div> |
@@ -197,38 +197,38 @@ discard block |
||
| 197 | 197 | <input type="submit" name="save" style="display:none"> |
| 198 | 198 | |
| 199 | 199 | <?php |
| 200 | - $selectedTvs = array(); |
|
| 201 | - if(!isset($_POST['assignedTv'])) { |
|
| 202 | - $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category", $_lang['no_category']), sprintf("%s tv |
|
| 200 | + $selectedTvs = array(); |
|
| 201 | + if(!isset($_POST['assignedTv'])) { |
|
| 202 | + $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category", $_lang['no_category']), sprintf("%s tv |
|
| 203 | 203 | LEFT JOIN %s tr ON tv.id=tr.tmplvarid |
| 204 | 204 | LEFT JOIN %s cat ON tv.category=cat.id", $modx->getFullTableName('site_tmplvars'), $modx->getFullTableName('site_tmplvar_templates'), $modx->getFullTableName('categories')), "templateid='{$id}'", "tr.rank DESC, tv.rank DESC, tvcaption DESC, tvid DESC" // workaround for correct sort of none-existing ranks |
| 205 | - ); |
|
| 206 | - while($row = $modx->db->getRow($rs)) { |
|
| 207 | - $selectedTvs[$row['tvid']] = $row; |
|
| 208 | - } |
|
| 209 | - $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - $unselectedTvs = array(); |
|
| 213 | - $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category, cat.id as catid", $_lang['no_category']), sprintf("%s tv |
|
| 205 | + ); |
|
| 206 | + while($row = $modx->db->getRow($rs)) { |
|
| 207 | + $selectedTvs[$row['tvid']] = $row; |
|
| 208 | + } |
|
| 209 | + $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + $unselectedTvs = array(); |
|
| 213 | + $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category, cat.id as catid", $_lang['no_category']), sprintf("%s tv |
|
| 214 | 214 | LEFT JOIN %s tr ON tv.id=tr.tmplvarid |
| 215 | 215 | LEFT JOIN %s cat ON tv.category=cat.id", $modx->getFullTableName('site_tmplvars'), $modx->getFullTableName('site_tmplvar_templates'), $modx->getFullTableName('categories')), "", "category, tvcaption"); |
| 216 | - while($row = $modx->db->getRow($rs)) { |
|
| 217 | - $unselectedTvs[$row['tvid']] = $row; |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - // Catch checkboxes if form not validated |
|
| 221 | - if(isset($_POST['assignedTv'])) { |
|
| 222 | - $selectedTvs = array(); |
|
| 223 | - foreach($_POST['assignedTv'] as $tvid) { |
|
| 224 | - if(isset($unselectedTvs[$tvid])) { |
|
| 225 | - $selectedTvs[$tvid] = $unselectedTvs[$tvid]; |
|
| 226 | - } |
|
| 227 | - }; |
|
| 228 | - } |
|
| 229 | - |
|
| 230 | - $total = count($selectedTvs); |
|
| 231 | - ?> |
|
| 216 | + while($row = $modx->db->getRow($rs)) { |
|
| 217 | + $unselectedTvs[$row['tvid']] = $row; |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + // Catch checkboxes if form not validated |
|
| 221 | + if(isset($_POST['assignedTv'])) { |
|
| 222 | + $selectedTvs = array(); |
|
| 223 | + foreach($_POST['assignedTv'] as $tvid) { |
|
| 224 | + if(isset($unselectedTvs[$tvid])) { |
|
| 225 | + $selectedTvs[$tvid] = $unselectedTvs[$tvid]; |
|
| 226 | + } |
|
| 227 | + }; |
|
| 228 | + } |
|
| 229 | + |
|
| 230 | + $total = count($selectedTvs); |
|
| 231 | + ?> |
|
| 232 | 232 | </div> |
| 233 | 233 | |
| 234 | 234 | <div class="tab-page" id="tabAssignedTVs"> |
@@ -238,65 +238,65 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | <div class="container container-body"> |
| 240 | 240 | <?php |
| 241 | - if($total > 0) { |
|
| 242 | - echo '<p>' . $_lang['template_tv_msg'] . '</p>'; |
|
| 243 | - } |
|
| 244 | - if($modx->hasPermission('save_template') && $total > 1 && $id) { |
|
| 245 | - echo sprintf('<div class="form-group"><a class="btn btn-primary" href="index.php?a=117&id=%s">%s</a></div>', $id, $_lang['template_tv_edit']); |
|
| 246 | - } |
|
| 247 | - |
|
| 248 | - // Selected TVs |
|
| 249 | - $tvList = ''; |
|
| 250 | - if($total > 0) { |
|
| 251 | - $tvList .= '<ul>'; |
|
| 252 | - foreach($selectedTvs as $row) { |
|
| 253 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 254 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 255 | - $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" checked="checked" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
|
| 256 | - } |
|
| 257 | - $tvList .= '</ul>'; |
|
| 258 | - |
|
| 259 | - } else { |
|
| 260 | - echo $_lang['template_no_tv']; |
|
| 261 | - } |
|
| 262 | - echo $tvList; |
|
| 263 | - |
|
| 264 | - // Unselected TVs |
|
| 265 | - $tvList = '<hr/><p>' . $_lang['template_notassigned_tv'] . '</p><ul>'; |
|
| 266 | - $preCat = ''; |
|
| 267 | - $insideUl = 0; |
|
| 268 | - while($row = array_shift($unselectedTvs)) { |
|
| 269 | - if(isset($selectedTvs[$row['tvid']])) { |
|
| 270 | - continue; |
|
| 271 | - } // Skip selected |
|
| 272 | - $row['category'] = stripslashes($row['category']); //pixelchutes |
|
| 273 | - if($preCat !== $row['category']) { |
|
| 274 | - $tvList .= $insideUl ? '</ul>' : ''; |
|
| 275 | - $tvList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 276 | - $insideUl = 1; |
|
| 277 | - } |
|
| 278 | - |
|
| 279 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 280 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 281 | - $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
|
| 282 | - $tvList .= '</li>'; |
|
| 283 | - |
|
| 284 | - $preCat = $row['category']; |
|
| 285 | - } |
|
| 286 | - $tvList .= $insideUl ? '</ul>' : ''; |
|
| 287 | - $tvList .= '</ul>'; |
|
| 288 | - echo $tvList; |
|
| 289 | - |
|
| 290 | - ?> |
|
| 241 | + if($total > 0) { |
|
| 242 | + echo '<p>' . $_lang['template_tv_msg'] . '</p>'; |
|
| 243 | + } |
|
| 244 | + if($modx->hasPermission('save_template') && $total > 1 && $id) { |
|
| 245 | + echo sprintf('<div class="form-group"><a class="btn btn-primary" href="index.php?a=117&id=%s">%s</a></div>', $id, $_lang['template_tv_edit']); |
|
| 246 | + } |
|
| 247 | + |
|
| 248 | + // Selected TVs |
|
| 249 | + $tvList = ''; |
|
| 250 | + if($total > 0) { |
|
| 251 | + $tvList .= '<ul>'; |
|
| 252 | + foreach($selectedTvs as $row) { |
|
| 253 | + $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 254 | + $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 255 | + $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" checked="checked" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
|
| 256 | + } |
|
| 257 | + $tvList .= '</ul>'; |
|
| 258 | + |
|
| 259 | + } else { |
|
| 260 | + echo $_lang['template_no_tv']; |
|
| 261 | + } |
|
| 262 | + echo $tvList; |
|
| 263 | + |
|
| 264 | + // Unselected TVs |
|
| 265 | + $tvList = '<hr/><p>' . $_lang['template_notassigned_tv'] . '</p><ul>'; |
|
| 266 | + $preCat = ''; |
|
| 267 | + $insideUl = 0; |
|
| 268 | + while($row = array_shift($unselectedTvs)) { |
|
| 269 | + if(isset($selectedTvs[$row['tvid']])) { |
|
| 270 | + continue; |
|
| 271 | + } // Skip selected |
|
| 272 | + $row['category'] = stripslashes($row['category']); //pixelchutes |
|
| 273 | + if($preCat !== $row['category']) { |
|
| 274 | + $tvList .= $insideUl ? '</ul>' : ''; |
|
| 275 | + $tvList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 276 | + $insideUl = 1; |
|
| 277 | + } |
|
| 278 | + |
|
| 279 | + $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 280 | + $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 281 | + $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
|
| 282 | + $tvList .= '</li>'; |
|
| 283 | + |
|
| 284 | + $preCat = $row['category']; |
|
| 285 | + } |
|
| 286 | + $tvList .= $insideUl ? '</ul>' : ''; |
|
| 287 | + $tvList .= '</ul>'; |
|
| 288 | + echo $tvList; |
|
| 289 | + |
|
| 290 | + ?> |
|
| 291 | 291 | </div> |
| 292 | 292 | </div> |
| 293 | 293 | |
| 294 | 294 | <?php |
| 295 | - // invoke OnTempFormRender event |
|
| 296 | - $evtOut = $modx->invokeEvent("OnTempFormRender", array("id" => $id)); |
|
| 297 | - if(is_array($evtOut)) { |
|
| 298 | - echo implode("", $evtOut); |
|
| 299 | - } |
|
| 300 | - ?> |
|
| 295 | + // invoke OnTempFormRender event |
|
| 296 | + $evtOut = $modx->invokeEvent("OnTempFormRender", array("id" => $id)); |
|
| 297 | + if(is_array($evtOut)) { |
|
| 298 | + echo implode("", $evtOut); |
|
| 299 | + } |
|
| 300 | + ?> |
|
| 301 | 301 | </div> |
| 302 | 302 | </form> |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -switch($modx->manager->action) { |
|
| 6 | +switch ($modx->manager->action) { |
|
| 7 | 7 | case 16: |
| 8 | - if(!$modx->hasPermission('edit_template')) { |
|
| 8 | + if (!$modx->hasPermission('edit_template')) { |
|
| 9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 10 | 10 | } |
| 11 | 11 | break; |
| 12 | 12 | case 19: |
| 13 | - if(!$modx->hasPermission('new_template')) { |
|
| 13 | + if (!$modx->hasPermission('new_template')) { |
|
| 14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | 15 | } |
| 16 | 16 | break; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
| 24 | 24 | |
| 25 | 25 | // check to see the snippet editor isn't locked |
| 26 | -if($lockedEl = $modx->elementIsLocked(1, $id)) { |
|
| 26 | +if ($lockedEl = $modx->elementIsLocked(1, $id)) { |
|
| 27 | 27 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['template'])); |
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
@@ -32,15 +32,15 @@ discard block |
||
| 32 | 32 | $modx->lockElement(1, $id); |
| 33 | 33 | |
| 34 | 34 | $content = array(); |
| 35 | -if(!empty($id)) { |
|
| 35 | +if (!empty($id)) { |
|
| 36 | 36 | $rs = $modx->db->select('*', $tbl_site_templates, "id='{$id}'"); |
| 37 | 37 | $content = $modx->db->getRow($rs); |
| 38 | - if(!$content) { |
|
| 38 | + if (!$content) { |
|
| 39 | 39 | $modx->webAlertAndQuit("No database record has been found for this template."); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $_SESSION['itemname'] = $content['templatename']; |
| 43 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
| 43 | + if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
| 44 | 44 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 45 | 45 | } |
| 46 | 46 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $content['category'] = intval($_REQUEST['catid']); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | -if($modx->manager->hasFormValues()) { |
|
| 51 | +if ($modx->manager->hasFormValues()) { |
|
| 52 | 52 | $modx->manager->loadFormValues(); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | // Add lock-element JS-Script |
| 59 | 59 | $lockElementId = $id; |
| 60 | 60 | $lockElementType = 1; |
| 61 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 61 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 62 | 62 | ?> |
| 63 | 63 | <script type="text/javascript"> |
| 64 | 64 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | <?php |
| 101 | 101 | // invoke OnTempFormPrerender event |
| 102 | 102 | $evtOut = $modx->invokeEvent("OnTempFormPrerender", array("id" => $id)); |
| 103 | - if(is_array($evtOut)) { |
|
| 103 | + if (is_array($evtOut)) { |
|
| 104 | 104 | echo implode("", $evtOut); |
| 105 | 105 | } |
| 106 | 106 | ?> |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
| 110 | 110 | |
| 111 | 111 | <h1> |
| 112 | - <i class="fa fa-newspaper-o"></i><?= ($content['templatename'] ? $content['templatename'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_template']) ?><i class="fa fa-question-circle help"></i> |
|
| 112 | + <i class="fa fa-newspaper-o"></i><?= ($content['templatename'] ? $content['templatename'].'<small>('.$content['id'].')</small>' : $_lang['new_template']) ?><i class="fa fa-question-circle help"></i> |
|
| 113 | 113 | </h1> |
| 114 | 114 | |
| 115 | 115 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -132,15 +132,15 @@ discard block |
||
| 132 | 132 | <div class="row form-row"> |
| 133 | 133 | <label class="col-md-3 col-lg-2"> |
| 134 | 134 | <?= $_lang['template_name'] ?> |
| 135 | - <?php if($id == $modx->config['default_template']) { |
|
| 136 | - echo '<small class="form-text text-danger">' . mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset) . '</small>'; |
|
| 135 | + <?php if ($id == $modx->config['default_template']) { |
|
| 136 | + echo '<small class="form-text text-danger">'.mb_strtolower(rtrim($_lang['defaulttemplate_title'], ':'), $modx_manager_charset).'</small>'; |
|
| 137 | 137 | } ?> |
| 138 | 138 | </label> |
| 139 | 139 | <div class="col-md-9 col-lg-10"> |
| 140 | 140 | <div class="form-control-name clearfix"> |
| 141 | 141 | <input name="templatename" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['templatename']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;"> |
| 142 | - <?php if($modx->hasPermission('save_role')): ?> |
|
| 143 | - <label class="custom-control" title="<?= $_lang['lock_template'] . "\n" . $_lang['lock_template_msg'] ?>" tooltip> |
|
| 142 | + <?php if ($modx->hasPermission('save_role')): ?> |
|
| 143 | + <label class="custom-control" title="<?= $_lang['lock_template']."\n".$_lang['lock_template_msg'] ?>" tooltip> |
|
| 144 | 144 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
| 145 | 145 | <i class="fa fa-lock"></i> |
| 146 | 146 | </label> |
@@ -162,9 +162,9 @@ discard block |
||
| 162 | 162 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 163 | 163 | <option> </option> |
| 164 | 164 | <?php |
| 165 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 166 | - foreach(getCategories() as $n => $v) { |
|
| 167 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 165 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 166 | + foreach (getCategories() as $n => $v) { |
|
| 167 | + echo "<option value='".$v['id']."'".($content["category"] == $v["id"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($v["category"])."</option>"; |
|
| 168 | 168 | } |
| 169 | 169 | ?> |
| 170 | 170 | </select> |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | </div> |
| 178 | 178 | </div> |
| 179 | 179 | </div> |
| 180 | - <?php if($modx->hasPermission('save_role')): ?> |
|
| 180 | + <?php if ($modx->hasPermission('save_role')): ?> |
|
| 181 | 181 | <div class="form-group"> |
| 182 | 182 | <label> |
| 183 | 183 | <input name="selectable" type="checkbox"<?= ($selectable == 1 ? ' checked="checked"' : '') ?> /> <?= $_lang['template_selectable'] ?></label> |
@@ -198,30 +198,30 @@ discard block |
||
| 198 | 198 | |
| 199 | 199 | <?php |
| 200 | 200 | $selectedTvs = array(); |
| 201 | - if(!isset($_POST['assignedTv'])) { |
|
| 201 | + if (!isset($_POST['assignedTv'])) { |
|
| 202 | 202 | $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category", $_lang['no_category']), sprintf("%s tv |
| 203 | 203 | LEFT JOIN %s tr ON tv.id=tr.tmplvarid |
| 204 | 204 | LEFT JOIN %s cat ON tv.category=cat.id", $modx->getFullTableName('site_tmplvars'), $modx->getFullTableName('site_tmplvar_templates'), $modx->getFullTableName('categories')), "templateid='{$id}'", "tr.rank DESC, tv.rank DESC, tvcaption DESC, tvid DESC" // workaround for correct sort of none-existing ranks |
| 205 | 205 | ); |
| 206 | - while($row = $modx->db->getRow($rs)) { |
|
| 206 | + while ($row = $modx->db->getRow($rs)) { |
|
| 207 | 207 | $selectedTvs[$row['tvid']] = $row; |
| 208 | 208 | } |
| 209 | - $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
| 209 | + $selectedTvs = array_reverse($selectedTvs, true); // reverse ORDERBY DESC |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | $unselectedTvs = array(); |
| 213 | 213 | $rs = $modx->db->select(sprintf("tv.name AS tvname, tv.id AS tvid, tr.templateid AS templateid, tv.description AS tvdescription, tv.caption AS tvcaption, tv.locked AS tvlocked, if(isnull(cat.category),'%s',cat.category) AS category, cat.id as catid", $_lang['no_category']), sprintf("%s tv |
| 214 | 214 | LEFT JOIN %s tr ON tv.id=tr.tmplvarid |
| 215 | 215 | LEFT JOIN %s cat ON tv.category=cat.id", $modx->getFullTableName('site_tmplvars'), $modx->getFullTableName('site_tmplvar_templates'), $modx->getFullTableName('categories')), "", "category, tvcaption"); |
| 216 | - while($row = $modx->db->getRow($rs)) { |
|
| 216 | + while ($row = $modx->db->getRow($rs)) { |
|
| 217 | 217 | $unselectedTvs[$row['tvid']] = $row; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | // Catch checkboxes if form not validated |
| 221 | - if(isset($_POST['assignedTv'])) { |
|
| 221 | + if (isset($_POST['assignedTv'])) { |
|
| 222 | 222 | $selectedTvs = array(); |
| 223 | - foreach($_POST['assignedTv'] as $tvid) { |
|
| 224 | - if(isset($unselectedTvs[$tvid])) { |
|
| 223 | + foreach ($_POST['assignedTv'] as $tvid) { |
|
| 224 | + if (isset($unselectedTvs[$tvid])) { |
|
| 225 | 225 | $selectedTvs[$tvid] = $unselectedTvs[$tvid]; |
| 226 | 226 | } |
| 227 | 227 | }; |
@@ -238,20 +238,20 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | <div class="container container-body"> |
| 240 | 240 | <?php |
| 241 | - if($total > 0) { |
|
| 242 | - echo '<p>' . $_lang['template_tv_msg'] . '</p>'; |
|
| 241 | + if ($total > 0) { |
|
| 242 | + echo '<p>'.$_lang['template_tv_msg'].'</p>'; |
|
| 243 | 243 | } |
| 244 | - if($modx->hasPermission('save_template') && $total > 1 && $id) { |
|
| 244 | + if ($modx->hasPermission('save_template') && $total > 1 && $id) { |
|
| 245 | 245 | echo sprintf('<div class="form-group"><a class="btn btn-primary" href="index.php?a=117&id=%s">%s</a></div>', $id, $_lang['template_tv_edit']); |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | // Selected TVs |
| 249 | 249 | $tvList = ''; |
| 250 | - if($total > 0) { |
|
| 250 | + if ($total > 0) { |
|
| 251 | 251 | $tvList .= '<ul>'; |
| 252 | - foreach($selectedTvs as $row) { |
|
| 253 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 254 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 252 | + foreach ($selectedTvs as $row) { |
|
| 253 | + $desc = !empty($row['tvdescription']) ? ' <small>('.$row['tvdescription'].')</small>' : ''; |
|
| 254 | + $locked = $row['tvlocked'] ? ' <em>('.$_lang['locked'].')</em>' : ""; |
|
| 255 | 255 | $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" checked="checked" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
| 256 | 256 | } |
| 257 | 257 | $tvList .= '</ul>'; |
@@ -262,22 +262,22 @@ discard block |
||
| 262 | 262 | echo $tvList; |
| 263 | 263 | |
| 264 | 264 | // Unselected TVs |
| 265 | - $tvList = '<hr/><p>' . $_lang['template_notassigned_tv'] . '</p><ul>'; |
|
| 265 | + $tvList = '<hr/><p>'.$_lang['template_notassigned_tv'].'</p><ul>'; |
|
| 266 | 266 | $preCat = ''; |
| 267 | 267 | $insideUl = 0; |
| 268 | - while($row = array_shift($unselectedTvs)) { |
|
| 269 | - if(isset($selectedTvs[$row['tvid']])) { |
|
| 268 | + while ($row = array_shift($unselectedTvs)) { |
|
| 269 | + if (isset($selectedTvs[$row['tvid']])) { |
|
| 270 | 270 | continue; |
| 271 | 271 | } // Skip selected |
| 272 | 272 | $row['category'] = stripslashes($row['category']); //pixelchutes |
| 273 | - if($preCat !== $row['category']) { |
|
| 273 | + if ($preCat !== $row['category']) { |
|
| 274 | 274 | $tvList .= $insideUl ? '</ul>' : ''; |
| 275 | - $tvList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 275 | + $tvList .= '<li><strong>'.$row['category'].($row['catid'] != '' ? ' <small>('.$row['catid'].')</small>' : '').'</strong><ul>'; |
|
| 276 | 276 | $insideUl = 1; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - $desc = !empty($row['tvdescription']) ? ' <small>(' . $row['tvdescription'] . ')</small>' : ''; |
|
| 280 | - $locked = $row['tvlocked'] ? ' <em>(' . $_lang['locked'] . ')</em>' : ""; |
|
| 279 | + $desc = !empty($row['tvdescription']) ? ' <small>('.$row['tvdescription'].')</small>' : ''; |
|
| 280 | + $locked = $row['tvlocked'] ? ' <em>('.$_lang['locked'].')</em>' : ""; |
|
| 281 | 281 | $tvList .= sprintf('<li><label><input name="assignedTv[]" value="%s" type="checkbox" onchange="documentDirty=true;jQuery(\'#tvsDirty\').val(\'1\');"> %s <small>(%s)</small> - %s%s</label>%s <a href="index.php?id=%s&a=301&or=%s&oid=%s">%s</a></li>', $row['tvid'], $row['tvname'], $row['tvid'], $row['tvcaption'], $desc, $locked, $row['tvid'], $modx->manager->action, $id, $_lang['edit']); |
| 282 | 282 | $tvList .= '</li>'; |
| 283 | 283 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | <?php |
| 295 | 295 | // invoke OnTempFormRender event |
| 296 | 296 | $evtOut = $modx->invokeEvent("OnTempFormRender", array("id" => $id)); |
| 297 | - if(is_array($evtOut)) { |
|
| 297 | + if (is_array($evtOut)) { |
|
| 298 | 298 | echo implode("", $evtOut); |
| 299 | 299 | } |
| 300 | 300 | ?> |
@@ -177,9 +177,9 @@ |
||
| 177 | 177 | <td colspan="2"><div class="split"></div></td> |
| 178 | 178 | </tr> |
| 179 | 179 | <?php |
| 180 | - // Check for GD before allowing captcha to be enabled |
|
| 181 | - $gdAvailable = extension_loaded('gd');
|
|
| 182 | - ?> |
|
| 180 | + // Check for GD before allowing captcha to be enabled |
|
| 181 | + $gdAvailable = extension_loaded('gd');
|
|
| 182 | + ?> |
|
| 183 | 183 | <?php |
| 184 | 184 | $gdAvailable = extension_loaded('gd');
|
| 185 | 185 | if(!$gdAvailable) $use_captcha = 0; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
| 3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
| 3 | + if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
| 4 | 4 | ?> |
| 5 | 5 | <!-- Interface & editor settings --> |
| 6 | 6 | <div class="tab-page" id="tabPageSecurity"> |
@@ -11,10 +11,10 @@ discard block |
||
| 11 | 11 | <tr> |
| 12 | 12 | <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th> |
| 13 | 13 | <td> |
| 14 | -<?php echo wrap_label($_lang['allow_eval_with_scan'] , form_radio('allow_eval','with_scan'));?><br />
|
|
| 15 | -<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br />
|
|
| 16 | -<?php echo wrap_label($_lang['allow_eval_everytime_eval'] , form_radio('allow_eval','everytime_eval'));?><br />
|
|
| 17 | -<?php echo wrap_label($_lang['allow_eval_dont_eval'] , form_radio('allow_eval','dont_eval'));?>
|
|
| 14 | +<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br />
|
|
| 15 | +<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br />
|
|
| 16 | +<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br />
|
|
| 17 | +<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?>
|
|
| 18 | 18 | <div class="comment"> |
| 19 | 19 | <?php echo $_lang['allow_eval_msg'] ?> |
| 20 | 20 | </div> |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | <tr> |
| 40 | 40 | <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th> |
| 41 | 41 | <td> |
| 42 | - <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br /> |
|
| 42 | + <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br /> |
|
| 43 | 43 | |
| 44 | 44 | </td> |
| 45 | 45 | </tr> |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | <tr> |
| 50 | 50 | <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td> |
| 51 | 51 | <td> |
| 52 | - <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br />
|
|
| 53 | - <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?>
|
|
| 52 | + <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br />
|
|
| 53 | + <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?>
|
|
| 54 | 54 | </td> |
| 55 | 55 | </tr> |
| 56 | 56 | <tr> |
@@ -85,25 +85,25 @@ discard block |
||
| 85 | 85 | <tr> |
| 86 | 86 | <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th> |
| 87 | 87 | <td> |
| 88 | -<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br />
|
|
| 89 | -<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br />
|
|
| 90 | -<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br />
|
|
| 91 | -<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?>
|
|
| 88 | +<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br />
|
|
| 89 | +<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br />
|
|
| 90 | +<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br />
|
|
| 91 | +<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?>
|
|
| 92 | 92 | </td> |
| 93 | 93 | </tr> |
| 94 | 94 | <tr> |
| 95 | 95 | <td width="200"> </td> |
| 96 | - <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td> |
|
| 96 | + <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td> |
|
| 97 | 97 | </tr> |
| 98 | 98 | <tr><td colspan="2"><div class="split"></div></td></tr> |
| 99 | 99 | <tr> |
| 100 | 100 | <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th> |
| 101 | 101 | <td> |
| 102 | -<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br />
|
|
| 103 | -<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br />
|
|
| 104 | -<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br />
|
|
| 105 | -<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br />
|
|
| 106 | -<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td>
|
|
| 102 | +<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br />
|
|
| 103 | +<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br />
|
|
| 104 | +<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br />
|
|
| 105 | +<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br />
|
|
| 106 | +<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td>
|
|
| 107 | 107 | </tr> |
| 108 | 108 | <tr> |
| 109 | 109 | <td colspan="2"><div class="split"></div></td> |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | <tr> |
| 112 | 112 | <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th> |
| 113 | 113 | <td> |
| 114 | -<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br />
|
|
| 115 | -<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?>
|
|
| 114 | +<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br />
|
|
| 115 | +<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?>
|
|
| 116 | 116 | |
| 117 | 117 | </td> |
| 118 | 118 | </tr> |
@@ -153,20 +153,20 @@ discard block |
||
| 153 | 153 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
| 154 | 154 | <td> |
| 155 | 155 | <?php |
| 156 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
| 157 | -$phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
|
|
| 158 | -$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
|
|
| 159 | -$phm['e']['SHA512'] = $modx->manager->checkHashAlgorithm('SHA512') ? 0:1;
|
|
| 160 | -$phm['e']['SHA256'] = $modx->manager->checkHashAlgorithm('SHA256') ? 0:1;
|
|
| 161 | -$phm['e']['MD5'] = $modx->manager->checkHashAlgorithm('MD5') ? 0:1;
|
|
| 162 | -$phm['e']['UNCRYPT'] = $modx->manager->checkHashAlgorithm('UNCRYPT') ? 0:1;
|
|
| 156 | +if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
| 157 | +$phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1;
|
|
| 158 | +$phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1;
|
|
| 159 | +$phm['e']['SHA512'] = $modx->manager->checkHashAlgorithm('SHA512') ? 0 : 1;
|
|
| 160 | +$phm['e']['SHA256'] = $modx->manager->checkHashAlgorithm('SHA256') ? 0 : 1;
|
|
| 161 | +$phm['e']['MD5'] = $modx->manager->checkHashAlgorithm('MD5') ? 0 : 1;
|
|
| 162 | +$phm['e']['UNCRYPT'] = $modx->manager->checkHashAlgorithm('UNCRYPT') ? 0 : 1;
|
|
| 163 | 163 | ?> |
| 164 | -<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br />
|
|
| 165 | -<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br />
|
|
| 166 | -<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA512' , '', $phm['e']['SHA512']));?><br />
|
|
| 167 | -<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA256' , '', $phm['e']['SHA256']));?><br />
|
|
| 168 | -<?php echo wrap_label('CRYPT_MD5 (salt & stretch)' ,form_radio('pwd_hash_algo','MD5' , '', $phm['e']['MD5']));?><br />
|
|
| 169 | -<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)' ,form_radio('pwd_hash_algo','UNCRYPT' , '', $phm['e']['UNCRYPT']));?>
|
|
| 164 | +<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br />
|
|
| 165 | +<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br />
|
|
| 166 | +<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br />
|
|
| 167 | +<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br />
|
|
| 168 | +<?php echo wrap_label('CRYPT_MD5 (salt & stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br />
|
|
| 169 | +<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?>
|
|
| 170 | 170 | </td> |
| 171 | 171 | </tr> |
| 172 | 172 | <tr> |
@@ -182,13 +182,13 @@ discard block |
||
| 182 | 182 | ?> |
| 183 | 183 | <?php |
| 184 | 184 | $gdAvailable = extension_loaded('gd');
|
| 185 | -if(!$gdAvailable) $use_captcha = 0; |
|
| 185 | +if (!$gdAvailable) $use_captcha = 0; |
|
| 186 | 186 | ?> |
| 187 | 187 | <tr> |
| 188 | 188 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
| 189 | - <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> /> |
|
| 189 | + <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
| 190 | 190 | <?php echo $_lang['yes']?></label><br /> |
| 191 | - <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> /> |
|
| 191 | + <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
| 192 | 192 | <?php echo $_lang['no']?></label> </td> |
| 193 | 193 | </tr> |
| 194 | 194 | <tr> |
@@ -198,23 +198,23 @@ discard block |
||
| 198 | 198 | <tr> |
| 199 | 199 | <td colspan="2"><div class="split"></div></td> |
| 200 | 200 | </tr> |
| 201 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
| 201 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
| 202 | 202 | <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small> |
| 203 | 203 | <br /> |
| 204 | 204 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 205 | 205 | <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');"> |
| 206 | -<?php echo get_lang_options('captcha_words_default');?>
|
|
| 206 | +<?php echo get_lang_options('captcha_words_default'); ?>
|
|
| 207 | 207 | </select> |
| 208 | 208 | </td> |
| 209 | 209 | <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" /> |
| 210 | - <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" /> |
|
| 210 | + <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" /> |
|
| 211 | 211 | </td> |
| 212 | 212 | </tr> |
| 213 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
| 213 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
| 214 | 214 | <td width="200"> </td> |
| 215 | 215 | <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td> |
| 216 | 216 | </tr> |
| 217 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
| 217 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
| 218 | 218 | <td colspan="2"><div class="split"></div></td> |
| 219 | 219 | </tr> |
| 220 | 220 | </table> |
@@ -1,7 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
| 3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
| 4 | -?> |
|
| 3 | + if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
| 4 | + $valid_hostnames = $_SERVER['HTTP_HOST']; |
|
| 5 | + } |
|
| 6 | + ?> |
|
| 5 | 7 | <!-- Interface & editor settings --> |
| 6 | 8 | <div class="tab-page" id="tabPageSecurity"> |
| 7 | 9 | <h2 class="tab"><?php echo $_lang['settings_security'] ?></h2> |
@@ -153,7 +155,9 @@ discard block |
||
| 153 | 155 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
| 154 | 156 | <td> |
| 155 | 157 | <?php |
| 156 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
| 158 | +if(empty($pwd_hash_algo)) { |
|
| 159 | + $phm['sel']['UNCRYPT'] = 1; |
|
| 160 | +} |
|
| 157 | 161 | $phm['e']['BLOWFISH_Y'] = $modx->manager->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
|
| 158 | 162 | $phm['e']['BLOWFISH_A'] = $modx->manager->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
|
| 159 | 163 | $phm['e']['SHA512'] = $modx->manager->checkHashAlgorithm('SHA512') ? 0:1;
|
@@ -182,7 +186,9 @@ discard block |
||
| 182 | 186 | ?> |
| 183 | 187 | <?php |
| 184 | 188 | $gdAvailable = extension_loaded('gd');
|
| 185 | -if(!$gdAvailable) $use_captcha = 0; |
|
| 189 | +if(!$gdAvailable) { |
|
| 190 | + $use_captcha = 0; |
|
| 191 | +} |
|
| 186 | 192 | ?> |
| 187 | 193 | <tr> |
| 188 | 194 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | <tr> |
| 7 | 7 | <td nowrap class="warning"><?php echo $_lang['udperms_title'] ?><br><small>[(use_udperms)]</small></td> |
| 8 | 8 | <td> |
| 9 | - <?php echo wrap_label($_lang['yes'],form_radio('use_udperms', 1, 'id="udPermsOn"'));?><br />
|
|
| 10 | - <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"'));?>
|
|
| 9 | + <?php echo wrap_label($_lang['yes'], form_radio('use_udperms', 1, 'id="udPermsOn"')); ?><br />
|
|
| 10 | + <?php echo wrap_label($_lang['no'], form_radio('use_udperms', 0, 'id="udPermsOff"')); ?>
|
|
| 11 | 11 | </td> |
| 12 | 12 | </tr> |
| 13 | 13 | <tr> |
@@ -17,16 +17,16 @@ discard block |
||
| 17 | 17 | <tr> |
| 18 | 18 | <td colspan="2"><div class="split"></div></td> |
| 19 | 19 | </tr> |
| 20 | - <tr class="udPerms" <?php echo showHide($use_udperms==1);?>> |
|
| 20 | + <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>> |
|
| 21 | 21 | <td nowrap class="warning"><?php echo $_lang['udperms_allowroot_title'] ?><br><small>[(udperms_allowroot)]</small></td> |
| 22 | 22 | <td> |
| 23 | - <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> /> |
|
| 23 | + <label><input type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 24 | 24 | <?php echo $_lang['yes']?></label><br /> |
| 25 | - <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot=='0' ? 'checked="checked"' : "" ; ?> /> |
|
| 25 | + <label><input type="radio" name="udperms_allowroot" value="0" <?php echo $udperms_allowroot == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 26 | 26 | <?php echo $_lang['no']?></label> |
| 27 | 27 | </td> |
| 28 | 28 | </tr> |
| 29 | - <tr class="udPerms" <?php echo showHide($use_udperms==1);?>> |
|
| 29 | + <tr class="udPerms" <?php echo showHide($use_udperms == 1); ?>> |
|
| 30 | 30 | <td width="200"> </td> |
| 31 | 31 | <td class="comment"><?php echo $_lang['udperms_allowroot_message'] ?></td> |
| 32 | 32 | </tr> |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | <tr> |
| 40 | 40 | <td nowrap class="warning"><?php echo $_lang['email_method_title'] ?><br><small>[(email_method)]</small></td> |
| 41 | 41 | <td> |
| 42 | - <?php echo wrap_label($_lang['email_method_mail'],form_radio('email_method','mail','id="useMail"'));?><br />
|
|
| 43 | - <?php echo wrap_label($_lang['email_method_smtp'],form_radio('email_method','smtp','id="useSmtp"'));?>
|
|
| 44 | - <div class="smtpRow" <?php echo showHide($email_method=='smtp');?>> |
|
| 45 | - <?php include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
| 42 | + <?php echo wrap_label($_lang['email_method_mail'], form_radio('email_method', 'mail', 'id="useMail"')); ?><br />
|
|
| 43 | + <?php echo wrap_label($_lang['email_method_smtp'], form_radio('email_method', 'smtp', 'id="useSmtp"')); ?>
|
|
| 44 | + <div class="smtpRow" <?php echo showHide($email_method == 'smtp'); ?>> |
|
| 45 | + <?php include_once(MODX_MANAGER_PATH.'actions/mutate_settings/snippet_smtp.inc.php'); ?> |
|
| 46 | 46 | </div> |
| 47 | 47 | </td> |
| 48 | 48 | </tr> |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | <br /> |
| 55 | 55 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 56 | 56 | <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');"> |
| 57 | -<?php echo get_lang_options('emailsubject_default');?>
|
|
| 57 | +<?php echo get_lang_options('emailsubject_default'); ?>
|
|
| 58 | 58 | </select> |
| 59 | 59 | </td> |
| 60 | 60 | <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" value="<?php echo $emailsubject; ?>" /> |
| 61 | - <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" /> |
|
| 61 | + <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']); ?>" /> |
|
| 62 | 62 | </td> |
| 63 | 63 | </tr> |
| 64 | 64 | <tr> |
@@ -73,11 +73,11 @@ discard block |
||
| 73 | 73 | <br /> |
| 74 | 74 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 75 | 75 | <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');"> |
| 76 | -<?php echo get_lang_options('system_email_signup');?>
|
|
| 76 | +<?php echo get_lang_options('system_email_signup'); ?>
|
|
| 77 | 77 | </select> |
| 78 | 78 | </td> |
| 79 | 79 | <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo $signupemail_message; ?></textarea> |
| 80 | - <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" /> |
|
| 80 | + <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']); ?>" /> |
|
| 81 | 81 | </td> |
| 82 | 82 | </tr> |
| 83 | 83 | <tr> |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | <br /> |
| 93 | 93 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 94 | 94 | <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');"> |
| 95 | -<?php echo get_lang_options('system_email_websignup');?>
|
|
| 95 | +<?php echo get_lang_options('system_email_websignup'); ?>
|
|
| 96 | 96 | </select> |
| 97 | 97 | </td> |
| 98 | 98 | <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo $websignupemail_message; ?></textarea> |
| 99 | - <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" /> |
|
| 99 | + <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']); ?>" /> |
|
| 100 | 100 | </td> |
| 101 | 101 | </tr> |
| 102 | 102 | <tr> |
@@ -111,11 +111,11 @@ discard block |
||
| 111 | 111 | <br /> |
| 112 | 112 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 113 | 113 | <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');"> |
| 114 | -<?php echo get_lang_options('system_email_webreminder');?>
|
|
| 114 | +<?php echo get_lang_options('system_email_webreminder'); ?>
|
|
| 115 | 115 | </select> |
| 116 | 116 | </td> |
| 117 | 117 | <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo $webpwdreminder_message; ?></textarea> |
| 118 | - <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" /> |
|
| 118 | + <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']); ?>" /> |
|
| 119 | 119 | </td> |
| 120 | 120 | </tr> |
| 121 | 121 | <tr> |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | <?php |
| 128 | 128 | // invoke OnUserSettingsRender event |
| 129 | 129 | $evtOut = $modx->invokeEvent('OnUserSettingsRender');
|
| 130 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 130 | + if (is_array($evtOut)) echo implode("", $evtOut);
|
|
| 131 | 131 | ?> |
| 132 | 132 | </td> |
| 133 | 133 | </tr> |
@@ -127,7 +127,9 @@ |
||
| 127 | 127 | <?php |
| 128 | 128 | // invoke OnUserSettingsRender event |
| 129 | 129 | $evtOut = $modx->invokeEvent('OnUserSettingsRender');
|
| 130 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 130 | + if(is_array($evtOut)) { |
|
| 131 | + echo implode("",$evtOut); |
|
| 132 | + } |
|
| 131 | 133 | ?> |
| 132 | 134 | </td> |
| 133 | 135 | </tr> |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | <tr> |
| 7 | 7 | <td nowrap class="warning"><?php echo $_lang['rb_title']?><br><small>[(use_browser)]</small></td> |
| 8 | 8 | <td> |
| 9 | - <?php echo wrap_label($_lang['yes'],form_radio('use_browser', 1, 'id="rbRowOn"'));?><br />
|
|
| 10 | - <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"'));?>
|
|
| 9 | + <?php echo wrap_label($_lang['yes'], form_radio('use_browser', 1, 'id="rbRowOn"')); ?><br />
|
|
| 10 | + <?php echo wrap_label($_lang['no'], form_radio('use_browser', 0, 'id="rbRowOff"')); ?>
|
|
| 11 | 11 | </td> |
| 12 | 12 | </tr> |
| 13 | 13 | <tr> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | <td colspan="2"><div class="split"></div></td> |
| 19 | 19 | </tr> |
| 20 | 20 | |
| 21 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 21 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 22 | 22 | <td nowrap class="warning"><?php echo $_lang['which_browser_default_title']?><br><small>[(which_browser)]</small></td> |
| 23 | 23 | <td> |
| 24 | 24 | <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;"> |
@@ -27,206 +27,206 @@ discard block |
||
| 27 | 27 | $dir = str_replace('\\', '/', $dir);
|
| 28 | 28 | $browser_name = substr($dir, strrpos($dir, '/') + 1); |
| 29 | 29 | $selected = $browser_name == $which_browser ? ' selected="selected"' : ''; |
| 30 | - echo '<option value="' . $browser_name . '"' . $selected . '>' . "{$browser_name}</option>\n";
|
|
| 30 | + echo '<option value="'.$browser_name.'"'.$selected.'>'."{$browser_name}</option>\n";
|
|
| 31 | 31 | } |
| 32 | 32 | ?> |
| 33 | 33 | </select> |
| 34 | 34 | </td> |
| 35 | 35 | </tr> |
| 36 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 36 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 37 | 37 | <td width="200"> </td> |
| 38 | 38 | <td class="comment"><?php echo $_lang['which_browser_default_msg']?></td> |
| 39 | 39 | </tr> |
| 40 | 40 | <tr> |
| 41 | 41 | <td colspan="2"><div class="split"></div></td> |
| 42 | 42 | </tr> |
| 43 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 43 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 44 | 44 | <td nowrap class="warning"><?php echo $_lang['rb_webuser_title']?><br><small>[(rb_webuser)]</small></td> |
| 45 | 45 | <td> |
| 46 | - <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser=='1' ? 'checked="checked"' : "" ; ?> /> |
|
| 46 | + <label><input type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 47 | 47 | <?php echo $_lang['yes']?></label><br /> |
| 48 | - <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser=='0' ? 'checked="checked"' : "" ; ?> /> |
|
| 48 | + <label><input type="radio" name="rb_webuser" value="0" <?php echo $rb_webuser == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 49 | 49 | <?php echo $_lang['no']?></label> |
| 50 | 50 | </td> |
| 51 | 51 | </tr> |
| 52 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 52 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 53 | 53 | <td width="200"> </td> |
| 54 | 54 | <td class="comment"><?php echo $_lang['rb_webuser_message']?></td> |
| 55 | 55 | </tr> |
| 56 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 56 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 57 | 57 | <td colspan="2"><div class="split"></div></td> |
| 58 | 58 | </tr> |
| 59 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 59 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 60 | 60 | <td nowrap class="warning"><?php echo $_lang['rb_base_dir_title']?><br><small>[(rb_base_dir)]</small></td> |
| 61 | 61 | <td> |
| 62 | 62 | <?php echo $_lang['default']; ?> <span id="default_rb_base_dir">[(base_path)]assets/</span><br /> |
| 63 | 63 | <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_dir" id="rb_base_dir" value="<?php echo $rb_base_dir; ?>" /> <input type="button" onclick="reset_path('rb_base_dir');" value="<?php echo $_lang['reset']; ?>" name="reset_rb_base_dir">
|
| 64 | 64 | </td> |
| 65 | 65 | </tr> |
| 66 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 66 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 67 | 67 | <td width="200"> </td> |
| 68 | 68 | <td class="comment"><?php echo $_lang['rb_base_dir_message']?></td> |
| 69 | 69 | </tr> |
| 70 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 70 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 71 | 71 | <td colspan="2"><div class="split"></div></td> |
| 72 | 72 | </tr> |
| 73 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 73 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 74 | 74 | <td nowrap class="warning"><?php echo $_lang['rb_base_url_title']?><br><small>[(rb_base_url)]</small></td> |
| 75 | 75 | <td> |
| 76 | 76 | <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="rb_base_url" value="<?php echo $rb_base_url; ?>" /> |
| 77 | 77 | </td> |
| 78 | 78 | </tr> |
| 79 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 79 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 80 | 80 | <td width="200"> </td> |
| 81 | 81 | <td class="comment"><?php echo $_lang['rb_base_url_message']?></td> |
| 82 | 82 | </tr> |
| 83 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 83 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 84 | 84 | <td colspan="2"><div class="split"></div></td> |
| 85 | 85 | </tr> |
| 86 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 86 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 87 | 87 | <td nowrap class="warning"><?php echo $_lang['clean_uploaded_filename']?><br><small>[(clean_uploaded_filename)]</small></td> |
| 88 | 88 | <td> |
| 89 | - <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename=='1' ? 'checked="checked"' : "" ; ?> /> |
|
| 89 | + <label><input type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 90 | 90 | <?php echo $_lang['yes']?></label><br /> |
| 91 | - <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename=='0' ? 'checked="checked"' : "" ; ?> /> |
|
| 91 | + <label><input type="radio" name="clean_uploaded_filename" value="0" <?php echo $clean_uploaded_filename == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 92 | 92 | <?php echo $_lang['no']?></label> |
| 93 | 93 | </td> |
| 94 | 94 | </tr> |
| 95 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 95 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 96 | 96 | <td width="200"> </td> |
| 97 | - <td class="comment"><?php echo $_lang['clean_uploaded_filename_message'];?></td> |
|
| 97 | + <td class="comment"><?php echo $_lang['clean_uploaded_filename_message']; ?></td> |
|
| 98 | 98 | </tr> |
| 99 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 99 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 100 | 100 | <td colspan="2"><div class="split"></div></td> |
| 101 | 101 | </tr> |
| 102 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 102 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 103 | 103 | <td nowrap class="warning"><?php echo $_lang['settings_strip_image_paths_title']?><br><small>[(strip_image_paths)]</small></td> |
| 104 | 104 | <td> |
| 105 | - <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths=='1' ? 'checked="checked"' : "" ; ?> /> |
|
| 105 | + <label><input type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 106 | 106 | <?php echo $_lang['yes']?></label><br /> |
| 107 | - <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths=='0' ? 'checked="checked"' : "" ; ?> /> |
|
| 107 | + <label><input type="radio" name="strip_image_paths" value="0" <?php echo $strip_image_paths == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 108 | 108 | <?php echo $_lang['no']?></label> |
| 109 | 109 | </td> |
| 110 | 110 | </tr> |
| 111 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 111 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 112 | 112 | <td width="200"> </td> |
| 113 | 113 | <td class="comment"><?php echo $_lang['settings_strip_image_paths_message']?></td> |
| 114 | 114 | </tr> |
| 115 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 115 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 116 | 116 | <td colspan="2"><div class="split"></div></td> |
| 117 | 117 | </tr> |
| 118 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 118 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 119 | 119 | <td nowrap class="warning"><?php echo $_lang['maxImageWidth']?><br><small>[(maxImageWidth)]</small></td> |
| 120 | 120 | <td> |
| 121 | 121 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageWidth" value="<?php echo $maxImageWidth; ?>" /> |
| 122 | 122 | </td> |
| 123 | 123 | </tr> |
| 124 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 124 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 125 | 125 | <td width="200"> </td> |
| 126 | 126 | <td class="comment"><?php echo $_lang['maxImageWidth_message']?></td> |
| 127 | 127 | </tr> |
| 128 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 128 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 129 | 129 | <td colspan="2"><div class="split"></div></td> |
| 130 | 130 | </tr> |
| 131 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 131 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 132 | 132 | <td nowrap class="warning"><?php echo $_lang['maxImageHeight']?><br><small>[(maxImageHeight)]</small></td> |
| 133 | 133 | <td> |
| 134 | 134 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="maxImageHeight" value="<?php echo $maxImageHeight; ?>" /> |
| 135 | 135 | </td> |
| 136 | 136 | </tr> |
| 137 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 137 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 138 | 138 | <td width="200"> </td> |
| 139 | 139 | <td class="comment"><?php echo $_lang['maxImageHeight_message']?></td> |
| 140 | 140 | </tr> |
| 141 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 141 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 142 | 142 | <td colspan="2"><div class="split"></div></td> |
| 143 | 143 | </tr> |
| 144 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 144 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 145 | 145 | <td nowrap class="warning"><?php echo $_lang['thumbWidth']?><br><small>[(thumbWidth)]</small></td> |
| 146 | 146 | <td> |
| 147 | 147 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbWidth" value="<?php echo $thumbWidth; ?>" /> |
| 148 | 148 | </td> |
| 149 | 149 | </tr> |
| 150 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 150 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 151 | 151 | <td width="200"> </td> |
| 152 | 152 | <td class="comment"><?php echo $_lang['thumbWidth_message']?></td> |
| 153 | 153 | </tr> |
| 154 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 154 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 155 | 155 | <td colspan="2"><div class="split"></div></td> |
| 156 | 156 | </tr> |
| 157 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 157 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 158 | 158 | <td nowrap class="warning"><?php echo $_lang['thumbHeight']?><br><small>[(thumbHeight)]</small></td> |
| 159 | 159 | <td> |
| 160 | 160 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="thumbHeight" value="<?php echo $thumbHeight; ?>" /> |
| 161 | 161 | </td> |
| 162 | 162 | </tr> |
| 163 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 163 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 164 | 164 | <td width="200"> </td> |
| 165 | 165 | <td class="comment"><?php echo $_lang['thumbHeight_message']?></td> |
| 166 | 166 | </tr> |
| 167 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 167 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 168 | 168 | <td colspan="2"><div class="split"></div></td> |
| 169 | 169 | </tr> |
| 170 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 170 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 171 | 171 | <td nowrap class="warning"><?php echo $_lang['thumbsDir']?><br><small>[(thumbsDir)]</small></td> |
| 172 | 172 | <td> |
| 173 | 173 | <input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="thumbsDir" value="<?php echo $thumbsDir; ?>" /> |
| 174 | 174 | </td> |
| 175 | 175 | </tr> |
| 176 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 176 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 177 | 177 | <td width="200"> </td> |
| 178 | 178 | <td class="comment"><?php echo $_lang['thumbsDir_message']?></td> |
| 179 | 179 | </tr> |
| 180 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 180 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 181 | 181 | <td colspan="2"><div class="split"></div></td> |
| 182 | 182 | </tr> |
| 183 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 183 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 184 | 184 | <td nowrap class="warning"><?php echo $_lang['jpegQuality']?><br><small>[(jpegQuality)]</small></td> |
| 185 | 185 | <td> |
| 186 | 186 | <input onchange="documentDirty=true;" type="text" maxlength="4" style="width: 50px;" name="jpegQuality" value="<?php echo $jpegQuality; ?>" /> |
| 187 | 187 | </td> |
| 188 | 188 | </tr> |
| 189 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 189 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 190 | 190 | <td width="200"> </td> |
| 191 | 191 | <td class="comment"><?php echo $_lang['jpegQuality_message']?></td> |
| 192 | 192 | </tr> |
| 193 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 193 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 194 | 194 | <td colspan="2"><div class="split"></div></td> |
| 195 | 195 | </tr> |
| 196 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 196 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 197 | 197 | <td nowrap class="warning"><?php echo $_lang['denyZipDownload'] ?><br><small>[(denyZipDownload)]</small></td> |
| 198 | 198 | <td> |
| 199 | - <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload=='0' ? 'checked="checked"' : ""; ?> /> |
|
| 199 | + <label><input type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 200 | 200 | <?php echo $_lang['no']?></label><br /> |
| 201 | - <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload=='1' ? 'checked="checked"' : ""; ?> /> |
|
| 201 | + <label><input type="radio" name="denyZipDownload" value="1" <?php echo $denyZipDownload == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 202 | 202 | <?php echo $_lang['yes']?></label> |
| 203 | 203 | </td> |
| 204 | 204 | </tr> |
| 205 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 205 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 206 | 206 | <td colspan="2"><div class="split"></div></td> |
| 207 | 207 | </tr> |
| 208 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 208 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 209 | 209 | <td nowrap class="warning"><?php echo $_lang['denyExtensionRename'] ?><br><small>[(denyExtensionRename)]</small></td> |
| 210 | 210 | <td> |
| 211 | - <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename=='0' ? 'checked="checked"' : ""; ?> /> |
|
| 211 | + <label><input type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 212 | 212 | <?php echo $_lang['no']?></label><br /> |
| 213 | - <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename=='1' ? 'checked="checked"' : ""; ?> /> |
|
| 213 | + <label><input type="radio" name="denyExtensionRename" value="1" <?php echo $denyExtensionRename == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 214 | 214 | <?php echo $_lang['yes']?></label> |
| 215 | 215 | </td> |
| 216 | 216 | </tr> |
| 217 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 217 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 218 | 218 | <td colspan="2"><div class="split"></div></td> |
| 219 | 219 | </tr> |
| 220 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 220 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 221 | 221 | <td nowrap class="warning"><?php echo $_lang['showHiddenFiles'] ?><br><small>[(showHiddenFiles)]</small></td> |
| 222 | 222 | <td> |
| 223 | - <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles=='0' ? 'checked="checked"' : ""; ?> /> |
|
| 223 | + <label><input type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles == '0' ? 'checked="checked"' : ""; ?> /> |
|
| 224 | 224 | <?php echo $_lang['no']?></label><br /> |
| 225 | - <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles=='1' ? 'checked="checked"' : ""; ?> /> |
|
| 225 | + <label><input type="radio" name="showHiddenFiles" value="1" <?php echo $showHiddenFiles == '1' ? 'checked="checked"' : ""; ?> /> |
|
| 226 | 226 | <?php echo $_lang['yes']?></label> |
| 227 | 227 | </td> |
| 228 | 228 | </tr> |
| 229 | - <tr class="rbRow" <?php echo showHide($use_browser==1);?>> |
|
| 229 | + <tr class="rbRow" <?php echo showHide($use_browser == 1); ?>> |
|
| 230 | 230 | <td colspan="2"><div class="split"></div></td> |
| 231 | 231 | </tr> |
| 232 | 232 | |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | <?php |
| 236 | 236 | // invoke OnMiscSettingsRender event |
| 237 | 237 | $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
|
| 238 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 238 | + if (is_array($evtOut)) echo implode("", $evtOut);
|
|
| 239 | 239 | ?> |
| 240 | 240 | </td> |
| 241 | 241 | </tr> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <td> |
| 24 | 24 | <select name="which_browser" size="1" class="inputBox" onchange="documentDirty=true;"> |
| 25 | 25 | <?php |
| 26 | - foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) {
|
|
| 26 | + foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) { |
|
| 27 | 27 | $dir = str_replace('\\', '/', $dir);
|
| 28 | 28 | $browser_name = substr($dir, strrpos($dir, '/') + 1); |
| 29 | 29 | $selected = $browser_name == $which_browser ? ' selected="selected"' : ''; |
@@ -235,7 +235,9 @@ discard block |
||
| 235 | 235 | <?php |
| 236 | 236 | // invoke OnMiscSettingsRender event |
| 237 | 237 | $evtOut = $modx->invokeEvent('OnMiscSettingsRender');
|
| 238 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 238 | + if(is_array($evtOut)) { |
|
| 239 | + echo implode("",$evtOut); |
|
| 240 | + } |
|
| 239 | 241 | ?> |
| 240 | 242 | </td> |
| 241 | 243 | </tr> |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | $themename = $file; |
| 58 | 58 | $selectedtext = $themename == $manager_theme ? "selected='selected'" : ""; |
| 59 | - echo "<option value='$themename' $selectedtext>" . ucwords(str_replace("_", " ", $themename)) . "</option>";
|
|
| 59 | + echo "<option value='$themename' $selectedtext>".ucwords(str_replace("_", " ", $themename))."</option>";
|
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | $dir->close(); |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | <td> |
| 207 | 207 | <select name="group_tvs" size="1" class="form-control"> |
| 208 | 208 | <?php |
| 209 | - $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n"; |
|
| 209 | + $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>'."\n"; |
|
| 210 | 210 | $option = explode(',', $_lang['settings_group_tv_options']);
|
| 211 | 211 | $output = array(); |
| 212 | 212 | foreach ($option as $k => $v) {
|
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | <td> |
| 280 | 280 | <select name="resource_tree_node_name" size="1" class="inputBox"> |
| 281 | 281 | <?php |
| 282 | - $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n"; |
|
| 282 | + $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>'."\n"; |
|
| 283 | 283 | $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
|
| 284 | 284 | $output = array(); |
| 285 | 285 | foreach ($option as $v) {
|
@@ -365,8 +365,8 @@ discard block |
||
| 365 | 365 | $str = ''; |
| 366 | 366 | foreach ($datetime_format_list as $value) {
|
| 367 | 367 | $selectedtext = ($datetime_format == $value) ? ' selected' : ''; |
| 368 | - $str .= '<option value="' . $value . '"' . $selectedtext . '>'; |
|
| 369 | - $str .= $value . '</option>' . PHP_EOL; |
|
| 368 | + $str .= '<option value="'.$value.'"'.$selectedtext.'>'; |
|
| 369 | + $str .= $value.'</option>'.PHP_EOL; |
|
| 370 | 370 | } |
| 371 | 371 | echo $str; |
| 372 | 372 | ?> |
@@ -476,10 +476,10 @@ discard block |
||
| 476 | 476 | <select name="which_editor" onChange="documentDirty=true;"> |
| 477 | 477 | <?php |
| 478 | 478 | // invoke OnRichTextEditorRegister event |
| 479 | - echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n"; |
|
| 479 | + echo "<option value='none'".($which_editor == 'none' ? " selected='selected'" : "").">".$_lang['none']."</option>\n"; |
|
| 480 | 480 | if (is_array($evtOut)) {
|
| 481 | 481 | foreach ($evtOut as $editor) {
|
| 482 | - echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; |
|
| 482 | + echo "<option value='$editor'".($which_editor == $editor ? " selected='selected'" : "").">$editor</option>\n"; |
|
| 483 | 483 | } |
| 484 | 484 | } |
| 485 | 485 | ?> |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | <select name="manager_theme" size="1" class="inputBox" onChange="documentDirty=true; document.forms['settings'].theme_refresher.value = Date.parse(new Date());"> |
| 50 | 50 | <?php |
| 51 | 51 | $dir = dir("media/style/");
|
| 52 | - while ($file = $dir->read()) {
|
|
| 53 | - if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') {
|
|
| 54 | - if ($file === 'common') {
|
|
| 52 | + while ($file = $dir->read()) { |
|
| 53 | + if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') { |
|
| 54 | + if ($file === 'common') { |
|
| 55 | 55 | continue; |
| 56 | 56 | } |
| 57 | 57 | $themename = $file; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n"; |
| 210 | 210 | $option = explode(',', $_lang['settings_group_tv_options']);
|
| 211 | 211 | $output = array(); |
| 212 | - foreach ($option as $k => $v) {
|
|
| 212 | + foreach ($option as $k => $v) { |
|
| 213 | 213 | $selected = ($k == $group_tvs) ? 'selected' : ''; |
| 214 | 214 | $s = array('[+value+]', '[+selected+]', '[+title+]');
|
| 215 | 215 | $r = array($k, $selected, $v); |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n"; |
| 283 | 283 | $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
|
| 284 | 284 | $output = array(); |
| 285 | - foreach ($option as $v) {
|
|
| 285 | + foreach ($option as $v) { |
|
| 286 | 286 | $selected = ($v == $resource_tree_node_name) ? 'selected' : ''; |
| 287 | 287 | $s = array('[+value+]', '[+selected+]');
|
| 288 | 288 | $r = array($v, $selected); |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | <?php |
| 364 | 364 | $datetime_format_list = array('dd-mm-YYYY', 'mm/dd/YYYY', 'YYYY/mm/dd');
|
| 365 | 365 | $str = ''; |
| 366 | - foreach ($datetime_format_list as $value) {
|
|
| 366 | + foreach ($datetime_format_list as $value) { |
|
| 367 | 367 | $selectedtext = ($datetime_format == $value) ? ' selected' : ''; |
| 368 | 368 | $str .= '<option value="' . $value . '"' . $selectedtext . '>'; |
| 369 | 369 | $str .= $value . '</option>' . PHP_EOL; |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | <?php |
| 446 | 446 | // invoke OnRichTextEditorRegister event |
| 447 | 447 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister');
|
| 448 | - if (!is_array($evtOut)) {
|
|
| 448 | + if (!is_array($evtOut)) { |
|
| 449 | 449 | $evtOut = array(); |
| 450 | 450 | $use_editor = 0; |
| 451 | 451 | } |
@@ -477,8 +477,8 @@ discard block |
||
| 477 | 477 | <?php |
| 478 | 478 | // invoke OnRichTextEditorRegister event |
| 479 | 479 | echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n"; |
| 480 | - if (is_array($evtOut)) {
|
|
| 481 | - foreach ($evtOut as $editor) {
|
|
| 480 | + if (is_array($evtOut)) { |
|
| 481 | + foreach ($evtOut as $editor) { |
|
| 482 | 482 | echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; |
| 483 | 483 | } |
| 484 | 484 | } |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | <?php |
| 535 | 535 | // invoke OnInterfaceSettingsRender event |
| 536 | 536 | $evtOut = $modx->invokeEvent('OnInterfaceSettingsRender');
|
| 537 | - if (is_array($evtOut)) {
|
|
| 537 | + if (is_array($evtOut)) { |
|
| 538 | 538 | echo implode("", $evtOut);
|
| 539 | 539 | } |
| 540 | 540 | ?> |