diff --git a/php/clonos.php b/php/clonos.php index 6235dd35..729c3478 100644 --- a/php/clonos.php +++ b/php/clonos.php @@ -94,8 +94,9 @@ class ClonOS { //echo $this->realpath_page; }else if($_SERVER['REQUEST_URI']){ //$this->realpath_page=$this->realpath_public.'pages/'.trim($_SERVER['REQUEST_URI'],'/').'/'; - if(isset($this->uri_chunks[0])) + if(isset($this->uri_chunks[0])){ $this->realpath_page=$this->realpath_public.'pages/'.$this->uri_chunks[0].'/'; + } } if(isset($this->_vars['hash'])) $this->url_hash=preg_replace('/^#/','',$this->_vars['hash']); diff --git a/php/locale.php b/php/locale.php index cbaabcc4..cc6bca2f 100644 --- a/php/locale.php +++ b/php/locale.php @@ -2,8 +2,8 @@ class Locale { - public $language='en'; - public $translate_arr=array(); + private $language='en'; + private $translate_arr=array(); function __construct($realpath_public) { @@ -18,14 +18,8 @@ class Locale return $this->language; } - public function get_available_languages() - { - return Config::$languages; - } - public function translate($phrase) { - if(isset($this->translate_arr[$phrase])) return $this->translate_arr[$phrase]; - return $phrase; + return (isset($this->translate_arr[$phrase])) ? $this->translate_arr[$phrase] : $phrase; } } \ No newline at end of file diff --git a/public/index.php b/public/index.php index 8e6f111f..46a309da 100644 --- a/public/index.php +++ b/public/index.php @@ -165,8 +165,7 @@ echo $menu->html;