Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 2:55 AM

in-portal

Index: trunk/admin/category/category_maint.php
===================================================================
--- trunk/admin/category/category_maint.php (revision 590)
+++ trunk/admin/category/category_maint.php (revision 591)
@@ -1,125 +1,123 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
if(!defined('CACHE_PERM_CHUNK_SIZE'))define('CACHE_PERM_CHUNK_SIZE',30);
if(!strlen($pathtoroot))
{
$path = dirname(realpath(__FILE__));
if( strlen($path) )
{
// determine the OS type for path parsing
$pos = strpos($path, ':');
$gOS_TYPE = ($pos === false) ? 'unix' : 'win';
$pathchar = ($gOS_TYPE == 'unix') ? '/' : "\\";
$p = $path.$pathchar;
// Start looking for the root flag file
while( !strlen($pathtoroot) && strlen($p) )
{
$sub = substr($p, strlen($pathchar) * -1);
$filename = $p.( ($sub == $pathchar) ? '' : $pathchar).'root.flg';
if( !file_exists($filename) )
{
$parent = realpath($p.$pathchar."..".$pathchar);
$p = ($parent != $p) ? $parent : '';
}
else
$pathtoroot = $p;
}
if( !strlen($pathtoroot) ) $pathtoroot = '.'.$pathchar;
}
else
$pathtoroot = '.'.$pathchar;
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if( $sub != $pathchar) $pathtoroot = $pathtoroot.$pathchar;
//echo $pathtoroot;
//$FrontEnd=2;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
$pathtolocal = $pathtoroot."in-news/";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:category_maint";
require_once($pathtoroot.$admin."/category/permcacheupdate.php");
if(!$objSession->GetVariable('PermCache_UpdateRequired'))
die(header('Location: '.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv()));
if (isset($_GET['continue'])) {
$updater =& new clsCacheUpdater(1);
}
else {
$updater =& new clsCacheUpdater();
}
$title = prompt_language("la_prompt_updating")." ".prompt_language("la_Text_Categories");
$title .= " $CatIndex / $NumCats ".prompt_language("la_Text_complete");
int_header(NULL,NULL,$title);
flush();
$percent=$updater->getDonePercent();
echo '<TABLE cellspacing="0" cellpadding="2" width="100%" border="0" class="tableborder">';
if ($percent == 0)
echo '<TR><TD BGCOLOR="#FFFFFF" width="100%" >'.$percent.'%</td></TR>';
else if ($percent < 60)
echo '<TR><TD BGCOLOR="#4682B2" width="'.$percent.'%"></td><TD BGCOLOR="#FFFFFF" width="'.(100-$percent).'%">'.$percent.'%</td></TR>';
else if ($percent == 100)
echo '<TR><TD BGCOLOR="#4682B2" align="right" width="100%"><FONT COLOR="#FFFFFF">'.$percent.'%</FONT></td>';
else
echo '<TR><TD BGCOLOR="#4682B2" align="right" width="'.$percent.'%"><FONT COLOR="#FFFFFF">'.$percent.'%</FONT></td><TD BGCOLOR="#FFFFFF" width="'.(100-$percent).'%"></td></TR>';
echo '</TABLE>';
flush();
$needs_more = TRUE;
while ($needs_more && $updater->iteration < CACHE_PERM_CHUNK_SIZE) {
$needs_more = $updater->DoTheJob();
}
-/*print_pre($updater);
-echo '<a href="'.$adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv().'">go</a>';
-exit;*/
+
if ($needs_more)
{
$updater->setData();
$url=$adminURL.'/category/category_maint.php?env='.BuildEnv().'&continue=1';
}
else
{
$updater->clearData();
$url = $adminURL.'/'.$objSession->GetVariable('ReturnScript').'?env='.BuildEnv();
$objSession->SetVariable('PermCache_UpdateRequired', 0);
}
print "<script language=\"javascript\">" ;
print "setTimeout(\"document.location='$url';\",40);";
print " </script>";
int_footer();
exit;
?>
Property changes on: trunk/admin/category/category_maint.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.12
\ No newline at end of property
+1.13
\ No newline at end of property

Event Timeline