开发者

Differences between _redirect('*/*/') and _redirect('*/*')

I am a newbie to Magento and Zend frameworks. Here are two examples in Mage_Customer_AccountController:

line 127

public function loginPostAction(){
  if ($this->_getSession()->isLoggedIn()) {
         $this->_redirect('*/*/');
        开发者_如何转开发 return;
     }

and line 230

public function createAction()
    {
        if ($this->_getSession()->isLoggedIn()) {
            $this->_redirect('*/*');
            return;
        }

What difference will these two _redirect() result in?


These lines are equal, because Magento internally modifies url path to canonical view with "/" at the end.

The reason for writing once '*/*/' and other time '*/*' is just lack of style guidelines describing such cases for Magento developers. You can use any form you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜