~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to phabricator/src/applications/auth/controller/PhabricatorAuthStartController.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-01-29 00:15:58 UTC
  • mfrom: (0.16.1) (0.15.1) (0.12.2) (2.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150129001558-na84707j70qqla7z
Tags: 0~git20150129-1
* New snapshot release
* restricted access to local config file (closes: #775479)
* moved local config file to /var/lib/phabricator (closes: #775478)
* switched mysql-server dependency to recommends (closes: #773536)
* use /run instead of /var/run (closes: #775803)
* prevent package reinstall from overwritting local changes (closes: #776288)

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    }
78
78
 
79
79
    $next_uri = $request->getStr('next');
80
 
    if (!$next_uri) {
81
 
      $next_uri_path = $this->getRequest()->getPath();
82
 
      if ($next_uri_path == '/auth/start/') {
83
 
        $next_uri = '/';
84
 
      } else {
85
 
        $next_uri = $this->getRequest()->getRequestURI();
 
80
    if (!strlen($next_uri)) {
 
81
      if ($this->getDelegatingController()) {
 
82
        // Only set a next URI from the request path if this controller was
 
83
        // delegated to, which happens when a user tries to view a page which
 
84
        // requires them to login.
 
85
 
 
86
        // If this controller handled the request directly, we're on the main
 
87
        // login page, and never want to redirect the user back here after they
 
88
        // login.
 
89
        $next_uri = (string)$this->getRequest()->getRequestURI();
86
90
      }
87
91
    }
88
92
 
89
93
    if (!$request->isFormPost()) {
90
 
      PhabricatorCookies::setNextURICookie($request, $next_uri);
 
94
      if (strlen($next_uri)) {
 
95
        PhabricatorCookies::setNextURICookie($request, $next_uri);
 
96
      }
91
97
      PhabricatorCookies::setClientIDCookie($request);
92
98
    }
93
99