Authored by hf

fixes bug refs YW-905 YW864

framework @ 75bbc3b0
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -23,7 +23,7 @@ class IndexController extends AbstractAction
$uid = $this->getUid();
$udid = $this->getUdid();
$type = $this->get('id', 0);
$gender = $this->get('gender', '1,2,3');
if (is_string($gender)) {
... ... @@ -73,7 +73,7 @@ class IndexController extends AbstractAction
// 从Cookie获取
else {
$gender = Helpers::getGenderByCookie();
$this->setNavHeader($tag, true, SITE_MAIN);
}
... ... @@ -116,13 +116,6 @@ class IndexController extends AbstractAction
$id = $this->get('id');
$channel = $this->get('yh_channel');
// 获取作者信息
$author = ListData::author($id);
// 作者信息不存在,则跳到错误页面
if (!isset($author['name'])) {
$this->error();
}
// 标识是不是APP客户端
$isApp = is_numeric($channel);
// APP访问时通过频道参数判断性别
... ... @@ -141,10 +134,17 @@ class IndexController extends AbstractAction
// 从Cookie获取
else {
$gender = Helpers::getGenderByCookie();
$this->setNavHeader('编辑简介', true, SITE_MAIN);
}
// 获取作者信息
$author = ListData::author($id);
// 作者信息不存在,则跳到错误页面
if (!isset($author['name'])) {
$this->error();
}
$this->setTitle('编辑简介');
$uid = $this->getUid();
... ... @@ -171,7 +171,7 @@ class IndexController extends AbstractAction
}
$data['guang']['infos'] = $build;
}
$data['guang']['gender'] = $gender;
$data['guang']['isApp'] = $isApp ? 1 : 0;
... ... @@ -236,7 +236,6 @@ class IndexController extends AbstractAction
$this->_view->display('page', $data);
exit();
} while (false);
echo ' ';
... ...