From bde5482461b316ab8aa55dfce1935d8f134c154e Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Wed, 26 Sep 2012 17:00:40 -0400 Subject: [PATCH] Add validation in class serverConfiguration --- workflow/engine/classes/class.serverConfiguration.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workflow/engine/classes/class.serverConfiguration.php b/workflow/engine/classes/class.serverConfiguration.php index f02787a50..d1e2a2926 100755 --- a/workflow/engine/classes/class.serverConfiguration.php +++ b/workflow/engine/classes/class.serverConfiguration.php @@ -55,10 +55,13 @@ class serverConf { private $lanLanguage; public $workspaces = array(); public $rtlLang = array('ar','iw','fa'); + public $filePath = ''; public function __construct() { - $this->filePath = PATH_DATA . 'srvConf.singleton'; + if (defined('PATH_DATA')) { + $this->filePath = PATH_DATA . 'srvConf.singleton'; + } } /** @@ -107,8 +110,10 @@ class serverConf { */ function saveSingleton() { - $this->filePath = PATH_DATA . 'srvConf.singleton'; - $size = file_put_contents ( $this->filePath, $this->serializeInstance () ); + if (defined('PATH_DATA')) { + $this->filePath = PATH_DATA . 'srvConf.singleton'; + $size = file_put_contents ( $this->filePath, $this->serializeInstance () ); + } } /**