@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $html = "<{$tag}"; |
| 25 | 25 | if ($attributes && is_array($attributes)) { |
| 26 | 26 | foreach ($attributes as $key => $value) { |
| 27 | - $html .=" {$key} = '"; |
|
| 27 | + $html .= " {$key} = '"; |
|
| 28 | 28 | if (!is_array($value)) { |
| 29 | 29 | $html .= addcslashes($value, "'"); |
| 30 | 30 | } else { |
@@ -79,10 +79,12 @@ discard block |
||
| 79 | 79 | if (!empty($log['status'])) { |
| 80 | 80 | echo "<tr class = '{$log['status']}'><td>{$log['name']}</td><td>{$log['status']}</td></tr>"; |
| 81 | 81 | } else { |
| 82 | - if (empty($log['end'])) |
|
| 83 | - $log['end'] = microtime(true); |
|
| 84 | - if (empty($log['start'])) |
|
| 85 | - $log['start'] = microtime(true); |
|
| 82 | + if (empty($log['end'])) { |
|
| 83 | + $log['end'] = microtime(true); |
|
| 84 | + } |
|
| 85 | + if (empty($log['start'])) { |
|
| 86 | + $log['start'] = microtime(true); |
|
| 87 | + } |
|
| 86 | 88 | echo "<tr><td>{$log['name']}</td><td" . (round(($log['end'] - $log['start']), 5) > 0.1 ? ' class ="danger"' : '') . ">" . round(($log['end'] - $log['start']), 5) . "</td></tr>"; |
| 87 | 89 | } |
| 88 | 90 | } |
@@ -93,12 +95,13 @@ discard block |
||
| 93 | 95 | function convertSize($size) |
| 94 | 96 | { |
| 95 | 97 | |
| 96 | - if ($size < 1024) |
|
| 97 | - return $size . "B"; |
|
| 98 | - elseif ($size < 1048576) |
|
| 99 | - return round($size / 1024, 2) . "KB"; |
|
| 100 | - else |
|
| 101 | - return round($size / 1048576, 2) . "MB"; |
|
| 98 | + if ($size < 1024) { |
|
| 99 | + return $size . "B"; |
|
| 100 | + } elseif ($size < 1048576) { |
|
| 101 | + return round($size / 1024, 2) . "KB"; |
|
| 102 | + } else { |
|
| 103 | + return round($size / 1048576, 2) . "MB"; |
|
| 104 | + } |
|
| 102 | 105 | } |
| 103 | 106 | |
| 104 | 107 | function __destruct() |
@@ -83,22 +83,22 @@ |
||
| 83 | 83 | $log['end'] = microtime(true); |
| 84 | 84 | if (empty($log['start'])) |
| 85 | 85 | $log['start'] = microtime(true); |
| 86 | - echo "<tr><td>{$log['name']}</td><td" . (round(($log['end'] - $log['start']), 5) > 0.1 ? ' class ="danger"' : '') . ">" . round(($log['end'] - $log['start']), 5) . "</td></tr>"; |
|
| 86 | + echo "<tr><td>{$log['name']}</td><td".(round(($log['end'] - $log['start']), 5) > 0.1 ? ' class ="danger"' : '').">".round(($log['end'] - $log['start']), 5)."</td></tr>"; |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | - echo '<tr><th>Summary</th><th>' . round(( microtime(true) - $this->startTime), 5) . '</th></tr>'; |
|
| 90 | - echo '<tr><th>Memory</th><th>' . $this->convertSize(memory_get_peak_usage()) . ' of ' . ini_get('memory_limit') . '</th></tr></table></div>'; |
|
| 89 | + echo '<tr><th>Summary</th><th>'.round((microtime(true) - $this->startTime), 5).'</th></tr>'; |
|
| 90 | + echo '<tr><th>Memory</th><th>'.$this->convertSize(memory_get_peak_usage()).' of '.ini_get('memory_limit').'</th></tr></table></div>'; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | public function convertSize($size) |
| 94 | 94 | { |
| 95 | 95 | |
| 96 | 96 | if ($size < 1024) |
| 97 | - return $size . "B"; |
|
| 97 | + return $size."B"; |
|
| 98 | 98 | elseif ($size < 1048576) |
| 99 | - return round($size / 1024, 2) . "KB"; |
|
| 99 | + return round($size / 1024, 2)."KB"; |
|
| 100 | 100 | else |
| 101 | - return round($size / 1048576, 2) . "MB"; |
|
| 101 | + return round($size / 1048576, 2)."MB"; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | public function __destruct() |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if (!empty($_SESSION['_INJI_MSG'])) { |
| 23 | 23 | foreach ($_SESSION['_INJI_MSG'] as $key => $msg) { |
| 24 | 24 | if ($msg['text'] == $text) { |
| 25 | - $msg['count'] ++; |
|
| 25 | + $msg['count']++; |
|
| 26 | 26 | return true; |
| 27 | 27 | } |
| 28 | 28 | } |
@@ -52,8 +52,9 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | static function get($clean = false) |
| 54 | 54 | { |
| 55 | - if (empty($_SESSION['_INJI_MSG'])) |
|
| 56 | - return []; |
|
| 55 | + if (empty($_SESSION['_INJI_MSG'])) { |
|
| 56 | + return []; |
|
| 57 | + } |
|
| 57 | 58 | $msgs = $_SESSION['_INJI_MSG']; |
| 58 | 59 | if ($clean) { |
| 59 | 60 | $_SESSION['_INJI_MSG'] = []; |
@@ -15,8 +15,9 @@ discard block |
||
| 15 | 15 | if (!$app) { |
| 16 | 16 | $app = $this->app->type; |
| 17 | 17 | } |
| 18 | - if (!empty($this->config['access']['accessTree'][$app]['deniedUrl'])) |
|
| 19 | - return $this->config['access']['accessTree'][$app]['deniedUrl']; |
|
| 18 | + if (!empty($this->config['access']['accessTree'][$app]['deniedUrl'])) { |
|
| 19 | + return $this->config['access']['accessTree'][$app]['deniedUrl']; |
|
| 20 | + } |
|
| 20 | 21 | |
| 21 | 22 | return '/'; |
| 22 | 23 | } |
@@ -50,8 +51,9 @@ discard block |
||
| 50 | 51 | return true; |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | - if ((!$user->group_id && !empty($access)) || ($user->group_id && !empty($access) && !in_array($user->group_id, $access))) |
|
| 54 | - return false; |
|
| 54 | + if ((!$user->group_id && !empty($access)) || ($user->group_id && !empty($access) && !in_array($user->group_id, $access))) { |
|
| 55 | + return false; |
|
| 56 | + } |
|
| 55 | 57 | |
| 56 | 58 | return true; |
| 57 | 59 | } |
@@ -16,8 +16,9 @@ |
||
| 16 | 16 | $param = isset($this->config['default']) ? $this->config['default'] : 'local'; |
| 17 | 17 | } |
| 18 | 18 | if (!is_array($param)) { |
| 19 | - if (!($dbOption = Db\Options::get($param, 'connect_alias', ['array' => true]))) |
|
| 20 | - return false; |
|
| 19 | + if (!($dbOption = Db\Options::get($param, 'connect_alias', ['array' => true]))) { |
|
| 20 | + return false; |
|
| 21 | + } |
|
| 21 | 22 | |
| 22 | 23 | $db = $dbOption; |
| 23 | 24 | } else { |
@@ -23,16 +23,16 @@ discard block |
||
| 23 | 23 | } else { |
| 24 | 24 | $db = $param; |
| 25 | 25 | } |
| 26 | - $className = 'Db\\' . $db['driver']; |
|
| 26 | + $className = 'Db\\'.$db['driver']; |
|
| 27 | 27 | $this->connection = new $className(); |
| 28 | 28 | $this->connection->init($db); |
| 29 | 29 | $this->connection->dbInstance = $this; |
| 30 | 30 | $this->connect = $this->connection->connect; |
| 31 | 31 | $this->dbConfig = $db; |
| 32 | 32 | |
| 33 | - $this->className = 'Db\\' . $this->dbConfig['driver']; |
|
| 34 | - $this->QueryClassName = 'Db\\' . $this->dbConfig['driver'] . '\\Query'; |
|
| 35 | - $this->ResultClassName = 'Db\\' . $this->dbConfig['driver'] . '\\Result'; |
|
| 33 | + $this->className = 'Db\\'.$this->dbConfig['driver']; |
|
| 34 | + $this->QueryClassName = 'Db\\'.$this->dbConfig['driver'].'\\Query'; |
|
| 35 | + $this->ResultClassName = 'Db\\'.$this->dbConfig['driver'].'\\Result'; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function __call($name, $params) |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function newQuery() |
| 57 | 57 | { |
| 58 | - if($this->QueryClassName) { |
|
| 58 | + if ($this->QueryClassName) { |
|
| 59 | 59 | return new $this->QueryClassName($this->connection); |
| 60 | 60 | } |
| 61 | 61 | return false; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | static $forms = [ |
| 40 | 40 | 'manager' => [ |
| 41 | 41 | 'map' => [ |
| 42 | - ['price', 'currency_id',], |
|
| 42 | + ['price', 'currency_id', ], |
|
| 43 | 43 | ['item_offer_price_type_id', 'item_offer_id'] |
| 44 | 44 | ] |
| 45 | 45 | ]]; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | $args = func_get_args(); |
| 16 | 16 | $path = $this->module->getPath($args); |
| 17 | - if($path){ |
|
| 17 | + if ($path) { |
|
| 18 | 18 | $this->StaticLoader->giveFile($path); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -6,8 +6,9 @@ |
||
| 6 | 6 | $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
| 7 | 7 | foreach ($systemModules as $module) { |
| 8 | 8 | $info = Module::getInfo($module); |
| 9 | - if (!$info || isset($modules[$module])) |
|
| 10 | - continue; |
|
| 9 | + if (!$info || isset($modules[$module])) { |
|
| 10 | + continue; |
|
| 11 | + } |
|
| 11 | 12 | ?> |
| 12 | 13 | <div class ="form-group"> |
| 13 | 14 | <div class="checkbox"> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | <?php |
| 4 | 4 | $config = Config::app(App::$primary ? App::$primary : App::$cur); |
| 5 | 5 | $modules = array_flip(Module::getInstalled(App::$cur)); |
| 6 | - $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2); |
|
| 6 | + $systemModules = array_slice(scandir(INJI_SYSTEM_DIR.'/modules'), 2); |
|
| 7 | 7 | foreach ($systemModules as $module) { |
| 8 | 8 | $info = Module::getInfo($module); |
| 9 | 9 | if (!$info || isset($modules[$module])) |
@@ -25,8 +25,9 @@ |
||
| 25 | 25 | |
| 26 | 26 | $result['payId'] = $data["InvId"]; |
| 27 | 27 | |
| 28 | - if (strtolower($data['SignatureValue']) == $hashGenerated) |
|
| 29 | - $result['status'] = 'success'; |
|
| 28 | + if (strtolower($data['SignatureValue']) == $hashGenerated) { |
|
| 29 | + $result['status'] = 'success'; |
|
| 30 | + } |
|
| 30 | 31 | |
| 31 | 32 | return $result; |
| 32 | 33 | } |
@@ -44,9 +44,9 @@ |
||
| 44 | 44 | 'SignatureValue' => $hash |
| 45 | 45 | ]; |
| 46 | 46 | if (empty($config['test'])) { |
| 47 | - \Tools::redirect('https://auth.robokassa.ru/Merchant/Index.aspx?' . http_build_query($data)); |
|
| 47 | + \Tools::redirect('https://auth.robokassa.ru/Merchant/Index.aspx?'.http_build_query($data)); |
|
| 48 | 48 | } else { |
| 49 | - \Tools::redirect('http://test.robokassa.ru/Index.aspx?' . http_build_query($data)); |
|
| 49 | + \Tools::redirect('http://test.robokassa.ru/Index.aspx?'.http_build_query($data)); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |