From 87c3fc0fbd7b700bf64c6be2fa11f2367c2d3d1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 5 Apr 2009 07:45:09 +0000 Subject: [PATCH] Renamed to match with latest core --- .gitattributes | 4 +-- .../de/image/{base_code.itp => base_code.xml} | 0 .../{code_captcha.itp => code_captcha.xml} | 0 index.php | 25 +++++++++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) rename application/install/templates/images/de/image/{base_code.itp => base_code.xml} (100%) rename application/install/templates/images/de/image/{code_captcha.itp => code_captcha.xml} (100%) diff --git a/.gitattributes b/.gitattributes index 798f8c8..c385d67 100644 --- a/.gitattributes +++ b/.gitattributes @@ -47,8 +47,8 @@ application/install/templates/images/.htaccess -text application/install/templates/images/_cache/.htaccess -text application/install/templates/images/de/.htaccess -text application/install/templates/images/de/image/.htaccess -text -application/install/templates/images/de/image/base_code.itp -text -application/install/templates/images/de/image/code_captcha.itp -text +application/install/templates/images/de/image/base_code.xml -text +application/install/templates/images/de/image/code_captcha.xml -text /clear-cache.sh -text db/.htaccess -text docs/COPYING -text diff --git a/application/install/templates/images/de/image/base_code.itp b/application/install/templates/images/de/image/base_code.xml similarity index 100% rename from application/install/templates/images/de/image/base_code.itp rename to application/install/templates/images/de/image/base_code.xml diff --git a/application/install/templates/images/de/image/code_captcha.itp b/application/install/templates/images/de/image/code_captcha.xml similarity index 100% rename from application/install/templates/images/de/image/code_captcha.itp rename to application/install/templates/images/de/image/code_captcha.xml diff --git a/index.php b/index.php index ec90803..3945af9 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,12 @@ define('DEVELOPER', true); * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ApplicationEntryPoint { +final class ApplicationEntryPoint { + /** + * Core path + */ + private static $corePath = ''; + /** * The instances we want to remove after all is done * @@ -155,6 +160,22 @@ class ApplicationEntryPoint { } } + /** + * Determines the correct absolute path for all include + * + * @return $basePath Base path (core) for all includes + */ + protected static function detectCorePath () { + // Is it not set? + if (empty(self::$corePath)) { + // Auto-detect our core path + self::$corePath = str_replace("\\", '/', dirname(__FILE__)); + } // END - if + + // Return it + return self::$corePath; + } + /** * The application's main entry point. This class isolates some local * variables which shall not become visible to outside because of security @@ -165,7 +186,7 @@ class ApplicationEntryPoint { */ public static function main () { // Load config file - require(dirname(__FILE__) . '/inc/config.php'); + require(self::detectCorePath() . '/inc/config.php'); // Load all include files require($cfg->readConfig('base_path') . 'inc/includes.php'); -- 2.39.5