Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Jul 20, 9:04 AM

in-portal

Index: branches/RC/tools/show_cache.php
===================================================================
--- branches/RC/tools/show_cache.php (revision 11040)
+++ branches/RC/tools/show_cache.php (revision 11041)
@@ -1,54 +1,54 @@
<?php
// comment line below for debugging parsed configs
-//die('Restrictred use!');
+die('Restrictred use!');
$start = getmicrotime();
define('FULL_PATH', realpath(dirname(__FILE__).'/..'));
define('REL_PATH', 'tools/');
define('ADMIN', 0);
include_once(FULL_PATH.'/core/kernel/startup.php');
$application =& kApplication::Instance();
$application->Init();
$show_var = $application->GetVar('show_var');
if ($show_var) {
$sql = 'SELECT Data
FROM ' . TABLE_PREFIX . 'Cache
WHERE VarName = "' . $show_var . '"';
$var_data = $application->Conn->GetOne($sql);
if ($var_data === false) {
echo 'Not Found';
}
else {
print_pre( unserialize($var_data), 'Cache "' . $show_var . '" content:', true);
}
}
else {
$sql = 'SELECT VarName
FROM ' . TABLE_PREFIX . 'Cache';
$var_names = $application->Conn->GetCol($sql);
foreach ($var_names as $index => $var_name) {
$var_names[$index] = '<a href="' . $application->BaseURL() . REL_PATH. 'show_cache.php?show_var=' . $var_name . '">' . $var_name . '</a>';
}
print_pre( $var_names, 'Cache variable names:', true);
}
$application->Done();
$end = getmicrotime();
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
\ No newline at end of file
Property changes on: branches/RC/tools/show_cache.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property

Event Timeline