Changeset 10018
- Timestamp:
- 11/28/08 12:31:27 (1 month ago)
- Files:
-
- branches/0.8/jaws/html/include/Jaws/Header.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/include/Jaws/Header.php
r7922 r10018 6 6 * @package Core 7 7 * @author Pablo Fischer <pablo@pablo.com.mx> 8 * @author Ali Fazelzadeh <afz@php.net> 8 9 * @copyright 2005-2008 Jaws Development Group 9 10 * @license http://www.gnu.org/copyleft/lesser.html … … 17 18 * Edits the location of the browser, once its set it will exit 18 19 * 19 * @param string $url URL to move the location 20 * @param string $url URL to move the location if empty redirect to refer page 20 21 * @access public 21 22 */ 22 function Location($url )23 function Location($url = '') 23 24 { 24 25 $GLOBALS['app']->Session->Synchronize(); 26 if (empty($url)) { 27 $url = $GLOBALS['app']->getSiteURL() . '/'; 28 } 29 30 header('Location: '.$url); 31 exit; 32 } 33 34 /** 35 * Redirect to referrer page 36 * 37 * @access public 38 */ 39 function Referrer() 40 { 41 $GLOBALS['app']->Session->Synchronize(); 42 if (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) { 43 $url = $_SERVER['HTTP_REFERER']; 44 } else { 45 $url = $GLOBALS['app']->getSiteURL() . '/'; 46 } 47 25 48 header('Location: '.$url); 26 49 exit; … … 92 115 } 93 116 } 94 ?>
