@@ -29,16 +29,16 @@ discard block |
||
| 29 | 29 | $author = Url::link(['user/update', $record->user_id], $author); |
| 30 | 30 | } |
| 31 | 31 | ?> |
| 32 | - <?= $author . ', ' . Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?> |
|
| 32 | + <?= $author.', '.Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?> |
|
| 33 | 33 | <div class="pull-right"> |
| 34 | - <?php if ((bool)$record->moderate):?> |
|
| 34 | + <?php if ((bool) $record->moderate):?> |
|
| 35 | 35 | <?= Url::link(['comments/publish', 'comment', $record->id], __('Publish'), ['class' => 'label label-warning']) ?> |
| 36 | 36 | <?php endif; ?> |
| 37 | 37 | <?= Url::link(['comments/edit', 'comment', $record->id], __('Edit'), ['class' => 'label label-primary']) ?> |
| 38 | 38 | <?= Url::link(['comments/delete', 'comment', $record->id], __('Delete'), ['class' => 'label label-danger']) ?> |
| 39 | 39 | </div> |
| 40 | 40 | </div> |
| 41 | - <div class="panel-body<?= ((bool)$record->moderate ? ' text-warning' : null)?>"> |
|
| 41 | + <div class="panel-body<?= ((bool) $record->moderate ? ' text-warning' : null)?>"> |
|
| 42 | 42 | <?= $record->message ?> |
| 43 | 43 | </div> |
| 44 | 44 | </div> |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | <?php |
| 60 | 60 | $answerAuthor = Simplify::parseUserLink($answer->user_id, $answer->guest_name, 'user/update'); |
| 61 | 61 | ?> |
| 62 | - <?= $answerAuthor . ', ' . Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
|
| 62 | + <?= $answerAuthor.', '.Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
|
| 63 | 63 | <div class="pull-right"> |
| 64 | - <?php if ((bool)$answer->moderate):?> |
|
| 64 | + <?php if ((bool) $answer->moderate):?> |
|
| 65 | 65 | <?= Url::link(['comments/publish', 'answer', $answer->id], __('Publish'), ['class' => 'label label-warning']) ?> |
| 66 | 66 | <?php endif; ?> |
| 67 | 67 | <?= Url::link(['comments/edit', 'answer', $answer->id], __('Edit'), ['class' => 'label label-primary']) ?> |
| 68 | 68 | <?= Url::link(['comments/delete', 'answer', $answer->id], __('Delete'), ['class' => 'label label-danger']) ?> |
| 69 | 69 | </div> |
| 70 | 70 | </div> |
| 71 | - <div class="panel-body<?= ((bool)$answer->moderate ? ' text-warning' : null)?>"> |
|
| 71 | + <div class="panel-body<?= ((bool) $answer->moderate ? ' text-warning' : null)?>"> |
|
| 72 | 72 | <?= $answer->message ?> |
| 73 | 73 | </div> |
| 74 | 74 | </div> |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | foreach (\App::$Properties->get('languages') as $lang) { |
| 33 | 33 | $items[] = [ |
| 34 | 34 | 'type' => 'tab', |
| 35 | - 'text' => __('Lang') . ': ' . Str::upperCase($lang), |
|
| 35 | + 'text' => __('Lang').': '.Str::upperCase($lang), |
|
| 36 | 36 | 'content' => |
| 37 | - $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale')) . |
|
| 38 | - $form->field('text.' . $lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true]), |
|
| 37 | + $form->field('title.'.$lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale')). |
|
| 38 | + $form->field('text.'.$lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true]), |
|
| 39 | 39 | 'html' => true, |
| 40 | 40 | 'active' => $lang === \App::$Request->getLanguage(), |
| 41 | 41 | '!secure' => true |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function getAvailableThemes($env_name) |
| 105 | 105 | { |
| 106 | - $path = root . '/Apps/View/' . $env_name . '/'; |
|
| 106 | + $path = root.'/Apps/View/'.$env_name.'/'; |
|
| 107 | 107 | if (!Directory::exist($path)) { |
| 108 | 108 | return []; |
| 109 | 109 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function makeSave() |
| 125 | 125 | { |
| 126 | 126 | $toSave = App::$Security->strip_php_tags($this->getAllProperties()); |
| 127 | - $stringSave = '<?php return ' . Arr::exportVar($toSave, null, true) . ';'; |
|
| 127 | + $stringSave = '<?php return '.Arr::exportVar($toSave, null, true).';'; |
|
| 128 | 128 | |
| 129 | 129 | $cfgPath = '/Private/Config/Default.php'; |
| 130 | 130 | if (File::exist($cfgPath) && File::writable($cfgPath)) { |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Ffcms\Core\Helper\FileSystem\File; |
| 9 | 9 | use Ffcms\Core\Helper\Type\Any; |
| 10 | 10 | use Ffcms\Core\Helper\Type\Arr; |
| 11 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 12 | 11 | |
| 13 | 12 | /** |
| 14 | 13 | * Class FormSettings. Admin system settings business logic |
@@ -50,8 +50,8 @@ |
||
| 50 | 50 | public $trustedProxy; |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * Set property values from configurations |
|
| 54 | - */ |
|
| 53 | + * Set property values from configurations |
|
| 54 | + */ |
|
| 55 | 55 | public function before() |
| 56 | 56 | { |
| 57 | 57 | $properties = App::$Properties->getAll(); |
@@ -2,4 +2,4 @@ |
||
| 2 | 2 | define('root', __DIR__); |
| 3 | 3 | error_reporting(E_ALL ^ E_NOTICE); |
| 4 | 4 | |
| 5 | -require_once(root . '/Loader/Cron/index.php'); |
|
| 6 | 5 | \ No newline at end of file |
| 6 | +require_once(root.'/Loader/Cron/index.php'); |
|
| 7 | 7 | \ No newline at end of file |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function __construct($query, $limit = 10) |
| 25 | 25 | { |
| 26 | 26 | $this->query = $query; |
| 27 | - $this->limit = (int)$limit; |
|
| 27 | + $this->limit = (int) $limit; |
|
| 28 | 28 | if ($this->limit < 1) { |
| 29 | 29 | $this->limit = 1; |
| 30 | 30 | } |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | $res->setTitle($title); |
| 65 | 65 | $res->setSnippet($snippet); |
| 66 | 66 | $res->setDate($item->created_at); |
| 67 | - $res->setRelevance((int)$item->relevance); |
|
| 68 | - $res->setUri('/content/read/' . $item->getPath()); |
|
| 67 | + $res->setRelevance((int) $item->relevance); |
|
| 68 | + $res->setUri('/content/read/'.$item->getPath()); |
|
| 69 | 69 | |
| 70 | 70 | // accumulate response var |
| 71 | 71 | $result[] = $res; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function __construct($query, $limit = 10) |
| 27 | 27 | { |
| 28 | 28 | $this->query = $query; |
| 29 | - $this->limit = (int)$limit; |
|
| 29 | + $this->limit = (int) $limit; |
|
| 30 | 30 | if ($this->limit < 1) { |
| 31 | 31 | $this->limit = 1; |
| 32 | 32 | } |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | $instance = new AbstractSearchResult(); |
| 62 | 62 | $instance->setTitle(App::$Translate->get('Search', 'Comment on the page')); |
| 63 | 63 | $instance->setSnippet($snippet); |
| 64 | - $instance->setUri($item->pathway . '#comments-list'); |
|
| 64 | + $instance->setUri($item->pathway.'#comments-list'); |
|
| 65 | 65 | $instance->setDate($item->created_at); |
| 66 | - $instance->setRelevance((int)$item->relevance); |
|
| 66 | + $instance->setRelevance((int) $item->relevance); |
|
| 67 | 67 | |
| 68 | 68 | // add instance to result set |
| 69 | 69 | $result[] = $instance; |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $class = 'label-danger'; |
| 66 | 66 | $tooltip = __('Location: %loc%. Required permissions: +rw', ['loc' => $dir]); |
| 67 | 67 | } |
| 68 | - echo '<span class="label ' . $class . '" data-toggle="tooltip" title="' . $tooltip . '">' . $dir . '</span> '; |
|
| 68 | + echo '<span class="label '.$class.'" data-toggle="tooltip" title="'.$tooltip.'">'.$dir.'</span> '; |
|
| 69 | 69 | } |
| 70 | 70 | ?> |
| 71 | 71 | <hr /> |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function __construct($provider, $identity) |
| 40 | 40 | { |
| 41 | - $this->_provider_name = (string)$provider; |
|
| 41 | + $this->_provider_name = (string) $provider; |
|
| 42 | 42 | $this->_identity = $identity; |
| 43 | 43 | parent::__construct(false); |
| 44 | 44 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | // set birthday if available |
| 127 | 127 | if ($this->_identity->birthDay !== null && $this->_identity->birthMonth !== null && $this->_identity->birthYear !== null) { |
| 128 | - $profile->birthday = $this->_identity->birthYear . '-' . $this->_identity->birthMonth . '-' . $this->_identity->birthDay; |
|
| 128 | + $profile->birthday = $this->_identity->birthYear.'-'.$this->_identity->birthMonth.'-'.$this->_identity->birthDay; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | // try to parse avatar from remote service |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | protected function parseAvatar($url, $userId) |
| 149 | 149 | { |
| 150 | 150 | // check if user is defined |
| 151 | - if ((int)$userId < 1) { |
|
| 151 | + if ((int) $userId < 1) { |
|
| 152 | 152 | return; |
| 153 | 153 | } |
| 154 | 154 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | // write image to filesystem |
| 168 | - $imagePath = '/upload/user/avatar/original/' . $userId . '.' . $imageExtension; |
|
| 168 | + $imagePath = '/upload/user/avatar/original/'.$userId.'.'.$imageExtension; |
|
| 169 | 169 | $write = File::write($imagePath, $imageContent); |
| 170 | 170 | if ($write === false) { |
| 171 | 171 | return; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | // try to write and resize file |
| 175 | 175 | try { |
| 176 | - $fileObject = new FileObject(root . $imagePath); |
|
| 176 | + $fileObject = new FileObject(root.$imagePath); |
|
| 177 | 177 | $avatarUpload = new FormAvatarUpload(); |
| 178 | 178 | $avatarUpload->resizeAndSave($fileObject, $userId, 'small'); |
| 179 | 179 | $avatarUpload->resizeAndSave($fileObject, $userId, 'medium'); |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use Ffcms\Core\Helper\FileSystem\File; |
| 10 | 10 | use Ffcms\Core\Helper\Type\Arr; |
| 11 | 11 | use Ffcms\Core\Helper\Type\Str; |
| 12 | -use Ffcms\Core\Helper\Url; |
|
| 13 | 12 | use Ffcms\Core\Interfaces\iUser; |
| 14 | 13 | use Symfony\Component\HttpFoundation\File\File as FileObject; |
| 15 | 14 | |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php return [ |
| 2 | - 'Alias' => [ |
|
| 3 | - 'Front' => [ |
|
| 4 | - '/' => '/content/list/news' |
|
| 5 | - ] |
|
| 6 | - ] |
|
| 2 | + 'Alias' => [ |
|
| 3 | + 'Front' => [ |
|
| 4 | + '/' => '/content/list/news' |
|
| 5 | + ] |
|
| 6 | + ] |
|
| 7 | 7 | ]; |
| 8 | 8 | \ No newline at end of file |