@@ -92,7 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | if (false === ($handler = self::parseString($route['handler'], REGEX_MAP_ITEM_HANDLER))) return; |
| 94 | 94 | |
| 95 | - self::$routes['/' . implode('/', $path)] = ('Addons\\' . $name . '\\' . implode('\\', $handler)); |
|
| 95 | + self::$routes['/'.implode('/', $path)] = ('Addons\\'.$name.'\\'.implode('\\', $handler)); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public static function get(string $name) : Schema\_Object { |
| 21 | 21 | |
| 22 | - $class_name = ('Schemas\\' . $name); |
|
| 22 | + $class_name = ('Schemas\\'.$name); |
|
| 23 | 23 | |
| 24 | 24 | if (!isset(self::$cache[$class_name])) self::$cache[$class_name] = new $class_name; |
| 25 | 25 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | if (false === ($path = Extend\Templates::get('path'))) throw new Exception\View; |
| 34 | 34 | |
| 35 | - if (!isset(self::$cache[$file_name = ($path . $name . '.ctp')])) { |
|
| 35 | + if (!isset(self::$cache[$file_name = ($path.$name.'.ctp')])) { |
|
| 36 | 36 | |
| 37 | 37 | if (false === ($contents = Explorer::getContents($file_name))) throw new Exception\ViewFile($file_name); |
| 38 | 38 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | if (null === self::$dataset) self::init(); |
| 62 | 62 | |
| 63 | - return ((self::get('robots_index') ? 'INDEX' : 'NOINDEX') . ',' . (self::get('robots_follow') ? 'FOLLOW' : 'NOFOLLOW')); |
|
| 63 | + return ((self::get('robots_index') ? 'INDEX' : 'NOINDEX').','.(self::get('robots_follow') ? 'FOLLOW' : 'NOFOLLOW')); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -68,11 +68,11 @@ |
||
| 68 | 68 | |
| 69 | 69 | if ($this->page->id !== 1) SEO::set('title', $this->page->title); else $this->_layout = 'Index'; |
| 70 | 70 | |
| 71 | - SEO::set('description', $this->page->description); |
|
| 72 | - SEO::set('keywords', $this->page->keywords); |
|
| 73 | - SEO::set('robots_index', $this->page->robots_index); |
|
| 74 | - SEO::set('robots_follow', $this->page->robots_follow); |
|
| 75 | - SEO::set('canonical', $this->page->canonical); |
|
| 71 | + SEO::set('description', $this->page->description); |
|
| 72 | + SEO::set('keywords', $this->page->keywords); |
|
| 73 | + SEO::set('robots_index', $this->page->robots_index); |
|
| 74 | + SEO::set('robots_follow', $this->page->robots_follow); |
|
| 75 | + SEO::set('canonical', $this->page->canonical); |
|
| 76 | 76 | |
| 77 | 77 | # ------------------------ |
| 78 | 78 | |
@@ -41,9 +41,9 @@ |
||
| 41 | 41 | |
| 42 | 42 | protected function loadItem(string $name) { |
| 43 | 43 | |
| 44 | - $path = ($this->dir_name . $name . '/'); |
|
| 44 | + $path = ($this->dir_name.$name.'/'); |
|
| 45 | 45 | |
| 46 | - if (null === ($data = JSON::load($path . '.Config.json'))) return null; |
|
| 46 | + if (null === ($data = JSON::load($path.'.Config.json'))) return null; |
|
| 47 | 47 | |
| 48 | 48 | if (null === ($data = Schema::get(static::$schema_prototype)->validate($data))) return null; |
| 49 | 49 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | if (null !== static::$loader) return static::$loader->$name(...$arguments); |
| 43 | 43 | |
| 44 | - throw new \BadMethodCallException('Call to undefined method ' . get_called_class() . '::' . $name . '()'); |
|
| 44 | + throw new \BadMethodCallException('Call to undefined method '.get_called_class().'::'.$name.'()'); |
|
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | } |
@@ -33,9 +33,9 @@ |
||
| 33 | 33 | |
| 34 | 34 | # Save uploaded file |
| 35 | 35 | |
| 36 | - if (true === ($upload = (Uploader::save('upload', (DIR_UPLOADS . $target_dir))))) { |
|
| 36 | + if (true === ($upload = (Uploader::save('upload', (DIR_UPLOADS.$target_dir))))) { |
|
| 37 | 37 | |
| 38 | - $name = Uploader::getBasename(); $url = (INSTALL_PATH . '/uploads/' . $target_dir . $name); |
|
| 38 | + $name = Uploader::getBasename(); $url = (INSTALL_PATH.'/uploads/'.$target_dir.$name); |
|
| 39 | 39 | |
| 40 | 40 | $ajax->set('name', $name)->set('url', $url); |
| 41 | 41 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | foreach (array_unique($languages) as $path) foreach ($phrases as $name) { |
| 36 | 36 | |
| 37 | - Language::load($path . 'Phrases/' . $name . '.php'); |
|
| 37 | + Language::load($path.'Phrases/'.$name.'.php'); |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
@@ -44,24 +44,24 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | private function setGlobals() { |
| 46 | 46 | |
| 47 | - Template::setGlobal('cadmium_home', CADMIUM_HOME); |
|
| 48 | - Template::setGlobal('cadmium_copy', CADMIUM_COPY); |
|
| 49 | - Template::setGlobal('cadmium_name', CADMIUM_NAME); |
|
| 50 | - Template::setGlobal('cadmium_version', CADMIUM_VERSION); |
|
| 47 | + Template::setGlobal('cadmium_home', CADMIUM_HOME); |
|
| 48 | + Template::setGlobal('cadmium_copy', CADMIUM_COPY); |
|
| 49 | + Template::setGlobal('cadmium_name', CADMIUM_NAME); |
|
| 50 | + Template::setGlobal('cadmium_version', CADMIUM_VERSION); |
|
| 51 | 51 | |
| 52 | - Template::setGlobal('template_name', strtolower(Extend\Templates::get('name'))); |
|
| 52 | + Template::setGlobal('template_name', strtolower(Extend\Templates::get('name'))); |
|
| 53 | 53 | |
| 54 | - Template::setGlobal('site_title', Settings::get('site_title')); |
|
| 55 | - Template::setGlobal('site_slogan', Settings::get('site_slogan')); |
|
| 54 | + Template::setGlobal('site_title', Settings::get('site_title')); |
|
| 55 | + Template::setGlobal('site_slogan', Settings::get('site_slogan')); |
|
| 56 | 56 | |
| 57 | - Template::setGlobal('system_url', Settings::get('system_url')); |
|
| 58 | - Template::setGlobal('system_email', Settings::get('system_email')); |
|
| 57 | + Template::setGlobal('system_url', Settings::get('system_url')); |
|
| 58 | + Template::setGlobal('system_email', Settings::get('system_email')); |
|
| 59 | 59 | |
| 60 | - Template::setGlobal('install_path', INSTALL_PATH); |
|
| 60 | + Template::setGlobal('install_path', INSTALL_PATH); |
|
| 61 | 61 | |
| 62 | - Template::setGlobal('index_page', (('' !== INSTALL_PATH) ? INSTALL_PATH : '/')); |
|
| 62 | + Template::setGlobal('index_page', (('' !== INSTALL_PATH) ? INSTALL_PATH : '/')); |
|
| 63 | 63 | |
| 64 | - Template::setGlobal('current_year', Date::getYear()); |
|
| 64 | + Template::setGlobal('current_year', Date::getYear()); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |