@@ -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 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default']; |
|
| 2 | + $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default']; |
|
| 3 | 3 | ?> |
| 4 | 4 | <style> |
| 5 | 5 | table.sysSettings > tbody td, table.sysSettings > tbody th {border-bottom:1px dotted #ccc;padding:10px;}
|
@@ -135,8 +135,8 @@ discard block |
||
| 135 | 135 | <?php |
| 136 | 136 | // Check if PHX is enabled |
| 137 | 137 | $count = $modx->db->getRecordCount( |
| 138 | - $modx->db->select('id', '[+prefix+]site_plugins',
|
|
| 139 | - "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
|
| 138 | + $modx->db->select('id', '[+prefix+]site_plugins',
|
|
| 139 | + "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
|
| 140 | 140 | ); |
| 141 | 141 | if($count) {
|
| 142 | 142 | $disabledFilters = 1; |
@@ -259,14 +259,14 @@ discard block |
||
| 259 | 259 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
| 260 | 260 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
| 261 | 261 | <?php |
| 262 | - for($i=-24; $i<25; $i++) {
|
|
| 263 | - $seconds = $i*60*60; |
|
| 264 | - $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
|
| 265 | - ?> |
|
| 262 | + for($i=-24; $i<25; $i++) {
|
|
| 263 | + $seconds = $i*60*60; |
|
| 264 | + $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
|
| 265 | + ?> |
|
| 266 | 266 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> |
| 267 | 267 | <?php |
| 268 | - } |
|
| 269 | - ?> |
|
| 268 | + } |
|
| 269 | + ?> |
|
| 270 | 270 | </select> |
| 271 | 271 | <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div>
|
| 272 | 272 | </td> |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | <tr> |
| 14 | 14 | <th><?php echo $_lang['sitestatus_title'] ?><br><small>[(site_status)]</small></th> |
| 15 | 15 | <td> |
| 16 | - <?php echo wrap_label($_lang['online'], form_radio('site_status', 1));?><br />
|
|
| 17 | - <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0));?>
|
|
| 16 | + <?php echo wrap_label($_lang['online'], form_radio('site_status', 1)); ?><br />
|
|
| 17 | + <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0)); ?>
|
|
| 18 | 18 | </td> |
| 19 | 19 | </tr> |
| 20 | 20 | <tr> |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | <br /> |
| 59 | 59 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
| 60 | 60 | <select name="reload_site_unavailable" id="reload_site_unavailable_select" onchange="confirmLangChange(this, 'siteunavailable_message_default', 'site_unavailable_message_textarea');"> |
| 61 | -<?php echo get_lang_options('siteunavailable_message_default');?>
|
|
| 61 | +<?php echo get_lang_options('siteunavailable_message_default'); ?>
|
|
| 62 | 62 | </select> |
| 63 | 63 | </th> |
| 64 | 64 | <td> <textarea name="site_unavailable_message" id="site_unavailable_message_textarea" style="width:100%; height: 120px;"><?php echo $site_unavailable_message_view; ?></textarea> |
| 65 | - <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']);?>" /> |
|
| 66 | - <div class="comment"><?php echo $_lang['siteunavailable_message'];?></div> |
|
| 65 | + <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']); ?>" /> |
|
| 66 | + <div class="comment"><?php echo $_lang['siteunavailable_message']; ?></div> |
|
| 67 | 67 | </td> |
| 68 | 68 | </tr> |
| 69 | 69 | <tr> |
@@ -78,17 +78,17 @@ discard block |
||
| 78 | 78 | 'c.category, t.templatename ASC' |
| 79 | 79 | ); |
| 80 | 80 | ?> |
| 81 | - <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template;?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px">
|
|
| 81 | + <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template; ?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px">
|
|
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | 84 | $currentCategory = ''; |
| 85 | 85 | while ($row = $modx->db->getRow($rs)) {
|
| 86 | 86 | $thisCategory = $row['category']; |
| 87 | - if($thisCategory == null) {
|
|
| 87 | + if ($thisCategory == null) {
|
|
| 88 | 88 | $thisCategory = $_lang['no_category']; |
| 89 | 89 | } |
| 90 | - if($thisCategory != $currentCategory) {
|
|
| 91 | - if($closeOptGroup) {
|
|
| 90 | + if ($thisCategory != $currentCategory) {
|
|
| 91 | + if ($closeOptGroup) {
|
|
| 92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
| 93 | 93 | } |
| 94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; |
| 107 | 107 | $currentCategory = $thisCategory; |
| 108 | 108 | } |
| 109 | - if($thisCategory != '') {
|
|
| 109 | + if ($thisCategory != '') {
|
|
| 110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -114,19 +114,19 @@ discard block |
||
| 114 | 114 | <br /> |
| 115 | 115 | <div id="template_reset_options_wrapper" style="display:none;"> |
| 116 | 116 | <label><input type="radio" name="reset_template" value="1" /> <?php echo $_lang['template_reset_all']; ?></label><br /> |
| 117 | - <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'],$oldTmpName); ?></label> |
|
| 117 | + <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'], $oldTmpName); ?></label> |
|
| 118 | 118 | </div> |
| 119 | 119 | <input type="hidden" name="old_template" value="<?php echo $oldTmpId; ?>" /> |
| 120 | 120 | <div class="comment"><?php echo $_lang['defaulttemplate_message'] ?></div> |
| 121 | 121 | </td> |
| 122 | 122 | </tr> |
| 123 | 123 | <tr> |
| 124 | - <th><?php echo $_lang['defaulttemplate_logic_title'];?><br><small>[(auto_template_logic)]</small></th> |
|
| 124 | + <th><?php echo $_lang['defaulttemplate_logic_title']; ?><br><small>[(auto_template_logic)]</small></th> |
|
| 125 | 125 | <td> |
| 126 | - <p><?php echo $_lang['defaulttemplate_logic_general_message'];?></p> |
|
| 127 | - <label><input type="radio" name="auto_template_logic" value="system"<?php if($auto_template_logic == 'system') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br />
|
|
| 128 | - <label><input type="radio" name="auto_template_logic" value="parent"<?php if($auto_template_logic == 'parent') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br />
|
|
| 129 | - <label><input type="radio" name="auto_template_logic" value="sibling"<?php if($auto_template_logic == 'sibling') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br />
|
|
| 126 | + <p><?php echo $_lang['defaulttemplate_logic_general_message']; ?></p> |
|
| 127 | + <label><input type="radio" name="auto_template_logic" value="system"<?php if ($auto_template_logic == 'system') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br />
|
|
| 128 | + <label><input type="radio" name="auto_template_logic" value="parent"<?php if ($auto_template_logic == 'parent') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br />
|
|
| 129 | + <label><input type="radio" name="auto_template_logic" value="sibling"<?php if ($auto_template_logic == 'sibling') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br />
|
|
| 130 | 130 | </td> |
| 131 | 131 | </tr> |
| 132 | 132 | <tr> |
@@ -138,22 +138,22 @@ discard block |
||
| 138 | 138 | $modx->db->select('id', '[+prefix+]site_plugins',
|
| 139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
| 140 | 140 | ); |
| 141 | - if($count) {
|
|
| 141 | + if ($count) {
|
|
| 142 | 142 | $disabledFilters = 1; |
| 143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
| 144 | 144 | } |
| 145 | 145 | else $disabledFilters = false; |
| 146 | 146 | ?> |
| 147 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
|
|
| 148 | - <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
|
|
| 147 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_filter', 1, '', $disabledFilters)); ?><br />
|
|
| 148 | + <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters)); ?>
|
|
| 149 | 149 | <div class="comment"><?php echo $_lang['enable_filter_message']; ?></div> |
| 150 | 150 | </td> |
| 151 | 151 | </tr> |
| 152 | 152 | <tr> |
| 153 | 153 | <th><?php echo $_lang['enable_at_syntax_title'] ?><br><small>[(enable_at_syntax)]</small></th> |
| 154 | 154 | <td > |
| 155 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_at_syntax', 1));?><br />
|
|
| 156 | - <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0));?>
|
|
| 155 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_at_syntax', 1)); ?><br />
|
|
| 156 | + <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0)); ?>
|
|
| 157 | 157 | <div class="comment"> |
| 158 | 158 | <?php echo $_lang['enable_at_syntax_message']; ?> |
| 159 | 159 | <ul> |
@@ -167,8 +167,8 @@ discard block |
||
| 167 | 167 | <tr> |
| 168 | 168 | <th><?php echo $_lang['defaultpublish_title'] ?><br><small>[(publish_default)]</small></th> |
| 169 | 169 | <td> |
| 170 | - <?php echo wrap_label($_lang['yes'],form_radio('publish_default', 1));?><br />
|
|
| 171 | - <?php echo wrap_label($_lang['no'],form_radio('publish_default', 0));?>
|
|
| 170 | + <?php echo wrap_label($_lang['yes'], form_radio('publish_default', 1)); ?><br />
|
|
| 171 | + <?php echo wrap_label($_lang['no'], form_radio('publish_default', 0)); ?>
|
|
| 172 | 172 | <div class="comment"><?php echo $_lang['defaultpublish_message'] ?></div> |
| 173 | 173 | </td> |
| 174 | 174 | </tr> |
@@ -176,24 +176,24 @@ discard block |
||
| 176 | 176 | <tr> |
| 177 | 177 | <th><?php echo $_lang['defaultcache_title'] ?><br><small>[(cache_default)]</small></th> |
| 178 | 178 | <td> |
| 179 | - <?php echo wrap_label($_lang['yes'],form_radio('cache_default', 1));?><br />
|
|
| 180 | - <?php echo wrap_label($_lang['no'],form_radio('cache_default', 0));?>
|
|
| 179 | + <?php echo wrap_label($_lang['yes'], form_radio('cache_default', 1)); ?><br />
|
|
| 180 | + <?php echo wrap_label($_lang['no'], form_radio('cache_default', 0)); ?>
|
|
| 181 | 181 | <div class="comment"><?php echo $_lang['defaultcache_message'] ?></div> |
| 182 | 182 | </td> |
| 183 | 183 | </tr> |
| 184 | 184 | <tr> |
| 185 | 185 | <th><?php echo $_lang['defaultsearch_title'] ?><br><small>[(search_default)]</small></th> |
| 186 | 186 | <td> |
| 187 | - <?php echo wrap_label($_lang['yes'],form_radio('search_default', 1));?><br />
|
|
| 188 | - <?php echo wrap_label($_lang['no'],form_radio('search_default', 0));?>
|
|
| 187 | + <?php echo wrap_label($_lang['yes'], form_radio('search_default', 1)); ?><br />
|
|
| 188 | + <?php echo wrap_label($_lang['no'], form_radio('search_default', 0)); ?>
|
|
| 189 | 189 | <div class="comment"><?php echo $_lang['defaultsearch_message'] ?></div> |
| 190 | 190 | </td> |
| 191 | 191 | </tr> |
| 192 | 192 | <tr> |
| 193 | 193 | <th><?php echo $_lang['defaultmenuindex_title'] ?><br><small>[(auto_menuindex)]</small></th> |
| 194 | 194 | <td> |
| 195 | - <?php echo wrap_label($_lang['yes'],form_radio('auto_menuindex', 1));?><br />
|
|
| 196 | - <?php echo wrap_label($_lang['no'],form_radio('auto_menuindex', 0));?>
|
|
| 195 | + <?php echo wrap_label($_lang['yes'], form_radio('auto_menuindex', 1)); ?><br />
|
|
| 196 | + <?php echo wrap_label($_lang['no'], form_radio('auto_menuindex', 0)); ?>
|
|
| 197 | 197 | <div class="comment"><?php echo $_lang['defaultmenuindex_message'] ?></div> |
| 198 | 198 | </td> |
| 199 | 199 | </tr> |
@@ -203,8 +203,8 @@ discard block |
||
| 203 | 203 | <table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"> |
| 204 | 204 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
| 205 | 205 | <?php |
| 206 | - $ct = explode(",",$custom_contenttype);
|
|
| 207 | - for($i=0;$i<count($ct);$i++) {
|
|
| 206 | + $ct = explode(",", $custom_contenttype);
|
|
| 207 | + for ($i = 0; $i < count($ct); $i++) {
|
|
| 208 | 208 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; |
| 209 | 209 | } |
| 210 | 210 | ?> |
@@ -218,14 +218,14 @@ discard block |
||
| 218 | 218 | <th><?php echo $_lang['docid_incrmnt_method_title'] ?><br><small>[(docid_incrmnt_method)]</small></th> |
| 219 | 219 | <td> |
| 220 | 220 | <label><input type="radio" name="docid_incrmnt_method" value="0" |
| 221 | - <?php echo ($docid_incrmnt_method=='0') ? 'checked="checked"' : "" ; ?> /> |
|
| 221 | + <?php echo ($docid_incrmnt_method == '0') ? 'checked="checked"' : ""; ?> /> |
|
| 222 | 222 | <?php echo $_lang['docid_incrmnt_method_0']?></label><br /> |
| 223 | 223 | |
| 224 | 224 | <label><input type="radio" name="docid_incrmnt_method" value="1" |
| 225 | - <?php echo ($docid_incrmnt_method=='1') ? 'checked="checked"' : "" ; ?> /> |
|
| 225 | + <?php echo ($docid_incrmnt_method == '1') ? 'checked="checked"' : ""; ?> /> |
|
| 226 | 226 | <?php echo $_lang['docid_incrmnt_method_1']?></label><br /> |
| 227 | 227 | <label><input type="radio" name="docid_incrmnt_method" value="2" |
| 228 | - <?php echo ($docid_incrmnt_method=='2') ? 'checked="checked"' : "" ; ?> /> |
|
| 228 | + <?php echo ($docid_incrmnt_method == '2') ? 'checked="checked"' : ""; ?> /> |
|
| 229 | 229 | <?php echo $_lang['docid_incrmnt_method_2']?></label><br /> |
| 230 | 230 | </td> |
| 231 | 231 | </tr> |
@@ -233,24 +233,24 @@ discard block |
||
| 233 | 233 | <tr> |
| 234 | 234 | <th><?php echo $_lang['enable_cache_title'] ?><br><small>[(enable_cache)]</small></th> |
| 235 | 235 | <td> |
| 236 | - <?php echo wrap_label($_lang['enabled'],form_radio('enable_cache', 1));?><br />
|
|
| 237 | - <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0));?><br />
|
|
| 238 | - <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2));?>
|
|
| 236 | + <?php echo wrap_label($_lang['enabled'], form_radio('enable_cache', 1)); ?><br />
|
|
| 237 | + <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0)); ?><br />
|
|
| 238 | + <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2)); ?>
|
|
| 239 | 239 | </td> |
| 240 | 240 | </tr> |
| 241 | 241 | |
| 242 | 242 | <tr> |
| 243 | 243 | <th><?php echo $_lang['cache_type_title'] ?><br><small>[(cache_type)]</small></th> |
| 244 | 244 | <td> |
| 245 | -<?php echo wrap_label($_lang['cache_type_1'],form_radio('cache_type', 1));?><br />
|
|
| 246 | -<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2));?>
|
|
| 245 | +<?php echo wrap_label($_lang['cache_type_1'], form_radio('cache_type', 1)); ?><br />
|
|
| 246 | +<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2)); ?>
|
|
| 247 | 247 | </td> |
| 248 | 248 | </tr> |
| 249 | 249 | <tr> |
| 250 | 250 | <th><?php echo $_lang['minifyphp_incache_title'] ?><br><small>[(minifyphp_incache)]</small></th> |
| 251 | 251 | <td> |
| 252 | -<?php echo wrap_label($_lang['enabled'],form_radio('minifyphp_incache', 1));?><br />
|
|
| 253 | -<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0));?>
|
|
| 252 | +<?php echo wrap_label($_lang['enabled'], form_radio('minifyphp_incache', 1)); ?><br />
|
|
| 253 | +<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0)); ?>
|
|
| 254 | 254 | <div class="comment"><?php echo $_lang['minifyphp_incache_message'] ?></div> |
| 255 | 255 | </td> |
| 256 | 256 | </tr> |
@@ -259,23 +259,23 @@ discard block |
||
| 259 | 259 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
| 260 | 260 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
| 261 | 261 | <?php |
| 262 | - for($i=-24; $i<25; $i++) {
|
|
| 263 | - $seconds = $i*60*60; |
|
| 264 | - $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
|
| 262 | + for ($i = -24; $i < 25; $i++) {
|
|
| 263 | + $seconds = $i * 60 * 60; |
|
| 264 | + $selectedtext = $seconds == $server_offset_time ? "selected='selected'" : ""; |
|
| 265 | 265 | ?> |
| 266 | 266 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> |
| 267 | 267 | <?php |
| 268 | 268 | } |
| 269 | 269 | ?> |
| 270 | 270 | </select> |
| 271 | - <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div>
|
|
| 271 | + <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time() + $server_offset_time)); ?></div>
|
|
| 272 | 272 | </td> |
| 273 | 273 | </tr> |
| 274 | 274 | <tr> |
| 275 | 275 | <th><?php echo $_lang['server_protocol_title'] ?><br><small>[(server_protocol)]</small></th> |
| 276 | 276 | <td> |
| 277 | - <?php echo wrap_label($_lang['server_protocol_http'],form_radio('server_protocol', 'http'));?><br />
|
|
| 278 | - <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https'));?>
|
|
| 277 | + <?php echo wrap_label($_lang['server_protocol_http'], form_radio('server_protocol', 'http')); ?><br />
|
|
| 278 | + <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https')); ?>
|
|
| 279 | 279 | <div class="comment"><?php echo $_lang['server_protocol_message'] ?></div> |
| 280 | 280 | </td> |
| 281 | 281 | </tr> |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | <?php |
| 297 | 297 | // invoke OnSiteSettingsRender event |
| 298 | 298 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
|
| 299 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 299 | + if (is_array($evtOut)) echo implode("", $evtOut);
|
|
| 300 | 300 | ?> |
| 301 | 301 | </td> |
| 302 | 302 | </tr> |
@@ -82,23 +82,23 @@ discard block |
||
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | 84 | $currentCategory = ''; |
| 85 | - while ($row = $modx->db->getRow($rs)) {
|
|
| 85 | + while ($row = $modx->db->getRow($rs)) { |
|
| 86 | 86 | $thisCategory = $row['category']; |
| 87 | - if($thisCategory == null) {
|
|
| 87 | + if($thisCategory == null) { |
|
| 88 | 88 | $thisCategory = $_lang['no_category']; |
| 89 | 89 | } |
| 90 | - if($thisCategory != $currentCategory) {
|
|
| 91 | - if($closeOptGroup) {
|
|
| 90 | + if($thisCategory != $currentCategory) { |
|
| 91 | + if($closeOptGroup) { |
|
| 92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
| 93 | 93 | } |
| 94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
| 95 | 95 | $closeOptGroup = true; |
| 96 | - } else {
|
|
| 96 | + } else { |
|
| 97 | 97 | $closeOptGroup = false; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : ''; |
| 101 | - if ($selectedtext) {
|
|
| 101 | + if ($selectedtext) { |
|
| 102 | 102 | $oldTmpId = $row['id']; |
| 103 | 103 | $oldTmpName = $row['templatename']; |
| 104 | 104 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; |
| 107 | 107 | $currentCategory = $thisCategory; |
| 108 | 108 | } |
| 109 | - if($thisCategory != '') {
|
|
| 109 | + if($thisCategory != '') { |
|
| 110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -138,11 +138,12 @@ discard block |
||
| 138 | 138 | $modx->db->select('id', '[+prefix+]site_plugins',
|
| 139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
| 140 | 140 | ); |
| 141 | - if($count) {
|
|
| 141 | + if($count) { |
|
| 142 | 142 | $disabledFilters = 1; |
| 143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
| 144 | - } |
|
| 145 | - else $disabledFilters = false; |
|
| 144 | + } else { |
|
| 145 | + $disabledFilters = false; |
|
| 146 | + } |
|
| 146 | 147 | ?> |
| 147 | 148 | <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
|
| 148 | 149 | <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
|
@@ -204,7 +205,7 @@ discard block |
||
| 204 | 205 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
| 205 | 206 | <?php |
| 206 | 207 | $ct = explode(",",$custom_contenttype);
|
| 207 | - for($i=0;$i<count($ct);$i++) {
|
|
| 208 | + for($i=0;$i<count($ct);$i++) { |
|
| 208 | 209 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; |
| 209 | 210 | } |
| 210 | 211 | ?> |
@@ -259,7 +260,7 @@ discard block |
||
| 259 | 260 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
| 260 | 261 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
| 261 | 262 | <?php |
| 262 | - for($i=-24; $i<25; $i++) {
|
|
| 263 | + for($i=-24; $i<25; $i++) { |
|
| 263 | 264 | $seconds = $i*60*60; |
| 264 | 265 | $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
| 265 | 266 | ?> |
@@ -296,7 +297,9 @@ discard block |
||
| 296 | 297 | <?php |
| 297 | 298 | // invoke OnSiteSettingsRender event |
| 298 | 299 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
|
| 299 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 300 | + if(is_array($evtOut)) { |
|
| 301 | + echo implode("",$evtOut); |
|
| 302 | + } |
|
| 300 | 303 | ?> |
| 301 | 304 | </td> |
| 302 | 305 | </tr> |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | <tr> |
| 3 | 3 | <td><?php echo $_lang['smtp_auth_title'] ?></td> |
| 4 | 4 | <td> |
| 5 | - <?php echo wrap_label($_lang['yes'],form_radio('smtp_auth','1' ));?><br />
|
|
| 6 | - <?php echo wrap_label($_lang['no'],form_radio('smtp_auth','0' ));?>
|
|
| 5 | + <?php echo wrap_label($_lang['yes'], form_radio('smtp_auth', '1')); ?><br />
|
|
| 6 | + <?php echo wrap_label($_lang['no'], form_radio('smtp_auth', '0')); ?>
|
|
| 7 | 7 | </td> |
| 8 | 8 | </tr> |
| 9 | 9 | <tr> |
@@ -15,8 +15,8 @@ discard block |
||
| 15 | 15 | <td > |
| 16 | 16 | <select name="smtp_secure" size="1" class="inputBox"> |
| 17 | 17 | <option value="none" ><?php echo $_lang['no'] ?></option> |
| 18 | - <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option> |
|
| 19 | - <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option> |
|
| 18 | + <option value="ssl" <?php if ($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option> |
|
| 19 | + <option value="tls" <?php if ($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option> |
|
| 20 | 20 | </select> |
| 21 | 21 | <br /> |
| 22 | 22 | </td> |
@@ -15,8 +15,14 @@ |
||
| 15 | 15 | <td > |
| 16 | 16 | <select name="smtp_secure" size="1" class="inputBox"> |
| 17 | 17 | <option value="none" ><?php echo $_lang['no'] ?></option> |
| 18 | - <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option> |
|
| 19 | - <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option> |
|
| 18 | + <option value="ssl" <?php if($smtp_secure == 'ssl') { |
|
| 19 | + echo "selected='selected'"; |
|
| 20 | +} |
|
| 21 | +?> >SSL</option> |
|
| 22 | + <option value="tls" <?php if($smtp_secure == 'tls') { |
|
| 23 | + echo "selected='selected'"; |
|
| 24 | +} |
|
| 25 | +?> >TLS</option> |
|
| 20 | 26 | </select> |
| 21 | 27 | <br /> |
| 22 | 28 | </td> |
@@ -6,8 +6,8 @@ discard block |
||
| 6 | 6 | <tr> |
| 7 | 7 | <td nowrap class="warning" valign="top"><?php echo $_lang['friendlyurls_title'] ?><br><small>[(friendly_urls)]</small></td> |
| 8 | 8 | <td> |
| 9 | - <?php echo wrap_label($_lang['yes'],form_radio('friendly_urls', 1, 'id="furlRowOn"'));?><br />
|
|
| 10 | - <?php echo wrap_label($_lang['no'], form_radio('friendly_urls', 0, 'id="furlRowOff"'));?>
|
|
| 9 | + <?php echo wrap_label($_lang['yes'], form_radio('friendly_urls', 1, 'id="furlRowOn"')); ?><br />
|
|
| 10 | + <?php echo wrap_label($_lang['no'], form_radio('friendly_urls', 0, 'id="furlRowOff"')); ?>
|
|
| 11 | 11 | </td> |
| 12 | 12 | </tr> |
| 13 | 13 | <tr> |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | <tr> |
| 21 | 21 | <td nowrap class="warning"><?php echo $_lang['xhtml_urls_title'] ?><br><small>[(xhtml_urls)]</small></td> |
| 22 | 22 | <td> |
| 23 | - <?php echo wrap_label($_lang['yes'],form_radio('xhtml_urls', 1));?><br />
|
|
| 24 | - <?php echo wrap_label($_lang['no'], form_radio('xhtml_urls', 0));?>
|
|
| 23 | + <?php echo wrap_label($_lang['yes'], form_radio('xhtml_urls', 1)); ?><br />
|
|
| 24 | + <?php echo wrap_label($_lang['no'], form_radio('xhtml_urls', 0)); ?>
|
|
| 25 | 25 | </td> |
| 26 | 26 | </tr> |
| 27 | 27 | <tr> |
@@ -31,135 +31,135 @@ discard block |
||
| 31 | 31 | <tr> |
| 32 | 32 | <td colspan="2"><div class="split"></div></td> |
| 33 | 33 | </tr> |
| 34 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 34 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 35 | 35 | <td nowrap class="warning" valign="top"><?php echo $_lang['friendlyurlsprefix_title'] ?><br><small>[(friendly_url_prefix)]</small></td> |
| 36 | 36 | <td><input onchange="documentDirty=true;" type="text" maxlength="50" style="width: 200px;" name="friendly_url_prefix" value="<?php echo $friendly_url_prefix; ?>" /></td> |
| 37 | 37 | </tr> |
| 38 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 38 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 39 | 39 | <td width="200"> </td> |
| 40 | 40 | <td class="comment"><?php echo $_lang['friendlyurlsprefix_message'] ?></td> |
| 41 | 41 | </tr> |
| 42 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 42 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 43 | 43 | <td colspan="2"><div class="split"></div></td> |
| 44 | 44 | </tr> |
| 45 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 45 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 46 | 46 | <td nowrap class="warning" valign="top"><?php echo $_lang['friendlyurlsuffix_title'] ?><br><small>[(friendly_url_suffix)]</small></td> |
| 47 | 47 | <td><input onchange="documentDirty=true;" type="text" maxlength="50" style="width: 200px;" name="friendly_url_suffix" value="<?php echo $friendly_url_suffix; ?>" /></td> |
| 48 | 48 | </tr> |
| 49 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 49 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 50 | 50 | <td width="200"> </td> |
| 51 | 51 | <td class="comment"><?php echo $_lang['friendlyurlsuffix_message'] ?></td> |
| 52 | 52 | </tr> |
| 53 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 53 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 54 | 54 | <td colspan="2"><div class="split"></div></td> |
| 55 | 55 | </tr> |
| 56 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 56 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 57 | 57 | <th><?php echo $_lang['make_folders_title'] ?><br><small>[(make_folders)]</small></th> |
| 58 | 58 | <td> |
| 59 | - <?php echo wrap_label($_lang['yes'],form_radio('make_folders','1'));?><br />
|
|
| 60 | - <?php echo wrap_label($_lang['no'],form_radio('make_folders','0'));?>
|
|
| 59 | + <?php echo wrap_label($_lang['yes'], form_radio('make_folders', '1')); ?><br />
|
|
| 60 | + <?php echo wrap_label($_lang['no'], form_radio('make_folders', '0')); ?>
|
|
| 61 | 61 | </td> |
| 62 | 62 | </tr> |
| 63 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 63 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 64 | 64 | <td width="200"> </td> |
| 65 | 65 | <td class="comment"><?php echo $_lang['make_folders_message'] ?></td> |
| 66 | 66 | </tr> |
| 67 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 67 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 68 | 68 | <td colspan="2"><div class="split"></div></td> |
| 69 | 69 | </tr> |
| 70 | 70 | |
| 71 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 71 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 72 | 72 | <th><?php echo $_lang['seostrict_title'] ?><br><small>[(seostrict)]</small></th> |
| 73 | 73 | <td> |
| 74 | - <?php echo wrap_label($_lang['yes'],form_radio('seostrict','1'));?><br />
|
|
| 75 | - <?php echo wrap_label($_lang['no'],form_radio('seostrict','0'));?>
|
|
| 74 | + <?php echo wrap_label($_lang['yes'], form_radio('seostrict', '1')); ?><br />
|
|
| 75 | + <?php echo wrap_label($_lang['no'], form_radio('seostrict', '0')); ?>
|
|
| 76 | 76 | </td> |
| 77 | 77 | </tr> |
| 78 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 78 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 79 | 79 | <td width="200"> </td> |
| 80 | 80 | <td class="comment"><?php echo $_lang['seostrict_message'] ?></td> |
| 81 | 81 | </tr> |
| 82 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 82 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 83 | 83 | <td colspan="2"><div class="split"></div></td> |
| 84 | 84 | </tr> |
| 85 | 85 | |
| 86 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 86 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 87 | 87 | <th><?php echo $_lang['aliaslistingfolder_title'] ?><br><small>[(aliaslistingfolder)]</small></th> |
| 88 | 88 | <td> |
| 89 | - <?php echo wrap_label($_lang['yes'],form_radio('aliaslistingfolder','1'));?><br />
|
|
| 90 | - <?php echo wrap_label($_lang['no'],form_radio('aliaslistingfolder','0'));?>
|
|
| 89 | + <?php echo wrap_label($_lang['yes'], form_radio('aliaslistingfolder', '1')); ?><br />
|
|
| 90 | + <?php echo wrap_label($_lang['no'], form_radio('aliaslistingfolder', '0')); ?>
|
|
| 91 | 91 | </td> |
| 92 | 92 | </tr> |
| 93 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 93 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 94 | 94 | <td width="200"> </td> |
| 95 | 95 | <td class="comment"><?php echo $_lang['aliaslistingfolder_message'] ?></td> |
| 96 | 96 | </tr> |
| 97 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 97 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 98 | 98 | <td colspan="2"><div class="split"></div></td> |
| 99 | 99 | </tr> |
| 100 | 100 | |
| 101 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 101 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 102 | 102 | <td nowrap class="warning" valign="top"><?php echo $_lang['friendly_alias_title'] ?><br><small>[(friendly_alias_urls)]</small></td> |
| 103 | 103 | <td> |
| 104 | - <?php echo wrap_label($_lang['yes'],form_radio('friendly_alias_urls','1'));?><br />
|
|
| 105 | - <?php echo wrap_label($_lang['no'],form_radio('friendly_alias_urls','0'));?>
|
|
| 104 | + <?php echo wrap_label($_lang['yes'], form_radio('friendly_alias_urls', '1')); ?><br />
|
|
| 105 | + <?php echo wrap_label($_lang['no'], form_radio('friendly_alias_urls', '0')); ?>
|
|
| 106 | 106 | </td> |
| 107 | 107 | </tr> |
| 108 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 108 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 109 | 109 | <td width="200"> </td> |
| 110 | 110 | <td class="comment"><?php echo $_lang['friendly_alias_message'] ?></td> |
| 111 | 111 | </tr> |
| 112 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 112 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 113 | 113 | <td colspan="2"><div class="split"></div></td> |
| 114 | 114 | </tr> |
| 115 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 115 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 116 | 116 | <td nowrap class="warning" valign="top"><?php echo $_lang['use_alias_path_title'] ?><br><small>[(use_alias_path)]</small></td> |
| 117 | 117 | <td> |
| 118 | - <?php echo wrap_label($_lang['yes'],form_radio('use_alias_path','1'));?><br />
|
|
| 119 | - <?php echo wrap_label($_lang['no'],form_radio('use_alias_path','0'));?>
|
|
| 118 | + <?php echo wrap_label($_lang['yes'], form_radio('use_alias_path', '1')); ?><br />
|
|
| 119 | + <?php echo wrap_label($_lang['no'], form_radio('use_alias_path', '0')); ?>
|
|
| 120 | 120 | </td> |
| 121 | 121 | </tr> |
| 122 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 122 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 123 | 123 | <td width="200"> </td> |
| 124 | 124 | <td class="comment"><?php echo $_lang['use_alias_path_message'] ?></td> |
| 125 | 125 | </tr> |
| 126 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 126 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 127 | 127 | <td colspan="2"><div class="split"></div></td> |
| 128 | 128 | </tr> |
| 129 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 129 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 130 | 130 | <td nowrap class="warning" valign="top"><?php echo $_lang['duplicate_alias_title'] ?><br><small>[(allow_duplicate_alias)]</small></td> |
| 131 | 131 | <td> |
| 132 | - <?php echo wrap_label($_lang['yes'],form_radio('allow_duplicate_alias','1'));?><br />
|
|
| 133 | - <?php echo wrap_label($_lang['no'],form_radio('allow_duplicate_alias','0'));?>
|
|
| 132 | + <?php echo wrap_label($_lang['yes'], form_radio('allow_duplicate_alias', '1')); ?><br />
|
|
| 133 | + <?php echo wrap_label($_lang['no'], form_radio('allow_duplicate_alias', '0')); ?>
|
|
| 134 | 134 | </td> |
| 135 | 135 | </tr> |
| 136 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 136 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 137 | 137 | <td width="200"> </td> |
| 138 | 138 | <td class="comment"><?php echo $_lang['duplicate_alias_message'] ?></td> |
| 139 | 139 | </tr> |
| 140 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 140 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 141 | 141 | <td colspan="2"><div class="split"></div></td> |
| 142 | 142 | </tr> |
| 143 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 143 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 144 | 144 | <td nowrap class="warning" valign="top"><?php echo $_lang['automatic_alias_title'] ?><br><small>[(automatic_alias)]</small></td> |
| 145 | 145 | <td> |
| 146 | - <?php echo wrap_label($_lang['yes'],form_radio('automatic_alias','1'));?><br />
|
|
| 147 | - <?php echo wrap_label($_lang['no'],form_radio('automatic_alias','0'));?>
|
|
| 146 | + <?php echo wrap_label($_lang['yes'], form_radio('automatic_alias', '1')); ?><br />
|
|
| 147 | + <?php echo wrap_label($_lang['no'], form_radio('automatic_alias', '0')); ?>
|
|
| 148 | 148 | </td> |
| 149 | 149 | </tr> |
| 150 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 150 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 151 | 151 | <td width="200"> </td> |
| 152 | 152 | <td class="comment"><?php echo $_lang['automatic_alias_message'] ?></td> |
| 153 | 153 | </tr> |
| 154 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 154 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 155 | 155 | <td colspan="2"><div class="split"></div></td> |
| 156 | 156 | </tr> |
| 157 | -<tr class="furlRow" <?php echo showHide($friendly_urls==1);?>> |
|
| 157 | +<tr class="furlRow" <?php echo showHide($friendly_urls == 1); ?>> |
|
| 158 | 158 | <td colspan="2"> |
| 159 | 159 | <?php |
| 160 | 160 | // invoke OnFriendlyURLSettingsRender event |
| 161 | 161 | $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
|
| 162 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 162 | + if (is_array($evtOut)) echo implode("", $evtOut);
|
|
| 163 | 163 | ?> |
| 164 | 164 | </td> |
| 165 | 165 | </tr> |
@@ -159,7 +159,9 @@ |
||
| 159 | 159 | <?php |
| 160 | 160 | // invoke OnFriendlyURLSettingsRender event |
| 161 | 161 | $evtOut = $modx->invokeEvent('OnFriendlyURLSettingsRender');
|
| 162 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 162 | + if(is_array($evtOut)) { |
|
| 163 | + echo implode("",$evtOut); |
|
| 164 | + } |
|
| 163 | 165 | ?> |
| 164 | 166 | </td> |
| 165 | 167 | </tr> |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 78: |
|
| 8 | - if (!$modx->hasPermission('edit_chunk')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 77: |
|
| 13 | - if (!$modx->hasPermission('new_chunk')) { |
|
| 7 | + case 78: |
|
| 8 | + if (!$modx->hasPermission('edit_chunk')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 77: |
|
| 13 | + if (!$modx->hasPermission('new_chunk')) { |
|
| 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 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | // Add lock-element JS-Script |
| 66 | 66 | $lockElementId = $id; |
| 67 | 67 | $lockElementType = 3; |
| 68 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 68 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 69 | 69 | |
| 70 | 70 | // Print RTE Javascript function |
| 71 | 71 | ?> |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>" /> |
| 137 | 137 | |
| 138 | 138 | <h1> |
| 139 | - <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
| 139 | + <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
| 140 | 140 | </h1> |
| 141 | 141 | |
| 142 | 142 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | <div class="form-control-name clearfix"> |
| 161 | 161 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
| 162 | 162 | <?php if ($modx->hasPermission('save_role')): ?> |
| 163 | - <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
| 163 | + <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
| 164 | 164 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> /> |
| 165 | 165 | <i class="fa fa-lock"></i> |
| 166 | 166 | </label> |
@@ -184,9 +184,9 @@ discard block |
||
| 184 | 184 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 185 | 185 | <option> </option> |
| 186 | 186 | <?php |
| 187 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 187 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 188 | 188 | foreach (getCategories() as $n => $v) { |
| 189 | - echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
| 189 | + echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category'])."</option>\n"; |
|
| 190 | 190 | } |
| 191 | 191 | ?> |
| 192 | 192 | </select> |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | </div> |
| 201 | 201 | <?php if ($_SESSION['mgrRole'] == 1): ?> |
| 202 | 202 | <div class="form-row"> |
| 203 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label> |
|
| 203 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label> |
|
| 204 | 204 | </div> |
| 205 | 205 | <?php endif; ?> |
| 206 | 206 | </div> |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister'); |
| 217 | 217 | if (is_array($evtOut)) { |
| 218 | 218 | foreach ($evtOut as $i => $editor) { |
| 219 | - echo "\t" . '<option value="' . $editor . '"' . ($which_editor == $editor ? ' selected="selected"' : '') . '>' . $editor . "</option>\n"; |
|
| 219 | + echo "\t".'<option value="'.$editor.'"'.($which_editor == $editor ? ' selected="selected"' : '').'>'.$editor."</option>\n"; |
|
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | ?> |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch ($modx->manager->action) { |
| 7 | - case 22: |
|
| 8 | - if (!$modx->hasPermission('edit_snippet')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 23: |
|
| 13 | - if (!$modx->hasPermission('new_snippet')) { |
|
| 7 | + case 22: |
|
| 8 | + if (!$modx->hasPermission('edit_snippet')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 23: |
|
| 13 | + if (!$modx->hasPermission('new_snippet')) { |
|
| 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 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $rs = $modx->db->select('*', $tbl_site_snippets, "id='{$id}'"); |
| 40 | 40 | $content = $modx->db->getRow($rs); |
| 41 | 41 | if (!$content) { |
| 42 | - header("Location: " . MODX_SITE_URL . "index.php?id=" . $site_start); |
|
| 42 | + header("Location: ".MODX_SITE_URL."index.php?id=".$site_start); |
|
| 43 | 43 | } |
| 44 | 44 | $_SESSION['itemname'] = $content['name']; |
| 45 | 45 | if ($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | // Add lock-element JS-Script |
| 63 | 63 | $lockElementId = $id; |
| 64 | 64 | $lockElementType = 4; |
| 65 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 65 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 66 | 66 | ?> |
| 67 | 67 | <script type="text/javascript"> |
| 68 | 68 | |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
| 432 | 432 | |
| 433 | 433 | <h1 class="pagetitle"> |
| 434 | - <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i> |
|
| 434 | + <i class="fa fa-code"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_snippet']) ?><i class="fa fa-question-circle help"></i> |
|
| 435 | 435 | </h1> |
| 436 | 436 | |
| 437 | 437 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | <div class="form-control-name clearfix"> |
| 458 | 458 | <input name="name" type="text" maxlength="100" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
| 459 | 459 | <?php if ($modx->hasPermission('save_role')): ?> |
| 460 | - <label class="custom-control" title="<?= $_lang['lock_snippet'] . "\n" . $_lang['lock_snippet_msg'] ?>" tooltip> |
|
| 460 | + <label class="custom-control" title="<?= $_lang['lock_snippet']."\n".$_lang['lock_snippet_msg'] ?>" tooltip> |
|
| 461 | 461 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
| 462 | 462 | <i class="fa fa-lock"></i> |
| 463 | 463 | </label> |
@@ -481,9 +481,9 @@ discard block |
||
| 481 | 481 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
| 482 | 482 | <option> </option> |
| 483 | 483 | <?php |
| 484 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 484 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 485 | 485 | foreach (getCategories() as $n => $v) { |
| 486 | - echo '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . '</option>'; |
|
| 486 | + echo '<option value="'.$v['id'].'"'.($content['category'] == $v['id'] ? ' selected="selected"' : '').'>'.$modx->htmlspecialchars($v['category']).'</option>'; |
|
| 487 | 487 | } |
| 488 | 488 | ?> |
| 489 | 489 | </select> |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | <div class="form-group"> |
| 501 | 501 | <?php if ($_SESSION['mgrRole'] == 1): ?> |
| 502 | 502 | <div class="form-row"> |
| 503 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label> |
|
| 503 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label> |
|
| 504 | 504 | </div> |
| 505 | 505 | <?php endif; ?> |
| 506 | 506 | <div class="form-row"> |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | <span><?= $_lang['snippet_code'] ?></span> |
| 518 | 518 | </div> |
| 519 | 519 | <div class="section-editor clearfix"> |
| 520 | - <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php" . "\n" . trim($modx->htmlspecialchars($content['snippet'])) . "\n") ?></textarea> |
|
| 520 | + <textarea dir="ltr" name="post" class="phptextarea" rows="20" wrap="soft" onchange="documentDirty=true;"><?= (isset($content['post']) ? trim($modx->htmlspecialchars($content['post'])) : "<?php"."\n".trim($modx->htmlspecialchars($content['snippet']))."\n") ?></textarea> |
|
| 521 | 521 | </div> |
| 522 | 522 | <!-- PHP text editor end --> |
| 523 | 523 | </div> |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | INNER JOIN {$tbl_site_module_depobj} AS smd ON smd.module=sm.id AND smd.type=40 |
| 553 | 553 | INNER JOIN {$tbl_site_snippets} AS ss ON ss.id=smd.resource", "smd.resource='{$id}' AND sm.enable_sharedparams=1", 'sm.name'); |
| 554 | 554 | while ($row = $modx->db->getRow($ds)) { |
| 555 | - echo "<option value='" . $row['guid'] . "'" . ($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($row['name']) . "</option>"; |
|
| 555 | + echo "<option value='".$row['guid']."'".($content['moduleguid'] == $row['guid'] ? " selected='selected'" : "").">".$modx->htmlspecialchars($row['name'])."</option>"; |
|
| 556 | 556 | } |
| 557 | 557 | ?> |
| 558 | 558 | </select> |
@@ -4,18 +4,18 @@ |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | switch((int) $modx->manager->action) { |
| 7 | - case 35: |
|
| 8 | - if(!$modx->hasPermission('edit_role')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 38: |
|
| 13 | - if(!$modx->hasPermission('new_role')) { |
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 35: |
|
| 8 | + if(!$modx->hasPermission('edit_role')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 38: |
|
| 13 | + if(!$modx->hasPermission('new_role')) { |
|
| 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 | $role = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -293,7 +293,8 @@ |
||
| 293 | 293 | </form> |
| 294 | 294 | |
| 295 | 295 | <?php |
| 296 | -function render_form($name, $label, $status = '') { |
|
| 296 | +function render_form($name, $label, $status = '') |
|
| 297 | +{ |
|
| 297 | 298 | global $modx, $roledata; |
| 298 | 299 | |
| 299 | 300 | $tpl = '<label class="d-block" for="[+name+]check"> |
@@ -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((int) $modx->manager->action) { |
| 7 | - case 35: |
|
| 8 | - if(!$modx->hasPermission('edit_role')) { |
|
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | - } |
|
| 11 | - break; |
|
| 12 | - case 38: |
|
| 13 | - if(!$modx->hasPermission('new_role')) { |
|
| 14 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 15 | - } |
|
| 16 | - break; |
|
| 17 | - default: |
|
| 18 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + case 35: |
|
| 8 | + if(!$modx->hasPermission('edit_role')) { |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | + } |
|
| 11 | + break; |
|
| 12 | + case 38: |
|
| 13 | + if(!$modx->hasPermission('new_role')) { |
|
| 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 | $role = 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(8, $role)) { |
| 27 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['role'])); |
|
| 27 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['role'])); |
|
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
| 30 | 30 | |
@@ -32,15 +32,15 @@ discard block |
||
| 32 | 32 | $modx->lockElement(8, $role); |
| 33 | 33 | |
| 34 | 34 | if($modx->manager->action == '35') { |
| 35 | - $rs = $modx->db->select('*', $tbl_user_roles, "id='{$role}'"); |
|
| 36 | - $roledata = $modx->db->getRow($rs); |
|
| 37 | - if(!$roledata) { |
|
| 38 | - $modx->webAlertAndQuit("No role returned!"); |
|
| 39 | - } |
|
| 40 | - $_SESSION['itemname'] = $roledata['name']; |
|
| 35 | + $rs = $modx->db->select('*', $tbl_user_roles, "id='{$role}'"); |
|
| 36 | + $roledata = $modx->db->getRow($rs); |
|
| 37 | + if(!$roledata) { |
|
| 38 | + $modx->webAlertAndQuit("No role returned!"); |
|
| 39 | + } |
|
| 40 | + $_SESSION['itemname'] = $roledata['name']; |
|
| 41 | 41 | } else { |
| 42 | - $roledata = 0; |
|
| 43 | - $_SESSION['itemname'] = $_lang["new_role"]; |
|
| 42 | + $roledata = 0; |
|
| 43 | + $_SESSION['itemname'] = $_lang["new_role"]; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | // Add lock-element JS-Script |
@@ -107,63 +107,63 @@ discard block |
||
| 107 | 107 | <div class="form-group"> |
| 108 | 108 | <h3><?= $_lang['page_data_general'] ?></h3> |
| 109 | 109 | <?php |
| 110 | - echo render_form('frames', $_lang['role_frames'], 'disabled'); |
|
| 111 | - echo render_form('home', $_lang['role_home'], 'disabled'); |
|
| 112 | - echo render_form('messages', $_lang['role_messages']); |
|
| 113 | - echo render_form('logout', $_lang['role_logout'], 'disabled'); |
|
| 114 | - echo render_form('help', $_lang['role_help']); |
|
| 115 | - echo render_form('action_ok', $_lang['role_actionok'], 'disabled'); |
|
| 116 | - echo render_form('error_dialog', $_lang['role_errors'], 'disabled'); |
|
| 117 | - echo render_form('about', $_lang['role_about'], 'disabled'); |
|
| 118 | - echo render_form('credits', $_lang['role_credits'], 'disabled'); |
|
| 119 | - echo render_form('change_password', $_lang['role_change_password']); |
|
| 120 | - echo render_form('save_password', $_lang['role_save_password']); |
|
| 121 | - ?> |
|
| 110 | + echo render_form('frames', $_lang['role_frames'], 'disabled'); |
|
| 111 | + echo render_form('home', $_lang['role_home'], 'disabled'); |
|
| 112 | + echo render_form('messages', $_lang['role_messages']); |
|
| 113 | + echo render_form('logout', $_lang['role_logout'], 'disabled'); |
|
| 114 | + echo render_form('help', $_lang['role_help']); |
|
| 115 | + echo render_form('action_ok', $_lang['role_actionok'], 'disabled'); |
|
| 116 | + echo render_form('error_dialog', $_lang['role_errors'], 'disabled'); |
|
| 117 | + echo render_form('about', $_lang['role_about'], 'disabled'); |
|
| 118 | + echo render_form('credits', $_lang['role_credits'], 'disabled'); |
|
| 119 | + echo render_form('change_password', $_lang['role_change_password']); |
|
| 120 | + echo render_form('save_password', $_lang['role_save_password']); |
|
| 121 | + ?> |
|
| 122 | 122 | </div> |
| 123 | 123 | </div> |
| 124 | 124 | <div class="col-sm-6 col-lg-3"> |
| 125 | 125 | <div class="form-group"> |
| 126 | 126 | <h3><?= $_lang['role_content_management'] ?></h3> |
| 127 | 127 | <?php |
| 128 | - echo render_form('view_document', $_lang['role_view_docdata'], 'disabled'); |
|
| 129 | - echo render_form('new_document', $_lang['role_create_doc']); |
|
| 130 | - echo render_form('edit_document', $_lang['role_edit_doc']); |
|
| 131 | - echo render_form('change_resourcetype', $_lang['role_change_resourcetype']); |
|
| 132 | - echo render_form('save_document', $_lang['role_save_doc']); |
|
| 133 | - echo render_form('publish_document', $_lang['role_publish_doc']); |
|
| 134 | - echo render_form('delete_document', $_lang['role_delete_doc']); |
|
| 135 | - echo render_form('empty_trash', $_lang['role_empty_trash']); |
|
| 136 | - echo render_form('empty_cache', $_lang['role_cache_refresh']); |
|
| 137 | - echo render_form('view_unpublished', $_lang['role_view_unpublished']); |
|
| 138 | - ?> |
|
| 128 | + echo render_form('view_document', $_lang['role_view_docdata'], 'disabled'); |
|
| 129 | + echo render_form('new_document', $_lang['role_create_doc']); |
|
| 130 | + echo render_form('edit_document', $_lang['role_edit_doc']); |
|
| 131 | + echo render_form('change_resourcetype', $_lang['role_change_resourcetype']); |
|
| 132 | + echo render_form('save_document', $_lang['role_save_doc']); |
|
| 133 | + echo render_form('publish_document', $_lang['role_publish_doc']); |
|
| 134 | + echo render_form('delete_document', $_lang['role_delete_doc']); |
|
| 135 | + echo render_form('empty_trash', $_lang['role_empty_trash']); |
|
| 136 | + echo render_form('empty_cache', $_lang['role_cache_refresh']); |
|
| 137 | + echo render_form('view_unpublished', $_lang['role_view_unpublished']); |
|
| 138 | + ?> |
|
| 139 | 139 | </div> |
| 140 | 140 | </div> |
| 141 | 141 | <div class="col-sm-6 col-lg-3 form-group"> |
| 142 | 142 | <div class="form-group"> |
| 143 | 143 | <h3><?= $_lang['role_file_management'] ?></h3> |
| 144 | 144 | <?php |
| 145 | - echo render_form('file_manager', $_lang['role_file_manager']); |
|
| 146 | - echo render_form('assets_files', $_lang['role_assets_files']); |
|
| 147 | - echo render_form('assets_images', $_lang['role_assets_images']); |
|
| 148 | - ?> |
|
| 145 | + echo render_form('file_manager', $_lang['role_file_manager']); |
|
| 146 | + echo render_form('assets_files', $_lang['role_assets_files']); |
|
| 147 | + echo render_form('assets_images', $_lang['role_assets_images']); |
|
| 148 | + ?> |
|
| 149 | 149 | </div> |
| 150 | 150 | <div class="form-group"> |
| 151 | 151 | <h3><?= $_lang['category_management'] ?></h3> |
| 152 | 152 | <?php |
| 153 | - echo render_form('category_manager', $_lang['role_category_manager']); |
|
| 154 | - ?> |
|
| 153 | + echo render_form('category_manager', $_lang['role_category_manager']); |
|
| 154 | + ?> |
|
| 155 | 155 | </div> |
| 156 | 156 | </div> |
| 157 | 157 | <div class="col-sm-6 col-lg-3"> |
| 158 | 158 | <div class="form-group"> |
| 159 | 159 | <h3><?= $_lang['role_module_management'] ?></h3> |
| 160 | 160 | <?php |
| 161 | - echo render_form('new_module', $_lang['role_new_module']); |
|
| 162 | - echo render_form('edit_module', $_lang['role_edit_module']); |
|
| 163 | - echo render_form('save_module', $_lang['role_save_module']); |
|
| 164 | - echo render_form('delete_module', $_lang['role_delete_module']); |
|
| 165 | - echo render_form('exec_module', $_lang['role_run_module']); |
|
| 166 | - ?> |
|
| 161 | + echo render_form('new_module', $_lang['role_new_module']); |
|
| 162 | + echo render_form('edit_module', $_lang['role_edit_module']); |
|
| 163 | + echo render_form('save_module', $_lang['role_save_module']); |
|
| 164 | + echo render_form('delete_module', $_lang['role_delete_module']); |
|
| 165 | + echo render_form('exec_module', $_lang['role_run_module']); |
|
| 166 | + ?> |
|
| 167 | 167 | </div> |
| 168 | 168 | </div> |
| 169 | 169 | </div> |
@@ -173,44 +173,44 @@ discard block |
||
| 173 | 173 | <div class="form-group"> |
| 174 | 174 | <h3><?= $_lang['role_template_management'] ?></h3> |
| 175 | 175 | <?php |
| 176 | - echo render_form('new_template', $_lang['role_create_template']); |
|
| 177 | - echo render_form('edit_template', $_lang['role_edit_template']); |
|
| 178 | - echo render_form('save_template', $_lang['role_save_template']); |
|
| 179 | - echo render_form('delete_template', $_lang['role_delete_template']); |
|
| 180 | - ?> |
|
| 176 | + echo render_form('new_template', $_lang['role_create_template']); |
|
| 177 | + echo render_form('edit_template', $_lang['role_edit_template']); |
|
| 178 | + echo render_form('save_template', $_lang['role_save_template']); |
|
| 179 | + echo render_form('delete_template', $_lang['role_delete_template']); |
|
| 180 | + ?> |
|
| 181 | 181 | </div> |
| 182 | 182 | </div> |
| 183 | 183 | <div class="col-sm-6 col-lg-3"> |
| 184 | 184 | <div class="form-group"> |
| 185 | 185 | <h3><?= $_lang['role_snippet_management'] ?></h3> |
| 186 | 186 | <?php |
| 187 | - echo render_form('new_snippet', $_lang['role_create_snippet']); |
|
| 188 | - echo render_form('edit_snippet', $_lang['role_edit_snippet']); |
|
| 189 | - echo render_form('save_snippet', $_lang['role_save_snippet']); |
|
| 190 | - echo render_form('delete_snippet', $_lang['role_delete_snippet']); |
|
| 191 | - ?> |
|
| 187 | + echo render_form('new_snippet', $_lang['role_create_snippet']); |
|
| 188 | + echo render_form('edit_snippet', $_lang['role_edit_snippet']); |
|
| 189 | + echo render_form('save_snippet', $_lang['role_save_snippet']); |
|
| 190 | + echo render_form('delete_snippet', $_lang['role_delete_snippet']); |
|
| 191 | + ?> |
|
| 192 | 192 | </div> |
| 193 | 193 | </div> |
| 194 | 194 | <div class="col-sm-6 col-lg-3"> |
| 195 | 195 | <div class="form-group"> |
| 196 | 196 | <h3><?= $_lang['role_chunk_management'] ?></h3> |
| 197 | 197 | <?php |
| 198 | - echo render_form('new_chunk', $_lang['role_create_chunk']); |
|
| 199 | - echo render_form('edit_chunk', $_lang['role_edit_chunk']); |
|
| 200 | - echo render_form('save_chunk', $_lang['role_save_chunk']); |
|
| 201 | - echo render_form('delete_chunk', $_lang['role_delete_chunk']); |
|
| 202 | - ?> |
|
| 198 | + echo render_form('new_chunk', $_lang['role_create_chunk']); |
|
| 199 | + echo render_form('edit_chunk', $_lang['role_edit_chunk']); |
|
| 200 | + echo render_form('save_chunk', $_lang['role_save_chunk']); |
|
| 201 | + echo render_form('delete_chunk', $_lang['role_delete_chunk']); |
|
| 202 | + ?> |
|
| 203 | 203 | </div> |
| 204 | 204 | </div> |
| 205 | 205 | <div class="col-sm-6 col-lg-3"> |
| 206 | 206 | <div class="form-group"> |
| 207 | 207 | <h3><?= $_lang['role_plugin_management'] ?></h3> |
| 208 | 208 | <?php |
| 209 | - echo render_form('new_plugin', $_lang['role_create_plugin']); |
|
| 210 | - echo render_form('edit_plugin', $_lang['role_edit_plugin']); |
|
| 211 | - echo render_form('save_plugin', $_lang['role_save_plugin']); |
|
| 212 | - echo render_form('delete_plugin', $_lang['role_delete_plugin']); |
|
| 213 | - ?> |
|
| 209 | + echo render_form('new_plugin', $_lang['role_create_plugin']); |
|
| 210 | + echo render_form('edit_plugin', $_lang['role_edit_plugin']); |
|
| 211 | + echo render_form('save_plugin', $_lang['role_save_plugin']); |
|
| 212 | + echo render_form('delete_plugin', $_lang['role_delete_plugin']); |
|
| 213 | + ?> |
|
| 214 | 214 | </div> |
| 215 | 215 | </div> |
| 216 | 216 | </div> |
@@ -220,42 +220,42 @@ discard block |
||
| 220 | 220 | <div class="form-group"> |
| 221 | 221 | <h3><?= $_lang['role_user_management'] ?></h3> |
| 222 | 222 | <?php |
| 223 | - echo render_form('new_user', $_lang['role_new_user']); |
|
| 224 | - echo render_form('edit_user', $_lang['role_edit_user']); |
|
| 225 | - echo render_form('save_user', $_lang['role_save_user']); |
|
| 226 | - echo render_form('delete_user', $_lang['role_delete_user']); |
|
| 227 | - ?> |
|
| 223 | + echo render_form('new_user', $_lang['role_new_user']); |
|
| 224 | + echo render_form('edit_user', $_lang['role_edit_user']); |
|
| 225 | + echo render_form('save_user', $_lang['role_save_user']); |
|
| 226 | + echo render_form('delete_user', $_lang['role_delete_user']); |
|
| 227 | + ?> |
|
| 228 | 228 | </div> |
| 229 | 229 | </div> |
| 230 | 230 | <div class="col-sm-6 col-lg-3"> |
| 231 | 231 | <div class="form-group"> |
| 232 | 232 | <h3><?= $_lang['role_web_user_management'] ?></h3> |
| 233 | 233 | <?php |
| 234 | - echo render_form('new_web_user', $_lang['role_new_web_user']); |
|
| 235 | - echo render_form('edit_web_user', $_lang['role_edit_web_user']); |
|
| 236 | - echo render_form('save_web_user', $_lang['role_save_web_user']); |
|
| 237 | - echo render_form('delete_web_user', $_lang['role_delete_web_user']); |
|
| 238 | - ?> |
|
| 234 | + echo render_form('new_web_user', $_lang['role_new_web_user']); |
|
| 235 | + echo render_form('edit_web_user', $_lang['role_edit_web_user']); |
|
| 236 | + echo render_form('save_web_user', $_lang['role_save_web_user']); |
|
| 237 | + echo render_form('delete_web_user', $_lang['role_delete_web_user']); |
|
| 238 | + ?> |
|
| 239 | 239 | </div> |
| 240 | 240 | </div> |
| 241 | 241 | <div class="col-sm-6 col-lg-3"> |
| 242 | 242 | <div class="form-group"> |
| 243 | 243 | <h3><?= $_lang['role_udperms'] ?></h3> |
| 244 | 244 | <?php |
| 245 | - echo render_form('access_permissions', $_lang['role_access_persmissions']); |
|
| 246 | - echo render_form('web_access_permissions', $_lang['role_web_access_persmissions']); |
|
| 247 | - ?> |
|
| 245 | + echo render_form('access_permissions', $_lang['role_access_persmissions']); |
|
| 246 | + echo render_form('web_access_permissions', $_lang['role_web_access_persmissions']); |
|
| 247 | + ?> |
|
| 248 | 248 | </div> |
| 249 | 249 | </div> |
| 250 | 250 | <div class="col-sm-6 col-lg-3"> |
| 251 | 251 | <div class="form-group"> |
| 252 | 252 | <h3><?= $_lang['role_role_management'] ?></h3> |
| 253 | 253 | <?php |
| 254 | - echo render_form('new_role', $_lang['role_new_role']); |
|
| 255 | - echo render_form('edit_role', $_lang['role_edit_role']); |
|
| 256 | - echo render_form('save_role', $_lang['role_save_role']); |
|
| 257 | - echo render_form('delete_role', $_lang['role_delete_role']); |
|
| 258 | - ?> |
|
| 254 | + echo render_form('new_role', $_lang['role_new_role']); |
|
| 255 | + echo render_form('edit_role', $_lang['role_edit_role']); |
|
| 256 | + echo render_form('save_role', $_lang['role_save_role']); |
|
| 257 | + echo render_form('delete_role', $_lang['role_delete_role']); |
|
| 258 | + ?> |
|
| 259 | 259 | </div> |
| 260 | 260 | </div> |
| 261 | 261 | </div> |
@@ -265,23 +265,23 @@ discard block |
||
| 265 | 265 | <div class="form-group"> |
| 266 | 266 | <h3><?= $_lang['role_eventlog_management'] ?></h3> |
| 267 | 267 | <?php |
| 268 | - echo render_form('view_eventlog', $_lang['role_view_eventlog']); |
|
| 269 | - echo render_form('delete_eventlog', $_lang['role_delete_eventlog']); |
|
| 270 | - ?> |
|
| 268 | + echo render_form('view_eventlog', $_lang['role_view_eventlog']); |
|
| 269 | + echo render_form('delete_eventlog', $_lang['role_delete_eventlog']); |
|
| 270 | + ?> |
|
| 271 | 271 | </div> |
| 272 | 272 | </div> |
| 273 | 273 | <div class="col-sm-6 col-lg-3"> |
| 274 | 274 | <div class="form-group"> |
| 275 | 275 | <h3><?= $_lang['role_config_management'] ?></h3> |
| 276 | 276 | <?php |
| 277 | - echo render_form('logs', $_lang['role_view_logs']); |
|
| 278 | - echo render_form('settings', $_lang['role_edit_settings']); |
|
| 279 | - echo render_form('bk_manager', $_lang['role_bk_manager']); |
|
| 280 | - echo render_form('import_static', $_lang['role_import_static']); |
|
| 281 | - echo render_form('export_static', $_lang['role_export_static']); |
|
| 282 | - echo render_form('remove_locks', $_lang['role_remove_locks']); |
|
| 283 | - echo render_form('display_locks', $_lang['role_display_locks']); |
|
| 284 | - ?> |
|
| 277 | + echo render_form('logs', $_lang['role_view_logs']); |
|
| 278 | + echo render_form('settings', $_lang['role_edit_settings']); |
|
| 279 | + echo render_form('bk_manager', $_lang['role_bk_manager']); |
|
| 280 | + echo render_form('import_static', $_lang['role_import_static']); |
|
| 281 | + echo render_form('export_static', $_lang['role_export_static']); |
|
| 282 | + echo render_form('remove_locks', $_lang['role_remove_locks']); |
|
| 283 | + echo render_form('display_locks', $_lang['role_display_locks']); |
|
| 284 | + ?> |
|
| 285 | 285 | </div> |
| 286 | 286 | </div> |
| 287 | 287 | </div> |
@@ -294,32 +294,32 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | <?php |
| 296 | 296 | function render_form($name, $label, $status = '') { |
| 297 | - global $modx, $roledata; |
|
| 297 | + global $modx, $roledata; |
|
| 298 | 298 | |
| 299 | - $tpl = '<label class="d-block" for="[+name+]check"> |
|
| 299 | + $tpl = '<label class="d-block" for="[+name+]check"> |
|
| 300 | 300 | <input name="[+name+]check" id="[+name+]check" class="click" type="checkbox" onchange="changestate(document.userform.[+name+])" [+checked+] [+status+]> |
| 301 | 301 | <input type="hidden" class="[+set+]" name="[+name+]" value="[+value+]"> |
| 302 | 302 | [+label+] |
| 303 | 303 | </label>'; |
| 304 | 304 | |
| 305 | - $checked = ($roledata[$name] == 1) ? 'checked' : ''; |
|
| 306 | - $value = ($roledata[$name] == 1) ? 1 : 0; |
|
| 307 | - if($status == 'disabled') { |
|
| 308 | - $checked = 'checked'; |
|
| 309 | - $value = 1; |
|
| 310 | - $set = 'fix'; |
|
| 311 | - } else { |
|
| 312 | - $set = 'set'; |
|
| 313 | - } |
|
| 305 | + $checked = ($roledata[$name] == 1) ? 'checked' : ''; |
|
| 306 | + $value = ($roledata[$name] == 1) ? 1 : 0; |
|
| 307 | + if($status == 'disabled') { |
|
| 308 | + $checked = 'checked'; |
|
| 309 | + $value = 1; |
|
| 310 | + $set = 'fix'; |
|
| 311 | + } else { |
|
| 312 | + $set = 'set'; |
|
| 313 | + } |
|
| 314 | 314 | |
| 315 | - $ph = array( |
|
| 316 | - 'name' => $name, |
|
| 317 | - 'checked' => $checked, |
|
| 318 | - 'status' => $status, |
|
| 319 | - 'value' => $value, |
|
| 320 | - 'label' => $label, |
|
| 321 | - 'set' => $set |
|
| 322 | - ); |
|
| 315 | + $ph = array( |
|
| 316 | + 'name' => $name, |
|
| 317 | + 'checked' => $checked, |
|
| 318 | + 'status' => $status, |
|
| 319 | + 'value' => $value, |
|
| 320 | + 'label' => $label, |
|
| 321 | + 'set' => $set |
|
| 322 | + ); |
|
| 323 | 323 | |
| 324 | - return $modx->parseText($tpl, $ph); |
|
| 324 | + return $modx->parseText($tpl, $ph); |
|
| 325 | 325 | } |
@@ -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((int) $modx->manager->action) { |
|
| 6 | +switch ((int) $modx->manager->action) { |
|
| 7 | 7 | case 35: |
| 8 | - if(!$modx->hasPermission('edit_role')) { |
|
| 8 | + if (!$modx->hasPermission('edit_role')) { |
|
| 9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 10 | 10 | } |
| 11 | 11 | break; |
| 12 | 12 | case 38: |
| 13 | - if(!$modx->hasPermission('new_role')) { |
|
| 13 | + if (!$modx->hasPermission('new_role')) { |
|
| 14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 15 | 15 | } |
| 16 | 16 | break; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $tbl_user_roles = $modx->getFullTableName('user_roles'); |
| 24 | 24 | |
| 25 | 25 | // check to see the snippet editor isn't locked |
| 26 | -if($lockedEl = $modx->elementIsLocked(8, $role)) { |
|
| 26 | +if ($lockedEl = $modx->elementIsLocked(8, $role)) { |
|
| 27 | 27 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['role'])); |
| 28 | 28 | } |
| 29 | 29 | // end check for lock |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | // Lock snippet for other users to edit |
| 32 | 32 | $modx->lockElement(8, $role); |
| 33 | 33 | |
| 34 | -if($modx->manager->action == '35') { |
|
| 34 | +if ($modx->manager->action == '35') { |
|
| 35 | 35 | $rs = $modx->db->select('*', $tbl_user_roles, "id='{$role}'"); |
| 36 | 36 | $roledata = $modx->db->getRow($rs); |
| 37 | - if(!$roledata) { |
|
| 37 | + if (!$roledata) { |
|
| 38 | 38 | $modx->webAlertAndQuit("No role returned!"); |
| 39 | 39 | } |
| 40 | 40 | $_SESSION['itemname'] = $roledata['name']; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | // Add lock-element JS-Script |
| 47 | 47 | $lockElementId = $role; |
| 48 | 48 | $lockElementType = 8; |
| 49 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
| 49 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
| 50 | 50 | ?> |
| 51 | 51 | <script type="text/javascript"> |
| 52 | 52 | function changestate(element) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | <input type="hidden" name="id" value="<?= $_GET['id'] ?>"> |
| 83 | 83 | |
| 84 | 84 | <h1> |
| 85 | - <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?> |
|
| 85 | + <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?> |
|
| 86 | 86 | </h1> |
| 87 | 87 | |
| 88 | 88 | <?= $_style['actionbuttons']['dynamic']['savedelete'] ?> |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | </form> |
| 294 | 294 | |
| 295 | 295 | <?php |
| 296 | -function render_form($name, $label, $status = '') { |
|
| 296 | +function render_form($name, $label, $status = ''){ |
|
| 297 | 297 | global $modx, $roledata; |
| 298 | 298 | |
| 299 | 299 | $tpl = '<label class="d-block" for="[+name+]check"> |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | $checked = ($roledata[$name] == 1) ? 'checked' : ''; |
| 306 | 306 | $value = ($roledata[$name] == 1) ? 1 : 0; |
| 307 | - if($status == 'disabled') { |
|
| 307 | + if ($status == 'disabled') { |
|
| 308 | 308 | $checked = 'checked'; |
| 309 | 309 | $value = 1; |
| 310 | 310 | $set = 'fix'; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
| 13 | 13 | $origin = isset($_REQUEST['or']) ? intval($_REQUEST['or']) : 76; |
| 14 | -$originId = isset($_REQUEST['oid']) ? intval($_REQUEST['oid']) : NULL; |
|
| 14 | +$originId = isset($_REQUEST['oid']) ? intval($_REQUEST['oid']) : null; |
|
| 15 | 15 | |
| 16 | 16 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars'); |
| 17 | 17 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | }, |
| 108 | 108 | cancel: function() { |
| 109 | 109 | documentDirty = false; |
| 110 | - document.location.href = 'index.php?a=<?= $origin ?><?=($originId != NULL ? '&id=' . $originId : '') ?>'; |
|
| 110 | + document.location.href = 'index.php?a=<?= $origin ?><?=($originId != null ? '&id=' . $originId : '') ?>'; |
|
| 111 | 111 | } |
| 112 | 112 | }; |
| 113 | 113 | |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('edit_template') && $modx->manager->action == '301') { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | if(!$modx->hasPermission('new_template') && $modx->manager->action == '300') { |
| 9 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 9 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 10 | 10 | } |
| 11 | 11 | |
| 12 | 12 | $id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | // check to see the snippet editor isn't locked |
| 22 | 22 | if($lockedEl = $modx->elementIsLocked(2, $id)) { |
| 23 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['tmplvar'])); |
|
| 23 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['tmplvar'])); |
|
| 24 | 24 | } |
| 25 | 25 | // end check for lock |
| 26 | 26 | |
@@ -30,25 +30,25 @@ discard block |
||
| 30 | 30 | global $content; |
| 31 | 31 | $content = array(); |
| 32 | 32 | if(isset($_GET['id'])) { |
| 33 | - $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'"); |
|
| 34 | - $content = $modx->db->getRow($rs); |
|
| 35 | - if(!$content) { |
|
| 36 | - header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}"); |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - $_SESSION['itemname'] = $content['caption']; |
|
| 40 | - if($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
| 41 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 42 | - } |
|
| 33 | + $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'"); |
|
| 34 | + $content = $modx->db->getRow($rs); |
|
| 35 | + if(!$content) { |
|
| 36 | + header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}"); |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + $_SESSION['itemname'] = $content['caption']; |
|
| 40 | + if($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
| 41 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 42 | + } |
|
| 43 | 43 | } else if(isset($_REQUEST['itemname'])) { |
| 44 | - $content['name'] = $_REQUEST['itemname']; |
|
| 44 | + $content['name'] = $_REQUEST['itemname']; |
|
| 45 | 45 | } else { |
| 46 | - $_SESSION['itemname'] = $_lang["new_tmplvars"]; |
|
| 47 | - $content['category'] = intval($_REQUEST['catid']); |
|
| 46 | + $_SESSION['itemname'] = $_lang["new_tmplvars"]; |
|
| 47 | + $content['category'] = intval($_REQUEST['catid']); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | if($modx->manager->hasFormValues()) { |
| 51 | - $modx->manager->loadFormValues(); |
|
| 51 | + $modx->manager->loadFormValues(); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $content = array_merge($content, $_POST); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $RTEditors = ''; |
| 63 | 63 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister', array('forfrontend' => 1)); |
| 64 | 64 | if(is_array($evtOut)) { |
| 65 | - $RTEditors = implode(',', $evtOut); |
|
| 65 | + $RTEditors = implode(',', $evtOut); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | ?> |
@@ -277,12 +277,12 @@ discard block |
||
| 277 | 277 | |
| 278 | 278 | <form name="mutate" method="post" action="index.php" enctype="multipart/form-data"> |
| 279 | 279 | <?php |
| 280 | - // invoke OnTVFormPrerender event |
|
| 281 | - $evtOut = $modx->invokeEvent('OnTVFormPrerender', array('id' => $id)); |
|
| 282 | - if(is_array($evtOut)) { |
|
| 283 | - echo implode("", $evtOut); |
|
| 284 | - } |
|
| 285 | - ?> |
|
| 280 | + // invoke OnTVFormPrerender event |
|
| 281 | + $evtOut = $modx->invokeEvent('OnTVFormPrerender', array('id' => $id)); |
|
| 282 | + if(is_array($evtOut)) { |
|
| 283 | + echo implode("", $evtOut); |
|
| 284 | + } |
|
| 285 | + ?> |
|
| 286 | 286 | <input type="hidden" name="id" value="<?= $content['id'] ?>"> |
| 287 | 287 | <input type="hidden" name="a" value="302"> |
| 288 | 288 | <input type="hidden" name="or" value="<?= $origin ?>"> |
@@ -343,11 +343,11 @@ discard block |
||
| 343 | 343 | <select name="categoryid" class="form-control" onChange="documentDirty=true;"> |
| 344 | 344 | <option> </option> |
| 345 | 345 | <?php |
| 346 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 347 | - foreach(getCategories() as $n => $v) { |
|
| 348 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 349 | - } |
|
| 350 | - ?> |
|
| 346 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 347 | + foreach(getCategories() as $n => $v) { |
|
| 348 | + echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 349 | + } |
|
| 350 | + ?> |
|
| 351 | 351 | </select> |
| 352 | 352 | </div> |
| 353 | 353 | </div> |
@@ -383,14 +383,14 @@ discard block |
||
| 383 | 383 | <optgroup label="Custom Type"> |
| 384 | 384 | <option value="custom_tv" <?= ($content['type'] == 'custom_tv' ? "selected='selected'" : "") ?>>Custom Input</option> |
| 385 | 385 | <?php |
| 386 | - $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs'); |
|
| 387 | - foreach($custom_tvs as $ctv) { |
|
| 388 | - if(strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
| 389 | - $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : ""); |
|
| 390 | - echo '<option value="custom_tv:' . $ctv . '" ' . $selected . '>' . $ctv . '</option>'; |
|
| 391 | - } |
|
| 392 | - } |
|
| 393 | - ?> |
|
| 386 | + $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs'); |
|
| 387 | + foreach($custom_tvs as $ctv) { |
|
| 388 | + if(strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
| 389 | + $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : ""); |
|
| 390 | + echo '<option value="custom_tv:' . $ctv . '" ' . $selected . '>' . $ctv . '</option>'; |
|
| 391 | + } |
|
| 392 | + } |
|
| 393 | + ?> |
|
| 394 | 394 | </optgroup> |
| 395 | 395 | </select> |
| 396 | 396 | </div> |
@@ -455,63 +455,63 @@ discard block |
||
| 455 | 455 | <a class="btn btn-secondary btn-sm" href="javascript:;" onClick="check_toggle(); return false;"><?= $_lang['check_toggle'] ?></a> |
| 456 | 456 | </div> |
| 457 | 457 | <?php |
| 458 | - $rs = $modx->db->select(sprintf("tpl.id AS id, templatename, tpl.description AS tpldescription, tpl.locked AS tpllocked, tpl.selectable AS selectable, tmplvarid, if(isnull(cat.category),'%s',cat.category) AS category, cat.id AS catid", $_lang['no_category']), sprintf("%s as tpl |
|
| 458 | + $rs = $modx->db->select(sprintf("tpl.id AS id, templatename, tpl.description AS tpldescription, tpl.locked AS tpllocked, tpl.selectable AS selectable, tmplvarid, if(isnull(cat.category),'%s',cat.category) AS category, cat.id AS catid", $_lang['no_category']), sprintf("%s as tpl |
|
| 459 | 459 | LEFT JOIN %s as stt ON stt.templateid=tpl.id AND stt.tmplvarid='%s' |
| 460 | 460 | LEFT JOIN %s as cat ON tpl.category=cat.id", $modx->getFullTableName('site_templates'), $modx->getFullTableName('site_tmplvar_templates'), $id, $modx->getFullTableName('categories')), '', "category, templatename"); |
| 461 | 461 | |
| 462 | - $tplList = '<ul>'; |
|
| 463 | - $preCat = ''; |
|
| 464 | - $insideUl = 0; |
|
| 465 | - while($row = $modx->db->getRow($rs)) { |
|
| 466 | - $row['category'] = stripslashes($row['category']); //pixelchutes |
|
| 467 | - if($preCat !== $row['category']) { |
|
| 468 | - $tplList .= $insideUl ? '</ul>' : ''; |
|
| 469 | - $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 470 | - $insideUl = 1; |
|
| 471 | - } |
|
| 472 | - |
|
| 473 | - if($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
| 474 | - $checked = true; |
|
| 475 | - } elseif(isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
| 476 | - $checked = true; |
|
| 477 | - } elseif($id == 0 && is_array($_POST['template'])) { |
|
| 478 | - $checked = in_array($row['id'], $_POST['template']); |
|
| 479 | - } else { |
|
| 480 | - $checked = $row['tmplvarid']; |
|
| 481 | - } |
|
| 482 | - $selectable = !$row['selectable'] ? ' class="disabled"' : ''; |
|
| 483 | - $checked = $checked ? ' checked="checked"' : ''; |
|
| 484 | - $tplId = ' <small>(' . $row['id'] . ')</small>'; |
|
| 485 | - $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : ''; |
|
| 486 | - |
|
| 487 | - $tplInfo = array(); |
|
| 488 | - if($row['tpllocked']) { |
|
| 489 | - $tplInfo[] = $_lang['locked']; |
|
| 490 | - } |
|
| 491 | - if($row['id'] == $modx->config['default_template']) { |
|
| 492 | - $tplInfo[] = $_lang['defaulttemplate_title']; |
|
| 493 | - } |
|
| 494 | - $tplInfo = !empty($tplInfo) ? ' <em>(' . join(', ', $tplInfo) . ')</em>' : ''; |
|
| 495 | - |
|
| 496 | - $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo); |
|
| 497 | - $tplList .= '</li>'; |
|
| 498 | - |
|
| 499 | - $preCat = $row['category']; |
|
| 500 | - } |
|
| 501 | - $tplList .= $insideUl ? '</ul>' : ''; |
|
| 502 | - $tplList .= '</ul>'; |
|
| 503 | - echo $tplList; |
|
| 504 | - |
|
| 505 | - ?> |
|
| 462 | + $tplList = '<ul>'; |
|
| 463 | + $preCat = ''; |
|
| 464 | + $insideUl = 0; |
|
| 465 | + while($row = $modx->db->getRow($rs)) { |
|
| 466 | + $row['category'] = stripslashes($row['category']); //pixelchutes |
|
| 467 | + if($preCat !== $row['category']) { |
|
| 468 | + $tplList .= $insideUl ? '</ul>' : ''; |
|
| 469 | + $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 470 | + $insideUl = 1; |
|
| 471 | + } |
|
| 472 | + |
|
| 473 | + if($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
| 474 | + $checked = true; |
|
| 475 | + } elseif(isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
| 476 | + $checked = true; |
|
| 477 | + } elseif($id == 0 && is_array($_POST['template'])) { |
|
| 478 | + $checked = in_array($row['id'], $_POST['template']); |
|
| 479 | + } else { |
|
| 480 | + $checked = $row['tmplvarid']; |
|
| 481 | + } |
|
| 482 | + $selectable = !$row['selectable'] ? ' class="disabled"' : ''; |
|
| 483 | + $checked = $checked ? ' checked="checked"' : ''; |
|
| 484 | + $tplId = ' <small>(' . $row['id'] . ')</small>'; |
|
| 485 | + $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : ''; |
|
| 486 | + |
|
| 487 | + $tplInfo = array(); |
|
| 488 | + if($row['tpllocked']) { |
|
| 489 | + $tplInfo[] = $_lang['locked']; |
|
| 490 | + } |
|
| 491 | + if($row['id'] == $modx->config['default_template']) { |
|
| 492 | + $tplInfo[] = $_lang['defaulttemplate_title']; |
|
| 493 | + } |
|
| 494 | + $tplInfo = !empty($tplInfo) ? ' <em>(' . join(', ', $tplInfo) . ')</em>' : ''; |
|
| 495 | + |
|
| 496 | + $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo); |
|
| 497 | + $tplList .= '</li>'; |
|
| 498 | + |
|
| 499 | + $preCat = $row['category']; |
|
| 500 | + } |
|
| 501 | + $tplList .= $insideUl ? '</ul>' : ''; |
|
| 502 | + $tplList .= '</ul>'; |
|
| 503 | + echo $tplList; |
|
| 504 | + |
|
| 505 | + ?> |
|
| 506 | 506 | |
| 507 | 507 | <!-- Access Permissions --> |
| 508 | 508 | <?php |
| 509 | - if($use_udperms == 1) { |
|
| 510 | - // fetch permissions for the variable |
|
| 511 | - $rs = $modx->db->select('documentgroup', $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); |
|
| 512 | - $groupsarray = $modx->db->getColumn('documentgroup', $rs); |
|
| 509 | + if($use_udperms == 1) { |
|
| 510 | + // fetch permissions for the variable |
|
| 511 | + $rs = $modx->db->select('documentgroup', $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); |
|
| 512 | + $groupsarray = $modx->db->getColumn('documentgroup', $rs); |
|
| 513 | 513 | |
| 514 | - ?> |
|
| 514 | + ?> |
|
| 515 | 515 | <?php if($modx->hasPermission('access_permissions')) { ?> |
| 516 | 516 | <script type="text/javascript"> |
| 517 | 517 | function makePublic(b) { |
@@ -539,29 +539,29 @@ discard block |
||
| 539 | 539 | <!--<b><?php /*echo $_lang['access_permissions']; */ ?></b>--> |
| 540 | 540 | <p><?= $_lang['tmplvar_access_msg'] ?></p> |
| 541 | 541 | <?php |
| 542 | - $chk = ''; |
|
| 543 | - $rs = $modx->db->select('name, id', $tbl_documentgroup_names); |
|
| 544 | - if(empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
| 545 | - $groupsarray = $_POST['docgroups']; |
|
| 546 | - } |
|
| 547 | - while($row = $modx->db->getRow($rs)) { |
|
| 548 | - $checked = in_array($row['id'], $groupsarray); |
|
| 549 | - if($modx->hasPermission('access_permissions')) { |
|
| 550 | - if($checked) { |
|
| 551 | - $notPublic = true; |
|
| 552 | - } |
|
| 553 | - $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>"; |
|
| 554 | - } else { |
|
| 555 | - if($checked) { |
|
| 556 | - echo "<input type='hidden' name='docgroups[]' value='" . $row['id'] . "' />"; |
|
| 557 | - } |
|
| 558 | - } |
|
| 559 | - } |
|
| 560 | - if($modx->hasPermission('access_permissions')) { |
|
| 561 | - $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks; |
|
| 562 | - } |
|
| 563 | - echo '<ul>' . $chks . '</ul>'; |
|
| 564 | - ?> |
|
| 542 | + $chk = ''; |
|
| 543 | + $rs = $modx->db->select('name, id', $tbl_documentgroup_names); |
|
| 544 | + if(empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
| 545 | + $groupsarray = $_POST['docgroups']; |
|
| 546 | + } |
|
| 547 | + while($row = $modx->db->getRow($rs)) { |
|
| 548 | + $checked = in_array($row['id'], $groupsarray); |
|
| 549 | + if($modx->hasPermission('access_permissions')) { |
|
| 550 | + if($checked) { |
|
| 551 | + $notPublic = true; |
|
| 552 | + } |
|
| 553 | + $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>"; |
|
| 554 | + } else { |
|
| 555 | + if($checked) { |
|
| 556 | + echo "<input type='hidden' name='docgroups[]' value='" . $row['id'] . "' />"; |
|
| 557 | + } |
|
| 558 | + } |
|
| 559 | + } |
|
| 560 | + if($modx->hasPermission('access_permissions')) { |
|
| 561 | + $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks; |
|
| 562 | + } |
|
| 563 | + echo '<ul>' . $chks . '</ul>'; |
|
| 564 | + ?> |
|
| 565 | 565 | <?php } ?> |
| 566 | 566 | <?php } ?> |
| 567 | 567 | |
@@ -571,12 +571,12 @@ discard block |
||
| 571 | 571 | <input type="submit" name="save" style="display:none"> |
| 572 | 572 | |
| 573 | 573 | <?php |
| 574 | - // invoke OnTVFormRender event |
|
| 575 | - $evtOut = $modx->invokeEvent('OnTVFormRender', array('id' => $id)); |
|
| 576 | - if(is_array($evtOut)) { |
|
| 577 | - echo implode('', $evtOut); |
|
| 578 | - } |
|
| 579 | - ?> |
|
| 574 | + // invoke OnTVFormRender event |
|
| 575 | + $evtOut = $modx->invokeEvent('OnTVFormRender', array('id' => $id)); |
|
| 576 | + if(is_array($evtOut)) { |
|
| 577 | + echo implode('', $evtOut); |
|
| 578 | + } |
|
| 579 | + ?> |
|
| 580 | 580 | </div> |
| 581 | 581 | </form> |
| 582 | 582 | <script type="text/javascript">setTimeout('showParameters()', 10);</script> |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('edit_template') && $modx->manager->action == '301') { |
|
| 5 | +if (!$modx->hasPermission('edit_template') && $modx->manager->action == '301') { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | -if(!$modx->hasPermission('new_template') && $modx->manager->action == '300') { |
|
| 8 | +if (!$modx->hasPermission('new_template') && $modx->manager->action == '300') { |
|
| 9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 10 | 10 | } |
| 11 | 11 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $tbl_documentgroup_names = $modx->getFullTableName('documentgroup_names'); |
| 20 | 20 | |
| 21 | 21 | // check to see the snippet editor isn't locked |
| 22 | -if($lockedEl = $modx->elementIsLocked(2, $id)) { |
|
| 22 | +if ($lockedEl = $modx->elementIsLocked(2, $id)) { |
|
| 23 | 23 | $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['tmplvar'])); |
| 24 | 24 | } |
| 25 | 25 | // end check for lock |
@@ -29,25 +29,25 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | global $content; |
| 31 | 31 | $content = array(); |
| 32 | -if(isset($_GET['id'])) { |
|
| 32 | +if (isset($_GET['id'])) { |
|
| 33 | 33 | $rs = $modx->db->select('*', $tbl_site_tmplvars, "id='{$id}'"); |
| 34 | 34 | $content = $modx->db->getRow($rs); |
| 35 | - if(!$content) { |
|
| 36 | - header("Location: " . MODX_SITE_URL . "index.php?id={$site_start}"); |
|
| 35 | + if (!$content) { |
|
| 36 | + header("Location: ".MODX_SITE_URL."index.php?id={$site_start}"); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | $_SESSION['itemname'] = $content['caption']; |
| 40 | - if($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
| 40 | + if ($content['locked'] == 1 && $modx->hasPermission('save_role') != 1) { |
|
| 41 | 41 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 42 | 42 | } |
| 43 | -} else if(isset($_REQUEST['itemname'])) { |
|
| 43 | +} else if (isset($_REQUEST['itemname'])) { |
|
| 44 | 44 | $content['name'] = $_REQUEST['itemname']; |
| 45 | 45 | } else { |
| 46 | 46 | $_SESSION['itemname'] = $_lang["new_tmplvars"]; |
| 47 | 47 | $content['category'] = intval($_REQUEST['catid']); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -if($modx->manager->hasFormValues()) { |
|
| 50 | +if ($modx->manager->hasFormValues()) { |
|
| 51 | 51 | $modx->manager->loadFormValues(); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | // Add lock-element JS-Script |
| 57 | 57 | $lockElementId = $id; |
| 58 | 58 | $lockElementType = 2; |
| 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 | // get available RichText Editors |
| 62 | 62 | $RTEditors = ''; |
| 63 | 63 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister', array('forfrontend' => 1)); |
| 64 | -if(is_array($evtOut)) { |
|
| 64 | +if (is_array($evtOut)) { |
|
| 65 | 65 | $RTEditors = implode(',', $evtOut); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | }, |
| 108 | 108 | cancel: function() { |
| 109 | 109 | documentDirty = false; |
| 110 | - document.location.href = 'index.php?a=<?= $origin ?><?=($originId != NULL ? '&id=' . $originId : '') ?>'; |
|
| 110 | + document.location.href = 'index.php?a=<?= $origin ?><?=($originId != NULL ? '&id='.$originId : '') ?>'; |
|
| 111 | 111 | } |
| 112 | 112 | }; |
| 113 | 113 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | <?php |
| 280 | 280 | // invoke OnTVFormPrerender event |
| 281 | 281 | $evtOut = $modx->invokeEvent('OnTVFormPrerender', array('id' => $id)); |
| 282 | - if(is_array($evtOut)) { |
|
| 282 | + if (is_array($evtOut)) { |
|
| 283 | 283 | echo implode("", $evtOut); |
| 284 | 284 | } |
| 285 | 285 | ?> |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | <input type="hidden" name="params" value="<?= $modx->htmlspecialchars($content['display_params']) ?>"> |
| 292 | 292 | |
| 293 | 293 | <h1> |
| 294 | - <i class="fa fa-list-alt"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_tmplvars']) ?><i class="fa fa-question-circle help"></i> |
|
| 294 | + <i class="fa fa-list-alt"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_tmplvars']) ?><i class="fa fa-question-circle help"></i> |
|
| 295 | 295 | </h1> |
| 296 | 296 | |
| 297 | 297 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -314,8 +314,8 @@ discard block |
||
| 314 | 314 | <div class="col-md-9 col-lg-10"> |
| 315 | 315 | <div class="form-control-name clearfix"> |
| 316 | 316 | <input name="name" type="text" maxlength="50" value="<?= $modx->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
| 317 | - <?php if($modx->hasPermission('save_role')): ?> |
|
| 318 | - <label class="custom-control" title="<?= $_lang['lock_tmplvars'] . "\n" . $_lang['lock_tmplvars_msg'] ?>" tooltip> |
|
| 317 | + <?php if ($modx->hasPermission('save_role')): ?> |
|
| 318 | + <label class="custom-control" title="<?= $_lang['lock_tmplvars']."\n".$_lang['lock_tmplvars_msg'] ?>" tooltip> |
|
| 319 | 319 | <input name="locked" type="checkbox"<?= ($content['locked'] == 1 ? ' checked="checked"' : '') ?> /> |
| 320 | 320 | <i class="fa fa-lock"></i> |
| 321 | 321 | </label> |
@@ -343,9 +343,9 @@ discard block |
||
| 343 | 343 | <select name="categoryid" class="form-control" onChange="documentDirty=true;"> |
| 344 | 344 | <option> </option> |
| 345 | 345 | <?php |
| 346 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 347 | - foreach(getCategories() as $n => $v) { |
|
| 348 | - echo "<option value='" . $v['id'] . "'" . ($content["category"] == $v["id"] ? " selected='selected'" : "") . ">" . $modx->htmlspecialchars($v["category"]) . "</option>"; |
|
| 346 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 347 | + foreach (getCategories() as $n => $v) { |
|
| 348 | + echo "<option value='".$v['id']."'".($content["category"] == $v["id"] ? " selected='selected'" : "").">".$modx->htmlspecialchars($v["category"])."</option>"; |
|
| 349 | 349 | } |
| 350 | 350 | ?> |
| 351 | 351 | </select> |
@@ -383,11 +383,11 @@ discard block |
||
| 383 | 383 | <optgroup label="Custom Type"> |
| 384 | 384 | <option value="custom_tv" <?= ($content['type'] == 'custom_tv' ? "selected='selected'" : "") ?>>Custom Input</option> |
| 385 | 385 | <?php |
| 386 | - $custom_tvs = scandir(MODX_BASE_PATH . 'assets/tvs'); |
|
| 387 | - foreach($custom_tvs as $ctv) { |
|
| 388 | - if(strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
| 389 | - $selected = ($content['type'] == 'custom_tv:' . $ctv ? "selected='selected'" : ""); |
|
| 390 | - echo '<option value="custom_tv:' . $ctv . '" ' . $selected . '>' . $ctv . '</option>'; |
|
| 386 | + $custom_tvs = scandir(MODX_BASE_PATH.'assets/tvs'); |
|
| 387 | + foreach ($custom_tvs as $ctv) { |
|
| 388 | + if (strpos($ctv, '.') !== 0 && $ctv != 'index.html') { |
|
| 389 | + $selected = ($content['type'] == 'custom_tv:'.$ctv ? "selected='selected'" : ""); |
|
| 390 | + echo '<option value="custom_tv:'.$ctv.'" '.$selected.'>'.$ctv.'</option>'; |
|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | ?> |
@@ -462,36 +462,36 @@ discard block |
||
| 462 | 462 | $tplList = '<ul>'; |
| 463 | 463 | $preCat = ''; |
| 464 | 464 | $insideUl = 0; |
| 465 | - while($row = $modx->db->getRow($rs)) { |
|
| 465 | + while ($row = $modx->db->getRow($rs)) { |
|
| 466 | 466 | $row['category'] = stripslashes($row['category']); //pixelchutes |
| 467 | - if($preCat !== $row['category']) { |
|
| 467 | + if ($preCat !== $row['category']) { |
|
| 468 | 468 | $tplList .= $insideUl ? '</ul>' : ''; |
| 469 | - $tplList .= '<li><strong>' . $row['category'] . ($row['catid'] != '' ? ' <small>(' . $row['catid'] . ')</small>' : '') . '</strong><ul>'; |
|
| 469 | + $tplList .= '<li><strong>'.$row['category'].($row['catid'] != '' ? ' <small>('.$row['catid'].')</small>' : '').'</strong><ul>'; |
|
| 470 | 470 | $insideUl = 1; |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | - if($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
| 473 | + if ($modx->manager->action == '300' && $modx->config['default_template'] == $row['id']) { |
|
| 474 | 474 | $checked = true; |
| 475 | - } elseif(isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
| 475 | + } elseif (isset($_GET['tpl']) && $_GET['tpl'] == $row['id']) { |
|
| 476 | 476 | $checked = true; |
| 477 | - } elseif($id == 0 && is_array($_POST['template'])) { |
|
| 477 | + } elseif ($id == 0 && is_array($_POST['template'])) { |
|
| 478 | 478 | $checked = in_array($row['id'], $_POST['template']); |
| 479 | 479 | } else { |
| 480 | 480 | $checked = $row['tmplvarid']; |
| 481 | 481 | } |
| 482 | 482 | $selectable = !$row['selectable'] ? ' class="disabled"' : ''; |
| 483 | 483 | $checked = $checked ? ' checked="checked"' : ''; |
| 484 | - $tplId = ' <small>(' . $row['id'] . ')</small>'; |
|
| 485 | - $desc = !empty($row['tpldescription']) ? ' - ' . $row['tpldescription'] : ''; |
|
| 484 | + $tplId = ' <small>('.$row['id'].')</small>'; |
|
| 485 | + $desc = !empty($row['tpldescription']) ? ' - '.$row['tpldescription'] : ''; |
|
| 486 | 486 | |
| 487 | 487 | $tplInfo = array(); |
| 488 | - if($row['tpllocked']) { |
|
| 488 | + if ($row['tpllocked']) { |
|
| 489 | 489 | $tplInfo[] = $_lang['locked']; |
| 490 | 490 | } |
| 491 | - if($row['id'] == $modx->config['default_template']) { |
|
| 491 | + if ($row['id'] == $modx->config['default_template']) { |
|
| 492 | 492 | $tplInfo[] = $_lang['defaulttemplate_title']; |
| 493 | 493 | } |
| 494 | - $tplInfo = !empty($tplInfo) ? ' <em>(' . join(', ', $tplInfo) . ')</em>' : ''; |
|
| 494 | + $tplInfo = !empty($tplInfo) ? ' <em>('.join(', ', $tplInfo).')</em>' : ''; |
|
| 495 | 495 | |
| 496 | 496 | $tplList .= sprintf('<li><label%s><input name="template[]" value="%s" type="checkbox" %s onchange="documentDirty=true;"> %s%s%s%s</label></li>', $selectable, $row['id'], $checked, $row['templatename'], $tplId, $desc, $tplInfo); |
| 497 | 497 | $tplList .= '</li>'; |
@@ -506,13 +506,13 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | <!-- Access Permissions --> |
| 508 | 508 | <?php |
| 509 | - if($use_udperms == 1) { |
|
| 509 | + if ($use_udperms == 1) { |
|
| 510 | 510 | // fetch permissions for the variable |
| 511 | 511 | $rs = $modx->db->select('documentgroup', $modx->getFullTableName('site_tmplvar_access'), "tmplvarid='{$id}'"); |
| 512 | 512 | $groupsarray = $modx->db->getColumn('documentgroup', $rs); |
| 513 | 513 | |
| 514 | 514 | ?> |
| 515 | - <?php if($modx->hasPermission('access_permissions')) { ?> |
|
| 515 | + <?php if ($modx->hasPermission('access_permissions')) { ?> |
|
| 516 | 516 | <script type="text/javascript"> |
| 517 | 517 | function makePublic(b) { |
| 518 | 518 | var notPublic = false; |
@@ -541,26 +541,26 @@ discard block |
||
| 541 | 541 | <?php |
| 542 | 542 | $chk = ''; |
| 543 | 543 | $rs = $modx->db->select('name, id', $tbl_documentgroup_names); |
| 544 | - if(empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
| 544 | + if (empty($groupsarray) && is_array($_POST['docgroups']) && empty($_POST['id'])) { |
|
| 545 | 545 | $groupsarray = $_POST['docgroups']; |
| 546 | 546 | } |
| 547 | - while($row = $modx->db->getRow($rs)) { |
|
| 547 | + while ($row = $modx->db->getRow($rs)) { |
|
| 548 | 548 | $checked = in_array($row['id'], $groupsarray); |
| 549 | - if($modx->hasPermission('access_permissions')) { |
|
| 550 | - if($checked) { |
|
| 549 | + if ($modx->hasPermission('access_permissions')) { |
|
| 550 | + if ($checked) { |
|
| 551 | 551 | $notPublic = true; |
| 552 | 552 | } |
| 553 | - $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='" . $row['id'] . "' " . ($checked ? "checked='checked'" : '') . " onclick=\"makePublic(false)\" /> " . $row['name'] . "</label></li>"; |
|
| 553 | + $chks .= "<li><label><input type='checkbox' name='docgroups[]' value='".$row['id']."' ".($checked ? "checked='checked'" : '')." onclick=\"makePublic(false)\" /> ".$row['name']."</label></li>"; |
|
| 554 | 554 | } else { |
| 555 | - if($checked) { |
|
| 556 | - echo "<input type='hidden' name='docgroups[]' value='" . $row['id'] . "' />"; |
|
| 555 | + if ($checked) { |
|
| 556 | + echo "<input type='hidden' name='docgroups[]' value='".$row['id']."' />"; |
|
| 557 | 557 | } |
| 558 | 558 | } |
| 559 | 559 | } |
| 560 | - if($modx->hasPermission('access_permissions')) { |
|
| 561 | - $chks = "<li><label><input type='checkbox' name='chkalldocs' " . (!$notPublic ? "checked='checked'" : '') . " onclick=\"makePublic(true)\" /> <span class='warning'>" . $_lang['all_doc_groups'] . "</span></label></li>" . $chks; |
|
| 560 | + if ($modx->hasPermission('access_permissions')) { |
|
| 561 | + $chks = "<li><label><input type='checkbox' name='chkalldocs' ".(!$notPublic ? "checked='checked'" : '')." onclick=\"makePublic(true)\" /> <span class='warning'>".$_lang['all_doc_groups']."</span></label></li>".$chks; |
|
| 562 | 562 | } |
| 563 | - echo '<ul>' . $chks . '</ul>'; |
|
| 563 | + echo '<ul>'.$chks.'</ul>'; |
|
| 564 | 564 | ?> |
| 565 | 565 | <?php } ?> |
| 566 | 566 | <?php } ?> |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | <?php |
| 574 | 574 | // invoke OnTVFormRender event |
| 575 | 575 | $evtOut = $modx->invokeEvent('OnTVFormRender', array('id' => $id)); |
| 576 | - if(is_array($evtOut)) { |
|
| 576 | + if (is_array($evtOut)) { |
|
| 577 | 577 | echo implode('', $evtOut); |
| 578 | 578 | } |
| 579 | 579 | ?> |
@@ -29,10 +29,12 @@ |
||
| 29 | 29 | |
| 30 | 30 | <div class="tab-page"> |
| 31 | 31 | <div class="container container-body"> |
| 32 | - <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
| 32 | + <?php if($num_rows_pub) { |
|
| 33 | + printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
| 33 | 34 | <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
| 34 | 35 | <?php |
| 35 | 36 | $modx->clearCache('full', true); |
| 37 | +} |
|
| 36 | 38 | // invoke OnSiteRefresh event |
| 37 | 39 | $modx->invokeEvent("OnSiteRefresh"); |
| 38 | 40 | ?> |
@@ -1,6 +1,6 @@ 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 | // (un)publishing of documents, version 2! |
@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
| 33 | 33 | <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
| 34 | 34 | <?php |
| 35 | - $modx->clearCache('full', true); |
|
| 36 | - // invoke OnSiteRefresh event |
|
| 37 | - $modx->invokeEvent("OnSiteRefresh"); |
|
| 38 | - ?> |
|
| 35 | + $modx->clearCache('full', true); |
|
| 36 | + // invoke OnSiteRefresh event |
|
| 37 | + $modx->invokeEvent("OnSiteRefresh"); |
|
| 38 | + ?> |
|
| 39 | 39 | </div> |
| 40 | 40 | </div> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 4 | 4 | } |
| 5 | 5 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | <div class="tab-page"> |
| 31 | 31 | <div class="container container-body"> |
| 32 | - <?php if($num_rows_pub) printf('<p>' . $_lang["refresh_published"] . '</p>', $num_rows_pub) ?> |
|
| 33 | - <?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?> |
|
| 32 | + <?php if ($num_rows_pub) printf('<p>'.$_lang["refresh_published"].'</p>', $num_rows_pub) ?> |
|
| 33 | + <?php if ($num_rows_unpub) printf('<p>'.$_lang["refresh_unpublished"].'</p>', $num_rows_unpub) ?> |
|
| 34 | 34 | <?php |
| 35 | 35 | $modx->clearCache('full', true); |
| 36 | 36 | // invoke OnSiteRefresh event |