@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'currency_id' => $currency_id, |
21 | 21 | 'user_id' => \Users\User::$cur->id, |
22 | 22 | 'sum' => $sum, |
23 | - 'description' => 'Оплата заказа №' . $cart->id . ' в онлайн-магазине', |
|
23 | + 'description' => 'Оплата заказа №'.$cart->id.' в онлайн-магазине', |
|
24 | 24 | 'type' => 'pay', |
25 | 25 | 'pay_status_id' => 1, |
26 | 26 | 'callback_module' => 'Ecommerce', |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $pay->save(); |
33 | 33 | } |
34 | 34 | } |
35 | - return ['/money/merchants/pay/?data=' . $cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success']; |
|
35 | + return ['/money/merchants/pay/?data='.$cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success']; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | ]; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | public function loadLib($libName, $options = []) |
14 | 14 | { |
15 | 15 | |
16 | - $className = 'Libs\\' . ucfirst($libName); |
|
16 | + $className = 'Libs\\'.ucfirst($libName); |
|
17 | 17 | if (class_exists($className)) { |
18 | 18 | if (!empty($className::$composerPacks)) { |
19 | 19 | foreach ($className::$composerPacks as $packageName => $version) { |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | $this->loadLib($rLib); |
26 | 26 | } |
27 | 27 | } |
28 | - if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'] )) { |
|
28 | + if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'])) { |
|
29 | 29 | foreach ($className::$files['css'] as $file) { |
30 | 30 | if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) { |
31 | 31 | App::$cur->view->customAsset('css', $file, $libName); |
32 | 32 | } else { |
33 | - App::$cur->view->customAsset('css', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName); |
|
33 | + App::$cur->view->customAsset('css', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName); |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) { |
40 | 40 | App::$cur->view->customAsset('js', $file, $libName); |
41 | 41 | } else { |
42 | - App::$cur->view->customAsset('js', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName); |
|
42 | + App::$cur->view->customAsset('js', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | } |
@@ -50,30 +50,30 @@ discard block |
||
50 | 50 | { |
51 | 51 | $libPath = preg_replace('!^libs/!', '', $file); |
52 | 52 | $libName = substr($libPath, 0, strpos($libPath, '/')); |
53 | - $className = 'Libs\\' . ucfirst($libName); |
|
53 | + $className = 'Libs\\'.ucfirst($libName); |
|
54 | 54 | if (class_exists($className)) { |
55 | 55 | if (!empty($className::$programDirs)) { |
56 | 56 | $fileDir = substr($libPath, strlen($libName) + 1, strpos($libPath, '/', strlen($libName) + 1) - strlen($libName) - 1); |
57 | 57 | foreach ($className::$programDirs as $programDir) { |
58 | 58 | if ($programDir == $fileDir) { |
59 | - include $dir . $file; |
|
59 | + include $dir.$file; |
|
60 | 60 | exit(); |
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
64 | 64 | } |
65 | - return $dir . $file; |
|
65 | + return $dir.$file; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | public function getPath($args) |
69 | 69 | { |
70 | 70 | if (!empty($args[0])) { |
71 | - $libName = 'Libs\\' . ucfirst($args[0]); |
|
71 | + $libName = 'Libs\\'.ucfirst($args[0]); |
|
72 | 72 | if (class_exists($libName)) { |
73 | 73 | $file = implode('/', array_slice($args, 1)); |
74 | 74 | foreach ($libName::$staticDirs as $dir) { |
75 | 75 | if (strpos($file, $dir) === 0) { |
76 | - return \App::$primary->path . '/vendor/' . $file; |
|
76 | + return \App::$primary->path.'/vendor/'.$file; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | $templates = App::$primary->view->config; |
49 | 49 | $templates['app']['installed'][$_POST['name']] = $_POST['name']; |
50 | 50 | Config::save('module', $templates, 'View', App::$primary); |
51 | - $path = App::$primary->path . '/templates/' . $_POST['name'] . '/index.html'; |
|
52 | - $pathMap = App::$primary->path . '/templates/' . $_POST['name'] . '/map.html'; |
|
53 | - Tools::createDir(App::$primary->path . '/templates/' . $_POST['name']); |
|
51 | + $path = App::$primary->path.'/templates/'.$_POST['name'].'/index.html'; |
|
52 | + $pathMap = App::$primary->path.'/templates/'.$_POST['name'].'/map.html'; |
|
53 | + Tools::createDir(App::$primary->path.'/templates/'.$_POST['name']); |
|
54 | 54 | file_put_contents($path, $text); |
55 | 55 | file_put_contents($pathMap, trim($_POST['map'])); |
56 | 56 | $template = [ |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'name' => $_POST['name'], |
59 | 59 | 'file' => 'index.html', |
60 | 60 | ]; |
61 | - Config::save(App::$primary->path . '/templates/' . $_POST['name'] . '/config.php', $template); |
|
61 | + Config::save(App::$primary->path.'/templates/'.$_POST['name'].'/config.php', $template); |
|
62 | 62 | Tools::redirect('/admin/View'); |
63 | 63 | } |
64 | 64 | $this->view->page(); |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | $this->view->setTitle('Редактирование шаблона'); |
70 | 70 | App::$cur->view->customAsset('css', '/static/moduleAsset/View/css/blockDrop.css'); |
71 | 71 | App::$cur->view->customAsset('js', '/static/moduleAsset/View/js/blockDrop.js'); |
72 | - $template = Config::custom(App::$primary->path . '/templates/' . $templateName . '/config.php'); |
|
73 | - $pathMap = App::$primary->path . '/templates/' . $templateName . '/map.html'; |
|
72 | + $template = Config::custom(App::$primary->path.'/templates/'.$templateName.'/config.php'); |
|
73 | + $pathMap = App::$primary->path.'/templates/'.$templateName.'/map.html'; |
|
74 | 74 | if (!empty($_POST)) { |
75 | 75 | $templates = App::$primary->view->config; |
76 | 76 | $templates['app']['installed'][$templateName] = $_POST['name']; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | $template['template_name'] = $templateName; |
82 | 82 | $template['name'] = $templateName; |
83 | - Config::save(App::$primary->path . '/templates/' . $_POST['name'] . '/config.php', $template); |
|
83 | + Config::save(App::$primary->path.'/templates/'.$_POST['name'].'/config.php', $template); |
|
84 | 84 | Tools::redirect('/admin/View'); |
85 | 85 | } |
86 | 86 | $template['map'] = file_get_contents($pathMap); |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | { |
13 | 13 | public function editorcssAction() |
14 | 14 | { |
15 | - if (file_exists($this->view->template->path . '/css/editor.css')) { |
|
16 | - Tools::redirect('/static/templates/' . $this->view->template['name'] . '/css/editor.css'); |
|
15 | + if (file_exists($this->view->template->path.'/css/editor.css')) { |
|
16 | + Tools::redirect('/static/templates/'.$this->view->template['name'].'/css/editor.css'); |
|
17 | 17 | } else { |
18 | 18 | header("Content-type: text/css"); |
19 | 19 | exit(); |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | if ($args) { |
27 | 27 | $moduleName = ucfirst($args[0]); |
28 | 28 | $params = array_slice($args, 1); |
29 | - if (file_exists($this->view->template->path . '/program/modules/' . $moduleName . '/' . $moduleName . '.php')) { |
|
30 | - include_once $this->view->template->path . '/program/modules/' . $moduleName . '/' . $moduleName . '.php'; |
|
29 | + if (file_exists($this->view->template->path.'/program/modules/'.$moduleName.'/'.$moduleName.'.php')) { |
|
30 | + include_once $this->view->template->path.'/program/modules/'.$moduleName.'/'.$moduleName.'.php'; |
|
31 | 31 | $module = new $moduleName($this->module->app); |
32 | 32 | $cotroller = $module->findController(); |
33 | 33 | $cotroller->params = $params; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | { |
95 | 95 | $this->setParams($params); |
96 | 96 | if (!$this->path) { |
97 | - $this->path = $this->app->view->templatesPath . '/' . $this->name; |
|
97 | + $this->path = $this->app->view->templatesPath.'/'.$this->name; |
|
98 | 98 | } |
99 | 99 | $this->loadConfig(); |
100 | 100 | $this->setPage(); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | public function loadConfig($configPath = '') |
111 | 111 | { |
112 | 112 | if (!$configPath) { |
113 | - $configPath = $this->path . '/config.php'; |
|
113 | + $configPath = $this->path.'/config.php'; |
|
114 | 114 | } |
115 | 115 | $this->configPath = $configPath; |
116 | 116 | $this->config = \Config::custom($this->configPath); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | $this->page = $page; |
142 | 142 | if (!$this->pagePath) { |
143 | - $this->pagePath = $this->path . '/' . $this->page . '.html'; |
|
143 | + $this->pagePath = $this->path.'/'.$this->page.'.html'; |
|
144 | 144 | } |
145 | 145 | $this->pagePath = \Tools::pathsResolve($this->getPagePaths(), $this->pagePath); |
146 | 146 | } |
@@ -157,8 +157,8 @@ discard block |
||
157 | 157 | $page = $this->page; |
158 | 158 | } |
159 | 159 | return [ |
160 | - 'template' => $this->path . '/' . $page . '.html', |
|
161 | - 'defaultPage' => \Module::getModulePath('View') . '/templatePages/' . $page . '.html' |
|
160 | + 'template' => $this->path.'/'.$page.'.html', |
|
161 | + 'defaultPage' => \Module::getModulePath('View').'/templatePages/'.$page.'.html' |
|
162 | 162 | ]; |
163 | 163 | } |
164 | 164 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->content = \Controller::$cur->method; |
195 | 195 | } |
196 | 196 | if ((!$this->contentPath || $content) && \Module::$cur) { |
197 | - $this->contentPath = \Module::$cur->path . '/' . \Module::$cur->app->type . "Controllers/content/{$this->content}.php"; |
|
197 | + $this->contentPath = \Module::$cur->path.'/'.\Module::$cur->app->type."Controllers/content/{$this->content}.php"; |
|
198 | 198 | } |
199 | 199 | $this->contentPath = \Tools::pathsResolve($this->getContentPaths(), $this->contentPath); |
200 | 200 | } |
@@ -214,33 +214,33 @@ discard block |
||
214 | 214 | $paths = []; |
215 | 215 | if ($this->module) { |
216 | 216 | if (\Controller::$cur) { |
217 | - $paths['templateModuleController'] = $this->path . "/modules/{$this->module->moduleName}/" . \Controller::$cur->name . "/{$content}.php"; |
|
217 | + $paths['templateModuleController'] = $this->path."/modules/{$this->module->moduleName}/".\Controller::$cur->name."/{$content}.php"; |
|
218 | 218 | } |
219 | - $paths['templateModule'] = $this->path . "/modules/{$this->module->moduleName}/{$content}.php"; |
|
219 | + $paths['templateModule'] = $this->path."/modules/{$this->module->moduleName}/{$content}.php"; |
|
220 | 220 | } |
221 | 221 | if (\Module::$cur) { |
222 | 222 | if (\Controller::$cur) { |
223 | - $paths['templateCurModuleController'] = $this->path . "/modules/" . \Module::$cur->moduleName . "/" . \Controller::$cur->name . "/{$content}.php"; |
|
223 | + $paths['templateCurModuleController'] = $this->path."/modules/".\Module::$cur->moduleName."/".\Controller::$cur->name."/{$content}.php"; |
|
224 | 224 | } |
225 | - $paths['templateCurModule'] = $this->path . "/modules/" . \Module::$cur->moduleName . "/{$content}.php"; |
|
225 | + $paths['templateCurModule'] = $this->path."/modules/".\Module::$cur->moduleName."/{$content}.php"; |
|
226 | 226 | } |
227 | 227 | if (\Controller::$cur) { |
228 | - $paths['appControllerContentController'] = \Controller::$cur->module->app->path . '/modules/' . \Controller::$cur->module->moduleName . '/' . \Controller::$cur->module->app->type . "Controllers/content/" . \Controller::$cur->name . "/{$content}.php"; |
|
229 | - $paths['appControllerContent'] = \Controller::$cur->module->app->path . '/modules/' . \Controller::$cur->module->moduleName . '/' . \Controller::$cur->module->app->type . "Controllers/content/{$content}.php"; |
|
230 | - $paths['controllerContentController'] = \Controller::$cur->path . "/content/" . \Controller::$cur->name . "/{$content}.php"; |
|
231 | - $paths['controllerContent'] = \Controller::$cur->path . "/content/{$content}.php"; |
|
232 | - $paths['moduleControllerContentController'] = \Controller::$cur->module->path . '/' . \Controller::$cur->module->app->type . "Controllers/content/" . \Controller::$cur->name . "/{$content}.php"; |
|
233 | - $paths['moduleControllerContent'] = \Controller::$cur->module->path . '/' . \Controller::$cur->module->app->type . "Controllers/content/{$content}.php"; |
|
228 | + $paths['appControllerContentController'] = \Controller::$cur->module->app->path.'/modules/'.\Controller::$cur->module->moduleName.'/'.\Controller::$cur->module->app->type."Controllers/content/".\Controller::$cur->name."/{$content}.php"; |
|
229 | + $paths['appControllerContent'] = \Controller::$cur->module->app->path.'/modules/'.\Controller::$cur->module->moduleName.'/'.\Controller::$cur->module->app->type."Controllers/content/{$content}.php"; |
|
230 | + $paths['controllerContentController'] = \Controller::$cur->path."/content/".\Controller::$cur->name."/{$content}.php"; |
|
231 | + $paths['controllerContent'] = \Controller::$cur->path."/content/{$content}.php"; |
|
232 | + $paths['moduleControllerContentController'] = \Controller::$cur->module->path.'/'.\Controller::$cur->module->app->type."Controllers/content/".\Controller::$cur->name."/{$content}.php"; |
|
233 | + $paths['moduleControllerContent'] = \Controller::$cur->module->path.'/'.\Controller::$cur->module->app->type."Controllers/content/{$content}.php"; |
|
234 | 234 | } |
235 | 235 | if ($this->module) { |
236 | 236 | if (\Controller::$cur) { |
237 | - $paths['customModuleTemplateControllerContentController'] = $this->path . "/modules/" . $this->module->moduleName . "/" . \Controller::$cur->name . "/{$content}.php"; |
|
237 | + $paths['customModuleTemplateControllerContentController'] = $this->path."/modules/".$this->module->moduleName."/".\Controller::$cur->name."/{$content}.php"; |
|
238 | 238 | } |
239 | - $paths['customModuleTemplateControllerContent'] = $this->path . "/modules/" . $this->module->moduleName . "/{$content}.php"; |
|
239 | + $paths['customModuleTemplateControllerContent'] = $this->path."/modules/".$this->module->moduleName."/{$content}.php"; |
|
240 | 240 | } |
241 | 241 | if ($this->module && \Controller::$cur) { |
242 | - $paths['customModuleControllerContentController'] = $this->module->path . '/' . \Controller::$cur->module->app->type . "Controllers/content/" . \Controller::$cur->name . "/{$content}.php"; |
|
243 | - $paths['customModuleControllerContent'] = $this->module->path . '/' . \Controller::$cur->module->app->type . "Controllers/content/{$content}.php"; |
|
242 | + $paths['customModuleControllerContentController'] = $this->module->path.'/'.\Controller::$cur->module->app->type."Controllers/content/".\Controller::$cur->name."/{$content}.php"; |
|
243 | + $paths['customModuleControllerContent'] = $this->module->path.'/'.\Controller::$cur->module->app->type."Controllers/content/{$content}.php"; |
|
244 | 244 | } |
245 | 245 | return $paths; |
246 | 246 | } |
@@ -260,10 +260,10 @@ discard block |
||
260 | 260 | if (!$templatesPath) { |
261 | 261 | $templatesPath = $app->view->templatesPath; |
262 | 262 | } |
263 | - if (file_exists($templatesPath . '/' . $templateName)) { |
|
263 | + if (file_exists($templatesPath.'/'.$templateName)) { |
|
264 | 264 | return new Template([ |
265 | 265 | 'name' => $templateName, |
266 | - 'path' => $templatesPath . '/' . $templateName, |
|
266 | + 'path' => $templatesPath.'/'.$templateName, |
|
267 | 267 | 'app' => $app |
268 | 268 | ]); |
269 | 269 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function el($name, $option = []) |
14 | 14 | { |
15 | - $className = get_called_class() . '\\' . $name; |
|
15 | + $className = get_called_class().'\\'.$name; |
|
16 | 16 | if (class_exists($className)) { |
17 | 17 | return new $className(); |
18 | 18 | } |
@@ -89,16 +89,16 @@ |
||
89 | 89 | |
90 | 90 | public function name() |
91 | 91 | { |
92 | - if ($this->first_name . $this->last_name . $this->middle_name) { |
|
92 | + if ($this->first_name.$this->last_name.$this->middle_name) { |
|
93 | 93 | $name = ''; |
94 | 94 | if ($this->first_name) { |
95 | - $name.=$this->first_name; |
|
95 | + $name .= $this->first_name; |
|
96 | 96 | } |
97 | 97 | if ($this->middle_name) { |
98 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
98 | + $name .= ($name ? ' ' : '').$this->middle_name; |
|
99 | 99 | } |
100 | 100 | if ($this->last_name) { |
101 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
101 | + $name .= ($name ? ' ' : '').$this->last_name; |
|
102 | 102 | } |
103 | 103 | return $name; |
104 | 104 | } else { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | $user = Users\User::get($userId); |
25 | 25 | App::$cur->users->newSession($user); |
26 | - Tools::redirect('/', 'Теперь вы на сайте под пользователем ' . $user->name()); |
|
26 | + Tools::redirect('/', 'Теперь вы на сайте под пользователем '.$user->name()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } else { |
46 | 46 | $user = new Users\User(array( |
47 | 47 | 'user_login' => 'admin', |
48 | - 'user_mail' => 'admin@' . idn_to_utf8(INJI_DOMAIN_NAME), |
|
48 | + 'user_mail' => 'admin@'.idn_to_utf8(INJI_DOMAIN_NAME), |
|
49 | 49 | 'user_pass' => password_hash('admin', PASSWORD_DEFAULT), |
50 | 50 | 'user_group_id' => $groupObject->id, |
51 | 51 | 'user_role_id' => $roleObject->id, |