Authored by hf

code review by fei.hong: do merge yang.yang and shaofeng.zhou fixes bugs codes

@@ -299,8 +299,6 @@ class AbstractAction extends Controller_Abstract @@ -299,8 +299,6 @@ class AbstractAction extends Controller_Abstract
299 { 299 {
300 if ($this->_useSession) { 300 if ($this->_useSession) {
301 Session::start('yohobuy_session', null, 'yohobuy.com')->__set($name, $value); 301 Session::start('yohobuy_session', null, 'yohobuy.com')->__set($name, $value);
302 - } else {  
303 - Session::fileStart('yohobuy_session')->__set($name, $value);  
304 } 302 }
305 } 303 }
306 304
@@ -315,7 +313,7 @@ class AbstractAction extends Controller_Abstract @@ -315,7 +313,7 @@ class AbstractAction extends Controller_Abstract
315 if ($this->_useSession) { 313 if ($this->_useSession) {
316 return Session::start('yohobuy_session', null, 'yohobuy.com')->__get($name); 314 return Session::start('yohobuy_session', null, 'yohobuy.com')->__get($name);
317 } else { 315 } else {
318 - return Session::fileStart('yohobuy_session')->__get($name); 316 + return '';
319 } 317 }
320 } 318 }
321 319
@@ -431,10 +429,10 @@ class AbstractAction extends Controller_Abstract @@ -431,10 +429,10 @@ class AbstractAction extends Controller_Abstract
431 * 429 *
432 * @param string $title 头部标题 430 * @param string $title 头部标题
433 * @param mixed $backUrl 返回的链接 431 * @param mixed $backUrl 返回的链接
434 - * @param string $homeUrl 返回首页的链接 432 + * @param boolean $navBtn 是否显示右上角导航
435 * @return void 433 * @return void
436 */ 434 */
437 - protected function setNavHeader($title = '', $backUrl = true, $homeUrl = '/', $navBtn = false) 435 + protected function setNavHeader($title = '', $backUrl = true, $navBtn = true)
438 { 436 {
439 $header = array(); 437 $header = array();
440 438
@@ -452,11 +450,16 @@ class AbstractAction extends Controller_Abstract @@ -452,11 +450,16 @@ class AbstractAction extends Controller_Abstract
452 if (!empty($title)) { 450 if (!empty($title)) {
453 $header['navTitle'] = $title; 451 $header['navTitle'] = $title;
454 } 452 }
455 - if (!empty($homeUrl)) { 453 + /*if (!empty($homeUrl)) {
456 $header['navHome'] = $homeUrl . '?go=1&t=' . time(); 454 $header['navHome'] = $homeUrl . '?go=1&t=' . time();
457 - } 455 + }*/
458 if ($navBtn) { 456 if ($navBtn) {
459 - $header['navBtn'] = $navBtn; 457 + $header['navBtn'] = array(
  458 + 'indexUrl' => Helpers::url('/?go=1'), //首页
  459 + 'categoryUrl' => Helpers::url('/cate'), // 分类
  460 + 'shoppingCartUrl' => Helpers::url('/cart/index/index'), // 购物车
  461 + 'mineUrl' => Helpers::url('/home'), // 我的
  462 + );
460 } 463 }
461 464
462 // 默认使用男生的头部 465 // 默认使用男生的头部