[Cs-content-commits] SF.net SVN: cs-content:[384] trunk/1.0/contentSystem.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-05-28 14:23:08
|
Revision: 384
http://cs-content.svn.sourceforge.net/cs-content/?rev=384&view=rev
Author: crazedsanity
Date: 2009-05-28 13:56:42 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Revert changes from previous commit: they're broken and based on released code which is vastly different than trunk...
Modified Paths:
--------------
trunk/1.0/contentSystem.class.php
Modified: trunk/1.0/contentSystem.class.php
===================================================================
--- trunk/1.0/contentSystem.class.php 2009-05-28 04:19:30 UTC (rev 383)
+++ trunk/1.0/contentSystem.class.php 2009-05-28 13:56:42 UTC (rev 384)
@@ -378,17 +378,6 @@
* Retrieves the list of templates & includes in preparation for later work.
*/
private function prepare() {
-
- //Set the final section...
- if(count($this->sectionArr)) {
- $mySectionArr = $this->sectionArr;
- $this->finalSection = array_pop($mySectionArr);
- }
- else {
- throw new exception(__METHOD__ .": FATAL - section array is empty");
- }
-
-
//attempt to load any includes...
$this->load_includes();
$foundIncludes = count($this->includesList);
@@ -443,24 +432,8 @@
$reasonText = "page template";
}
else {
- //if the baseDir is "help", this would try to use "/help/index.content.tmpl"
- $myFile = $this->baseDir .'/index.content.tmpl';
- $sectionLsData = $this->fileSystemObj->ls($myFile);
-
- //if the baseDir is "help", this would try to use "/help.content.tmpl"
- $sectionFile = $this->baseDir .'.content.tmpl';
- $lsData = $this->fileSystemObj->ls();
-
- if(isset($lsData[$sectionFile]) && is_array($lsData[$sectionFile])) {
- $valid = TRUE;
- }
- elseif(isset($sectionLsData[$myFile]) && $sectionLsData[$myFile]['type'] == 'file') {
- //we're good.
- $valid = TRUE;
- }
- else {
- $this->reason = __METHOD__ .": couldn't find base template.";
- }
+ $this->finalSection = $this->baseDir;
+ $reasonText = "base template";
}
$tmplFile1 = $this->section .".content.tmpl";
@@ -667,10 +640,6 @@
$this->load_dir_includes($this->baseDir);
//okay, now loop through $this->sectionArr & see if we can include anything else.
- $addIndex=false;
- if($this->finalSection == 'index') {
- $addIndex = true;
- }
if(($this->incFs->cd($this->baseDir)) && is_array($this->sectionArr) && count($this->sectionArr) > 0) {
@@ -689,9 +658,6 @@
//attempt to cd() into the next directory, or die if we can't.
if(!$this->incFs->cd($mySection)) {
//no dice. Break the loop.
- if($this->finalSection == 'index') {
- $addIndex = true;
- }
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|