Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1173432
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Oct 1, 4:06 AM
Size
4 KB
Mime Type
text/x-diff
Expires
Fri, Oct 3, 4:06 AM (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
760629
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/index.php
===================================================================
--- trunk/index.php (revision 652)
+++ trunk/index.php (revision 653)
@@ -1,129 +1,129 @@
<?php
if( file_exists('debug.php') ) include_once('debug.php');
if( defined('DEBUG_MODE') )
{
ini_set('error_prepend_string','<span class="debug_text">');
//ini_set('error_prepend_string','<script>function _(){alert(1);s="";var d=document.getElementById("dbg");for(var i=0;i<d.length;i++)s+=d[i].innerText;if(s!="")alert(s)} document.onload=_</script><span id=dbg style="display:none">');
ini_set('error_append_string','</span>');
}
else
error_reporting(0);
list($usec, $sec) = explode(" ",microtime());
$timestart = (float)$usec + (float)$sec;
$pathtoroot = "./";
$pathtoroot = realpath($pathtoroot)."/";
if (!file_exists($pathtoroot."config.php")) {
echo "In-Portal is probably not installed, or configuration file is missing.<br>";
echo "Please use the installation script to fix the problem.<br><br>";
echo "<a href='admin/install.php'>Go to installation script</a><br><br>";
flush();
die();
}
ob_start();
$FrontEnd=1;
$indexURL="../../index.php"; //Set to relative URL from the theme directory
/* initalize the in-portal system */
include_once("kernel/startup.php");
LogEntry("System Init Complete\n");
/* load the current front-end language set */
//$objLanguageCache->LoadLanguage($objSession->Get("Language"),0);
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
//$secureURL = "https://".ThisDomain().$objConfig->Get("Site_Path");
$secureURL = $rootURL;
$html="<HTML>No Template</HTML>";
if( !$var_list['t'] ) $var_list['t'] = 'index';
if( !isset($CurrentTheme) ) $CurrentTheme = null;
if( !is_object($CurrentTheme) ) $CurrentTheme = $objThemes->GetItem($m_var_list["theme"]);
if(is_object($CurrentTheme))
{
if(!$CurrentTheme->Get("Enabled"))
{
$CurrentTheme = $objThemes->GetItem($objThemes->GetPrimaryTheme());
}
if((int)$CurrentTheme->Get("ThemeId")>0)
{
$timeout = $CurrentTheme->Get("CacheTimeout");
$objLanguageCache->LoadTemplateCache($var_list["t"],$timeout,$CurrentTheme->Get("ThemeId"));
$objLanguageCache->LoadCachedVars($objSession->Get("Language"));
LogEntry("Language Set Loaded\n");
$TemplateRoot = $CurrentTheme->ThemeDirectory()."/";
// echo "Template Root: $TemplateRoot<br>\n";
LogEntry("Parsing Templates in $TemplateRoot\n");
$objTemplate = new clsTemplateList($TemplateRoot);
$html = $objTemplate->ParseTemplate($var_list["t"]);
}
else
{
echo "No Primary Theme Selected";
die();
}
}
else
{
echo "No Primary Theme Selected\n";
die();
}
if(is_object($objSession))
{
$objSession->SetVariable("Template_Referer", $_local_t);
}
if($objTemplate->ErrorNo == -1)
{
$html = $objTemplate->ParseTemplate("error_template");
}
//$html = replacePngTags($html);
LogEntry("Output Start\n");
$html .= "<!-- Page Execution Time: ".( isset($ptime) ? $ptime : 0 )." -->";
-header("Content-length: ".strlen($html));
+if(!IsDebugMode()) header("Content-length: ".strlen($html));
header("Connection-Type: Keep-Alive");
echo $html;
LogEntry("Output End\n");
if( isset($template) && $template->ErrorNo != 0 )
{
print "\n(".$objTemplate->ErrorNo.") ".$objTemplate->ErrorStr."\n";
}
LogEntry("Output Complete\n");
$objLanguageCache->SaveTemplateCache();
LogEntry("Templates Cached\n");
//if($objSession->SessionEnabled())
// $objSession->SaveSessionData();
//echo "Cookie: <PRE>"; print_r($_COOKIE); echo "</PRE><br>\n";
ob_end_flush();
$timeend = getmicrotime();
$diff = $timeend - $timestart;
LogEntry("\nTotal Queries Executed: $sqlcount in $totalsql seconds\n");
LogEntry("\nPage Execution Time: $diff seconds\n", true);
if($LogFile)
fclose($LogFile);
?>
Property changes on: trunk/index.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Event Timeline
Log In to Comment