Latest SANDPIT - MERGE from CVS (MERGE-GIT)
This commit is contained in:
@@ -1,33 +1,42 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/show_cache.php,v 1.3.2.3 2008/12/12 12:20:22 wurley Exp $
|
||||
// $Header$
|
||||
|
||||
/**
|
||||
* This script shows the contents of the cache for debugging purposes
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
* @subpackage Page
|
||||
*/
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
require './common.php';
|
||||
|
||||
$entry = array();
|
||||
$entry['key'] = get_request('key','REQUEST');
|
||||
$entry['index'] = get_request('index','REQUEST');
|
||||
$request = array();
|
||||
$request['key'] = get_request('key','REQUEST');
|
||||
$request['index'] = get_request('index','REQUEST');
|
||||
|
||||
if (isset($entry['index']) && isset($entry['key'])) {
|
||||
list($entry['server'],$entry['x']) = split(':',$entry['index']);
|
||||
debug_dump($_SESSION[$entry['key']][$entry['server']][$entry['x']],1);
|
||||
if (get_request('global','REQUEST'))
|
||||
$request['dumpvar'] = &$GLOBALS;
|
||||
else
|
||||
$request['dumpvar'] = &$_SESSION;
|
||||
|
||||
if (isset($request['index']) && isset($request['key'])) {
|
||||
list($request['server'],$request['x']) = explode(':',$request['index']);
|
||||
debug_dump($request['dumpvar'][$request['key']][$request['server']][$request['x']],1);
|
||||
}
|
||||
if ($entry['key'])
|
||||
debug_dump($_SESSION[$entry['key']],1);
|
||||
|
||||
if (! $_SESSION[APPCONFIG]->GetValue('appearance','hide_debug_info')) {
|
||||
if ($request['key'])
|
||||
debug_dump($request['dumpvar'][$request['key']],1);
|
||||
|
||||
if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_debug_info')) {
|
||||
echo '<div style="font-size: 11px"><ul>';
|
||||
foreach (array_keys($_SESSION) as $key) {
|
||||
if (($key == 'cache') && is_array($_SESSION[$key]))
|
||||
foreach (array_keys($_SESSION['cache']) as $server) {
|
||||
foreach (array_keys($_SESSION['cache'][$server]) as $x) {
|
||||
|
||||
foreach (array_keys($request['dumpvar']) as $key) {
|
||||
if ((in_array($key,array('cache'))) && is_array($request['dumpvar'][$key]))
|
||||
foreach (array_keys($request['dumpvar'][$key]) as $server) {
|
||||
foreach (array_keys($request['dumpvar'][$key][$server]) as $x) {
|
||||
$index = sprintf('%s:%s',$server,$x);
|
||||
|
||||
printf('<li><span id="%s"><a href="javascript:get(\'%s\',\'%s\');">%s</a></span><div id="%sloading" style="display: none" ></div></li>',
|
||||
@@ -35,7 +44,7 @@ if (! $_SESSION[APPCONFIG]->GetValue('appearance','hide_debug_info')) {
|
||||
}
|
||||
}
|
||||
else
|
||||
printf('<li><span id="%s"><a href="javascript:get(\'%s\', \'\');">%s</a></span><div id="%sloading" style="display: none" ></div></li>',
|
||||
printf('<li><span id="%s"><a href="javascript:get(\'%s\',\'\');">%s</a></span><div id="%sloading" style="display: none" ></div></li>',
|
||||
$key,$key,$key,$key);
|
||||
}
|
||||
echo '</ul></div>';
|
||||
@@ -81,7 +90,10 @@ if (! $_SESSION[APPCONFIG]->GetValue('appearance','hide_debug_info')) {
|
||||
poststr += "&index=" + encodeURI(xx);
|
||||
}
|
||||
|
||||
obj.innerHTML = '<img src="<?php echo IMGDIR ?>/ajax-spinner.gif" /> Loading...';
|
||||
<?php if (get_request('global','REQUEST')) { ?>
|
||||
poststr += "&global=on" + encodeURI(xx);
|
||||
<?php } ?>
|
||||
obj.innerHTML = '<img src="<?php echo IMGDIR ?>/ajax-spinner.gif" /> <?php echo _('Loading') ?>...';
|
||||
makePOSTRequest('cmd.php',poststr,'alertCacheContents','cancelCacheContents');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user