Update of /cvsroot/mxbb/core/includes/shared/phpbb3/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6225 Modified Files: functions.php functions_admin.php functions_hook.php functions_module.php functions_posting.php message_parser.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/functions.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** functions.php 4 Oct 2008 07:04:25 -0000 1.23 --- functions.php 31 Oct 2008 18:55:14 -0000 1.24 *************** *** 30,38 **** class phpBB3_top { - function __construct() - { - return; - } - /** * set_var --- 30,33 ---- [...7719 lines suppressed...] ! /** ! * Handler for init calls in phpBB. This function is called in user::setup(); ! * This function supports hooks. ! */ ! public static function phpbb_user_session_handler() ! { ! global $phpbb_hook; + if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__)) + { + if ($phpbb_hook->hook_return(__FUNCTION__)) + { + return $phpbb_hook->hook_return_result(__FUNCTION__); + } + } + + return; + } } Index: message_parser.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb3/includes/message_parser.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** message_parser.php 4 Oct 2008 07:04:25 -0000 1.8 --- message_parser.php 31 Oct 2008 18:55:14 -0000 1.9 *************** *** 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.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** functions_hook.php 4 Oct 2008 07:04:25 -0000 1.20 --- functions_hook.php 31 Oct 2008 18:55:14 -0000 1.21 *************** *** 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.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** functions_module.php 4 Oct 2008 07:04:25 -0000 1.22 --- functions_module.php 31 Oct 2008 18:55:14 -0000 1.23 *************** *** 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.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_admin.php 4 Oct 2008 07:04:25 -0000 1.6 --- functions_admin.php 31 Oct 2008 18:55:14 -0000 1.7 *************** *** 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.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions_posting.php 4 Oct 2008 07:04:25 -0000 1.8 --- functions_posting.php 31 Oct 2008 18:55:14 -0000 1.9 *************** *** 350,354 **** function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false) { ! global $phpbb_auth, $mx_user, $config, $db, $mx_cache; global $phpbb_root_path, $phpEx; --- 350,354 ---- function upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false) { ! global $phpbb_auth, $mx_user, $config, $db, $mx_cache, $mx_backend; global $phpbb_root_path, $phpEx; *************** *** 375,379 **** } ! $extensions = $mx_cache->obtain_attach_extensions((($is_message) ? false : (int) $forum_id)); $upload->set_allowed_extensions(array_keys($extensions['_allowed_'])); --- 375,379 ---- } ! $extensions = $mx_backend->obtain_attach_extensions((($is_message) ? false : (int) $forum_id)); $upload->set_allowed_extensions(array_keys($extensions['_allowed_'])); *************** *** 932,936 **** function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true) { ! global $mx_user, $phpbb_auth, $db, $template, $bbcode, $mx_cache; global $config, $phpbb_root_path, $phpEx; --- 932,936 ---- function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true) { ! global $mx_user, $phpbb_auth, $db, $template, $bbcode, $mx_cache, $mx_backend; global $config, $phpbb_root_path, $phpEx; *************** *** 999,1003 **** if ($has_attachments && $phpbb_auth->acl_get('u_download') && $phpbb_auth->acl_get('f_download', $forum_id)) { ! $extensions = $mx_cache->obtain_attach_extensions($forum_id); // Get attachments... --- 999,1003 ---- if ($has_attachments && $phpbb_auth->acl_get('u_download') && $phpbb_auth->acl_get('f_download', $forum_id)) { ! $extensions = $mx_backend->obtain_attach_extensions($forum_id); // Get attachments... *************** *** 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) { |