@@ -3,7 +3,6 @@ |
||
| 3 | 3 | use Apps\ActiveRecord\App as AppRecord; |
| 4 | 4 | use Ffcms\Core\Helper\HTML\Bootstrap\Navbar; |
| 5 | 5 | use Ffcms\Core\Helper\Type\Any; |
| 6 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 7 | 6 | use Widgets\Basic\LanguageSwitcher; |
| 8 | 7 | |
| 9 | 8 | ?> |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | <?php |
| 23 | 23 | $customCssCode = \App::$View->showPlainCode('css'); |
| 24 | 24 | if ($customCssCode !== null) { |
| 25 | - echo '<style>' . $customCssCode . '</style>'; |
|
| 25 | + echo '<style>'.$customCssCode.'</style>'; |
|
| 26 | 26 | } ?> |
| 27 | 27 | <script> |
| 28 | 28 | var script_url = '<?= \App::$Alias->scriptUrl ?>'; |
@@ -40,33 +40,33 @@ discard block |
||
| 40 | 40 | if (\App::$User->isAuth()) { |
| 41 | 41 | $userId = \App::$User->identity()->getId(); |
| 42 | 42 | // show 'add content' button if current controller is Content and user add is enabled |
| 43 | - if (\App::$Request->getController() === 'Content' && (bool)AppRecord::getConfig('app', 'Content', 'userAdd')) { |
|
| 44 | - $items[] = ['type' => 'link', 'link' => ['content/update'], 'text' => '<i class="glyphicon glyphicon-plus"></i> ' . __('Add content'), 'html' => true, 'position' => 'right']; |
|
| 43 | + if (\App::$Request->getController() === 'Content' && (bool) AppRecord::getConfig('app', 'Content', 'userAdd')) { |
|
| 44 | + $items[] = ['type' => 'link', 'link' => ['content/update'], 'text' => '<i class="glyphicon glyphicon-plus"></i> '.__('Add content'), 'html' => true, 'position' => 'right']; |
|
| 45 | 45 | } |
| 46 | 46 | $accountDropdown[] = ['link' => ['profile/show', $userId], 'text' => __('My profile')]; |
| 47 | - $accountDropdown[] = ['link' => ['profile/messages'], 'text' => __('Messages') . ' <span class="badge" id="pm-count-block">0</span>', 'html' => true, '!secure' => true]; |
|
| 47 | + $accountDropdown[] = ['link' => ['profile/messages'], 'text' => __('Messages').' <span class="badge" id="pm-count-block">0</span>', 'html' => true, '!secure' => true]; |
|
| 48 | 48 | $accountDropdown[] = ['link' => ['profile/feed'], 'text' => __('Feed')]; |
| 49 | - $accountDropdown[] = ['link' => ['profile/notifications'], 'text' => __('Notifications') . ' <span class="badge" id="notify-count-block">0</span>', 'html' => true, '!secure' => true]; |
|
| 50 | - if ((bool)AppRecord::getConfig('app', 'Content', 'userAdd')) { |
|
| 49 | + $accountDropdown[] = ['link' => ['profile/notifications'], 'text' => __('Notifications').' <span class="badge" id="notify-count-block">0</span>', 'html' => true, '!secure' => true]; |
|
| 50 | + if ((bool) AppRecord::getConfig('app', 'Content', 'userAdd')) { |
|
| 51 | 51 | $accountDropdown[] = ['link' => ['content/my'], 'text' => __('My content')]; |
| 52 | 52 | } |
| 53 | 53 | $accountDropdown[] = ['link' => ['profile/settings'], 'text' => __('Settings')]; |
| 54 | 54 | |
| 55 | 55 | $items[] = [ |
| 56 | 56 | 'type' => 'dropdown', |
| 57 | - 'text' => '<i class="glyphicon glyphicon-user"></i> ' . __('Account') . ' <span class="badge" id="summary-count-block">0</span>', |
|
| 57 | + 'text' => '<i class="glyphicon glyphicon-user"></i> '.__('Account').' <span class="badge" id="summary-count-block">0</span>', |
|
| 58 | 58 | 'html' => true, |
| 59 | 59 | '!secure' => true, |
| 60 | 60 | 'position' => 'right', |
| 61 | 61 | 'items' => $accountDropdown |
| 62 | 62 | ]; |
| 63 | 63 | if (\App::$User->identity()->role->can('Admin/Main/Index')) { |
| 64 | - $items[] = ['type' => 'link', 'link' => \App::$Alias->scriptUrl . '/admin/', 'text' => '<i class="glyphicon glyphicon-cog"></i> Admin', 'position' => 'right', 'html' => true]; |
|
| 64 | + $items[] = ['type' => 'link', 'link' => \App::$Alias->scriptUrl.'/admin/', 'text' => '<i class="glyphicon glyphicon-cog"></i> Admin', 'position' => 'right', 'html' => true]; |
|
| 65 | 65 | } |
| 66 | - $items[] = ['type' => 'link', 'link' => ['user/logout'], 'text' => '<i class="glyphicon glyphicon-log-out"></i> ' . __('Logout'), 'html' => true, 'position' => 'right']; |
|
| 66 | + $items[] = ['type' => 'link', 'link' => ['user/logout'], 'text' => '<i class="glyphicon glyphicon-log-out"></i> '.__('Logout'), 'html' => true, 'position' => 'right']; |
|
| 67 | 67 | } else { |
| 68 | - $items[] = ['type' => 'link', 'link' => ['user/login'], 'text' => '<i class="glyphicon glyphicon-log-in"></i> ' . __('Sign in'), 'position' => 'right', 'html' => true]; |
|
| 69 | - $items[] = ['type' => 'link', 'link' => ['user/signup'], 'text' => '<i class="glyphicon glyphicon-check"></i> ' . __('Sign up'), 'position' => 'right', 'html' => true]; |
|
| 68 | + $items[] = ['type' => 'link', 'link' => ['user/login'], 'text' => '<i class="glyphicon glyphicon-log-in"></i> '.__('Sign in'), 'position' => 'right', 'html' => true]; |
|
| 69 | + $items[] = ['type' => 'link', 'link' => ['user/signup'], 'text' => '<i class="glyphicon glyphicon-check"></i> '.__('Sign up'), 'position' => 'right', 'html' => true]; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | echo Navbar::display([ |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 'container' => 'container', |
| 77 | 77 | 'collapseId' => 'collapse-object', |
| 78 | 78 | 'items' => $items |
| 79 | -]);?> |
|
| 79 | +]); ?> |
|
| 80 | 80 | </header> |
| 81 | 81 | |
| 82 | 82 | <div class="container body-container"> |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | echo $body; |
| 159 | 159 | } else { |
| 160 | 160 | \App::$Response->setStatusCode(404); |
| 161 | - echo '<p>' . __('Page is not founded!') . '</p>'; |
|
| 161 | + echo '<p>'.__('Page is not founded!').'</p>'; |
|
| 162 | 162 | } |
| 163 | 163 | ?> |
| 164 | 164 | </div> |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | <?php |
| 216 | 216 | $customJsCode = \App::$View->showPlainCode('js'); |
| 217 | 217 | if ($customJsCode !== null) { |
| 218 | - echo '<script>' . $customJsCode . '</script>'; |
|
| 218 | + echo '<script>'.$customJsCode.'</script>'; |
|
| 219 | 219 | } |
| 220 | 220 | // render google analytics code here |
| 221 | 221 | echo \App::$View->render('blocks/googleanalytics'); |
@@ -139,11 +139,14 @@ |
||
| 139 | 139 | <?php foreach ($this->breadcrumbs as $bUrl => $bText): ?> |
| 140 | 140 | <?php if (Any::isInt($bUrl)): // only text ?> |
| 141 | 141 | <li class="active"><?= \App::$Security->strip_tags($bText) ?></li> |
| 142 | - <?php else: ?> |
|
| 142 | + <?php else { |
|
| 143 | + : ?> |
|
| 143 | 144 | <li> |
| 144 | 145 | <a href="<?= \App::$Security->strip_tags($bUrl) ?>"><?= \App::$Security->strip_tags($bText) ?></a> |
| 145 | 146 | </li> |
| 146 | - <?php endif; ?> |
|
| 147 | + <?php endif; |
|
| 148 | +} |
|
| 149 | +?> |
|
| 147 | 150 | <?php endforeach; ?> |
| 148 | 151 | </ol> |
| 149 | 152 | <?php endif; ?> |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | /** @var $notify array */ |
| 3 | 3 | |
| 4 | 4 | use Ffcms\Core\Helper\Type\Any; |
| 5 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 6 | 5 | |
| 7 | 6 | /** |
| 8 | 7 | * Get html css class from notify response type |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | if (Any::isArray($notify) && count($notify) > 0) { |
| 32 | 32 | foreach ($notify as $type => $messages) { |
| 33 | 33 | foreach ($messages as $message) { |
| 34 | - echo '<p class="alert ' . type2html($type) . '"> |
|
| 34 | + echo '<p class="alert '.type2html($type).'"> |
|
| 35 | 35 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' |
| 36 | - . \Ffcms\Core\App::$Security->strip_tags($message) . '</p>'; |
|
| 36 | + . \Ffcms\Core\App::$Security->strip_tags($message).'</p>'; |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | /** @var \Ffcms\Core\Helper\HTML\SimplePagination $pagination */ |
| 4 | 4 | |
| 5 | 5 | use Ffcms\Core\Helper\Date; |
| 6 | -use Ffcms\Core\Helper\Simplify; |
|
| 7 | 6 | use Ffcms\Core\Helper\Url; |
| 8 | 7 | |
| 9 | 8 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | <div class="row object-lightborder" id="wall-post-<?= $post->id ?>"> |
| 25 | 25 | <div class="col-xs-4 col-md-2"> |
| 26 | 26 | <div class="text-center"> |
| 27 | - <?= Url::link(['profile/show', $post->sender_id], $post->senderUser->profile->getNickname(), ['style' => 'color: ' . $post->senderUser->role->color]) ?> |
|
| 27 | + <?= Url::link(['profile/show', $post->sender_id], $post->senderUser->profile->getNickname(), ['style' => 'color: '.$post->senderUser->role->color]) ?> |
|
| 28 | 28 | <img class="img-responsive img-rounded" alt="Avatar of <?= $post->senderUser->profile->getNickname() ?>" src="<?= $post->senderUser->profile->getAvatarUrl('small') ?>" /> |
| 29 | 29 | <small><?= Date::humanize($post->updated_at); ?></small> |
| 30 | 30 | </div> |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | use Ffcms\Core\Helper\Type\Any; |
| 4 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 5 | 4 | use Ffcms\Core\Helper\Url; |
| 6 | 5 | |
| 7 | 6 | $this->title = __('My dialogs'); |
@@ -3,9 +3,7 @@ |
||
| 3 | 3 | use Ffcms\Core\Helper\Date; |
| 4 | 4 | use Ffcms\Core\Helper\HTML\Form; |
| 5 | 5 | use Ffcms\Core\Helper\HTML\Listing; |
| 6 | -use Ffcms\Core\Helper\Simplify; |
|
| 7 | 6 | use Ffcms\Core\Helper\Type\Any; |
| 8 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 9 | 7 | use Ffcms\Core\Helper\Type\Str; |
| 10 | 8 | use Ffcms\Core\Helper\Url; |
| 11 | 9 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | // $user is a target profile depended object(not current user!!!) |
| 23 | 23 | |
| 24 | 24 | $name = $user->profile->getNickname(); |
| 25 | -$this->title = __('Profile') . ': ' . $name; |
|
| 25 | +$this->title = __('Profile').': '.$name; |
|
| 26 | 26 | |
| 27 | 27 | $this->breadcrumbs = [ |
| 28 | 28 | Url::to('/') => __('Home'), |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | <?php |
| 46 | 46 | if ($ratingOn): |
| 47 | 47 | $rateClass = 'btn-default'; |
| 48 | - $rateValue = (int)$user->profile->rating; |
|
| 48 | + $rateValue = (int) $user->profile->rating; |
|
| 49 | 49 | if ($user->profile->rating > 0) { |
| 50 | 50 | $rateClass = 'btn-info'; |
| 51 | 51 | } elseif ($user->profile->rating < 0) { |
@@ -83,20 +83,20 @@ discard block |
||
| 83 | 83 | $userMenu = null; |
| 84 | 84 | if (true === $isSelf) { |
| 85 | 85 | $userMenu = [ |
| 86 | - ['type' => 'link', 'link' => ['profile/feed'], 'text' => '<i class="glyphicon glyphicon-fire"></i> ' . __('Feed'), 'html' => true], |
|
| 87 | - ['type' => 'link', 'link' => ['profile/avatar'], 'text' => '<i class="glyphicon glyphicon-camera"></i> ' . __('Avatar'), 'html' => true], |
|
| 88 | - ['type' => 'link', 'link' => ['profile/messages'], 'text' => '<i class="glyphicon glyphicon-envelope"></i> ' . __('Messages') . ' <span class="badge pm-count-block">0</span>', 'html' => true], |
|
| 89 | - ['type' => 'link', 'link' => ['profile/settings'], 'text' => '<i class="glyphicon glyphicon-cog"></i> ' . __('Settings'), 'html' => true] |
|
| 86 | + ['type' => 'link', 'link' => ['profile/feed'], 'text' => '<i class="glyphicon glyphicon-fire"></i> '.__('Feed'), 'html' => true], |
|
| 87 | + ['type' => 'link', 'link' => ['profile/avatar'], 'text' => '<i class="glyphicon glyphicon-camera"></i> '.__('Avatar'), 'html' => true], |
|
| 88 | + ['type' => 'link', 'link' => ['profile/messages'], 'text' => '<i class="glyphicon glyphicon-envelope"></i> '.__('Messages').' <span class="badge pm-count-block">0</span>', 'html' => true], |
|
| 89 | + ['type' => 'link', 'link' => ['profile/settings'], 'text' => '<i class="glyphicon glyphicon-cog"></i> '.__('Settings'), 'html' => true] |
|
| 90 | 90 | ]; |
| 91 | 91 | } elseif (\App::$User->isAuth()) { |
| 92 | 92 | $userMenu = [ |
| 93 | 93 | [ |
| 94 | 94 | 'type' => 'link', 'link' => Url::to('profile/messages', null, null, ['newdialog' => $user->id]), |
| 95 | - 'text' => '<i class="glyphicon glyphicon-envelope"></i> ' . __('Write message'), 'html' => true |
|
| 95 | + 'text' => '<i class="glyphicon glyphicon-envelope"></i> '.__('Write message'), 'html' => true |
|
| 96 | 96 | ], |
| 97 | 97 | [ |
| 98 | 98 | 'type' => 'link', 'link' => Url::to('profile/ignore', null, null, ['id' => $user->id]), |
| 99 | - 'text' => '<i class="glyphicon glyphicon-ban-circle"></i> ' . __('Block'), 'html' => true, 'property' => ['class' => 'alert-danger'] |
|
| 99 | + 'text' => '<i class="glyphicon glyphicon-ban-circle"></i> '.__('Block'), 'html' => true, 'property' => ['class' => 'alert-danger'] |
|
| 100 | 100 | ] |
| 101 | 101 | ]; |
| 102 | 102 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | foreach ($hobbyArray as $item) { |
| 177 | 177 | $item = \App::$Security->strip_tags($item); |
| 178 | 178 | if (!Str::likeEmpty($item)) { |
| 179 | - echo Url::link(['profile/index', 'hobby', trim($item, ' ')], $item, ['class' => 'label label-success']) . ' '; |
|
| 179 | + echo Url::link(['profile/index', 'hobby', trim($item, ' ')], $item, ['class' => 'label label-success']).' '; |
|
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | ?> |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | <div class="text-right"><?= $form->submitButton(__('Send'), ['class' => 'btn btn-default']); ?></div> |
| 224 | 224 | <?= Ffcms\Widgets\Ckeditor\Ckeditor::widget(['targetClass' => 'wysiwyg', 'config' => 'config-small', 'jsConfig' => ['height' => '80']]); ?> |
| 225 | 225 | <?= $form->finish(); ?> |
| 226 | - <?php \App::$Alias->addPlainCode('js', "$('#" . $wall->getFormName() . "').on('change keyup keydown paste cut', 'textarea', function () { $(this).height(0).height(this.scrollHeight);}).find('textarea').change();") ?> |
|
| 226 | + <?php \App::$Alias->addPlainCode('js', "$('#".$wall->getFormName()."').on('change keyup keydown paste cut', 'textarea', function () { $(this).height(0).height(this.scrollHeight);}).find('textarea').change();") ?> |
|
| 227 | 227 | <?php endif; ?> |
| 228 | 228 | <?php |
| 229 | 229 | if ($wallRecords !== null): |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | <div class="col-xs-8 col-md-10"> |
| 240 | 240 | <h5 style="margin-top: 0;margin-bottom: 5px;"> |
| 241 | 241 | <i class="glyphicon glyphicon-user"></i> |
| 242 | - <?= Url::link(['profile/show', $post->sender_id], $post->senderUser->profile->getNickname(), ['style' => 'color: ' . $post->senderUser->role->color]) ?> |
|
| 242 | + <?= Url::link(['profile/show', $post->sender_id], $post->senderUser->profile->getNickname(), ['style' => 'color: '.$post->senderUser->role->color]) ?> |
|
| 243 | 243 | <small class="pull-right"><?= Date::humanize($post->updated_at); ?></small> |
| 244 | 244 | </h5> |
| 245 | 245 | <div class="object-text"> |
@@ -60,7 +60,8 @@ discard block |
||
| 60 | 60 | </a> |
| 61 | 61 | </div> |
| 62 | 62 | </div> |
| 63 | - <?php else: ?> |
|
| 63 | + <?php else { |
|
| 64 | + : ?> |
|
| 64 | 65 | <div class="row"> |
| 65 | 66 | <div class="col-md-8" style="padding-right: 0;"> |
| 66 | 67 | <a href="javascript:void(0);" class="btn btn-block <?= $rateClass ?>"> |
@@ -77,7 +78,9 @@ discard block |
||
| 77 | 78 | <button class="btn btn-block btn-danger" id="reduceRating">-</button> |
| 78 | 79 | </div> |
| 79 | 80 | </div> |
| 80 | - <?php endif; ?> |
|
| 81 | + <?php endif; |
|
| 82 | +} |
|
| 83 | +?> |
|
| 81 | 84 | <?php endif; ?> |
| 82 | 85 | <?php |
| 83 | 86 | $userMenu = null; |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Ffcms\Core\Helper\HTML\Form; |
| 3 | -use Ffcms\Core\Helper\Url; |
|
| 4 | 3 | |
| 5 | 4 | /** @var $model \Apps\Model\Front\User\FormPasswordChange */ |
| 6 | 5 | /** @var $this \Ffcms\Core\Arch\View */ |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | <?php |
| 21 | 21 | if (\App::$Captcha->isFull()) { |
| 22 | - echo '<div class="col-md-offset-3 col-md-9">' . \App::$Captcha->get() . '</div>'; |
|
| 22 | + echo '<div class="col-md-offset-3 col-md-9">'.\App::$Captcha->get().'</div>'; |
|
| 23 | 23 | } else { |
| 24 | 24 | echo $form->field('captcha', 'captcha', ['class' => 'form-control'], __('Enter data from security image to prove that you are human. If you can\'t read symbols - click on image to reload')); |
| 25 | 25 | } |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | /** @var $body string */ |
| 3 | 3 | |
| 4 | 4 | use Ffcms\Core\Helper\Type\Any; |
| 5 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 6 | 5 | |
| 7 | 6 | ?> |
| 8 | 7 | <!DOCTYPE html> |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | <?php |
| 22 | 22 | $customCssCode = \App::$View->showPlainCode('css'); |
| 23 | 23 | if ($customCssCode !== null) { |
| 24 | - echo '<style>' . $customCssCode . '</style>'; |
|
| 24 | + echo '<style>'.$customCssCode.'</style>'; |
|
| 25 | 25 | } ?> |
| 26 | 26 | <script> |
| 27 | 27 | var script_url = '<?= \App::$Alias->scriptUrl ?>'; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | <?php |
| 64 | 64 | $customJsCode = \App::$View->showPlainCode('js'); |
| 65 | 65 | if ($customJsCode !== null) { |
| 66 | - echo '<script>' . $customJsCode . '</script>'; |
|
| 66 | + echo '<script>'.$customJsCode.'</script>'; |
|
| 67 | 67 | } |
| 68 | 68 | ?> |
| 69 | 69 | </body> |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Extend\Core\Arch; |
| 4 | 4 | |
| 5 | -use Ffcms\Core\App; |
|
| 6 | 5 | use Ffcms\Core\Arch\Controller; |
| 7 | 6 | |
| 8 | 7 | /** |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Ffcms\Core\Arch\Controller; |
| 8 | 8 | use Ffcms\Core\Exception\ForbiddenException; |
| 9 | 9 | use Ffcms\Core\Helper\Type\Any; |
| 10 | -use Ffcms\Core\Helper\Type\Obj; |
|
| 11 | 10 | use Ffcms\Core\Helper\Type\Str; |
| 12 | 11 | |
| 13 | 12 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | // add localizations |
| 36 | - App::$Translate->append(App::$Alias->currentViewPath . '/I18n/' . App::$Request->getLanguage() . '.php'); |
|
| 36 | + App::$Translate->append(App::$Alias->currentViewPath.'/I18n/'.App::$Request->getLanguage().'.php'); |
|
| 37 | 37 | parent::__construct(); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // check if disabled (0 = enabled, anything else = on) |
| 59 | - return !(bool)$this->application->disabled; |
|
| 59 | + return !(bool) $this->application->disabled; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | return $this->configs; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - $configs = (array)$this->application->configs; |
|
| 72 | + $configs = (array) $this->application->configs; |
|
| 73 | 73 | foreach ($configs as $cfg => $value) { |
| 74 | 74 | if (Any::isInt($value)) { |
| 75 | 75 | $configs[$cfg] = $value; |