@@ -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 | ?> |
@@ -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(); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | function BrowseServer() {
|
| 125 | 125 | var w = screen.width * 0.7; |
| 126 | 126 | var h = screen.height * 0.7; |
| 127 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h);
|
|
| 127 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h);
|
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | function SetUrl(url, width, height, alt) {
|
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | function BrowseServer() {
|
| 163 | 163 | var w = screen.width * 0.7; |
| 164 | 164 | var h = screen.height * 0.7; |
| 165 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h);
|
|
| 165 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h);
|
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | function SetUrl(url, width, height, alt) {
|
@@ -180,9 +180,9 @@ discard block |
||
| 180 | 180 | <tr> |
| 181 | 181 | <th><?php echo $_lang['login_form_position_title'] ?><br><small>[(login_form_position)]</small></th> |
| 182 | 182 | <td> |
| 183 | - <?php echo wrap_label($_lang['login_form_position_left'], form_radio('login_form_position', 'left'));?><br />
|
|
| 184 | - <?php echo wrap_label($_lang['login_form_position_center'], form_radio('login_form_position', 'center'));?><br />
|
|
| 185 | - <?php echo wrap_label($_lang['login_form_position_right'], form_radio('login_form_position', 'right'));?>
|
|
| 183 | + <?php echo wrap_label($_lang['login_form_position_left'], form_radio('login_form_position', 'left')); ?><br />
|
|
| 184 | + <?php echo wrap_label($_lang['login_form_position_center'], form_radio('login_form_position', 'center')); ?><br />
|
|
| 185 | + <?php echo wrap_label($_lang['login_form_position_right'], form_radio('login_form_position', 'right')); ?>
|
|
| 186 | 186 | </td> |
| 187 | 187 | </tr> |
| 188 | 188 | <tr> |
@@ -194,8 +194,8 @@ discard block |
||
| 194 | 194 | <tr> |
| 195 | 195 | <th><?php echo $_lang['manager_menu_position_title'] ?><br><small>[(manager_menu_position)]</small></th> |
| 196 | 196 | <td> |
| 197 | - <?php echo wrap_label($_lang['manager_menu_position_top'], form_radio('manager_menu_position', 'top'));?><br />
|
|
| 198 | - <?php echo wrap_label($_lang['manager_menu_position_left'], form_radio('manager_menu_position', 'left'));?><br />
|
|
| 197 | + <?php echo wrap_label($_lang['manager_menu_position_top'], form_radio('manager_menu_position', 'top')); ?><br />
|
|
| 198 | + <?php echo wrap_label($_lang['manager_menu_position_left'], form_radio('manager_menu_position', 'left')); ?><br />
|
|
| 199 | 199 | </td> |
| 200 | 200 | </tr> |
| 201 | 201 | |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | <td> |
| 338 | 338 | <select name="group_tvs" size="1" class="form-control"> |
| 339 | 339 | <?php |
| 340 | - $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>' . "\n"; |
|
| 340 | + $tpl = '<option value="[+value+]" [+selected+]>[+title+]</option>'."\n"; |
|
| 341 | 341 | $option = explode(',', $_lang['settings_group_tv_options']);
|
| 342 | 342 | $output = array(); |
| 343 | 343 | foreach ($option as $k => $v) {
|
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | <td> |
| 411 | 411 | <select name="resource_tree_node_name" size="1" class="inputBox"> |
| 412 | 412 | <?php |
| 413 | - $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n"; |
|
| 413 | + $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>'."\n"; |
|
| 414 | 414 | $option = array('pagetitle', 'longtitle', 'menutitle', 'alias', 'createdon', 'editedon', 'publishedon');
|
| 415 | 415 | $output = array(); |
| 416 | 416 | foreach ($option as $v) {
|
@@ -496,8 +496,8 @@ discard block |
||
| 496 | 496 | $str = ''; |
| 497 | 497 | foreach ($datetime_format_list as $value) {
|
| 498 | 498 | $selectedtext = ($datetime_format == $value) ? ' selected' : ''; |
| 499 | - $str .= '<option value="' . $value . '"' . $selectedtext . '>'; |
|
| 500 | - $str .= $value . '</option>' . PHP_EOL; |
|
| 499 | + $str .= '<option value="'.$value.'"'.$selectedtext.'>'; |
|
| 500 | + $str .= $value.'</option>'.PHP_EOL; |
|
| 501 | 501 | } |
| 502 | 502 | echo $str; |
| 503 | 503 | ?> |
@@ -607,10 +607,10 @@ discard block |
||
| 607 | 607 | <select name="which_editor" onChange="documentDirty=true;"> |
| 608 | 608 | <?php |
| 609 | 609 | // invoke OnRichTextEditorRegister event |
| 610 | - echo "<option value='none'" . ($which_editor == 'none' ? " selected='selected'" : "") . ">" . $_lang['none'] . "</option>\n"; |
|
| 610 | + echo "<option value='none'".($which_editor == 'none' ? " selected='selected'" : "").">".$_lang['none']."</option>\n"; |
|
| 611 | 611 | if (is_array($evtOut)) {
|
| 612 | 612 | foreach ($evtOut as $editor) {
|
| 613 | - echo "<option value='$editor'" . ($which_editor == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; |
|
| 613 | + echo "<option value='$editor'".($which_editor == $editor ? " selected='selected'" : "").">$editor</option>\n"; |
|
| 614 | 614 | } |
| 615 | 615 | } |
| 616 | 616 | ?> |
@@ -66,111 +66,111 @@ |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | switch ($_POST['mode']) { |
| 69 | - case '23': // Save new snippet |
|
| 70 | - |
|
| 71 | - // invoke OnBeforeSnipFormSave event |
|
| 72 | - $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 73 | - "mode" => "new", |
|
| 74 | - "id" => $id |
|
| 75 | - )); |
|
| 76 | - |
|
| 77 | - // disallow duplicate names for new snippets |
|
| 78 | - $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_snippets'), "name='{$name}'"); |
|
| 79 | - $count = $modx->db->getValue($rs); |
|
| 80 | - if ($count > 0) { |
|
| 81 | - $modx->manager->saveFormValues(23); |
|
| 82 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=23"); |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - //do stuff to save the new doc |
|
| 86 | - $newid = $modx->db->insert(array( |
|
| 87 | - 'name' => $name, |
|
| 88 | - 'description' => $description, |
|
| 89 | - 'snippet' => $snippet, |
|
| 90 | - 'moduleguid' => $moduleguid, |
|
| 91 | - 'locked' => $locked, |
|
| 92 | - 'properties' => $properties, |
|
| 93 | - 'category' => $categoryid, |
|
| 94 | - 'disabled' => $disabled, |
|
| 95 | - 'createdon' => $currentdate, |
|
| 96 | - 'editedon' => $currentdate |
|
| 97 | - ), $modx->getFullTableName('site_snippets')); |
|
| 98 | - |
|
| 99 | - // invoke OnSnipFormSave event |
|
| 100 | - $modx->invokeEvent("OnSnipFormSave", array( |
|
| 101 | - "mode" => "new", |
|
| 102 | - "id" => $newid |
|
| 103 | - )); |
|
| 104 | - |
|
| 105 | - // Set the item name for logger |
|
| 106 | - $_SESSION['itemname'] = $name; |
|
| 107 | - |
|
| 108 | - // empty cache |
|
| 109 | - $modx->clearCache('full'); |
|
| 110 | - |
|
| 111 | - // finished emptying cache - redirect |
|
| 112 | - if ($_POST['stay'] != '') { |
|
| 113 | - $a = ($_POST['stay'] == '2') ? "22&id=$newid" : "23"; |
|
| 114 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | - header($header); |
|
| 116 | - } else { |
|
| 117 | - $header = "Location: index.php?a=76&r=2"; |
|
| 118 | - header($header); |
|
| 119 | - } |
|
| 120 | - break; |
|
| 121 | - case '22': // Save existing snippet |
|
| 122 | - // invoke OnBeforeSnipFormSave event |
|
| 123 | - $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 124 | - "mode" => "upd", |
|
| 125 | - "id" => $id |
|
| 126 | - )); |
|
| 127 | - |
|
| 128 | - // disallow duplicate names for snippets |
|
| 129 | - $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_snippets'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | - if ($modx->db->getValue($rs) > 0) { |
|
| 131 | - $modx->manager->saveFormValues(22); |
|
| 132 | - $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=22&id={$id}"); |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - //do stuff to save the edited doc |
|
| 136 | - $modx->db->update(array( |
|
| 137 | - 'name' => $name, |
|
| 138 | - 'description' => $description, |
|
| 139 | - 'snippet' => $snippet, |
|
| 140 | - 'moduleguid' => $moduleguid, |
|
| 141 | - 'locked' => $locked, |
|
| 142 | - 'properties' => $properties, |
|
| 143 | - 'category' => $categoryid, |
|
| 144 | - 'disabled' => $disabled, |
|
| 145 | - 'editedon' => $currentdate |
|
| 146 | - ), $modx->getFullTableName('site_snippets'), "id='{$id}'"); |
|
| 147 | - |
|
| 148 | - // invoke OnSnipFormSave event |
|
| 149 | - $modx->invokeEvent("OnSnipFormSave", array( |
|
| 150 | - "mode" => "upd", |
|
| 151 | - "id" => $id |
|
| 152 | - )); |
|
| 153 | - |
|
| 154 | - // Set the item name for logger |
|
| 155 | - $_SESSION['itemname'] = $name; |
|
| 156 | - |
|
| 157 | - // empty cache |
|
| 158 | - $modx->clearCache('full'); |
|
| 159 | - |
|
| 160 | - if ($_POST['runsnippet']) { |
|
| 161 | - run_snippet($snippet); |
|
| 162 | - } |
|
| 163 | - // finished emptying cache - redirect |
|
| 164 | - if ($_POST['stay'] != '') { |
|
| 165 | - $a = ($_POST['stay'] == '2') ? "22&id=$id" : "23"; |
|
| 166 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 167 | - header($header); |
|
| 168 | - } else { |
|
| 169 | - $modx->unlockElement(4, $id); |
|
| 170 | - $header = "Location: index.php?a=76&r=2"; |
|
| 171 | - header($header); |
|
| 172 | - } |
|
| 173 | - break; |
|
| 174 | - default: |
|
| 175 | - $modx->webAlertAndQuit("No operation set in request."); |
|
| 69 | + case '23': // Save new snippet |
|
| 70 | + |
|
| 71 | + // invoke OnBeforeSnipFormSave event |
|
| 72 | + $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 73 | + "mode" => "new", |
|
| 74 | + "id" => $id |
|
| 75 | + )); |
|
| 76 | + |
|
| 77 | + // disallow duplicate names for new snippets |
|
| 78 | + $rs = $modx->db->select('COUNT(id)', $modx->getFullTableName('site_snippets'), "name='{$name}'"); |
|
| 79 | + $count = $modx->db->getValue($rs); |
|
| 80 | + if ($count > 0) { |
|
| 81 | + $modx->manager->saveFormValues(23); |
|
| 82 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=23"); |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + //do stuff to save the new doc |
|
| 86 | + $newid = $modx->db->insert(array( |
|
| 87 | + 'name' => $name, |
|
| 88 | + 'description' => $description, |
|
| 89 | + 'snippet' => $snippet, |
|
| 90 | + 'moduleguid' => $moduleguid, |
|
| 91 | + 'locked' => $locked, |
|
| 92 | + 'properties' => $properties, |
|
| 93 | + 'category' => $categoryid, |
|
| 94 | + 'disabled' => $disabled, |
|
| 95 | + 'createdon' => $currentdate, |
|
| 96 | + 'editedon' => $currentdate |
|
| 97 | + ), $modx->getFullTableName('site_snippets')); |
|
| 98 | + |
|
| 99 | + // invoke OnSnipFormSave event |
|
| 100 | + $modx->invokeEvent("OnSnipFormSave", array( |
|
| 101 | + "mode" => "new", |
|
| 102 | + "id" => $newid |
|
| 103 | + )); |
|
| 104 | + |
|
| 105 | + // Set the item name for logger |
|
| 106 | + $_SESSION['itemname'] = $name; |
|
| 107 | + |
|
| 108 | + // empty cache |
|
| 109 | + $modx->clearCache('full'); |
|
| 110 | + |
|
| 111 | + // finished emptying cache - redirect |
|
| 112 | + if ($_POST['stay'] != '') { |
|
| 113 | + $a = ($_POST['stay'] == '2') ? "22&id=$newid" : "23"; |
|
| 114 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 115 | + header($header); |
|
| 116 | + } else { |
|
| 117 | + $header = "Location: index.php?a=76&r=2"; |
|
| 118 | + header($header); |
|
| 119 | + } |
|
| 120 | + break; |
|
| 121 | + case '22': // Save existing snippet |
|
| 122 | + // invoke OnBeforeSnipFormSave event |
|
| 123 | + $modx->invokeEvent("OnBeforeSnipFormSave", array( |
|
| 124 | + "mode" => "upd", |
|
| 125 | + "id" => $id |
|
| 126 | + )); |
|
| 127 | + |
|
| 128 | + // disallow duplicate names for snippets |
|
| 129 | + $rs = $modx->db->select('COUNT(*)', $modx->getFullTableName('site_snippets'), "name='{$name}' AND id!='{$id}'"); |
|
| 130 | + if ($modx->db->getValue($rs) > 0) { |
|
| 131 | + $modx->manager->saveFormValues(22); |
|
| 132 | + $modx->webAlertAndQuit(sprintf($_lang['duplicate_name_found_general'], $_lang['snippet'], $name), "index.php?a=22&id={$id}"); |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + //do stuff to save the edited doc |
|
| 136 | + $modx->db->update(array( |
|
| 137 | + 'name' => $name, |
|
| 138 | + 'description' => $description, |
|
| 139 | + 'snippet' => $snippet, |
|
| 140 | + 'moduleguid' => $moduleguid, |
|
| 141 | + 'locked' => $locked, |
|
| 142 | + 'properties' => $properties, |
|
| 143 | + 'category' => $categoryid, |
|
| 144 | + 'disabled' => $disabled, |
|
| 145 | + 'editedon' => $currentdate |
|
| 146 | + ), $modx->getFullTableName('site_snippets'), "id='{$id}'"); |
|
| 147 | + |
|
| 148 | + // invoke OnSnipFormSave event |
|
| 149 | + $modx->invokeEvent("OnSnipFormSave", array( |
|
| 150 | + "mode" => "upd", |
|
| 151 | + "id" => $id |
|
| 152 | + )); |
|
| 153 | + |
|
| 154 | + // Set the item name for logger |
|
| 155 | + $_SESSION['itemname'] = $name; |
|
| 156 | + |
|
| 157 | + // empty cache |
|
| 158 | + $modx->clearCache('full'); |
|
| 159 | + |
|
| 160 | + if ($_POST['runsnippet']) { |
|
| 161 | + run_snippet($snippet); |
|
| 162 | + } |
|
| 163 | + // finished emptying cache - redirect |
|
| 164 | + if ($_POST['stay'] != '') { |
|
| 165 | + $a = ($_POST['stay'] == '2') ? "22&id=$id" : "23"; |
|
| 166 | + $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 167 | + header($header); |
|
| 168 | + } else { |
|
| 169 | + $modx->unlockElement(4, $id); |
|
| 170 | + $header = "Location: index.php?a=76&r=2"; |
|
| 171 | + header($header); |
|
| 172 | + } |
|
| 173 | + break; |
|
| 174 | + default: |
|
| 175 | + $modx->webAlertAndQuit("No operation set in request."); |
|
| 176 | 176 | } |
@@ -1,12 +1,12 @@ 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 | if (!$modx->hasPermission('save_snippet')) { |
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -$id = (int)$_POST['id']; |
|
| 9 | +$id = (int) $_POST['id']; |
|
| 10 | 10 | $snippet = trim($_POST['post']); |
| 11 | 11 | $name = $modx->db->escape(trim($_POST['name'])); |
| 12 | 12 | $description = $modx->db->escape($_POST['description']); |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | //Kyle Jaebker - added category support |
| 35 | 35 | if (empty($_POST['newcategory']) && $_POST['categoryid'] > 0) { |
| 36 | - $categoryid = (int)$_POST['categoryid']; |
|
| 36 | + $categoryid = (int) $_POST['categoryid']; |
|
| 37 | 37 | } elseif (empty($_POST['newcategory']) && $_POST['categoryid'] <= 0) { |
| 38 | 38 | $categoryid = 0; |
| 39 | 39 | } else { |
| 40 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 40 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 41 | 41 | $categoryid = checkCategory($_POST['newcategory']); |
| 42 | 42 | if (!$categoryid) { |
| 43 | 43 | $categoryid = newCategory($_POST['newcategory']); |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | $moduleguid = isset($parsed['guid']) ? $parsed['guid'] : $moduleguid; |
| 56 | 56 | |
| 57 | 57 | $description = isset($parsed['description']) ? $parsed['description'] : $description; |
| 58 | - $version = isset($parsed['version']) ? '<b>' . $parsed['version'] . '</b> ' : ''; |
|
| 58 | + $version = isset($parsed['version']) ? '<b>'.$parsed['version'].'</b> ' : ''; |
|
| 59 | 59 | if ($version) { |
| 60 | - $description = $version . trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 60 | + $description = $version.trim(preg_replace('/(<b>.+?)+(<\/b>)/i', '', $description)); |
|
| 61 | 61 | } |
| 62 | 62 | if (isset($parsed['modx_category'])) { |
| 63 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
| 63 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
| 64 | 64 | $categoryid = getCategory($parsed['modx_category']); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // finished emptying cache - redirect |
| 112 | 112 | if ($_POST['stay'] != '') { |
| 113 | 113 | $a = ($_POST['stay'] == '2') ? "22&id=$newid" : "23"; |
| 114 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 114 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 115 | 115 | header($header); |
| 116 | 116 | } else { |
| 117 | 117 | $header = "Location: index.php?a=76&r=2"; |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | // finished emptying cache - redirect |
| 164 | 164 | if ($_POST['stay'] != '') { |
| 165 | 165 | $a = ($_POST['stay'] == '2') ? "22&id=$id" : "23"; |
| 166 | - $header = "Location: index.php?a=" . $a . "&r=2&stay=" . $_POST['stay']; |
|
| 166 | + $header = "Location: index.php?a=".$a."&r=2&stay=".$_POST['stay']; |
|
| 167 | 167 | header($header); |
| 168 | 168 | } else { |
| 169 | 169 | $modx->unlockElement(4, $id); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Portugues Brasil localization file for KCFinder |
| 4 | - * author: Alexandre Benegas Ferreira |
|
| 5 | - * country: Brasil |
|
| 6 | - * company website: www.hostcataratas.com.br |
|
| 7 | - * e-mail: [email protected] |
|
| 8 | - */ |
|
| 4 | + * author: Alexandre Benegas Ferreira |
|
| 5 | + * country: Brasil |
|
| 6 | + * company website: www.hostcataratas.com.br |
|
| 7 | + * e-mail: [email protected] |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | $lang = array( |
| 11 | 11 | |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | |
| 10 | 10 | $lang = array( |
| 11 | 11 | |
| 12 | - '_locale' => "pt_BR.UTF-8", // UNIX localization code |
|
| 13 | - '_charset' => "utf-8", // Browser charset |
|
| 12 | + '_locale' => "pt_BR.UTF-8", // UNIX localization code |
|
| 13 | + '_charset' => "utf-8", // Browser charset |
|
| 14 | 14 | |
| 15 | 15 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 16 | 16 | '_dateTimeFull' => "%A, %e %B, %Y %H:%M", |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** German localization file for KCFinder |
| 4 | - * author: Tim Wahrendorff <[email protected]> |
|
| 5 | - */ |
|
| 4 | + * author: Tim Wahrendorff <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | $lang = array( |
| 8 | 8 | |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | $lang = array( |
| 8 | 8 | |
| 9 | - '_locale' => "de_DE.UTF-8", // UNIX localization code |
|
| 10 | - '_charset' => "utf-8", // Browser charset |
|
| 9 | + '_locale' => "de_DE.UTF-8", // UNIX localization code |
|
| 10 | + '_charset' => "utf-8", // Browser charset |
|
| 11 | 11 | |
| 12 | 12 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 13 | 13 | '_dateTimeFull' => "%A, %e.%B.%Y %I:%M %p", |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |
| 10 | - '_locale' => "uk_UA.UTF-8", // UNIX localization code |
|
| 11 | - '_charset' => "utf-8", // Browser charset |
|
| 10 | + '_locale' => "uk_UA.UTF-8", // UNIX localization code |
|
| 11 | + '_charset' => "utf-8", // Browser charset |
|
| 12 | 12 | |
| 13 | 13 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 14 | 14 | '_dateTimeFull' => "%A, %e %B, %Y %H:%M", |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Ukrainian localization file for KCFinder |
| 4 | - * author: Myroslav Dobra |
|
| 5 | - * E-mail: [email protected] |
|
| 6 | - */ |
|
| 4 | + * author: Myroslav Dobra |
|
| 5 | + * E-mail: [email protected] |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** This file is part of KCFinder project |
| 4 | - * |
|
| 5 | - * @desc Japanese localization |
|
| 6 | - * @package KCFinder |
|
| 7 | - * @author yama [email protected] |
|
| 8 | - * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 9 | - * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 10 | - */ |
|
| 4 | + * |
|
| 5 | + * @desc Japanese localization |
|
| 6 | + * @package KCFinder |
|
| 7 | + * @author yama [email protected] |
|
| 8 | + * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 |
|
| 9 | + * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | $lang = array( |
| 13 | 13 | |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | |
| 12 | 12 | $lang = array( |
| 13 | 13 | |
| 14 | - '_locale' => "ja_JP.UTF-8", // UNIX localization code |
|
| 15 | - '_charset' => "utf-8", // Browser charset |
|
| 14 | + '_locale' => "ja_JP.UTF-8", // UNIX localization code |
|
| 15 | + '_charset' => "utf-8", // Browser charset |
|
| 16 | 16 | |
| 17 | 17 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 18 | 18 | '_dateTimeFull' => "%Y/%m/%d %H:%M", |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** French localization file for KCFinder |
| 4 | - * author: Damien Barrère |
|
| 5 | - * update: Samuel Jobard |
|
| 6 | - */ |
|
| 4 | + * author: Damien Barrère |
|
| 5 | + * update: Samuel Jobard |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | |
| 8 | 8 | $lang = array( |
| 9 | 9 | |
| 10 | - '_locale' => "fr_FR.UTF-8", // UNIX localization code |
|
| 11 | - '_charset' => "utf-8", // Browser charset |
|
| 10 | + '_locale' => "fr_FR.UTF-8", // UNIX localization code |
|
| 11 | + '_charset' => "utf-8", // Browser charset |
|
| 12 | 12 | |
| 13 | 13 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 14 | 14 | '_dateTimeFull' => "%A %e %B %Y %H:%M", |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Hebrew localization file for KCFinder |
| 4 | - * Sig: 1f4f9aee887c97f618c19a82040a4dad |
|
| 5 | - */ |
|
| 4 | + * Sig: 1f4f9aee887c97f618c19a82040a4dad |
|
| 5 | + */ |
|
| 6 | 6 | |
| 7 | 7 | $lang = array( |
| 8 | 8 | |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | $lang = array( |
| 8 | 8 | |
| 9 | - '_locale' => "he_IL.UTF-8", // UNIX localization code |
|
| 10 | - '_charset' => "utf-8", // Browser charset |
|
| 9 | + '_locale' => "he_IL.UTF-8", // UNIX localization code |
|
| 10 | + '_charset' => "utf-8", // Browser charset |
|
| 11 | 11 | |
| 12 | 12 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 13 | 13 | '_dateTimeFull' => "%H:%M %Y %B %e %A", |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** Romanian localization file for KCFinder |
| 4 | - */ |
|
| 4 | + */ |
|
| 5 | 5 | |
| 6 | 6 | $lang = array( |
| 7 | 7 | |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | |
| 6 | 6 | $lang = array( |
| 7 | 7 | |
| 8 | - '_locale' => "ro_RO.UTF-8", // UNIX localization code |
|
| 9 | - '_charset' => "utf-8", // Browser charset |
|
| 8 | + '_locale' => "ro_RO.UTF-8", // UNIX localization code |
|
| 9 | + '_charset' => "utf-8", // Browser charset |
|
| 10 | 10 | |
| 11 | 11 | // Date time formats. See http://www.php.net/manual/en/function.strftime.php |
| 12 | 12 | '_dateTimeFull' => "%A, %e %B, %Y %H:%M", |