Development

Changeset 19772

You must first sign up to be able to contribute.

Changeset 19772

Show
Ignore:
Timestamp:
07/01/09 10:41:12 (7 months ago)
Author:
fabien
Message:

[sfGuardPlugin] fixed login method when called from an Ajax request (closes #6606)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfGuardPlugin/branches/1.0/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php

    r10913 r19772  
    2121  { 
    2222    $user = $this->getUser(); 
     23 
     24    if ($this->getRequest()->isXmlHttpRequest()) 
     25    { 
     26      $this->getResponse()->setHeaderOnly(true); 
     27      $this->getResponse()->setStatusCode(401); 
     28 
     29      return sfView::NONE; 
     30    } 
     31 
    2332    if ($this->getRequest()->getMethod() == sfRequest::POST) 
    2433    { 
     
    3847    else 
    3948    { 
    40       if ($this->getRequest()->isXmlHttpRequest()) 
    41       { 
    42         $this->getResponse()->setHeaderOnly(true); 
    43         $this->getResponse()->setStatusCode(401); 
    44  
    45         return sfView::NONE; 
    46       } 
    47  
    4849      // if we have been forwarded, then the referer is the current URL 
    4950      // if not, this is the referer of the current request 
  • plugins/sfGuardPlugin/branches/1.1/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php

    r10913 r19772  
    2626    } 
    2727 
     28    if ($request->isXmlHttpRequest()) 
     29    { 
     30      $this->getResponse()->setHeaderOnly(true); 
     31      $this->getResponse()->setStatusCode(401); 
     32 
     33      return sfView::NONE; 
     34    } 
     35 
    2836    $class = sfConfig::get('app_sf_guard_plugin_signin_form', 'sfGuardFormSignin'); 
    2937    $this->form = new $class(); 
     
    4755    else 
    4856    { 
    49       if ($request->isXmlHttpRequest()) 
    50       { 
    51         $this->getResponse()->setHeaderOnly(true); 
    52         $this->getResponse()->setStatusCode(401); 
    53  
    54         return sfView::NONE; 
    55       } 
    56  
    5757      // if we have been forwarded, then the referer is the current URL 
    5858      // if not, this is the referer of the current request 
  • plugins/sfGuardPlugin/branches/1.2/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php

    r12075 r19772  
    2626    } 
    2727 
     28    if ($request->isXmlHttpRequest()) 
     29    { 
     30      $this->getResponse()->setHeaderOnly(true); 
     31      $this->getResponse()->setStatusCode(401); 
     32 
     33      return sfView::NONE; 
     34    } 
     35 
    2836    $class = sfConfig::get('app_sf_guard_plugin_signin_form', 'sfGuardFormSignin'); 
    2937    $this->form = new $class(); 
     
    4755    else 
    4856    { 
    49       if ($request->isXmlHttpRequest()) 
    50       { 
    51         $this->getResponse()->setHeaderOnly(true); 
    52         $this->getResponse()->setStatusCode(401); 
    53  
    54         return sfView::NONE; 
    55       } 
    56  
    5757      // if we have been forwarded, then the referer is the current URL 
    5858      // if not, this is the referer of the current request 
  • plugins/sfGuardPlugin/branches/1.2/package.xml

    r15757 r19772  
    177177 
    178178 <changelog> 
     179   <release> 
     180      <version> 
     181        <release>3.1.4</release> 
     182        <api>3.0.0</api> 
     183      </version> 
     184      <stability> 
     185       <release>stable</release> 
     186       <api>stable</api> 
     187      </stability> 
     188      <license uri="http://www.symfony-project.com/license">MIT license</license> 
     189      <date>2008-12-05</date> 
     190      <license>MIT</license> 
     191      <notes> 
     192        * fabien: fixed login method when called from an Ajax request 
     193      </notes> 
     194    </release> 
    179195   <release> 
    180196      <version> 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.