Latest SANDPIT - MERGE from CVS (MERGE-GIT)

This commit is contained in:
Deon George
2009-07-01 16:09:17 +10:00
parent 388783fc84
commit ea17aadef4
210 changed files with 37284 additions and 52716 deletions

View File

@@ -1,29 +1,29 @@
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/purge_cache.php,v 1.9.2.2 2008/12/12 12:20:22 wurley Exp $
// $Header$
/**
* Purge our session cache details
*
* @package phpLDAPadmin
* @subpackage Page
*/
/**
*/
require './common.php';
if (! $_SESSION[APPCONFIG]->isCommandAvailable('purge'))
error(sprintf('%s%s %s',_('This operation is not permitted by the configuration'),_(':'),_('purge')),'error','index.php');
$purge_session_keys = array('cache');
$purge_session_keys = array('app_initialized','backtrace','cache',APPCONFIG);
$size = 0;
foreach ($purge_session_keys as $key) {
foreach ($purge_session_keys as $key)
if (isset($_SESSION[$key])) {
$size += strlen(serialize($_SESSION[$key]));
unset($_SESSION[$key]);
}
}
if (! $size)
$body = _('No cache to purge.');
$body = _('No cache to purge.');
else
$body = sprintf(_('Purged %s bytes of cache.'),number_format($size));
@@ -31,5 +31,5 @@ system_message(array(
'title'=>_('Purge cache'),
'body'=>$body,
'type'=>'info'),
'index.php');
get_request('meth','REQUEST') == 'ajax' ? null : 'index.php');
?>