|
From: FlorinCB <ory...@us...> - 2008-09-30 07:06:24
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb2/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26368/includes/shared/phpbb2/includes Modified Files: emailer.php functions.php functions_post.php functions_selects.php functions_validate.php Log Message: rewrite for php4 and php6 issues Index: functions_validate.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions_validate.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_validate.php 9 Sep 2007 16:51:51 -0000 1.1 --- functions_validate.php 30 Sep 2008 07:04:43 -0000 1.2 *************** *** 32,36 **** // Remove doubled up spaces $username = preg_replace('#\s+#', ' ', trim($username)); ! $username = phpBB2::phpbb_clean_username($username); $sql = "SELECT username --- 32,36 ---- // Remove doubled up spaces $username = preg_replace('#\s+#', ' ', trim($username)); ! $username = $phpBB2->phpbb_clean_username($username); $sql = "SELECT username Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions.php 15 Jun 2008 09:15:45 -0000 1.3 --- functions.php 30 Sep 2008 07:04:42 -0000 1.4 *************** *** 27,490 **** class phpBB2 { ! function get_db_stat($mode) ! { ! global $db; ! ! switch( $mode ) { ! case 'usercount': [...1844 lines suppressed...] ! $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)); ! // Redirect via an HTML form for PITA webservers ! if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) { ! header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url); ! echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>'; ! exit; } ! // Behave as per HTTP/1.1 spec for others ! header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url); exit; } } ?> \ No newline at end of file Index: functions_selects.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions_selects.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_selects.php 9 Sep 2007 16:51:51 -0000 1.1 --- functions_selects.php 30 Sep 2008 07:04:42 -0000 1.2 *************** *** 34,38 **** while ( $file = readdir($dir) ) { ! if (preg_match('#^lang_#i', $file) && !is_file(@phpBB2::phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@phpBB2::phpbb_realpath($phpbb_root_path . $dirname . '/' . $file))) { $filename = trim(str_replace("lang_", "", $file)); --- 34,38 ---- while ( $file = readdir($dir) ) { ! if (preg_match('#^lang_#i', $file) && !is_file(@$phpBB2->phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@$phpBB2->phpbb_realpath($phpbb_root_path . $dirname . '/' . $file))) { $filename = trim(str_replace("lang_", "", $file)); Index: functions_post.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions_post.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_post.php 24 Sep 2008 14:50:50 -0000 1.3 --- functions_post.php 30 Sep 2008 07:04:42 -0000 1.4 *************** *** 633,637 **** $orig_word = array(); $replacement_word = array(); ! phpBB2::obtain_word_list($orig_word, $replacement_word); $emailer->from($board_config['board_email']); --- 633,637 ---- $orig_word = array(); $replacement_word = array(); ! $phpBB2->obtain_word_list($orig_word, $replacement_word); $emailer->from($board_config['board_email']); Index: emailer.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/emailer.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** emailer.php 9 Sep 2007 16:51:51 -0000 1.1 --- emailer.php 30 Sep 2008 07:04:41 -0000 1.2 *************** *** 103,111 **** $tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; ! if (!@file_exists(@phpBB2::phpbb_realpath($tpl_file))) { $tpl_file = $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl'; ! if (!@file_exists(@phpBB2::phpbb_realpath($tpl_file))) { mx_message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__); --- 103,111 ---- $tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; ! if (!@file_exists(@$phpBB2->phpbb_realpath($tpl_file))) { $tpl_file = $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl'; ! if (!@file_exists(@$phpBB2->phpbb_realpath($tpl_file))) { mx_message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__); *************** *** 358,362 **** function encode_file($sourcefile) { ! if (is_readable(phpBB2::phpbb_realpath($sourcefile))) { $fd = fopen($sourcefile, "r"); --- 358,362 ---- function encode_file($sourcefile) { ! if (is_readable($phpBB2->phpbb_realpath($sourcefile))) { $fd = fopen($sourcefile, "r"); |