From 12f81df1adc9a2322129068e8c9cff2fbe7ce4d3 Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Sat, 2 Feb 2013 13:05:41 +0100 Subject: [PATCH] Clean-up on log plugin (#90) - not completely fixed yet --- e107_plugins/log/admin_config.php | 43 ++++++++----------- .../log/languages/English_admin_log.php | 14 +++--- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/e107_plugins/log/admin_config.php b/e107_plugins/log/admin_config.php index 0de202cca..f28f087e9 100644 --- a/e107_plugins/log/admin_config.php +++ b/e107_plugins/log/admin_config.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2013 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -12,15 +12,6 @@ * $Id$ */ -/** - * e107 Stats logging plugin - * - * @package e107_plugins - * @subpackage log - * @version $Id$; - * - */ - require_once('../../class2.php'); if (!getperms('P') || !e107::isInstalled('log')) { @@ -33,6 +24,7 @@ require_once(e_ADMIN.'auth.php'); require_once(e_HANDLER.'userclass_class.php'); $frm = e107::getForm(); +$emessage = eMessage::getInstance(); define('LogFlagFile', 'LogFlag.php'); @@ -209,14 +201,14 @@ if(IsSet($_POST['wipeSubmit'])) } $admin_log->log_event('STAT_01',ADSTAT_L81.$logStr,''); - $message = ADSTAT_L25; + $message = ADSTAT_L25; // TODO:$emessage } if(!is_writable(e_LOG)) { - $message = "".ADSTAT_L38.""; + $message = "".ADSTAT_L38.""; // TODO:$emessage } if (isset($_POST['updatesettings'])) @@ -248,7 +240,8 @@ if (isset($_POST['updatesettings'])) save_prefs(); file_put_contents(e_LOG.LogFlagFile, "\n"); // Logging task uses to see if logging enabled $admin_log->log_event('STAT_02',ADSTAT_L82.$logStr,''); - $message = ADSTAT_L17; + //$message = ADSTAT_L17; + $emessage->add(ADSTAT_L17, E_MESSAGE_SUCCESS); // FIX: seems not functional } @@ -339,22 +332,24 @@ switch ($action) - ".ADSTAT_L78."
".ADSTAT_L79." + ".ADSTAT_L78." - + ".ADSTAT_L79." - ".ADSTAT_L12."
".ADSTAT_L13." + ".ADSTAT_L12." - ".ADSTAT_L14."
- ".ADSTAT_L6."
- ".ADSTAT_L7."
- ".ADSTAT_L8."
- ".ADSTAT_L9."
- ".ADSTAT_L10."
- ".ADSTAT_L11."
-
+ ".ADSTAT_L14."
+ ".ADSTAT_L6."
+ ".ADSTAT_L7."
+ ".ADSTAT_L8."
+ ".ADSTAT_L9."
+ ".ADSTAT_L10."
+ ".ADSTAT_L11."
+
+ ".$frm->admin_button('wipeSubmit', ADSTAT_L12, 'delete')." + ".ADSTAT_L13." diff --git a/e107_plugins/log/languages/English_admin_log.php b/e107_plugins/log/languages/English_admin_log.php index 2c546a3ce..824fa5010 100644 --- a/e107_plugins/log/languages/English_admin_log.php +++ b/e107_plugins/log/languages/English_admin_log.php @@ -2,16 +2,12 @@ /* * e107 website system * - * Copyright (C) 2008-2009 e107 Inc (e107.org) + * Copyright (C) 2008-2013 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * - * - * - * $Source: /cvs_backup/e107_0.8/e107_plugins/log/languages/English_admin_log.php,v $ - * $Revision$ - * $Date$ - * $Author$ + * $URL$ + * $Id$ */ define("ADSTAT_ON", "On"); @@ -28,7 +24,7 @@ define("ADSTAT_L9", "Countries/domains visited from"); define("ADSTAT_L10", "Referrers"); define("ADSTAT_L11", "Search queries"); define("ADSTAT_L12", "Reset stats"); -define("ADSTAT_L13", "this will erase the all-time stats - careful!
Deletes stats to the end of yesterday.
There is a separate menu option to delete selected historical data"); +define("ADSTAT_L13", "This will erase the all-time stats - careful! Deletes stats to the end of yesterday. There is a separate menu option to delete selected historical data"); // TODO: Condense this help field (minimize) define("ADSTAT_L14", "Page counts"); define("ADSTAT_L15", "Update Statistic Settings"); define("ADSTAT_L16", "Site Statistic Settings"); @@ -94,7 +90,7 @@ define ('ADSTAT_L75', 'Records for deletion'); define ('ADSTAT_L76', 'Caution! Once deleted, the data cannot be recovered. Backup or export your database first'); define ('ADSTAT_L77', 'Records deleted:'); define ('ADSTAT_L78', 'Show previous month as well as current month for non-page access stats'); -define ('ADSTAT_L79', '(Only used if monthly stats collected)'); +define ('ADSTAT_L79', 'Only used if monthly stats collected'); define ('ADSTAT_L80', 'The following pages were deleted:'); define ('ADSTAT_L81', 'Statistics cleared:'); define ('ADSTAT_L82', 'Following values now set:');