fixes bug refs YW-905 YW864
Showing
2 changed files
with
12 additions
and
13 deletions
framework @ 75bbc3b0
@@ -23,7 +23,7 @@ class IndexController extends AbstractAction | @@ -23,7 +23,7 @@ class IndexController extends AbstractAction | ||
23 | 23 | ||
24 | $uid = $this->getUid(); | 24 | $uid = $this->getUid(); |
25 | $udid = $this->getUdid(); | 25 | $udid = $this->getUdid(); |
26 | - | 26 | + |
27 | $type = $this->get('id', 0); | 27 | $type = $this->get('id', 0); |
28 | $gender = $this->get('gender', '1,2,3'); | 28 | $gender = $this->get('gender', '1,2,3'); |
29 | if (is_string($gender)) { | 29 | if (is_string($gender)) { |
@@ -73,7 +73,7 @@ class IndexController extends AbstractAction | @@ -73,7 +73,7 @@ class IndexController extends AbstractAction | ||
73 | // 从Cookie获取 | 73 | // 从Cookie获取 |
74 | else { | 74 | else { |
75 | $gender = Helpers::getGenderByCookie(); | 75 | $gender = Helpers::getGenderByCookie(); |
76 | - | 76 | + |
77 | $this->setNavHeader($tag, true, SITE_MAIN); | 77 | $this->setNavHeader($tag, true, SITE_MAIN); |
78 | } | 78 | } |
79 | 79 | ||
@@ -116,13 +116,6 @@ class IndexController extends AbstractAction | @@ -116,13 +116,6 @@ class IndexController extends AbstractAction | ||
116 | $id = $this->get('id'); | 116 | $id = $this->get('id'); |
117 | $channel = $this->get('yh_channel'); | 117 | $channel = $this->get('yh_channel'); |
118 | 118 | ||
119 | - // 获取作者信息 | ||
120 | - $author = ListData::author($id); | ||
121 | - // 作者信息不存在,则跳到错误页面 | ||
122 | - if (!isset($author['name'])) { | ||
123 | - $this->error(); | ||
124 | - } | ||
125 | - | ||
126 | // 标识是不是APP客户端 | 119 | // 标识是不是APP客户端 |
127 | $isApp = is_numeric($channel); | 120 | $isApp = is_numeric($channel); |
128 | // APP访问时通过频道参数判断性别 | 121 | // APP访问时通过频道参数判断性别 |
@@ -141,10 +134,17 @@ class IndexController extends AbstractAction | @@ -141,10 +134,17 @@ class IndexController extends AbstractAction | ||
141 | // 从Cookie获取 | 134 | // 从Cookie获取 |
142 | else { | 135 | else { |
143 | $gender = Helpers::getGenderByCookie(); | 136 | $gender = Helpers::getGenderByCookie(); |
144 | - | 137 | + |
145 | $this->setNavHeader('编辑简介', true, SITE_MAIN); | 138 | $this->setNavHeader('编辑简介', true, SITE_MAIN); |
146 | } | 139 | } |
147 | 140 | ||
141 | + // 获取作者信息 | ||
142 | + $author = ListData::author($id); | ||
143 | + // 作者信息不存在,则跳到错误页面 | ||
144 | + if (!isset($author['name'])) { | ||
145 | + $this->error(); | ||
146 | + } | ||
147 | + | ||
148 | $this->setTitle('编辑简介'); | 148 | $this->setTitle('编辑简介'); |
149 | 149 | ||
150 | $uid = $this->getUid(); | 150 | $uid = $this->getUid(); |
@@ -171,7 +171,7 @@ class IndexController extends AbstractAction | @@ -171,7 +171,7 @@ class IndexController extends AbstractAction | ||
171 | } | 171 | } |
172 | $data['guang']['infos'] = $build; | 172 | $data['guang']['infos'] = $build; |
173 | } | 173 | } |
174 | - | 174 | + |
175 | $data['guang']['gender'] = $gender; | 175 | $data['guang']['gender'] = $gender; |
176 | $data['guang']['isApp'] = $isApp ? 1 : 0; | 176 | $data['guang']['isApp'] = $isApp ? 1 : 0; |
177 | 177 | ||
@@ -236,7 +236,6 @@ class IndexController extends AbstractAction | @@ -236,7 +236,6 @@ class IndexController extends AbstractAction | ||
236 | $this->_view->display('page', $data); | 236 | $this->_view->display('page', $data); |
237 | 237 | ||
238 | exit(); | 238 | exit(); |
239 | - | ||
240 | } while (false); | 239 | } while (false); |
241 | 240 | ||
242 | echo ' '; | 241 | echo ' '; |
-
Please register or login to post a comment