@@ -10,7 +10,6 @@ |
||
10 | 10 | use Ffcms\Core\Exception\ForbiddenException; |
11 | 11 | use Ffcms\Core\Helper\FileSystem\File; |
12 | 12 | use Ffcms\Core\Helper\Type\Str; |
13 | -use Ffcms\Core\Helper\Url; |
|
14 | 13 | |
15 | 14 | class Main extends ApiController |
16 | 15 | { |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | 'roots' => [ |
39 | 39 | [ |
40 | 40 | 'driver' => 'LocalFileSystem', |
41 | - 'path' => root . '/upload/', |
|
42 | - 'URL' => App::$Alias->scriptUrl . '/upload/' |
|
41 | + 'path' => root.'/upload/', |
|
42 | + 'URL' => App::$Alias->scriptUrl.'/upload/' |
|
43 | 43 | ] |
44 | 44 | ] |
45 | 45 | ])); |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | { |
105 | 105 | $this->setJsonHeader(); |
106 | 106 | // get ffcms news if cache is not available |
107 | - $cache = App::$Cache->getItem('download.ffcms.api.news.' . $this->lang); |
|
107 | + $cache = App::$Cache->getItem('download.ffcms.api.news.'.$this->lang); |
|
108 | 108 | if ($cache->isHit()) { |
109 | - $cache->set(File::getFromUrl('https://ffcms.org/api/api/news?lang=' . $this->lang)) |
|
109 | + $cache->set(File::getFromUrl('https://ffcms.org/api/api/news?lang='.$this->lang)) |
|
110 | 110 | ->expiresAfter(1440); |
111 | 111 | } |
112 | 112 | $news = $cache->get(); |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use Ffcms\Core\Helper\FileSystem\Directory; |
12 | 12 | use Ffcms\Core\Helper\FileSystem\File; |
13 | 13 | use Ffcms\Core\Helper\Type\Any; |
14 | -use Ffcms\Core\Helper\Type\Obj; |
|
15 | 14 | use Ffcms\Core\Helper\Type\Str; |
16 | 15 | |
17 | 16 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if ($this->_content->id === null) { |
60 | 60 | $this->_new = true; |
61 | 61 | if (!$this->galleryFreeId) { |
62 | - $this->galleryFreeId = '_tmp_' . Str::randomLatin(mt_rand(16, 32)); |
|
62 | + $this->galleryFreeId = '_tmp_'.Str::randomLatin(mt_rand(16, 32)); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | if (!$this->authorId) { |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | public function rules(): array |
95 | 95 | { |
96 | 96 | $res = [ |
97 | - ['title.' . App::$Request->getLanguage(), 'required'], |
|
98 | - ['text.' . App::$Request->getLanguage(), 'required'], |
|
97 | + ['title.'.App::$Request->getLanguage(), 'required'], |
|
98 | + ['text.'.App::$Request->getLanguage(), 'required'], |
|
99 | 99 | ['text', 'used'], |
100 | 100 | ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'], |
101 | 101 | [['path', 'categoryId', 'authorId', 'display', 'galleryFreeId', 'title', 'important'], 'required'], |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | ]; |
109 | 109 | |
110 | 110 | foreach (App::$Properties->get('languages') as $lang) { |
111 | - $res[] = ['title.' . $lang, 'length_max', 120, null, true, true]; |
|
112 | - $res[] = ['keywords.' . $lang, 'length_max', 150]; |
|
113 | - $res[] = ['description.' . $lang, 'length_max', 250]; |
|
111 | + $res[] = ['title.'.$lang, 'length_max', 120, null, true, true]; |
|
112 | + $res[] = ['keywords.'.$lang, 'length_max', 150]; |
|
113 | + $res[] = ['description.'.$lang, 'length_max', 250]; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return $res; |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | $this->_content->meta_keywords = $this->metaKeywords; |
167 | 167 | $this->_content->meta_description = $this->metaDescription; |
168 | 168 | $this->_content->source = $this->source; |
169 | - $this->_content->important = (int)$this->important; |
|
169 | + $this->_content->important = (int) $this->important; |
|
170 | 170 | // check if rating is changed |
171 | - if ((int)$this->addRating !== 0) { |
|
172 | - $this->_content->rating += (int)$this->addRating; |
|
171 | + if ((int) $this->addRating !== 0) { |
|
172 | + $this->_content->rating += (int) $this->addRating; |
|
173 | 173 | } |
174 | 174 | // check if special comment hash is exist |
175 | 175 | if ($this->_new || Str::length($this->_content->comment_hash) < 32) { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | // save poster data |
185 | - $posterPath = '/upload/gallery/' . $this->galleryFreeId . '/orig/' . $this->poster; |
|
185 | + $posterPath = '/upload/gallery/'.$this->galleryFreeId.'/orig/'.$this->poster; |
|
186 | 186 | if (File::exist($posterPath)) { |
187 | 187 | $this->_content->poster = $this->poster; |
188 | 188 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | // move files |
219 | 219 | if ($tmpGalleryId !== $this->_content->id) { |
220 | - Directory::rename('/upload/gallery/' . $tmpGalleryId, $this->_content->id); |
|
220 | + Directory::rename('/upload/gallery/'.$tmpGalleryId, $this->_content->id); |
|
221 | 221 | } |
222 | 222 | } |
223 | 223 |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Apps\ActiveRecord\System; |
6 | 6 | use Ffcms\Core\Arch\Model; |
7 | -use Ffcms\Core\Helper\FileSystem\File; |
|
8 | 7 | use Ffcms\Core\Helper\Type\Str; |
9 | 8 | use Ffcms\Core\Managers\MigrationsManager; |
10 | 9 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $name = Str::firstIn($fullName, '-'); |
44 | 44 | // get update version number from migration name |
45 | 45 | list($type, $obj, $version) = explode('_', $name); |
46 | - $intVersion = (int)Str::replace('.', '', $this->dbVersion); |
|
46 | + $intVersion = (int) Str::replace('.', '', $this->dbVersion); |
|
47 | 47 | // if migration version > db version - implement it |
48 | 48 | if ($version > $intVersion) { |
49 | 49 | $this->updateQueries[] = $file; |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Ffcms\Core\App; |
9 | 9 | use Ffcms\Core\Arch\Model; |
10 | 10 | use Ffcms\Core\Helper\Type\Any; |
11 | -use Ffcms\Core\Helper\Type\Obj; |
|
12 | 11 | use Ffcms\Core\Helper\Type\Str; |
13 | 12 | use Ffcms\Core\Interfaces\iUser; |
14 | 13 |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use Ffcms\Core\Helper\FileSystem\File; |
13 | 13 | use Ffcms\Core\Helper\Type\Any; |
14 | 14 | use Ffcms\Core\Helper\Type\Arr; |
15 | -use Ffcms\Core\Helper\Type\Obj; |
|
16 | 15 | use Ffcms\Core\Helper\Type\Str; |
17 | 16 | |
18 | 17 | /** |
@@ -66,7 +66,7 @@ |
||
66 | 66 | /** |
67 | 67 | * Prepare model attributes from passed objects |
68 | 68 | * @throws ForbiddenException |
69 | - */ |
|
69 | + */ |
|
70 | 70 | public function before() |
71 | 71 | { |
72 | 72 | $this->id = $this->_content->id; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $this->id = $this->_content->id; |
73 | 73 | $this->title = $this->_content->getLocaled('title'); |
74 | 74 | $this->text = $this->_content->getLocaled('text'); |
75 | - $this->display = (bool)$this->_content->display; |
|
75 | + $this->display = (bool) $this->_content->display; |
|
76 | 76 | |
77 | 77 | // check if title and text are exists |
78 | 78 | if (Str::length($this->title) < 1 || Str::length($this->text) < 1) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | $this->source = $this->_content->source; |
105 | - $this->views = $this->_content->views+1; |
|
105 | + $this->views = $this->_content->views + 1; |
|
106 | 106 | // check for dependence, add '' for general cat, ex: general/depend1/depend2/.../depend-n |
107 | 107 | $catNestingArray = Arr::merge([0 => ''], explode('/', $this->catPath)); |
108 | 108 | if ($catNestingArray > 1) { |
@@ -134,15 +134,15 @@ discard block |
||
134 | 134 | ]; |
135 | 135 | |
136 | 136 | // get gallery images and poster data |
137 | - $galleryPath = '/upload/gallery/' . $this->_content->id; |
|
137 | + $galleryPath = '/upload/gallery/'.$this->_content->id; |
|
138 | 138 | // check if gallery folder is exist |
139 | 139 | if (Directory::exist($galleryPath)) { |
140 | - $originImages = File::listFiles($galleryPath . '/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true); |
|
140 | + $originImages = File::listFiles($galleryPath.'/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true); |
|
141 | 141 | // generate poster data |
142 | 142 | if (Arr::in($this->_content->poster, $originImages)) { |
143 | 143 | // original poster |
144 | 144 | $posterName = $this->_content->poster; |
145 | - $this->posterFull = $galleryPath . '/orig/' . $posterName; |
|
145 | + $this->posterFull = $galleryPath.'/orig/'.$posterName; |
|
146 | 146 | if (!File::exist($this->posterFull)) { |
147 | 147 | $this->posterFull = null; |
148 | 148 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $posterSplit = explode('.', $posterName); |
152 | 152 | array_pop($posterSplit); |
153 | 153 | $posterCleanName = implode('.', $posterSplit); |
154 | - $this->posterThumb = $galleryPath . '/thumb/' . $posterCleanName . '.jpg'; |
|
154 | + $this->posterThumb = $galleryPath.'/thumb/'.$posterCleanName.'.jpg'; |
|
155 | 155 | if (!File::exist($this->posterThumb)) { |
156 | 156 | $this->posterThumb = null; |
157 | 157 | } |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | continue; |
168 | 168 | } |
169 | 169 | |
170 | - $thumbPath = $galleryPath . '/thumb/' . $imageClearName . '.jpg'; |
|
170 | + $thumbPath = $galleryPath.'/thumb/'.$imageClearName.'.jpg'; |
|
171 | 171 | if (File::exist($thumbPath)) { |
172 | - $this->galleryItems[$thumbPath] = $galleryPath . '/orig/' . $image; |
|
172 | + $this->galleryItems[$thumbPath] = $galleryPath.'/orig/'.$image; |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $this->rating = $this->_content->rating; |
179 | 179 | $ignoredRate = App::$Session->get('content.rate.ignore'); |
180 | 180 | $this->canRate = true; |
181 | - if (Any::isArray($ignoredRate) && Arr::in((string)$this->id, $ignoredRate)) { |
|
181 | + if (Any::isArray($ignoredRate) && Arr::in((string) $this->id, $ignoredRate)) { |
|
182 | 182 | $this->canRate = false; |
183 | 183 | } |
184 | 184 | if (!App::$User->isAuth()) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | /** |
33 | 33 | * EntityContentSearch constructor. Pass search terms (query string) to model and used items to skip it by id. |
34 | 34 | * @param $terms |
35 | - * @param int|array $skipIds |
|
35 | + * @param integer $skipIds |
|
36 | 36 | * @param int|null $categoryId |
37 | 37 | */ |
38 | 38 | public function __construct($terms, $skipIds = 0, $categoryId = null) |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Ffcms\Core\Exception\NotFoundException; |
9 | 9 | use Ffcms\Core\Helper\Text; |
10 | 10 | use Ffcms\Core\Helper\Type\Any; |
11 | -use Ffcms\Core\Helper\Type\Obj; |
|
12 | 11 | use Ffcms\Core\Helper\Type\Str; |
13 | 12 | |
14 | 13 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $index = implode('-', $this->_skip); |
63 | 63 | // try to get this slow query from cache |
64 | - $cache = App::$Cache->getItem('entity.content.search.index.' . $index); |
|
64 | + $cache = App::$Cache->getItem('entity.content.search.index.'.$index); |
|
65 | 65 | if (!$cache->isHit()) { |
66 | 66 | $cache->set($this->makeSearch()); |
67 | 67 | $cache->expiresAfter(static::CACHE_TIME); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $this->items[] = [ |
95 | 95 | 'title' => $item->getLocaled('title'), |
96 | 96 | 'snippet' => Text::snippet($text), |
97 | - 'uri' => '/content/read/' . $item->getPath(), |
|
97 | + 'uri' => '/content/read/'.$item->getPath(), |
|
98 | 98 | 'thumb' => $item->getPosterThumbUri() |
99 | 99 | ]; |
100 | 100 | } |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use Ffcms\Core\Helper\FileSystem\Directory; |
10 | 10 | use Ffcms\Core\Helper\FileSystem\Normalize; |
11 | 11 | use Ffcms\Core\Helper\Type\Any; |
12 | -use Ffcms\Core\Helper\Type\Obj; |
|
13 | 12 | use Ffcms\Core\Helper\Type\Str; |
14 | 13 | use Gregwar\Image\Image; |
15 | 14 |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - * Set default values from database record |
|
48 | - */ |
|
47 | + * Set default values from database record |
|
48 | + */ |
|
49 | 49 | public function before() |
50 | 50 | { |
51 | 51 | // set data from db record |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * Form labels |
|
89 | - * @return array |
|
90 | - */ |
|
88 | + * Form labels |
|
89 | + * @return array |
|
90 | + */ |
|
91 | 91 | public function labels(): array |
92 | 92 | { |
93 | 93 | return [ |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
103 | - * Content update form validation rules |
|
104 | - * @return array |
|
105 | - */ |
|
103 | + * Content update form validation rules |
|
104 | + * @return array |
|
105 | + */ |
|
106 | 106 | public function rules(): array |
107 | 107 | { |
108 | 108 | $r = [ |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | // set current user id |
58 | 58 | $this->authorId = App::$User->identity()->getId(); |
59 | 59 | // set true if it is a new content item |
60 | - if ($this->_record->id === null || (int)$this->_record->id < 1) { |
|
60 | + if ($this->_record->id === null || (int) $this->_record->id < 1) { |
|
61 | 61 | $this->_new = true; |
62 | 62 | } |
63 | 63 | |
64 | 64 | // set random path slug if not defined |
65 | 65 | if ($this->path === null || Str::likeEmpty($this->path)) { |
66 | - $randPath = date('d-m-Y') . '-' . Str::randomLatin(mt_rand(8, 12)); |
|
66 | + $randPath = date('d-m-Y').'-'.Str::randomLatin(mt_rand(8, 12)); |
|
67 | 67 | $this->path = Str::lowerCase($randPath); |
68 | 68 | } |
69 | 69 | } |
@@ -107,21 +107,21 @@ discard block |
||
107 | 107 | { |
108 | 108 | $r = [ |
109 | 109 | [['path', 'categoryId'], 'required'], |
110 | - ['title.' . App::$Request->getLanguage(), 'required'], |
|
111 | - ['text.' . App::$Request->getLanguage(), 'required', null, true, true], |
|
110 | + ['title.'.App::$Request->getLanguage(), 'required'], |
|
111 | + ['text.'.App::$Request->getLanguage(), 'required', null, true, true], |
|
112 | 112 | ['text', 'used', null, true, true], |
113 | 113 | ['path', 'direct_match', '/^[a-zA-Z0-9\-]+$/'], |
114 | 114 | ['categoryId', 'in', $this->categoryIds()], |
115 | 115 | ['path', 'Apps\Model\Front\Content\FormNarrowContentUpdate::validatePath'], |
116 | 116 | ['poster', 'used'], |
117 | 117 | ['poster', 'isFile', ['jpg', 'png', 'gif', 'jpeg']], |
118 | - ['poster', 'sizeFile', (int)$this->_configs['gallerySize'] * 1024] // in bytes |
|
118 | + ['poster', 'sizeFile', (int) $this->_configs['gallerySize'] * 1024] // in bytes |
|
119 | 119 | ]; |
120 | 120 | |
121 | 121 | foreach (App::$Properties->get('languages') as $lang) { |
122 | - $r[] = ['title.' . $lang, 'length_max', 120, null, true, true]; |
|
123 | - $r[] = ['keywords.' . $lang, 'length_max', 150]; |
|
124 | - $r[] = ['description.' . $lang, 'length_max', 250]; |
|
122 | + $r[] = ['title.'.$lang, 'length_max', 120, null, true, true]; |
|
123 | + $r[] = ['keywords.'.$lang, 'length_max', 150]; |
|
124 | + $r[] = ['description.'.$lang, 'length_max', 250]; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | return $r; |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | $this->_record->title = $this->title; |
148 | 148 | $this->_record->text = $this->text; |
149 | 149 | $this->_record->path = $this->path; |
150 | - $this->_record->category_id = (int)$this->categoryId; |
|
150 | + $this->_record->category_id = (int) $this->categoryId; |
|
151 | 151 | $this->_record->display = 0; // set to premoderation |
152 | - $this->_record->author_id = (int)$this->authorId; |
|
152 | + $this->_record->author_id = (int) $this->authorId; |
|
153 | 153 | if ($this->_new) { |
154 | 154 | $this->_record->comment_hash = $this->generateCommentHash(); |
155 | 155 | } |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | // work with poster data |
160 | 160 | if ($this->poster !== null) { |
161 | 161 | // lets move poster from tmp to gallery |
162 | - $originDir = '/upload/gallery/' . $this->_record->id . '/orig/'; |
|
163 | - $thumbDir = '/upload/gallery/' . $this->_record->id . '/thumb/'; |
|
162 | + $originDir = '/upload/gallery/'.$this->_record->id.'/orig/'; |
|
163 | + $thumbDir = '/upload/gallery/'.$this->_record->id.'/thumb/'; |
|
164 | 164 | if (!Directory::exist($originDir)) { |
165 | 165 | Directory::create($originDir); |
166 | 166 | } |
@@ -169,17 +169,17 @@ discard block |
||
169 | 169 | Directory::create($thumbDir); |
170 | 170 | } |
171 | 171 | |
172 | - $fileName = App::$Security->simpleHash($this->poster->getClientOriginalName() . $this->poster->getSize()); |
|
173 | - $newFullName = $fileName . '.' . $this->poster->guessExtension(); |
|
172 | + $fileName = App::$Security->simpleHash($this->poster->getClientOriginalName().$this->poster->getSize()); |
|
173 | + $newFullName = $fileName.'.'.$this->poster->guessExtension(); |
|
174 | 174 | // move poster to upload gallery directory |
175 | 175 | $this->poster->move(Normalize::diskFullPath($originDir), $newFullName); |
176 | 176 | // initialize image resizer |
177 | 177 | $thumb = new Image(); |
178 | - $thumb->setCacheDir(root . '/Private/Cache/images'); |
|
178 | + $thumb->setCacheDir(root.'/Private/Cache/images'); |
|
179 | 179 | |
180 | 180 | // open original file, resize it and save |
181 | - $thumbSaveName = Normalize::diskFullPath($thumbDir) . '/' . $fileName . '.jpg'; |
|
182 | - $thumb->open(Normalize::diskFullPath($originDir) . DIRECTORY_SEPARATOR . $newFullName) |
|
181 | + $thumbSaveName = Normalize::diskFullPath($thumbDir).'/'.$fileName.'.jpg'; |
|
182 | + $thumb->open(Normalize::diskFullPath($originDir).DIRECTORY_SEPARATOR.$newFullName) |
|
183 | 183 | ->cropResize($this->_configs['galleryResize']) |
184 | 184 | ->save($thumbSaveName, 'jpg', 90); |
185 | 185 | $thumb = null; |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Apps\Model\Install\Main; |
4 | 4 | |
5 | -use Apps\ActiveRecord\Migration; |
|
6 | 5 | use Apps\ActiveRecord\Profile; |
7 | 6 | use Apps\ActiveRecord\System; |
8 | 7 | use Apps\ActiveRecord\User; |
@@ -105,14 +105,14 @@ |
||
105 | 105 | $cfg['baseDomain'] = $this->baseDomain; |
106 | 106 | $cfg['database'] = $this->db; |
107 | 107 | $cfg['singleLanguage'] = $this->singleLanguage; |
108 | - $cfg['multiLanguage'] = (bool)$this->multiLanguage; |
|
109 | - $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$'; |
|
110 | - $cfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(4, 16)); |
|
108 | + $cfg['multiLanguage'] = (bool) $this->multiLanguage; |
|
109 | + $cfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$'; |
|
110 | + $cfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(4, 16)); |
|
111 | 111 | $cfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128)); |
112 | 112 | $cfg['mail'] = $this->mail; |
113 | 113 | |
114 | 114 | // initialize migrations table |
115 | - App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function ($table) { |
|
115 | + App::$Database->getConnection('install')->getSchemaBuilder()->create('migrations', function($table) { |
|
116 | 116 | $table->increments('id'); |
117 | 117 | $table->string('migration', 128)->unique(); |
118 | 118 | $table->timestamps(); |
@@ -3,7 +3,6 @@ |
||
3 | 3 | use Ffcms\Core\Helper\HTML\Listing; |
4 | 4 | use Ffcms\Core\Helper\Type\Any; |
5 | 5 | use Ffcms\Core\Helper\Type\Arr; |
6 | -use Ffcms\Core\Helper\Type\Obj; |
|
7 | 6 | use Ffcms\Core\Helper\Type\Str; |
8 | 7 | use Ffcms\Core\Helper\Url; |
9 | 8 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | <?php |
26 | 26 | $customCssCode = \App::$View->showPlainCode('css'); |
27 | 27 | if ($customCssCode !== null) { |
28 | - echo '<style>' . $customCssCode . '</style>'; |
|
28 | + echo '<style>'.$customCssCode.'</style>'; |
|
29 | 29 | } ?> |
30 | 30 | <script> |
31 | 31 | var script_url = '<?= \App::$Alias->scriptUrl ?>'; |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | 'type' => 'ul', |
123 | 123 | 'property' => ['class' => 'nav nav-second-level'], |
124 | 124 | 'items' => [ |
125 | - ['type' => 'link', 'link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true], |
|
126 | - ['type' => 'link', 'link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> ' . __('Files'), 'html' => true], |
|
127 | - ['type' => 'link', 'link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> ' . __('Antivirus'), 'html' => true], |
|
128 | - ['type' => 'link', 'link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> ' . __('Routing'), 'html' => true], |
|
129 | - ['type' => 'link', 'link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> ' . __('Updates'), 'html' => true] |
|
125 | + ['type' => 'link', 'link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> '.__('Settings'), 'html' => true], |
|
126 | + ['type' => 'link', 'link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> '.__('Files'), 'html' => true], |
|
127 | + ['type' => 'link', 'link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> '.__('Antivirus'), 'html' => true], |
|
128 | + ['type' => 'link', 'link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> '.__('Routing'), 'html' => true], |
|
129 | + ['type' => 'link', 'link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> '.__('Updates'), 'html' => true] |
|
130 | 130 | ] |
131 | 131 | ]) ?> |
132 | 132 | <!-- /.nav-second-level --> |
@@ -146,22 +146,22 @@ discard block |
||
146 | 146 | foreach ($extTable as $item) { |
147 | 147 | $menuItem = [ |
148 | 148 | 'type' => 'link', |
149 | - 'link' => [Str::lowerCase($item->sys_name) . '/index'], |
|
150 | - 'text' => $item->getLocaleName() . (!$item->checkVersion() ? ' <i class="fa fa-wrench" style="color: #ffbd26;"></i>' : null), |
|
149 | + 'link' => [Str::lowerCase($item->sys_name).'/index'], |
|
150 | + 'text' => $item->getLocaleName().(!$item->checkVersion() ? ' <i class="fa fa-wrench" style="color: #ffbd26;"></i>' : null), |
|
151 | 151 | 'html' => true |
152 | 152 | ]; |
153 | 153 | if ($item->type === 'app') { |
154 | 154 | $appControllers[] = $item->sys_name; |
155 | 155 | $appMenuItems[] = $menuItem; |
156 | - } elseif($item->type === 'widget') { |
|
156 | + } elseif ($item->type === 'widget') { |
|
157 | 157 | $widgetControllers[] = $item->sys_name; |
158 | 158 | $widgetMenuItems[] = $menuItem; |
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | - $appMenuItems[] = ['type' => 'link', 'link' => ['application/index'], 'text' => __('All apps') . '...']; |
|
162 | + $appMenuItems[] = ['type' => 'link', 'link' => ['application/index'], 'text' => __('All apps').'...']; |
|
163 | 163 | $appControllers[] = 'Application'; |
164 | - $widgetMenuItems[] = ['type' => 'link', 'link' => ['widget/index'], 'text' => __('All widgets') . '...']; |
|
164 | + $widgetMenuItems[] = ['type' => 'link', 'link' => ['widget/index'], 'text' => __('All widgets').'...']; |
|
165 | 165 | $widgetControllers[] = 'Widget'; |
166 | 166 | ?> |
167 | 167 | <li<?= Arr::in(\App::$Request->getController(), $appControllers) ? ' class="active"' : null ?>> |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | echo $body; |
223 | 223 | } else { |
224 | 224 | \App::$Response->setStatusCode(404); |
225 | - echo '<p>' . __('Page is not founded!') . '</p>'; |
|
225 | + echo '<p>'.__('Page is not founded!').'</p>'; |
|
226 | 226 | } |
227 | 227 | ?> |
228 | 228 | </article> |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | <?php |
255 | 255 | $customJsCode = \App::$View->showPlainCode('js'); |
256 | 256 | if ($customJsCode !== null) { |
257 | - echo '<script>' . $customJsCode . '</script>'; |
|
257 | + echo '<script>'.$customJsCode.'</script>'; |
|
258 | 258 | } |
259 | 259 | ?> |
260 | 260 | </body> |
@@ -200,13 +200,16 @@ |
||
200 | 200 | <?php foreach ($this->breadcrumbs as $bUrl => $bText): ?> |
201 | 201 | <?php if (Any::isInt($bUrl)): // only text ?> |
202 | 202 | <li class="active"><?= \App::$Security->strip_tags($bText) ?></li> |
203 | - <?php else: ?> |
|
203 | + <?php else { |
|
204 | + : ?> |
|
204 | 205 | <li> |
205 | 206 | <a href="<?= \App::$Security->strip_tags($bUrl) ?>"> |
206 | 207 | <?= \App::$Security->strip_tags($bText) ?> |
207 | 208 | </a> |
208 | 209 | </li> |
209 | - <?php endif; ?> |
|
210 | + <?php endif; |
|
211 | +} |
|
212 | +?> |
|
210 | 213 | <?php endforeach; ?> |
211 | 214 | </ol> |
212 | 215 | <?php endif; ?> |