[Cs-content-commits] SF.net SVN: cs-content:[465] trunk/1.0/contentSystem.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-10-20 23:33:11
|
Revision: 465 http://cs-content.svn.sourceforge.net/cs-content/?rev=465&view=rev Author: crazedsanity Date: 2009-10-20 23:32:57 +0000 (Tue, 20 Oct 2009) Log Message: ----------- Add fullSectionArr to show the URL with file extensions, etc. /contentSystem.class.php: * MAIN::: -- new (protected) var $fullSectionArr=array() * __construct(): -- build internal fullSectionArr just like sectionArr, but prior to any cleaning. May be different than sectionArr if APPURL is set. * finish(): -- create $fullSectionArr as a local variable for include scripts. Modified Paths: -------------- trunk/1.0/contentSystem.class.php Modified: trunk/1.0/contentSystem.class.php =================================================================== --- trunk/1.0/contentSystem.class.php 2009-09-23 14:46:10 UTC (rev 464) +++ trunk/1.0/contentSystem.class.php 2009-10-20 23:32:57 UTC (rev 465) @@ -69,6 +69,7 @@ protected $baseDir = NULL; //base directory for templates & includes. protected $section = NULL; //section string, derived from the URL. protected $sectionArr = array(); //array of items, for figuring out where templates & includes are. + protected $fullsectionArr = array(); protected $tmplFs = NULL; //Object used to access the TEMPLATES filesystem @@ -106,6 +107,7 @@ $_SERVER['REQUEST_URI'] = ereg_replace('^/', "", $_SERVER['REQUEST_URI']); //figure out the section & subsection stuff. + $this->fullSectionArr = split('/', $_SERVER['REQUEST_URI']); //TODO: will this cope with an APPURL being set? $this->section = $this->clean_url($_SERVER['REQUEST_URI']); $this->initialize_locals($siteRoot); @@ -796,6 +798,7 @@ //make the "final section" available to scripts. $finalSection = $this->finalSection; $sectionArr = $this->sectionArr; + $fullSectionArr = $this->fullSectionArr; array_unshift($sectionArr, $this->baseDir); $finalURL = $this->gfObj->string_from_array($sectionArr, NULL, '/'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |