[Cs-content-commits] SF.net SVN: cs-content:[471] trunk/1.0/contentSystem.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2010-03-01 14:44:11
|
Revision: 471
http://cs-content.svn.sourceforge.net/cs-content/?rev=471&view=rev
Author: crazedsanity
Date: 2010-03-01 14:44:04 +0000 (Mon, 01 Mar 2010)
Log Message:
-----------
Fix issue #318
/contentSystem.class.php:
* initialize_locals():
-- strip trailing "/" from DOCUMENT_ROOT (issue #318)
Modified Paths:
--------------
trunk/1.0/contentSystem.class.php
Modified: trunk/1.0/contentSystem.class.php
===================================================================
--- trunk/1.0/contentSystem.class.php 2009-11-11 01:06:10 UTC (rev 470)
+++ trunk/1.0/contentSystem.class.php 2010-03-01 14:44:04 UTC (rev 471)
@@ -132,7 +132,8 @@
//build the templating engine: this may cause an immediate redirect, if they need to be logged-in.
//TODO: find a way to define this on a per-page basis. Possibly have templateObj->check_login()
// run during the "finish" stage... probably using GenericPage{}->check_login().
- $root = preg_replace('/\/public_html$/', '', $_SERVER['DOCUMENT_ROOT']);
+ $root = preg_replace('/\/$/', '', $_SERVER['DOCUMENT_ROOT']);
+ $root = preg_replace('/\/public_html$/', '', $root);
$root = preg_replace('/\/html/', '', $root);
if(!is_null($siteRoot) && is_dir($siteRoot)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|