Merge pull request #614 from julceslauhub/master

Add validation in class serverConfiguration
This commit is contained in:
julceslauhub
2012-09-26 14:10:27 -07:00
2 changed files with 15 additions and 6 deletions

View File

@@ -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 () );
}
}
/**