
Originally Posted by
rayzermatic
Is there a way to turn off the "Display Log File" heading on the main admin page? i.e. " 323 debug-log files exist, click here to view."
I run zencarts for customers and this freaks them out and I don't want to have them just start clicking around. I have put the fear of TODD into them to just not mess with any of the links east of "Reports" on the nav ribbon. So having the "Display Log Files" in the tools link is enough for me. I will begin to look there as one of the first things I do when working on someones site.
Thanks.
Not currently without a coding change (I'll add this as a change-request in the plugin's GitHub repository).
For now, you can edit the file /YOUR_ADMIN/includes/init_includes/init_display_logs.php to comment out that section for your purposes:
Code:
...
// -----
// If the current plugin version is different from that recorded in the database, update the database!
//
if (DISPLAY_LOGS_VERSION != DISPLAY_LOGS_CURRENT_VERSION) {
$db->Execute(
"UPDATE " . TABLE_CONFIGURATION . "
SET configuration_value = '" . DISPLAY_LOGS_CURRENT_VERSION . "'
WHERE configuration_key = 'DISPLAY_LOGS_VERSION'
LIMIT 1"
);
}
/*-bof- Don't display the warning message
// -----
// Check to see if there are any debug-logs present and, if so, notify the current admin via header message ... unless the admin is already on the display logs page.
//
if ($current_page != FILENAME_DISPLAY_LOGS . '.php') {
$path = (defined('DIR_FS_LOGS')) ? DIR_FS_LOGS : DIR_FS_SQL_CACHE;
$log_files = glob($path . '/myDEBUG-*.log');
$num_log_files = ($log_files === false) ? 0 : count ($log_files);
unset ($log_files);
if ($num_log_files > 0) {
$messageStack->add(sprintf(DISPLAY_LOGS_MESSAGE_LOGS_PRESENT, $num_log_files, zen_href_link(FILENAME_DISPLAY_LOGS)), 'caution');
}
}
-eof-Don't display the warning message */
Bookmarks