Changeset 84 for trunk/lib/App.inc.php
- Timestamp:
- Apr 8, 2006 3:15:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r83 r84 343 343 344 344 /** 345 * Add a message to the s tring globalmessage, which is printed in the header.345 * Add a message to the session, which is printed in the header. 346 346 * Just a simple way to print messages to the user. 347 347 * … … 856 856 } 857 857 858 /** 859 * Redirects a user by calling the App::dieURL(). It will use: 860 * 1. the stored boomerang URL, it it exists 861 * 2. the referring URL, it it exists. 862 * 3. an empty string, which will force App::dieURL to use the default URL. 863 */ 864 function dieBoomerangURL($id=null, $carry_args=null) 858 /* 859 * Redirects a user by calling App::dieURL(). It will use: 860 * 1. the stored boomerang URL, it it exists 861 * 2. a specified $default_url, it it exists 862 * 3. the referring URL, it it exists. 863 * 4. redirect_home_url configuration variable. 864 * 865 * @access public 866 * @param string $id Identifier for this script. 867 * @param mixed $carry_args Additional arguments to carry in the URL automatically (see App::oHREF()). 868 * @param string $default_url A default URL if there is not a valid specified boomerang URL. 869 * @return bool False if the session is not running. No return otherwise. 870 * @author Quinn Comendant <quinn@strangecode.com> 871 * @since 31 Mar 2006 19:17:00 872 */ 873 function dieBoomerangURL($id=null, $carry_args=null, $default_url=null) 865 874 { 866 875 if (!isset($this) || !is_a($this, 'App') && !is_subclass_of($this, 'App')) { … … 883 892 // Delete stored boomerang. 884 893 $this->deleteBoomerangURL($id); 894 } else if (isset($default_url)) { 895 $url = $default_url; 896 } 885 897 } else if (!refererIsMe()) { 886 898 // Ensure that the redirecting page is not also the referrer. … … 893 905 } 894 906 895 896 // A redirection will never happen immediatly twice. 907 // A redirection will never happen immediately twice. 897 908 // Set the time so ensure this doesn't happen. 898 909 $_SESSION[$this->app]['boomerang']['time'] = time(); … … 916 927 return false; 917 928 } 918 // A redirection will never happen immediat ly after setting the boomerangURL.929 // A redirection will never happen immediately after setting the boomerangURL. 919 930 // Set the time so ensure this doesn't happen. See App::validBoomerangURL for more. 920 931
Note: See TracChangeset
for help on using the changeset viewer.