Update of /cvsroot/mxbb/core/includes/shared/phpbb3/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26368/includes/shared/phpbb3/includes Modified Files: functions.php functions_admin.php functions_hook.php functions_module.php functions_posting.php message_parser.php Log Message: rewrite for php4 and php6 issues Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** functions.php 10 Jul 2008 23:02:06 -0000 1.21 --- functions.php 30 Sep 2008 07:04:43 -0000 1.22 *************** *** 30,845 **** class phpBB3_top { ! ! ! /** ! * set_var ! * ! * Set variable, used by {@link request_var the request_var function} ! * ! * @access private [...2027 lines suppressed...] --- 4476,4481 ---- if ($total_online_users > $board_config['record_online_users']) { ! $phpBB3->set_config('record_online_users', $total_online_users, true); ! $phpBB3->set_config('record_online_date', time(), true); } *************** *** 4748,4752 **** $template->display('body'); ! self::garbage_collection(); exit; --- 4751,4755 ---- $template->display('body'); ! $phpBB3->garbage_collection(); exit; Index: message_parser.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/message_parser.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** message_parser.php 7 Sep 2008 18:53:53 -0000 1.6 --- message_parser.php 30 Sep 2008 07:04:44 -0000 1.7 *************** *** 1034,1038 **** { // Init BBCode UID ! $this->bbcode_uid = substr(base_convert(phpBB3::unique_id(), 16, 36), 0, BBCODE_UID_LEN); if ($message) --- 1034,1038 ---- { // Init BBCode UID ! $this->bbcode_uid = substr(base_convert($phpBB3->unique_id(), 16, 36), 0, BBCODE_UID_LEN); if ($message) *************** *** 1129,1133 **** if ($allow_magic_url) { ! $this->magic_url(phpBB3::generate_board_url()); if ($board_config['max_' . $mode . '_urls']) --- 1129,1133 ---- if ($allow_magic_url) { ! $this->magic_url($phpBB3->generate_board_url()); if ($board_config['max_' . $mode . '_urls']) *************** *** 1211,1215 **** } ! ($custom_bbcode_uid) ? phpBB3::decode_message($this->message, $custom_bbcode_uid) : phpBB3::decode_message($this->message, $this->bbcode_uid); if (!$update_this_message) --- 1211,1215 ---- } ! ($custom_bbcode_uid) ? $phpBB3->decode_message($this->message, $custom_bbcode_uid) : $phpBB3->decode_message($this->message, $this->bbcode_uid); if (!$update_this_message) *************** *** 1232,1236 **** { // We use the global make_clickable function ! $this->message = phpBB3::make_clickable($this->message, $server_url); } --- 1232,1236 ---- { // We use the global make_clickable function ! $this->message = $phpBB3->make_clickable($this->message, $server_url); } *************** *** 1319,1323 **** $num_attachments = sizeof($this->attachment_data); ! $this->filename_data['filecomment'] = utf8_normalize_nfc(phpBB3::request_var('filecomment', '', true)); $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false; --- 1319,1323 ---- $num_attachments = sizeof($this->attachment_data); ! $this->filename_data['filecomment'] = utf8_normalize_nfc($phpBB3->request_var('filecomment', '', true)); $upload_file = (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none' && trim($_FILES[$form_name]['name'])) ? true : false; *************** *** 1326,1330 **** // First of all adjust comments if changed ! $actual_comment_list = utf8_normalize_nfc(phpBB3::request_var('comment_list', array(''), true)); foreach ($actual_comment_list as $comment_key => $comment) --- 1326,1330 ---- // First of all adjust comments if changed ! $actual_comment_list = utf8_normalize_nfc($phpBB3->request_var('comment_list', array(''), true)); foreach ($actual_comment_list as $comment_key => $comment) *************** *** 1406,1410 **** include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); ! $index = array_keys(phpBB3::request_var('delete_file', array(0 => 0))); $index = (!empty($index)) ? $index[0] : false; --- 1406,1410 ---- include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); ! $index = array_keys($phpBB3->request_var('delete_file', array(0 => 0))); $index = (!empty($index)) ? $index[0] : false; *************** *** 1504,1508 **** global $mx_user, $db, $phpbb_root_path, $phpEx, $board_config; ! $this->filename_data['filecomment'] = utf8_normalize_nfc(phpBB3::request_var('filecomment', '', true)); $attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array(); $this->attachment_data = array(); --- 1504,1508 ---- global $mx_user, $db, $phpbb_root_path, $phpEx, $board_config; ! $this->filename_data['filecomment'] = utf8_normalize_nfc($phpBB3->request_var('filecomment', '', true)); $attachment_data = (isset($_POST['attachment_data'])) ? $_POST['attachment_data'] : array(); $this->attachment_data = array(); Index: functions_hook.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_hook.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** functions_hook.php 10 Jul 2008 23:02:07 -0000 1.18 --- functions_hook.php 30 Sep 2008 07:04:44 -0000 1.19 *************** *** 165,169 **** '#([ \t\n])define#si' => '\1@define', '#display\(\'body\'\);#si' => "display('panel');", ! '#(garbage_collection|exit_handler)\(\);#si' => 'phpBB3::\1();', //'#\$template->#si' => '$mx_acp->template->', '#adm_page_footer\(\);#si' => '$mx_acp->_template_assign_vars();$template->pparse(\'panel\');', --- 165,169 ---- '#([ \t\n])define#si' => '\1@define', '#display\(\'body\'\);#si' => "display('panel');", ! '#(garbage_collection|exit_handler)\(\);#si' => '$phpBB3->\1();', //'#\$template->#si' => '$mx_acp->template->', '#adm_page_footer\(\);#si' => '$mx_acp->_template_assign_vars();$template->pparse(\'panel\');', Index: functions_module.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_module.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** functions_module.php 10 Jul 2008 23:02:07 -0000 1.20 --- functions_module.php 30 Sep 2008 07:04:44 -0000 1.21 *************** *** 361,368 **** $this->active_module = false; ! if (phpBB3::request_var('icat', '')) { $icat = $id; ! $id = phpBB3::request_var('icat', ''); } --- 361,368 ---- $this->active_module = false; ! if ($phpBB3->request_var('icat', '')) { $icat = $id; ! $id = $phpBB3->request_var('icat', ''); } *************** *** 437,442 **** } $mx_acp->template->assign_vars', ! '#(' . $FUNCTION_REPLACE . ')\(#si' => 'phpBB3::\1(', ! "#'(" . $FUNCTION_REPLACE . ")'#si" => "'phpBB3::\\1'" ); --- 437,442 ---- } $mx_acp->template->assign_vars', ! '#(' . $FUNCTION_REPLACE . ')\(#si' => '$phpBB3->\1(', ! "#'(" . $FUNCTION_REPLACE . ")'#si" => "'$phpBB3->\\1'" ); *************** *** 448,455 **** $modulecode = str_replace('auth_admin', 'phpbb_auth_admin', $modulecode); $modulecode = str_replace('include_once($phpbb_root_path . \'includes/acp/auth.\' . $phpEx);', 'mx_cache::load_file(\'acp/auth\', \'phpbb3\');', $modulecode); ! $modulecode = str_replace('function phpBB3::', 'function phpbb3_', $modulecode); ! $modulecode = preg_replace( '/function ([^(]*)?phpBB3::([^(]*)\(/si', 'function \1\2(', $modulecode); ! $modulecode = str_replace('$this->phpBB3::', '$this->', $modulecode); $includes_cnt = preg_match_all( '#(include|require)(_once)?\(([^)]*)\);#si', $modulecode, $includes_match); $modulecode = preg_replace( '#(include|require)(_once)?\(([^)]*)\);#si', '// MXP INCLUDE CODE \0', $modulecode); --- 448,455 ---- $modulecode = str_replace('auth_admin', 'phpbb_auth_admin', $modulecode); $modulecode = str_replace('include_once($phpbb_root_path . \'includes/acp/auth.\' . $phpEx);', 'mx_cache::load_file(\'acp/auth\', \'phpbb3\');', $modulecode); ! $modulecode = str_replace('function $phpBB3->', 'function phpbb3_', $modulecode); ! $modulecode = preg_replace( '/function ([^(]*)?$phpBB3->([^(]*)\(/si', 'function \1\2(', $modulecode); ! $modulecode = str_replace('$this->$phpBB3->', '$this->', $modulecode); $includes_cnt = preg_match_all( '#(include|require)(_once)?\(([^)]*)\);#si', $modulecode, $includes_match); $modulecode = preg_replace( '#(include|require)(_once)?\(([^)]*)\);#si', '// MXP INCLUDE CODE \0', $modulecode); *************** *** 500,504 **** $module_path = $phpbb_root_path . 'includes/' . $this->p_class; ! $icat = phpBB3::request_var('icat', ''); if ($this->active_module === false) --- 500,504 ---- $module_path = $phpbb_root_path . 'includes/' . $this->p_class; ! $icat = $phpBB3->request_var('icat', ''); if ($this->active_module === false) Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_admin.php 15 Jun 2008 21:01:41 -0000 1.4 --- functions_admin.php 30 Sep 2008 07:04:43 -0000 1.5 *************** *** 2448,2456 **** if (defined('IN_ADMIN')) { ! $log[$i]['action'] = phpBB3::bbcode_nl2br($log[$i]['action']); } else { ! $log[$i]['action'] = phpBB3::bbcode_nl2br(censor_text($log[$i]['action'])); } } --- 2448,2456 ---- if (defined('IN_ADMIN')) { ! $log[$i]['action'] = $phpBB3->bbcode_nl2br($log[$i]['action']); } else { ! $log[$i]['action'] = $phpBB3->bbcode_nl2br(censor_text($log[$i]['action'])); } } Index: functions_posting.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions_posting.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_posting.php 7 Sep 2008 02:16:48 -0000 1.6 --- functions_posting.php 30 Sep 2008 07:04:44 -0000 1.7 *************** *** 1029,1033 **** $poster_id = $row['user_id']; $post_subject = $row['post_subject']; ! $message = phpBB3::censor_text($row['post_text']); $decoded_message = false; --- 1029,1033 ---- $poster_id = $row['user_id']; $post_subject = $row['post_subject']; ! $message = $phpBB3->censor_text($row['post_text']); $decoded_message = false; *************** *** 1036,1042 **** { $decoded_message = $message; ! phpBB3::decode_message($decoded_message, $row['bbcode_uid']); ! $decoded_message = phpBB3::censor_text($decoded_message); $decoded_message = str_replace("\n", "<br />", $decoded_message); } --- 1036,1042 ---- { $decoded_message = $message; ! $phpBB3->decode_message($decoded_message, $row['bbcode_uid']); ! $decoded_message = $phpBB3->censor_text($decoded_message); $decoded_message = str_replace("\n", "<br />", $decoded_message); } *************** *** 1049,1053 **** $message = str_replace("\n", '<br />', $message); ! $message = phpBB3::smiley_text($message, !$row['enable_smilies']); if (!empty($attachments[$row['post_id']])) --- 1049,1053 ---- $message = str_replace("\n", '<br />', $message); ! $message = $phpBB3->smiley_text($message, !$row['enable_smilies']); if (!empty($attachments[$row['post_id']])) *************** *** 1057,1067 **** } ! $post_subject = phpBB3::censor_text($post_subject); $template->assign_block_vars($mode . '_row', array( ! 'POST_AUTHOR_FULL' => phpBB3::get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'POST_AUTHOR_COLOUR' => phpBB3::get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'POST_AUTHOR' => phpBB3::get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'U_POST_AUTHOR' => phpBB3::get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, --- 1057,1067 ---- } ! $post_subject = $phpBB3->censor_text($post_subject); $template->assign_block_vars($mode . '_row', array( ! 'POST_AUTHOR_FULL' => $phpBB3->get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'POST_AUTHOR_COLOUR' => $phpBB3->get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'POST_AUTHOR' => $phpBB3->get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), ! 'U_POST_AUTHOR' => $phpBB3->get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, *************** *** 1075,1079 **** 'U_MINI_POST' => mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_MCP_DETAILS' => ($phpbb_auth->acl_get('m_info', $forum_id)) ? mx3_append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $mx_user->session_id) : '', ! 'POSTER_QUOTE' => ($show_quote_button && $phpbb_auth->acl_get('f_reply', $forum_id)) ? addslashes(phpBB3::get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '') ); --- 1075,1079 ---- 'U_MINI_POST' => mx3_append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_MCP_DETAILS' => ($phpbb_auth->acl_get('m_info', $forum_id)) ? mx3_append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $mx_user->session_id) : '', ! 'POSTER_QUOTE' => ($show_quote_button && $phpbb_auth->acl_get('f_reply', $forum_id)) ? addslashes($phpBB3->get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '') ); *************** *** 1121,1125 **** $topic_title = ($topic_notification) ? $topic_title : $subject; ! $topic_title = phpBB3::censor_text($topic_title); // Get banned User ID's --- 1121,1125 ---- $topic_title = ($topic_notification) ? $topic_title : $subject; ! $topic_title = $phpBB3->censor_text($topic_title); // Get banned User ID's *************** *** 2309,2313 **** // Delete draft if post was loaded... ! $draft_id = phpBB3::request_var('draft_loaded', 0); if ($draft_id) { --- 2309,2313 ---- // Delete draft if post was loaded... ! $draft_id = $phpBB3->request_var('draft_loaded', 0); if ($draft_id) { |