@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param mixed $image |
60 | 60 | * @param array $options */ |
61 | 61 | |
62 | - public function __construct($image, array $options=array()) |
|
62 | + public function __construct($image, array $options = array()) |
|
63 | 63 | { |
64 | 64 | $this->image = $this->width = $this->height = null; |
65 | 65 | $imageDetails = $this->buildImage($image); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param mixed $image |
80 | 80 | * @return object */ |
81 | 81 | |
82 | - final public static function factory($driver, $image, array $options=array()) |
|
82 | + final public static function factory($driver, $image, array $options = array()) |
|
83 | 83 | { |
84 | 84 | $class = "image_$driver"; |
85 | 85 | return new $class($image, $options); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @param array $drivers |
92 | 92 | * @return string */ |
93 | 93 | |
94 | - final public static function getDriver(array $drivers=array('gd')) |
|
94 | + final public static function getDriver(array $drivers = array('gd')) |
|
95 | 95 | { |
96 | 96 | foreach ($drivers as $driver) { |
97 | 97 | if (!preg_match('/^[a-z0-9\_]+$/i', $driver)) { |
@@ -196,21 +196,21 @@ discard block |
||
196 | 196 | * @param integer $height |
197 | 197 | * @param mixed $background |
198 | 198 | * @return bool */ |
199 | - abstract public function resizeFit($width, $height, $background=false); |
|
199 | + abstract public function resizeFit($width, $height, $background = false); |
|
200 | 200 | |
201 | 201 | /** Resize and crop the image to fit in given resolution. Returns TRUE on |
202 | 202 | * success or FALSE on failure |
203 | 203 | * @param mixed $src |
204 | 204 | * @param integer $offset |
205 | 205 | * @return bool */ |
206 | - abstract public function resizeCrop($width, $height, $offset=false); |
|
206 | + abstract public function resizeCrop($width, $height, $offset = false); |
|
207 | 207 | |
208 | 208 | |
209 | 209 | /** Rotate image |
210 | 210 | * @param integer $angle |
211 | 211 | * @param string $background |
212 | 212 | * @return bool */ |
213 | - abstract public function rotate($angle, $background="#000000"); |
|
213 | + abstract public function rotate($angle, $background = "#000000"); |
|
214 | 214 | |
215 | 215 | abstract public function flipHorizontal(); |
216 | 216 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * @param mixed $top |
227 | 227 | * @param mixed $left |
228 | 228 | * @return bool */ |
229 | - abstract public function watermark($file, $left=false, $top=false); |
|
229 | + abstract public function watermark($file, $left = false, $top = false); |
|
230 | 230 | |
231 | 231 | /** Should output the image. Second parameter is used to pass some options like |
232 | 232 | * 'file' - if is set, the output will be written to a file |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @param string $type |
236 | 236 | * @param array $options |
237 | 237 | * @return bool */ |
238 | - abstract public function output($type='jpeg', array $options=array()); |
|
238 | + abstract public function output($type = 'jpeg', array $options = array()); |
|
239 | 239 | |
240 | 240 | /** This method should create a blank image with selected size. Should returns |
241 | 241 | * resource or object related to the created image, which will be passed to |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | $i = 0; |
30 | 30 | do { |
31 | - $file = "$dir/is_writable_" . md5($i++); |
|
31 | + $file = "$dir/is_writable_".md5($i++); |
|
32 | 32 | } while (file_exists($file)); |
33 | 33 | if (!@touch($file)) { |
34 | 34 | return false; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param array $failed |
49 | 49 | * @return mixed */ |
50 | 50 | |
51 | - public static function prune($dir, $firstFailExit=true, array $failed=null) |
|
51 | + public static function prune($dir, $firstFailExit = true, array $failed = null) |
|
52 | 52 | { |
53 | 53 | if ($failed === null) { |
54 | 54 | $failed = array(); |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | * @param array $options |
100 | 100 | * @return mixed */ |
101 | 101 | |
102 | - public static function content($dir, array $options=null) |
|
102 | + public static function content($dir, array $options = null) |
|
103 | 103 | { |
104 | 104 | $defaultOptions = array( |
105 | - 'types' => "all", // Allowed: "all" or possible return values |
|
105 | + 'types' => "all", // Allowed: "all" or possible return values |
|
106 | 106 | // of filetype(), or an array with them |
107 | - 'addPath' => true, // Whether to add directory path to filenames |
|
107 | + 'addPath' => true, // Whether to add directory path to filenames |
|
108 | 108 | 'pattern' => '/./', // Regular expression pattern for filename |
109 | 109 | 'followLinks' => true |
110 | 110 | ); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * @param bool $toLower |
121 | 121 | * @return string */ |
122 | 122 | |
123 | - public static function getExtension($filename, $toLower=true) |
|
123 | + public static function getExtension($filename, $toLower = true) |
|
124 | 124 | { |
125 | 125 | return preg_match('/^.*\.([^\.]*)$/s', $filename, $patt) |
126 | 126 | ? ($toLower ? strtolower($patt[1]) : $patt[1]) : ""; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @param string $magic |
138 | 138 | * @return string */ |
139 | 139 | |
140 | - public static function getMimeType($filename, $magic=null) |
|
140 | + public static function getMimeType($filename, $magic = null) |
|
141 | 141 | { |
142 | 142 | if (class_exists("finfo")) { |
143 | 143 | $finfo = ($magic === null) |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @param string $tpl |
175 | 175 | * @return string */ |
176 | 176 | |
177 | - public static function getInexistantFilename($filename, $dir=null, $tpl=null) |
|
177 | + public static function getInexistantFilename($filename, $dir = null, $tpl = null) |
|
178 | 178 | { |
179 | 179 | if ($tpl === null) { |
180 | 180 | $tpl = "{name}({sufix}){ext}"; |
@@ -196,13 +196,13 @@ discard block |
||
196 | 196 | $i = 1; |
197 | 197 | $file = "$dir/$filename"; |
198 | 198 | while (file_exists($file)) { |
199 | - $file = "$dir/" . str_replace('{sufix}', $i++, $tpl); |
|
199 | + $file = "$dir/".str_replace('{sufix}', $i++, $tpl); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | return $fullPath |
203 | 203 | ? $file |
204 | 204 | : (strlen($fdir) |
205 | - ? "$fdir/" . basename($file) |
|
205 | + ? "$fdir/".basename($file) |
|
206 | 206 | : basename($file)); |
207 | 207 | } |
208 | 208 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | if ($_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) { |
25 | 25 | returnNoPermissionsMessage('assets_images'); |
26 | 26 | } |
27 | -if ($_GET['type'] == 'files' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files')) { |
|
27 | +if ($_GET['type'] == 'files' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files')) { |
|
28 | 28 | returnNoPermissionsMessage('assets_files'); |
29 | 29 | } |
30 | 30 |
@@ -18,11 +18,11 @@ |
||
18 | 18 | $type = 'images'; |
19 | 19 | } |
20 | 20 | |
21 | - if ($type==='image') { |
|
21 | + if ($type === 'image') { |
|
22 | 22 | $type = 'images'; |
23 | 23 | } |
24 | 24 | |
25 | - $opener = (isset($_GET['editor'])) ? 'opener=' . htmlspecialchars(trim($_GET['editor']), ENT_QUOTES) : ''; |
|
25 | + $opener = (isset($_GET['editor'])) ? 'opener='.htmlspecialchars(trim($_GET['editor']), ENT_QUOTES) : ''; |
|
26 | 26 | $request_uri = "{$opener}&type={$type}"; |
27 | 27 | ?> |
28 | 28 | window.location.href = "browse.php?<?php echo $request_uri; ?>"; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | $modx = evolutionCMS(); |
10 | 10 | |
11 | - $load_script = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
|
11 | + $load_script = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
|
12 | 12 | if (!isset($modx->config['lang_code'])) { |
13 | 13 | $modx->config['lang_code'] = $this->getLangCode(); |
14 | 14 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
11 | +$style_path = 'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | 13 | if (!$modx->config['lang_code']) { |
14 | 14 | global $modx_lang_attribute; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
23 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'); |
|
23 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'); |
|
24 | 24 | |
25 | 25 | //Main Menu |
26 | 26 | $_style['menu_search'] = '<i class="fa fa-search"></i>'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $_style['expand_tree'] = '<i class="fa fa-arrow-circle-down"></i>'; |
53 | 53 | $_style['hide_tree'] = '<i class="fa fa-caret-square-o-left"></i>'; |
54 | 54 | $_style['refresh_tree'] = '<i class="fa fa-refresh"></i>'; |
55 | -$_style['show_tree'] = $style_path . 'tree/expand.png'; |
|
55 | +$_style['show_tree'] = $style_path.'tree/expand.png'; |
|
56 | 56 | $_style['sort_tree'] = '<i class="fa fa-sort"></i>'; |
57 | 57 | $_style['sort_menuindex'] = '<i class="fa fa-sort-numeric-asc"></i>'; |
58 | 58 | $_style['element_management'] = '<i class="fa fa-th"></i>'; |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | |
77 | 77 | // Tree Icons |
78 | 78 | $_style['tree_deletedpage'] = "<i class='fa fa-ban'></i>"; |
79 | -$_style['tree_folder'] = $style_path . 'tree/folder-close-alt.png'; /* folder.png */ |
|
80 | -$_style['tree_folderopen'] = $style_path . 'tree/folder-open-alt.png'; /* folder-open.png */ |
|
81 | -$_style['tree_globe'] = $style_path . 'tree/globe.png'; |
|
79 | +$_style['tree_folder'] = $style_path.'tree/folder-close-alt.png'; /* folder.png */ |
|
80 | +$_style['tree_folderopen'] = $style_path.'tree/folder-open-alt.png'; /* folder-open.png */ |
|
81 | +$_style['tree_globe'] = $style_path.'tree/globe.png'; |
|
82 | 82 | $_style['tree_folder_new'] = "<i class='fa fa-folder'></i>"; /* folder.png */ |
83 | 83 | $_style['tree_folderopen_new'] = "<i class='fa fa-folder-open'></i>"; /* folder-open.png */ |
84 | 84 | $_style['tree_folder_secure'] = "<i class='fa fa-folder'><i class='fa fa-lock'></i></i>"; |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
100 | 100 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
101 | 101 | |
102 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
103 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
104 | -$_style['tree_weblink'] = $style_path . 'tree/link.png'; |
|
105 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
102 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
103 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
104 | +$_style['tree_weblink'] = $style_path.'tree/link.png'; |
|
105 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
106 | 106 | |
107 | 107 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
108 | 108 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -133,12 +133,12 @@ discard block |
||
133 | 133 | $_style['icons_resource_overview'] = 'fa fa-info'; |
134 | 134 | $_style['icons_edit_resource'] = 'fa fa-pencil-square-o'; |
135 | 135 | //context menu |
136 | -$_style['icons_resource_duplicate'] = $style_path . 'icons/clone.png'; |
|
137 | -$_style['icons_edit_document'] = $style_path . 'icons/save.png'; |
|
138 | -$_style['icons_delete_document'] = $style_path . 'icons/trash.png'; |
|
136 | +$_style['icons_resource_duplicate'] = $style_path.'icons/clone.png'; |
|
137 | +$_style['icons_edit_document'] = $style_path.'icons/save.png'; |
|
138 | +$_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
|
139 | 139 | //locks |
140 | -$_style['icons_preview_resource'] = $style_path . 'icons/eye.png';//$style_path.'icons/eye.png'; |
|
141 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
140 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
141 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
142 | 142 | |
143 | 143 | //file manager icons |
144 | 144 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -199,66 +199,66 @@ discard block |
||
199 | 199 | |
200 | 200 | //for back compatibility |
201 | 201 | |
202 | -$_style['icons_save'] = $style_path . 'icons/save.png'; |
|
203 | -$_style['icons_delete'] = $style_path . 'icons/trash.png'; |
|
204 | -$_style['icons_deleted_folder'] = $style_path . 'tree/deletedfolder.png'; |
|
205 | -$_style['icons_unzip'] = $style_path . 'icons/download-alt.png'; |
|
202 | +$_style['icons_save'] = $style_path.'icons/save.png'; |
|
203 | +$_style['icons_delete'] = $style_path.'icons/trash.png'; |
|
204 | +$_style['icons_deleted_folder'] = $style_path.'tree/deletedfolder.png'; |
|
205 | +$_style['icons_unzip'] = $style_path.'icons/download-alt.png'; |
|
206 | 206 | |
207 | 207 | |
208 | 208 | // Indicators |
209 | 209 | $_style['icons_tooltip'] = 'fa fa-question-circle'; |
210 | -$_style['icons_tooltip_over'] = $style_path . 'icons/question-sign.png'; |
|
211 | -$_style['icons_cal'] = $style_path . 'icons/calendar.png'; |
|
212 | -$_style['icons_cal_nodate'] = $style_path . 'icons/calendar.png'; |
|
213 | -$_style['icons_set_parent'] = $style_path . 'icons/folder-open.png'; |
|
210 | +$_style['icons_tooltip_over'] = $style_path.'icons/question-sign.png'; |
|
211 | +$_style['icons_cal'] = $style_path.'icons/calendar.png'; |
|
212 | +$_style['icons_cal_nodate'] = $style_path.'icons/calendar.png'; |
|
213 | +$_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
|
214 | 214 | |
215 | 215 | //modules |
216 | -$_style['icons_module'] = 'fa fa-cube'; |
|
216 | +$_style['icons_module'] = 'fa fa-cube'; |
|
217 | 217 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
218 | -$_style['icons_run'] = $style_path . 'icons/play.png'; |
|
218 | +$_style['icons_run'] = $style_path.'icons/play.png'; |
|
219 | 219 | |
220 | 220 | //users and webusers |
221 | 221 | $_style['icons_user'] = 'fa fa-user'; //$style_path.'icons/user.png'; |
222 | 222 | |
223 | 223 | //Messages |
224 | -$_style['icons_message_unread'] = $style_path . 'icons/email.png'; |
|
225 | -$_style['icons_message_forward'] = $style_path . 'icons/forward.png'; |
|
226 | -$_style['icons_message_reply'] = $style_path . 'icons/reply.png'; |
|
224 | +$_style['icons_message_unread'] = $style_path.'icons/email.png'; |
|
225 | +$_style['icons_message_forward'] = $style_path.'icons/forward.png'; |
|
226 | +$_style['icons_message_reply'] = $style_path.'icons/reply.png'; |
|
227 | 227 | |
228 | 228 | // Icons |
229 | -$_style['icons_add'] = $style_path . 'icons/add.png'; |
|
230 | -$_style['icons_cancel'] = $style_path . 'icons/cancel.png'; |
|
231 | -$_style['icons_close'] = $style_path . 'icons/stop.png'; |
|
232 | -$_style['icons_refresh'] = $style_path . 'icons/refresh.png'; |
|
233 | -$_style['icons_table'] = $style_path . 'icons/table.png'; |
|
229 | +$_style['icons_add'] = $style_path.'icons/add.png'; |
|
230 | +$_style['icons_cancel'] = $style_path.'icons/cancel.png'; |
|
231 | +$_style['icons_close'] = $style_path.'icons/stop.png'; |
|
232 | +$_style['icons_refresh'] = $style_path.'icons/refresh.png'; |
|
233 | +$_style['icons_table'] = $style_path.'icons/table.png'; |
|
234 | 234 | |
235 | 235 | // top bar |
236 | -$_style['icons_loading_doc_tree'] = $style_path . 'icons/info-sign.png'; |
|
237 | -$_style['icons_mail'] = $style_path . 'icons/email.png'; |
|
238 | -$_style['icons_working'] = $style_path . 'icons/exclamation.png'; |
|
236 | +$_style['icons_loading_doc_tree'] = $style_path.'icons/info-sign.png'; |
|
237 | +$_style['icons_mail'] = $style_path.'icons/email.png'; |
|
238 | +$_style['icons_working'] = $style_path.'icons/exclamation.png'; |
|
239 | 239 | |
240 | 240 | //event log |
241 | -$_style['icons_event1'] = $style_path . 'icons/event1.png'; |
|
242 | -$_style['icons_event2'] = $style_path . 'icons/event2.png'; |
|
243 | -$_style['icons_event3'] = $style_path . 'icons/event3.png'; |
|
241 | +$_style['icons_event1'] = $style_path.'icons/event1.png'; |
|
242 | +$_style['icons_event2'] = $style_path.'icons/event2.png'; |
|
243 | +$_style['icons_event3'] = $style_path.'icons/event3.png'; |
|
244 | 244 | |
245 | 245 | |
246 | 246 | //nowhere in the manager |
247 | -$_style['icons_folder'] = $style_path . 'icons/folder.png'; |
|
248 | -$_style['icons_email'] = $style_path . 'icons/email.png'; |
|
249 | -$_style['icons_home'] = $style_path . 'icons/home.png'; |
|
250 | -$_style['icons_sort_menuindex'] = $style_path . 'icons/sort_index.png'; |
|
251 | -$_style['icons_weblink'] = $style_path . 'icons/world_link.png'; |
|
252 | -$_style['icons_tab_preview'] = $style_path . 'icons/preview.png'; // Tabs |
|
253 | -$_style['icons_information'] = $style_path . 'icons/info-sign.png'; |
|
247 | +$_style['icons_folder'] = $style_path.'icons/folder.png'; |
|
248 | +$_style['icons_email'] = $style_path.'icons/email.png'; |
|
249 | +$_style['icons_home'] = $style_path.'icons/home.png'; |
|
250 | +$_style['icons_sort_menuindex'] = $style_path.'icons/sort_index.png'; |
|
251 | +$_style['icons_weblink'] = $style_path.'icons/world_link.png'; |
|
252 | +$_style['icons_tab_preview'] = $style_path.'icons/preview.png'; // Tabs |
|
253 | +$_style['icons_information'] = $style_path.'icons/info-sign.png'; |
|
254 | 254 | |
255 | 255 | |
256 | 256 | // Miscellaneous |
257 | -$_style['ajax_loader'] = '<p>' . $_lang['loading_page'] . '</p><p><i class="fa fa-spinner fa-spin"></i></p>'; |
|
258 | -$_style['tx'] = $style_path . 'misc/_tx_.gif'; |
|
259 | -$_style['icons_right_arrow'] = $style_path . 'icons/arrow-right.png'; |
|
260 | -$_style['fade'] = $style_path . 'misc/fade.gif'; |
|
261 | -$_style['ed_save'] = $style_path . 'misc/ed_save.gif'; |
|
257 | +$_style['ajax_loader'] = '<p>'.$_lang['loading_page'].'</p><p><i class="fa fa-spinner fa-spin"></i></p>'; |
|
258 | +$_style['tx'] = $style_path.'misc/_tx_.gif'; |
|
259 | +$_style['icons_right_arrow'] = $style_path.'icons/arrow-right.png'; |
|
260 | +$_style['fade'] = $style_path.'misc/fade.gif'; |
|
261 | +$_style['ed_save'] = $style_path.'misc/ed_save.gif'; |
|
262 | 262 | |
263 | 263 | // actions buttons templates |
264 | 264 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
@@ -337,30 +337,30 @@ discard block |
||
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
340 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
340 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
341 | 341 | </a> |
342 | 342 | <span class="btn btn-success plus dropdown-toggle"></span> |
343 | 343 | <select id="stay" name="stay"> |
344 | 344 | ' . ($addnew ? ' |
345 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
346 | - ' : '') . ' |
|
347 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
348 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
345 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
346 | + ' : '').' |
|
347 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
348 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | 351 | ($addnew ? ' |
352 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
352 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
354 | 354 | </a> |
355 | - ' : '') . ' |
|
356 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
357 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
355 | + ' : '').' |
|
356 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
357 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
358 | 358 | </a> |
359 | 359 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
360 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
360 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
361 | 361 | </a> |
362 | 362 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
363 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
363 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
@@ -368,22 +368,22 @@ discard block |
||
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
371 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
371 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
372 | 372 | </a> |
373 | 373 | <span class="btn btn-success plus dropdown-toggle"></span> |
374 | 374 | <select id="stay" name="stay"> |
375 | 375 | ' . ($addnew ? ' |
376 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
377 | - ' : '') . ' |
|
378 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
379 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
376 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
377 | + ' : '').' |
|
378 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
379 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
380 | 380 | </select> |
381 | 381 | </div> |
382 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
383 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
382 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
383 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
384 | 384 | </a> |
385 | 385 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
386 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
386 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
@@ -391,86 +391,86 @@ discard block |
||
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
394 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
394 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
395 | 395 | </a> |
396 | 396 | <span class="btn btn-success plus dropdown-toggle"></span> |
397 | 397 | <select id="stay" name="stay"> |
398 | 398 | ' . ($addnew ? ' |
399 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
400 | - ' : '') . ' |
|
401 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
402 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
399 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
400 | + ' : '').' |
|
401 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
402 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
403 | 403 | </select> |
404 | 404 | </div> |
405 | 405 | ' . ($addnew ? ' |
406 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
406 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
408 | 408 | </a> |
409 | - ' : '') . ' |
|
410 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
411 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
409 | + ' : '').' |
|
410 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
411 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
412 | 412 | </a> |
413 | 413 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
414 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
414 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
415 | 415 | </a> |
416 | 416 | ' . ($run ? ' |
417 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
418 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
417 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
418 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
419 | 419 | </a> |
420 | - ' : '') . ' |
|
420 | + ' : '').' |
|
421 | 421 | </div> |
422 | 422 | </div>', |
423 | 423 | 'newmodule' => ($addnew ? '<div id="actions"> |
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | - <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
|
426 | + <i class="' . $_style["actions_new"].'"></i><span>'.$_lang['new_module'].'</span> |
|
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | 430 | 'close' => '<div id="actions"> |
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
433 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | 437 | 'save' => '<div id="actions"> |
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
440 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
441 | 441 | </a> |
442 | 442 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
443 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
443 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | 447 | 'savedelete' => '<div id="actions"> |
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
450 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
451 | 451 | </a> |
452 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
453 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
452 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
453 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
454 | 454 | </a> |
455 | 455 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
456 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
456 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | 460 | 'cancel' => '<div id="actions"> |
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
463 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | 467 | 'canceldelete' => '<div id="actions"> |
468 | 468 | <div class="btn-group"> |
469 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
470 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
469 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
470 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
471 | 471 | </a> |
472 | 472 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
473 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
473 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
@@ -480,33 +480,33 @@ discard block |
||
480 | 480 | <div class="btn-group">' . |
481 | 481 | ($addnew ? ' |
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
483 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
484 | 484 | </a> |
485 | 485 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
486 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
486 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
487 | 487 | </a> |
488 | - ' : '') . ' |
|
488 | + ' : '').' |
|
489 | 489 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
490 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
490 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
491 | 491 | </a> |
492 | 492 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
493 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
493 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
494 | 494 | </a> |
495 | 495 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
496 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
496 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
497 | 497 | </a> |
498 | 498 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
499 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
499 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
500 | 500 | </a> |
501 | 501 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
502 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
502 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | 506 | 'cancel' => '<div id="actions"> |
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
509 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | $modx->loadExtension("ManagerAPI"); |
20 | 20 | |
21 | 21 | $_lang = array(); |
22 | -include_once MODX_MANAGER_PATH . '/includes/lang/english.inc.php'; |
|
22 | +include_once MODX_MANAGER_PATH.'/includes/lang/english.inc.php'; |
|
23 | 23 | if ($modx->config['manager_language'] != 'english') { |
24 | - include_once MODX_MANAGER_PATH . '/includes/lang/' . $modx->config['manager_language'] . '.inc.php'; |
|
24 | + include_once MODX_MANAGER_PATH.'/includes/lang/'.$modx->config['manager_language'].'.inc.php'; |
|
25 | 25 | } |
26 | -include_once MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/style.php'; |
|
26 | +include_once MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/style.php'; |
|
27 | 27 | |
28 | 28 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
29 | 29 | $frame = isset($_REQUEST['f']) ? $_REQUEST['f'] : ''; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | switch ($frame) { |
42 | 42 | case 'nodes': |
43 | - include_once MODX_MANAGER_PATH . '/frames/nodes.php'; |
|
43 | + include_once MODX_MANAGER_PATH.'/frames/nodes.php'; |
|
44 | 44 | |
45 | 45 | break; |
46 | 46 | } |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | $sql = ''; |
59 | 59 | $a = ''; |
60 | 60 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '%*_') : ''; |
61 | - $sqlLike = $filter ? 'WHERE t1.name LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
62 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
61 | + $sqlLike = $filter ? 'WHERE t1.name LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
62 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
63 | 63 | |
64 | 64 | switch ($elements) { |
65 | 65 | case 'element_templates': |
66 | 66 | $a = 16; |
67 | - $sqlLike = $filter ? 'WHERE t1.templatename LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
67 | + $sqlLike = $filter ? 'WHERE t1.templatename LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
68 | 68 | $sql = $modx->db->query('SELECT t1.*, t1.templatename AS name |
69 | - FROM ' . $modx->getFullTableName('site_templates') . ' AS t1 |
|
70 | - ' . $sqlLike . ' |
|
69 | + FROM ' . $modx->getFullTableName('site_templates').' AS t1 |
|
70 | + ' . $sqlLike.' |
|
71 | 71 | ORDER BY t1.templatename ASC |
72 | 72 | ' . $sqlLimit); |
73 | 73 | |
74 | 74 | if ($modx->hasPermission('new_template')) { |
75 | - $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>' . $_lang['new_template'] . '</a></li>'; |
|
75 | + $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>'.$_lang['new_template'].'</a></li>'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | break; |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | case 'element_tplvars': |
81 | 81 | $a = 301; |
82 | 82 | $sql = $modx->db->query('SELECT t1.id,t1.name,t1.locked, IF(MIN(t2.tmplvarid),0,1) AS disabled |
83 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' AS t1 |
|
84 | - LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates') . ' AS t2 ON t1.id=t2.tmplvarid |
|
85 | - ' . $sqlLike . ' |
|
83 | + FROM ' . $modx->getFullTableName('site_tmplvars').' AS t1 |
|
84 | + LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates').' AS t2 ON t1.id=t2.tmplvarid |
|
85 | + ' . $sqlLike.' |
|
86 | 86 | GROUP BY t1.id |
87 | 87 | ORDER BY t1.name ASC |
88 | 88 | ' . $sqlLimit); |
89 | 89 | |
90 | 90 | if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
91 | - $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>' . $_lang['new_tmplvars'] . '</a></li>'; |
|
91 | + $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>'.$_lang['new_tmplvars'].'</a></li>'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | break; |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | case 'element_htmlsnippets': |
97 | 97 | $a = 78; |
98 | 98 | $sql = $modx->db->query('SELECT t1.* |
99 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' AS t1 |
|
100 | - ' . $sqlLike . ' |
|
99 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' AS t1 |
|
100 | + ' . $sqlLike.' |
|
101 | 101 | ORDER BY t1.name ASC |
102 | 102 | ' . $sqlLimit); |
103 | 103 | |
104 | 104 | if ($modx->hasPermission('new_chunk')) { |
105 | - $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>' . $_lang['new_htmlsnippet'] . '</a></li>'; |
|
105 | + $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>'.$_lang['new_htmlsnippet'].'</a></li>'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | break; |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | case 'element_snippets': |
111 | 111 | $a = 22; |
112 | 112 | $sql = $modx->db->query('SELECT t1.* |
113 | - FROM ' . $modx->getFullTableName('site_snippets') . ' AS t1 |
|
114 | - ' . $sqlLike . ' |
|
113 | + FROM ' . $modx->getFullTableName('site_snippets').' AS t1 |
|
114 | + ' . $sqlLike.' |
|
115 | 115 | ORDER BY t1.name ASC |
116 | 116 | ' . $sqlLimit); |
117 | 117 | |
118 | 118 | if ($modx->hasPermission('new_snippet')) { |
119 | - $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>' . $_lang['new_snippet'] . '</a></li>'; |
|
119 | + $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>'.$_lang['new_snippet'].'</a></li>'; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | break; |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | case 'element_plugins': |
125 | 125 | $a = 102; |
126 | 126 | $sql = $modx->db->query('SELECT t1.* |
127 | - FROM ' . $modx->getFullTableName('site_plugins') . ' AS t1 |
|
128 | - ' . $sqlLike . ' |
|
127 | + FROM ' . $modx->getFullTableName('site_plugins').' AS t1 |
|
128 | + ' . $sqlLike.' |
|
129 | 129 | ORDER BY t1.name ASC |
130 | 130 | ' . $sqlLimit); |
131 | 131 | |
132 | 132 | if ($modx->hasPermission('new_plugin')) { |
133 | - $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>' . $_lang['new_plugin'] . '</a></li>'; |
|
133 | + $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>'.$_lang['new_plugin'].'</a></li>'; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | break; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | continue; |
146 | 146 | } |
147 | 147 | |
148 | - $items .= '<li class="item ' . ($row['disabled'] ? 'disabled' : '') . ($row['locked'] ? ' locked' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main" data-parent-id="a_76__elements_' . $elements . '">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>' . "\n"; |
|
148 | + $items .= '<li class="item '.($row['disabled'] ? 'disabled' : '').($row['locked'] ? ' locked' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main" data-parent-id="a_76__elements_'.$elements.'">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'."\n"; |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
@@ -166,18 +166,18 @@ discard block |
||
166 | 166 | $output = ''; |
167 | 167 | $items = ''; |
168 | 168 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
169 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
170 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
169 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
170 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
171 | 171 | |
172 | 172 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
173 | - FROM ' . $modx->getFullTableName('manager_users') . ' AS t1 |
|
174 | - LEFT JOIN ' . $modx->getFullTableName('user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
175 | - ' . $sqlLike . ' |
|
173 | + FROM ' . $modx->getFullTableName('manager_users').' AS t1 |
|
174 | + LEFT JOIN ' . $modx->getFullTableName('user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
175 | + ' . $sqlLike.' |
|
176 | 176 | ORDER BY t1.username ASC |
177 | 177 | ' . $sqlLimit); |
178 | 178 | |
179 | 179 | if ($modx->hasPermission('new_user')) { |
180 | - $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>' . $_lang['new_user'] . '</a></li>'; |
|
180 | + $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>'.$_lang['new_user'].'</a></li>'; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
186 | 186 | } |
187 | 187 | while ($row = $modx->db->getRow($sql)) { |
188 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
188 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
@@ -205,18 +205,18 @@ discard block |
||
205 | 205 | $output = ''; |
206 | 206 | $items = ''; |
207 | 207 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
208 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
209 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
208 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
209 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
210 | 210 | |
211 | 211 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
212 | - FROM ' . $modx->getFullTableName('web_users') . ' AS t1 |
|
213 | - LEFT JOIN ' . $modx->getFullTableName('web_user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
214 | - ' . $sqlLike . ' |
|
212 | + FROM ' . $modx->getFullTableName('web_users').' AS t1 |
|
213 | + LEFT JOIN ' . $modx->getFullTableName('web_user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
214 | + ' . $sqlLike.' |
|
215 | 215 | ORDER BY t1.username ASC |
216 | 216 | ' . $sqlLimit); |
217 | 217 | |
218 | 218 | if ($modx->hasPermission('new_web_user')) { |
219 | - $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>' . $_lang['new_web_user'] . '</a></li>'; |
|
219 | + $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>'.$_lang['new_web_user'].'</a></li>'; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
225 | 225 | } |
226 | 226 | while ($row = $modx->db->getRow($sql)) { |
227 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
227 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | |
@@ -250,35 +250,35 @@ discard block |
||
250 | 250 | case 'SnippetNoCache': { |
251 | 251 | |
252 | 252 | $sql = $modx->db->query('SELECT * |
253 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
254 | - WHERE name="' . $name . '" |
|
253 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
254 | + WHERE name="' . $name.'" |
|
255 | 255 | LIMIT 1'); |
256 | 256 | |
257 | 257 | if ($modx->db->getRecordCount($sql)) { |
258 | 258 | $row = $modx->db->getRow($sql); |
259 | 259 | $contextmenu = array( |
260 | 260 | 'header' => array( |
261 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
261 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
262 | 262 | ), |
263 | 263 | 'item' => array( |
264 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
265 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
264 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
265 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
266 | 266 | ) |
267 | 267 | ); |
268 | 268 | if (!empty($row['description'])) { |
269 | 269 | $contextmenu['seperator'] = ''; |
270 | 270 | $contextmenu['description'] = array( |
271 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
271 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
272 | 272 | ); |
273 | 273 | } |
274 | 274 | } else { |
275 | 275 | $contextmenu = array( |
276 | 276 | 'header' => array( |
277 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
277 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
278 | 278 | ), |
279 | 279 | 'item' => array( |
280 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
281 | - 'url' => "index.php?a=23&itemname=" . $name |
|
280 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
281 | + 'url' => "index.php?a=23&itemname=".$name |
|
282 | 282 | ) |
283 | 283 | ); |
284 | 284 | } |
@@ -288,35 +288,35 @@ discard block |
||
288 | 288 | case 'Chunk': { |
289 | 289 | |
290 | 290 | $sql = $modx->db->query('SELECT * |
291 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
292 | - WHERE name="' . $name . '" |
|
291 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
292 | + WHERE name="' . $name.'" |
|
293 | 293 | LIMIT 1'); |
294 | 294 | |
295 | 295 | if ($modx->db->getRecordCount($sql)) { |
296 | 296 | $row = $modx->db->getRow($sql); |
297 | 297 | $contextmenu = array( |
298 | 298 | 'header' => array( |
299 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $row['name'] |
|
299 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$row['name'] |
|
300 | 300 | ), |
301 | 301 | 'item' => array( |
302 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
303 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
302 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
303 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
304 | 304 | ) |
305 | 305 | ); |
306 | 306 | if (!empty($row['description'])) { |
307 | 307 | $contextmenu['seperator'] = ''; |
308 | 308 | $contextmenu['description'] = array( |
309 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
309 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 | } else { |
313 | 313 | $contextmenu = array( |
314 | 314 | 'header' => array( |
315 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $name |
|
315 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$name |
|
316 | 316 | ), |
317 | 317 | 'item' => array( |
318 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
319 | - 'url' => "index.php?a=77&itemname=" . $name |
|
318 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
319 | + 'url' => "index.php?a=77&itemname=".$name |
|
320 | 320 | ) |
321 | 321 | ); |
322 | 322 | } |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | } |
326 | 326 | case 'AttributeValue': { |
327 | 327 | $sql = $modx->db->query('SELECT * |
328 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
329 | - WHERE name="' . $name . '" |
|
328 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
329 | + WHERE name="' . $name.'" |
|
330 | 330 | LIMIT 1'); |
331 | 331 | |
332 | 332 | if ($modx->db->getRecordCount($sql)) { |
@@ -336,51 +336,51 @@ discard block |
||
336 | 336 | 'innerText' => $row['name'] |
337 | 337 | ), |
338 | 338 | 'item' => array( |
339 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
340 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
339 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
340 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
341 | 341 | ) |
342 | 342 | ); |
343 | 343 | if (!empty($row['description'])) { |
344 | 344 | $contextmenu['seperator'] = ''; |
345 | 345 | $contextmenu['description'] = array( |
346 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
346 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
347 | 347 | ); |
348 | 348 | } |
349 | 349 | } else { |
350 | 350 | $sql = $modx->db->query('SELECT * |
351 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
352 | - WHERE name="' . $name . '" |
|
351 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
352 | + WHERE name="' . $name.'" |
|
353 | 353 | LIMIT 1'); |
354 | 354 | |
355 | 355 | if ($modx->db->getRecordCount($sql)) { |
356 | 356 | $row = $modx->db->getRow($sql); |
357 | 357 | $contextmenu = array( |
358 | 358 | 'header' => array( |
359 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
359 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
360 | 360 | ), |
361 | 361 | 'item' => array( |
362 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
363 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
362 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
363 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
364 | 364 | ) |
365 | 365 | ); |
366 | 366 | if (!empty($row['description'])) { |
367 | 367 | $contextmenu['seperator'] = ''; |
368 | 368 | $contextmenu['description'] = array( |
369 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
369 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
370 | 370 | ); |
371 | 371 | } |
372 | 372 | } else { |
373 | 373 | $contextmenu = array( |
374 | 374 | 'header' => array( |
375 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
375 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
376 | 376 | ), |
377 | 377 | 'item' => array( |
378 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
379 | - 'url' => "index.php?a=77&itemname=" . $name |
|
378 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
379 | + 'url' => "index.php?a=77&itemname=".$name |
|
380 | 380 | ), |
381 | 381 | 'item2' => array( |
382 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
383 | - 'url' => "index.php?a=23&itemname=" . $name |
|
382 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
383 | + 'url' => "index.php?a=23&itemname=".$name |
|
384 | 384 | ) |
385 | 385 | ); |
386 | 386 | } |
@@ -436,35 +436,35 @@ discard block |
||
436 | 436 | } |
437 | 437 | |
438 | 438 | $sql = $modx->db->query('SELECT * |
439 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' |
|
440 | - WHERE name="' . $name . '" |
|
439 | + FROM ' . $modx->getFullTableName('site_tmplvars').' |
|
440 | + WHERE name="' . $name.'" |
|
441 | 441 | LIMIT 1'); |
442 | 442 | |
443 | 443 | if ($modx->db->getRecordCount($sql)) { |
444 | 444 | $row = $modx->db->getRow($sql); |
445 | 445 | $contextmenu = array( |
446 | 446 | 'header' => array( |
447 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $row['name'] |
|
447 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$row['name'] |
|
448 | 448 | ), |
449 | 449 | 'item' => array( |
450 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
451 | - 'url' => "index.php?a=301&id=" . $row['id'] |
|
450 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
451 | + 'url' => "index.php?a=301&id=".$row['id'] |
|
452 | 452 | ) |
453 | 453 | ); |
454 | 454 | if (!empty($row['description'])) { |
455 | 455 | $contextmenu['seperator'] = ''; |
456 | 456 | $contextmenu['description'] = array( |
457 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
457 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
458 | 458 | ); |
459 | 459 | } |
460 | 460 | } else { |
461 | 461 | $contextmenu = array( |
462 | 462 | 'header' => array( |
463 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $name |
|
463 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$name |
|
464 | 464 | ), |
465 | 465 | 'item' => array( |
466 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_tmplvars'], |
|
467 | - 'url' => "index.php?a=300&itemname=" . $name |
|
466 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_tmplvars'], |
|
467 | + 'url' => "index.php?a=300&itemname=".$name |
|
468 | 468 | ) |
469 | 469 | ); |
470 | 470 | } |
@@ -483,15 +483,15 @@ discard block |
||
483 | 483 | $json = array(); |
484 | 484 | |
485 | 485 | if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
486 | - $id = !empty($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
|
487 | - $parent = isset($_REQUEST['parent']) ? (int)$_REQUEST['parent'] : 0; |
|
486 | + $id = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
487 | + $parent = isset($_REQUEST['parent']) ? (int) $_REQUEST['parent'] : 0; |
|
488 | 488 | $menuindex = isset($_REQUEST['menuindex']) && is_scalar($_REQUEST['menuindex']) ? $_REQUEST['menuindex'] : 0; |
489 | 489 | |
490 | 490 | // set parent |
491 | 491 | if ($id && $parent >= 0) { |
492 | 492 | |
493 | 493 | // find older parent |
494 | - $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id=' . $id)); |
|
494 | + $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id='.$id)); |
|
495 | 495 | |
496 | 496 | $eventOut = $modx->invokeEvent('onBeforeMoveDocument', array( |
497 | 497 | 'id_document' => $id, |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | if (empty($json['errors'])) { |
513 | 513 | // check privileges user for move docs |
514 | 514 | if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
515 | - $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN(' . $id . ',' . $parent . ',' . $parentOld . ')'); |
|
515 | + $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN('.$id.','.$parent.','.$parentOld.')'); |
|
516 | 516 | if ($modx->db->getRecordCount($sql)) { |
517 | 517 | $document_groups = array(); |
518 | 518 | while ($row = $modx->db->getRow($sql)) { |
@@ -537,22 +537,22 @@ discard block |
||
537 | 537 | // set new parent |
538 | 538 | $modx->db->update(array( |
539 | 539 | 'parent' => $parent |
540 | - ), $modx->getFullTableName('site_content'), 'id=' . $id); |
|
540 | + ), $modx->getFullTableName('site_content'), 'id='.$id); |
|
541 | 541 | // set parent isfolder = 1 |
542 | 542 | $modx->db->update(array( |
543 | 543 | 'isfolder' => 1 |
544 | - ), $modx->getFullTableName('site_content'), 'id=' . $parent); |
|
544 | + ), $modx->getFullTableName('site_content'), 'id='.$parent); |
|
545 | 545 | |
546 | 546 | if ($parent != $parentOld) { |
547 | 547 | // check children docs and set parent isfolder |
548 | - if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
548 | + if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent='.$parentOld))) { |
|
549 | 549 | $modx->db->update(array( |
550 | 550 | 'isfolder' => 1 |
551 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
551 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
552 | 552 | } else { |
553 | 553 | $modx->db->update(array( |
554 | 554 | 'isfolder' => 0 |
555 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
555 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
556 | 556 | } |
557 | 557 | } |
558 | 558 | |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | if (!empty($menuindex)) { |
561 | 561 | $menuindex = explode(',', $menuindex); |
562 | 562 | foreach ($menuindex as $key => $value) { |
563 | - $modx->db->query('UPDATE ' . $modx->getFullTableName('site_content') . ' SET menuindex=' . $key . ' WHERE id=' . $value); |
|
563 | + $modx->db->query('UPDATE '.$modx->getFullTableName('site_content').' SET menuindex='.$key.' WHERE id='.$value); |
|
564 | 564 | } |
565 | 565 | } else { |
566 | 566 | // TODO: max(*) menuindex |
@@ -589,19 +589,19 @@ discard block |
||
589 | 589 | } |
590 | 590 | |
591 | 591 | case 'getLockedElements': { |
592 | - $type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : 0; |
|
593 | - $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
592 | + $type = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : 0; |
|
593 | + $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
594 | 594 | |
595 | 595 | $output = !!$modx->elementIsLocked($type, $id, true); |
596 | 596 | |
597 | 597 | if (!$output) { |
598 | 598 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
599 | - $docgrp_cond = $docgrp ? ' OR dg.document_group IN (' . $docgrp . ')' : ''; |
|
599 | + $docgrp_cond = $docgrp ? ' OR dg.document_group IN ('.$docgrp.')' : ''; |
|
600 | 600 | $sql = ' |
601 | - SELECT MAX(IF(1=' . $role . ' OR sc.privatemgr=0' . $docgrp_cond . ', 0, 1)) AS locked |
|
602 | - FROM ' . $modx->getFullTableName('site_content') . ' AS sc |
|
603 | - LEFT JOIN ' . $modx->getFullTableName('document_groups') . ' dg ON dg.document=sc.id |
|
604 | - WHERE sc.id=' . $id . ' GROUP BY sc.id'; |
|
601 | + SELECT MAX(IF(1=' . $role.' OR sc.privatemgr=0'.$docgrp_cond.', 0, 1)) AS locked |
|
602 | + FROM ' . $modx->getFullTableName('site_content').' AS sc |
|
603 | + LEFT JOIN ' . $modx->getFullTableName('document_groups').' dg ON dg.document=sc.id |
|
604 | + WHERE sc.id=' . $id.' GROUP BY sc.id'; |
|
605 | 605 | $sql = $modx->db->query($sql); |
606 | 606 | if ($modx->db->getRecordCount($sql)) { |
607 | 607 | $row = $modx->db->getRow($sql); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | $modx = evolutionCMS(); |
10 | 10 | global$_lang; |
11 | 11 | |
12 | - $tpl = file_get_contents(dirname(__FILE__) . '/datepicker.tpl'); |
|
12 | + $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
|
13 | 13 | return $modx->parseText($tpl, $_lang, '[%', '%]'); |
14 | 14 | } |
15 | 15 | } |