|
From: Verdon V. <ve...@us...> - 2008-07-26 21:02:59
|
Update of /cvsroot/phpwebsite-comm/modules/whatsnew/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25410/class Modified Files: Whatsnew.php Whatsnew_Forms.php Log Message: 0.3.0 changes Index: Whatsnew.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/whatsnew/class/Whatsnew.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Whatsnew.php 24 Jul 2008 14:14:22 -0000 1.3 --- Whatsnew.php 26 Jul 2008 21:02:36 -0000 1.4 *************** *** 63,66 **** --- 63,78 ---- break; + case 'flush_cache': + if (!Current_User::authorized('whatsnew')) { + Current_User::disallow(); + } + if ($this->flushCache()) { + $this->forwardMessage(dgettext('whatsnew', 'Cache flushed.')); + PHPWS_Core::reroute('index.php?module=whatsnew&aop=menu'); + } else { + $this->loadForm('settings'); + } + break; + } *************** *** 326,329 **** --- 338,347 ---- + function flushCache() { + if (PHPWS_Cache::remove('whatsnew_cache_key')) { + return true; + } + } + } Index: Whatsnew_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/whatsnew/class/Whatsnew_Forms.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Whatsnew_Forms.php 22 Jul 2008 15:18:40 -0000 1.2 --- Whatsnew_Forms.php 26 Jul 2008 21:02:36 -0000 1.3 *************** *** 81,84 **** --- 81,85 ---- $tpl = $form->getTemplate(); $tpl['SETTINGS_LABEL'] = dgettext('whatsnew', 'General Settings'); + $tpl['FLUSH_LINK'] = PHPWS_Text::secureLink(dgettext('whatsnew', 'Flush cache'), 'whatsnew', array('aop'=>'flush_cache')); $tpl['EXCLUDE'] = $this->whatsnew->getKeyMods(unserialize(PHPWS_Settings::get('whatsnew', 'exclude')), 'exclude'); $tpl['EXCLUDE_LABEL'] = dgettext('whatsnew', 'Select any modules you wish to exclude from your whatsnew box.'); |