From c78a33b86d45dabb5ec387b0158952cca27d278f Mon Sep 17 00:00:00 2001 From: e107steved Date: Mon, 8 Dec 2008 22:23:53 +0000 Subject: [PATCH] Add admin logging to banner menu config --- e107_plugins/banner_menu/config.php | 22 ++++++++++++++----- .../banner_menu/languages/English.php | 7 +++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/e107_plugins/banner_menu/config.php b/e107_plugins/banner_menu/config.php index 0ca32481c..aac0041bc 100644 --- a/e107_plugins/banner_menu/config.php +++ b/e107_plugins/banner_menu/config.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/banner_menu/config.php,v $ -| $Revision: 1.2 $ -| $Date: 2008-08-26 19:45:33 $ +| $Revision: 1.3 $ +| $Date: 2008-12-08 22:23:53 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -41,11 +41,12 @@ if (e_QUERY) if (isset($_POST['update_menu'])) { + unset($temp); foreach($_POST as $k => $v) { if (strpos($k, "banner_") === 0) { - $menu_pref[$k] = $v; + $temp[$k] = $v; } } @@ -57,11 +58,20 @@ if (isset($_POST['update_menu'])) $cat .= $array_cat[$i]."|"; } $cat = substr($cat, 0, -1); - $menu_pref['banner_campaign'] = $cat; + $temp['banner_campaign'] = $cat; } - $sysprefs->setArray('menu_pref'); - $ns->tablerender("", "
".BANNER_MENU_L2."
"); + + if ($admin_log->logArrayDiffs($temp, $menu_pref, 'BANNER_05')) + { + $sysprefs->setArray('menu_pref'); // Only save if changes + $message = BANNER_MENU_L2; + } + else + { + $message = BANNER_MENU_L19; + } + $ns->tablerender("", "
".$message."
"); } if (!$menu_pref['banner_caption']) diff --git a/e107_plugins/banner_menu/languages/English.php b/e107_plugins/banner_menu/languages/English.php index ed82f1fb8..3e41c27fb 100644 --- a/e107_plugins/banner_menu/languages/English.php +++ b/e107_plugins/banner_menu/languages/English.php @@ -4,9 +4,9 @@ | e107 website system - Language File. | | $Source: /cvs_backup/e107_0.8/e107_plugins/banner_menu/languages/English.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:34:44 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2008-12-08 22:23:53 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -30,5 +30,6 @@ define("BANNER_MENU_L15", "how many banners should be shown ?"); define("BANNER_MENU_L16", "this setting will only be used with options 2 and 3.
if less banners are present the maximum available amount will be used."); define("BANNER_MENU_L17", "set amount ..."); define("BANNER_MENU_L18", "Update Menu Settings"); +define('BANNER_MENU_L19', 'Nothing changed - not saved'); ?> \ No newline at end of file