From: <vb...@us...> - 2002-10-03 00:23:23
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv30158/core Modified Files: html_api.php util_api.php Log Message: - Removed extra code from logout that was never executed. - Remove print_header_redirect() since it wasn't used - util_header_redirect() should be used instead. - Added @ infront of header() calls. - Used util_header_redirect() rather than using header() directly. Index: html_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/html_api.php,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- html_api.php 2 Oct 2002 06:03:58 -0000 1.17 +++ html_api.php 3 Oct 2002 00:23:19 -0000 1.18 @@ -38,24 +38,6 @@ } } ### -------------------- - function print_header_redirect( $p_url ) { - $t_use_iis = config_get( 'use_iis'); - - if ( OFF == $t_use_iis ) { - header( 'Status: 302' ); - } - @header( 'Content-Type: text/html' ); - @header( 'Pragma: no-cache' ); - @header( 'Expires: Fri, 01 Jan 1999 00:00:00 GMT' ); - @header( 'Cache-control: no-cache, no-cache="Set-Cookie", private' ); - if ( ON == $t_use_iis ) { - @header( "Refresh: 0;url=$p_url" ); - } else { - @header( "Location: $p_url" ); - } - die; # additional output can cause problems so let's just stop output here - } - ### -------------------- function print_meta_redirect( $p_url, $p_time ) { echo "<meta http-equiv=\"Refresh\" content=\"$p_time;URL=$p_url\">"; } Index: util_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/util_api.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- util_api.php 1 Oct 2002 03:06:22 -0000 1.4 +++ util_api.php 3 Oct 2002 00:23:19 -0000 1.5 @@ -41,17 +41,17 @@ function util_header_redirect( $p_url ) { $t_use_iis = config_get( 'use_iis'); if ( OFF == $t_use_iis ) { - header( 'Status: 302' ); + @header( 'Status: 302' ); } - header( 'Content-Type: text/html' ); - header( 'Pragma: no-cache' ); - header( 'Expires: Fri, 01 Jan 1999 00:00:00 GMT' ); - header( 'Cache-control: no-cache, no-cache="Set-Cookie", private' ); + @header( 'Content-Type: text/html' ); + @header( 'Pragma: no-cache' ); + @header( 'Expires: Fri, 01 Jan 1999 00:00:00 GMT' ); + @header( 'Cache-control: no-cache, no-cache="Set-Cookie", private' ); if ( ON == $t_use_iis ) { - header( "Refresh: 0;url=$p_url" ); + @header( "Refresh: 0;url=$p_url" ); } else { - header( "Location: $p_url" ); + @header( "Location: $p_url" ); } die; # additional output can cause problems so let's just stop output here } |