@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | <?php |
5 | 5 | unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes |
6 | 6 | |
7 | - if($modx->hasPermission('settings') && $modx->getConfig('settings_version') !== $modx->getVersionData('version')) { |
|
7 | + if ($modx->hasPermission('settings') && $modx->getConfig('settings_version') !== $modx->getVersionData('version')) { |
|
8 | 8 | // seems to be a new install - send the user to the configuration page |
9 | 9 | exit('<script type="text/javascript">document.location.href="index.php?a=17";</script>'); |
10 | 10 | } |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | $_SESSION['nrnewmessages'] = 0; |
16 | 16 | |
17 | 17 | // setup message info |
18 | - if($modx->hasPermission('messages')) { |
|
19 | - include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php'); |
|
18 | + if ($modx->hasPermission('messages')) { |
|
19 | + include_once(MODX_MANAGER_PATH.'includes/messageCount.inc.php'); |
|
20 | 20 | $_SESSION['nrtotalmessages'] = $nrtotalmessages; |
21 | 21 | $_SESSION['nrnewmessages'] = $nrnewmessages; |
22 | 22 | |
23 | 23 | $msg = array(); |
24 | 24 | $msg[] = sprintf('<a href="index.php?a=10" target="main"><img src="%s" /></a>', $_style['icons_mail_large']); |
25 | - $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">' . $_SESSION['nrnewmessages'] . '</span>)' : ''; |
|
25 | + $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">'.$_SESSION['nrnewmessages'].'</span>)' : ''; |
|
26 | 26 | $msg[] = sprintf('<span style="color:#909090;font-size:15px;font-weight:bold"> <a class="wm_messages_inbox_link" href="index.php?a=10" target="main">[%%inbox%%]</a>%s</span><br />', $nrnewmessages); |
27 | - $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">' . $_SESSION['nrnewmessages'] . '</span>' : '0'; |
|
27 | + $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">'.$_SESSION['nrnewmessages'].'</span>' : '0'; |
|
28 | 28 | $welcome_messages = sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages); |
29 | 29 | $msg[] = sprintf('<span class="comment">%s</span>', $welcome_messages); |
30 | 30 | $ph['MessageInfo'] = implode("\n", $msg); |
@@ -32,56 +32,56 @@ discard block |
||
32 | 32 | |
33 | 33 | $iconTpl = $modx->getChunk('manager#welcome\WrapIcon'); |
34 | 34 | // setup icons |
35 | - if($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) { |
|
35 | + if ($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) { |
|
36 | 36 | $icon = '<i class="[&icons_security_large&]" alt="[%user_management_title%]"> </i>[%user_management_title%]'; |
37 | - $ph['SecurityIcon'] = sprintf($iconTpl,$icon, 75); |
|
37 | + $ph['SecurityIcon'] = sprintf($iconTpl, $icon, 75); |
|
38 | 38 | } |
39 | - if($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) { |
|
39 | + if ($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) { |
|
40 | 40 | $icon = '<i class="[&icons_webusers_large&]" alt="[%web_user_management_title%]"> </i>[%web_user_management_title%]'; |
41 | - $ph['WebUserIcon'] = sprintf($iconTpl,$icon, 99); |
|
41 | + $ph['WebUserIcon'] = sprintf($iconTpl, $icon, 99); |
|
42 | 42 | } |
43 | - if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) { |
|
43 | + if ($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) { |
|
44 | 44 | $icon = '<i class="[&icons_modules_large&]" alt="[%manage_modules%]"> </i>[%modules%]'; |
45 | - $ph['ModulesIcon'] = sprintf($iconTpl,$icon, 106); |
|
45 | + $ph['ModulesIcon'] = sprintf($iconTpl, $icon, 106); |
|
46 | 46 | } |
47 | - if($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) { |
|
47 | + if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) { |
|
48 | 48 | $icon = '<i class="[&icons_resources_large&]" alt="[%element_management%]"> </i>[%elements%]'; |
49 | - $ph['ResourcesIcon'] = sprintf($iconTpl,$icon, 76); |
|
49 | + $ph['ResourcesIcon'] = sprintf($iconTpl, $icon, 76); |
|
50 | 50 | } |
51 | - if($modx->hasPermission('bk_manager')) { |
|
51 | + if ($modx->hasPermission('bk_manager')) { |
|
52 | 52 | $icon = '<i class="[&icons_backup_large&]" alt="[%bk_manager%]"> </i>[%backup%]'; |
53 | - $ph['BackupIcon'] = sprintf($iconTpl,$icon, 93); |
|
53 | + $ph['BackupIcon'] = sprintf($iconTpl, $icon, 93); |
|
54 | 54 | } |
55 | - if($modx->hasPermission('help')) { |
|
55 | + if ($modx->hasPermission('help')) { |
|
56 | 56 | $icon = '<i class="[&icons_help_large&]" alt="[%help%]" /> </i>[%help%]'; |
57 | - $ph['HelpIcon'] = sprintf($iconTpl,$icon, 9); |
|
57 | + $ph['HelpIcon'] = sprintf($iconTpl, $icon, 9); |
|
58 | 58 | } |
59 | 59 | |
60 | - if($modx->hasPermission('new_document')) { |
|
60 | + if ($modx->hasPermission('new_document')) { |
|
61 | 61 | $icon = '<i class="[&icons_resource_large&]"></i>[%add_resource%]'; |
62 | - $ph['ResourceIcon'] = sprintf($iconTpl,$icon, 4); |
|
62 | + $ph['ResourceIcon'] = sprintf($iconTpl, $icon, 4); |
|
63 | 63 | $icon = '<i class="[&icons_weblink_large&]"></i>[%add_weblink%]'; |
64 | - $ph['WeblinkIcon'] = sprintf($iconTpl,$icon, 72); |
|
64 | + $ph['WeblinkIcon'] = sprintf($iconTpl, $icon, 72); |
|
65 | 65 | } |
66 | - if($modx->hasPermission('assets_images')) { |
|
66 | + if ($modx->hasPermission('assets_images')) { |
|
67 | 67 | $icon = '<i class="[&icons_images_large&]"></i>[%images_management%]'; |
68 | - $ph['ImagesIcon'] = sprintf($iconTpl,$icon, 72); |
|
68 | + $ph['ImagesIcon'] = sprintf($iconTpl, $icon, 72); |
|
69 | 69 | } |
70 | - if($modx->hasPermission('assets_files')) { |
|
70 | + if ($modx->hasPermission('assets_files')) { |
|
71 | 71 | $icon = '<i class="[&icons_files_large&]"></i>[%files_management%]'; |
72 | - $ph['FilesIcon'] = sprintf($iconTpl,$icon, 72); |
|
72 | + $ph['FilesIcon'] = sprintf($iconTpl, $icon, 72); |
|
73 | 73 | } |
74 | - if($modx->hasPermission('change_password')) { |
|
74 | + if ($modx->hasPermission('change_password')) { |
|
75 | 75 | $icon = '<i class="[&icons_password_large&]"></i>[%change_password%]'; |
76 | - $ph['PasswordIcon'] = sprintf($iconTpl,$icon, 28); |
|
76 | + $ph['PasswordIcon'] = sprintf($iconTpl, $icon, 28); |
|
77 | 77 | } |
78 | 78 | $icon = '<i class="[&icons_logout_large&]"></i>[%logout%]'; |
79 | - $ph['LogoutIcon'] = sprintf($iconTpl,$icon, 8); |
|
79 | + $ph['LogoutIcon'] = sprintf($iconTpl, $icon, 8); |
|
80 | 80 | |
81 | 81 | // do some config checks |
82 | - if($modx->getConfig('warning_visibility') || $_SESSION['mgrRole'] == 1) { |
|
83 | - include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php'); |
|
84 | - if($config_check_results != $_lang['configcheck_ok']) { |
|
82 | + if ($modx->getConfig('warning_visibility') || $_SESSION['mgrRole'] == 1) { |
|
83 | + include_once(MODX_MANAGER_PATH.'includes/config_check.inc.php'); |
|
84 | + if ($config_check_results != $_lang['configcheck_ok']) { |
|
85 | 85 | $ph['config_check_results'] = $config_check_results; |
86 | 86 | $ph['config_display'] = 'block'; |
87 | 87 | } else { |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | // Check logout-reminder |
95 | - if(isset($_SESSION['show_logout_reminder'])) { |
|
96 | - switch($_SESSION['show_logout_reminder']['type']) { |
|
95 | + if (isset($_SESSION['show_logout_reminder'])) { |
|
96 | + switch ($_SESSION['show_logout_reminder']['type']) { |
|
97 | 97 | case 'logout_reminder': |
98 | 98 | $date = $modx->toDateFormat($_SESSION['show_logout_reminder']['lastHit'], 'dateOnly'); |
99 | 99 | $ph['logout_reminder_msg'] = str_replace('[+date+]', $date, $_lang['logout_reminder_msg']); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | </tr> |
148 | 148 | </table>'; |
149 | 149 | |
150 | - $nrnewmessages = '<span class="text-danger">' . $_SESSION['nrnewmessages'] . '</span>'; |
|
150 | + $nrnewmessages = '<span class="text-danger">'.$_SESSION['nrnewmessages'].'</span>'; |
|
151 | 151 | |
152 | 152 | $ph['UserInfo'] = $modx->parseText($tpl, array( |
153 | 153 | 'username' => $modx->getLoginUserName(), |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | |
160 | 160 | $from = array(); |
161 | 161 | $from[] = $modx->getDatabase()->getFullTableName('active_user_sessions'); |
162 | - $from[] = " us LEFT JOIN " . $modx->getDatabase()->getFullTableName('active_users') . " au ON au.sid=us.sid WHERE au.action <> '8'"; |
|
162 | + $from[] = " us LEFT JOIN ".$modx->getDatabase()->getFullTableName('active_users')." au ON au.sid=us.sid WHERE au.action <> '8'"; |
|
163 | 163 | $rs = $modx->getDatabase()->select('*', $from, '', 'username ASC, au.sid ASC'); |
164 | 164 | |
165 | - if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
165 | + if ($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
166 | 166 | $html = '<p>[%no_active_users_found%]</p>'; |
167 | 167 | } else { |
168 | 168 | $now = $modx->timestamp($_SERVER['REQUEST_TIME']); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $userList = array(); |
190 | 190 | $userCount = array(); |
191 | 191 | // Create userlist with session-count first before output |
192 | - while($activeusers = $modx->getDatabase()->getRow($rs)) { |
|
192 | + while ($activeusers = $modx->getDatabase()->getRow($rs)) { |
|
193 | 193 | $userCount[$activeusers['internalKey']] = isset($userCount[$activeusers['internalKey']]) ? $userCount[$activeusers['internalKey']] + 1 : 1; |
194 | 194 | |
195 | 195 | $idle = $activeusers['lasthit'] < $timetocheck ? ' class="userIdle"' : ''; |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | $currentaction |
208 | 208 | ); |
209 | 209 | } |
210 | - foreach($userList as $params) { |
|
210 | + foreach ($userList as $params) { |
|
211 | 211 | $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : ''; |
212 | - $html .= "\n\t\t" . vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params); |
|
212 | + $html .= "\n\t\t".vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | $html .= ' |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $output = ''; |
237 | 237 | $items = fetchRssChannelItems($url); |
238 | 238 | if (empty($items)) { |
239 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
239 | + $feedData[$section] = 'Failed to retrieve '.$url; |
|
240 | 240 | continue; |
241 | 241 | } |
242 | 242 | $output .= '<ul>'; |
@@ -250,9 +250,9 @@ discard block |
||
250 | 250 | $description = strip_tags($item['description']); |
251 | 251 | if (strlen($description) > 199) { |
252 | 252 | $description = substr($description, 0, 200); |
253 | - $description .= '...<br />Read <a href="' . $href . '" target="_blank">more</a>.'; |
|
253 | + $description .= '...<br />Read <a href="'.$href.'" target="_blank">more</a>.'; |
|
254 | 254 | } |
255 | - $output .= '<li><a href="' . $href . '" target="_blank">' . $title . '</a> - <b>' . $pubdate . '</b><br />' . $description . '</li>'; |
|
255 | + $output .= '<li><a href="'.$href.'" target="_blank">'.$title.'</a> - <b>'.$pubdate.'</b><br />'.$description.'</li>'; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | $output .= '</ul>'; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | // invoke event OnManagerWelcomePrerender |
290 | 290 | $evtOut = $modx->invokeEvent('OnManagerWelcomePrerender'); |
291 | - if(is_array($evtOut)) { |
|
291 | + if (is_array($evtOut)) { |
|
292 | 292 | $output = implode('', $evtOut); |
293 | 293 | $ph['OnManagerWelcomePrerender'] = $output; |
294 | 294 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | <span>[%add_weblink%]</span> |
315 | 315 | </a> |
316 | 316 | </span> |
317 | - ' : '') . |
|
317 | + ' : ''). |
|
318 | 318 | ($modx->hasPermission("assets_images") ? ' |
319 | 319 | <span class="wm_button"> |
320 | 320 | <a target="main" href="media/browser/mcpuk/browse.php?filemanager=media/browser/mcpuk/browse.php&type=images"> |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | <span>[%images_management%]</span> |
323 | 323 | </a> |
324 | 324 | </span> |
325 | - ' : '') . |
|
325 | + ' : ''). |
|
326 | 326 | ($modx->hasPermission("assets_files") ? ' |
327 | 327 | <span class="wm_button"> |
328 | 328 | <a target="main" href="media/browser/mcpuk/browse.php?filemanager=media/browser/mcpuk/browse.php&type=files"> |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | <span>[%files_management%]</span> |
331 | 331 | </a> |
332 | 332 | </span> |
333 | - ' : '') . |
|
333 | + ' : ''). |
|
334 | 334 | ($modx->hasPermission("change_password") ? ' |
335 | 335 | <span class="wm_button"> |
336 | 336 | <a target="main" href="index.php?a=28"> |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | <span>[%change_password%]</span> |
339 | 339 | </a> |
340 | 340 | </span> |
341 | - ' : '') . ' |
|
341 | + ' : '').' |
|
342 | 342 | <span class="wm_button"> |
343 | 343 | <a target="_top" href="index.php?a=8"> |
344 | 344 | <i class="[&icons_logout_large&]"></i> |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | <table> |
351 | 351 | <tr> |
352 | 352 | <td width="150">[%yourinfo_username%]</td> |
353 | - <td><b>' . $modx->getLoginUserName() . '</b></td> |
|
353 | + <td><b>' . $modx->getLoginUserName().'</b></td> |
|
354 | 354 | </tr> |
355 | 355 | <tr> |
356 | 356 | <td>[%yourinfo_role%]</td> |
@@ -367,9 +367,9 @@ discard block |
||
367 | 367 | ($modx->hasPermission("change_password") ? ' |
368 | 368 | <tr> |
369 | 369 | <td>[%inbox%]</td> |
370 | - <td><a href="index.php?a=10" target="main"><b>' . ($_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], '<span style="color:red;">' . $_SESSION["nrnewmessages"] . "</span>") : $_lang["messages_no_messages"]) . '</b></a></td> |
|
370 | + <td><a href="index.php?a=10" target="main"><b>' . ($_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], '<span style="color:red;">'.$_SESSION["nrnewmessages"]."</span>") : $_lang["messages_no_messages"]).'</b></a></td> |
|
371 | 371 | </tr> |
372 | - ' : '') . ' |
|
372 | + ' : '').' |
|
373 | 373 | </table> |
374 | 374 | </div> |
375 | 375 | ', |
@@ -418,22 +418,22 @@ discard block |
||
418 | 418 | |
419 | 419 | // invoke OnManagerWelcomeHome event |
420 | 420 | $sitewidgets = $modx->invokeEvent("OnManagerWelcomeHome", array('widgets' => $widgets)); |
421 | - if(is_array($sitewidgets)) { |
|
421 | + if (is_array($sitewidgets)) { |
|
422 | 422 | $newwidgets = array(); |
423 | - foreach($sitewidgets as $widget){ |
|
423 | + foreach ($sitewidgets as $widget) { |
|
424 | 424 | $newwidgets = array_merge($newwidgets, unserialize($widget)); |
425 | 425 | } |
426 | 426 | $widgets = (count($newwidgets) > 0) ? $newwidgets : $widgets; |
427 | 427 | } |
428 | 428 | |
429 | - usort($widgets, function ($a, $b) { |
|
429 | + usort($widgets, function($a, $b){ |
|
430 | 430 | return $a['menuindex'] - $b['menuindex']; |
431 | 431 | }); |
432 | 432 | |
433 | 433 | $tpl = $modx->getChunk('manager#welcome\Widget'); |
434 | 434 | $output = ''; |
435 | - foreach($widgets as $widget) { |
|
436 | - if ($widget['hide'] != '1'){ |
|
435 | + foreach ($widgets as $widget) { |
|
436 | + if ($widget['hide'] != '1') { |
|
437 | 437 | $output .= $modx->parseText($tpl, $widget); |
438 | 438 | } |
439 | 439 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | <?php |
133 | 133 | $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info fa fa-info-circle' , 'text-warning fa fa-exclamation-triangle' , 'text-danger fa fa-times-circle' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el |
134 | 134 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0 |
135 | - LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
135 | + LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
136 | 136 | $grd = new \EvolutionCMS\Support\DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
137 | 137 | $grd->pagerClass = ''; |
138 | 138 | $grd->pageClass = 'page-item'; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | $grd->itemClass = "tableItem"; |
144 | 144 | $grd->altItemClass = "tableAltItem"; |
145 | 145 | $grd->fields = "type,source,createdon,eventid,username"; |
146 | - $grd->columns = ManagerTheme::getLexicon('type') . " ," . ManagerTheme::getLexicon('source') . " ," . ManagerTheme::getLexicon('date') . " ," . ManagerTheme::getLexicon('event_id') . " ," . ManagerTheme::getLexicon('sysinfo_userid'); |
|
146 | + $grd->columns = ManagerTheme::getLexicon('type')." ,".ManagerTheme::getLexicon('source')." ,".ManagerTheme::getLexicon('date')." ,".ManagerTheme::getLexicon('event_id')." ,".ManagerTheme::getLexicon('sysinfo_userid'); |
|
147 | 147 | $grd->colWidths = "1%,,1%,1%,1%"; |
148 | 148 | $grd->colAligns = "center,,,center,center"; |
149 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . ManagerTheme::getLexicon('click_to_context') . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . ManagerTheme::getLexicon('click_to_view_details') . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
149 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".ManagerTheme::getLexicon('click_to_context')."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".ManagerTheme::getLexicon('click_to_view_details')."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p'; |
|
150 | 150 | if ($listmode == '1') { |
151 | 151 | $grd->pageSize = 0; |
152 | 152 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | $mstart = memory_get_usage(); |
54 | 54 | |
55 | -if(mb_strtoupper($_SERVER['REQUEST_METHOD']) === 'GET' && count($_GET) === 1 && !empty($_GET['time'])) { |
|
55 | +if (mb_strtoupper($_SERVER['REQUEST_METHOD']) === 'GET' && count($_GET) === 1 && !empty($_GET['time'])) { |
|
56 | 56 | die(); |
57 | 57 | } |
58 | 58 | // we use this to make sure files are accessed through |
@@ -61,32 +61,32 @@ discard block |
||
61 | 61 | define('IN_MANAGER_MODE', true); |
62 | 62 | } |
63 | 63 | |
64 | -if (file_exists(__DIR__ . '/config.php')) { |
|
65 | - $config = require __DIR__ . '/config.php'; |
|
66 | -} elseif (file_exists(dirname(__DIR__) . '/config.php')) { |
|
67 | - $config = require dirname(__DIR__) . '/config.php'; |
|
64 | +if (file_exists(__DIR__.'/config.php')) { |
|
65 | + $config = require __DIR__.'/config.php'; |
|
66 | +} elseif (file_exists(dirname(__DIR__).'/config.php')) { |
|
67 | + $config = require dirname(__DIR__).'/config.php'; |
|
68 | 68 | } else { |
69 | 69 | $config = [ |
70 | - 'core' => dirname(__DIR__) . '/core' |
|
70 | + 'core' => dirname(__DIR__).'/core' |
|
71 | 71 | ]; |
72 | 72 | } |
73 | 73 | |
74 | -if (!empty($config['core']) && file_exists($config['core'] . '/bootstrap.php')) { |
|
75 | - require_once $config['core'] . '/bootstrap.php'; |
|
74 | +if (!empty($config['core']) && file_exists($config['core'].'/bootstrap.php')) { |
|
75 | + require_once $config['core'].'/bootstrap.php'; |
|
76 | 76 | } else { |
77 | 77 | echo "<h3>Unable to load configuration settings</h3>"; |
78 | 78 | echo "Please run the EVO <a href='../install'>install utility</a>"; |
79 | 79 | exit; |
80 | 80 | } |
81 | 81 | |
82 | -if (! isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
82 | +if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
83 | 83 | header('HTTP/1.0 404 Not Found'); |
84 | 84 | exit; |
85 | 85 | } |
86 | 86 | |
87 | 87 | // send anti caching headers |
88 | 88 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
89 | -header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
89 | +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
90 | 90 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
91 | 91 | header('Cache-Control: post-check=0, pre-check=0', false); |
92 | 92 | header('Pragma: no-cache'); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $_SERVER['PATH_INFO'], |
114 | 114 | "", |
115 | 115 | preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']) |
116 | - ) . "/"; |
|
116 | + )."/"; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | // initiate the content manager class |
@@ -125,12 +125,12 @@ discard block |
||
125 | 125 | //extract($settings, EXTR_OVERWRITE); |
126 | 126 | |
127 | 127 | // attempt to foil some simple types of CSRF attacks |
128 | -if ((int)$modx->getConfig('validate_referer') !== 0) { |
|
128 | +if ((int) $modx->getConfig('validate_referer') !== 0) { |
|
129 | 129 | if (isset($_SERVER['HTTP_REFERER'])) { |
130 | 130 | $referer = $_SERVER['HTTP_REFERER']; |
131 | 131 | |
132 | 132 | if (!empty($referer)) { |
133 | - if (!preg_match('/^' . preg_quote(MODX_SITE_URL, '/') . '/i', $referer)) { |
|
133 | + if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
134 | 134 | $modx->webAlertAndQuit( |
135 | 135 | "A possible CSRF attempt was detected from referer: {$referer}.", |
136 | 136 | "index.php" |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $_lang = ManagerTheme::getLexicon(); |
160 | 160 | |
161 | 161 | // send the charset header |
162 | -header('Content-Type: text/html; charset=' . ManagerTheme::getCharset()); |
|
162 | +header('Content-Type: text/html; charset='.ManagerTheme::getCharset()); |
|
163 | 163 | |
164 | 164 | // Update last action in table active_users |
165 | 165 | $action = ManagerTheme::getActionId(); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $output = ManagerTheme::handle(1, ['frame' => 1]); |
191 | 191 | } else { |
192 | 192 | if ($modx->hasPermission('messages')) { |
193 | - include_once __DIR__ . '/includes/messageCount.inc.php'; |
|
193 | + include_once __DIR__.'/includes/messageCount.inc.php'; |
|
194 | 194 | } |
195 | 195 | } |
196 | 196 | } else { |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | -class DATEPICKER { |
|
2 | +class DATEPICKER{ |
|
3 | 3 | /** |
4 | 4 | * @return string |
5 | 5 | */ |
6 | - public function getDP() { |
|
6 | + public function getDP(){ |
|
7 | 7 | $modx = evolutionCMS(); |
8 | 8 | |
9 | 9 | $load_script = file_get_contents(__DIR__.'/datepicker.tpl'); |
10 | - if(!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
|
10 | + if (!isset($modx->config['lang_code'])) $modx->config['lang_code'] = $this->getLangCode(); |
|
11 | 11 | $modx->config['datetime_format_lc'] = isset($modx->config['datetime_format']) ? strtolower($modx->config['datetime_format']) : 'dd-mm-yyyy'; |
12 | 12 | return $modx->mergeSettingsContent($load_script); |
13 | 13 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * @return string |
17 | 17 | */ |
18 | - public function getLangCode() { |
|
18 | + public function getLangCode(){ |
|
19 | 19 | $lang = evolutionCMS()->get('ManagerTheme')->getLang(); |
20 | 20 | |
21 | 21 | if ($lang === 'uk') { |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class DATEPICKER { |
|
4 | - function __construct() { |
|
3 | +class DATEPICKER{ |
|
4 | + function __construct(){ |
|
5 | 5 | } |
6 | 6 | |
7 | - function getDP() { |
|
7 | + function getDP(){ |
|
8 | 8 | $modx = evolutionCMS(); global $_lang; |
9 | 9 | |
10 | - $tpl = file_get_contents(__DIR__ . '/datepicker.tpl'); |
|
10 | + $tpl = file_get_contents(__DIR__.'/datepicker.tpl'); |
|
11 | 11 | return $modx->parseText($tpl, $_lang, '[%', '%]'); |
12 | 12 | } |
13 | 13 | } |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | -define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
2 | +define('IN_MANAGER_MODE', true); // we use this to make sure files are accessed through |
|
3 | 3 | define('MODX_API_MODE', true); |
4 | 4 | |
5 | -if (file_exists(dirname(__DIR__, 3) . '/config.php')) { |
|
6 | - $config = require dirname(__DIR__) . '/config.php'; |
|
7 | -} elseif (file_exists(dirname(__DIR__, 4) . '/config.php')) { |
|
8 | - $config = require dirname(__DIR__, 4) . '/config.php'; |
|
5 | +if (file_exists(dirname(__DIR__, 3).'/config.php')) { |
|
6 | + $config = require dirname(__DIR__).'/config.php'; |
|
7 | +} elseif (file_exists(dirname(__DIR__, 4).'/config.php')) { |
|
8 | + $config = require dirname(__DIR__, 4).'/config.php'; |
|
9 | 9 | } else { |
10 | 10 | $config = [ |
11 | 11 | 'root' => dirname(__DIR__, 4) |
12 | 12 | ]; |
13 | 13 | } |
14 | 14 | |
15 | -if (!empty($config['root']) && file_exists($config['root']. '/index.php')) { |
|
16 | - require_once $config['root'] . '/index.php'; |
|
15 | +if (!empty($config['root']) && file_exists($config['root'].'/index.php')) { |
|
16 | + require_once $config['root'].'/index.php'; |
|
17 | 17 | } else { |
18 | 18 | echo "<h3>Unable to load configuration settings</h3>"; |
19 | 19 | echo "Please run the EVO <a href='../install'>install utility</a>"; |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | exit('send some data'); |
54 | 54 | } //?? |
55 | 55 | |
56 | - $indent = (int)$_REQUEST['indent']; |
|
57 | - $parent = (int)$_REQUEST['parent']; |
|
58 | - $expandAll = (int)$_REQUEST['expandAll']; |
|
56 | + $indent = (int) $_REQUEST['indent']; |
|
57 | + $parent = (int) $_REQUEST['parent']; |
|
58 | + $expandAll = (int) $_REQUEST['expandAll']; |
|
59 | 59 | $output = ''; |
60 | 60 | $hereid = isset($_REQUEST['id']) && is_numeric($_REQUEST['id']) ? $_REQUEST['id'] : ''; |
61 | 61 | |
@@ -114,21 +114,21 @@ discard block |
||
114 | 114 | $sql = ''; |
115 | 115 | $a = ''; |
116 | 116 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '%*_') : ''; |
117 | - $sqlLike = $filter ? 'WHERE t1.name LIKE "' . $modx->getDatabase()->escape($filter) . '%"' : ''; |
|
118 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
117 | + $sqlLike = $filter ? 'WHERE t1.name LIKE "'.$modx->getDatabase()->escape($filter).'%"' : ''; |
|
118 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
119 | 119 | |
120 | 120 | switch ($elements) { |
121 | 121 | case 'element_templates': |
122 | 122 | $a = 16; |
123 | - $sqlLike = $filter ? 'WHERE t1.templatename LIKE "' . $modx->getDatabase()->escape($filter) . '%"' : ''; |
|
123 | + $sqlLike = $filter ? 'WHERE t1.templatename LIKE "'.$modx->getDatabase()->escape($filter).'%"' : ''; |
|
124 | 124 | $sql = $modx->getDatabase()->query('SELECT t1.id, t1.templatename AS name, t1.locked, 0 AS disabled |
125 | - FROM ' . $modx->getFullTableName('site_templates') . ' AS t1 |
|
126 | - ' . $sqlLike . ' |
|
125 | + FROM ' . $modx->getFullTableName('site_templates').' AS t1 |
|
126 | + ' . $sqlLike.' |
|
127 | 127 | ORDER BY t1.templatename ASC |
128 | 128 | ' . $sqlLimit); |
129 | 129 | |
130 | 130 | if ($modx->hasPermission('new_template')) { |
131 | - $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>' . $_lang['new_template'] . '</a></li>'; |
|
131 | + $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>'.$_lang['new_template'].'</a></li>'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | break; |
@@ -136,15 +136,15 @@ discard block |
||
136 | 136 | case 'element_tplvars': |
137 | 137 | $a = 301; |
138 | 138 | $sql = $modx->getDatabase()->query('SELECT t1.id, t1.name, t1.locked, IF(MIN(t2.tmplvarid),0,1) AS disabled |
139 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' AS t1 |
|
140 | - LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates') . ' AS t2 ON t1.id=t2.tmplvarid |
|
141 | - ' . $sqlLike . ' |
|
139 | + FROM ' . $modx->getFullTableName('site_tmplvars').' AS t1 |
|
140 | + LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates').' AS t2 ON t1.id=t2.tmplvarid |
|
141 | + ' . $sqlLike.' |
|
142 | 142 | GROUP BY t1.id |
143 | 143 | ORDER BY t1.name ASC |
144 | 144 | ' . $sqlLimit); |
145 | 145 | |
146 | 146 | if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
147 | - $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>' . $_lang['new_tmplvars'] . '</a></li>'; |
|
147 | + $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>'.$_lang['new_tmplvars'].'</a></li>'; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | break; |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | case 'element_htmlsnippets': |
153 | 153 | $a = 78; |
154 | 154 | $sql = $modx->getDatabase()->query('SELECT t1.id, t1.name, t1.locked, t1.disabled |
155 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' AS t1 |
|
156 | - ' . $sqlLike . ' |
|
155 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' AS t1 |
|
156 | + ' . $sqlLike.' |
|
157 | 157 | ORDER BY t1.name ASC |
158 | 158 | ' . $sqlLimit); |
159 | 159 | |
160 | 160 | if ($modx->hasPermission('new_chunk')) { |
161 | - $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>' . $_lang['new_htmlsnippet'] . '</a></li>'; |
|
161 | + $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>'.$_lang['new_htmlsnippet'].'</a></li>'; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | break; |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | case 'element_snippets': |
167 | 167 | $a = 22; |
168 | 168 | $sql = $modx->getDatabase()->query('SELECT t1.id, t1.name, t1.locked, t1.disabled |
169 | - FROM ' . $modx->getFullTableName('site_snippets') . ' AS t1 |
|
170 | - ' . $sqlLike . ' |
|
169 | + FROM ' . $modx->getFullTableName('site_snippets').' AS t1 |
|
170 | + ' . $sqlLike.' |
|
171 | 171 | ORDER BY t1.name ASC |
172 | 172 | ' . $sqlLimit); |
173 | 173 | |
174 | 174 | if ($modx->hasPermission('new_snippet')) { |
175 | - $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>' . $_lang['new_snippet'] . '</a></li>'; |
|
175 | + $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>'.$_lang['new_snippet'].'</a></li>'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | break; |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | case 'element_plugins': |
181 | 181 | $a = 102; |
182 | 182 | $sql = $modx->getDatabase()->query('SELECT t1.id, t1.name, t1.locked, t1.disabled |
183 | - FROM ' . $modx->getFullTableName('site_plugins') . ' AS t1 |
|
184 | - ' . $sqlLike . ' |
|
183 | + FROM ' . $modx->getFullTableName('site_plugins').' AS t1 |
|
184 | + ' . $sqlLike.' |
|
185 | 185 | ORDER BY t1.name ASC |
186 | 186 | ' . $sqlLimit); |
187 | 187 | |
188 | 188 | if ($modx->hasPermission('new_plugin')) { |
189 | - $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>' . $_lang['new_plugin'] . '</a></li>'; |
|
189 | + $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>'.$_lang['new_plugin'].'</a></li>'; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | break; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | continue; |
202 | 202 | } |
203 | 203 | |
204 | - $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 . '">' . entities($row['name'], $modx->getConfig('modx_charset')) . ' <small>(' . $row['id'] . ')</small></a></li>' . "\n"; |
|
204 | + $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.'">'.entities($row['name'], $modx->getConfig('modx_charset')).' <small>('.$row['id'].')</small></a></li>'."\n"; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | |
@@ -222,23 +222,23 @@ discard block |
||
222 | 222 | $output = ''; |
223 | 223 | $items = ''; |
224 | 224 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
225 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->getDatabase()->escape($filter) . '%"' : ''; |
|
226 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
225 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->getDatabase()->escape($filter).'%"' : ''; |
|
226 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
227 | 227 | |
228 | - if(!$modx->hasPermission('save_role')) { |
|
228 | + if (!$modx->hasPermission('save_role')) { |
|
229 | 229 | $sqlLike .= $sqlLike ? ' AND ' : 'WHERE '; |
230 | 230 | $sqlLike .= 't2.role != 1'; |
231 | 231 | } |
232 | 232 | |
233 | 233 | $sql = $modx->getDatabase()->query('SELECT t1.*, t1.username AS name, t2.blocked |
234 | - FROM ' . $modx->getFullTableName('manager_users') . ' AS t1 |
|
235 | - LEFT JOIN ' . $modx->getFullTableName('user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
236 | - ' . $sqlLike . ' |
|
234 | + FROM ' . $modx->getFullTableName('manager_users').' AS t1 |
|
235 | + LEFT JOIN ' . $modx->getFullTableName('user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
236 | + ' . $sqlLike.' |
|
237 | 237 | ORDER BY t1.username ASC |
238 | 238 | ' . $sqlLimit); |
239 | 239 | |
240 | 240 | if ($modx->hasPermission('new_user')) { |
241 | - $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>' . $_lang['new_user'] . '</a></li>'; |
|
241 | + $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>'.$_lang['new_user'].'</a></li>'; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | if ($count = $modx->getDatabase()->getRecordCount($sql)) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
247 | 247 | } |
248 | 248 | while ($row = $modx->getDatabase()->getRow($sql)) { |
249 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . entities($row['name'], $modx->getConfig('modx_charset')) . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
249 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.entities($row['name'], $modx->getConfig('modx_charset')).' <small>('.$row['id'].')</small></a></li>'; |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 | |
@@ -266,18 +266,18 @@ discard block |
||
266 | 266 | $output = ''; |
267 | 267 | $items = ''; |
268 | 268 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
269 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->getDatabase()->escape($filter) . '%"' : ''; |
|
270 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
269 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->getDatabase()->escape($filter).'%"' : ''; |
|
270 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
271 | 271 | |
272 | 272 | $sql = $modx->getDatabase()->query('SELECT t1.*, t1.username AS name, t2.blocked |
273 | - FROM ' . $modx->getFullTableName('web_users') . ' AS t1 |
|
274 | - LEFT JOIN ' . $modx->getFullTableName('web_user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
275 | - ' . $sqlLike . ' |
|
273 | + FROM ' . $modx->getFullTableName('web_users').' AS t1 |
|
274 | + LEFT JOIN ' . $modx->getFullTableName('web_user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
275 | + ' . $sqlLike.' |
|
276 | 276 | ORDER BY t1.username ASC |
277 | 277 | ' . $sqlLimit); |
278 | 278 | |
279 | 279 | if ($modx->hasPermission('new_web_user')) { |
280 | - $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>'; |
|
280 | + $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>'; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | if ($count = $modx->getDatabase()->getRecordCount($sql)) { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
286 | 286 | } |
287 | 287 | while ($row = $modx->getDatabase()->getRow($sql)) { |
288 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . entities($row['name'], $modx->getConfig('modx_charset')) . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
288 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.entities($row['name'], $modx->getConfig('modx_charset')).' <small>('.$row['id'].')</small></a></li>'; |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -311,35 +311,35 @@ discard block |
||
311 | 311 | case 'SnippetNoCache': { |
312 | 312 | |
313 | 313 | $sql = $modx->getDatabase()->query('SELECT * |
314 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
315 | - WHERE name="' . $name . '" |
|
314 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
315 | + WHERE name="' . $name.'" |
|
316 | 316 | LIMIT 1'); |
317 | 317 | |
318 | 318 | if ($modx->getDatabase()->getRecordCount($sql)) { |
319 | 319 | $row = $modx->getDatabase()->getRow($sql); |
320 | 320 | $contextmenu = array( |
321 | 321 | 'header' => array( |
322 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . entities($row['name'], $modx->getConfig('modx_charset')) |
|
322 | + 'innerHTML' => '<i class="fa fa-code"></i> '.entities($row['name'], $modx->getConfig('modx_charset')) |
|
323 | 323 | ), |
324 | 324 | 'item' => array( |
325 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
326 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
325 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
326 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
327 | 327 | ) |
328 | 328 | ); |
329 | 329 | if (!empty($row['description'])) { |
330 | 330 | $contextmenu['seperator'] = ''; |
331 | 331 | $contextmenu['description'] = array( |
332 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . entities($row['description'], $modx->getConfig('modx_charset')) |
|
332 | + 'innerHTML' => '<i class="fa fa-info"></i> '.entities($row['description'], $modx->getConfig('modx_charset')) |
|
333 | 333 | ); |
334 | 334 | } |
335 | 335 | } else { |
336 | 336 | $contextmenu = array( |
337 | 337 | 'header' => array( |
338 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . entities($name, $modx->getConfig('modx_charset')) |
|
338 | + 'innerHTML' => '<i class="fa fa-code"></i> '.entities($name, $modx->getConfig('modx_charset')) |
|
339 | 339 | ), |
340 | 340 | 'item' => array( |
341 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
342 | - 'url' => "index.php?a=23&itemname=" . entities($name, $modx->getConfig('modx_charset')) |
|
341 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
342 | + 'url' => "index.php?a=23&itemname=".entities($name, $modx->getConfig('modx_charset')) |
|
343 | 343 | ) |
344 | 344 | ); |
345 | 345 | } |
@@ -349,35 +349,35 @@ discard block |
||
349 | 349 | case 'Chunk' : { |
350 | 350 | |
351 | 351 | $sql = $modx->getDatabase()->query('SELECT * |
352 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
353 | - WHERE name="' . $name . '" |
|
352 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
353 | + WHERE name="' . $name.'" |
|
354 | 354 | LIMIT 1'); |
355 | 355 | |
356 | 356 | if ($modx->getDatabase()->getRecordCount($sql)) { |
357 | 357 | $row = $modx->getDatabase()->getRow($sql); |
358 | 358 | $contextmenu = array( |
359 | 359 | 'header' => array( |
360 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . entities($row['name'], $modx->getConfig('modx_charset')) |
|
360 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.entities($row['name'], $modx->getConfig('modx_charset')) |
|
361 | 361 | ), |
362 | 362 | 'item' => array( |
363 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
364 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
363 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
364 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
365 | 365 | ) |
366 | 366 | ); |
367 | 367 | if (!empty($row['description'])) { |
368 | 368 | $contextmenu['seperator'] = ''; |
369 | 369 | $contextmenu['description'] = array( |
370 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . entities($row['description'], $modx->getConfig('modx_charset')) |
|
370 | + 'innerHTML' => '<i class="fa fa-info"></i> '.entities($row['description'], $modx->getConfig('modx_charset')) |
|
371 | 371 | ); |
372 | 372 | } |
373 | 373 | } else { |
374 | 374 | $contextmenu = array( |
375 | 375 | 'header' => array( |
376 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . entities($name, $modx->getConfig('modx_charset')) |
|
376 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.entities($name, $modx->getConfig('modx_charset')) |
|
377 | 377 | ), |
378 | 378 | 'item' => array( |
379 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
380 | - 'url' => "index.php?a=77&itemname=" . entities($name, $modx->getConfig('modx_charset')) |
|
379 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
380 | + 'url' => "index.php?a=77&itemname=".entities($name, $modx->getConfig('modx_charset')) |
|
381 | 381 | ) |
382 | 382 | ); |
383 | 383 | } |
@@ -386,8 +386,8 @@ discard block |
||
386 | 386 | } |
387 | 387 | case 'AttributeValue': { |
388 | 388 | $sql = $modx->getDatabase()->query('SELECT * |
389 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
390 | - WHERE name="' . $name . '" |
|
389 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
390 | + WHERE name="' . $name.'" |
|
391 | 391 | LIMIT 1'); |
392 | 392 | |
393 | 393 | if ($modx->getDatabase()->getRecordCount($sql)) { |
@@ -397,52 +397,52 @@ discard block |
||
397 | 397 | 'innerText' => entities($row['name'], $modx->getConfig('modx_charset')) |
398 | 398 | ), |
399 | 399 | 'item' => array( |
400 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
401 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
400 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
401 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
402 | 402 | ) |
403 | 403 | ); |
404 | 404 | if (!empty($row['description'])) { |
405 | 405 | $contextmenu['seperator'] = ''; |
406 | 406 | $contextmenu['description'] = array( |
407 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . entities($row['description'], $modx->getConfig('modx_charset')) |
|
407 | + 'innerHTML' => '<i class="fa fa-info"></i> '.entities($row['description'], $modx->getConfig('modx_charset')) |
|
408 | 408 | ); |
409 | 409 | } |
410 | 410 | } else { |
411 | 411 | |
412 | 412 | $sql = $modx->getDatabase()->query('SELECT * |
413 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
414 | - WHERE name="' . $name . '" |
|
413 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
414 | + WHERE name="' . $name.'" |
|
415 | 415 | LIMIT 1'); |
416 | 416 | |
417 | 417 | if ($modx->getDatabase()->getRecordCount($sql)) { |
418 | 418 | $row = $modx->getDatabase()->getRow($sql); |
419 | 419 | $contextmenu = array( |
420 | 420 | 'header' => array( |
421 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . entities($row['name'], $modx->getConfig('modx_charset')) |
|
421 | + 'innerHTML' => '<i class="fa fa-code"></i> '.entities($row['name'], $modx->getConfig('modx_charset')) |
|
422 | 422 | ), |
423 | 423 | 'item' => array( |
424 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
425 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
424 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
425 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
426 | 426 | ) |
427 | 427 | ); |
428 | 428 | if (!empty($row['description'])) { |
429 | 429 | $contextmenu['seperator'] = ''; |
430 | 430 | $contextmenu['description'] = array( |
431 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . entities($row['description'], $modx->getConfig('modx_charset')) |
|
431 | + 'innerHTML' => '<i class="fa fa-info"></i> '.entities($row['description'], $modx->getConfig('modx_charset')) |
|
432 | 432 | ); |
433 | 433 | } |
434 | 434 | } else { |
435 | 435 | $contextmenu = array( |
436 | 436 | 'header' => array( |
437 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . entities($name, $modx->getConfig('modx_charset')) |
|
437 | + 'innerHTML' => '<i class="fa fa-code"></i> '.entities($name, $modx->getConfig('modx_charset')) |
|
438 | 438 | ), |
439 | 439 | 'item' => array( |
440 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
441 | - 'url' => "index.php?a=77&itemname=" . entities($name, $modx->getConfig('modx_charset')) |
|
440 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
441 | + 'url' => "index.php?a=77&itemname=".entities($name, $modx->getConfig('modx_charset')) |
|
442 | 442 | ), |
443 | 443 | 'item2' => array( |
444 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
445 | - 'url' => "index.php?a=23&itemname=" . entities($name, $modx->getConfig('modx_charset')) |
|
444 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
445 | + 'url' => "index.php?a=23&itemname=".entities($name, $modx->getConfig('modx_charset')) |
|
446 | 446 | ) |
447 | 447 | ); |
448 | 448 | } |
@@ -498,35 +498,35 @@ discard block |
||
498 | 498 | } |
499 | 499 | |
500 | 500 | $sql = $modx->getDatabase()->query('SELECT * |
501 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' |
|
502 | - WHERE name="' . $name . '" |
|
501 | + FROM ' . $modx->getFullTableName('site_tmplvars').' |
|
502 | + WHERE name="' . $name.'" |
|
503 | 503 | LIMIT 1'); |
504 | 504 | |
505 | 505 | if ($modx->getDatabase()->getRecordCount($sql)) { |
506 | 506 | $row = $modx->getDatabase()->getRow($sql); |
507 | 507 | $contextmenu = array( |
508 | 508 | 'header' => array( |
509 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . entities($row['name'], $modx->getConfig('modx_charset')) |
|
509 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.entities($row['name'], $modx->getConfig('modx_charset')) |
|
510 | 510 | ), |
511 | 511 | 'item' => array( |
512 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
513 | - 'url' => "index.php?a=301&id=" . $row['id'] |
|
512 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
513 | + 'url' => "index.php?a=301&id=".$row['id'] |
|
514 | 514 | ) |
515 | 515 | ); |
516 | 516 | if (!empty($row['description'])) { |
517 | 517 | $contextmenu['seperator'] = ''; |
518 | 518 | $contextmenu['description'] = array( |
519 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . entities($row['description'], $modx->getConfig('modx_charset')) |
|
519 | + 'innerHTML' => '<i class="fa fa-info"></i> '.entities($row['description'], $modx->getConfig('modx_charset')) |
|
520 | 520 | ); |
521 | 521 | } |
522 | 522 | } else { |
523 | 523 | $contextmenu = array( |
524 | 524 | 'header' => array( |
525 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . entities($name, $modx->getConfig('modx_charset')) |
|
525 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.entities($name, $modx->getConfig('modx_charset')) |
|
526 | 526 | ), |
527 | 527 | 'item' => array( |
528 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_tmplvars'], |
|
529 | - 'url' => "index.php?a=300&itemname=" . entities($name, $modx->getConfig('modx_charset')) |
|
528 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_tmplvars'], |
|
529 | + 'url' => "index.php?a=300&itemname=".entities($name, $modx->getConfig('modx_charset')) |
|
530 | 530 | ) |
531 | 531 | ); |
532 | 532 | } |
@@ -545,15 +545,15 @@ discard block |
||
545 | 545 | $json = array(); |
546 | 546 | |
547 | 547 | if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
548 | - $id = !empty($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
|
549 | - $parent = isset($_REQUEST['parent']) ? (int)$_REQUEST['parent'] : 0; |
|
548 | + $id = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
549 | + $parent = isset($_REQUEST['parent']) ? (int) $_REQUEST['parent'] : 0; |
|
550 | 550 | $menuindex = isset($_REQUEST['menuindex']) && is_scalar($_REQUEST['menuindex']) ? $_REQUEST['menuindex'] : 0; |
551 | 551 | |
552 | 552 | // set parent |
553 | 553 | if ($id && $parent >= 0) { |
554 | 554 | |
555 | 555 | // find older parent |
556 | - $parentOld = $modx->getDatabase()->getValue($modx->getDatabase()->select('parent', $modx->getFullTableName('site_content'), 'id=' . $id)); |
|
556 | + $parentOld = $modx->getDatabase()->getValue($modx->getDatabase()->select('parent', $modx->getFullTableName('site_content'), 'id='.$id)); |
|
557 | 557 | |
558 | 558 | $eventOut = $modx->invokeEvent('onBeforeMoveDocument', [ |
559 | 559 | 'id_document' => $id, |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | if (empty($json['errors'])) { |
575 | 575 | // check privileges user for move docs |
576 | 576 | if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
577 | - $sql = $modx->getDatabase()->select('*', $modx->getFullTableName('document_groups'), 'document IN(' . $id . ',' . $parent . ',' . $parentOld . ')'); |
|
577 | + $sql = $modx->getDatabase()->select('*', $modx->getFullTableName('document_groups'), 'document IN('.$id.','.$parent.','.$parentOld.')'); |
|
578 | 578 | if ($modx->getDatabase()->getRecordCount($sql)) { |
579 | 579 | $document_groups = array(); |
580 | 580 | while ($row = $modx->getDatabase()->getRow($sql)) { |
@@ -599,22 +599,22 @@ discard block |
||
599 | 599 | // set new parent |
600 | 600 | $modx->getDatabase()->update(array( |
601 | 601 | 'parent' => $parent |
602 | - ), $modx->getFullTableName('site_content'), 'id=' . $id); |
|
602 | + ), $modx->getFullTableName('site_content'), 'id='.$id); |
|
603 | 603 | // set parent isfolder = 1 |
604 | 604 | $modx->getDatabase()->update(array( |
605 | 605 | 'isfolder' => 1 |
606 | - ), $modx->getFullTableName('site_content'), 'id=' . $parent); |
|
606 | + ), $modx->getFullTableName('site_content'), 'id='.$parent); |
|
607 | 607 | |
608 | 608 | if ($parent != $parentOld) { |
609 | 609 | // check children docs and set parent isfolder |
610 | - if ($modx->getDatabase()->getRecordCount($modx->getDatabase()->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
610 | + if ($modx->getDatabase()->getRecordCount($modx->getDatabase()->select('id', $modx->getFullTableName('site_content'), 'parent='.$parentOld))) { |
|
611 | 611 | $modx->getDatabase()->update(array( |
612 | 612 | 'isfolder' => 1 |
613 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
613 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
614 | 614 | } else { |
615 | 615 | $modx->getDatabase()->update(array( |
616 | 616 | 'isfolder' => 0 |
617 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
617 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
618 | 618 | } |
619 | 619 | } |
620 | 620 | |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | if (!empty($menuindex)) { |
623 | 623 | $menuindex = explode(',', $menuindex); |
624 | 624 | foreach ($menuindex as $key => $value) { |
625 | - $modx->getDatabase()->query('UPDATE ' . $modx->getFullTableName('site_content') . ' SET menuindex=' . $key . ' WHERE id=' . $value); |
|
625 | + $modx->getDatabase()->query('UPDATE '.$modx->getFullTableName('site_content').' SET menuindex='.$key.' WHERE id='.$value); |
|
626 | 626 | } |
627 | 627 | } else { |
628 | 628 | // TODO: max(*) menuindex |
@@ -651,19 +651,19 @@ discard block |
||
651 | 651 | } |
652 | 652 | |
653 | 653 | case 'getLockedElements': { |
654 | - $type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : 0; |
|
655 | - $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
654 | + $type = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : 0; |
|
655 | + $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
656 | 656 | |
657 | 657 | $output = !!$modx->elementIsLocked($type, $id, true); |
658 | 658 | |
659 | 659 | if (!$output) { |
660 | 660 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
661 | - $docgrp_cond = $docgrp ? ' OR dg.document_group IN (' . $docgrp . ')' : ''; |
|
661 | + $docgrp_cond = $docgrp ? ' OR dg.document_group IN ('.$docgrp.')' : ''; |
|
662 | 662 | $sql = ' |
663 | - SELECT MAX(IF(1=' . $role . ' OR sc.privatemgr=0' . $docgrp_cond . ', 0, 1)) AS locked |
|
664 | - FROM ' . $modx->getFullTableName('site_content') . ' AS sc |
|
665 | - LEFT JOIN ' . $modx->getFullTableName('document_groups') . ' dg ON dg.document=sc.id |
|
666 | - WHERE sc.id=' . $id . ' GROUP BY sc.id'; |
|
663 | + SELECT MAX(IF(1=' . $role.' OR sc.privatemgr=0'.$docgrp_cond.', 0, 1)) AS locked |
|
664 | + FROM ' . $modx->getFullTableName('site_content').' AS sc |
|
665 | + LEFT JOIN ' . $modx->getFullTableName('document_groups').' dg ON dg.document=sc.id |
|
666 | + WHERE sc.id=' . $id.' GROUP BY sc.id'; |
|
667 | 667 | $sql = $modx->getDatabase()->query($sql); |
668 | 668 | if ($modx->getDatabase()->getRecordCount($sql)) { |
669 | 669 | $row = $modx->getDatabase()->getRow($sql); |
@@ -8,21 +8,21 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . ManagerTheme::getTheme() . '/images/'; |
|
11 | +$style_path = 'media/style/'.ManagerTheme::getTheme().'/images/'; |
|
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | 13 | |
14 | -if(!empty($_GET['a']) && $_GET['a'] == 2) { |
|
14 | +if (!empty($_GET['a']) && $_GET['a'] == 2) { |
|
15 | 15 | $modx->config['enable_filter'] = 1; |
16 | 16 | |
17 | - $modx->addSnippet('hasPermission','return $modx->hasPermission($key);'); |
|
17 | + $modx->addSnippet('hasPermission', 'return $modx->hasPermission($key);'); |
|
18 | 18 | |
19 | - if($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) |
|
19 | + if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) |
|
20 | 20 | $hasAnyPermission = 1; |
21 | 21 | else $hasAnyPermission = 0; |
22 | - $modx->addSnippet('hasAnyPermission','global $hasAnyPermission; return $hasAnyPermission;'); |
|
23 | - $modx->addSnippet('getLoginUserName','return $modx->getLoginUserName();'); |
|
22 | + $modx->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;'); |
|
23 | + $modx->addSnippet('getLoginUserName', 'return $modx->getLoginUserName();'); |
|
24 | 24 | $code = 'global $_lang;return $_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], \'<span style="color:red;">\' . $_SESSION["nrnewmessages"] . "</span>") : $_lang["messages_no_messages"];'; |
25 | - $modx->addSnippet('getMessageCount',$code); |
|
25 | + $modx->addSnippet('getMessageCount', $code); |
|
26 | 26 | |
27 | 27 | // Large Icons |
28 | 28 | $_style['icons_backup_large'] = 'fa fa-database fa-fw fa-2x'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | // Favicon |
44 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . ManagerTheme::getTheme() . '/images/favicon.ico'); |
|
44 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.ManagerTheme::getTheme().'/images/favicon.ico'); |
|
45 | 45 | |
46 | 46 | // Tree Menu Toolbar |
47 | 47 | $_style['show_tree'] = $style_path.'tree/expand.png'; |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
71 | 71 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
72 | 72 | |
73 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
74 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
73 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
74 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
75 | 75 | $_style['tree_weblink'] = $style_path.'tree/link.png'; |
76 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
76 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
77 | 77 | |
78 | 78 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
79 | 79 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | $_style['icons_edit_document'] = $style_path.'icons/save.png'; |
106 | 106 | $_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
107 | 107 | //locks |
108 | -$_style['icons_preview_resource'] = $style_path.'icons/eye.png';//$style_path.'icons/eye.png'; |
|
109 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
108 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
109 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
110 | 110 | |
111 | 111 | //file manager icons |
112 | 112 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
178 | 178 | |
179 | 179 | //modules |
180 | -$_style['icons_module'] = 'fa fa-cube'; |
|
180 | +$_style['icons_module'] = 'fa fa-cube'; |
|
181 | 181 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
182 | 182 | $_style['icons_run'] = $style_path.'icons/play.png'; |
183 | 183 | |
@@ -237,57 +237,57 @@ discard block |
||
237 | 237 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
238 | 238 | $addnew = 0; |
239 | 239 | $run = 0; |
240 | -switch($action) { |
|
240 | +switch ($action) { |
|
241 | 241 | case '3': |
242 | 242 | case '4': |
243 | 243 | case '27': |
244 | 244 | case '72': |
245 | - if($modx->hasPermission('new_document')) { |
|
245 | + if ($modx->hasPermission('new_document')) { |
|
246 | 246 | $addnew = 1; |
247 | 247 | } |
248 | 248 | break; |
249 | 249 | case '16': |
250 | 250 | case '19': |
251 | - if($modx->hasPermission('new_template')) { |
|
251 | + if ($modx->hasPermission('new_template')) { |
|
252 | 252 | $addnew = 1; |
253 | 253 | } |
254 | 254 | break; |
255 | 255 | case '300': |
256 | 256 | case '301': |
257 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
257 | + if ($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
258 | 258 | $addnew = 1; |
259 | 259 | } |
260 | 260 | break; |
261 | 261 | case '77': |
262 | 262 | case '78': |
263 | - if($modx->hasPermission('new_chunk')) { |
|
263 | + if ($modx->hasPermission('new_chunk')) { |
|
264 | 264 | $addnew = 1; |
265 | 265 | } |
266 | 266 | break; |
267 | 267 | case '22': |
268 | 268 | case '23': |
269 | - if($modx->hasPermission('new_snippet')) { |
|
269 | + if ($modx->hasPermission('new_snippet')) { |
|
270 | 270 | $addnew = 1; |
271 | 271 | } |
272 | 272 | break; |
273 | 273 | case '101': |
274 | 274 | case '102': |
275 | - if($modx->hasPermission('new_plugin')) { |
|
275 | + if ($modx->hasPermission('new_plugin')) { |
|
276 | 276 | $addnew = 1; |
277 | 277 | } |
278 | 278 | break; |
279 | 279 | case '106': |
280 | 280 | case '107': |
281 | 281 | case '108': |
282 | - if($modx->hasPermission('new_module')) { |
|
282 | + if ($modx->hasPermission('new_module')) { |
|
283 | 283 | $addnew = 1; |
284 | 284 | } |
285 | - if($modx->hasPermission('exec_module')) { |
|
285 | + if ($modx->hasPermission('exec_module')) { |
|
286 | 286 | $run = 1; |
287 | 287 | } |
288 | 288 | break; |
289 | 289 | case '88': |
290 | - if($modx->hasPermission('new_web_user')) { |
|
290 | + if ($modx->hasPermission('new_web_user')) { |
|
291 | 291 | $addnew = 1; |
292 | 292 | } |
293 | 293 | break; |
@@ -301,30 +301,30 @@ discard block |
||
301 | 301 | <div class="btn-group"> |
302 | 302 | <div class="btn-group"> |
303 | 303 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
304 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
304 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
305 | 305 | </a> |
306 | 306 | <span class="btn btn-success plus dropdown-toggle"></span> |
307 | 307 | <select id="stay" name="stay"> |
308 | 308 | ' . ($addnew ? ' |
309 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
310 | - ' : '') . ' |
|
311 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
312 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
309 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
310 | + ' : '').' |
|
311 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
312 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
313 | 313 | </select> |
314 | 314 | </div>' . |
315 | 315 | ($addnew ? ' |
316 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
317 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
316 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
317 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
318 | 318 | </a> |
319 | - ' : '') . ' |
|
320 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
321 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
319 | + ' : '').' |
|
320 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
321 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
322 | 322 | </a> |
323 | 323 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
324 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
324 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
325 | 325 | </a> |
326 | 326 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
327 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
327 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
328 | 328 | </a> |
329 | 329 | </div> |
330 | 330 | </div>', |
@@ -332,22 +332,22 @@ discard block |
||
332 | 332 | <div class="btn-group"> |
333 | 333 | <div class="btn-group"> |
334 | 334 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
335 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
335 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
336 | 336 | </a> |
337 | 337 | <span class="btn btn-success plus dropdown-toggle"></span> |
338 | 338 | <select id="stay" name="stay"> |
339 | 339 | ' . ($addnew ? ' |
340 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
341 | - ' : '') . ' |
|
342 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
343 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
340 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
341 | + ' : '').' |
|
342 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
343 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
344 | 344 | </select> |
345 | 345 | </div> |
346 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
347 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
346 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
347 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
348 | 348 | </a> |
349 | 349 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
350 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
350 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
351 | 351 | </a> |
352 | 352 | </div> |
353 | 353 | </div>', |
@@ -355,86 +355,86 @@ discard block |
||
355 | 355 | <div class="btn-group"> |
356 | 356 | <div class="btn-group"> |
357 | 357 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
358 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
358 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
359 | 359 | </a> |
360 | 360 | <span class="btn btn-success plus dropdown-toggle"></span> |
361 | 361 | <select id="stay" name="stay"> |
362 | 362 | ' . ($addnew ? ' |
363 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
364 | - ' : '') . ' |
|
365 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
366 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
363 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
364 | + ' : '').' |
|
365 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
366 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
367 | 367 | </select> |
368 | 368 | </div> |
369 | 369 | ' . ($addnew ? ' |
370 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
371 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
370 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
371 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
372 | 372 | </a> |
373 | - ' : '') . ' |
|
374 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
375 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
373 | + ' : '').' |
|
374 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
375 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
376 | 376 | </a> |
377 | 377 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
378 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
378 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
379 | 379 | </a> |
380 | 380 | ' . ($run ? ' |
381 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
382 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
381 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
382 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
383 | 383 | </a> |
384 | - ' : '') . ' |
|
384 | + ' : '').' |
|
385 | 385 | </div> |
386 | 386 | </div>', |
387 | 387 | 'newmodule' => ($addnew ? '<div id="actions"> |
388 | 388 | <div class="btn-group"> |
389 | 389 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
390 | - <i class="fa fa-plus-circle"></i><span>' . $_lang['new_module'] . '</span> |
|
390 | + <i class="fa fa-plus-circle"></i><span>' . $_lang['new_module'].'</span> |
|
391 | 391 | </a> |
392 | 392 | </div> |
393 | 393 | </div>' : ''), |
394 | 394 | 'close' => '<div id="actions"> |
395 | 395 | <div class="btn-group"> |
396 | 396 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
397 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
397 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
398 | 398 | </a> |
399 | 399 | </div> |
400 | 400 | </div>', |
401 | 401 | 'save' => '<div id="actions"> |
402 | 402 | <div class="btn-group"> |
403 | 403 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
404 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
404 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
405 | 405 | </a> |
406 | 406 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
407 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
407 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
408 | 408 | </a> |
409 | 409 | </div> |
410 | 410 | </div>', |
411 | 411 | 'savedelete' => '<div id="actions"> |
412 | 412 | <div class="btn-group"> |
413 | 413 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
414 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
414 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
415 | 415 | </a> |
416 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
417 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
416 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
417 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
418 | 418 | </a> |
419 | 419 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
420 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
420 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
421 | 421 | </a> |
422 | 422 | </div> |
423 | 423 | </div>', |
424 | 424 | 'cancel' => '<div id="actions"> |
425 | 425 | <div class="btn-group"> |
426 | 426 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
427 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
427 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
428 | 428 | </a> |
429 | 429 | </div> |
430 | 430 | </div>', |
431 | 431 | 'canceldelete' => '<div id="actions"> |
432 | 432 | <div class="btn-group"> |
433 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
434 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
433 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
434 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
435 | 435 | </a> |
436 | 436 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
437 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
437 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
438 | 438 | </a> |
439 | 439 | </div> |
440 | 440 | </div>', |
@@ -444,33 +444,33 @@ discard block |
||
444 | 444 | <div class="btn-group">' . |
445 | 445 | ($addnew ? ' |
446 | 446 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
447 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
447 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
448 | 448 | </a> |
449 | 449 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
450 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
450 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
451 | 451 | </a> |
452 | - ' : '') . ' |
|
452 | + ' : '').' |
|
453 | 453 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
454 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
454 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
455 | 455 | </a> |
456 | 456 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
457 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
457 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
458 | 458 | </a> |
459 | 459 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
460 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
460 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
461 | 461 | </a> |
462 | 462 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
463 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
463 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
464 | 464 | </a> |
465 | 465 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
466 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
466 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
467 | 467 | </a> |
468 | 468 | </div> |
469 | 469 | </div>', |
470 | 470 | 'cancel' => '<div id="actions"> |
471 | 471 | <div class="btn-group"> |
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>', |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $tpl = '<tr> |
8 | 8 | <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-nowrap text-right"><span class="label label-info">[+id+]</span></td> |
9 | 9 | <td data-toggle="collapse" data-target=".collapse[+id+]"><a class="[+status+]" title="[%edit_resource%]" href="index.php?a=3&id=[+id+]" target="main">[+pagetitle:htmlentities+]</a></td> |
10 | - <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right text-nowrap">[+editedon:math("%s+[(server_offset_time)]"):dateFormat=`'.$modx->toDateFormat(0,'formatOnly').' %H:%M:%S`+]</td> |
|
10 | + <td data-toggle="collapse" data-target=".collapse[+id+]" class="text-right text-nowrap">[+editedon:math("%s+[(server_offset_time)]"):dateFormat=`'.$modx->toDateFormat(0, 'formatOnly').' %H:%M:%S`+]</td> |
|
11 | 11 | <td data-toggle="collapse" data-target=".collapse[+id+]">[+username:htmlentities+]</td> |
12 | 12 | <td style="text-align: right;" class="actions">[+edit_btn+][+preview_btn+][+delete_btn+][+publish_btn+][+info_btn+]</td> |
13 | 13 | </tr> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | -class DATEPICKER { |
|
3 | - function __construct() { |
|
2 | +class DATEPICKER{ |
|
3 | + function __construct(){ |
|
4 | 4 | } |
5 | - function getDP() { |
|
5 | + function getDP(){ |
|
6 | 6 | $modx = evolutionCMS(); global$_lang; |
7 | 7 | |
8 | 8 | $tpl = file_get_contents(__DIR__.'/datepicker.tpl'); |
9 | - return $modx->parseText($tpl,$_lang,'[%','%]'); |
|
9 | + return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
10 | 10 | } |
11 | 11 | } |