From 663acbe47ed4190e5f30433d314c280deb29cab7 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 11 Sep 2013 19:27:46 +0000 Subject: [PATCH] Fixup PEAR file include, and ROOT_PATH (again) --- include/class.osticket.php | 5 +++-- include/class.yaml.php | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/class.osticket.php b/include/class.osticket.php index cca754b4e..f23dc824c 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -18,7 +18,6 @@ vim: expandtab sw=4 ts=4 sts=4: **********************************************************************/ -require_once(INCLUDE_DIR.'class.config.php'); //Config helper require_once(INCLUDE_DIR.'class.csrf.php'); //CSRF token class. require_once(INCLUDE_DIR.'class.migrater.php'); @@ -49,6 +48,8 @@ class osTicket { function osTicket() { + require_once(INCLUDE_DIR.'class.config.php'); //Config helper + $this->session = osTicketSession::start(SESSION_TTL); // start DB based session $this->config = new OsticketConfig(); @@ -387,7 +388,7 @@ class osTicket { // Not chrooted if(strpos($dir, $root)!==false) - return substr($dir, strlen($dir)); + return substr($dir, strlen($root)); // Chrooted ? $path = ''; diff --git a/include/class.yaml.php b/include/class.yaml.php index d21605ca0..fc340d70a 100644 --- a/include/class.yaml.php +++ b/include/class.yaml.php @@ -23,6 +23,7 @@ **********************************************************************/ require_once "Spyc.php"; +require_once "class.error.php"; class YamlDataParser { /* static */ -- GitLab