[Cs-content-commits] SF.net SVN: cs-content:[405] trunk/1.0/cs_siteConfig.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-07-15 14:54:46
|
Revision: 405 http://cs-content.svn.sourceforge.net/cs-content/?rev=405&view=rev Author: crazedsanity Date: 2009-07-15 14:54:41 +0000 (Wed, 15 Jul 2009) Log Message: ----------- Var for the name of the configuration file itself in site config. /cs_siteConfig.class.php: * MAIN::: -- new private var, $configFile * __construct(): -- set internal configFile as $configFileLocation. * build_special_vars(): -- set special var for "_CONFIGFILE_" (points to the location of the configuration file, within which this directive is placed). -- another name for _CONFIGFILE_ is _THISFILE_ Modified Paths: -------------- trunk/1.0/cs_siteConfig.class.php Modified: trunk/1.0/cs_siteConfig.class.php =================================================================== --- trunk/1.0/cs_siteConfig.class.php 2009-07-06 19:49:55 UTC (rev 404) +++ trunk/1.0/cs_siteConfig.class.php 2009-07-15 14:54:41 UTC (rev 405) @@ -42,6 +42,9 @@ /** Directory for the config file. */ private $configDirname; + /** Location of the configuration file itself. */ + private $configFile; + /** Active section of the full site configuration. */ private $activeSection; @@ -84,6 +87,7 @@ if(strlen($configFileLocation) && file_exists($configFileLocation)) { $this->configDirname = dirname($configFileLocation); + $this->configFile = $configFileLocation; $this->fs = new cs_fileSystem($this->configDirname); $this->xmlReader = new cs_phpxmlParser($this->fs->read($configFileLocation)); @@ -370,6 +374,8 @@ $specialVars = array( '_DIRNAMEOFFILE_' => $this->configDirname, + '_CONFIGFILE_' => $this->configFile, + '_THISFILE_' => $this->configFile, '_APPURL_' => $appUrl ); return($specialVars); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |