From 5277cb78f8a0f29d6b77f12c3d09fe62db150f20 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 13 Jan 2006 04:22:18 +0000 Subject: [PATCH] Say goodbye to manual setting of sourcepath --- dev/conditionaltest.php | 1 - dev/xmltest.php | 1 - kernel.php | 4 ++++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/conditionaltest.php b/dev/conditionaltest.php index 8c49e5d..4c1331a 100644 --- a/dev/conditionaltest.php +++ b/dev/conditionaltest.php @@ -10,7 +10,6 @@ require_once('../kernel.php'); $isso = new Shared_Object_Framework(); $isso->set('apppath', getcwd()); -$isso->set('sourcepath', $isso->get('apppath') . '../'); $isso->set('application', 'Template Test'); $isso->set('appversion', '$Id$'); $isso->set('debug', true); diff --git a/dev/xmltest.php b/dev/xmltest.php index a637e44..bc9e128 100644 --- a/dev/xmltest.php +++ b/dev/xmltest.php @@ -7,7 +7,6 @@ require_once('../kernel.php'); $isso = new Shared_Object_Framework(); $isso->set('apppath', getcwd()); -$isso->set('sourcepath', $isso->get('apppath') . '../'); $isso->set('application', 'XML Test'); $isso->set('appversion', '$Id$'); $isso->set('debug', true); diff --git a/kernel.php b/kernel.php index 88a133e..9be97ae 100644 --- a/kernel.php +++ b/kernel.php @@ -260,6 +260,10 @@ class Shared_Object_Framework $this->magicquotes = get_magic_quotes_gpc(); set_magic_quotes_runtime(0); + // attempt to set the sourcepath + $path = debug_backtrace(); + $this->set('sourcepath', str_replace('kernel.php', '', $path[0]['file'])); + // start input sanitize using variable_order GPC if (!defined('ISSO_NO_INPUT_SANITIZE')) { -- 2.22.5