@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('view_eventlog')) {
|
|
| 5 | +if(!$modx->hasPermission('view_eventlog')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | ?> |
@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | <?php |
| 20 | 20 | $rs = $modx->getDatabase()->select('id, pagetitle, pub_date', $modx->getFullTableName('site_content'), "pub_date > " . time() . "", 'pub_date ASC');
|
| 21 | 21 | $limit = $modx->getDatabase()->getRecordCount($rs); |
| 22 | - if($limit < 1) {
|
|
| 22 | + if($limit < 1) { |
|
| 23 | 23 | ?> |
| 24 | 24 | <p><?= $_lang["no_docs_pending_publishing"] ?></p> |
| 25 | 25 | <?php |
| 26 | - } else {
|
|
| 26 | + } else { |
|
| 27 | 27 | ?> |
| 28 | 28 | <div class="table-responsive"> |
| 29 | 29 | <table class="grid sortabletable" id="table-1"> |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | </thead> |
| 37 | 37 | <tbody> |
| 38 | 38 | <?php |
| 39 | - while($row = $modx->getDatabase()->getRow($rs)) {
|
|
| 39 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
| 40 | 40 | ?> |
| 41 | 41 | <tr> |
| 42 | 42 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | <?php |
| 59 | 59 | $rs = $modx->getDatabase()->select('id, pagetitle, unpub_date', $modx->getFullTableName('site_content'), "unpub_date > " . time() . "", 'unpub_date ASC');
|
| 60 | 60 | $limit = $modx->getDatabase()->getRecordCount($rs); |
| 61 | - if($limit < 1) {
|
|
| 61 | + if($limit < 1) { |
|
| 62 | 62 | ?> |
| 63 | 63 | <p><?= $_lang["no_docs_pending_unpublishing"] ?></p> |
| 64 | 64 | <?php |
| 65 | - } else {
|
|
| 65 | + } else { |
|
| 66 | 66 | ?> |
| 67 | 67 | <div class="table-responsive"> |
| 68 | 68 | <table class="grid sortabletable" id="table-2"> |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | </thead> |
| 76 | 76 | <tbody> |
| 77 | 77 | <?php |
| 78 | - while($row = $modx->getDatabase()->getRow($rs)) {
|
|
| 78 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
| 79 | 79 | ?> |
| 80 | 80 | <tr> |
| 81 | 81 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | <?php |
| 98 | 98 | $rs = $modx->getDatabase()->select('id, pagetitle, pub_date, unpub_date', $modx->getFullTableName('site_content'), "pub_date > 0 OR unpub_date > 0", "pub_date DESC");
|
| 99 | 99 | $limit = $modx->getDatabase()->getRecordCount($rs); |
| 100 | - if($limit < 1) {
|
|
| 100 | + if($limit < 1) { |
|
| 101 | 101 | ?> |
| 102 | 102 | <p><?= $_lang["no_docs_pending_pubunpub"] ?></p> |
| 103 | 103 | <?php |
| 104 | - } else {
|
|
| 104 | + } else { |
|
| 105 | 105 | ?> |
| 106 | 106 | <div class="table-responsive"> |
| 107 | 107 | <table class="grid sortabletable" id="table-3"> |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | </thead> |
| 116 | 116 | <tbody> |
| 117 | 117 | <?php |
| 118 | - while($row = $modx->getDatabase()->getRow($rs)) {
|
|
| 118 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
| 119 | 119 | ?> |
| 120 | 120 | <tr> |
| 121 | 121 | <td class="text-right"><?= $row['id'] ?></td> |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.');
|
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes |
| 7 | 7 | |
| 8 | -if($modx->hasPermission('settings') && (!isset($settings_version) || $settings_version != $modx->getVersionData('version'))) {
|
|
| 8 | +if($modx->hasPermission('settings') && (!isset($settings_version) || $settings_version != $modx->getVersionData('version'))) { |
|
| 9 | 9 | // seems to be a new install - send the user to the configuration page |
| 10 | 10 | exit('<script type="text/javascript">document.location.href="index.php?a=17";</script>');
|
| 11 | 11 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | $_SESSION['nrnewmessages'] = 0; |
| 17 | 17 | |
| 18 | 18 | // setup message info |
| 19 | -if($modx->hasPermission('messages')) {
|
|
| 19 | +if($modx->hasPermission('messages')) { |
|
| 20 | 20 | include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php'); |
| 21 | 21 | $_SESSION['nrtotalmessages'] = $nrtotalmessages; |
| 22 | 22 | $_SESSION['nrnewmessages'] = $nrnewmessages; |
@@ -33,46 +33,46 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $iconTpl = $modx->getChunk('manager#welcome\WrapIcon');
|
| 35 | 35 | // setup icons |
| 36 | -if($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) {
|
|
| 36 | +if($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) { |
|
| 37 | 37 | $icon = '<i class="[&icons_security_large&]" alt="[%user_management_title%]"> </i>[%user_management_title%]'; |
| 38 | 38 | $ph['SecurityIcon'] = sprintf($iconTpl,$icon, 75); |
| 39 | 39 | } |
| 40 | -if($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) {
|
|
| 40 | +if($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) { |
|
| 41 | 41 | $icon = '<i class="[&icons_webusers_large&]" alt="[%web_user_management_title%]"> </i>[%web_user_management_title%]'; |
| 42 | 42 | $ph['WebUserIcon'] = sprintf($iconTpl,$icon, 99); |
| 43 | 43 | } |
| 44 | -if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) {
|
|
| 44 | +if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) { |
|
| 45 | 45 | $icon = '<i class="[&icons_modules_large&]" alt="[%manage_modules%]"> </i>[%modules%]'; |
| 46 | 46 | $ph['ModulesIcon'] = sprintf($iconTpl,$icon, 106); |
| 47 | 47 | } |
| 48 | -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 | +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')) { |
|
| 49 | 49 | $icon = '<i class="[&icons_resources_large&]" alt="[%element_management%]"> </i>[%elements%]'; |
| 50 | 50 | $ph['ResourcesIcon'] = sprintf($iconTpl,$icon, 76); |
| 51 | 51 | } |
| 52 | -if($modx->hasPermission('bk_manager')) {
|
|
| 52 | +if($modx->hasPermission('bk_manager')) { |
|
| 53 | 53 | $icon = '<i class="[&icons_backup_large&]" alt="[%bk_manager%]"> </i>[%backup%]'; |
| 54 | 54 | $ph['BackupIcon'] = sprintf($iconTpl,$icon, 93); |
| 55 | 55 | } |
| 56 | -if($modx->hasPermission('help')) {
|
|
| 56 | +if($modx->hasPermission('help')) { |
|
| 57 | 57 | $icon = '<i class="[&icons_help_large&]" alt="[%help%]" /> </i>[%help%]'; |
| 58 | 58 | $ph['HelpIcon'] = sprintf($iconTpl,$icon, 9); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | -if($modx->hasPermission('new_document')) {
|
|
| 61 | +if($modx->hasPermission('new_document')) { |
|
| 62 | 62 | $icon = '<i class="[&icons_resource_large&]"></i>[%add_resource%]'; |
| 63 | 63 | $ph['ResourceIcon'] = sprintf($iconTpl,$icon, 4); |
| 64 | 64 | $icon = '<i class="[&icons_weblink_large&]"></i>[%add_weblink%]'; |
| 65 | 65 | $ph['WeblinkIcon'] = sprintf($iconTpl,$icon, 72); |
| 66 | 66 | } |
| 67 | -if($modx->hasPermission('assets_images')) {
|
|
| 67 | +if($modx->hasPermission('assets_images')) { |
|
| 68 | 68 | $icon = '<i class="[&icons_images_large&]"></i>[%images_management%]'; |
| 69 | 69 | $ph['ImagesIcon'] = sprintf($iconTpl,$icon, 72); |
| 70 | 70 | } |
| 71 | -if($modx->hasPermission('assets_files')) {
|
|
| 71 | +if($modx->hasPermission('assets_files')) { |
|
| 72 | 72 | $icon = '<i class="[&icons_files_large&]"></i>[%files_management%]'; |
| 73 | 73 | $ph['FilesIcon'] = sprintf($iconTpl,$icon, 72); |
| 74 | 74 | } |
| 75 | -if($modx->hasPermission('change_password')) {
|
|
| 75 | +if($modx->hasPermission('change_password')) { |
|
| 76 | 76 | $icon = '<i class="[&icons_password_large&]"></i>[%change_password%]'; |
| 77 | 77 | $ph['PasswordIcon'] = sprintf($iconTpl,$icon, 28); |
| 78 | 78 | } |
@@ -80,21 +80,21 @@ discard block |
||
| 80 | 80 | $ph['LogoutIcon'] = sprintf($iconTpl,$icon, 8); |
| 81 | 81 | |
| 82 | 82 | // do some config checks |
| 83 | -if(($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) {
|
|
| 83 | +if(($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) { |
|
| 84 | 84 | include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php'); |
| 85 | - if($config_check_results != $_lang['configcheck_ok']) {
|
|
| 85 | + if($config_check_results != $_lang['configcheck_ok']) { |
|
| 86 | 86 | $ph['config_check_results'] = $config_check_results; |
| 87 | 87 | $ph['config_display'] = 'block'; |
| 88 | - } else {
|
|
| 88 | + } else { |
|
| 89 | 89 | $ph['config_display'] = 'none'; |
| 90 | 90 | } |
| 91 | -} else {
|
|
| 91 | +} else { |
|
| 92 | 92 | $ph['config_display'] = 'none'; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // Check logout-reminder |
| 96 | -if(isset($_SESSION['show_logout_reminder'])) {
|
|
| 97 | - switch($_SESSION['show_logout_reminder']['type']) {
|
|
| 96 | +if(isset($_SESSION['show_logout_reminder'])) { |
|
| 97 | + switch($_SESSION['show_logout_reminder']['type']) { |
|
| 98 | 98 | case 'logout_reminder': |
| 99 | 99 | $date = $modx->toDateFormat($_SESSION['show_logout_reminder']['lastHit'], 'dateOnly'); |
| 100 | 100 | $ph['logout_reminder_msg'] = str_replace('[+date+]', $date, $_lang['logout_reminder_msg']);
|
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | $ph['show_logout_reminder'] = 'block'; |
| 104 | 104 | unset($_SESSION['show_logout_reminder']); |
| 105 | -} else {
|
|
| 105 | +} else { |
|
| 106 | 106 | $ph['show_logout_reminder'] = 'none'; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | $from[] = " us LEFT JOIN [+prefix+]active_users au ON au.sid=us.sid WHERE au.action <> '8'"; |
| 164 | 164 | $rs = $modx->getDatabase()->select('*', $from, '', 'username ASC, au.sid ASC');
|
| 165 | 165 | |
| 166 | -if($modx->getDatabase()->getRecordCount($rs) < 1) {
|
|
| 166 | +if($modx->getDatabase()->getRecordCount($rs) < 1) { |
|
| 167 | 167 | $html = '<p>[%no_active_users_found%]</p>'; |
| 168 | -} else {
|
|
| 168 | +} else { |
|
| 169 | 169 | include_once(MODX_MANAGER_PATH . 'includes/actionlist.inc.php'); |
| 170 | 170 | $now = $_SERVER['REQUEST_TIME'] + $server_offset_time; |
| 171 | 171 | $ph['now'] = strftime('%H:%M:%S', $now);
|
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $userList = array(); |
| 192 | 192 | $userCount = array(); |
| 193 | 193 | // Create userlist with session-count first before output |
| 194 | - while($activeusers = $modx->getDatabase()->getRow($rs)) {
|
|
| 194 | + while($activeusers = $modx->getDatabase()->getRow($rs)) { |
|
| 195 | 195 | $userCount[$activeusers['internalKey']] = isset($userCount[$activeusers['internalKey']]) ? $userCount[$activeusers['internalKey']] + 1 : 1; |
| 196 | 196 | |
| 197 | 197 | $idle = $activeusers['lasthit'] < $timetocheck ? ' class="userIdle"' : ''; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $currentaction |
| 210 | 210 | ); |
| 211 | 211 | } |
| 212 | - foreach($userList as $params) {
|
|
| 212 | + foreach($userList as $params) { |
|
| 213 | 213 | $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : ''; |
| 214 | 214 | $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);
|
| 215 | 215 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | // invoke event OnManagerWelcomePrerender |
| 256 | 256 | $evtOut = $modx->invokeEvent('OnManagerWelcomePrerender');
|
| 257 | -if(is_array($evtOut)) {
|
|
| 257 | +if(is_array($evtOut)) { |
|
| 258 | 258 | $output = implode('', $evtOut);
|
| 259 | 259 | $ph['OnManagerWelcomePrerender'] = $output; |
| 260 | 260 | } |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | 'body' => '<div class="widget-stage">[+RecentInfo+]</div>', |
| 360 | 360 | 'hide'=>'0' |
| 361 | 361 | ); |
| 362 | -if ($modx->config['rss_url_news']) {
|
|
| 362 | +if ($modx->config['rss_url_news']) { |
|
| 363 | 363 | $widgets['news'] = array( |
| 364 | 364 | 'menuindex' => '40', |
| 365 | 365 | 'id' => 'news', |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | 'hide'=>'0' |
| 371 | 371 | ); |
| 372 | 372 | } |
| 373 | -if ($modx->config['rss_url_security']) {
|
|
| 373 | +if ($modx->config['rss_url_security']) { |
|
| 374 | 374 | $widgets['security'] = array( |
| 375 | 375 | 'menuindex' => '50', |
| 376 | 376 | 'id' => 'security', |
@@ -384,29 +384,29 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | // invoke OnManagerWelcomeHome event |
| 386 | 386 | $sitewidgets = $modx->invokeEvent("OnManagerWelcomeHome", array('widgets' => $widgets));
|
| 387 | -if(is_array($sitewidgets)) {
|
|
| 387 | +if(is_array($sitewidgets)) { |
|
| 388 | 388 | $newwidgets = array(); |
| 389 | - foreach($sitewidgets as $widget){
|
|
| 389 | + foreach($sitewidgets as $widget) { |
|
| 390 | 390 | $newwidgets = array_merge($newwidgets, unserialize($widget)); |
| 391 | 391 | } |
| 392 | 392 | $widgets = (count($newwidgets) > 0) ? $newwidgets : $widgets; |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | -usort($widgets, function ($a, $b) {
|
|
| 395 | +usort($widgets, function ($a, $b){ |
|
| 396 | 396 | return $a['menuindex'] - $b['menuindex']; |
| 397 | 397 | }); |
| 398 | 398 | |
| 399 | 399 | $tpl = $modx->getChunk('manager#welcome\Widget');
|
| 400 | 400 | $output = ''; |
| 401 | -foreach($widgets as $widget) {
|
|
| 402 | - if ($widget['hide'] != '1'){
|
|
| 401 | +foreach($widgets as $widget) { |
|
| 402 | + if ($widget['hide'] != '1') { |
|
| 403 | 403 | $output .= $modx->parseText($tpl, $widget); |
| 404 | 404 | } |
| 405 | 405 | } |
| 406 | 406 | $ph['widgets'] = $output; |
| 407 | 407 | |
| 408 | 408 | // load template |
| 409 | -if(!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) {
|
|
| 409 | +if(!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) { |
|
| 410 | 410 | $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'; |
| 411 | 411 | } |
| 412 | 412 | |
@@ -414,26 +414,28 @@ discard block |
||
| 414 | 414 | $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target);
|
| 415 | 415 | $target = $modx->mergeSettingsContent($target); |
| 416 | 416 | |
| 417 | -if(substr($target, 0, 1) === '@') {
|
|
| 418 | - if(substr($target, 0, 6) === '@CHUNK') {
|
|
| 417 | +if(substr($target, 0, 1) === '@') { |
|
| 418 | + if(substr($target, 0, 6) === '@CHUNK') { |
|
| 419 | 419 | $content = $modx->getChunk(trim(substr($target, 7))); |
| 420 | - } elseif(substr($target, 0, 5) === '@FILE') {
|
|
| 420 | + } elseif(substr($target, 0, 5) === '@FILE') { |
|
| 421 | 421 | $content = file_get_contents(trim(substr($target, 6))); |
| 422 | - } else {
|
|
| 422 | + } else { |
|
| 423 | 423 | $content = ''; |
| 424 | 424 | } |
| 425 | -} else {
|
|
| 425 | +} else { |
|
| 426 | 426 | $chunk = $modx->getChunk($target); |
| 427 | - if($chunk !== false && !empty($chunk)) {
|
|
| 427 | + if($chunk !== false && !empty($chunk)) { |
|
| 428 | 428 | $content = $chunk; |
| 429 | - } elseif(is_file(MODX_BASE_PATH . $target)) {
|
|
| 429 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
| 430 | 430 | $content = file_get_contents(MODX_BASE_PATH . $target); |
| 431 | - } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) {
|
|
| 431 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) { |
|
| 432 | 432 | $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl'); |
| 433 | - } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) // ClipperCMS compatible |
|
| 433 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) { |
|
| 434 | + // ClipperCMS compatible |
|
| 434 | 435 | {
|
| 435 | - $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html'); |
|
| 436 | - } else {
|
|
| 436 | + $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html'); |
|
| 437 | + } |
|
| 438 | + } else { |
|
| 437 | 439 | $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'); |
| 438 | 440 | } |
| 439 | 441 | } |
@@ -442,7 +444,7 @@ discard block |
||
| 442 | 444 | $content = $modx->mergeConditionalTagsContent($content); |
| 443 | 445 | $content = $modx->mergeSettingsContent($content); |
| 444 | 446 | $content = $modx->parseText($content, $ph); |
| 445 | -if(strpos($content, '[+') !== false) {
|
|
| 447 | +if(strpos($content, '[+') !== false) { |
|
| 446 | 448 | $modx->toPlaceholders($ph); |
| 447 | 449 | $content = $modx->mergePlaceholderContent($content); |
| 448 | 450 | } |
@@ -451,7 +453,7 @@ discard block |
||
| 451 | 453 | $content = $modx->parseText($content, $_style, '[&', '&]'); |
| 452 | 454 | $content = $modx->cleanUpMODXTags($content); //cleanup |
| 453 | 455 | |
| 454 | -if($js = $modx->getRegisteredClientScripts()) {
|
|
| 456 | +if($js = $modx->getRegisteredClientScripts()) { |
|
| 455 | 457 | $content .= $js; |
| 456 | 458 | } |
| 457 | 459 | |
@@ -118,18 +118,18 @@ |
||
| 118 | 118 | $articul_query = "SELECT `contentid` FROM {$tbl_site_tmplvar_contentvalues} WHERE `value` LIKE '%{$searchfields}%'"; |
| 119 | 119 | $articul_result = $modx->getDatabase()->query($articul_query); |
| 120 | 120 | $articul_id_array = $modx->getDatabase()->makeArray($articul_result); |
| 121 | - if(count($articul_id_array)>0){ |
|
| 121 | + if(count($articul_id_array)>0) { |
|
| 122 | 122 | $articul_id = ''; |
| 123 | 123 | $i = 1; |
| 124 | 124 | foreach( $articul_id_array as $articul ) { |
| 125 | 125 | $articul_id.=$articul['contentid']; |
| 126 | - if($i !== count($articul_id_array)){ |
|
| 126 | + if($i !== count($articul_id_array)) { |
|
| 127 | 127 | $articul_id.=','; |
| 128 | 128 | } |
| 129 | 129 | $i++; |
| 130 | 130 | } |
| 131 | 131 | $articul_id_query = " OR sc.id IN ({$articul_id})"; |
| 132 | - }else{ |
|
| 132 | + } else { |
|
| 133 | 133 | $articul_id_query = ''; |
| 134 | 134 | } |
| 135 | 135 | /*end search by TV*/ |
@@ -43,7 +43,9 @@ discard block |
||
| 43 | 43 | // get user settings |
| 44 | 44 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('user_settings'), "user = '{$user}'"); |
| 45 | 45 | $usersettings = array(); |
| 46 | - while($row = $modx->getDatabase()->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 46 | + while($row = $modx->getDatabase()->getRow($rs)) { |
|
| 47 | + $usersettings[$row['setting_name']] = $row['setting_value']; |
|
| 48 | + } |
|
| 47 | 49 | // manually extract so that user display settings are not overwritten |
| 48 | 50 | foreach($usersettings as $k => $v) { |
| 49 | 51 | if($k != 'manager_language' && $k != 'manager_theme') { |
@@ -767,13 +769,16 @@ discard block |
||
| 767 | 769 | |
| 768 | 770 | $groupsarray = array(); |
| 769 | 771 | |
| 770 | - if($modx->getManagerApi()->action == '12') { // only do this bit if the user is being edited |
|
| 772 | + if($modx->getManagerApi()->action == '12') { |
|
| 773 | +// only do this bit if the user is being edited |
|
| 771 | 774 | $rs = $modx->getDatabase()->select('user_group', $modx->getFullTableName('member_groups'), "member='{$user}'"); |
| 772 | 775 | $groupsarray = $modx->getDatabase()->getColumn('user_group', $rs); |
| 773 | 776 | } |
| 774 | 777 | // retain selected doc groups between post |
| 775 | 778 | if(is_array($_POST['user_groups'])) { |
| 776 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
| 779 | + foreach($_POST['user_groups'] as $n => $v) { |
|
| 780 | + $groupsarray[] = $v; |
|
| 781 | + } |
|
| 777 | 782 | } |
| 778 | 783 | ?> |
| 779 | 784 | <div class="tab-page" id="tabAccess"> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -if (!$modx->hasPermission('logs')) {
|
|
| 5 | +if (!$modx->hasPermission('logs')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | <?php |
| 27 | 27 | // get all users currently in the log |
| 28 | 28 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
| 29 | - foreach ($logs_user as $row) {
|
|
| 29 | + foreach ($logs_user as $row) { |
|
| 30 | 30 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
| 31 | 31 | echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
| 32 | 32 | } |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | // get all available actions in the log |
| 44 | 44 | include_once "actionlist.inc.php"; |
| 45 | 45 | $logs_actions = record_sort(array_unique_multi($logs, 'action'), 'action'); |
| 46 | - foreach ($logs_actions as $row) {
|
|
| 46 | + foreach ($logs_actions as $row) { |
|
| 47 | 47 | $action = getAction($row['action']); |
| 48 | - if ($action == 'Idle') {
|
|
| 48 | + if ($action == 'Idle') { |
|
| 49 | 49 | continue; |
| 50 | 50 | } |
| 51 | 51 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | <?php |
| 64 | 64 | // get all itemid currently in logging |
| 65 | 65 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
| 66 | - foreach ($logs_items as $row) {
|
|
| 66 | + foreach ($logs_items as $row) { |
|
| 67 | 67 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
| 68 | 68 | echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
| 69 | 69 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | <?php |
| 80 | 80 | // get all itemname currently in logging |
| 81 | 81 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
| 82 | - foreach ($logs_names as $row) {
|
|
| 82 | + foreach ($logs_names as $row) { |
|
| 83 | 83 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
| 84 | 84 | echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
| 85 | 85 | } |
@@ -135,36 +135,36 @@ discard block |
||
| 135 | 135 | <div class="container container-body"> |
| 136 | 136 | |
| 137 | 137 | <?php |
| 138 | -if (isset($_REQUEST['log_submit'])) {
|
|
| 138 | +if (isset($_REQUEST['log_submit'])) { |
|
| 139 | 139 | // get the selections the user made. |
| 140 | 140 | $sqladd = array(); |
| 141 | - if ($_REQUEST['searchuser'] != 0) {
|
|
| 141 | + if ($_REQUEST['searchuser'] != 0) { |
|
| 142 | 142 | $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'"; |
| 143 | 143 | } |
| 144 | - if ($_REQUEST['action'] != 0) {
|
|
| 144 | + if ($_REQUEST['action'] != 0) { |
|
| 145 | 145 | $sqladd[] = "action=" . (int)$_REQUEST['action']; |
| 146 | 146 | } |
| 147 | - if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") {
|
|
| 147 | + if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
|
| 148 | 148 | $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
| 149 | 149 | } |
| 150 | - if ($_REQUEST['itemname'] != '0') {
|
|
| 150 | + if ($_REQUEST['itemname'] != '0') { |
|
| 151 | 151 | $sqladd[] = "itemname='" . $modx->getDatabase()->escape($_REQUEST['itemname']) . "'"; |
| 152 | 152 | } |
| 153 | - if ($_REQUEST['message'] != "") {
|
|
| 153 | + if ($_REQUEST['message'] != "") { |
|
| 154 | 154 | $sqladd[] = "message LIKE '%" . $modx->getDatabase()->escape($_REQUEST['message']) . "%'"; |
| 155 | 155 | } |
| 156 | 156 | // date stuff |
| 157 | - if ($_REQUEST['datefrom'] != "") {
|
|
| 157 | + if ($_REQUEST['datefrom'] != "") { |
|
| 158 | 158 | $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
| 159 | 159 | } |
| 160 | - if ($_REQUEST['dateto'] != "") {
|
|
| 160 | + if ($_REQUEST['dateto'] != "") { |
|
| 161 | 161 | $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // If current position is not set, set it to zero |
| 165 | - if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) {
|
|
| 165 | + if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { |
|
| 166 | 166 | $int_cur_position = 0; |
| 167 | - } else {
|
|
| 167 | + } else { |
|
| 168 | 168 | $int_cur_position = $_REQUEST['int_cur_position']; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}");
|
| 180 | 180 | |
| 181 | -if ($limit < 1) {
|
|
| 181 | +if ($limit < 1) { |
|
| 182 | 182 | echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
| 183 | -} else {
|
|
| 183 | +} else { |
|
| 184 | 184 | echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
| 185 | 185 | |
| 186 | 186 | // New instance of the Paging class, you can modify the color and the width of the html table |
@@ -198,14 +198,14 @@ discard block |
||
| 198 | 198 | $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
| 199 | 199 | $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
| 200 | 200 | $pagesfound = sizeof($array_row_paging); |
| 201 | - if ($pagesfound > 6) {
|
|
| 201 | + if ($pagesfound > 6) { |
|
| 202 | 202 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
| 203 | 203 | $paging .= $array_row_paging[$current_row - 1]; // ." "; |
| 204 | 204 | $paging .= $array_row_paging[$current_row]; // ." "; |
| 205 | 205 | $paging .= $array_row_paging[$current_row + 1]; // ." "; |
| 206 | 206 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
| 207 | - } else {
|
|
| 208 | - for ($i = 0; $i < $pagesfound; $i++) {
|
|
| 207 | + } else { |
|
| 208 | + for ($i = 0; $i < $pagesfound; $i++) { |
|
| 209 | 209 | $paging .= $array_row_paging[$i] . " "; |
| 210 | 210 | } |
| 211 | 211 | } |
@@ -242,12 +242,12 @@ discard block |
||
| 242 | 242 | // grab the entire log file... |
| 243 | 243 | $logentries = array(); |
| 244 | 244 | $i = 0; |
| 245 | - while ($logentry = $modx->getDatabase()->getRow($rs)) {
|
|
| 246 | - if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) {
|
|
| 245 | + while ($logentry = $modx->getDatabase()->getRow($rs)) { |
|
| 246 | + if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
|
| 247 | 247 | $item = '<div style="text-align:center;">-</div>'; |
| 248 | - } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) {
|
|
| 248 | + } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
|
| 249 | 249 | $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
| 250 | - } else {
|
|
| 250 | + } else { |
|
| 251 | 251 | $item = $logentry['itemname']; |
| 252 | 252 | } |
| 253 | 253 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
@@ -284,6 +284,6 @@ discard block |
||
| 284 | 284 | // @see index.php @ 915 |
| 285 | 285 | global $action; |
| 286 | 286 | $action = 1; |
| 287 | -} else {
|
|
| 287 | +} else { |
|
| 288 | 288 | echo $_lang["mgrlog_noquery"]; |
| 289 | 289 | } |
@@ -82,23 +82,23 @@ discard block |
||
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | 84 | $currentCategory = ''; |
| 85 | - while ($row = $modx->getDatabase()->getRow($rs)) {
|
|
| 85 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
| 86 | 86 | $thisCategory = $row['category']; |
| 87 | - if($thisCategory == null) {
|
|
| 87 | + if($thisCategory == null) { |
|
| 88 | 88 | $thisCategory = $_lang['no_category']; |
| 89 | 89 | } |
| 90 | - if($thisCategory != $currentCategory) {
|
|
| 91 | - if($closeOptGroup) {
|
|
| 90 | + if($thisCategory != $currentCategory) { |
|
| 91 | + if($closeOptGroup) { |
|
| 92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
| 93 | 93 | } |
| 94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
| 95 | 95 | $closeOptGroup = true; |
| 96 | - } else {
|
|
| 96 | + } else { |
|
| 97 | 97 | $closeOptGroup = false; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : ''; |
| 101 | - if ($selectedtext) {
|
|
| 101 | + if ($selectedtext) { |
|
| 102 | 102 | $oldTmpId = $row['id']; |
| 103 | 103 | $oldTmpName = $row['templatename']; |
| 104 | 104 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; |
| 107 | 107 | $currentCategory = $thisCategory; |
| 108 | 108 | } |
| 109 | - if($thisCategory != '') {
|
|
| 109 | + if($thisCategory != '') { |
|
| 110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
| 111 | 111 | } |
| 112 | 112 | ?> |
@@ -138,11 +138,12 @@ discard block |
||
| 138 | 138 | $modx->getDatabase()->select('id', '[+prefix+]site_plugins',
|
| 139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
| 140 | 140 | ); |
| 141 | - if($count) {
|
|
| 141 | + if($count) { |
|
| 142 | 142 | $disabledFilters = 1; |
| 143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
| 144 | - } |
|
| 145 | - else $disabledFilters = false; |
|
| 144 | + } else { |
|
| 145 | + $disabledFilters = false; |
|
| 146 | + } |
|
| 146 | 147 | ?> |
| 147 | 148 | <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br />
|
| 148 | 149 | <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?>
|
@@ -204,7 +205,7 @@ discard block |
||
| 204 | 205 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
| 205 | 206 | <?php |
| 206 | 207 | $ct = explode(",",$custom_contenttype);
|
| 207 | - for($i=0;$i<count($ct);$i++) {
|
|
| 208 | + for($i=0;$i<count($ct);$i++) { |
|
| 208 | 209 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; |
| 209 | 210 | } |
| 210 | 211 | ?> |
@@ -259,7 +260,7 @@ discard block |
||
| 259 | 260 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
| 260 | 261 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
| 261 | 262 | <?php |
| 262 | - for($i=-24; $i<25; $i++) {
|
|
| 263 | + for($i=-24; $i<25; $i++) { |
|
| 263 | 264 | $seconds = $i*60*60; |
| 264 | 265 | $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
| 265 | 266 | ?> |
@@ -301,7 +302,9 @@ discard block |
||
| 301 | 302 | <?php |
| 302 | 303 | // invoke OnSiteSettingsRender event |
| 303 | 304 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender');
|
| 304 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 305 | + if(is_array($evtOut)) { |
|
| 306 | + echo implode("",$evtOut); |
|
| 307 | + } |
|
| 305 | 308 | ?> |
| 306 | 309 | </td> |
| 307 | 310 | </tr> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
| 3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) {
|
|
| 3 | + if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
| 4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
| 5 | - } else {
|
|
| 5 | + } else { |
|
| 6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
| 7 | 7 | } |
| 8 | 8 | ?> |
@@ -157,7 +157,9 @@ discard block |
||
| 157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
| 158 | 158 | <td> |
| 159 | 159 | <?php |
| 160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
| 160 | +if(empty($pwd_hash_algo)) { |
|
| 161 | + $phm['sel']['UNCRYPT'] = 1; |
|
| 162 | +} |
|
| 161 | 163 | $phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1;
|
| 162 | 164 | $phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1;
|
| 163 | 165 | $phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1;
|
@@ -186,7 +188,9 @@ discard block |
||
| 186 | 188 | ?> |
| 187 | 189 | <?php |
| 188 | 190 | $gdAvailable = extension_loaded('gd');
|
| 189 | -if(!$gdAvailable) $use_captcha = 0; |
|
| 191 | +if(!$gdAvailable) { |
|
| 192 | + $use_captcha = 0; |
|
| 193 | +} |
|
| 190 | 194 | ?> |
| 191 | 195 | <tr> |
| 192 | 196 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
@@ -226,7 +230,9 @@ discard block |
||
| 226 | 230 | <?php |
| 227 | 231 | // invoke OnMiscSettingsRender event |
| 228 | 232 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender');
|
| 229 | - if(is_array($evtOut)) echo implode("",$evtOut);
|
|
| 233 | + if(is_array($evtOut)) { |
|
| 234 | + echo implode("",$evtOut); |
|
| 235 | + } |
|
| 230 | 236 | ?> |
| 231 | 237 | </td> |
| 232 | 238 | </tr> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) {
|
|
| 5 | +if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | $modx->getManagerApi()->initPageViewState(); |
| 11 | 11 | |
| 12 | 12 | // get and save search string |
| 13 | -if ($_REQUEST['op'] == 'reset') {
|
|
| 13 | +if ($_REQUEST['op'] == 'reset') { |
|
| 14 | 14 | $query = ''; |
| 15 | 15 | $_PAGE['vs']['search'] = ''; |
| 16 | -} else {
|
|
| 16 | +} else { |
|
| 17 | 17 | $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
| 18 | 18 | $sqlQuery = $modx->getDatabase()->escape($query); |
| 19 | 19 | $_PAGE['vs']['search'] = $query; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
| 29 | 29 | $cm = new ContextMenu("cntxm", 150);
|
| 30 | 30 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0));
|
| 31 | -if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) {
|
|
| 31 | +if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
|
| 32 | 32 | $cm->addSeparator(); |
| 33 | 33 | } |
| 34 | 34 | $cm->addItem($_lang["edit"], "js:menuAction(2)", $_style['actions_edit'], (!$modx->hasPermission('edit_module') ? 1 : 0));
|
@@ -107,21 +107,21 @@ discard block |
||
| 107 | 107 | <div class="tab-page"> |
| 108 | 108 | <div class="table-responsive"> |
| 109 | 109 | <?php |
| 110 | - if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) {
|
|
| 110 | + if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
|
| 111 | 111 | $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon
|
| 112 | 112 | FROM ' . $modx->getFullTableName('site_modules') . ' AS sm
|
| 113 | 113 | LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id
|
| 114 | 114 | LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group
|
| 115 | 115 | WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
| 116 | 116 | ORDER BY sm.name'); |
| 117 | - if ($modx->hasPermission('edit_module')) {
|
|
| 117 | + if ($modx->hasPermission('edit_module')) { |
|
| 118 | 118 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 119 | - } else if ($modx->hasPermission('exec_module')) {
|
|
| 119 | + } else if ($modx->hasPermission('exec_module')) { |
|
| 120 | 120 | $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 121 | - } else {
|
|
| 121 | + } else { |
|
| 122 | 122 | $title = '[+value+]'; |
| 123 | 123 | } |
| 124 | - } else {
|
|
| 124 | + } else { |
|
| 125 | 125 | $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name");
|
| 126 | 126 | $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
| 127 | 127 | } |
@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | $grd->colWidths = "34,,,60,60"; |
| 138 | 138 | $grd->colAligns = "center,,,center,center"; |
| 139 | 139 | $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
| 140 | - if ($listmode == '1') {
|
|
| 140 | + if ($listmode == '1') { |
|
| 141 | 141 | $grd->pageSize = 0; |
| 142 | 142 | } |
| 143 | - if ($_REQUEST['op'] == 'reset') {
|
|
| 143 | + if ($_REQUEST['op'] == 'reset') { |
|
| 144 | 144 | $grd->pageNumber = 1; |
| 145 | 145 | } |
| 146 | 146 | // render grid |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
|
| 4 | 4 | } |
| 5 | -if(!$modx->hasPermission('view_eventlog')) {
|
|
| 5 | +if(!$modx->hasPermission('view_eventlog')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | $modx->getManagerApi()->initPageViewState(); |
| 16 | 16 | |
| 17 | 17 | // get and save search string |
| 18 | -if($_REQUEST['op'] == 'reset') {
|
|
| 18 | +if($_REQUEST['op'] == 'reset') { |
|
| 19 | 19 | $sqlQuery = $query = ''; |
| 20 | 20 | $_PAGE['vs']['search'] = ''; |
| 21 | -} else {
|
|
| 21 | +} else { |
|
| 22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
| 23 | - if(!is_numeric($sqlQuery)) {
|
|
| 23 | + if(!is_numeric($sqlQuery)) { |
|
| 24 | 24 | $sqlQuery = $modx->getDatabase()->escape($query); |
| 25 | 25 | } |
| 26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -143,10 +143,10 @@ discard block |
||
| 143 | 143 | $grd->colWidths = "1%,,1%,1%,1%"; |
| 144 | 144 | $grd->colAligns = "center,,,center,center"; |
| 145 | 145 | $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
| 146 | - if($listmode == '1') {
|
|
| 146 | + if($listmode == '1') { |
|
| 147 | 147 | $grd->pageSize = 0; |
| 148 | 148 | } |
| 149 | - if($_REQUEST['op'] == 'reset') {
|
|
| 149 | + if($_REQUEST['op'] == 'reset') { |
|
| 150 | 150 | $grd->pageNumber = 1; |
| 151 | 151 | } |
| 152 | 152 | // render grid |