|
From: Jon O. <jon...@us...> - 2008-02-18 19:41:58
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29248/includes Modified Files: forum_hack.php Log Message: Updated for 2.9.x Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** forum_hack.php 18 Feb 2008 18:37:13 -0000 1.37 --- forum_hack.php 18 Feb 2008 19:41:48 -0000 1.38 *************** *** 187,193 **** function init_paths() { ! global $mx_root_path, $db, $phpEx; ! if ( defined( PHPBB_URL ) && defined( PORTAL_URL ) ) { $this->phpbb_url = PHPBB_URL; --- 187,193 ---- function init_paths() { ! global $mx_root_path, $db, $phpEx, $board_config; ! if ( defined( 'PHPBB_URL' ) && defined( 'PORTAL_URL' ) ) { $this->phpbb_url = PHPBB_URL; *************** *** 206,211 **** { $row = $db->sql_fetchrow( $result ); ! $this->phpbb_url = $row['portal_phpbb_url']; ! $this->portal_url = $row['portal_url']; } $db->sql_freeresult($result); --- 206,239 ---- { $row = $db->sql_fetchrow( $result ); ! if (file_exists( $mx_root_path . 'includes/sessions/index.htm' )) ! { ! // ! // Core 2.9.x ! // ! $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($row['script_path'])); ! $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 ! ! define('PORTAL_URL', $server_url); ! ! $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; ! ! $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; ! define('PHPBB_URL', $server_url_phpbb); ! ! $this->phpbb_url = PHPBB_URL; ! $this->portal_url = PORTAL_URL; ! } ! else ! { ! // ! // Core 2.8.x ! // ! $this->phpbb_url = $row['portal_phpbb_url']; ! $this->portal_url = $row['portal_url']; ! } } $db->sql_freeresult($result); *************** *** 669,673 **** $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], --- 697,701 ---- $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], phpBB2::create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], *************** *** 1505,1509 **** 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], --- 1533,1537 ---- 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], phpBB2::create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], *************** *** 1706,1709 **** --- 1734,1738 ---- case 'viewforum': $code = str_replace('<a href=\"modcp', '<a href=\"'.$phpbb_root_path.'modcp', $code); + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); break; *************** *** 1719,1722 **** --- 1748,1752 ---- $code = str_replace('$temp_url = "posting.', '$temp_url = "' . $phpbb_root_path . 'posting.', $code); $code = str_replace('$temp_url = "bin.', '$temp_url = "' . $phpbb_root_path . 'bin.', $code); + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); // *************** *** 1742,1750 **** --- 1772,1789 ---- case 'search': $code = str_replace('username_search(', '$mx_forum->username_search(', $code); + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); break; case 'modcp': $code = str_replace('$u_view_topic = "modcp.$phpEx', '$u_view_topic = $phpbb_root_path."modcp.$phpEx', $code); + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); + break; + + case 'posting': + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); + break; + case 'privmsg': + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); break; /* *************** *** 1792,1795 **** --- 1831,1839 ---- break; + case 'includes/topic_review': + + $code = str_replace('obtain_word_list(', 'phpBB2::obtain_word_list(', $code); + break; + case 'cash': *************** *** 1798,1802 **** --- 1842,1848 ---- } + // //this funtions are now in funtion container + // $code = str_replace('get_db_stat(', 'phpBB2::get_db_stat(', $code); $code = str_replace('create_date(', 'phpBB2::create_date(', $code); *************** *** 1807,1814 **** // ! // Now do a recursive study of sub includes ;) // //$code = preg_replace('#^(.?).*(include)(.*?)(includes\/usercp_)(.*?)(\.).*(\r\n?|\n)#m', "\n " . '$mx_forum->read_file( \'includes/usercp_\\5\', true );' . "\n", $code); $code = preg_replace('#^(.?).*(include)(.*?)(includes\/)(.*?)(\.).*(\r\n?|\n)#m', "\n " . '$mx_forum->read_file( \'includes/\\5\', true );' . "\n", $code); $phpbb_output = ''; --- 1853,1861 ---- // ! // Now do a recursive study of sub includes/requires ;) // //$code = preg_replace('#^(.?).*(include)(.*?)(includes\/usercp_)(.*?)(\.).*(\r\n?|\n)#m', "\n " . '$mx_forum->read_file( \'includes/usercp_\\5\', true );' . "\n", $code); $code = preg_replace('#^(.?).*(include)(.*?)(includes\/)(.*?)(\.).*(\r\n?|\n)#m', "\n " . '$mx_forum->read_file( \'includes/\\5\', true );' . "\n", $code); + $code = preg_replace('#^(.?).*(require)(.*?)(includes\/)(.*?)(\.).*(\r\n?|\n)#m', "\n " . '$mx_forum->read_file( \'includes/\\5\', true );' . "\n", $code); $phpbb_output = ''; |