From b8029fe2de88c04ea2c76d1de0f6334065021979 Mon Sep 17 00:00:00 2001 From: Marius Orcsik Date: Sat, 15 Nov 2008 17:50:33 +0100 Subject: [PATCH] * added some stricter path setting for helpers --- _res/_libs/tshelperabstract.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/_res/_libs/tshelperabstract.class.php b/_res/_libs/tshelperabstract.class.php index 572e3b0..74d9d74 100644 --- a/_res/_libs/tshelperabstract.class.php +++ b/_res/_libs/tshelperabstract.class.php @@ -12,9 +12,10 @@ class tsHelperAbstract { protected $content, - $path, $template; + private $path; + /** * receives the template object */ @@ -27,7 +28,7 @@ class tsHelperAbstract { */ public function setPath ($incStr) { if (is_string ($incStr)) { - $path = real_path ($incStr); + $path = realpath ($incStr); if (is_file ($path)) { $this->path = $path; return true; @@ -37,7 +38,10 @@ class tsHelperAbstract { } public function build () { - return $this->template->fetch ($this->path); + if (!empty ($this->path)) + return $this->template->fetch ($this->path); + else + return ''; } } -- 2.11.4.GIT