[Cs-content-commits] SF.net SVN: cs-content:[468] trunk/1.0/contentSystem.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-10-23 14:58:31
|
Revision: 468
http://cs-content.svn.sourceforge.net/cs-content/?rev=468&view=rev
Author: crazedsanity
Date: 2009-10-23 14:58:22 +0000 (Fri, 23 Oct 2009)
Log Message:
-----------
Set "PHP_SELF" template var as expected (previously, it was only a partial).
NOTE::: see issue #306 for more details.
/contentSystem.class.php:
* initialize_locals():
-- commented-out "PHP_SELF" template var, with note that it is now
set in finish().
* finish():
-- set PHP_SELF template var to be the URL form of $sectionArr.
Modified Paths:
--------------
trunk/1.0/contentSystem.class.php
Modified: trunk/1.0/contentSystem.class.php
===================================================================
--- trunk/1.0/contentSystem.class.php 2009-10-21 16:30:53 UTC (rev 467)
+++ trunk/1.0/contentSystem.class.php 2009-10-23 14:58:22 UTC (rev 468)
@@ -152,7 +152,7 @@
'curMonth' => date("m"),
'timezone' => date("T"),
'DOMAIN' => $_SERVER['SERVER_NAME'],
- 'PHP_SELF' => $_SERVER['SCRIPT_NAME'],
+ //'PHP_SELF' => $_SERVER['SCRIPT_NAME'], // --> set in finish().
'REQUEST_URI' => $_SERVER['REQUEST_URI'],
'FULL_URL' => $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'],
'error_msg' => ""
@@ -804,6 +804,7 @@
$fullSectionArr = $this->fullSectionArr;
array_unshift($sectionArr, $this->baseDir);
$finalURL = $this->gfObj->string_from_array($sectionArr, NULL, '/');
+ $this->templateObj->add_template_var('PHP_SELF', '/'. $this->gfObj->string_from_array($sectionArr, NULL, '/'));
$page = $this->templateObj;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|