public function clearErrorLogs(array $params) { global $Misc; $oldCount = $Misc->ErrorLogs; libError::clear(); return l_t('The error logs were cleared, %s files deleted.', $oldCount); }
/** * Definir le webos. * @param Webos $webos Le webos. */ public static function setErrorsWebos(Webos $webos) { self::$errorsWebos = $webos; }
GNU General Public License for more details. You should have received a copy of the GNU Affero General Public License along with webDiplomacy. If not, see <http://www.gnu.org/licenses/>. */ defined('IN_CODE') or die('This script can not be run by itself.'); /** * Display the error logs and other lists useful for admins * * @package Admin */ if ($User->type['Admin']) { //There may be sensitive info that would allow privilege escalation in these error logs print '<p><strong>' . l_t('Error logs:') . '</strong> ' . libError::stats() . ' (' . libHTML::admincp('clearErrorLogs', null, 'Clear') . ')</p>'; $dir = libError::directory(); $errorlogs = libError::errorTimes(); $alternate = false; print '<TABLE class="credits">'; foreach ($errorlogs as $errorlog) { $alternate = !$alternate; print '<tr class="replyalternate' . ($alternate ? '1' : '2') . '">'; print '<td class="left time">' . libTime::text($errorlog) . '</td>'; print '<td class="right message"><a class="light" href="admincp.php?viewErrorLog=' . $errorlog . '">Open</a></td>'; print '</tr>'; } print '</TABLE>'; } /** * Fill a named table from a single column query * * @param string $name The table's name
/** * Update ErrorLogCount=>The number of error-log files */ public static function errorLog() { global $Misc; list($Misc->ErrorLogCount) = libError::stats(); }
public static function clear() { global $Misc; if (!libError::isLoggingEnabled()) { return false; } $dir = self::directory(); $times = self::errorTimes(); foreach ($times as $time) { unlink($dir . '/' . $time . '.txt'); } $Misc->ErrorLogs = 0; }