Changeset 159 for trunk/lib/App.inc.php
- Timestamp:
- Jun 11, 2006 5:41:23 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r154 r159 830 830 * @param mixed $carry_args Additional arguments to carry in the URL automatically (see $app->oHREF()). 831 831 * @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. 832 833 * @return bool False if the session is not running. No return otherwise. 833 834 * @author Quinn Comendant <quinn@strangecode.com> 834 835 * @since 31 Mar 2006 19:17:00 835 836 */ 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) 837 838 { 838 839 if (!$this->running) { … … 854 855 } else if (isset($default_url)) { 855 856 $url = $default_url; 856 } else if (!refererIsMe( )) {857 } else if (!refererIsMe(true === $queryless_referrer_comparison)) { 857 858 // Ensure that the redirecting page is not also the referrer. 858 859 $url = getenv('HTTP_REFERER'); … … 888 889 if ('' != $url && is_string($url)) { 889 890 // Delete any boomerang request keys in the query string. 890 $url = preg_replace('/ boomerang=[\w]+/', '', $url);891 $url = preg_replace('/[&?]?boomerang=[\w]+/', '', $url); 891 892 892 893 if (isset($_SESSION['_app'][$this->_ns]['boomerang']['url']) && is_array($_SESSION['_app'][$this->_ns]['boomerang']['url']) && !empty($_SESSION['_app'][$this->_ns]['boomerang']['url'])) { … … 999 1000 } 1000 1001 if ($boomerang_time >= (time() - 2)) { 1001 // Last boomerang direction was morethan 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__); 1003 1004 return false; 1004 1005 }
Note: See TracChangeset
for help on using the changeset viewer.