From ed38f4d805041ce48c91d95ed1b65260086f9126 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Tue, 17 Dec 2013 08:30:58 +0200 Subject: [PATCH] better application path detection --- ipf/application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipf/application.php b/ipf/application.php index c5e8ad5..037f86d 100644 --- a/ipf/application.php +++ b/ipf/application.php @@ -9,8 +9,8 @@ abstract class IPF_Application { $this->name = str_replace('_App', '', get_class($this)); - $root = (strpos($this->name,'IPF_') === 0) ? IPF::get('ipf_path') : IPF::get('project_path'); - $this->path = $root.DIRECTORY_SEPARATOR.strtolower(str_replace('_',DIRECTORY_SEPARATOR,$this->name)).DIRECTORY_SEPARATOR; + $rc = new ReflectionClass($this); + $this->path = dirname($rc->getFileName()).DIRECTORY_SEPARATOR; $models = array(); try { -- 2.49.0