@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function($step = NULL, $params = []) { |
|
| 3 | +return function($step = null, $params = []) { |
|
| 4 | 4 | $options = ['max_height' => 1200, 'max_width' => 1200]; |
| 5 | 5 | $types = [ |
| 6 | 6 | [ |
@@ -13,12 +13,12 @@ |
||
| 13 | 13 | |
| 14 | 14 | class Reader extends \Object { |
| 15 | 15 | |
| 16 | - public $data = NULL; |
|
| 16 | + public $data = null; |
|
| 17 | 17 | public $source = ''; |
| 18 | 18 | |
| 19 | 19 | public function loadData($source = '') { |
| 20 | 20 | $this->source = $source; |
| 21 | - return FALSE; |
|
| 21 | + return false; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function readPath($path = '/') { |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | $auth_key = md5($config['appId'] . '_' . $viewer_id . '_' . $config['secret']); |
| 146 | 146 | |
| 147 | 147 | if ($auth_key !== $get_auth_key) { |
| 148 | - return FALSE; |
|
| 148 | + return false; |
|
| 149 | 149 | } |
| 150 | 150 | $userQuery = [ |
| 151 | 151 | 'user_id' => $viewer_id, |
@@ -138,13 +138,13 @@ |
||
| 138 | 138 | $userId = (int) $userId; |
| 139 | 139 | $result = new \Server\Result(); |
| 140 | 140 | if (!$userId) { |
| 141 | - $result->success = FALSE; |
|
| 141 | + $result->success = false; |
|
| 142 | 142 | $result->content = 'Не указан пользователь'; |
| 143 | 143 | $result->send(); |
| 144 | 144 | } |
| 145 | 145 | $partners = App::$cur->users->getUserPartners(Users\User::$cur, 8); |
| 146 | 146 | if (empty($partners['users'][$userId])) { |
| 147 | - $result->success = FALSE; |
|
| 147 | + $result->success = false; |
|
| 148 | 148 | $result->content = 'Этот пользователь не находится в вашей структуре'; |
| 149 | 149 | $result->send(); |
| 150 | 150 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function checkAccess($element, $user = null) { |
| 30 | - $access = NULL; |
|
| 30 | + $access = null; |
|
| 31 | 31 | foreach ($this->accessCheckers as $getter) { |
| 32 | 32 | foreach ($getter['classes'] as $className) { |
| 33 | 33 | if ($element instanceof $className) { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } elseif (!$path) { |
| 70 | 70 | return $array; |
| 71 | 71 | } else { |
| 72 | - return NULL; |
|
| 72 | + return null; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
@@ -17,15 +17,15 @@ |
||
| 17 | 17 | if (!empty($request[$this->colName]['pass']) && !empty($request[$this->colName]['pass'])) { |
| 18 | 18 | if (empty($request[$this->colName]['pass'])) { |
| 19 | 19 | \Msg::add('Вы не ввели пароль в первое поле', 'danger'); |
| 20 | - return FALSE; |
|
| 20 | + return false; |
|
| 21 | 21 | } |
| 22 | 22 | if (empty($request[$this->colName]['repeat'])) { |
| 23 | 23 | \Msg::add('Вы не ввели пароль во второе поле', 'danger'); |
| 24 | - return FALSE; |
|
| 24 | + return false; |
|
| 25 | 25 | } |
| 26 | 26 | if ($request[$this->colName]['pass'] != $request[$this->colName]['repeat']) { |
| 27 | 27 | \Msg::add('Введенные пароли не совпадают', 'danger'); |
| 28 | - return FALSE; |
|
| 28 | + return false; |
|
| 29 | 29 | } |
| 30 | 30 | $this->activeForm->model->{$this->colName} = \App::$cur->users->hashpass($request[$this->colName]['pass']); |
| 31 | 31 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | return [ |
| 12 | 12 | 'classes' => ['Ui\DataManager'], |
| 13 | 13 | 'get' => function($element) { |
| 14 | -$access = NULL; |
|
| 14 | +$access = null; |
|
| 15 | 15 | $path = [ |
| 16 | 16 | 'models', |
| 17 | 17 | $element->modelName, |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | class Mysql extends \Object { |
| 15 | 15 | |
| 16 | 16 | public $config = []; // настройки подключения выбраной базы |
| 17 | - public $connect = FALSE; // ярлык соединения с MySQL |
|
| 17 | + public $connect = false; // ярлык соединения с MySQL |
|
| 18 | 18 | public $encoding = 'utf-8'; // установленная кодировка |
| 19 | 19 | public $db_name = 'test'; // выбраная в данный момент база |
| 20 | 20 | public $table_prefix = 'inji_'; // префикс названий таблиц |
| 21 | - public $pdo = NULL; |
|
| 21 | + public $pdo = null; |
|
| 22 | 22 | public $lastQuery = ''; |
| 23 | 23 | public $last_error = ''; |
| 24 | 24 | public $noConnectAbort = false; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public $having = []; |
| 20 | 20 | public $havingString = ''; |
| 21 | 21 | public $cols = []; |
| 22 | - public $order = NULL; |
|
| 22 | + public $order = null; |
|
| 23 | 23 | public $join = []; |
| 24 | 24 | public $group = []; |
| 25 | 25 | public $limit = ''; |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | public function limit($start = 0, $len = 0) { |
| 138 | 138 | $start = intval($start); |
| 139 | 139 | $len = intval($len); |
| 140 | - $this->limit = "LIMIT {$start}"; |
|
| 140 | + $this->limit = "limit {$start}"; |
|
| 141 | 141 | if ($len !== 0) |
| 142 | 142 | $this->limit .= ",{$len}"; |
| 143 | 143 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | elseif ($concatenation === true) |
| 179 | 179 | $concatenation = ''; |
| 180 | 180 | |
| 181 | - if ($this->whereString == NULL) |
|
| 181 | + if ($this->whereString == null) |
|
| 182 | 182 | $this->whereString = ' WHERE '; |
| 183 | 183 | |
| 184 | 184 | if (stristr($operation, 'IN') || stristr($operation, 'NOT IN')) { |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | while (isset($where[++$i])) { |
| 216 | 216 | $item = $where[$i]; |
| 217 | 217 | if (isset($where[$i + 1]) && !isset($where[$i - 1]) && is_array($where[$i])) { |
| 218 | - if ($this->whereString != NULL && substr($this->whereString, -1, 1) != '(' && $this->whereString != 'WHERE ') { |
|
| 218 | + if ($this->whereString != null && substr($this->whereString, -1, 1) != '(' && $this->whereString != 'WHERE ') { |
|
| 219 | 219 | if (!isset($item[3])) { |
| 220 | 220 | $concatenation = 'AND'; |
| 221 | 221 | } else { |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | $this->whereString .= "{$concatenation} "; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - if ($this->whereString != NULL) |
|
| 228 | + if ($this->whereString != null) |
|
| 229 | 229 | $this->whereString .= '('; |
| 230 | 230 | else |
| 231 | 231 | $this->whereString = 'WHERE ('; |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | elseif ($concatenation === true) |
| 263 | 263 | $concatenation = ''; |
| 264 | 264 | |
| 265 | - if ($this->havingString == NULL) |
|
| 265 | + if ($this->havingString == null) |
|
| 266 | 266 | $this->havingString = ' HAVING '; |
| 267 | 267 | |
| 268 | 268 | if (stristr($operation, 'IN') || stristr($operation, 'NOT IN')) { |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | while (isset($where[++$i])) { |
| 300 | 300 | $item = $where[$i]; |
| 301 | 301 | if (isset($where[$i + 1]) && !isset($where[$i - 1]) && is_array($where[$i])) { |
| 302 | - if ($this->havingString != NULL && substr($this->havingString, -1, 1) != '(' && $this->havingString != 'HAVING ') { |
|
| 302 | + if ($this->havingString != null && substr($this->havingString, -1, 1) != '(' && $this->havingString != 'HAVING ') { |
|
| 303 | 303 | if (!isset($item[3])) { |
| 304 | 304 | $concatenation = 'AND'; |
| 305 | 305 | } else { |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $this->havingString .= "{$concatenation} "; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - if ($this->havingString != NULL) |
|
| 312 | + if ($this->havingString != null) |
|
| 313 | 313 | $this->havingString .= '('; |
| 314 | 314 | else |
| 315 | 315 | $this->havingString = 'HAVING ('; |