@@ -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 | } |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | foreach ($templates['app']['installed'] as $template => $name) { |
| 16 | 16 | $table->addRow([ |
| 17 | 17 | $name, |
| 18 | - (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию', |
|
| 19 | - '<a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>' |
|
| 18 | + (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/'.$template.'">Установить по умолчанию</a>' : 'Тема по умолчанию', |
|
| 19 | + '<a href = "/admin/view/editTemplate/'.$template.'">Редактировать</a>' |
|
| 20 | 20 | ]); |
| 21 | 21 | } |
| 22 | 22 | $table->draw(); |
| 23 | 23 | \ No newline at end of file |
@@ -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); |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | if (!empty($this->config[$this->app->type]['current'])) { |
| 38 | 38 | $templateName = $this->config[$this->app->type]['current']; |
| 39 | 39 | if (!empty($this->config[$this->app->type]['installed'][$templateName]['location'])) { |
| 40 | - $this->templatesPath = App::$primary->path . "/templates"; |
|
| 40 | + $this->templatesPath = App::$primary->path."/templates"; |
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | if (!$this->templatesPath) { |
| 44 | - $this->templatesPath = $this->app->path . "/templates"; |
|
| 44 | + $this->templatesPath = $this->app->path."/templates"; |
|
| 45 | 45 | } |
| 46 | 46 | $this->template = \View\Template::get($templateName, $this->app, $this->templatesPath); |
| 47 | 47 | if (!$this->template) { |
| 48 | 48 | $this->template = new \View\Template([ |
| 49 | 49 | 'name' => 'default', |
| 50 | - 'path' => $this->templatesPath . '/default', |
|
| 50 | + 'path' => $this->templatesPath.'/default', |
|
| 51 | 51 | 'app' => $this->app |
| 52 | 52 | ]); |
| 53 | 53 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | case 'WIDGET': |
| 165 | 165 | $source = $this->cutTag($source, $rawTag); |
| 166 | 166 | $params = array_slice($tag, 2); |
| 167 | - $this->widget($tag[1], ['params' => $params], ':' . implode(':', $params)); |
|
| 167 | + $this->widget($tag[1], ['params' => $params], ':'.implode(':', $params)); |
|
| 168 | 168 | break; |
| 169 | 169 | case 'HEAD': |
| 170 | 170 | $source = $this->cutTag($source, $rawTag); |
@@ -187,18 +187,18 @@ discard block |
||
| 187 | 187 | { |
| 188 | 188 | $pos = strpos($source, $rawTag) - 1; |
| 189 | 189 | echo substr($source, 0, $pos); |
| 190 | - return substr($source, ( $pos + strlen($rawTag) + 2)); |
|
| 190 | + return substr($source, ($pos + strlen($rawTag) + 2)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | public function getHref($type, $params) |
| 194 | 194 | { |
| 195 | 195 | $href = ''; |
| 196 | 196 | if (is_string($params)) { |
| 197 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params; |
|
| 197 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params; |
|
| 198 | 198 | } elseif (empty($params['template']) && !empty($params['file'])) { |
| 199 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params['file']; |
|
| 199 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params['file']; |
|
| 200 | 200 | } elseif (!empty($params['template']) && !empty($params['file'])) { |
| 201 | - $href = $this->app->templatesPath . "/{$this->template->name}/{$type}/{$params['file']}"; |
|
| 201 | + $href = $this->app->templatesPath."/{$this->template->name}/{$type}/{$params['file']}"; |
|
| 202 | 202 | } |
| 203 | 203 | return $href; |
| 204 | 204 | } |
@@ -235,16 +235,16 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | echo "<title>{$this->title}</title>\n"; |
| 237 | 237 | |
| 238 | - if (!empty($this->template->config['favicon']) && file_exists($this->template->path . "/{$this->template->config['favicon']}")) { |
|
| 238 | + if (!empty($this->template->config['favicon']) && file_exists($this->template->path."/{$this->template->config['favicon']}")) { |
|
| 239 | 239 | echo " <link rel='shortcut icon' href='/templates/{$this->template->name}/{$this->template->config['favicon']}' />"; |
| 240 | - } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path . "/static/images/{$this->template->config['favicon']}")) { |
|
| 240 | + } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path."/static/images/{$this->template->config['favicon']}")) { |
|
| 241 | 241 | echo " <link rel='shortcut icon' href='/static/images/{$this->template->config['favicon']}' />"; |
| 242 | - } elseif (file_exists($this->app->path . '/static/images/favicon.ico')) { |
|
| 242 | + } elseif (file_exists($this->app->path.'/static/images/favicon.ico')) { |
|
| 243 | 243 | echo " <link rel='shortcut icon' href='/static/images/favicon.ico' />"; |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | foreach ($this->getMetaTags() as $meta) { |
| 247 | - echo "\n " . Html::el('meta', $meta, '', null); |
|
| 247 | + echo "\n ".Html::el('meta', $meta, '', null); |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | if (!empty(Inji::$config['assets']['js'])) { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $this->checkNeedLibs(); |
| 257 | 257 | $this->parseCss(); |
| 258 | - echo "\n <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '' ) . "/static/system/js/Inji.js") . "'></script>"; |
|
| 258 | + echo "\n <script src='".Statics::file(($this->app->type != 'app' ? '/'.$this->app->name : '')."/static/system/js/Inji.js")."'></script>"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | public function parseCss() |
@@ -279,25 +279,25 @@ discard block |
||
| 279 | 279 | if (file_exists($path)) { |
| 280 | 280 | $this->loadedCss[$href] = $href; |
| 281 | 281 | $urls[$href] = $path; |
| 282 | - $timeStr.=filemtime($path); |
|
| 282 | + $timeStr .= filemtime($path); |
|
| 283 | 283 | } else { |
| 284 | 284 | echo "\n <link href='{$href}' rel='stylesheet' type='text/css' />"; |
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | $timeMd5 = md5($timeStr); |
| 288 | 288 | $cacheDir = Cache::getDir('static'); |
| 289 | - if (!file_exists($cacheDir . '/all' . $timeMd5 . '.css')) { |
|
| 289 | + if (!file_exists($cacheDir.'/all'.$timeMd5.'.css')) { |
|
| 290 | 290 | foreach ($urls as $primaryUrl => $url) { |
| 291 | 291 | $source = file_get_contents($url); |
| 292 | 292 | $rootPath = substr($primaryUrl, 0, strrpos($primaryUrl, '/')); |
| 293 | 293 | $levelUpPath = substr($rootPath, 0, strrpos($rootPath, '/')); |
| 294 | - $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1' . $levelUpPath, $source); |
|
| 295 | - $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1' . $rootPath, $source); |
|
| 296 | - $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1' . $rootPath . '/$2', $source); |
|
| 297 | - $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url(' . $rootPath . '/$1$2', $source); |
|
| 294 | + $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1'.$levelUpPath, $source); |
|
| 295 | + $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1'.$rootPath, $source); |
|
| 296 | + $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1'.$rootPath.'/$2', $source); |
|
| 297 | + $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url('.$rootPath.'/$1$2', $source); |
|
| 298 | 298 | $cssAll .= $source; |
| 299 | 299 | } |
| 300 | - file_put_contents($cacheDir . '/all' . $timeMd5 . '.css', $cssAll); |
|
| 300 | + file_put_contents($cacheDir.'/all'.$timeMd5.'.css', $cssAll); |
|
| 301 | 301 | } |
| 302 | 302 | echo "\n <link href='/{$cacheDir}/all{$timeMd5}.css' rel='stylesheet' type='text/css' />"; |
| 303 | 303 | } |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | if (strpos($css, '//') !== false) |
| 330 | 330 | $href = $css; |
| 331 | 331 | else |
| 332 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
| 332 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css; |
|
| 333 | 333 | $hrefs[$href] = $href; |
| 334 | 334 | } |
| 335 | 335 | break; |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | if (strpos($css, '://') !== false) |
| 343 | 343 | $href = $css; |
| 344 | 344 | else |
| 345 | - $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}"; |
|
| 345 | + $href = $this->app->templatesPath."/{$this->template->name}/css/{$css}"; |
|
| 346 | 346 | $hrefs[$href] = $href; |
| 347 | 347 | } |
| 348 | 348 | break; |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | if (strpos($css, '//') !== false) |
| 356 | 356 | $href = $css; |
| 357 | 357 | else |
| 358 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
| 358 | + $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css; |
|
| 359 | 359 | $hrefs[$href] = $href; |
| 360 | 360 | } |
| 361 | 361 | break; |
@@ -375,9 +375,9 @@ discard block |
||
| 375 | 375 | if (!empty($this->app->config['site']['metatags'])) { |
| 376 | 376 | foreach ($this->app->config['site']['metatags'] as $meta) { |
| 377 | 377 | if (!empty($meta['name'])) { |
| 378 | - $metas['metaName:' . $meta['name']] = $meta; |
|
| 378 | + $metas['metaName:'.$meta['name']] = $meta; |
|
| 379 | 379 | } elseif (!empty($meta['property'])) { |
| 380 | - $metas['metaProperty:' . $meta['property']] = $meta; |
|
| 380 | + $metas['metaProperty:'.$meta['property']] = $meta; |
|
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 | } |
@@ -390,9 +390,9 @@ discard block |
||
| 390 | 390 | public function addMetaTag($meta) |
| 391 | 391 | { |
| 392 | 392 | if (!empty($meta['name'])) { |
| 393 | - $this->dynMetas['metaName:' . $meta['name']] = $meta; |
|
| 393 | + $this->dynMetas['metaName:'.$meta['name']] = $meta; |
|
| 394 | 394 | } elseif (!empty($meta['property'])) { |
| 395 | - $this->dynMetas['metaProperty:' . $meta['property']] = $meta; |
|
| 395 | + $this->dynMetas['metaProperty:'.$meta['property']] = $meta; |
|
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | if (file_exists($path)) { |
| 417 | 417 | $nativeUrl[$script] = $script; |
| 418 | 418 | $urls[$script] = $path; |
| 419 | - $timeStr.=filemtime($path); |
|
| 419 | + $timeStr .= filemtime($path); |
|
| 420 | 420 | } else { |
| 421 | 421 | $noParsedScripts[$script] = $script; |
| 422 | 422 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | if (!empty($script['name'])) { |
| 432 | 432 | $onLoadModules[$script['name']] = $script['name']; |
| 433 | 433 | } |
| 434 | - $timeStr.=filemtime($path); |
|
| 434 | + $timeStr .= filemtime($path); |
|
| 435 | 435 | } else { |
| 436 | 436 | $noParsedScripts[$script] = $script; |
| 437 | 437 | } |
@@ -440,20 +440,20 @@ discard block |
||
| 440 | 440 | |
| 441 | 441 | $timeMd5 = md5($timeStr); |
| 442 | 442 | $cacheDir = Cache::getDir('static'); |
| 443 | - if (!file_exists($cacheDir . '/all' . $timeMd5 . '.js')) { |
|
| 443 | + if (!file_exists($cacheDir.'/all'.$timeMd5.'.js')) { |
|
| 444 | 444 | foreach ($urls as $url) { |
| 445 | - $scriptAll .= ';' . file_get_contents($url); |
|
| 445 | + $scriptAll .= ';'.file_get_contents($url); |
|
| 446 | 446 | } |
| 447 | - file_put_contents($cacheDir . '/all' . $timeMd5 . '.js', $scriptAll); |
|
| 447 | + file_put_contents($cacheDir.'/all'.$timeMd5.'.js', $scriptAll); |
|
| 448 | 448 | } |
| 449 | 449 | $options = [ |
| 450 | 450 | 'scripts' => array_values($noParsedScripts), |
| 451 | 451 | 'compresedScripts' => $nativeUrl, |
| 452 | 452 | 'styles' => [], |
| 453 | - 'appRoot' => $this->app->type == 'app' ? '/' : '/' . $this->app->name . '/', |
|
| 453 | + 'appRoot' => $this->app->type == 'app' ? '/' : '/'.$this->app->name.'/', |
|
| 454 | 454 | 'onLoadModules' => $onLoadModules |
| 455 | 455 | ]; |
| 456 | - $options['scripts'][] = '/' . $cacheDir . '/all' . $timeMd5 . '.js'; |
|
| 456 | + $options['scripts'][] = '/'.$cacheDir.'/all'.$timeMd5.'.js'; |
|
| 457 | 457 | $this->widget('View\bodyEnd', compact('options')); |
| 458 | 458 | } |
| 459 | 459 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | if (strpos($js, '//') !== false) |
| 501 | 501 | $href = $js; |
| 502 | 502 | else |
| 503 | - $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}"; |
|
| 503 | + $href = $this->app->templatesPath."/{$this->template->name}/js/{$js}"; |
|
| 504 | 504 | $resultArray[] = $href; |
| 505 | 505 | } |
| 506 | 506 | break; |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | public function setTitle($title, $add = true) |
| 537 | 537 | { |
| 538 | 538 | if ($add && !empty($this->app->config['site']['name'])) { |
| 539 | - $this->title = $title . ' - ' . $this->app->config['site']['name']; |
|
| 539 | + $this->title = $title.' - '.$this->app->config['site']['name']; |
|
| 540 | 540 | } else { |
| 541 | 541 | $this->title = $title; |
| 542 | 542 | } |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | } |
| 563 | 563 | } |
| 564 | 564 | if (!$paramArray) |
| 565 | - $lineParams = ':' . implode(':', $_params); |
|
| 565 | + $lineParams = ':'.implode(':', $_params); |
|
| 566 | 566 | } |
| 567 | 567 | } |
| 568 | 568 | echo "<!--start:{WIDGET:{$_widgetName}{$lineParams}}-->\n"; |
@@ -581,24 +581,24 @@ discard block |
||
| 581 | 581 | if (strpos($widgetName, '\\')) { |
| 582 | 582 | $widgetName = explode('\\', $widgetName); |
| 583 | 583 | |
| 584 | - $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '/' . $widgetName[1] . '.php'; |
|
| 585 | - $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '.php'; |
|
| 584 | + $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'/'.$widgetName[1].'.php'; |
|
| 585 | + $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'.php'; |
|
| 586 | 586 | App::$cur->$widgetName[0]; |
| 587 | 587 | $modulePaths = Module::getModulePaths(ucfirst($widgetName[0])); |
| 588 | 588 | foreach ($modulePaths as $pathName => $path) { |
| 589 | - $paths[$pathName . '_widgetDir'] = $path . '/widgets/' . $widgetName[1] . '/' . $widgetName[1] . '.php'; |
|
| 590 | - $paths[$pathName] = $path . '/widgets/' . $widgetName[1] . '.php'; |
|
| 589 | + $paths[$pathName.'_widgetDir'] = $path.'/widgets/'.$widgetName[1].'/'.$widgetName[1].'.php'; |
|
| 590 | + $paths[$pathName] = $path.'/widgets/'.$widgetName[1].'.php'; |
|
| 591 | 591 | } |
| 592 | 592 | return $paths; |
| 593 | 593 | } else { |
| 594 | - $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
| 595 | - $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '.php'; |
|
| 594 | + $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
| 595 | + $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'.php'; |
|
| 596 | 596 | |
| 597 | - $paths['curAppPath_widgetDir'] = $this->app->path . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
| 598 | - $paths['curAppPath'] = $this->app->path . '/widgets/' . $widgetName . '.php'; |
|
| 597 | + $paths['curAppPath_widgetDir'] = $this->app->path.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
| 598 | + $paths['curAppPath'] = $this->app->path.'/widgets/'.$widgetName.'.php'; |
|
| 599 | 599 | |
| 600 | - $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '/' . $widgetName . '.php'; |
|
| 601 | - $paths['systemPath'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '.php'; |
|
| 600 | + $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'/'.$widgetName.'.php'; |
|
| 601 | + $paths['systemPath'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'.php'; |
|
| 602 | 602 | } |
| 603 | 603 | return $paths; |
| 604 | 604 | } |
@@ -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 { |