@@ -36,7 +36,7 @@ |
||
36 | 36 | public function init() |
37 | 37 | { |
38 | 38 | parent::init(); |
39 | - $this->publishOptions['beforeCopy'] = function ($from, $to) { |
|
39 | + $this->publishOptions['beforeCopy'] = function($from, $to) { |
|
40 | 40 | return preg_match('%(/|\\\\)(fonts|css)%', $from); |
41 | 41 | }; |
42 | 42 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | $this->parts['{img}'] = Html::img($src, $options); |
50 | 50 | BootstrapFileStyleAsset::register($this->form->view); |
51 | - return parent::fileInput($options).Plupload::widget(['url'=>'url']); |
|
51 | + return parent::fileInput($options) . Plupload::widget(['url'=>'url']); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // ], |
74 | 74 | [ |
75 | 75 | 'attribute' => 'registration_ip', |
76 | - 'value' => function ($model) { |
|
76 | + 'value' => function($model) { |
|
77 | 77 | return $model->registration_ip == null |
78 | 78 | ? '<span class="not-set">' . Yii::t('app', '(not set)') . '</span>' |
79 | 79 | : $model->registration_ip; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ], |
96 | 96 | [ |
97 | 97 | 'header' => Yii::t('yuncms', 'Confirmation'), |
98 | - 'value' => function ($model) { |
|
98 | + 'value' => function($model) { |
|
99 | 99 | if ($model->isEmailConfirmed) { |
100 | 100 | return '<div class="text-center"><span class="text-success">' . Yii::t('yuncms', 'Confirmed') . '</span></div>'; |
101 | 101 | } else { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ], |
112 | 112 | [ |
113 | 113 | 'header' => Yii::t('yuncms', 'Block status'), |
114 | - 'value' => function ($model) { |
|
114 | + 'value' => function($model) { |
|
115 | 115 | if ($model->isBlocked) { |
116 | 116 | return Html::a(Yii::t('yuncms', 'Unblock'), ['block', 'id' => $model->id], [ |
117 | 117 | 'class' => 'btn btn-xs btn-success btn-block', |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $model = new AdminAuthItem(null); |
80 | 80 | $model->type = $this->type; |
81 | 81 | if ($model->load(Yii::$app->getRequest()->post()) && $model->save()) { |
82 | - Yii::$app->getSession()->setFlash('success', Yii::t('yuncms','Create success.')); |
|
82 | + Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Create success.')); |
|
83 | 83 | return $this->redirect(['view', 'id' => $model->name]); |
84 | 84 | } else { |
85 | 85 | return $this->render('create', ['model' => $model]); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | return [ |
69 | 69 | [['ruleName'], 'checkRule'], |
70 | 70 | [['name', 'type'], 'required'], |
71 | - [['name'], 'checkUnique', 'when' => function () { |
|
71 | + [['name'], 'checkUnique', 'when' => function() { |
|
72 | 72 | return $this->isNewRecord || ($this->_item->name != $this->name); |
73 | 73 | }], |
74 | 74 | [['type'], 'integer'], |
@@ -34,7 +34,7 @@ |
||
34 | 34 | parent::init(); |
35 | 35 | if ($this->userClassName === null) { |
36 | 36 | $this->userClassName = Yii::$app->getUser()->identityClass; |
37 | - $this->userClassName ? : 'yuncms\admin\models\Admin'; |
|
37 | + $this->userClassName ?: 'yuncms\admin\models\Admin'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'rules' => [ |
54 | 54 | [ |
55 | 55 | 'allow' => true, |
56 | - 'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect','follower-tag'], |
|
56 | + 'actions' => ['profile', 'account', 'privacy', 'avatar', 'confirm', 'networks', 'disconnect', 'follower-tag'], |
|
57 | 57 | 'roles' => ['@'], |
58 | 58 | ], |
59 | 59 | ], |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | Yii::$app->response->format = Response::FORMAT_JSON; |
129 | 129 | $tagId = Yii::$app->request->post('tag_id', null); |
130 | 130 | if (($tag = Tag::findOne($tagId)) == null) { |
131 | - throw new NotFoundHttpException (); |
|
131 | + throw new NotFoundHttpException(); |
|
132 | 132 | } else { |
133 | 133 | /** @var \yuncms\user\models\User $user */ |
134 | 134 | $user = Yii::$app->user->identity; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | ], |
10 | 10 | 'components' => [ |
11 | 11 | 'cache' => [ |
12 | - 'keyPrefix' => 'web', //前缀 |
|
12 | + 'keyPrefix' => 'web', //前缀 |
|
13 | 13 | ], |
14 | 14 | 'user' => [ |
15 | 15 | 'identityClass' => yuncms\user\models\User::class, |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | 'secureProtocolHeaders' => [ |
23 | 23 | 'X-Forwarded-Proto' => ['https'], // Common |
24 | 24 | 'Front-End-Https' => ['on'], // Microsoft |
25 | - 'X-Client-Scheme' => ['https'],// Aliyun CDN |
|
25 | + 'X-Client-Scheme' => ['https'], // Aliyun CDN |
|
26 | 26 | 'X-Client-Proto' => ['https'], |
27 | 27 | ], |
28 | 28 | 'ipHeaders' => [ |
29 | - 'X-Forwarded-For',// Common |
|
29 | + 'X-Forwarded-For', // Common |
|
30 | 30 | 'X-Cluster-Client-IP', |
31 | - 'ALI-CDN-REAL-IP',// Aliyun CDN |
|
31 | + 'ALI-CDN-REAL-IP', // Aliyun CDN |
|
32 | 32 | 'Client-IP', |
33 | 33 | 'X-Forwarded', |
34 | 34 | 'Forwarded-For', |
@@ -132,7 +132,7 @@ |
||
132 | 132 | Yii::$app->session->setFlash('danger', Yii::t('yuncms', 'Your account has been blocked.')); |
133 | 133 | $this->action->successUrl = Url::to(['/user/security/login']); |
134 | 134 | } else { |
135 | - Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor','user')); |
|
135 | + Yii::$app->user->login($account->user, Yii::$app->settings->get('rememberFor', 'user')); |
|
136 | 136 | $this->action->successUrl = Yii::$app->getUser()->getReturnUrl(); |
137 | 137 | } |
138 | 138 | } else { |