Skip to content

Commit

Permalink
Start to check #65
Browse files Browse the repository at this point in the history
  • Loading branch information
vendethiel committed Dec 21, 2018
1 parent f6718fe commit af5d209
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 22 deletions.
6 changes: 3 additions & 3 deletions IM150/admin/admin_pcp_wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ function wizurl($mode,$extra=''){
global $phpEx;

if($extra){
return append_sid("admin_pcp_wizard.$phpEx?mode=$mode&$extra");
return append_sid("admin_pcp_wizard.$phpEx?mode=$mode&$extra", true);
} else {
return append_sid("admin_pcp_wizard.$phpEx?mode=$mode");
return append_sid("admin_pcp_wizard.$phpEx?mode=$mode", true);
}
}

function wizredirect($nextmode,$extra=''){
redirect('./admin/'.wizurl($nextmode,$extra));
redirect("/admin/".wizurl($nextmode,$extra), false);
}

function menu(){
Expand Down
7 changes: 5 additions & 2 deletions IM150/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ function phpbb_realpath($path)
return (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);
}

function redirect($url)
function redirect($url, $sanitize_slashes = true)
{
global $db, $board_config;

Expand All @@ -1976,7 +1976,10 @@ function redirect($url)
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url));
if ($sanitize_slashes)
{
$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url));
}

// Redirect via an HTML form for PITA webservers
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
Expand Down
19 changes: 2 additions & 17 deletions IM150/includes/page_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,10 @@
// The New Gzip :: start
$do_gzip_compress = FALSE;
if($board_config['gzip_compress']){
$phpver = phpversion();
$useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
$accept_encoding = (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : getenv('HTTP_ACCEPT_ENCODING');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ){
if ( extension_loaded('zlib') ) {
if (headers_sent() != TRUE) {
if(strstr($accept_encoding,'gzip')) {
ob_start("ob_gzhandler");
}
}
}
} else if ( $phpver > '4.0' ) {
if ( strstr($accept_encoding, 'gzip') ) {
if (extension_loaded('zlib') ) {
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
}
}
if ( extension_loaded('zlib') && !headers_sent() && strstr($accept_encoding,'gzip')) {
ob_start("ob_gzhandler");
}
}
// The New Gzip :: end
Expand Down

0 comments on commit af5d209

Please sign in to comment.