~ubuntu-branches/ubuntu/trusty/zendframework/trusty

« back to all changes in this revision

Viewing changes to library/Zend/Controller/Request/Http.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank Habermann
  • Date: 2010-04-28 20:10:00 UTC
  • mfrom: (1.3.1 upstream) (9.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100428201000-o347bj5qb5i3tpot
Tags: 1.10.4-1
new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * @package    Zend_Controller
17
17
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18
18
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
19
 
 * @version    $Id: Http.php 20096 2010-01-06 02:05:09Z bkarwin $
 
19
 * @version    $Id: Http.php 20984 2010-02-08 16:25:08Z matthew $
20
20
 */
21
21
 
22
22
/** @see Zend_Controller_Request_Abstract */
623
623
                $requestUri = substr($requestUri, 0, $pos);
624
624
            }
625
625
 
626
 
            if ((null !== $baseUrl)
627
 
                && (false === ($pathInfo = substr($requestUri, strlen($baseUrl)))))
628
 
            {
629
 
                // If substr() returns false then PATH_INFO is set to an empty string
 
626
            if (null !== $baseUrl
 
627
                && ((!empty($baseUrl) && 0 === strpos($requestUri, $baseUrl)) 
 
628
                    || empty($baseUrl))
 
629
                    && false === ($pathInfo = substr($requestUri, strlen($baseUrl)))
 
630
            ){ 
 
631
                // If substr() returns false then PATH_INFO is set to an empty string 
630
632
                $pathInfo = '';
631
 
            } elseif (null === $baseUrl) {
632
 
                $pathInfo = $requestUri;
 
633
            } elseif (null === $baseUrl 
 
634
                    || (!empty($baseUrl) && false === strpos($requestUri, $baseUrl))
 
635
            ) { 
 
636
                $pathInfo = $requestUri; 
633
637
            }
634
638
        }
635
639