Completed
Push — master ( 1e9bc2...06991e )
by graychen
02:31 queued 42s
created
src/controllers/DefaultController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             'upload' => [
22 22
                 'class' => 'kucha\ueditor\UEditorAction',
23 23
                 'config' => [
24
-                    "imageUrlPrefix" => Yii::$app->request->hostInfo,//图片访问路径前缀
24
+                    "imageUrlPrefix" => Yii::$app->request->hostInfo, //图片访问路径前缀
25 25
                     "imagePathFormat" => "/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", //上传保存路径
26 26
                     "imageRoot" => Yii::getAlias("@webroot"),
27 27
                 ],
Please login to merge, or discard this patch.
src/views/default/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                         "height" => "84",
36 36
                     ]
37 37
                 ],
38
-                'value' => function ($model) {
38
+                'value' => function($model) {
39 39
                     return $model->getImgUrl();
40 40
                 }
41 41
             ],
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             'order',
44 44
             [
45 45
                 'attribute' => 'status',
46
-                'value' => function ($model) {
46
+                'value' => function($model) {
47 47
                     return Post::getStatusList()[$model->status];
48 48
                 }
49 49
             ],
Please login to merge, or discard this patch.
src/views/default/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                         "height" => "84",
38 38
                     ]
39 39
                 ],
40
-                'value' => function ($model) {
40
+                'value' => function($model) {
41 41
                     return $model->getImgUrl();
42 42
                 }
43 43
             ],
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             ['class' => 'yii\grid\ActionColumn',
48 48
                 'template' => '{view} {update} {delete} {up} {url}',
49 49
                 'buttons' => [
50
-                    'up' => function ($url, $model, $key) {
50
+                    'up' => function($url, $model, $key) {
51 51
                         if ($model->status == Post::STATUS_ACTIVE) {
52 52
                             $span = Html::tag('a id="status_' . $model->id . '" class="glyphicon glyphicon-remove color-blue"  title="' . Module::t('post', 'offline') . '" onclick="setStatus(' . $model->id . ',0)"></a');
53 53
                             return Html::a($span, '#');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                             return Html::a($span, '#');
57 57
                         }
58 58
                     },
59
-                    'url' => function ($url, $model, $key) {
59
+                    'url' => function($url, $model, $key) {
60 60
                         $span = Html::tag('a class="glyphicon glyphicon-link color-blue cp" title="复制链接" data-clipboard-text="' . $model->url . '"></a');
61 61
                         return Html::a($span, '#');
62 62
                     }
Please login to merge, or discard this patch.
src/models/Post.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function fields()
97 97
     {
98 98
         $fields = parent::fields();
99
-        $fields['img'] = function ($fields) {
99
+        $fields['img'] = function($fields) {
100 100
             $path = str_replace('api/uploads/', '', $this->getUploadUrl('img'));
101 101
             if (isset($_ENV['API_HOST'])) {
102 102
                 $url = $_ENV['API_HOST'] . 'files/' . $path;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             }
106 106
             return $url;
107 107
         };
108
-        $fields['url'] = function ($fields) {
108
+        $fields['url'] = function($fields) {
109 109
             $url = $_ENV['APP_HOST'] . 'post/view' . "?id=" . $fields['id'];
110 110
             return $url;
111 111
         };
Please login to merge, or discard this patch.