Add validation in class serverConfiguration
This commit is contained in:
@@ -55,11 +55,14 @@ class serverConf {
|
||||
private $lanLanguage;
|
||||
public $workspaces = array();
|
||||
public $rtlLang = array('ar','iw','fa');
|
||||
public $filePath = '';
|
||||
|
||||
|
||||
public function __construct() {
|
||||
if (defined('PATH_DATA')) {
|
||||
$this->filePath = PATH_DATA . 'srvConf.singleton';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is instancing to this object
|
||||
@@ -107,9 +110,11 @@ class serverConf {
|
||||
*/
|
||||
|
||||
function saveSingleton() {
|
||||
if (defined('PATH_DATA')) {
|
||||
$this->filePath = PATH_DATA . 'srvConf.singleton';
|
||||
$size = file_put_contents ( $this->filePath, $this->serializeInstance () );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* With this is possible to save a property that will be saved in the properties
|
||||
|
||||
Reference in New Issue
Block a user