|
From: FlorinCB <ory...@us...> - 2008-09-07 00:38:58
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20839 Modified Files: forum_hack.php Log Message: this will fix a bunch of problems Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** forum_hack.php 6 Sep 2008 17:01:25 -0000 1.64 --- forum_hack.php 7 Sep 2008 00:38:51 -0000 1.65 *************** *** 251,255 **** $server_name = trim($row['server_name']); $server_protocol = ( $row['cookie_secure'] ) ? 'https://' : 'http://'; ! $server_port = ( $row['server_port'] <> 80 ) ? ':' . trim($row['server_port']) . '/' : '/'; $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it --- 251,255 ---- $server_name = trim($row['server_name']); $server_protocol = ( $row['cookie_secure'] ) ? 'https://' : 'http://'; ! $server_port = (($row['server_port']) && ($row['server_port'] <> 80)) ? ':' . trim($row['server_port']) . '/' : '/'; $server_url = $server_protocol . str_replace("//", "/", $server_name . $server_port . $script_name . '/'); //On some server the slash is not added and this trick will fix it *************** *** 1975,1979 **** // ! if ( defined( 'IN_PORTAL' ) ) { /* ================================================================================ * --- 1975,1979 ---- // ! if (defined('IN_PORTAL')) { /* ================================================================================ * *************** *** 1997,2007 **** if ($mx_forum->phpbb_config['enable_module']) { ! if ( isset($HTTP_POST_FILES) && !empty( $HTTP_POST_FILES ) ) { ! $up_files_keys = array_keys( $HTTP_POST_FILES ); foreach( $up_files_keys as $up_file ) { ! @rename($HTTP_POST_FILES[$up_file]['tmp_name'], $HTTP_POST_FILES[$up_file]['tmp_name'] . '.mxbb'); ! $HTTP_POST_FILES[$up_file]['tmp_name'] .= '.mxbb'; $_FILES[$up_file]['tmp_name'] .= '.mxbb'; } --- 1997,2007 ---- if ($mx_forum->phpbb_config['enable_module']) { ! if (isset($_FILES) && !empty($_FILES)) { ! $up_files_keys = array_keys($_FILES); foreach( $up_files_keys as $up_file ) { ! @rename($_FILES[$up_file]['tmp_name'], $_FILES[$up_file]['tmp_name'] . '.mxbb'); ! $_FILES[$up_file]['tmp_name'] .= '.mxbb'; $_FILES[$up_file]['tmp_name'] .= '.mxbb'; } *************** *** 2010,2017 **** $http_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $http_server = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $board_config['server_name'] ) ); ! $http_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim( $board_config['server_port'] ) : ''; $request_url = $http_protocol . $http_server . $http_port . $_SERVER['REQUEST_URI']; ! $phpbb_uri = substr( $request_url, strlen( $mx_forum->phpbb_url ) ); ! $portal_url = $mx_forum->get_portal_url( $phpbb_uri, true, true ); if ( defined( 'MX_FORUM_DEBUG' ) && isset( $_GET['debug'] ) && intval( $_GET['debug'] ) == 1 ) --- 2010,2018 ---- $http_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $http_server = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $board_config['server_name'] ) ); ! $http_port = (($board_config['server_port']) && ($board_config['server_port'] <> 80)) ? ':' . trim( $board_config['server_port'] ) : ''; $request_url = $http_protocol . $http_server . $http_port . $_SERVER['REQUEST_URI']; ! $phpbb_url = $mx_forum->phpbb_url; ! $phpbb_uri = substr($request_url, strlen($mx_forum->phpbb_url)); ! $portal_url = $mx_forum->get_portal_url($phpbb_uri, true, true); if ( defined( 'MX_FORUM_DEBUG' ) && isset( $_GET['debug'] ) && intval( $_GET['debug'] ) == 1 ) *************** *** 2026,2029 **** --- 2027,2031 ---- if (empty($portal_url)) { + //die("No page is defined for this phpBB script, we have nothing else to do... $phpbb_url"); return; } *************** *** 2040,2043 **** --- 2042,2046 ---- // $mx_forum->redirect($portal_url); + } } |