@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | # Check auth |
| 35 | 35 | |
| 36 | - if (($this instanceof Area\Auth) && Auth::isLogged()) Request::redirect(INSTALL_PATH . '/admin'); |
|
| 36 | + if (($this instanceof Area\Auth) && Auth::isLogged()) Request::redirect(INSTALL_PATH.'/admin'); |
|
| 37 | 37 | |
| 38 | 38 | # Handle request |
| 39 | 39 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if (!Auth::isLogged() || ((false !== Request::get('logout')) && Auth::logout())) { |
| 56 | 56 | |
| 57 | - Request::redirect(INSTALL_PATH . '/admin/login'); |
|
| 57 | + Request::redirect(INSTALL_PATH.'/admin/login'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | # Handle request |
@@ -33,11 +33,15 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | # Check auth |
| 35 | 35 | |
| 36 | - if (($this instanceof Area\Auth) && Auth::isLogged()) Request::redirect(INSTALL_PATH . '/admin'); |
|
| 36 | + if (($this instanceof Area\Auth) && Auth::isLogged()) { |
|
| 37 | + Request::redirect(INSTALL_PATH . '/admin'); |
|
| 38 | + } |
|
| 37 | 39 | |
| 38 | 40 | # Handle request |
| 39 | 41 | |
| 40 | - if (Template::isBlock($result = $this->handle())) return (new View\Form($this->_title))->display($result); |
|
| 42 | + if (Template::isBlock($result = $this->handle())) { |
|
| 43 | + return (new View\Form($this->_title))->display($result); |
|
| 44 | + } |
|
| 41 | 45 | |
| 42 | 46 | # ------------------------ |
| 43 | 47 | |
@@ -63,9 +67,13 @@ discard block |
||
| 63 | 67 | |
| 64 | 68 | $result = $this->handle(Request::isAjax() && ($request === 'display')); |
| 65 | 69 | |
| 66 | - if (Template::isBlock($result)) return (new View\Panel($this->_title))->$request($result); |
|
| 70 | + if (Template::isBlock($result)) { |
|
| 71 | + return (new View\Panel($this->_title))->$request($result); |
|
| 72 | + } |
|
| 67 | 73 | |
| 68 | - if (Ajax::isResponse($result)) return Ajax::output($result); |
|
| 74 | + if (Ajax::isResponse($result)) { |
|
| 75 | + return Ajax::output($result); |
|
| 76 | + } |
|
| 69 | 77 | |
| 70 | 78 | # ------------------------ |
| 71 | 79 | |
@@ -84,14 +92,20 @@ discard block |
||
| 84 | 92 | |
| 85 | 93 | $ips = preg_split('/ +/', CONFIG_ADMIN_IP, -1, PREG_SPLIT_NO_EMPTY); |
| 86 | 94 | |
| 87 | - if (!in_array(REQUEST_CLIENT_IP, $ips, true)) return Status::displayError404(); |
|
| 95 | + if (!in_array(REQUEST_CLIENT_IP, $ips, true)) { |
|
| 96 | + return Status::displayError404(); |
|
| 97 | + } |
|
| 88 | 98 | } |
| 89 | 99 | |
| 90 | 100 | # Handle request |
| 91 | 101 | |
| 92 | - if (($this instanceof Area\Auth) || ($this instanceof Area\Install)) return $this->handleFormArea(); |
|
| 102 | + if (($this instanceof Area\Auth) || ($this instanceof Area\Install)) { |
|
| 103 | + return $this->handleFormArea(); |
|
| 104 | + } |
|
| 93 | 105 | |
| 94 | - if ($this instanceof Area\Panel) return $this->handlePanelArea(); |
|
| 106 | + if ($this instanceof Area\Panel) { |
|
| 107 | + return $this->handlePanelArea(); |
|
| 108 | + } |
|
| 95 | 109 | |
| 96 | 110 | # ------------------------ |
| 97 | 111 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | # Check auth |
| 35 | 35 | |
| 36 | - if (Auth::isLogged()) Request::redirect(INSTALL_PATH . '/profile'); |
|
| 36 | + if (Auth::isLogged()) Request::redirect(INSTALL_PATH.'/profile'); |
|
| 37 | 37 | |
| 38 | 38 | # ------------------------ |
| 39 | 39 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | if (!Auth::isLogged() || ((false !== Request::get('logout')) && Auth::logout())) { |
| 52 | 52 | |
| 53 | - Request::redirect(INSTALL_PATH . '/profile/login'); |
|
| 53 | + Request::redirect(INSTALL_PATH.'/profile/login'); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | # ------------------------ |
@@ -33,7 +33,9 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | # Check auth |
| 35 | 35 | |
| 36 | - if (Auth::isLogged()) Request::redirect(INSTALL_PATH . '/profile'); |
|
| 36 | + if (Auth::isLogged()) { |
|
| 37 | + Request::redirect(INSTALL_PATH . '/profile'); |
|
| 38 | + } |
|
| 37 | 39 | |
| 38 | 40 | # ------------------------ |
| 39 | 41 | |
@@ -68,9 +70,13 @@ discard block |
||
| 68 | 70 | |
| 69 | 71 | $result = $this->handle(Request::isAjax()); |
| 70 | 72 | |
| 71 | - if (Template::isBlock($result)) return (new View($this->_title, $this->_layout))->display($result); |
|
| 73 | + if (Template::isBlock($result)) { |
|
| 74 | + return (new View($this->_title, $this->_layout))->display($result); |
|
| 75 | + } |
|
| 72 | 76 | |
| 73 | - if (Ajax::isResponse($result)) return Ajax::output($result); |
|
| 77 | + if (Ajax::isResponse($result)) { |
|
| 78 | + return Ajax::output($result); |
|
| 79 | + } |
|
| 74 | 80 | |
| 75 | 81 | # ------------------------ |
| 76 | 82 | |
@@ -85,17 +91,27 @@ discard block |
||
| 85 | 91 | |
| 86 | 92 | # Check site status |
| 87 | 93 | |
| 88 | - if (Settings::get('site_status') === STATUS_MAINTENANCE) return Status::displayMaintenance(); |
|
| 94 | + if (Settings::get('site_status') === STATUS_MAINTENANCE) { |
|
| 95 | + return Status::displayMaintenance(); |
|
| 96 | + } |
|
| 89 | 97 | |
| 90 | - if (Settings::get('site_status') === STATUS_UPDATE) return Status::displayUpdate(); |
|
| 98 | + if (Settings::get('site_status') === STATUS_UPDATE) { |
|
| 99 | + return Status::displayUpdate(); |
|
| 100 | + } |
|
| 91 | 101 | |
| 92 | 102 | # Handle request |
| 93 | 103 | |
| 94 | - if ($this instanceof Area\Auth) return $this->handleAuthArea(); |
|
| 104 | + if ($this instanceof Area\Auth) { |
|
| 105 | + return $this->handleAuthArea(); |
|
| 106 | + } |
|
| 95 | 107 | |
| 96 | - if ($this instanceof Area\Authorized) return $this->handleAuthorizedArea(); |
|
| 108 | + if ($this instanceof Area\Authorized) { |
|
| 109 | + return $this->handleAuthorizedArea(); |
|
| 110 | + } |
|
| 97 | 111 | |
| 98 | - if ($this instanceof Area\Common) return $this->handleCommonArea(); |
|
| 112 | + if ($this instanceof Area\Common) { |
|
| 113 | + return $this->handleCommonArea(); |
|
| 114 | + } |
|
| 99 | 115 | |
| 100 | 116 | # ------------------------ |
| 101 | 117 | |
@@ -38,7 +38,9 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $layout->getBlock('user')->name = Auth::get('name'); |
| 40 | 40 | |
| 41 | - if (Auth::get('rank') === RANK_ADMINISTRATOR) $layout->getBlock('admin')->enable(); |
|
| 41 | + if (Auth::get('rank') === RANK_ADMINISTRATOR) { |
|
| 42 | + $layout->getBlock('admin')->enable(); |
|
| 43 | + } |
|
| 42 | 44 | } |
| 43 | 45 | |
| 44 | 46 | # Set title |
@@ -82,7 +84,9 @@ discard block |
||
| 82 | 84 | |
| 83 | 85 | # Set canonical |
| 84 | 86 | |
| 85 | - if (false !== SEO::canonical()) $page->getBlock('canonical')->enable()->link = SEO::canonical(); |
|
| 87 | + if (false !== SEO::canonical()) { |
|
| 88 | + $page->getBlock('canonical')->enable()->link = SEO::canonical(); |
|
| 89 | + } |
|
| 86 | 90 | |
| 87 | 91 | # Set layout |
| 88 | 92 | |
@@ -90,9 +94,13 @@ discard block |
||
| 90 | 94 | |
| 91 | 95 | # Set global components |
| 92 | 96 | |
| 93 | - foreach (Variables::generate() as $name => $value) Template::setGlobal($name, $value); |
|
| 97 | + foreach (Variables::generate() as $name => $value) { |
|
| 98 | + Template::setGlobal($name, $value); |
|
| 99 | + } |
|
| 94 | 100 | |
| 95 | - foreach (Widgets::generate() as $name => $block) Template::setWidget($name, $block); |
|
| 101 | + foreach (Widgets::generate() as $name => $block) { |
|
| 102 | + Template::setWidget($name, $block); |
|
| 103 | + } |
|
| 96 | 104 | |
| 97 | 105 | # ------------------------ |
| 98 | 106 | |
@@ -32,10 +32,12 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | $phrases = (static::PHRASES + array_keys(Extend\Addons::items() ?? [])); |
| 34 | 34 | |
| 35 | - foreach (array_unique($languages) as $path) foreach ($phrases as $name) { |
|
| 35 | + foreach (array_unique($languages) as $path) { |
|
| 36 | + foreach ($phrases as $name) { |
|
| 36 | 37 | |
| 37 | 38 | Language::load($path . 'Phrases/' . $name . '.php'); |
| 38 | 39 | } |
| 40 | + } |
|
| 39 | 41 | } |
| 40 | 42 | |
| 41 | 43 | /** |
@@ -86,7 +88,9 @@ discard block |
||
| 86 | 88 | |
| 87 | 89 | # Set timezone |
| 88 | 90 | |
| 89 | - if (Auth::isLogged() && ('' !== ($timezone = Auth::get('timezone')))) date_default_timezone_set($timezone); |
|
| 91 | + if (Auth::isLogged() && ('' !== ($timezone = Auth::get('timezone')))) { |
|
| 92 | + date_default_timezone_set($timezone); |
|
| 93 | + } |
|
| 90 | 94 | |
| 91 | 95 | # Init utils |
| 92 | 96 | |
@@ -9,26 +9,26 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | # Define directories |
| 11 | 11 | |
| 12 | -define('DIR_FRAMEWORK', (dirname(__FILE__) . '/')); |
|
| 12 | +define('DIR_FRAMEWORK', (dirname(__FILE__).'/')); |
|
| 13 | 13 | |
| 14 | -define('DIR_CLASSES', (DIR_FRAMEWORK . 'Classes/')); |
|
| 15 | -define('DIR_DATA', (DIR_FRAMEWORK . 'Data/')); |
|
| 16 | -define('DIR_INCLUDES', (DIR_FRAMEWORK . 'Includes/')); |
|
| 17 | -define('DIR_TEMPLATES', (DIR_FRAMEWORK . 'Templates/')); |
|
| 14 | +define('DIR_CLASSES', (DIR_FRAMEWORK.'Classes/')); |
|
| 15 | +define('DIR_DATA', (DIR_FRAMEWORK.'Data/')); |
|
| 16 | +define('DIR_INCLUDES', (DIR_FRAMEWORK.'Includes/')); |
|
| 17 | +define('DIR_TEMPLATES', (DIR_FRAMEWORK.'Templates/')); |
|
| 18 | 18 | |
| 19 | 19 | # Require classes |
| 20 | 20 | |
| 21 | -require_once (DIR_FRAMEWORK . 'Engine.php'); |
|
| 22 | -require_once (DIR_FRAMEWORK . 'Exception.php'); |
|
| 23 | -require_once (DIR_FRAMEWORK . 'Type.php'); |
|
| 21 | +require_once (DIR_FRAMEWORK.'Engine.php'); |
|
| 22 | +require_once (DIR_FRAMEWORK.'Exception.php'); |
|
| 23 | +require_once (DIR_FRAMEWORK.'Type.php'); |
|
| 24 | 24 | |
| 25 | 25 | # Require configuration |
| 26 | 26 | |
| 27 | -require_once (DIR_INCLUDES . 'Constants.php'); |
|
| 28 | -require_once (DIR_INCLUDES . 'Functions.php'); |
|
| 29 | -require_once (DIR_INCLUDES . 'Regex.php'); |
|
| 30 | -require_once (DIR_INCLUDES . 'Headers/Mime.php'); |
|
| 31 | -require_once (DIR_INCLUDES . 'Headers/Status.php'); |
|
| 27 | +require_once (DIR_INCLUDES.'Constants.php'); |
|
| 28 | +require_once (DIR_INCLUDES.'Functions.php'); |
|
| 29 | +require_once (DIR_INCLUDES.'Regex.php'); |
|
| 30 | +require_once (DIR_INCLUDES.'Headers/Mime.php'); |
|
| 31 | +require_once (DIR_INCLUDES.'Headers/Status.php'); |
|
| 32 | 32 | |
| 33 | 33 | # Set defaults |
| 34 | 34 | |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | # Set request constants |
| 40 | 40 | |
| 41 | -define('REQUEST_CLIENT_IP', Engine::getIP()); |
|
| 41 | +define('REQUEST_CLIENT_IP', Engine::getIP()); |
|
| 42 | 42 | |
| 43 | -define('REQUEST_TIME', $_SERVER['REQUEST_TIME']); |
|
| 44 | -define('REQUEST_TIME_FLOAT', $_SERVER['REQUEST_TIME_FLOAT']); |
|
| 43 | +define('REQUEST_TIME', $_SERVER['REQUEST_TIME']); |
|
| 44 | +define('REQUEST_TIME_FLOAT', $_SERVER['REQUEST_TIME_FLOAT']); |
|
| 45 | 45 | |
| 46 | 46 | # Set exception handler |
| 47 | 47 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | protected function getValue(string $value) : string { |
| 32 | 32 | |
| 33 | - return ('\'' . addslashes($value) . '\''); |
|
| 33 | + return ('\''.addslashes($value).'\''); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $parser = function($value) { if (is_scalar($value)) return $this->getValue($value); }; |
| 43 | 43 | |
| 44 | - return ('(' . implode(', ', array_filter(array_map($parser, $value))) . ')'); |
|
| 44 | + return ('('.implode(', ', array_filter(array_map($parser, $value))).')'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -50,21 +50,21 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | protected function getOperatable($value) { |
| 52 | 52 | |
| 53 | - if (is_scalar($value)) return ('= ' . $this->getValue($value)); |
|
| 53 | + if (is_scalar($value)) return ('= '.$this->getValue($value)); |
|
| 54 | 54 | |
| 55 | - if (is_array($value)) return ('IN ' . $this->getRange($value)); |
|
| 55 | + if (is_array($value)) return ('IN '.$this->getRange($value)); |
|
| 56 | 56 | |
| 57 | - if ($value instanceof Type\Not) return ('NOT ' . $this->getValue($value->get())); |
|
| 57 | + if ($value instanceof Type\Not) return ('NOT '.$this->getValue($value->get())); |
|
| 58 | 58 | |
| 59 | - if ($value instanceof Type\Like) return ('LIKE ' . $this->getValue($value->get())); |
|
| 59 | + if ($value instanceof Type\Like) return ('LIKE '.$this->getValue($value->get())); |
|
| 60 | 60 | |
| 61 | - if ($value instanceof Type\LessThan) return ('< ' . $value->get()); |
|
| 61 | + if ($value instanceof Type\LessThan) return ('< '.$value->get()); |
|
| 62 | 62 | |
| 63 | - if ($value instanceof Type\GreaterThan) return ('> ' . $value->get()); |
|
| 63 | + if ($value instanceof Type\GreaterThan) return ('> '.$value->get()); |
|
| 64 | 64 | |
| 65 | - if ($value instanceof Type\LessThanOrEqual) return ('<= ' . $value->get()); |
|
| 65 | + if ($value instanceof Type\LessThanOrEqual) return ('<= '.$value->get()); |
|
| 66 | 66 | |
| 67 | - if ($value instanceof Type\GreaterThanOrEqual) return ('>= ' . $value->get()); |
|
| 67 | + if ($value instanceof Type\GreaterThanOrEqual) return ('>= '.$value->get()); |
|
| 68 | 68 | |
| 69 | 69 | # ------------------------ |
| 70 | 70 | |
@@ -39,7 +39,10 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | protected function getRange(array $value) : string { |
| 41 | 41 | |
| 42 | - $parser = function($value) { if (is_scalar($value)) return $this->getValue($value); }; |
|
| 42 | + $parser = function($value) { if (is_scalar($value)) { |
|
| 43 | + return $this->getValue($value); |
|
| 44 | + } |
|
| 45 | + }; |
|
| 43 | 46 | |
| 44 | 47 | return ('(' . implode(', ', array_filter(array_map($parser, $value))) . ')'); |
| 45 | 48 | } |
@@ -50,21 +53,37 @@ discard block |
||
| 50 | 53 | |
| 51 | 54 | protected function getOperatable($value) { |
| 52 | 55 | |
| 53 | - if (is_scalar($value)) return ('= ' . $this->getValue($value)); |
|
| 56 | + if (is_scalar($value)) { |
|
| 57 | + return ('= ' . $this->getValue($value)); |
|
| 58 | + } |
|
| 54 | 59 | |
| 55 | - if (is_array($value)) return ('IN ' . $this->getRange($value)); |
|
| 60 | + if (is_array($value)) { |
|
| 61 | + return ('IN ' . $this->getRange($value)); |
|
| 62 | + } |
|
| 56 | 63 | |
| 57 | - if ($value instanceof Type\Not) return ('NOT ' . $this->getValue($value->get())); |
|
| 64 | + if ($value instanceof Type\Not) { |
|
| 65 | + return ('NOT ' . $this->getValue($value->get())); |
|
| 66 | + } |
|
| 58 | 67 | |
| 59 | - if ($value instanceof Type\Like) return ('LIKE ' . $this->getValue($value->get())); |
|
| 68 | + if ($value instanceof Type\Like) { |
|
| 69 | + return ('LIKE ' . $this->getValue($value->get())); |
|
| 70 | + } |
|
| 60 | 71 | |
| 61 | - if ($value instanceof Type\LessThan) return ('< ' . $value->get()); |
|
| 72 | + if ($value instanceof Type\LessThan) { |
|
| 73 | + return ('< ' . $value->get()); |
|
| 74 | + } |
|
| 62 | 75 | |
| 63 | - if ($value instanceof Type\GreaterThan) return ('> ' . $value->get()); |
|
| 76 | + if ($value instanceof Type\GreaterThan) { |
|
| 77 | + return ('> ' . $value->get()); |
|
| 78 | + } |
|
| 64 | 79 | |
| 65 | - if ($value instanceof Type\LessThanOrEqual) return ('<= ' . $value->get()); |
|
| 80 | + if ($value instanceof Type\LessThanOrEqual) { |
|
| 81 | + return ('<= ' . $value->get()); |
|
| 82 | + } |
|
| 66 | 83 | |
| 67 | - if ($value instanceof Type\GreaterThanOrEqual) return ('>= ' . $value->get()); |
|
| 84 | + if ($value instanceof Type\GreaterThanOrEqual) { |
|
| 85 | + return ('>= ' . $value->get()); |
|
| 86 | + } |
|
| 68 | 87 | |
| 69 | 88 | # ------------------------ |
| 70 | 89 | |
@@ -86,7 +105,9 @@ discard block |
||
| 86 | 105 | |
| 87 | 106 | protected function getString($source = null, string $pattern = '', string $separator = '') : string { |
| 88 | 107 | |
| 89 | - if (!is_array($source)) return (is_scalar($source) ? strval($source) : ''); |
|
| 108 | + if (!is_array($source)) { |
|
| 109 | + return (is_scalar($source) ? strval($source) : ''); |
|
| 110 | + } |
|
| 90 | 111 | |
| 91 | 112 | $regexs = ['key' => '/\^([a-z]+)/', 'value' => '/\$([a-z]+)/']; $matches = ['key' => [], 'value' => []]; |
| 92 | 113 | |
@@ -98,7 +119,9 @@ discard block |
||
| 98 | 119 | |
| 99 | 120 | # Parse pattern |
| 100 | 121 | |
| 101 | - foreach ($regexs as $name => $regex) preg_match($regex, $pattern, $matches[$name]); |
|
| 122 | + foreach ($regexs as $name => $regex) { |
|
| 123 | + preg_match($regex, $pattern, $matches[$name]); |
|
| 124 | + } |
|
| 102 | 125 | |
| 103 | 126 | # Process replacements |
| 104 | 127 | |
@@ -106,9 +129,12 @@ discard block |
||
| 106 | 129 | |
| 107 | 130 | $output[$count] = $pattern; $item = &$output[$count++]; |
| 108 | 131 | |
| 109 | - foreach ($matches as $name => $match) if (isset($match[1]) && isset($parsers[$match[1]])) { |
|
| 132 | + foreach ($matches as $name => $match) { |
|
| 133 | + if (isset($match[1]) && isset($parsers[$match[1]])) { |
|
| 110 | 134 | |
| 111 | - try { $replace = [$this, $parsers[$match[1]]]($$name); } catch (\TypeError $e) { $replace = ''; } |
|
| 135 | + try { $replace = [$this, $parsers[$match[1]]]($$name); |
|
| 136 | + } |
|
| 137 | + } catch (\TypeError $e) { $replace = ''; } |
|
| 112 | 138 | |
| 113 | 139 | $item = str_replace($match[0], $replace, $item); |
| 114 | 140 | } |
@@ -23,15 +23,15 @@ |
||
| 23 | 23 | |
| 24 | 24 | $table = $this->getName($table); |
| 25 | 25 | |
| 26 | - if ($column !== '*') $column = (($distinct ? 'DISTINCT ' : '') . $this->getName($column)); |
|
| 26 | + if ($column !== '*') $column = (($distinct ? 'DISTINCT ' : '').$this->getName($column)); |
|
| 27 | 27 | |
| 28 | 28 | $condition = $this->getString($condition, '^name $operatable', ' AND '); |
| 29 | 29 | |
| 30 | 30 | # Build query |
| 31 | 31 | |
| 32 | - $this->query = ('SELECT COUNT(' . $column . ') as count ' . |
|
| 32 | + $this->query = ('SELECT COUNT('.$column.') as count '. |
|
| 33 | 33 | |
| 34 | - 'FROM ' . $table . ($condition ? (' WHERE (' . $condition . ')') : '')); |
|
| 34 | + 'FROM '.$table.($condition ? (' WHERE ('.$condition.')') : '')); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | $table = $this->getName($table); |
| 25 | 25 | |
| 26 | - if ($column !== '*') $column = (($distinct ? 'DISTINCT ' : '') . $this->getName($column)); |
|
| 26 | + if ($column !== '*') { |
|
| 27 | + $column = (($distinct ? 'DISTINCT ' : '') . $this->getName($column)); |
|
| 28 | + } |
|
| 27 | 29 | |
| 28 | 30 | $condition = $this->getString($condition, '^name $operatable', ' AND '); |
| 29 | 31 | |
@@ -9,68 +9,68 @@ |
||
| 9 | 9 | |
| 10 | 10 | # Cadmium |
| 11 | 11 | |
| 12 | -define('CADMIUM_NAME', 'Cadmium CMS'); |
|
| 13 | -define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
| 12 | +define('CADMIUM_NAME', 'Cadmium CMS'); |
|
| 13 | +define('CADMIUM_HOME', 'http://cadmium-cms.com'); |
|
| 14 | 14 | |
| 15 | -define('CADMIUM_VERSION', '0.4.4'); |
|
| 16 | -define('CADMIUM_COPY', '2017'); |
|
| 15 | +define('CADMIUM_VERSION', '0.4.4'); |
|
| 16 | +define('CADMIUM_COPY', '2017'); |
|
| 17 | 17 | |
| 18 | 18 | # Third-party |
| 19 | 19 | |
| 20 | -define('JQUERY_VERSION', '3.1.1'); |
|
| 21 | -define('SEMANTIC_UI_VERSION', '2.2.9'); |
|
| 22 | -define('CKEDITOR_VERSION', '4.6.2'); |
|
| 20 | +define('JQUERY_VERSION', '3.1.1'); |
|
| 21 | +define('SEMANTIC_UI_VERSION', '2.2.9'); |
|
| 22 | +define('CKEDITOR_VERSION', '4.6.2'); |
|
| 23 | 23 | |
| 24 | 24 | # Sections |
| 25 | 25 | |
| 26 | -define('SECTION_SITE', 'site'); |
|
| 27 | -define('SECTION_ADMIN', 'admin'); |
|
| 26 | +define('SECTION_SITE', 'site'); |
|
| 27 | +define('SECTION_ADMIN', 'admin'); |
|
| 28 | 28 | |
| 29 | 29 | # Filemanager types |
| 30 | 30 | |
| 31 | -define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
| 32 | -define('FILEMANAGER_TYPE_FILE', 'file'); |
|
| 31 | +define('FILEMANAGER_TYPE_DIR', 'dir'); |
|
| 32 | +define('FILEMANAGER_TYPE_FILE', 'file'); |
|
| 33 | 33 | |
| 34 | 34 | # Access |
| 35 | 35 | |
| 36 | -define('ACCESS_PUBLIC', 0); |
|
| 37 | -define('ACCESS_REGISTERED', 1); |
|
| 38 | -define('ACCESS_ADMINISTRATOR', 2); |
|
| 36 | +define('ACCESS_PUBLIC', 0); |
|
| 37 | +define('ACCESS_REGISTERED', 1); |
|
| 38 | +define('ACCESS_ADMINISTRATOR', 2); |
|
| 39 | 39 | |
| 40 | 40 | # Frequency |
| 41 | 41 | |
| 42 | -define('FREQUENCY_ALWAYS', 'always'); |
|
| 43 | -define('FREQUENCY_HOURLY', 'hourly'); |
|
| 44 | -define('FREQUENCY_DAILY', 'daily'); |
|
| 45 | -define('FREQUENCY_WEEKLY', 'weekly'); |
|
| 46 | -define('FREQUENCY_MONTHLY', 'monthly'); |
|
| 47 | -define('FREQUENCY_YEARLY', 'yearly'); |
|
| 48 | -define('FREQUENCY_NEVER', 'never'); |
|
| 42 | +define('FREQUENCY_ALWAYS', 'always'); |
|
| 43 | +define('FREQUENCY_HOURLY', 'hourly'); |
|
| 44 | +define('FREQUENCY_DAILY', 'daily'); |
|
| 45 | +define('FREQUENCY_WEEKLY', 'weekly'); |
|
| 46 | +define('FREQUENCY_MONTHLY', 'monthly'); |
|
| 47 | +define('FREQUENCY_YEARLY', 'yearly'); |
|
| 48 | +define('FREQUENCY_NEVER', 'never'); |
|
| 49 | 49 | |
| 50 | 50 | # Rank |
| 51 | 51 | |
| 52 | -define('RANK_GUEST', 0); |
|
| 53 | -define('RANK_USER', 1); |
|
| 54 | -define('RANK_ADMINISTRATOR', 2); |
|
| 52 | +define('RANK_GUEST', 0); |
|
| 53 | +define('RANK_USER', 1); |
|
| 54 | +define('RANK_ADMINISTRATOR', 2); |
|
| 55 | 55 | |
| 56 | 56 | # Sex |
| 57 | 57 | |
| 58 | -define('SEX_NOT_SELECTED', 0); |
|
| 59 | -define('SEX_MALE', 1); |
|
| 60 | -define('SEX_FEMALE', 2); |
|
| 58 | +define('SEX_NOT_SELECTED', 0); |
|
| 59 | +define('SEX_MALE', 1); |
|
| 60 | +define('SEX_FEMALE', 2); |
|
| 61 | 61 | |
| 62 | 62 | # Status |
| 63 | 63 | |
| 64 | -define('STATUS_ONLINE', 0); |
|
| 65 | -define('STATUS_MAINTENANCE', 1); |
|
| 66 | -define('STATUS_UPDATE', 2); |
|
| 64 | +define('STATUS_ONLINE', 0); |
|
| 65 | +define('STATUS_MAINTENANCE', 1); |
|
| 66 | +define('STATUS_UPDATE', 2); |
|
| 67 | 67 | |
| 68 | 68 | # Target |
| 69 | 69 | |
| 70 | -define('TARGET_SELF', 0); |
|
| 71 | -define('TARGET_BLANK', 1); |
|
| 70 | +define('TARGET_SELF', 0); |
|
| 71 | +define('TARGET_BLANK', 1); |
|
| 72 | 72 | |
| 73 | 73 | # Visibility |
| 74 | 74 | |
| 75 | -define('VISIBILITY_DRAFT', 0); |
|
| 76 | -define('VISIBILITY_PUBLISHED', 1); |
|
| 75 | +define('VISIBILITY_DRAFT', 0); |
|
| 76 | +define('VISIBILITY_PUBLISHED', 1); |
|