Changeset 1649 for trunk/include/functions.inc.php
- Timestamp:
- Dec 11, 2006, 7:04:53 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1637 r1649 601 601 602 602 /** 603 * Redirects to the given URL 603 * Redirects to the given URL (HTTP method) 604 * 605 * Note : once this function called, the execution doesn't go further 606 * (presence of an exit() instruction. 607 * 608 * @param string $url 609 * @return void 610 */ 611 function redirect_http( $url ) 612 { 613 if (ob_get_length () !== FALSE) 614 { 615 ob_clean(); 616 } 617 header('Request-URI: '.$url); 618 header('Content-Location: '.$url); 619 header('Location: '.$url); 620 exit(); 621 } 622 623 /** 624 * Redirects to the given URL (HTML method) 604 625 * 605 626 * Note : once this function called, the execution doesn't go further … … 611 632 * @return void 612 633 */ 613 function redirect ( $url , $msg = '', $refresh_time = 0)634 function redirect_html( $url , $msg = '', $refresh_time = 0) 614 635 { 615 636 global $user, $template, $lang_info, $conf, $lang, $t2, $page, $debug; … … 651 672 652 673 exit(); 674 } 675 676 /** 677 * Redirects to the given URL (Switch to HTTP method or HTML method) 678 * 679 * Note : once this function called, the execution doesn't go further 680 * (presence of an exit() instruction. 681 * 682 * @param string $url 683 * @param string $title_msg 684 * @param integer $refreh_time 685 * @return void 686 */ 687 function redirect( $url , $msg = '', $refresh_time = 0) 688 { 689 global $conf; 690 691 // with RefeshTime <> 0, only html must be used 692 if (($conf['default_redirect_method'] == 'http') and ($refresh_time == 0)) 693 { 694 redirect_http($url); 695 } 696 else 697 { 698 redirect_html($url, $msg, $refresh_time); 699 } 653 700 } 654 701
Note: See TracChangeset
for help on using the changeset viewer.