Changeset 159 for trunk/lib/App.inc.php


Ignore:
Timestamp:
Jun 11, 2006 5:41:23 AM (18 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r154 r159  
    830830    * @param    mixed   $carry_args     Additional arguments to carry in the URL automatically (see $app->oHREF()).
    831831    * @param    string  $default_url    A default URL if there is not a valid specified boomerang URL.
     832    * @param    bool    $queryless_referrer_comparison   Exclude the URL query from the refererIsMe() comparison.
    832833    * @return   bool                    False if the session is not running. No return otherwise.
    833834    * @author   Quinn Comendant <quinn@strangecode.com>
    834835    * @since    31 Mar 2006 19:17:00
    835836    */
    836     function dieBoomerangURL($id=null, $carry_args=null, $default_url=null)
     837    function dieBoomerangURL($id=null, $carry_args=null, $default_url=null, $queryless_referrer_comparison=false)
    837838    {
    838839        if (!$this->running) {
     
    854855        } else if (isset($default_url)) {
    855856            $url = $default_url;
    856         } else if (!refererIsMe()) {
     857        } else if (!refererIsMe(true === $queryless_referrer_comparison)) {
    857858            // Ensure that the redirecting page is not also the referrer.
    858859            $url = getenv('HTTP_REFERER');
     
    888889        if ('' != $url && is_string($url)) {
    889890            // Delete any boomerang request keys in the query string.
    890             $url = preg_replace('/boomerang=[\w]+/', '', $url);
     891            $url = preg_replace('/[&?]?boomerang=[\w]+/', '', $url);
    891892
    892893            if (isset($_SESSION['_app'][$this->_ns]['boomerang']['url']) && is_array($_SESSION['_app'][$this->_ns]['boomerang']['url']) && !empty($_SESSION['_app'][$this->_ns]['boomerang']['url'])) {
     
    9991000        }
    10001001        if ($boomerang_time >= (time() - 2)) {
    1001             // Last boomerang direction was more than 2 seconds ago.
    1002             $this->logMsg(sprintf('validBoomerangURL(%s) not valid, boomerang_time too short: %s', $id, time() - $boomerang_time), LOG_DEBUG, __FILE__, __LINE__);
     1002            // Last boomerang direction was less than 2 seconds ago.
     1003            $this->logMsg(sprintf('validBoomerangURL(%s) not valid, boomerang_time too short: %s seconds', $id, time() - $boomerang_time), LOG_DEBUG, __FILE__, __LINE__);
    10031004            return false;
    10041005        }
Note: See TracChangeset for help on using the changeset viewer.