You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2008-11-01 13:14:54
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7240 Modified Files: mx_online.php Log Message: temp fix Index: mx_online.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_online.php,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** mx_online.php 31 Oct 2008 18:55:36 -0000 1.32 --- mx_online.php 1 Nov 2008 13:14:42 -0000 1.33 *************** *** 291,295 **** } $newest_style_color = 'style="color:#' . $newest_color . '"'; ! $newest_user = sprintf($lang['Newest_user'], $mx_backend->get_username_string('full', $newest_uid, $newest_username, $newest_color)); break; --- 291,295 ---- } $newest_style_color = 'style="color:#' . $newest_color . '"'; ! //$newest_user = sprintf($lang['Newest_user'], $mx_backend->get_username_string('full', $newest_uid, $newest_username, $newest_color)); break; |
Update of /cvsroot/mxbb/core/includes/db In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2341 Modified Files: mssql.php mssql_odbc.php mysql.php mysql4.php mysqli.php oracle.php postgres.php sqlite.php Log Message: updated... Index: mysqli.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysqli.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mysqli.php 31 Oct 2008 18:53:49 -0000 1.21 --- mysqli.php 1 Nov 2008 11:34:54 -0000 1.22 *************** *** 290,297 **** --- 290,299 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (!is_object($query_id) && isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ return ($query_id) ? @mysqli_data_seek($query_id, $rownum) : false; *************** *** 318,325 **** --- 320,329 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (!is_object($query_id) && isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ return @mysqli_free_result($query_id); Index: sqlite.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/sqlite.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** sqlite.php 31 Oct 2008 18:53:49 -0000 1.16 --- sqlite.php 1 Nov 2008 11:34:54 -0000 1.17 *************** *** 260,267 **** --- 260,269 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ return ($query_id) ? @sqlite_seek($query_id, $rownum) : false; *************** *** 288,295 **** --- 290,299 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ return true; Index: postgres.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/postgres.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** postgres.php 31 Oct 2008 18:53:49 -0000 1.17 --- postgres.php 1 Nov 2008 11:34:54 -0000 1.18 *************** *** 330,337 **** --- 330,339 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ return ($query_id) ? @pg_result_seek($query_id, $rownum) : false; *************** *** 378,385 **** --- 380,389 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[(int) $query_id])) Index: mysql4.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql4.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mysql4.php 31 Oct 2008 18:53:49 -0000 1.21 --- mysql4.php 1 Nov 2008 11:34:54 -0000 1.22 *************** *** 317,324 **** --- 317,326 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false; *************** *** 345,352 **** --- 347,356 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[(int) $query_id])) Index: mssql.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mssql.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mssql.php 31 Oct 2008 18:53:49 -0000 1.18 --- mssql.php 1 Nov 2008 11:34:54 -0000 1.19 *************** *** 336,343 **** --- 336,345 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[$query_id])) Index: mysql.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mysql.php 31 Oct 2008 18:53:49 -0000 1.23 --- mysql.php 1 Nov 2008 11:34:54 -0000 1.24 *************** *** 313,320 **** --- 313,322 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false; *************** *** 341,348 **** --- 343,352 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[(int) $query_id])) Index: oracle.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/oracle.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** oracle.php 31 Oct 2008 18:53:49 -0000 1.16 --- oracle.php 1 Nov 2008 11:34:54 -0000 1.17 *************** *** 389,396 **** --- 389,398 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ if (!$query_id) *************** *** 458,465 **** --- 460,469 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[(int) $query_id])) Index: mssql_odbc.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mssql_odbc.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mssql_odbc.php 31 Oct 2008 18:53:49 -0000 1.16 --- mssql_odbc.php 1 Nov 2008 11:34:54 -0000 1.17 *************** *** 298,305 **** --- 298,307 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_rowseek($rownum, $query_id); } + */ if (!$query_id) *************** *** 361,368 **** --- 363,372 ---- } + /* Backported from Olympus, not compatible with MXP, yet if (isset($mx_cache->sql_rowset[$query_id])) { return $mx_cache->sql_freeresult($query_id); } + */ if (isset($this->open_queries[(int) $query_id])) |
|
From: Jon O. <jon...@us...> - 2008-11-01 11:56:10
|
Update of /cvsroot/mxbb/core/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3250 Modified Files: admin_mx_portal.php Log Message: another stupidity Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** admin_mx_portal.php 31 Oct 2008 19:02:20 -0000 1.48 --- admin_mx_portal.php 1 Nov 2008 11:55:58 -0000 1.49 *************** *** 361,365 **** "PORTAL_VERSION" => $portal_config['portal_version'], ! 'PHPBB_BACKEND' => !empty($mx_backend->get_phpbb_version()), )); --- 361,365 ---- "PORTAL_VERSION" => $portal_config['portal_version'], ! 'PHPBB_BACKEND' => !(PORTAL_BACKEND === 'internal'), )); |
|
From: Jon O. <jon...@us...> - 2008-11-01 11:53:45
|
Update of /cvsroot/mxbb/core/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3163 Modified Files: page_footer_admin.php Log Message: typho Index: page_footer_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_footer_admin.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** page_footer_admin.php 31 Oct 2008 19:02:20 -0000 1.20 --- page_footer_admin.php 1 Nov 2008 11:53:39 -0000 1.21 *************** *** 28,32 **** $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $current_phpbb_version -> $mx_backend->get_phpbb_version(); $execution_stats = sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)); --- 28,32 ---- $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $current_phpbb_version = $mx_backend->get_phpbb_version(); $execution_stats = sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)); |
|
From: Jon O. <jon...@us...> - 2008-10-31 19:15:06
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7695 Modified Files: mx_functions_tools.php Log Message: $phpbb2-> not used... Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** mx_functions_tools.php 31 Oct 2008 19:02:21 -0000 1.49 --- mx_functions_tools.php 31 Oct 2008 19:14:59 -0000 1.50 *************** *** 3127,3131 **** $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata, $mx_user, $phpbb_auth, $phpBB2, $mx_bbcode; // --- 3127,3131 ---- $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata, $mx_user, $phpbb_auth, $mx_bbcode; // *************** *** 3383,3387 **** case 'phpbb2': ! $phpBB2->add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); break; --- 3383,3387 ---- case 'phpbb2': ! phpBB2::add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); break; |
|
From: Jon O. <jon...@us...> - 2008-10-31 19:02:26
|
Update of /cvsroot/mxbb/core/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6817/admin Modified Files: admin_mx_module_cp.php admin_mx_page_cp.php admin_mx_portal.php admin_mx_smilies.php admin_mx_styles.php index.php page_footer_admin.php page_header_admin.php pagestart.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: admin_mx_module_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module_cp.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** admin_mx_module_cp.php 4 Oct 2008 07:04:24 -0000 1.25 --- admin_mx_module_cp.php 31 Oct 2008 19:02:20 -0000 1.26 *************** *** 316,335 **** // Get the list of phpBB usergroups // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name ASC"; ! break; ! case 'phpbb3': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY group_name ASC"; ! break; ! } if( !($result = $db->sql_query($sql)) ) { --- 316,321 ---- // Get the list of phpBB usergroups // ! $sql = $mx_backend->generate_group_select_sql(); ! if( !($result = $db->sql_query($sql)) ) { *************** *** 889,893 **** $block_time = !$new_block ? $block_rows[$block_count]['block_time'] : time(); ! $edit_time = $phpBB2->create_date( $board_config['default_dateformat'], $block_time, $board_config['board_timezone'] ); if ($new_block) --- 875,879 ---- $block_time = !$new_block ? $block_rows[$block_count]['block_time'] : time(); ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $block_time, $board_config['board_timezone'] ); if ($new_block) *************** *** 1056,1065 **** { $template->assign_block_vars('module.function.block.is_block', array()); ! if ( $mx_modulecp_include_block_private ) { $template->assign_block_vars('module.function.block.is_block.include_block_private', array()); } ! if ( $mx_modulecp_include_block_quickedit ) { --- 1042,1051 ---- { $template->assign_block_vars('module.function.block.is_block', array()); ! if ( $mx_modulecp_include_block_private ) { $template->assign_block_vars('module.function.block.is_block.include_block_private', array()); } ! if ( $mx_modulecp_include_block_quickedit ) { Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** admin_mx_page_cp.php 4 Oct 2008 07:04:24 -0000 1.34 --- admin_mx_page_cp.php 31 Oct 2008 19:02:20 -0000 1.35 *************** *** 992,996 **** $editor_name_tmp = mx_get_userdata($mx_block->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = $phpBB2->create_date( $board_config['default_dateformat'], $mx_block->block_time, $board_config['board_timezone'] ); $mode = MX_PAGE_BLOCK_TYPE; --- 992,996 ---- $editor_name_tmp = mx_get_userdata($mx_block->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $mx_block->block_time, $board_config['board_timezone'] ); $mode = MX_PAGE_BLOCK_TYPE; Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/index.php,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** index.php 4 Oct 2008 07:04:24 -0000 1.55 --- index.php 31 Oct 2008 19:02:20 -0000 1.56 *************** *** 174,272 **** } ! // MX ADDON // Include PHPBB Administration // ------------------------------------------------------------------------------- ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! ! case 'phpbb2': ! ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'], ! "L_FORUM_INDEX" => $lang['Main_index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum'], ! "U_FORUM_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), ! )); ! ! ksort($module_phpbb); ! ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! ! while( list($cat, $action_array) = each($module_phpbb) ) ! { ! $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ! ); ! ! ksort($action_array); ! ! $row_count = 0; ! while( list($action, $file) = each($action_array) ) ! { ! $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => $row_count, ! //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => mx_append_sid(PHPBB_URL . 'admin/' . $file . ( ( strpos($file, '?') !== false ) ? '&sid=' : '?sid=' ) . $userdata['session_id'])) ! ); ! $row_count++; ! } ! //+MOD: DHTML Menu for ACP ! $menu_cat_id++; ! //-MOD: DHTML Menu for ACP ! } ! ! break; ! ! case 'phpbb3': ! ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'], ! "L_FORUM_INDEX" => $lang['Main_index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum'], ! "U_FORUM_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), ! )); ! ! $menu_cat_id = 0; ! ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => 1, ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => 'Olympus adminCP') ! ); ! ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $theme['td_color1'], ! "ROW_CLASS" => $theme['td_class1'], ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => 0, ! //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => 'Go!', ! "U_ADMIN_MODULE" => mx_append_sid($phpbb_root_path . 'adm/index.php?sid='.$mx_user->session_id)) ! ); - break; - } // // Read Portal Module Configuration --- 174,182 ---- } ! // // Include PHPBB Administration // ------------------------------------------------------------------------------- ! $mx_backend->load_phpbb_acp_menu(); // // Read Portal Module Configuration *************** *** 401,612 **** ); ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! ! case 'phpbb2': ! case 'phpbb3': ! ! $template->assign_block_vars("forum_stats", array()); ! // ! // Get forum statistics ! // ! $total_posts = $phpBB2->get_db_stat('postcount'); ! $total_users = $phpBB2->get_db_stat('usercount'); ! $total_topics = $phpBB2->get_db_stat('topiccount'); ! ! $start_date = $phpBB2->create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! ! $avatar_dir_size = 0; ! ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) ! { ! while( $file = @readdir($avatar_dir) ) ! { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; ! } ! else if($avatar_dir_size >= 1024) ! { ! $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; ! } ! else ! { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; ! } ! } ! else ! { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; ! } ! ! if($posts_per_day > $total_posts) ! { ! $posts_per_day = $total_posts; ! } ! ! if($topics_per_day > $total_topics) ! { ! $topics_per_day = $total_topics; ! } ! ! if($users_per_day > $total_users) ! { ! $users_per_day = $total_users; ! } ! ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if($result = $db->sql_query($sql)) ! { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! ! if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) ! { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; ! ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; ! if($result = $db->sql_query($sql)) ! { ! $tabledata_ary = $db->sql_fetchrowset($result); ! ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) ! { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) ! { ! if( $table_prefix != "" ) ! { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! else ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! } ! } // Else we couldn't get the table status. ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else if( preg_match("/^mssql/", SQL_LAYER) ) ! { ! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize ! FROM sysfiles"; ! if( $result = $db->sql_query($sql) ) ! { ! $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! ! $template->assign_vars(array( ! "NUMBER_OF_POSTS" => $total_posts, ! "NUMBER_OF_TOPICS" => $total_topics, ! "NUMBER_OF_USERS" => $total_users, ! "START_DATE" => $start_date, ! "POSTS_PER_DAY" => $posts_per_day, ! "TOPICS_PER_DAY" => $topics_per_day, ! "USERS_PER_DAY" => $users_per_day, ! "AVATAR_DIR_SIZE" => $avatar_dir_size, ! "DB_SIZE" => $dbsize, ! "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) ! ); ! // ! // End forum statistics ! // ! break; ! } // // Get users online information. // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE s.session_logged_in = " . TRUE . " ! AND u.user_id = s.session_user_id ! AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY u.user_session_time DESC"; ! break; ! case 'phpbb3': ! $sql = "SELECT u.*, s.*, s.session_time AS user_session_time ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id <> " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! break; ! } if(!$result = $db->sql_query($sql)) --- 311,320 ---- ); ! $mx_backend->load_forum_stats(); // // Get users online information. // ! $sql = $mx_backend->generate_session_online_sql(); if(!$result = $db->sql_query($sql)) *************** *** 614,639 **** mx_message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql); } $onlinerow_reg = $db->sql_fetchrowset($result); $db->sql_freeresult($result); ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT * ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = 0 ! AND session_time >= " . ( time() - 300 ) . " ! ORDER BY session_time DESC"; ! break; ! case 'phpbb3': ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id = " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! break; ! } if(!$result = $db->sql_query($sql)) { --- 322,331 ---- mx_message_die(GENERAL_ERROR, "Couldn't obtain regd user/online information.", "", __LINE__, __FILE__, $sql); } + $onlinerow_reg = $db->sql_fetchrowset($result); $db->sql_freeresult($result); ! $sql = $mx_backend->generate_session_online_sql(true); ! if(!$result = $db->sql_query($sql)) { *************** *** 643,678 **** $db->sql_freeresult($result); - - switch (PORTAL_BACKEND) - { - case 'internal': - break; - - case 'phpbb2': - - $sql = "SELECT forum_name, forum_id - FROM " . FORUMS_TABLE; - - if($forums_result = $db->sql_query($sql)) - { - while($forumsrow = $db->sql_fetchrow($forums_result)) - { - $forum_data[$forumsrow['forum_id']] = $forumsrow['forum_name']; - } - } - else - { - mx_message_die(GENERAL_ERROR, "Couldn't obtain user/online forums information.", "", __LINE__, __FILE__, $sql); - } - - $db->sql_freeresult($result); - break; - - case 'phpbb3': - // To-do - break; - - } - $reg_userid_ary = array(); --- 335,338 ---- *************** *** 720,745 **** $location_url = "index.$phpEx?pane=right"; break; - case PAGE_PROFILE: - $location = $lang['Viewing_profile']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWONLINE: - $location = $lang['Viewing_online']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWMEMBERS: - $location = $lang['Viewing_member_list']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PRIVMSGS: - $location = $lang['Viewing_priv_msgs']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_FAQ: - $location = $lang['Viewing_FAQ']; - $location_url = "index.$phpEx?pane=right"; - break; default: - //+MOD: ViewOnline extension for MX-Publisher Pages $mx_viewonline_info = mx_get_viewonline_info($onlinerow_reg[$i]['user_session_page']); if( $mx_viewonline_info !== false ) --- 380,384 ---- *************** *** 748,759 **** break; } - //-MOD: ViewOnline extension for MX-Publisher Pages - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; } } else { - //+MOD: ViewOnline extension for MX-Publisher Pages $mx_viewonline_info = mx_get_viewonline_info($onlinerow_reg[$i]['user_session_page']); if( $mx_viewonline_info !== false ) --- 387,394 ---- *************** *** 762,785 **** break; } - //-MOD: ViewOnline extension for MX-Publisher Pages - $location_url = mx_append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_reg[$i]['user_session_page']); - $location = $forum_data[$onlinerow_reg[$i]['user_session_page']]; } $row_color = ( $registered_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; - - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - $reg_ip = $phpBB2->decode_ip($onlinerow_reg[$i]['session_ip']); - break; - - case 'phpbb3': - $reg_ip = $onlinerow_reg[$i]['session_ip']; - break; ! } $template->assign_block_vars("reg_user_row", array( --- 397,406 ---- break; } } $row_color = ( $registered_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( $registered_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $reg_ip = $mx_backend->decode_ip($onlinerow_reg[$i]['session_ip']); $template->assign_block_vars("reg_user_row", array( *************** *** 787,792 **** "ROW_CLASS" => $row_class, "USERNAME" => $username, ! "STARTED" => $phpBB2->create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => $phpBB2->create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, --- 408,413 ---- "ROW_CLASS" => $row_class, "USERNAME" => $username, ! "STARTED" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_reg[$i]['user_session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, *************** *** 838,863 **** $location_url = "index.$phpEx?pane=right"; break; - case PAGE_PROFILE: - $location = $lang['Viewing_profile']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWONLINE: - $location = $lang['Viewing_online']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_VIEWMEMBERS: - $location = $lang['Viewing_member_list']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_PRIVMSGS: - $location = $lang['Viewing_priv_msgs']; - $location_url = "index.$phpEx?pane=right"; - break; - case PAGE_FAQ: - $location = $lang['Viewing_FAQ']; - $location_url = "index.$phpEx?pane=right"; - break; default: - //+MOD: ViewOnline extension for MX-Publisher Pages $mx_viewonline_info = mx_get_viewonline_info($onlinerow_guest[$i]['session_page']); if( $mx_viewonline_info !== false ) --- 459,463 ---- *************** *** 866,895 **** break; } - //-MOD: ViewOnline extension for MX-Publisher Pages - $location = $lang['Forum_index']; - $location_url = "index.$phpEx?pane=right"; } } - else - { - $location_url = mx_append_sid(PHPBB_URL . "admin_forums.$phpEx?mode=editforum&" . POST_FORUM_URL . "=" . $onlinerow_guest[$i]['session_page']); - $location = $forum_data[$onlinerow_guest[$i]['session_page']]; - } $row_color = ( $guest_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; - - switch (PORTAL_BACKEND) - { - case 'internal': - case 'phpbb2': - $guest_ip = $phpBB2->decode_ip($onlinerow_guest[$i]['session_ip']); - break; ! case 'phpbb3': ! $guest_ip = $onlinerow_guest[$i]['session_ip']; ! break; ! ! } $template->assign_block_vars("guest_user_row", array( --- 466,476 ---- break; } } } $row_color = ( $guest_users % 2 ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( $guest_users % 2 ) ? $theme['td_class1'] : $theme['td_class2']; ! $guest_ip = $mx_backend->decode_ip($onlinerow_guest[$i]['session_ip']); $template->assign_block_vars("guest_user_row", array( *************** *** 897,902 **** "ROW_CLASS" => $row_class, "USERNAME" => $lang['Guest'], ! "STARTED" => $phpBB2->create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => $phpBB2->create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, --- 478,483 ---- "ROW_CLASS" => $row_class, "USERNAME" => $lang['Guest'], ! "STARTED" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $board_config['board_timezone']), ! "LASTUPDATE" => phpBB2::create_date($board_config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $board_config['board_timezone']), "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, *************** *** 915,1027 **** /* Begin phpBB version check code block */ ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! ! case 'phpbb2': ! ! $current_phpbb_version = explode('.', '2' . $board_config['version']); ! $minor_phpbb_revision = (int) $current_phpbb_version[2]; ! break; ! ! case 'phpbb3': ! ! $current_phpbb_version = explode('.', '' . $board_config['version']); ! $minor_phpbb_revision = (int) $current_phpbb_version[3]; ! break; ! } ! ! $errno = 0; ! $errstr = $phpbb_version_info = ''; ! ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) ! { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! ! break; ! ! case 'phpbb2': ! ! @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); ! @fputs($fsock, "HOST: www.phpbb.com\r\n"); ! @fputs($fsock, "Connection: close\r\n\r\n"); ! ! $get_info = false; ! while (!@feof($fsock)) ! { ! if ($get_info) ! { ! $phpbb_version_info .= @fread($fsock, 1024); ! } ! else ! { ! if (@fgets($fsock, 1024) == "\r\n") ! { ! $get_info = true; ! } ! } ! } ! @fclose($fsock); ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! $latest_phpbb_head_revision = (int) $phpbb_version_info[0]; ! $latest_phpbb_minor_revision = (int) $phpbb_version_info[2]; ! $latest_phpbb_version = (int) $phpbb_version_info[0] . '.' . (int) $phpbb_version_info[1] . '.' . (int) $phpbb_version_info[2]; ! ! if ($latest_phpbb_head_revision == 2 && $minor_phpbb_revision == $latest_phpbb_minor_revision) ! { ! $phpbb_version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $phpbb_version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_phpbb_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; ! } ! break; ! ! case 'phpbb3': ! ! $phpbb_version_info = mx_get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); ! if ($info === false) ! { ! trigger_error($errstr, E_USER_WARNING); ! } ! ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! ! $announcement_url = trim($info[1]); ! //$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); ! $latest_phpbb_head_revision = trim($phpbb_version_info[0]); ! $latest_phpbb_minor_revision = trim($phpbb_version_info[2]); ! $latest_phpbb_version = trim($phpbb_version_info[0]) . '.' . trim($phpbb_version_info[1]) . '.' . trim($phpbb_version_info[2]); ! ! if ($latest_phpbb_head_revision == 3 && $minor_phpbb_revision == $latest_phpbb_minor_revision) ! { ! $phpbb_version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $phpbb_version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_phpbb_version) . sprintf($lang['Current_version_info'], $board_config['version']) . '</p>'; ! } ! break; ! } ! } ! else ! { ! if ($errstr) ! { ! $phpbb_version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; ! } ! } ! ! $phpbb_version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; ! ! /* End phpBB version check code block */ /* Begin MX-Publisher version check code block */ --- 496,500 ---- /* Begin phpBB version check code block */ ! $phpbb_version_info = $mx_backend->phpbb_version_check(); /* Begin MX-Publisher version check code block */ *************** *** 1086,1091 **** $mxbb_version_info .= '<p>' . $lang['mxBB_Mailing_list_subscribe_reminder'] . '</p>'; - /* End MX-Publisher version check code block */ - $template->assign_vars(array( 'MXBB_VERSION_INFO' => $mxbb_version_info, --- 559,562 ---- Index: page_header_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_header_admin.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** page_header_admin.php 4 Oct 2008 07:04:24 -0000 1.29 --- page_header_admin.php 31 Oct 2008 19:02:20 -0000 1.30 *************** *** 80,84 **** 'S_LOGIN_ACTION' => mx_append_sid('../login.'.$phpEx), 'S_JUMPBOX_ACTION' => mx_append_sid('../viewforum.'.$phpEx), ! 'S_CURRENT_TIME' => sprintf($lang['Current_time'], $phpBB2->create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], --- 80,84 ---- 'S_LOGIN_ACTION' => mx_append_sid('../login.'.$phpEx), 'S_JUMPBOX_ACTION' => mx_append_sid('../viewforum.'.$phpEx), ! 'S_CURRENT_TIME' => sprintf($lang['Current_time'], phpBB2::create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], Index: admin_mx_smilies.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_smilies.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_mx_smilies.php 4 Oct 2008 07:04:24 -0000 1.21 --- admin_mx_smilies.php 31 Oct 2008 19:02:20 -0000 1.22 *************** *** 91,117 **** $smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed $smiley_root_path = $phpbb_root_path; //same here ! $fields = 'smilies'; $smiley_url = 'smile_url'; $emotion = 'emoticon'; $table = SMILIES_TABLE; ! $delimeter = '=+:'; break; case 'phpbb2': $smiley_path_url = PHPBB_URL; $smiley_root_path = $phpbb_root_path; ! $fields = 'smilies'; $smiley_url = 'smile_url'; $emotion = 'emoticon'; $table = SMILIES_TABLE; ! $delimeter = '=+:'; break; case 'phpbb3': $smiley_path_url = PHPBB_URL; $smiley_root_path = $phpbb_root_path; ! $fields = 'smiley'; $smiley_url = 'smiley_url'; $emotion = 'emotion'; $table = SMILIES_TABLE; ! $delimeter = ', '; $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); break; --- 91,117 ---- $smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed $smiley_root_path = $phpbb_root_path; //same here ! $fields = 'smilies'; $smiley_url = 'smile_url'; $emotion = 'emoticon'; $table = SMILIES_TABLE; ! $delimeter = '=+:'; break; case 'phpbb2': $smiley_path_url = PHPBB_URL; $smiley_root_path = $phpbb_root_path; ! $fields = 'smilies'; $smiley_url = 'smile_url'; $emotion = 'emoticon'; $table = SMILIES_TABLE; ! $delimeter = '=+:'; break; case 'phpbb3': $smiley_path_url = PHPBB_URL; $smiley_root_path = $phpbb_root_path; ! $fields = 'smiley'; $smiley_url = 'smiley_url'; $emotion = 'emotion'; $table = SMILIES_TABLE; ! $delimeter = ', '; $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); break; *************** *** 125,129 **** while($file = @readdir($dir)) { ! if( !@is_dir($phpBB2->phpbb_realpath($smiley_root_path . $board_config['smilies_path'] . '/' . $file)) ) { $img_size = @getimagesize($smiley_root_path . $board_config['smilies_path'] . '/' . $file); --- 125,129 ---- while($file = @readdir($dir)) { ! if( !@is_dir(phpBB2::phpbb_realpath($smiley_root_path . $board_config['smilies_path'] . '/' . $file)) ) { $img_size = @getimagesize($smiley_root_path . $board_config['smilies_path'] . '/' . $file); *************** *** 190,194 **** } } ! $smiley_order = 0; --- 190,194 ---- } } ! $smiley_order = 0; *************** *** 201,205 **** for($i = 0; $i < count($fcontents); $i++) ! { switch (PORTAL_BACKEND) { --- 201,205 ---- for($i = 0; $i < count($fcontents); $i++) ! { switch (PORTAL_BACKEND) { *************** *** 207,221 **** case 'phpbb2': $smile_data = explode($delimeter, trim(addslashes($fcontents[$i]))); ! $count_data = 2; break; case 'phpbb3': $smile_data = explode($delimeter, trim($fcontents[$i])); ! $smile_data = str_replace("'", "", $smile_data); $smile_data = str_replace(",", "", $smile_data); ! $count_data = 5; break; ! } ! for($j = $count_data; $j < count($smile_data); $j++) { --- 207,221 ---- case 'phpbb2': $smile_data = explode($delimeter, trim(addslashes($fcontents[$i]))); ! $count_data = 2; break; case 'phpbb3': $smile_data = explode($delimeter, trim($fcontents[$i])); ! $smile_data = str_replace("'", "", $smile_data); $smile_data = str_replace(",", "", $smile_data); ! $count_data = 5; break; ! } ! for($j = $count_data; $j < count($smile_data); $j++) { *************** *** 226,230 **** $smile_data[$j] = str_replace(">", ">", $smile_data[$j]); $k = $smile_data[$j]; ! // Stripslash here because it got addslashed before... (on export) $smile_url = stripslashes($smile_data[0]); --- 226,230 ---- $smile_data[$j] = str_replace(">", ">", $smile_data[$j]); $k = $smile_data[$j]; ! // Stripslash here because it got addslashed before... (on export) $smile_url = stripslashes($smile_data[0]); *************** *** 237,241 **** $smile_emotion = stripslashes($smile_data[4]); $smile_code = stripslashes($smile_data[5]); ! } if( $smiles[$k] == 1 ) --- 237,241 ---- $smile_emotion = stripslashes($smile_data[4]); $smile_code = stripslashes($smile_data[5]); ! } if( $smiles[$k] == 1 ) *************** *** 249,259 **** $sql = "UPDATE " . $table . " SET smile_url = '" . str_replace("\'", "''", $smile_data[0]) . "', emoticon = '" . str_replace("\'", "''", $smile_data[1]) . "' ! WHERE code = '" . str_replace("\'", "''", $smile_data[$j]) . "'"; ! $result = $db->sql_query($sql); break; case 'phpbb3': $sql = array( ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, --- 249,259 ---- $sql = "UPDATE " . $table . " SET smile_url = '" . str_replace("\'", "''", $smile_data[0]) . "', emoticon = '" . str_replace("\'", "''", $smile_data[1]) . "' ! WHERE code = '" . str_replace("\'", "''", $smile_data[$j]) . "'"; ! $result = $db->sql_query($sql); break; case 'phpbb3': $sql = array( ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, *************** *** 265,271 **** $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . " WHERE code = '" . $db->sql_escape($smile_code) . "'"; ! $result = $db->sql_query($sql); break; ! } } else --- 265,271 ---- $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . " WHERE code = '" . $db->sql_escape($smile_code) . "'"; ! $result = $db->sql_query($sql); break; ! } } else *************** *** 282,291 **** $sql = "INSERT INTO " . $table . " (code, smile_url, emoticon) VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')"; ! $result = $db->sql_query($sql); break; case 'phpbb3': ++$smiley_order; ! $sql = array( $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, --- 282,291 ---- $sql = "INSERT INTO " . $table . " (code, smile_url, emoticon) VALUES('" . str_replace("\'", "''", $smile_data[$j]) . "', '" . str_replace("\'", "''", $smile_data[0]) . "', '" . str_replace("\'", "''", $smile_data[1]) . "')"; ! $result = $db->sql_query($sql); break; case 'phpbb3': ++$smiley_order; ! $sql = array( $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, *************** *** 294,306 **** 'display_on_posting'=> (int) $display_on_posting, ); ! $sql = array_merge($sql, array( 'code' => $smile_code, 'emotion' => $smile_emotion, ! )); ! ! $result = $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql)); break; ! } } --- 294,306 ---- 'display_on_posting'=> (int) $display_on_posting, ); ! $sql = array_merge($sql, array( 'code' => $smile_code, 'emotion' => $smile_emotion, ! )); ! ! $result = $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql)); break; ! } } *************** *** 368,372 **** { //$gen_simple_header = true; ! switch (PORTAL_BACKEND) { --- 368,372 ---- { //$gen_simple_header = true; ! switch (PORTAL_BACKEND) { *************** *** 380,387 **** $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' ! ORDER BY smiley_order'; break; } ! if( !$result = $db->sql_query($sql) ) { --- 380,387 ---- $sql = 'SELECT * FROM ' . SMILIES_TABLE . ' ! ORDER BY smiley_order'; break; } ! if( !$result = $db->sql_query($sql) ) { *************** *** 390,394 **** $resultset = $db->sql_fetchrowset($result); ! $smile_pak = ""; switch (PORTAL_BACKEND) --- 390,394 ---- $resultset = $db->sql_fetchrowset($result); ! $smile_pak = ""; switch (PORTAL_BACKEND) *************** *** 410,417 **** $smile_pak .= "'" . addslashes($resultset[$i][$fields . '_width']) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i][$fields . '_height']) . "'" . $delimeter; ! $smile_pak .= "'" . addslashes($resultset[$i]['display_on_posting']) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i][$emotion]) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i]['code']) . "'" . $delimeter . "\n"; ! } break; } --- 410,417 ---- $smile_pak .= "'" . addslashes($resultset[$i][$fields . '_width']) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i][$fields . '_height']) . "'" . $delimeter; ! $smile_pak .= "'" . addslashes($resultset[$i]['display_on_posting']) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i][$emotion]) . "'" . $delimeter; $smile_pak .= "'" . addslashes($resultset[$i]['code']) . "'" . $delimeter . "\n"; ! } break; } *************** *** 435,439 **** { mx_message_die(GENERAL_MESSAGE, 'Error'); ! } } $message = sprintf($lang['export_smiles'], "<a href=\"" . mx_append_sid("admin_mx_smilies.$phpEx?export_pack=send", true) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . mx_append_sid("admin_mx_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); --- 435,439 ---- { mx_message_die(GENERAL_MESSAGE, 'Error'); ! } } $message = sprintf($lang['export_smiles'], "<a href=\"" . mx_append_sid("admin_mx_smilies.$phpEx?export_pack=send", true) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_smileadmin'], "<a href=\"" . mx_append_sid("admin_mx_smilies.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid($mx_root_path . "admin/index.$phpEx?pane=right") . "\">", "</a>"); *************** *** 469,484 **** "L_WIDTH" => $lang['Width'], "L_HEIGHT" => $lang['Height'], ! "L_ORDER" => $lang['Order'], "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], ! "SMILEY_IMG" => $smiley_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0], ! 'SMILEY_WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', 'SMILEY_HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', 'SMILEY_ORDER' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', ! 'POSTING_CHECKED' => ($mx_request_vars->is_request('add')) ? ' checked="checked"' : '', ! "S_SMILEY_ACTION" => mx_append_sid("admin_mx_smilies.$phpEx"), --- 469,484 ---- "L_WIDTH" => $lang['Width'], "L_HEIGHT" => $lang['Height'], ! "L_ORDER" => $lang['Order'], "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], ! "SMILEY_IMG" => $smiley_root_path . $board_config['smilies_path'] . '/' . $smiley_images[0], ! 'SMILEY_WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', 'SMILEY_HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', 'SMILEY_ORDER' => (PORTAL_BACKEND === 'phpbb3') ? '' : '', ! 'POSTING_CHECKED' => ($mx_request_vars->is_request('add')) ? ' checked="checked"' : '', ! "S_SMILEY_ACTION" => mx_append_sid("admin_mx_smilies.$phpEx"), *************** *** 486,490 **** "S_FILENAME_OPTIONS" => $filename_list, "S_SMILEY_BASEDIR" => $smiley_root_path . $board_config['smilies_path']) ! ); $template->pparse("body"); --- 486,490 ---- "S_FILENAME_OPTIONS" => $filename_list, "S_SMILEY_BASEDIR" => $smiley_root_path . $board_config['smilies_path']) ! ); $template->pparse("body"); *************** *** 540,549 **** case 'edit': // ! // Admin has selected to edit a smiley. // $smiley_id = $mx_request_vars->request('id', MX_TYPE_INT); $sql = "SELECT * FROM " . $table . " ! WHERE {$fields}_id = " . $smiley_id; $result = $db->sql_query($sql); --- 540,549 ---- case 'edit': // ! // Admin has selected to edit a smiley. // $smiley_id = $mx_request_vars->request('id', MX_TYPE_INT); $sql = "SELECT * FROM " . $table . " ! WHERE {$fields}_id = " . $smiley_id; $result = $db->sql_query($sql); *************** *** 581,590 **** 'SMILEY_EMOTICON' => addslashes($smile_data[$emotion]), 'S_ID' => (isset($smile_data[$fields . '_id'])) ? true : false, ! 'ID' => (isset($smile_data[$fields . '_id'])) ? $smile_data[$fields . '_id'] : 0, 'SMILEY_WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_width'] : '', 'SMILEY_HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_height'] : '', 'SMILEY_ORDER' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_order'] : '', ! 'POSTING_CHECKED' => (!empty($smile_data['display_on_posting']) || $mx_request_vars->is_request('add')) ? ' checked="checked"' : '', "L_SMILEY_TITLE" => $lang['smiley_title'], --- 581,590 ---- 'SMILEY_EMOTICON' => addslashes($smile_data[$emotion]), 'S_ID' => (isset($smile_data[$fields . '_id'])) ? true : false, ! 'ID' => (isset($smile_data[$fields . '_id'])) ? $smile_data[$fields . '_id'] : 0, 'SMILEY_WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_width'] : '', 'SMILEY_HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_height'] : '', 'SMILEY_ORDER' => (PORTAL_BACKEND === 'phpbb3') ? $smile_data['smiley_order'] : '', ! 'POSTING_CHECKED' => (!empty($smile_data['display_on_posting']) || $mx_request_vars->is_request('add')) ? ' checked="checked"' : '', "L_SMILEY_TITLE" => $lang['smiley_title'], *************** *** 596,600 **** "L_WIDTH" => $lang['Width'], "L_HEIGHT" => $lang['Height'], ! "L_ORDER" => $lang['Order'], "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], --- 596,600 ---- "L_WIDTH" => $lang['Width'], "L_HEIGHT" => $lang['Height'], ! "L_ORDER" => $lang['Order'], "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], *************** *** 622,638 **** $smile_code = $mx_request_vars->post('smile_code'); $smile_url = $mx_request_vars->post('smile_url', MX_TYPE_NO_TAGS); ! $smile_url = $phpBB2->phpbb_ltrim(basename($smile_url), "'"); $smile_emotion = $mx_request_vars->post('smile_emotion', MX_TYPE_NO_HTML); $smile_id = $mx_request_vars->post('smile_id', MX_TYPE_INT, 0); $smile_code = trim($smile_code); $smile_url = trim($smile_url); ! ! if (PORTAL_BACKEND === 'phpbb3') { $smiley_width = $mx_request_vars->post('smile_width', MX_TYPE_NO_HTML); $smiley_height = $mx_request_vars->post('smile_height', MX_TYPE_NO_HTML); $smiley_order = $mx_request_vars->post('smile_order', MX_TYPE_NO_HTML); ! } ! // If no code was entered complain ... --- 622,638 ---- $smile_code = $mx_request_vars->post('smile_code'); $smile_url = $mx_request_vars->post('smile_url', MX_TYPE_NO_TAGS); ! $smile_url = phpBB2::phpbb_ltrim(basename($smile_url), "'"); $smile_emotion = $mx_request_vars->post('smile_emotion', MX_TYPE_NO_HTML); $smile_id = $mx_request_vars->post('smile_id', MX_TYPE_INT, 0); $smile_code = trim($smile_code); $smile_url = trim($smile_url); ! ! if (PORTAL_BACKEND === 'phpbb3') { $smiley_width = $mx_request_vars->post('smile_width', MX_TYPE_NO_HTML); $smiley_height = $mx_request_vars->post('smile_height', MX_TYPE_NO_HTML); $smiley_order = $mx_request_vars->post('smile_order', MX_TYPE_NO_HTML); ! } ! // If no code was entered complain ... *************** *** 657,666 **** $sql = "UPDATE " . $table . " SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "' ! WHERE smilies_id = $smile_id"; break; case 'phpbb3': $sql = array( ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, --- 657,666 ---- $sql = "UPDATE " . $table . " SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "' ! WHERE smilies_id = $smile_id"; break; case 'phpbb3': $sql = array( ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, *************** *** 671,677 **** $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . " ! WHERE code = '" . $db->sql_escape($smile_code) . "'"; break; ! } if( !($result = $db->sql_query($sql)) ) --- 671,677 ---- $sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql) . " ! WHERE code = '" . $db->sql_escape($smile_code) . "'"; break; ! } if( !($result = $db->sql_query($sql)) ) *************** *** 696,705 **** $smile_code = $mx_request_vars->post('smile_code'); $smile_url = $mx_request_vars->post('smile_url'); ! $smile_url = $phpBB2->phpbb_ltrim(basename($smile_url), "'"); $smile_emotion = $mx_request_vars->post('smile_emotion', MX_TYPE_NO_HTML); $smile_code = trim($smile_code); $smile_url = trim($smile_url); ! ! if (PORTAL_BACKEND === 'phpbb3') { $smiley_width = $mx_request_vars->post('smile_width', MX_TYPE_NO_HTML); --- 696,705 ---- $smile_code = $mx_request_vars->post('smile_code'); $smile_url = $mx_request_vars->post('smile_url'); ! $smile_url = phpBB2::phpbb_ltrim(basename($smile_url), "'"); $smile_emotion = $mx_request_vars->post('smile_emotion', MX_TYPE_NO_HTML); $smile_code = trim($smile_code); $smile_url = trim($smile_url); ! ! if (PORTAL_BACKEND === 'phpbb3') { $smiley_width = $mx_request_vars->post('smile_width', MX_TYPE_NO_HTML); *************** *** 707,711 **** $smiley_order = $mx_request_vars->post('smile_order', MX_TYPE_NO_HTML); $display_on_posting = $mx_request_vars->request('display', MX_TYPE_INT, 1); ! } // If no code was entered complain ... --- 707,711 ---- $smiley_order = $mx_request_vars->post('smile_order', MX_TYPE_NO_HTML); $display_on_posting = $mx_request_vars->request('display', MX_TYPE_INT, 1); ! } // If no code was entered complain ... *************** *** 730,734 **** $sql = "INSERT INTO " . $table . " (code, smile_url, emoticon) VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')"; ! $result = $db->sql_query($sql); break; --- 730,734 ---- $sql = "INSERT INTO " . $table . " (code, smile_url, emoticon) VALUES ('" . str_replace("\'", "''", $smile_code) . "', '" . str_replace("\'", "''", $smile_url) . "', '" . str_replace("\'", "''", $smile_emotion) . "')"; ! $result = $db->sql_query($sql); break; *************** *** 736,740 **** $sql = array( 'code' => $smile_code, ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, --- 736,740 ---- $sql = array( 'code' => $smile_code, ! 'emotion' => $smile_emotion, $fields . '_url' => $smile_url, $fields . '_height' => (int) $smiley_height, *************** *** 743,751 **** 'display_on_posting'=> (int) $display_on_posting, ); ! $result = $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql)); break; ! } - if( !$result ) { --- 743,751 ---- 'display_on_posting'=> (int) $display_on_posting, ); ! $result = $db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql)); break; ! } ! if( !$result ) { *************** *** 774,785 **** $result = $db->sql_query($sql); break; ! case 'phpbb3': $sql = 'SELECT * FROM ' . $table . ' ORDER BY smiley_order'; ! $result = $db->sql_query($sql); break; ! } if( !$result ) { --- 774,785 ---- $result = $db->sql_query($sql); break; ! case 'phpbb3': $sql = 'SELECT * FROM ' . $table . ' ORDER BY smiley_order'; ! $result = $db->sql_query($sql); break; ! } if( !$result ) { *************** *** 804,808 **** 'L_WIDTH' => $lang['Width'], 'L_HEIGHT' => $lang['Height'], ! 'L_ORDER' => $lang['Order'], "L_SMILE" => $lang['Smile'], "L_IMPORT_PACK" => $lang['import_smile_pack'], --- 804,808 ---- 'L_WIDTH' => $lang['Width'], 'L_HEIGHT' => $lang['Height'], ! 'L_ORDER' => $lang['Order'], "L_SMILE" => $lang['Smile'], "L_IMPORT_PACK" => $lang['import_smile_pack'], *************** *** 834,841 **** "CODE" => $smilies[$i]['code'], "EMOT" => $smilies[$i][$emotion], ! 'WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_width'] : '', 'HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_height'] : '', ! 'ORDER' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_order'] : '', "U_SMILEY_EDIT" => mx_append_sid("admin_mx_smilies.$phpEx?mode=edit&id=" . $smilies[$i][$fields . '_id']), --- 834,841 ---- "CODE" => $smilies[$i]['code'], "EMOT" => $smilies[$i][$emotion], ! 'WIDTH' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_width'] : '', 'HEIGHT' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_height'] : '', ! 'ORDER' => (PORTAL_BACKEND === 'phpbb3') ? $smilies[$i]['smiley_order'] : '', "U_SMILEY_EDIT" => mx_append_sid("admin_mx_smilies.$phpEx?mode=edit&id=" . $smilies[$i][$fields . '_id']), Index: admin_mx_styles.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_styles.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mx_styles.php 4 Oct 2008 07:04:24 -0000 1.8 --- admin_mx_styles.php 31 Oct 2008 19:02:20 -0000 1.9 *************** *** 97,103 **** while( $sub_dir = @readdir($dir) ) { ! if( !is_file($phpBB2->phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && !is_link($phpBB2->phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { ! if( @file_exists(@$phpBB2->phpbb_realpath($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg")) ) { @include($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg"); --- 97,103 ---- while( $sub_dir = @readdir($dir) ) { ! if( !is_file(phpBB2::phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && !is_link(phpBB2::phpbb_realpath($mx_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { ! if( @file_exists(@phpBB2::phpbb_realpath($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg")) ) { @include($mx_root_path. "templates/" . $sub_dir . "/$sub_dir.cfg"); Index: page_footer_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/page_footer_admin.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** page_footer_admin.php 4 Feb 2008 15:44:45 -0000 1.19 --- page_footer_admin.php 31 Oct 2008 19:02:20 -0000 1.20 *************** *** 28,45 **** $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! ! case 'phpbb2': ! ! $current_phpbb_version = '2' . $board_config['version']; ! break; ! ! case 'phpbb3': ! ! $current_phpbb_version = $board_config['version']; ! break; ! } $execution_stats = sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)); --- 28,32 ---- $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $current_phpbb_version -> $mx_backend->get_phpbb_version(); $execution_stats = sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)); Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** pagestart.php 15 Jul 2008 22:02:43 -0000 1.39 --- pagestart.php 31 Oct 2008 19:02:20 -0000 1.40 *************** *** 39,51 **** $mx_user->init($user_ip, PAGE_INDEX); - // - // Temp fix for loading the olympus stylish adminCP - // - if (PORTAL_BACKEND == 'phpbb3') - { - $phpbb_auth->acl($mx_user->data); - $mx_user->setup('acp/common', false); //Include phpBB3 AdminCP common language file - } - if ( !$userdata['session_logged_in'] ) { --- 39,42 ---- *************** *** 58,91 **** } ! //Do we realy need this? ! switch (PORTAL_BACKEND) { ! case 'internal': ! case 'phpbb2': ! if ($mx_request_vars->get('sid', MX_TYPE_NO_TAGS) != $userdata['session_id']) ! { ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $_SERVER['REQUEST_URI']); ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url); ! $url = str_replace('//', '/', $url); ! $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url); ! $url = preg_replace('/\?$/', '', $url); ! $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id']; ! ! mx_redirect($url); ! } ! break; ! case 'phpbb3': ! if ($mx_request_vars->get('sid', MX_TYPE_NO_TAGS) != $mx_user->session_id) ! { ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $_SERVER['REQUEST_URI']); ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url); ! $url = str_replace('//', '/', $url); ! $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url); ! $url = preg_replace('/\?$/', '', $url); ! $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $mx_user->session_id; ! mx_redirect($url); ! } ! break; } --- 49,63 ---- } ! // Ensure $mx_user->session_id is populated... ! if ($mx_request_vars->get('sid', MX_TYPE_NO_TAGS) != $mx_user->session_id) { ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $_SERVER['REQUEST_URI']); ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url); ! $url = str_replace('//', '/', $url); ! $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url); ! $url = preg_replace('/\?$/', '', $url); ! $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $mx_user->session_id; ! mx_redirect($url); } Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** admin_mx_portal.php 6 Oct 2008 04:37:41 -0000 1.47 --- admin_mx_portal.php 31 Oct 2008 19:02:20 -0000 1.48 *************** *** 93,97 **** $new['smtp_username'] = $mx_request_vars->post('smtp_username', MX_TYPE_NO_TAGS, '0'); $new['smtp_password'] = $mx_request_vars->post('smtp_password', MX_TYPE_NO_TAGS, '0'); ! $sql = "UPDATE " . PORTAL_TABLE . " SET " . $db->sql_build_array('UPDATE', utf8_normalize_nfc($new)); --- 93,97 ---- $new['smtp_username'] = $mx_request_vars->post('smtp_username', MX_TYPE_NO_TAGS, '0'); $new['smtp_password'] = $mx_request_vars->post('smtp_password', MX_TYPE_NO_TAGS, '0'); ! $sql = "UPDATE " . PORTAL_TABLE . " SET " . $db->sql_build_array('UPDATE', utf8_normalize_nfc($new)); *************** *** 101,105 **** mx_message_die(GENERAL_ERROR, "Failed to update portal configuration ", "", __LINE__, __FILE__, $sql); } ! $message = update_portal_backend($new['portal_backend']) ? "The CMS configuration file was upgraded ...<br /><br />" : update_portal_backend($new['portal_backend']); --- 101,105 ---- mx_message_die(GENERAL_ERROR, "Failed to update portal configuration ", "", __LINE__, __FILE__, $sql); } ! $message = update_portal_backend($new['portal_backend']) ? "The CMS configuration file was upgraded ...<br /><br />" : update_portal_backend($new['portal_backend']); *************** *** 107,111 **** $message .= $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], "<a href=\"" . mx_append_sid("admin_mx_portal.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); } --- 107,111 ---- $message .= $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], "<a href=\"" . mx_append_sid("admin_mx_portal.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); } *************** *** 128,150 **** $timezone_select = mx_tz_select($portal_config['board_timezone'], 'board_timezone'); ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! ! case 'phpbb2': ! ! $current_phpbb_version = '2' . $board_config['version']; ! break; ! ! case 'phpbb3': ! ! $current_phpbb_version = $board_config['version']; ! break; ! } // // Valid portal backend // ! $valid_backend_text = PORTAL_BACKEND == $portal_config['portal_backend'] ? $lang['Portal_config_valid_true'] : $lang['Portal_config_valid_false']; $template->assign_vars(array( --- 128,137 ---- $timezone_select = mx_tz_select($portal_config['board_timezone'], 'board_timezone'); ! $current_phpbb_version = $mx_backend->get_phpbb_version(); // Empty if mxp is used standalone // // Valid portal backend // ! $valid_backend_text = $mx_backend->confirm_backend() ? $lang['Portal_config_valid_true'] : $lang['Portal_config_valid_false']; $template->assign_vars(array( *************** *** 374,400 **** "PORTAL_VERSION" => $portal_config['portal_version'], ! // ! // Old ! // ! //"L_PORTAL_URL" => $lang['Portal_Url'] . "<br />" . $lang['Portal_url_explain'], ! //"L_PORTAL_PHPBB_URL" => $lang['Portal_PHPBB_Url'] . "<br />" . $lang['Phpbb_url_explain'], ! //"PORTAL_URL" => $portal_config['portal_url'], ! //"PORTAL_PHPBB_URL" => $portal_config['portal_phpbb_url'], ! ! 'PHPBB_BACKEND' => PORTAL_BACKEND != 'internal', )); - switch (PORTAL_BACKEND) - { - case 'internal': - break; - - case 'phpbb2': - case 'phpbb3': - $template->assign_block_vars('phpbb_backend', array()); - break; - } - $template->pparse('admin_portal'); include_once('page_footer_admin.' . $phpEx); --- 361,368 ---- "PORTAL_VERSION" => $portal_config['portal_version'], ! 'PHPBB_BACKEND' => !empty($mx_backend->get_phpbb_version()), )); $template->pparse('admin_portal'); include_once('page_footer_admin.' . $phpEx); |
|
From: Jon O. <jon...@us...> - 2008-10-31 19:02:25
|
Update of /cvsroot/mxbb/core In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6817 Modified Files: common.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** common.php 6 Oct 2008 00:38:46 -0000 1.108 --- common.php 31 Oct 2008 19:02:20 -0000 1.109 *************** *** 197,209 **** } - include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); - include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); - - // - // Instantiate Dummy phpBB Classes - // - $phpBB2 = new phpBB2(); - $phpBB3 = new phpBB3(); - // // MX-Publisher CORE Includes --- 197,200 ---- *************** *** 269,273 **** // $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : getenv('REMOTE_ADDR') ); ! $user_ip = $phpBB2->encode_ip($client_ip); // --- 260,264 ---- // $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : getenv('REMOTE_ADDR') ); ! $user_ip = phpBB2::encode_ip($client_ip); // *************** *** 282,286 **** $mx_bbcode = new mx_bbcode(); - // // Remove install and contrib folders --- 273,276 ---- |
|
From: Jon O. <jon...@us...> - 2008-10-31 19:02:25
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6817/includes Modified Files: mx_constants.php mx_functions.php mx_functions_admincp.php mx_functions_core.php mx_functions_style.php mx_functions_tools.php page_header.php page_tail.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** page_tail.php 4 Oct 2008 07:04:25 -0000 1.42 --- page_tail.php 31 Oct 2008 19:02:21 -0000 1.43 *************** *** 48,52 **** $editor_name_tmp = mx_get_userdata($mx_page->last_updated_by); $editor_name = $editor_name_tmp['username']; ! $edit_time = $phpBB2->create_date( $board_config['default_dateformat'], $mx_page->last_updated, $board_config['board_timezone'] ); $template->assign_block_vars('page_last_updated', array( --- 48,52 ---- $editor_name_tmp = mx_get_userdata($mx_page->last_updated_by); $editor_name = $editor_name_tmp['username']; ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $mx_page->last_updated, $board_config['board_timezone'] ); $template->assign_block_vars('page_last_updated', array( Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** mx_functions_core.php 5 Oct 2008 01:16:26 -0000 1.108 --- mx_functions_core.php 31 Oct 2008 19:02:21 -0000 1.109 *************** *** 451,455 **** $sql = "SELECT col.page_id, pag.page_name, ! pag.page_desc, pag.page_parent, pag.parents_data, --- 451,455 ---- $sql = "SELECT col.page_id, pag.page_name, ! pag.page_desc, pag.page_parent, pag.parents_data, *************** *** 503,507 **** "page_id" => $row['page_id'], "page_name" => $row['page_name'], ! "page_desc" => $row['page_desc'], "page_parent" => $row['page_parent'], "parent_data" => $row['parents_data'], --- 503,507 ---- "page_id" => $row['page_id'], "page_name" => $row['page_name'], ! "page_desc" => $row['page_desc'], "page_parent" => $row['page_parent'], "parent_data" => $row['parents_data'], *************** *** 1241,1550 **** return $censors; } - - /** - * Obtain ranks - */ - function obtain_ranks() - { - if (($ranks = $this->get('_ranks')) === false) - { - global $db; - - $sql = 'SELECT * - FROM ' . RANKS_TABLE . ' - ORDER BY rank_min DESC'; - $result = $db->sql_query($sql); - - $ranks = array(); - while ($row = $db->sql_fetchrow($result)) - { - if ($row['rank_special']) - { - $ranks['special'][$row['rank_id']] = array( - 'rank_title' => $row['rank_title'], - 'rank_image' => $row['rank_image'] - ); - } - else - { - $ranks['normal'][] = array( - 'rank_title' => $row['rank_title'], - 'rank_min' => $row['rank_min'], - 'rank_image' => $row['rank_image'] - ); - } - } - $db->sql_freeresult($result); - - $this->put('_ranks', $ranks); - } - - return $ranks; - } - - /** - * Obtain allowed extensions - * - * @param mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations. - * - * @return array allowed extensions array. - */ - function obtain_attach_extensions($forum_id) - { - if (($extensions = $this->get('_extensions')) === false) - { - global $db; - - $extensions = array( - '_allowed_post' => array(), - '_allowed_pm' => array(), - ); - - // The rule is to only allow those extensions defined. ;) - $sql = 'SELECT e.extension, g.* - FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g - WHERE e.group_id = g.group_id - AND (g.allow_group = 1 OR g.allow_in_pm = 1)'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $extension = strtolower(trim($row['extension'])); - - $extensions[$extension] = array( - 'display_cat' => (int) $row['cat_id'], - 'download_mode' => (int) $row['download_mode'], - 'upload_icon' => trim($row['upload_icon']), - 'max_filesize' => (int) $row['max_filesize'], - 'allow_group' => $row['allow_group'], - 'allow_in_pm' => $row['allow_in_pm'], - ); - - $allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array(); - - // Store allowed extensions forum wise - if ($row['allow_group']) - { - $extensions['_allowed_post'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums; - } - - if ($row['allow_in_pm']) - { - $extensions['_allowed_pm'][$extension] = 0; - } - } - $db->sql_freeresult($result); - - $this->put('_extensions', $extensions); - } - - // Forum post - if ($forum_id === false) - { - // We are checking for private messages, therefore we only need to get the pm extensions... - $return = array('_allowed_' => array()); - - foreach ($extensions['_allowed_pm'] as $extension => $check) - { - $return['_allowed_'][$extension] = 0; - $return[$extension] = $extensions[$extension]; - } - - $extensions = $return; - } - else if ($forum_id === true) - { - return $extensions; - } - else - { - $forum_id = (int) $forum_id; - $return = array('_allowed_' => array()); - - foreach ($extensions['_allowed_post'] as $extension => $check) - { - // Check for allowed forums - if (is_array($check)) - { - $allowed = (!in_array($forum_id, $check)) ? false : true; - } - else - { - $allowed = true; - } - - if ($allowed) - { - $return['_allowed_'][$extension] = 0; - $return[$extension] = $extensions[$extension]; - } - } - - $extensions = $return; - } - - if (!isset($extensions['_allowed_'])) - { - $extensions['_allowed_'] = array(); - } - - return $extensions; - } - - /** - * Obtain active bots - */ - function obtain_bots() - { - if (($bots = $this->get('_bots')) === false) - { - global $db; - - switch ($db->sql_layer) - { - case 'mssql': - case 'mssql_odbc': - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY LEN(bot_agent) DESC'; - break; - - case 'firebird': - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY CHAR_LENGTH(bot_agent) DESC'; - break; - - // LENGTH supported by MySQL, IBM DB2 and Oracle for sure... - default: - $sql = 'SELECT user_id, bot_agent, bot_ip - FROM ' . BOTS_TABLE . ' - WHERE bot_active = 1 - ORDER BY LENGTH(bot_agent) DESC'; - break; - } - $result = $db->sql_query($sql); - - $bots = array(); - while ($row = $db->sql_fetchrow($result)) - { - $bots[] = $row; - } - $db->sql_freeresult($result); - - $this->put('_bots', $bots); - } - - return $bots; - } - - /** - * Obtain cfg file data - */ - function obtain_cfg_items($theme) - { - global $config, $phpbb_root_path; - - $parsed_items = array( - 'theme' => array(), - 'template' => array(), - 'imageset' => array() - ); - - foreach ($parsed_items as $key => $parsed_array) - { - $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']); - - if ($parsed_array === false) - { - $parsed_array = array(); - } - - $reparse = false; - $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg'; - - if (!file_exists($filename)) - { - continue; - } - - if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime']))) - { - $reparse = true; - } - - // Re-parse cfg file - if ($reparse) - { - $parsed_array = parse_cfg_file($filename); - $parsed_array['filetime'] = @filemtime($filename); - - $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array); - } - $parsed_items[$key] = $parsed_array; - } - - return $parsed_items; - } - - /** - * Obtain disallowed usernames - */ - function obtain_disallowed_usernames() - { - if (($usernames = $this->get('_disallowed_usernames')) === false) - { - global $db; - - $sql = 'SELECT disallow_username - FROM ' . DISALLOW_TABLE; - $result = $db->sql_query($sql); - - $usernames = array(); - while ($row = $db->sql_fetchrow($result)) - { - $usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#')); - } - $db->sql_freeresult($result); - - $this->put('_disallowed_usernames', $usernames); - } - - return $usernames; - } - - /** - * Obtain hooks... - */ - function obtain_hooks() - { - global $phpbb_root_path, $phpEx; - - if (($hook_files = $this->get('_hooks')) === false) - { - $hook_files = array(); - - // Now search for hooks... - $dh = @opendir($phpbb_root_path . 'includes/hooks/'); - - if ($dh) - { - while (($file = readdir($dh)) !== false) - { - if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) - { - $hook_files[] = substr($file, 0, -(strlen($phpEx) + 1)); - } - } - closedir($dh); - } - - $this->put('_hooks', $hook_files); - } - - return $hook_files; - } } --- 1241,1244 ---- *************** *** 2053,2057 **** function output_stats() { ! global $layouttemplate, $board_config, $lang, $userdata, $phpBB2; if ( $this->show_stats && !empty($this->block_time) && !empty($this->editor_id) ) --- 1747,1751 ---- function output_stats() { ! global $layouttemplate, $board_config, $lang, $userdata; if ( $this->show_stats && !empty($this->block_time) && !empty($this->editor_id) ) *************** *** 2060,2064 **** $editor_name_tmp = mx_get_userdata($this->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = $phpBB2->create_date( $board_config['default_dateformat'], $this->block_time, $board_config['board_timezone'] ); $layouttemplate->assign_block_vars('layout_column.blocks.block_stats', array( --- 1754,1758 ---- $editor_name_tmp = mx_get_userdata($this->editor_id); $editor_name = $editor_name_tmp['username']; ! $edit_time = phpBB2::create_date( $board_config['default_dateformat'], $this->block_time, $board_config['board_timezone'] ); $layouttemplate->assign_block_vars('layout_column.blocks.block_stats', array( *************** *** 3983,3987 **** function _read($var, $type = MX_TYPE_ANY, $dflt = '', $not_null = false) { - //global $_POST, $_GET; //is not required? if( ($type & (MX_TYPE_POST_VARS|MX_TYPE_GET_VARS)) == 0 ) { --- 3677,3680 ---- *************** *** 4133,4137 **** function is_post($var) { - //global $_POST; // Note: _x and _y are used by (at least IE) to return the mouse position at onclick of INPUT TYPE="img" elements. return (isset($_POST[$var]) || ( isset($_POST[$var.'_x']) && isset($_POST[$var.'_y']))) ? 1 : 0; --- 3826,3829 ---- *************** *** 4149,4153 **** function is_get($var) { - //global $_GET; return isset($_GET[$var]) ? 1 : 0 ; } --- 3841,3844 ---- *************** *** 4178,4182 **** function is_empty_post($var) { - //global $_POST; return (empty($_POST[$var]) && ( empty($_POST[$var.'_x']) || empty($_POST[$var.'_y']))) ? 1 : 0 ; } --- 3869,3872 ---- *************** *** 4193,4197 **** function is_empty_get($var) { - //global $_GET; return empty($_GET[$var]) ? 1 : 0 ; } --- 3883,3886 ---- Index: mx_constants.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_constants.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** mx_constants.php 24 Sep 2008 17:01:11 -0000 1.30 --- mx_constants.php 31 Oct 2008 19:02:20 -0000 1.31 *************** *** 104,113 **** /**#@-*/ - // Error codes removed in phpBB3 does we need them here - @define('GENERAL_MESSAGE', 200); - @define('GENERAL_ERROR', 202); - @define('CRITICAL_MESSAGE', 203); - @define('CRITICAL_ERROR', 204); - /** * Sick and tired of these variables getting lost... --- 104,107 ---- Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** mx_functions_tools.php 31 Oct 2008 11:41:08 -0000 1.48 --- mx_functions_tools.php 31 Oct 2008 19:02:21 -0000 1.49 *************** *** 67,71 **** function init($html_on = false, $bbcode_on = true, $smilies_on = false, $links_on = true, $images_on = true) { ! global $theme, $mx_cache, $phpBB2; // --- 67,71 ---- function init($html_on = false, $bbcode_on = true, $smilies_on = false, $links_on = true, $images_on = true) { ! global $theme, $mx_cache; // *************** *** 104,108 **** $this->highlight = urlencode($_GET['highlight']); ! $this->highlight_match = $phpBB2->phpbb_rtrim($this->highlight_match, "\\"); } --- 104,108 ---- $this->highlight = urlencode($_GET['highlight']); ! $this->highlight_match = phpBB2::phpbb_rtrim($this->highlight_match, "\\"); } *************** *** 327,331 **** function encode_username($username) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path,$phpBB2; // --- 327,331 ---- function encode_username($username) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; // *************** *** 334,338 **** if (!empty($username)) { ! $username = $phpBB2->phpbb_clean_username($username); if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) --- 334,338 ---- if (!empty($username)) { ! $username = phpBB2::phpbb_clean_username($username); if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) *************** *** 1625,1634 **** if( !function_exists('prepare_message') ) { ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx); } if( !function_exists('add_search_words') ) { ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_search.' . $phpEx); } --- 1625,1636 ---- if( !function_exists('prepare_message') ) { ! //include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx); ! mx_cache::load_file('functions_post', 'phpbb2'); } if( !function_exists('add_search_words') ) { ! //include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_search.' . $phpEx); ! mx_cache::load_file('functions_search', 'phpbb2'); } *************** *** 2040,2044 **** // Include and initiate mailer // ! include($mx_root_path . 'includes/mx_functions_emailer.'.$phpEx); $emailer = new mx_emailer($board_config['smtp_delivery']); --- 2042,2046 ---- // Include and initiate mailer // ! include_once($mx_root_path . 'includes/mx_functions_emailer.'.$phpEx); $emailer = new mx_emailer($board_config['smtp_delivery']); *************** *** 3142,3148 **** $subject = substr($subject, 0, 60); $subject = mx_censor_text($subject); ! $username = addslashes(unprepare_message(trim($user_name))); ! $username = $phpBB2->phpbb_clean_username( $username ); // --- 3144,3150 ---- $subject = substr($subject, 0, 60); $subject = mx_censor_text($subject); ! $username = addslashes(unprepare_message(trim($user_name))); ! $username = phpBB2::phpbb_clean_username( $username ); // *************** *** 3249,3253 **** case 'internal': break; ! case 'phpbb2': $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $user_id . ", '$username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $user_attach_sig)"; --- 3251,3255 ---- case 'internal': break; ! case 'phpbb2': $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $user_id . ", '$username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $user_attach_sig)"; *************** *** 3278,3291 **** 'post_edit_locked' => !empty($post_edit_locked) ? $post_edit_locked : 0 ); ! ! $sql = "INSERT INTO " . POSTS_TABLE . $db->sql_build_array('INSERT', $sql_data); break; ! } ! } else { $edited_sql = !$is_last_post ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; ! $sql = "UPDATE " . POSTS_TABLE . " SET post_username = '$username', enable_bbcode = $bbcode_on, enable_smilies = $smilies_on, enable_sig = $user_attach_sig" . $edited_sql . " --- 3280,3293 ---- 'post_edit_locked' => !empty($post_edit_locked) ? $post_edit_locked : 0 ); ! ! $sql = "INSERT INTO " . POSTS_TABLE . $db->sql_build_array('INSERT', $sql_data); break; ! } ! } else { $edited_sql = !$is_last_post ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; ! $sql = "UPDATE " . POSTS_TABLE . " SET post_username = '$username', enable_bbcode = $bbcode_on, enable_smilies = $smilies_on, enable_sig = $user_attach_sig" . $edited_sql . " *************** *** 3307,3311 **** case 'internal': break; ! case 'phpbb2': if ( $mode == 'newtopic' || $mode == 'reply' ) --- 3309,3313 ---- case 'internal': break; ! case 'phpbb2': if ( $mode == 'newtopic' || $mode == 'reply' ) *************** *** 3317,3326 **** $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$message', bbcode_uid = '$bbcode_uid', post_subject = '$subject' WHERE post_id = $post_id"; } ! if ( !$db->sql_query( $sql ) ) { $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } ! break; --- 3319,3328 ---- $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$message', bbcode_uid = '$bbcode_uid', post_subject = '$subject' WHERE post_id = $post_id"; } ! if ( !$db->sql_query( $sql ) ) { $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } ! break; *************** *** 3379,3391 **** case 'internal': break; ! case 'phpbb2': $phpBB2->add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); ! break; case 'phpbb3': //To do break; ! } // --- 3381,3393 ---- case 'internal': break; ! case 'phpbb2': $phpBB2->add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); ! break; case 'phpbb3': //To do break; ! } // *************** *** 3837,3841 **** function display_internal_comments() { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user, $phpBB2; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; --- 3839,3843 ---- function display_internal_comments() { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; *************** *** 3889,3893 **** while ( $this->comments_row = $db->sql_fetchrow( $result ) ) { ! $time = $phpBB2->create_date( $board_config['default_dateformat'], $this->comments_row['comments_time'], $board_config['board_timezone'] ); // --- 3891,3895 ---- while ( $this->comments_row = $db->sql_fetchrow( $result ) ) { ! $time = phpBB2::create_date( $board_config['default_dateformat'], $this->comments_row['comments_time'], $board_config['board_timezone'] ); // *************** *** 4030,4034 **** $num_of_replies = intval( $this->total_comments ); ! //$pagination = $phpBB2->generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start ) . ' '; $pagination = mx_generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start, true, true, true, false ) . ' '; if ($num_of_replies > 0) --- 4032,4036 ---- $num_of_replies = intval( $this->total_comments ); ! //$pagination = phpBB2::generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start ) . ' '; $pagination = mx_generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start, true, true, true, false ) . ' '; if ($num_of_replies > 0) *************** *** 4050,4054 **** function display_phpbb_comments( ) { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user, $phpBB2; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; --- 4052,4056 ---- function display_phpbb_comments( ) { ! global $template, $lang, $board_config, $phpEx, $db, $userdata, $images, $mx_user; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $portal_config; *************** *** 4114,4121 **** $poster_id = $this->comments_row['user_id']; $poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $this->comments_row['username']; ! $time = $phpBB2->create_date( $board_config['default_dateformat'], $this->comments_row['post_time'], $board_config['board_timezone'] ); $poster_posts = ( $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $this->comments_row['user_posts'] : ''; $poster_from = ( $this->comments_row['user_from'] && $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $this->comments_row['user_from'] : ''; ! $poster_joined = ( $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . $phpBB2->create_date( $lang['DATE_FORMAT'], $this->comments_row['user_regdate'], $board_config['board_timezone'] ) : ''; // --- 4116,4123 ---- $poster_id = $this->comments_row['user_id']; $poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $this->comments_row['username']; ! $time = phpBB2::create_date( $board_config['default_dateformat'], $this->comments_row['post_time'], $board_config['board_timezone'] ); $poster_posts = ( $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $this->comments_row['user_posts'] : ''; $poster_from = ( $this->comments_row['user_from'] && $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $this->comments_row['user_from'] : ''; ! $poster_joined = ( $this->comments_row['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . phpBB2::create_date( $lang['DATE_FORMAT'], $this->comments_row['user_regdate'], $board_config['board_timezone'] ) : ''; // *************** *** 4168,4172 **** $l_edit_time_total = ( $this->comments_row['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; ! $l_edited_by = '<br /><br />' . sprintf( $l_edit_time_total, $poster, $phpBB2->create_date( $board_config['default_dateformat'], $this->comments_row['post_edit_time'], $board_config['board_timezone'] ), $this->comments_row['post_edit_count'] ); } else --- 4170,4174 ---- $l_edit_time_total = ( $this->comments_row['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total']; ! $l_edited_by = '<br /><br />' . sprintf( $l_edit_time_total, $poster, phpBB2::create_date( $board_config['default_dateformat'], $this->comments_row['post_edit_time'], $board_config['board_timezone'] ), $this->comments_row['post_edit_count'] ); } else *************** *** 4273,4277 **** $num_of_replies = intval( $this->total_comments ); ! $pagination = $phpBB2->generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) --- 4275,4279 ---- $num_of_replies = intval( $this->total_comments ); ! $pagination = phpBB2::generate_pagination( $this->u_pagination($page_num), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) *************** *** 4351,4394 **** $this->total_comments = ( $row = $db->sql_fetchrow($result) ) ? intval($row['number']) : 0; ! // // Go ahead and pull all data for this topic ! // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! ! case 'phpbb2': ! ! $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! break; ! ! case 'phpbb3': ! ! $sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TABLE . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! break; ! } ! ! if ($this->start > -1 && $this->pagination_num > 0) { ! $result = $db->sql_query_limit($sql, $this->start, $this->pagination_num); } - else - { - $result = $db->sql_query_limit($sql, $this->start, $this->pagination_num); - } ! if (!$result) { mx_message_die( GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql ); --- 4353,4373 ---- $this->total_comments = ( $row = $db->sql_fetchrow($result) ) ? intval($row['number']) : 0; ! // // Go ahead and pull all data for this topic ! // ! $sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . ((PORTAL_BACKEND == 'phpbb2') ? POSTS_TEXT_TABLE : POSTS_TABLE) . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! if ( $this->start > -1 && $this->pagination_num > 0 ) { ! $sql .= " LIMIT $this->start, $this->pagination_num "; } ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql ); Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** page_header.php 4 Oct 2008 07:04:25 -0000 1.63 --- page_header.php 31 Oct 2008 19:02:21 -0000 1.64 *************** *** 191,196 **** 'SITE_DESCRIPTION' => $board_config['site_desc'], 'PAGE_TITLE' => $mx_page->page_title, ! 'CURRENT_TIME' => sprintf($lang['Current_time'], $phpBB2->create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), ! '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_USERNAME' => $lang['Username'], --- 191,196 ---- 'SITE_DESCRIPTION' => $board_config['site_desc'], 'PAGE_TITLE' => $mx_page->page_title, ! 'CURRENT_TIME' => sprintf($lang['Current_time'], phpBB2::create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), ! '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_USERNAME' => $lang['Username'], *************** *** 304,308 **** 'T_PHPBB_STYLESHEET' => $theme['head_stylesheet'], ! 'T_STYLESHEET_LINK' => (!$mx_user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $mx_user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$mx_user->session_id&id=" . $mx_user->theme['style_id'] . '&lang=' . $mx_user->encode_lang($board_config['default_lang']), 'T_MXBB_STYLESHEET' => $theme['head_stylesheet'], 'T_GECKO_STYLESHEET' => 'gecko.css', --- 304,308 ---- 'T_PHPBB_STYLESHEET' => $theme['head_stylesheet'], ! 'T_STYLESHEET_LINK' => (!$mx_user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $mx_user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$mx_user->session_id&id=" . $mx_user->theme['style_id'] . '&lang=' . $mx_user->encode_lang($board_config['default_lang']), 'T_MXBB_STYLESHEET' => $theme['head_stylesheet'], 'T_GECKO_STYLESHEET' => 'gecko.css', *************** *** 323,327 **** // Do NOT set basedir when in EDIT mode 'SET_BASE' => !$mx_request_vars->is_request('portalpage'), ! //Enable CSS Files to be loaded direct from phpBB? 'PHPBB' => !(PORTAL_BACKEND === 'internal'), --- 323,327 ---- // Do NOT set basedir when in EDIT mode 'SET_BASE' => !$mx_request_vars->is_request('portalpage'), ! //Enable CSS Files to be loaded direct from phpBB? 'PHPBB' => !(PORTAL_BACKEND === 'internal'), Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** mx_functions_style.php 25 Oct 2008 22:37:55 -0000 1.103 --- mx_functions_style.php 31 Oct 2008 19:02:21 -0000 1.104 *************** *** 126,130 **** } */ ! if($this->subtemplates) { --- 126,130 ---- } */ ! if($this->subtemplates) { *************** *** 136,140 **** $filename = $this->replace[$filename]; } ! $style_path = $mx_user->template_name; --- 136,140 ---- $filename = $this->replace[$filename]; } ! $style_path = $mx_user->template_name; *************** *** 143,147 **** // $filename2 = substr_count($filename, 'html') ? str_replace(".html", ".tpl", $filename) : str_replace(".tpl", ".html", $filename); ! // // Look at MX-Publisher-Module folder.........................................................................MX-Publisher-module --- 143,147 ---- // $filename2 = substr_count($filename, 'html') ? str_replace(".html", ".tpl", $filename) : str_replace(".tpl", ".html", $filename); ! // // Look at MX-Publisher-Module folder.........................................................................MX-Publisher-module *************** *** 164,168 **** } } ! // --- 164,168 ---- } } ! // *************** *** 232,248 **** $fileSearch[] = $mx_user->default_template_name . '/' . 'template'; // Then check Default template $fileSearch[] = './'; - ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, 'styles/', $phpbb_root_path, false); if (!empty($this->module_template_path)) ! { if (!file_exists($root_path . $this->module_template_path . 'gecko.css')) { //Do not include phpBB3 overall header and footer files. $temppath = str_replace('overall_header', 'overall_header_plugin', $temppath); ! $temppath = str_replace('overall_footer', 'overall_footer_plugin', $temppath); ! } ! return $temppath; } --- 232,248 ---- $fileSearch[] = $mx_user->default_template_name . '/' . 'template'; // Then check Default template $fileSearch[] = './'; ! ! $temppath = $this->doFileSearch($fileSearch, $filename, $filename2, 'styles/', $phpbb_root_path, false); if (!empty($this->module_template_path)) ! { if (!file_exists($root_path . $this->module_template_path . 'gecko.css')) { //Do not include phpBB3 overall header and footer files. $temppath = str_replace('overall_header', 'overall_header_plugin', $temppath); ! $temppath = str_replace('overall_footer', 'overall_footer_plugin', $temppath); ! } ! return $temppath; } *************** *** 271,275 **** die("Template->make_filename(): Error - file $filename does not exist. <br />Class-Root: $this->root <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } ! /** --- 271,275 ---- die("Template->make_filename(): Error - file $filename does not exist. <br />Class-Root: $this->root <br />Module: $module_root_path <br />Current style: $style_path <br />Cloned style: $mx_user->cloned_template_name <br />Default style: $mx_user->default_template_name <br />Custom module default style: $moduleDefault"); } ! /** *************** *** 286,298 **** $this->module_template_path = ''; foreach ($fileSearch as $key => $path) ! { if (!empty($path) && ($path !== './')) { $this->debug_paths .= '<br>' . $root_path . $root . $path . '/' . $filename; ! if( file_exists($root_path . $root . $path . '/' . $filename) ) ! { $this->module_template_path = $root . $path . '/'; ! return $root_path . $root . $path . '/' . $filename; } --- 286,298 ---- $this->module_template_path = ''; foreach ($fileSearch as $key => $path) ! { if (!empty($path) && ($path !== './')) { $this->debug_paths .= '<br>' . $root_path . $root . $path . '/' . $filename; ! if( file_exists($root_path . $root . $path . '/' . $filename) ) ! { $this->module_template_path = $root . $path . '/'; ! return $root_path . $root . $path . '/' . $filename; } *************** *** 345,349 **** return true; } ! /** * Assigns template filename for handle. --- 345,349 ---- return true; } ! /** * Assigns template filename for handle. *************** *** 377,382 **** } } ! ! //Do not include phpBB3 overall header and footer files using xs_include inside forum integration if ($xs_include && defined('MX_PHPBB3_BLOCK') && $module_root_path) { --- 377,382 ---- } } ! ! //Do not include phpBB3 overall header and footer files using xs_include inside forum integration if ($xs_include && defined('MX_PHPBB3_BLOCK') && $module_root_path) { *************** *** 393,399 **** $fileSearch[] = './'; // Compatibility with primitive modules ! $this->files[$handle] = $this->doFileSearch($fileSearch, $filename3, $filename2, 'templates/', $module_root_path); } ! if (strpos($this->files[$handle],'overall_footer.')) { --- 393,399 ---- $fileSearch[] = './'; // Compatibility with primitive modules ! $this->files[$handle] = $this->doFileSearch($fileSearch, $filename3, $filename2, 'templates/', $module_root_path); } ! if (strpos($this->files[$handle],'overall_footer.')) { *************** *** 407,411 **** $fileSearch[] = './'; // Compatibility with primitive modules ! $this->files[$handle] = $this->doFileSearch($fileSearch, $filename3, $filename2, 'templates/', $module_root_path); } } --- 407,411 ---- $fileSearch[] = './'; // Compatibility with primitive modules ! $this->files[$handle] = $this->doFileSearch($fileSearch, $filename3, $filename2, 'templates/', $module_root_path); } } *************** *** 573,577 **** global $userdata, $board_config, $portal_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; ! global $nav_links, $phpBB2; // --- 573,577 ---- global $userdata, $board_config, $portal_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; ! global $nav_links; // *************** *** 579,584 **** // $board_config['phpbb_lang'] = $board_config['default_lang']; // Handy switch ! $this->lang['default_lang'] = $phpBB2->phpbb_ltrim(basename($phpBB2->phpbb_rtrim($this->decode_lang($board_config['default_lang']))), "'"); ! $this->data['user_lang'] = $phpBB2->phpbb_ltrim(basename($phpBB2->phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); if ( $this->data['user_id'] != ANONYMOUS ) --- 579,584 ---- // $board_config['phpbb_lang'] = $board_config['default_lang']; // Handy switch ! $this->lang['default_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($board_config['default_lang']))), "'"); ! $this->data['user_lang'] = phpBB2::phpbb_ltrim(basename(phpBB2::phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); if ( $this->data['user_id'] != ANONYMOUS ) *************** *** 603,607 **** // Now, $this->lang['default_lang'] is populated, but do we have a mathing MX-Publisher lang file installed? // ! if ( !file_exists(@$phpBB2->phpbb_realpath($mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx)) ) { // --- 603,607 ---- // Now, $this->lang['default_lang'] is populated, but do we have a mathing MX-Publisher lang file installed? // ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx)) ) { // *************** *** 610,614 **** $this->lang['default_lang'] = 'english'; ! if ( !file_exists(@$phpBB2->phpbb_realpath($mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx)) ) { mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack: ' . $mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx); --- 610,614 ---- $this->lang['default_lang'] = 'english'; ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx)) ) { mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack: ' . $mx_root_path . 'language/lang_' . $this->lang['default_lang'] . '/lang_main.'.$phpEx); *************** *** 646,650 **** // Load MXP lang keys // ! //Load vanilla phpBB2 lang files if is possible switch (PORTAL_BACKEND) --- 646,650 ---- // Load MXP lang keys // ! //Load vanilla phpBB2 lang files if is possible switch (PORTAL_BACKEND) *************** *** 661,665 **** $shared_lang_path = $phpbb_root_path . 'language/'; break; ! } // AdminCP --- 661,665 ---- $shared_lang_path = $phpbb_root_path . 'language/'; break; ! } // AdminCP *************** *** 687,693 **** } } ! // Core Main Translation after shared phpBB keys so we can overwrite some settings ! require($mx_root_path . "language/lang_" . $this->lang['default_lang'] . "/lang_main.$phpEx"); // --- 687,693 ---- } } ! // Core Main Translation after shared phpBB keys so we can overwrite some settings ! require($mx_root_path . "language/lang_" . $this->lang['default_lang'] . "/lang_main.$phpEx"); // *************** *** 737,741 **** global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; global $mx_page, $mx_request_vars; ! // // Build Portal style --- 737,741 ---- global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; global $mx_page, $mx_request_vars; ! // // Build Portal style *************** *** 799,817 **** //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up //Anonymouse users should see all block graphic corect ! //Query MXP style_id corepondent to phpBB themes_id ! $sql = "SELECT m.themes_id ! FROM " . MX_THEMES_TABLE . " AS m, " . THEMES_TABLE . " AS t ! WHERE t.themes_id = " . (int) $user_style . " ! AND t.template_name = m.template_name"; ! if ($row = $db->sql_fetchrow($db->sql_query($sql))) ! { ! $style = $row['themes_id']; //User style ! } ! else ! { ! $style = $portal_config['default_style']; ! } ! break; case 'phpbb3': $user_style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); --- 799,817 ---- //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up //Anonymouse users should see all block graphic corect ! //Query MXP style_id corepondent to phpBB themes_id ! $sql = "SELECT m.themes_id ! FROM " . MX_THEMES_TABLE . " AS m, " . THEMES_TABLE . " AS t ! WHERE t.themes_id = " . (int) $user_style . " ! AND t.template_name = m.template_name"; ! if ($row = $db->sql_fetchrow($db->sql_query($sql))) ! { ! $style = $row['themes_id']; //User style ! } ! else ! { ! $style = $portal_config['default_style']; ! } ! break; case 'phpbb3': $user_style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); *************** *** 819,826 **** //Anonymouse users should see all block graphic corect //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT m.themes_id FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t WHERE s.style_id = " . (int) $user_style . " ! AND t.template_path = m.template_name AND t.template_id = s.template_id"; --- 819,826 ---- //Anonymouse users should see all block graphic corect //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT m.themes_id FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t WHERE s.style_id = " . (int) $user_style . " ! AND t.template_path = m.template_name AND t.template_id = s.template_id"; *************** *** 828,839 **** { $style = $row['themes_id']; //User style ! } else { ! $style = $portal_config['default_style']; ! } break; } ! if ( $theme = $this->_setup_style($style) ) { --- 828,839 ---- { $style = $row['themes_id']; //User style ! } else { ! $style = $portal_config['default_style']; ! } break; } ! if ( $theme = $this->_setup_style($style) ) { *************** *** 844,848 **** $style = $mx_request_vars->post('default_style', MX_TYPE_INT, $init_style); $theme = $this->_setup_style($style); ! return; } --- 844,848 ---- $style = $mx_request_vars->post('default_style', MX_TYPE_INT, $init_style); $theme = $this->_setup_style($style); ! return; } *************** *** 858,862 **** { global $db, $board_config, $portal_config, $template, $phpbb_root_path, $mx_root_path, $theme; ! // // Get Style data. --- 858,862 ---- { global $db, $board_config, $portal_config, $template, $phpbb_root_path, $mx_root_path, $theme; ! // // Get Style data. *************** *** 876,887 **** AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND mxt.themes_id = " . (int) $style; ! break; case 'phpbb3': $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND bbt.style_name = mxt.template_name"; break; } --- 876,887 ---- AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND mxt.themes_id = " . (int) $style; ! break; case 'phpbb3': $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND bbt.style_name = mxt.template_name"; break; } *************** *** 911,933 **** AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND bbt.themes_id = " . (int) $style; ! break; case 'phpbb3': //Try standard style name $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id AND bbt.style_name = mxt.template_name"; ! //If not standard style name or with spaces try someting else if ( !$db->sql_fetchrow($db->sql_query($sql) ) ) { $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND stt.template_path = mxt.template_name"; ! } break; } --- 911,933 ---- AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND bbt.themes_id = " . (int) $style; ! break; case 'phpbb3': //Try standard style name $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id AND bbt.style_name = mxt.template_name"; ! //If not standard style name or with spaces try someting else if ( !$db->sql_fetchrow($db->sql_query($sql) ) ) { $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND stt.template_path = mxt.template_name"; ! } break; } *************** *** 939,945 **** if ( !($row = $db->sql_fetchrow($result)) ) ! { $style = $portal_config['default_style']; ! switch (PORTAL_BACKEND) { --- 939,945 ---- if ( !($row = $db->sql_fetchrow($result)) ) ! { $style = $portal_config['default_style']; ! switch (PORTAL_BACKEND) { *************** *** 960,977 **** //Try standard style name $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id AND bbt.style_name = mxt.template_name"; ! //If not standard style name or with spaces try someting else if ( !$db->sql_fetchrow($db->sql_query($sql) ) ) { $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND stt.template_path = mxt.template_name"; } break; --- 960,977 ---- //Try standard style name $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id AND bbt.style_name = mxt.template_name"; ! //If not standard style name or with spaces try someting else if ( !$db->sql_fetchrow($db->sql_query($sql) ) ) { $sql = "SELECT mxt . *, stt . * , bbt . * ! FROM " . MX_THEMES_TABLE . " AS mxt, " . STYLES_TEMPLATE_TABLE . " AS stt, " . STYLES_TABLE . " AS bbt WHERE mxt.themes_id = " . (int) $style . " ! AND mxt.portal_backend = '" . PORTAL_BACKEND . "' AND stt.template_id = bbt.template_id ! AND stt.template_path = mxt.template_name"; } break; *************** *** 1015,1019 **** } } ! } } --- 1015,1019 ---- } } ! } } *************** *** 1112,1118 **** // Load MX-Publisher Template configuration data // ! @include($mx_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); - /* Removed since in 3.0.x+ our default template is no style if ( !$mx_template_config ) --- 1112,1118 ---- // Load MX-Publisher Template configuration data // ! @include($mx_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); ! /* Removed since in 3.0.x+ our default template is no style if ( !$mx_template_config ) *************** *** 1295,1299 **** { $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); ! $images[$key] = str_replace(PHPBB_URL . PHPBB_URL, PHPBB_URL, PHPBB_URL . $images[$key]); } } --- 1295,1299 ---- { $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); ! $images[$key] = str_replace(PHPBB_URL . PHPBB_URL, PHPBB_URL, PHPBB_URL . $images[$key]); } } *************** *** 1310,1314 **** global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme, $current_module_images; global $mx_block, $mx_user; ! //This will keep loaded images $mx3_images = $images; --- 1310,1314 ---- global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme, $current_module_images; global $mx_block, $mx_user; ! //This will keep loaded images $mx3_images = $images; *************** *** 1397,1403 **** $module_key = !empty($module_root_path) ? $module_root_path : 'core'; $this->template_names[$module_key] = $template_name; ! //This will keep loaded images ! $images = &$mx3_images; unset($mx_images); --- 1397,1403 ---- $module_key = !empty($module_root_path) ? $module_root_path : 'core'; $this->template_names[$module_key] = $template_name; ! //This will keep loaded images ! $images = &$mx3_images; unset($mx_images); *************** *** 1555,1564 **** // $this->_init_style(); ! // // Load images // $this->_load_phpbb_images(); ! $this->_load_mxbb_images(); } --- 1555,1564 ---- // $this->_init_style(); ! // // Load images // $this->_load_phpbb_images(); ! $this->_load_mxbb_images(); } Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** mx_functions_admincp.php 6 Oct 2008 13:20:03 -0000 1.62 --- mx_functions_admincp.php 31 Oct 2008 19:02:21 -0000 1.63 *************** *** 15,23 **** } - if( !function_exists('sync') ) - { - include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_admin.' . $phpEx); - } - /**#@+ * AdminCP Class Flags --- 15,18 ---- *************** *** 309,335 **** SELECT " . $next_id . ", parameter_id, parameter_default FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id; ! if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Couldn't insert parameter information", "", __LINE__, __FILE__, $sql); } ! /* ! $sql = "SELECT " . $next_id . ", parameter_id, parameter_default ! FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't insert row in blocks table", "", __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! ! $sql = array( ! 'block_id' => (int) $row['block_id'], ! 'parameter_id' => (int) $row['parameter_id'], ! 'parameter_value' => $row['parameter_value'], ! ); ! ! $result = $db->sql_query("INSERT INTO " . BLOCK_SYSTEM_PARAMETER_TABLE . $db->sql_build_array('INSERT', $sql)); ! */ ! // // Update cache --- 304,313 ---- SELECT " . $next_id . ", parameter_id, parameter_default FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id; ! if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Couldn't insert parameter information", "", __LINE__, __FILE__, $sql); } ! // // Update cache *************** *** 388,392 **** $page_id_new = $row['next_id'] + 1; ! $page_order_new = $row['next_order'] + 1; --- 366,370 ---- $page_id_new = $row['next_id'] + 1; ! $page_order_new = $row['next_order'] + 1; *************** *** 395,399 **** die('Couldn\'t find max page_id'); } ! if( empty($page_order_new) ) { --- 373,377 ---- die('Couldn\'t find max page_id'); } ! if( empty($page_order_new) ) { *************** *** 401,406 **** } - $parents_data = ''; //To do - $page_row = array( "page_id" => (int) $page_id_new, --- 379,382 ---- *************** *** 412,422 **** "page_icon" => $page_icon , "page_alt_icon" => $page_alt_icon, - //"menu_icon" => $menu_icon, - //"menu_alt_icon" => $menu_alt_icon, - //"menu_alt_icon_hot" => $menu_alt_icon_hot, - //"menu_active" => (int) $menu_active, "auth_view" => (int) $auth_view, - //"auth_view_group" => $auth_view_group, - //"auth_moderator_group" => $auth_moderator_group, "default_style" => (int) $default_style, "override_user_style" => (int) $override_user_style, --- 388,392 ---- *************** *** 426,434 **** "navigation_block" => (int) $navigation_block, "ip_filter" => $ipfilter , ! "phpbb_stats" => (int) $phpbb_stats, ); ! $sql = "INSERT INTO " . PAGE_TABLE . $db->sql_build_array('INSERT', $page_row); ! if( !($result = $db->sql_query($sql)) ) { --- 396,404 ---- "navigation_block" => (int) $navigation_block, "ip_filter" => $ipfilter , ! "phpbb_stats" => (int) $phpbb_stats, ); ! $sql = "INSERT INTO " . PAGE_TABLE . $db->sql_build_array('INSERT', $page_row); ! if( !($result = $db->sql_query($sql)) ) { *************** *** 1929,1935 **** { ! // ???? $column_id = $mx_request_vars->get('column_id', MX_TYPE_INT); ! sync('block', $mx_request_vars->get('block_id', MX_TYPE_INT)); $show_index = true; --- 1899,1905 ---- { ! // Not implemented $column_id = $mx_request_vars->get('column_id', MX_TYPE_INT); ! //sync('block', $mx_request_vars->get('block_id', MX_TYPE_INT)); $show_index = true; *************** *** 2258,2284 **** if( $count == 0 ) ! { $sql_add = "INSERT INTO " . BLOCK_SYSTEM_PARAMETER_TABLE . "( block_id, parameter_id, parameter_value ) SELECT " . $block_id . ", " . $sys_param_rows[$p]['parameter_id'] . ", parameter_default FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id . " AND parameter_id = " . $sys_param_rows[$p]['parameter_id']; ! /* ! $sql = "SELECT " . $block_id . ", " . $sys_param_rows[$p]['parameter_id'] . ", parameter_default ! FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id . " AND parameter_id = " . $sys_param_rows[$p]['parameter_id']; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't insert row in blocks table", "", __LINE__, __FILE__, $sql); ! } ! while($row = $db->sql_fetchrow($result)) ! { ! $sql_array = array( ! 'block_id' => (int) $block_id, ! 'parameter_id' => (int) $sys_param_rows[$p]['parameter_id'], ! 'parameter_value' => $row['parameter_value'], ! ); ! } ! $sql_add = "INSERT INTO " . BLOCK_SYSTEM_PARAMETER_TABLE . $db->sql_build_array('INSERT', $sql_array); ! */ ! $result_add = $db->sql_query($sql_add); ! $output_message .= '<br /> + (' . $sys_param_rows[$p]['parameter_name'] . ', ' . $sys_param_rows[$p]['parameter_id'] . ', ' . $block_id . '),'; $output_message .= !$result_add ? '<br /><b><font color=#0000ff>[db...error]</font></b> line: ' . __LINE__ . ' , ' . $sql_add . '<br />' : ''; --- 2228,2238 ---- if( $count == 0 ) ! { $sql_add = "INSERT INTO " . BLOCK_SYSTEM_PARAMETER_TABLE . "( block_id, parameter_id, parameter_value ) SELECT " . $block_id . ", " . $sys_param_rows[$p]['parameter_id'] . ", parameter_default FROM " . PARAMETER_TABLE . " par " . " WHERE function_id = " . $function_id . " AND parameter_id = " . $sys_param_rows[$p]['parameter_id']; ! ! $result_add = $db->sql_query($sql_add); ! $output_message .= '<br /> + (' . $sys_param_rows[$p]['parameter_name'] . ', ' . $sys_param_rows[$p]['parameter_id'] . ', ' . $block_id . '),'; $output_message .= !$result_add ? '<br /><b><font color=#0000ff>[db...error]</font></b> line: ' . __LINE__ . ' , ' . $sql_add . '<br />' : ''; *************** *** 2745,2750 **** // $fcontents = $this->getSafeObjects($fcontents); ! ! $parameter_order = 0; // --- 2699,2704 ---- // $fcontents = $this->getSafeObjects($fcontents); ! ! $parameter_order = 0; // Needed? // *************** *** 2814,2821 **** $fldkey = 'parameter_id'; $key = $module_data[2]; ++$parameter_order; $sql = array( 'function_id' => (int) $module_data[1], ! 'parameter_id' => (int) $module_data[2], 'parameter_name' => stripslashes($module_data[3]), 'parameter_type' => stripslashes($module_data[4]), --- 2768,2779 ---- $fldkey = 'parameter_id'; $key... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:56:25
|
Update of /cvsroot/mxbb/core/modules/mx_users/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6346 Modified Files: admin_groupcp.php admin_prune_user_posts.php admin_prune_users.php admin_userlist.php admin_users.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: admin_groupcp.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_users/admin/admin_groupcp.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_groupcp.php 14 Oct 2008 04:46:52 -0000 1.7 --- admin_groupcp.php 31 Oct 2008 18:56:19 -0000 1.8 *************** *** 55,59 **** $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' '; ! $joined = $phpBB2->create_date($date_format, $row['user_regdate'], $board_config['board_timezone']); $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0; --- 55,59 ---- $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' '; ! $joined = phpBB2::create_date($date_format, $row['user_regdate'], $board_config['board_timezone']); $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0; *************** *** 492,496 **** if ($mx_request_vars->is_post('add')) { ! $username = $mx_request_vars->is_post('username') ? $phpBB2->phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $sql = "SELECT * --- 492,496 ---- if ($mx_request_vars->is_post('add')) { ! $username = $mx_request_vars->is_post('username') ? phpBB2::phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $sql = "SELECT * *************** *** 1083,1087 **** $template->assign_vars(array( ! 'PAGINATION' => $phpBB2->generate_pagination("admin_groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), $current_page ), --- 1083,1087 ---- $template->assign_vars(array( ! 'PAGINATION' => phpBB2::generate_pagination("admin_groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id", $members_count, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), $current_page ), Index: admin_prune_users.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_users/admin/admin_prune_users.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_prune_users.php 14 Oct 2008 04:46:52 -0000 1.5 --- admin_prune_users.php 31 Oct 2008 18:56:19 -0000 1.6 *************** *** 234,239 **** $user_id = $inactive_users[$i]['user_id']; $username = $inactive_users[$i]['username']; ! $user_lastvisit = ( !$inactive_users[$i]['user_lastvisit'] ) ? $lang['Never'] : $phpBB2->create_date($board_config['default_dateformat'], $inactive_users[$i]['user_lastvisit'], $board_config['board_timezone']); ! $user_regdate = ( !$inactive_users[$i]['user_regdate'] ) ? $lang['Never'] : $phpBB2->create_date($board_config['default_dateformat'], $inactive_users[$i]['user_regdate'], $board_config['board_timezone']); $user_active = ( !$inactive_users[$i]['user_active'] ) ? $lang['No'] : $lang['Yes']; $user_posts = $inactive_users[$i]['user_posts']; --- 234,239 ---- $user_id = $inactive_users[$i]['user_id']; $username = $inactive_users[$i]['username']; ! $user_lastvisit = ( !$inactive_users[$i]['user_lastvisit'] ) ? $lang['Never'] : phpBB2::create_date($board_config['default_dateformat'], $inactive_users[$i]['user_lastvisit'], $board_config['board_timezone']); ! $user_regdate = ( !$inactive_users[$i]['user_regdate'] ) ? $lang['Never'] : phpBB2::create_date($board_config['default_dateformat'], $inactive_users[$i]['user_regdate'], $board_config['board_timezone']); $user_active = ( !$inactive_users[$i]['user_active'] ) ? $lang['No'] : $lang['Yes']; $user_posts = $inactive_users[$i]['user_posts']; Index: admin_prune_user_posts.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_users/admin/admin_prune_user_posts.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_prune_user_posts.php 30 Sep 2008 07:04:54 -0000 1.5 --- admin_prune_user_posts.php 31 Oct 2008 18:56:19 -0000 1.6 *************** *** 437,441 **** { // Encode the ip into hexademicals ! $ip = $phpBB2->encode_ip($prune_ip); // Because we will be deleting based on IP's, we will store the encoded IP alone --- 437,441 ---- { // Encode the ip into hexademicals ! $ip = phpBB2::encode_ip($prune_ip); // Because we will be deleting based on IP's, we will store the encoded IP alone *************** *** 460,474 **** case 4: // We will encode the ip into hexademical quads ! $users[]['user_ip'] = $phpBB2->encode_ip($ip_split[0].".".$ip_split[1].".".$ip_split[2].".255"); break; // xxx.xxx.* case 3: // We will encode the ip into hexademical quads again.. ! $users[]['user_ip'] = $phpBB2->encode_ip($ip_split[0].".".$ip_split[1].".255.255"); break; // xxx.* case 2: // We will encode the ip into hexademical quads again again.... ! $users[]['user_ip'] = $phpBB2->encode_ip($ip_split[0].".255.255.255"); break; } --- 460,474 ---- case 4: // We will encode the ip into hexademical quads ! $users[]['user_ip'] = phpBB2::encode_ip($ip_split[0].".".$ip_split[1].".".$ip_split[2].".255"); break; // xxx.xxx.* case 3: // We will encode the ip into hexademical quads again.. ! $users[]['user_ip'] = phpBB2::encode_ip($ip_split[0].".".$ip_split[1].".255.255"); break; // xxx.* case 2: // We will encode the ip into hexademical quads again again.... ! $users[]['user_ip'] = phpBB2::encode_ip($ip_split[0].".255.255.255"); break; } *************** *** 494,498 **** { // let's put it in the big array.. ! $users[]['user_ip'] = $phpBB2->encode_ip($start_range[0].".".$start_range[1].".".$start_range[2].".".$i); } } --- 494,498 ---- { // let's put it in the big array.. ! $users[]['user_ip'] = phpBB2::encode_ip($start_range[0].".".$start_range[1].".".$start_range[2].".".$i); } } Index: admin_users.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_users/admin/admin_users.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_users.php 30 Sep 2008 07:04:55 -0000 1.9 --- admin_users.php 31 Oct 2008 18:56:19 -0000 1.10 *************** *** 272,276 **** } ! $username = $phpBB2->phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)); $email = $mx_request_vars->post('email', MX_TYPE_NO_TAGS); --- 272,276 ---- } ! $username = phpBB2::phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)); $email = $mx_request_vars->post('email', MX_TYPE_NO_TAGS); Index: admin_userlist.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_users/admin/admin_userlist.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_userlist.php 14 Oct 2008 04:46:52 -0000 1.5 --- admin_userlist.php 31 Oct 2008 18:56:19 -0000 1.6 *************** *** 953,958 **** 'I_AVATAR' => $avatar_img, ! 'JOINED' => $phpBB2->create_date('d M Y', $row['user_regdate'], $board_config['board_timezone']), ! 'LAST_ACTIVITY' => ( !empty($row['user_session_time']) ) ? $phpBB2->create_date('d M Y', $row['user_session_time'], $board_config['board_timezone']) : $lang['Never'], 'POSTS' => ( $row['user_posts'] ) ? $row['user_posts'] : 0, --- 953,958 ---- 'I_AVATAR' => $avatar_img, ! 'JOINED' => phpBB2::create_date('d M Y', $row['user_regdate'], $board_config['board_timezone']), ! 'LAST_ACTIVITY' => ( !empty($row['user_session_time']) ) ? phpBB2::create_date('d M Y', $row['user_session_time'], $board_config['board_timezone']) : $lang['Never'], 'POSTS' => ( $row['user_posts'] ) ? $row['user_posts'] : 0, *************** *** 1047,1051 **** $total_members = $total['total']; ! $pagination = $phpBB2->generate_pagination($module_root_path . "admin/admin_userlist.$phpEx?sort=$sort&order=$sort_order&show=$show" . ( ( isset($alphanum) ) ? "&alphanum=$alphanum" : '' ), $total_members, $show, $start); } --- 1047,1051 ---- $total_members = $total['total']; ! $pagination = phpBB2::generate_pagination($module_root_path . "admin/admin_userlist.$phpEx?sort=$sort&order=$sort_order&show=$show" . ( ( isset($alphanum) ) ? "&alphanum=$alphanum" : '' ), $total_members, $show, $start); } |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:56:17
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb3blocks/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6321 Modified Files: mx_functions_display.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mx_functions_display.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb3blocks/includes/mx_functions_display.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_functions_display.php 5 Oct 2008 05:30:32 -0000 1.9 --- mx_functions_display.php 31 Oct 2008 18:56:03 -0000 1.10 *************** *** 33,42 **** global $db, $phpbb_auth, $mx_user, $template; global $phpbb_root_path, $phpEx, $board_config; ! global $mx_request_vars, $phpBB3; $forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array(); $parent_id = $visible_forums = 0; $sql_from = ''; ! // Mark forums read? $mark_read = $mx_request_vars->request('mark', MX_TYPE_NO_TAGS, ''); --- 33,42 ---- global $db, $phpbb_auth, $mx_user, $template; global $phpbb_root_path, $phpEx, $board_config; ! global $mx_request_vars; $forum_rows = $subforums = $forum_ids = $forum_ids_moderator = $forum_moderators = $active_forum_ary = array(); $parent_id = $visible_forums = 0; $sql_from = ''; ! // Mark forums read? $mark_read = $mx_request_vars->request('mark', MX_TYPE_NO_TAGS, ''); *************** *** 404,413 **** } } ! // //This was someting that MX-Publisher template sytsem didn't supported so S_LAST_CAT was introduced fom S_NO_CAT //The template shold be changed allso ;) // ! $template->assign_block_vars('forumrow', array( 'S_IS_CAT' => false, --- 404,413 ---- } } ! // //This was someting that MX-Publisher template sytsem didn't supported so S_LAST_CAT was introduced fom S_NO_CAT //The template shold be changed allso ;) // ! $template->assign_block_vars('forumrow', array( 'S_IS_CAT' => false, *************** *** 428,432 **** 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $mx_user->lang[$folder_alt] . '" />' : '', 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', ! 'LAST_POST_SUBJECT' => $phpBB3->censor_text($last_post_subject), 'LAST_POST_TIME' => $last_post_time, 'LAST_POSTER' => mx_get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), --- 428,432 ---- 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $mx_user->lang[$folder_alt] . '" />' : '', 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '', ! 'LAST_POST_SUBJECT' => phpBB3::censor_text($last_post_subject), 'LAST_POST_TIME' => $last_post_time, 'LAST_POSTER' => mx_get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']), *************** *** 454,458 **** ); } ! $last_catless = $catless; } --- 454,458 ---- ); } ! $last_catless = $catless; } *************** *** 888,892 **** { global $phpbb_auth, $template, $db, $mx_user; ! global $phpbb_root_path, $phpEx, $phpBB3; // Do not display user activity for users having more than 5000 posts... --- 888,892 ---- { global $phpbb_auth, $template, $db, $mx_user; ! global $phpbb_root_path, $phpEx; // Do not display user activity for users having more than 5000 posts... *************** *** 983,987 **** 'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf($mx_user->lang['USER_POST'], 1) : sprintf($mx_user->lang['USER_POSTS'], $active_f_count), 'ACTIVE_FORUM_PCT' => sprintf($l_active_pct, $active_f_pct), ! 'ACTIVE_TOPIC' => $phpBB3->censor_text($active_t_name), 'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($mx_user->lang['USER_POST'], 1) : sprintf($mx_user->lang['USER_POSTS'], $active_t_count), 'ACTIVE_TOPIC_PCT' => sprintf($l_active_pct, $active_t_pct), --- 983,987 ---- 'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf($mx_user->lang['USER_POST'], 1) : sprintf($mx_user->lang['USER_POSTS'], $active_f_count), 'ACTIVE_FORUM_PCT' => sprintf($l_active_pct, $active_f_pct), ! 'ACTIVE_TOPIC' => phpBB3::censor_text($active_t_name), 'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($mx_user->lang['USER_POST'], 1) : sprintf($mx_user->lang['USER_POSTS'], $active_t_count), 'ACTIVE_TOPIC_PCT' => sprintf($l_active_pct, $active_t_pct), *************** *** 1234,1239 **** if (empty($ranks)) { ! global $mx_cache; ! $ranks = $mx_cache->obtain_ranks(); } --- 1234,1239 ---- if (empty($ranks)) { ! global $mx_backend; ! $ranks = $mx_backend->obtain_ranks(); } |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:55:56
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6299 Modified Files: mx_module_defs.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/admin/mx_module_defs.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** mx_module_defs.php 30 Sep 2008 07:04:50 -0000 1.39 --- mx_module_defs.php 31 Oct 2008 18:55:51 -0000 1.40 *************** *** 289,293 **** 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, // DIV Templates. Images from root template folder. $phpBB3->prosilver template 'L_CREATE_MENU' => $lang['Create_menu'], --- 289,293 ---- 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, // DIV Templates. Images from root template folder. phpBB3::prosilver template 'L_CREATE_MENU' => $lang['Create_menu'], |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:55:43
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6255/mx_phpbb2blocks Modified Files: mx_announce.php mx_forum.php mx_last_msg.php mx_statistics.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mx_statistics.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_statistics.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_statistics.php 30 Sep 2008 07:04:52 -0000 1.8 --- mx_statistics.php 31 Oct 2008 18:55:36 -0000 1.9 *************** *** 164,168 **** $firstcount = $user_data[0]['user_posts']; ! $get_db_stats = $phpBB2->get_db_stat( 'postcount' ); for( $i = 0; $i < $user_count; $i++ ) --- 164,168 ---- $firstcount = $user_data[0]['user_posts']; ! $get_db_stats = phpBB2::get_db_stat( 'postcount' ); for( $i = 0; $i < $user_count; $i++ ) *************** *** 248,255 **** // $total_posts = $get_db_stats; //Already queried above ! $total_users = $phpBB2->get_db_stat('usercount'); ! $total_topics = $phpBB2->get_db_stat('topiccount'); ! $start_date = $phpBB2->create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; --- 248,255 ---- // $total_posts = $get_db_stats; //Already queried above ! $total_users = phpBB2::get_db_stat('usercount'); ! $total_topics = phpBB2::get_db_stat('topiccount'); ! $start_date = phpBB2::create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; *************** *** 406,410 **** // Newest user data // ! $newest_userdata = $phpBB2->get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; --- 406,410 ---- // Newest user data // ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; *************** *** 432,441 **** } $row = $db->sql_fetchrow($result); ! $most_users_date = ( $row['config_value'] > 0 ) ? $phpBB2->create_date($board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone']) : $lang['Not_available']; $row = $db->sql_fetchrow($result); $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; $statistic_array = array($lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression']); ! $value_array = array($total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf('%.2f', $boarddays), $dbsize, $avatar_dir_size, $phpBB2->create_date($board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone']), sprintf('<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">' . $newest_user . '</a>'), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled']); // --- 432,441 ---- } $row = $db->sql_fetchrow($result); ! $most_users_date = ( $row['config_value'] > 0 ) ? phpBB2::create_date($board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone']) : $lang['Not_available']; $row = $db->sql_fetchrow($result); $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; $statistic_array = array($lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression']); ! $value_array = array($total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf('%.2f', $boarddays), $dbsize, $avatar_dir_size, phpBB2::create_date($board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone']), sprintf('<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">' . $newest_user . '</a>'), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled']); // Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_last_msg.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_last_msg.php 30 Sep 2008 07:04:51 -0000 1.12 --- mx_last_msg.php 31 Oct 2008 18:55:36 -0000 1.13 *************** *** 351,355 **** if ( $display_date == "TRUE" ) { ! $message_date = $phpBB2->create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); } else --- 351,355 ---- if ( $display_date == "TRUE" ) { ! $message_date = phpBB2::create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); } else Index: mx_announce.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_announce.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_announce.php 30 Sep 2008 07:04:51 -0000 1.11 --- mx_announce.php 31 Oct 2008 18:55:36 -0000 1.12 *************** *** 143,147 **** $poster_id = $postrow[$i]['user_id']; $poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username']; ! $post_date = $phpBB2->create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); $title = $postrow[$i]['topic_title']; --- 143,147 ---- $poster_id = $postrow[$i]['user_id']; $poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username']; ! $post_date = phpBB2::create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']); $title = $postrow[$i]['topic_title']; *************** *** 303,308 **** $replies = $postrow[$i]['topic_replies']; $views = $postrow[$i]['topic_views']; ! $first_post_time = $phpBB2->create_date($board_config['default_dateformat'], $postrow[$i]['topic_time'], $board_config['board_timezone']); ! $last_post_time = $phpBB2->create_date($board_config['default_dateformat'], $postrow[$i]['last_post_time'], $board_config['board_timezone']); $last_post_author = ( $postrow[$i]['id2'] == ANONYMOUS ) ? ( ( $postrow[$i]['post_username2'] != '' ) ? $postrow[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$i]['id2']) . '">' . $postrow[$i]['user2'] . '</a>'; --- 303,308 ---- $replies = $postrow[$i]['topic_replies']; $views = $postrow[$i]['topic_views']; ! $first_post_time = phpBB2::create_date($board_config['default_dateformat'], $postrow[$i]['topic_time'], $board_config['board_timezone']); ! $last_post_time = phpBB2::create_date($board_config['default_dateformat'], $postrow[$i]['last_post_time'], $board_config['board_timezone']); $last_post_author = ( $postrow[$i]['id2'] == ANONYMOUS ) ? ( ( $postrow[$i]['post_username2'] != '' ) ? $postrow[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $postrow[$i]['id2']) . '">' . $postrow[$i]['user2'] . '</a>'; Index: mx_forum.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_forum.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_forum.php 30 Sep 2008 07:04:51 -0000 1.9 --- mx_forum.php 31 Oct 2008 18:55:36 -0000 1.10 *************** *** 73,79 **** // /* ! $total_posts = $phpBB2->get_db_stat('postcount'); ! $total_users = $phpBB2->get_db_stat('usercount'); ! $newest_userdata = $phpBB2->get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; --- 73,79 ---- // /* ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; *************** *** 413,417 **** if ( $forum_data[$j]['forum_last_post_id'] ) { ! $last_post_time = $phpBB2->create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . '<br />'; --- 413,417 ---- if ( $forum_data[$j]['forum_last_post_id'] ) { ! $last_post_time = phpBB2::create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); $last_post = $last_post_time . '<br />'; |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:55:42
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6255/mx_coreblocks Modified Files: mx_online.php mx_search.php mx_site_log.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mx_site_log.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_site_log.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mx_site_log.php 4 Oct 2008 07:04:38 -0000 1.21 --- mx_site_log.php 31 Oct 2008 18:55:36 -0000 1.22 *************** *** 245,249 **** } ! $edit_time = !empty($searchdata['block_time']) ? $phpBB2->create_date($board_config['default_dateformat'], $searchdata['block_time'], $board_config['board_timezone'] ) : ''; $block_editor = '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchdata['block_editor_id']) . '" class="name">'; --- 245,249 ---- } ! $edit_time = !empty($searchdata['block_time']) ? phpBB2::create_date($board_config['default_dateformat'], $searchdata['block_time'], $board_config['board_timezone'] ) : ''; $block_editor = '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchdata['block_editor_id']) . '" class="name">'; Index: mx_online.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_online.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mx_online.php 28 Oct 2008 04:40:16 -0000 1.31 --- mx_online.php 31 Oct 2008 18:55:36 -0000 1.32 *************** *** 81,90 **** { $style_color = ''; ! switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': ! if ( $row['user_level'] == ADMIN ) { --- 81,90 ---- { $style_color = ''; ! switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': ! if ( $row['user_level'] == ADMIN ) { *************** *** 96,106 **** $row['username'] = '<b>' . $row['username'] . '</b>'; $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; ! } ! break; case 'phpbb3': $style_color = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] . '" class="username-coloured"' : ''; ! break; } --- 96,106 ---- $row['username'] = '<b>' . $row['username'] . '</b>'; $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; ! } ! break; case 'phpbb3': $style_color = ($row['user_colour']) ? ' style="color:#' . $row['user_colour'] . '" class="username-coloured"' : ''; ! break; } *************** *** 120,131 **** $logged_visible_online++; } ! else { $user_online_link = ($row['user_type'] != USER_IGNORE) ? mx_get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) : '<span' . $style_color . '>' . $row['username'] . '</span>'; $logged_hidden_online++; ! } break; } ! if ( $row['user_allow_viewonline'] || $mx_user->data['user_level'] == ADMIN ) { --- 120,131 ---- $logged_visible_online++; } ! else { $user_online_link = ($row['user_type'] != USER_IGNORE) ? mx_get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']) : '<span' . $style_color . '>' . $row['username'] . '</span>'; $logged_hidden_online++; ! } break; } ! if ( $row['user_allow_viewonline'] || $mx_user->data['user_level'] == ADMIN ) { *************** *** 269,275 **** // removing them // ! $total_posts = $phpBB2->get_db_stat('postcount'); ! $total_users = $phpBB2->get_db_stat('usercount'); ! $newest_userdata = $phpBB2->get_db_stat('newestuser'); $newest_username = (PORTAL_BACKEND == 'phpbb3') ? $board_config['newest_username'] : $newest_userdata['username']; $newest_uid = (PORTAL_BACKEND == 'phpbb3') ? $board_config['newest_user_id'] : $newest_userdata['user_id']; --- 269,275 ---- // removing them // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_username = (PORTAL_BACKEND == 'phpbb3') ? $board_config['newest_username'] : $newest_userdata['username']; $newest_uid = (PORTAL_BACKEND == 'phpbb3') ? $board_config['newest_user_id'] : $newest_userdata['user_id']; *************** *** 440,444 **** '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'], 'ONLINE_LEGEND' => $legend, --- 440,444 ---- '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'], 'ONLINE_LEGEND' => $legend, Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** mx_search.php 4 Oct 2008 07:04:38 -0000 1.31 --- mx_search.php 31 Oct 2008 18:55:36 -0000 1.32 *************** *** 446,450 **** } ! $edit_time = !empty($searchdata['block_time']) ? '(' . $phpBB2->create_date($board_config['default_dateformat'], $searchdata['block_time'], $board_config['board_timezone'] ) . ')' : ''; $block_editor = '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchdata['block_editor_id']) . '" class="name">'; --- 446,450 ---- } ! $edit_time = !empty($searchdata['block_time']) ? '(' . phpBB2::create_date($board_config['default_dateformat'], $searchdata['block_time'], $board_config['board_timezone'] ) . ')' : ''; $block_editor = '<a href="' . mx_append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchdata['block_editor_id']) . '" class="name">'; *************** *** 477,481 **** $template->assign_vars( array( ! 'PAGINATION' => $phpBB2->generate_pagination( $base_url, $total_match_count, $per_page, $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page ) ), --- 477,481 ---- $template->assign_vars( array( ! 'PAGINATION' => phpBB2::generate_pagination( $base_url, $total_match_count, $per_page, $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page ) ), |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:55:39
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb3blocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6255/mx_phpbb3blocks Modified Files: mx_last_msg.php mx_statistics.php mx_viewforum.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mx_viewforum.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb3blocks/mx_viewforum.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_viewforum.php 4 Oct 2008 07:04:38 -0000 1.6 --- mx_viewforum.php 31 Oct 2008 18:55:36 -0000 1.7 *************** *** 609,613 **** 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $mx_user->format_date($row['topic_time']), ! 'LAST_POST_SUBJECT' => $phpBB3->censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $mx_user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $mx_user->format_date($row['topic_last_view_time']), --- 609,613 ---- 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']), 'FIRST_POST_TIME' => $mx_user->format_date($row['topic_time']), ! 'LAST_POST_SUBJECT' => phpBB3::censor_text($row['topic_last_post_subject']), 'LAST_POST_TIME' => $mx_user->format_date($row['topic_last_post_time']), 'LAST_VIEW_TIME' => $mx_user->format_date($row['topic_last_view_time']), *************** *** 619,623 **** 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], ! 'TOPIC_TITLE' => $phpBB3->censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, --- 619,623 ---- 'REPLIES' => $replies, 'VIEWS' => $row['topic_views'], ! 'TOPIC_TITLE' => phpBB3::censor_text($row['topic_title']), 'TOPIC_TYPE' => $topic_type, Index: mx_statistics.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb3blocks/mx_statistics.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_statistics.php 4 Oct 2008 07:04:38 -0000 1.5 --- mx_statistics.php 31 Oct 2008 18:55:36 -0000 1.6 *************** *** 167,176 **** $firstcount = $user_data[0]['user_posts']; ! $get_db_stats = $phpBB2->get_db_stat( 'postcount' ); for( $i = 0; $i < $user_count; $i++ ) { do_math($firstcount, $user_data[$i]['user_posts'], $get_db_stats, $percentage, $bar_percent); ! $top_poster_profile = mx_get_username_string('full', $user_data[$i]['user_id'], $user_data[$i]['username'], $user_data[$i]['user_colour']); --- 167,176 ---- $firstcount = $user_data[0]['user_posts']; ! $get_db_stats = phpBB2::get_db_stat( 'postcount' ); for( $i = 0; $i < $user_count; $i++ ) { do_math($firstcount, $user_data[$i]['user_posts'], $get_db_stats, $percentage, $bar_percent); ! $top_poster_profile = mx_get_username_string('full', $user_data[$i]['user_id'], $user_data[$i]['username'], $user_data[$i]['user_colour']); *************** *** 179,183 **** "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], "USERNAME" => $user_data[$i]['username'], ! "USERCOLOR" => $user_data[$i]['user_colour'], "PERCENTAGE" => $percentage, "BAR" => $bar_percent, --- 179,183 ---- "CLASS" => ( !( $i + 1 % 2 ) ) ? $theme['td_class2'] : $theme['td_class1'], "USERNAME" => $user_data[$i]['username'], ! "USERCOLOR" => $user_data[$i]['user_colour'], "PERCENTAGE" => $percentage, "BAR" => $bar_percent, *************** *** 255,262 **** // $total_posts = $get_db_stats; //Already queried above ! $total_users = $phpBB2->get_db_stat('usercount'); ! $total_topics = $phpBB2->get_db_stat('topiccount'); ! $start_date = $phpBB2->create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; --- 255,262 ---- // $total_posts = $get_db_stats; //Already queried above ! $total_users = phpBB2::get_db_stat('usercount'); ! $total_topics = phpBB2::get_db_stat('topiccount'); ! $start_date = phpBB2::create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; *************** *** 414,418 **** // Newest user data // ! $newest_userdata = $phpBB2->get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; --- 414,418 ---- // Newest user data // ! $newest_userdata = phpBB2::get_db_stat('newestuser'); $newest_user = $newest_userdata['username']; $newest_uid = $newest_userdata['user_id']; *************** *** 444,453 **** $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); ! $most_users_date = ( $row['config_value'] > 0 ) ? $phpBB2->create_date($board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone']) : $lang['Not_available']; $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; $statistic_array = array($lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression']); ! $value_array = array($total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf('%.2f', $boarddays), $dbsize, $avatar_dir_size, $phpBB2->create_date($board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone']), sprintf($newest_user_profile), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled']); // --- 444,453 ---- $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); ! $most_users_date = ( $row['config_value'] > 0 ) ? phpBB2::create_date($board_config['default_dateformat'], $row['config_value'], $board_config['board_timezone']) : $lang['Not_available']; $most_users = ( $row['config_value'] > 0 ) ? $row['config_value'] : $lang['Not_available']; $statistic_array = array($lang['Number_posts'], $lang['Posts_per_day'], $lang['Number_topics'], $lang['Topics_per_day'], $lang['Number_users'], $lang['Users_per_day'], $lang['Board_started'], $lang['Board_Up_Days'], $lang['Database_size'], $lang['Avatar_dir_size'], $lang['Latest_Reg_User_Date'], $lang['Latest_Reg_User'], $lang['Most_Ever_Online_Date'], $lang['Most_Ever_Online'], $lang['Gzip_compression']); ! $value_array = array($total_posts, $posts_per_day, $total_topics, $topics_per_day, $total_users, $users_per_day, $start_date, sprintf('%.2f', $boarddays), $dbsize, $avatar_dir_size, phpBB2::create_date($board_config['default_dateformat'], $newest_user_date, $board_config['board_timezone']), sprintf($newest_user_profile), $most_users_date, $most_users, ( $board_config['gzip_compress'] ) ? $lang['Enabled'] : $lang['Disabled']); // Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb3blocks/mx_last_msg.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_last_msg.php 4 Oct 2008 07:04:38 -0000 1.5 --- mx_last_msg.php 31 Oct 2008 18:55:36 -0000 1.6 *************** *** 387,391 **** if ($display_date == "TRUE") { ! //$message_date = $phpBB2->create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); $message_date = $mx_user->format_date($postrow[$row_count]['post_time']); $topic_date = $mx_user->format_date($postrow[$row_count]['topic_time']); --- 387,391 ---- if ($display_date == "TRUE") { ! //$message_date = phpBB2::create_date($board_config['default_dateformat'], $postrow[$row_count]['post_time'], $board_config['board_timezone']); $message_date = $mx_user->format_date($postrow[$row_count]['post_time']); $topic_date = $mx_user->format_date($postrow[$row_count]['topic_time']); |
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) { |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:54:48
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb2/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6180 Modified Files: functions.php functions_post.php functions_selects.php functions_validate.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: functions_validate.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions_validate.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_validate.php 4 Oct 2008 07:04:25 -0000 1.3 --- functions_validate.php 31 Oct 2008 18:54:43 -0000 1.4 *************** *** 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.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions.php 4 Oct 2008 07:04:25 -0000 1.5 --- functions.php 31 Oct 2008 18:54:43 -0000 1.6 *************** *** 27,39 **** class phpBB2 { ! /** ! * Constructor ! */ ! function __construct() ! { ! return; ! } ! ! function get_db_stat($mode) { global $db; --- 27,31 ---- class phpBB2 { ! public static function get_db_stat($mode) { global $db; *************** *** 89,97 **** // added at phpBB 2.0.11 to properly format the username ! function phpbb_clean_username($username) { $username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25); ! //$username = $this->phpbb_rtrim($username, "\\"); ! $username = phpBB2::phpbb_rtrim($username, "\\"); // php4 $username = str_replace("'", "\'", $username); --- 81,88 ---- // added at phpBB 2.0.11 to properly format the username ! public static function phpbb_clean_username($username) { $username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25); ! $username = self::phpbb_rtrim($username, "\\"); $username = str_replace("'", "\'", $username); *************** *** 103,107 **** * Added in phpBB 2.0.18 */ ! function phpbb_ltrim($str, $charlist = false) { if ($charlist === false) --- 94,98 ---- * Added in phpBB 2.0.18 */ ! public static function phpbb_ltrim($str, $charlist = false) { if ($charlist === false) *************** *** 129,133 **** // added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0) ! function phpbb_rtrim($str, $charlist = false) { if ($charlist === false) --- 120,124 ---- // added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0) ! public static function phpbb_rtrim($str, $charlist = false) { if ($charlist === false) *************** *** 161,165 **** * Added in phpBB 2.0.20 */ ! function dss_rand() { global $db, $board_config, $dss_seeded; --- 152,156 ---- * Added in phpBB 2.0.20 */ ! public static function dss_rand() { global $db, $board_config, $dss_seeded; *************** *** 188,192 **** // Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced. // ! function get_userdata($user, $force_str = false) { global $db; --- 179,183 ---- // Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced. // ! public static function get_userdata($user, $force_str = false) { global $db; *************** *** 194,199 **** if (!is_numeric($user) || $force_str) { ! $user = $this->phpbb_clean_username($user); ! //$user = phpBB2::phpbb_clean_username($user); // php4 } else --- 185,189 ---- if (!is_numeric($user) || $force_str) { ! $user = self::phpbb_clean_username($user); } else *************** *** 214,218 **** } ! function make_jumpbox($action, $match_forum_id = 0) { global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; --- 204,208 ---- } ! public static function make_jumpbox($action, $match_forum_id = 0) { global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; *************** *** 333,337 **** if ( !empty($userdata['user_lang'])) { ! $default_lang = $this->phpbb_ltrim(basename($this->phpbb_rtrim($userdata['user_lang'])), "'"); } --- 323,327 ---- if ( !empty($userdata['user_lang'])) { ! $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($userdata['user_lang'])), "'"); } *************** *** 348,360 **** else { ! $default_lang = $this->phpbb_ltrim(basename($this->phpbb_rtrim($board_config['default_lang'])), "'"); } ! if ( !file_exists(@$this->phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { if ( $userdata['user_id'] != ANONYMOUS ) { // For logged in users, try the board default language next ! $default_lang = $this->phpbb_ltrim(basename($this->phpbb_rtrim($board_config['default_lang'])), "'"); } else --- 338,350 ---- else { ! $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($board_config['default_lang'])), "'"); } ! if ( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { if ( $userdata['user_id'] != ANONYMOUS ) { // For logged in users, try the board default language next ! $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($board_config['default_lang'])), "'"); } else *************** *** 366,370 **** } ! if ( !file_exists(@$this->phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); --- 356,360 ---- } ! if ( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); *************** *** 405,409 **** if ( defined('IN_ADMIN') ) { ! if( !file_exists(@$this->phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; --- 395,399 ---- if ( defined('IN_ADMIN') ) { ! if( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; *************** *** 522,526 **** } ! $img_lang = ( file_exists(@$this->phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english'; while( list($key, $value) = @each($images) ) --- 512,516 ---- } ! $img_lang = ( file_exists(@self::phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english'; while( list($key, $value) = @each($images) ) *************** *** 537,541 **** */ ! function encode_ip($dotquad_ip) { $ip_sep = explode('.', $dotquad_ip); --- 527,531 ---- */ ! public static function encode_ip($dotquad_ip) { $ip_sep = explode('.', $dotquad_ip); *************** *** 543,547 **** } ! function decode_ip($int_ip) { $hexipbang = explode('.', chunk_split($int_ip, 2, '.')); --- 533,537 ---- } ! public static function decode_ip($int_ip) { $hexipbang = explode('.', chunk_split($int_ip, 2, '.')); *************** *** 552,556 **** // Create date/time from format and timezone // ! function create_date($format, $gmepoch, $tz) { global $board_config, $lang; --- 542,546 ---- // Create date/time from format and timezone // ! public static function create_date($format, $gmepoch, $tz) { global $board_config, $lang; *************** *** 573,577 **** // page number sequence // ! function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE) { global $lang; --- 563,567 ---- // page number sequence // ! public static function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE) { global $lang; *************** *** 670,674 **** // If you just need the 1-parameter preg_quote call, then don't bother using this. // ! function phpbb_preg_quote($str, $delimiter) { $text = preg_quote($str); --- 660,664 ---- // If you just need the 1-parameter preg_quote call, then don't bother using this. // ! public static function phpbb_preg_quote($str, $delimiter) { $text = preg_quote($str); *************** *** 683,687 **** // to return both sets of arrays // ! function obtain_word_list(&$orig_word, &$replacement_word) { global $db; --- 673,677 ---- // to return both sets of arrays // ! public static function obtain_word_list(&$orig_word, &$replacement_word) { global $db; *************** *** 923,927 **** // seem to need this, so we'll just return the original value. // dougk_ff7 <October 5, 2002> ! function phpbb_realpath($path) { global $phpbb_root_path, $phpEx; --- 913,917 ---- // seem to need this, so we'll just return the original value. // dougk_ff7 <October 5, 2002> ! public static function phpbb_realpath($path) { global $phpbb_root_path, $phpEx; *************** *** 930,934 **** } ! function redirect($url) { global $db, $board_config; --- 920,924 ---- } ! public static function redirect($url) { global $db, $board_config; Index: functions_selects.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/functions_selects.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_selects.php 4 Oct 2008 07:04:25 -0000 1.3 --- functions_selects.php 31 Oct 2008 18:54:43 -0000 1.4 *************** *** 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.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions_post.php 4 Oct 2008 07:04:25 -0000 1.5 --- functions_post.php 31 Oct 2008 18:54:43 -0000 1.6 *************** *** 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']); |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:54:31
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6117/internal Modified Files: bbcode.php core.php login.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/login.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** login.php 4 Oct 2008 07:04:25 -0000 1.7 --- login.php 31 Oct 2008 18:54:23 -0000 1.8 *************** *** 17,21 **** if ($mx_request_vars->is_request('login') && (!$userdata['session_logged_in'] || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? $phpBB2->phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); --- 17,21 ---- if ($mx_request_vars->is_request('login') && (!$userdata['session_logged_in'] || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? phpBB2::phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** core.php 4 Oct 2008 07:04:25 -0000 1.13 --- core.php 31 Oct 2008 18:54:23 -0000 1.14 *************** *** 268,272 **** { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx; ! global $phpBB2, $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) --- 268,272 ---- { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx; ! global $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) *************** *** 287,291 **** } ! $s_last_visit = ( $userdata['session_logged_in'] ) ? $phpBB2->create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // --- 287,291 ---- } ! $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // *************** *** 490,494 **** return $sql; } ! /** * Get username details for placing into templates. --- 490,555 ---- return $sql; } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function generate_session_online_sql($guest = false) ! { ! if ($guest) ! { ! $sql = "SELECT * ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = 0 ! AND session_time >= " . ( time() - 300 ) . " ! ORDER BY session_time DESC"; ! } ! else ! { ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE s.session_logged_in = " . TRUE . " ! AND u.user_id = s.session_user_id ! AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY u.user_session_time DESC"; ! } ! return $sql; ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $str_ip ! * @return unknown ! */ ! function decode_ip($str_ip) ! { ! return phpBB2::decode_ip($str_ip); ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function get_phpbb_version() ! { ! return ''; ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function confirm_backend() ! { ! global $portal_config; ! ! return PORTAL_BACKEND == $portal_config['portal_backend']; ! } ! /** * Get username details for placing into templates. *************** *** 502,533 **** * * @return string A string consisting of what is wanted based on $mode. ! */ function get_username_string($mode, $user_id, $username = false, $user_color = false, $guest_username = false, $custom_profile_url = false) { global $lang, $userdata; ! $lang['Guest'] = !$guest_username ? $lang['Guest'] : $guest_username; ! $this_userdata = mx_get_userdata($user_id, false); ! $username = ($username) ? $username : $this_userdata['username']; ! if ($this_userdata['user_level'] == ADMIN) ! { $user_color = $theme['fontcolor3']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; ! } ! else if ($this_userdata['user_level'] == MOD) ! { $user_color = $theme['fontcolor2']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; } ! else ! { $user_colour = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; } ! $profile_url = ''; ! $full_url = (($user_id == ANONYMOUS) || ($user_id == MUSIC_GUEST)) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<span ' . $topic_poster_style . '>' . $username . '</span>'; --- 563,594 ---- * * @return string A string consisting of what is wanted based on $mode. ! */ function get_username_string($mode, $user_id, $username = false, $user_color = false, $guest_username = false, $custom_profile_url = false) { global $lang, $userdata; ! $lang['Guest'] = !$guest_username ? $lang['Guest'] : $guest_username; ! $this_userdata = mx_get_userdata($user_id, false); ! $username = ($username) ? $username : $this_userdata['username']; ! if ($this_userdata['user_level'] == ADMIN) ! { $user_color = $theme['fontcolor3']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; ! } ! else if ($this_userdata['user_level'] == MOD) ! { $user_color = $theme['fontcolor2']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; } ! else ! { $user_colour = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; } ! $profile_url = ''; ! $full_url = (($user_id == ANONYMOUS) || ($user_id == MUSIC_GUEST)) ? '<span ' . $topic_poster_style . '>' . $lang['Guest'] . '</span>' : '<span ' . $topic_poster_style . '>' . $username . '</span>'; *************** *** 550,556 **** return $full_url; break; ! } ! } ! } --- 611,648 ---- return $full_url; break; ! } ! } ! ! // ! // ACP ! // ! /** ! * Enter description here... ! * ! */ ! function load_phpbb_acp_menu() ! { ! ! } ! ! /** ! * Enter description here... ! * ! */ ! function load_forum_stats() ! { ! ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function phpbb_version_check() ! { ! return ''; ! } ! } Index: bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/bbcode.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bbcode.php 4 Oct 2008 07:04:25 -0000 1.1 --- bbcode.php 31 Oct 2008 18:54:23 -0000 1.2 *************** *** 16,34 **** // ! // Here comes a mxp version of original phpbb2 bbcode.php ! // Last in file are the mxp wrapper functions // ! ! define("BBCODE_UID_LEN", 10); ! ! // global that holds loaded-and-prepared bbcode templates, so we only have to do ! // that stuff once. [...1079 lines suppressed...] - 'SMILEY_WIDTH' => $row['smiley_width'], - 'SMILEY_HEIGHT' => $row['smiley_height'], - 'SMILEY_DESC' => $row['emotion']) - ); - } - } - - //What we do here with forum_id versus page_id ? - if ($mode == 'inline' && $display_link) - { - $template->assign_vars(array( - 'S_SHOW_SMILEY_LINK' => true, - 'U_MORE_SMILIES' => mx3_append_sid(PHPBB_URL . "posting.$phpEx", 'mode=smilies&f=' . $forum_id)) - ); - } - */ - if ($mode == 'window') { --- 293,296 ---- |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:54:30
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6117/phpbb2 Modified Files: bbcode.php core.php login.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/login.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** login.php 4 Oct 2008 07:04:25 -0000 1.7 --- login.php 31 Oct 2008 18:54:23 -0000 1.8 *************** *** 17,21 **** if($mx_request_vars->is_request('login') && (!$userdata['session_logged_in'] || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? $phpBB2->phpbb_clean_username($mx_request_vars->post('username')) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); --- 17,21 ---- if($mx_request_vars->is_request('login') && (!$userdata['session_logged_in'] || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? phpBB2::phpbb_clean_username($mx_request_vars->post('username')) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** core.php 4 Oct 2008 07:04:25 -0000 1.18 --- core.php 31 Oct 2008 18:54:23 -0000 1.19 *************** *** 114,125 **** $unauthed = false; ! if (!$auth_mod[$auth_level] && (strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) ! { ! $unauthed = true; ! } ! if (!$auth_level && !$auth_mod['auth_read'] && (strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) ! { ! $unauthed = true; ! } if ($unauthed) { --- 114,125 ---- $unauthed = false; ! if (!$auth_mod[$auth_level] && (strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) ! { ! $unauthed = true; ! } ! if (!$auth_level && !$auth_mod['auth_read'] && (strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) ! { ! $unauthed = true; ! } if ($unauthed) { *************** *** 138,151 **** { $unauthed = true; ! if($auth_level_read && ($is_auth_row[$auth_level_read])) { $unauthed = false; } ! if(strstr($ignore_forum_ids, $forum_id)) { $unauthed = false; ! } if ($unauthed) --- 138,151 ---- { $unauthed = true; ! if($auth_level_read && ($is_auth_row[$auth_level_read])) { $unauthed = false; } ! if(strstr($ignore_forum_ids, $forum_id)) { $unauthed = false; ! } if ($unauthed) *************** *** 153,157 **** $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; } ! } } --- 153,157 ---- $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; } ! } } *************** *** 564,568 **** { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx; ! global $phpBB2, $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) --- 564,568 ---- { global $db, $mx_root_path, $phpbb_root_path, $userdata, $mx_user, $lang, $images, $phpEx; ! global $board_config, $gen_simple_header, $layouttemplate, $mx_page; switch ($mode) *************** *** 583,587 **** } ! $s_last_visit = ( $userdata['session_logged_in'] ) ? $phpBB2->create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // --- 583,587 ---- } ! $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; // *************** *** 785,789 **** return $sql; } ! /** * Get username details for placing into templates. --- 785,852 ---- return $sql; } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function generate_session_online_sql($guest = false) ! { ! if ($guest) ! { ! $sql = "SELECT * ! FROM " . SESSIONS_TABLE . " ! WHERE session_logged_in = 0 ! AND session_time >= " . ( time() - 300 ) . " ! ORDER BY session_time DESC"; ! } ! else ! { ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE s.session_logged_in = " . TRUE . " ! AND u.user_id = s.session_user_id ! AND u.user_id <> " . ANONYMOUS . " ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY u.user_session_time DESC"; ! } ! return $sql; ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $str_ip ! * @return unknown ! */ ! function decode_ip($str_ip) ! { ! return phpBB2::decode_ip($str_ip); ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function get_phpbb_version() ! { ! global $board_config; ! ! return '2' . $board_config['version']; ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function confirm_backend() ! { ! global $portal_config; ! ! return PORTAL_BACKEND == $portal_config['portal_backend']; ! } ! /** * Get username details for placing into templates. *************** *** 801,827 **** { global $lang, $userdata; ! $lang['Guest'] = !$guest_username ? $lang['Guest'] : $guest_username; $this_userdata = mx_get_userdata($user_id, false); ! $username = ($username) ? $username : $this_userdata['username']; ! if ($this_userdata['user_level'] == ADMIN) ! { $user_color = $theme['fontcolor3']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; ! } ! else if ($this_userdata['user_level'] == MOD) ! { $user_color = $theme['fontcolor2']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; } ! else ! { $user_colour = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; } ! // Only show the link if not anonymous if ($user_id && $user_id != ANONYMOUS) --- 864,890 ---- { global $lang, $userdata; ! $lang['Guest'] = !$guest_username ? $lang['Guest'] : $guest_username; $this_userdata = mx_get_userdata($user_id, false); ! $username = ($username) ? $username : $this_userdata['username']; ! if ($this_userdata['user_level'] == ADMIN) ! { $user_color = $theme['fontcolor3']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; ! } ! else if ($this_userdata['user_level'] == MOD) ! { $user_color = $theme['fontcolor2']; ! $user_style = 'style="color:#' . $user_color . '; font-weight : bold;"'; } ! else ! { $user_colour = $theme['fontcolor1']; ! $topic_poster_style = 'style="font-weight : bold;"'; } ! // Only show the link if not anonymous if ($user_id && $user_id != ANONYMOUS) *************** *** 834,839 **** $profile_url = $lang['Guest']; $full_url = $lang['Guest']; ! } ! switch ($mode) { --- 897,902 ---- $profile_url = $lang['Guest']; $full_url = $lang['Guest']; ! } ! switch ($mode) { *************** *** 854,859 **** return $full_url; break; ! } ! } } --- 917,1235 ---- return $full_url; break; ! } ! } ! ! // ! // ACP ! // ! /** ! * Enter description here... ! * ! */ ! function load_phpbb_acp_menu() ! { ! global $phpbb_root_path, $template, $lang, $phpEx, $theme, $userdata, $mx_user; ! ! $module_phpbb = read_admin($phpbb_root_path . 'admin/'); ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'], ! "L_FORUM_INDEX" => $lang['Main_index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum'], ! "U_FORUM_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), ! )); ! ! ksort($module_phpbb); ! ! //+MOD: DHTML Menu for ACP ! $menu_cat_id = 0; ! //-MOD: DHTML Menu for ACP ! ! while( list($cat, $action_array) = each($module_phpbb) ) ! { ! $cat = ( !empty($lang[$cat]) ) ? $lang[$cat] : preg_replace("/_/", " ", $cat); ! ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => count($action_array), ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => $cat) ! ); ! ! ksort($action_array); ! ! $row_count = 0; ! while( list($action, $file) = each($action_array) ) ! { ! $row_color = ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2']; ! ! $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace("/_/", " ", $action); ! ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => $row_count, ! //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => $action, ! "U_ADMIN_MODULE" => mx_append_sid(PHPBB_URL . 'admin/' . $file . ( ( strpos($file, '?') !== false ) ? '&sid=' : '?sid=' ) . $userdata['session_id'])) ! ); ! $row_count++; ! } ! //+MOD: DHTML Menu for ACP ! $menu_cat_id++; ! //-MOD: DHTML Menu for ACP ! } ! } ! ! /** ! * Enter description here... ! * ! */ ! function load_forum_stats() ! { ! global $db, $template, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $lang, $theme, $mx_user, $userdata; ! ! $template->assign_block_vars("forum_stats", array()); ! // ! // Get forum statistics ! // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $total_topics = phpBB2::get_db_stat('topiccount'); ! ! $start_date = phpBB2::create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! ! $avatar_dir_size = 0; ! ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) ! { ! while( $file = @readdir($avatar_dir) ) ! { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; ! } ! else if($avatar_dir_size >= 1024) ! { ! $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; ! } ! else ! { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; ! } ! } ! else ! { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; ! } ! ! if($posts_per_day > $total_posts) ! { ! $posts_per_day = $total_posts; ! } ! ! if($topics_per_day > $total_topics) ! { ! $topics_per_day = $total_topics; ! } ! ! if($users_per_day > $total_users) ! { ! $users_per_day = $total_users; ! } ! ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if($result = $db->sql_query($sql)) ! { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! ! if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) ! { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; ! ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; ! if($result = $db->sql_query($sql)) ! { ! $tabledata_ary = $db->sql_fetchrowset($result); ! ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) ! { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) ! { ! if( $table_prefix != "" ) ! { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! else ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! } ! } // Else we couldn't get the table status. ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else if( preg_match("/^mssql/", SQL_LAYER) ) ! { ! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize ! FROM sysfiles"; ! if( $result = $db->sql_query($sql) ) ! { ! $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! ! $template->assign_vars(array( ! "NUMBER_OF_POSTS" => $total_posts, ! "NUMBER_OF_TOPICS" => $total_topics, ! "NUMBER_OF_USERS" => $total_users, ! "START_DATE" => $start_date, ! "POSTS_PER_DAY" => $posts_per_day, ! "TOPICS_PER_DAY" => $topics_per_day, ! "USERS_PER_DAY" => $users_per_day, ! "AVATAR_DIR_SIZE" => $avatar_dir_size, ! "DB_SIZE" => $dbsize, ! "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) ! ); ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function phpbb_version_check() ! { ! global $board_config, $lang; ! ! $current_phpbb_version = explode('.', '2' . $board_config['version']); ! $minor_phpbb_revision = (int) $current_phpbb_version[2]; ! ! $errno = 0; ! $errstr = $phpbb_version_info = ''; ! ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) ! { ! @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); ! @fputs($fsock, "HOST: www.phpbb.com\r\n"); ! @fputs($fsock, "Connection: close\r\n\r\n"); ! ! $get_info = false; ! while (!@feof($fsock)) ! { ! if ($get_info) ! { ! $phpbb_version_info .= @fread($fsock, 1024); ! } ! else ! { ! if (@fgets($fsock, 1024) == "\r\n") ! { ! $get_info = true; ! } ! } ! } ! @fclose($fsock); ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! $latest_phpbb_head_revision = (int) $phpbb_version_info[0]; ! $latest_phpbb_minor_revision = (int) $phpbb_version_info[2]; ! $latest_phpbb_version = (int) $phpbb_version_info[0] . '.' . (int) $phpbb_version_info[1] . '.' . (int) $phpbb_version_info[2]; ! ! if ($latest_phpbb_head_revision == 2 && $minor_phpbb_revision == $latest_phpbb_minor_revision) ! { ! $phpbb_version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $phpbb_version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_phpbb_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; ! } ! } ! else ! { ! if ($errstr) ! { ! $phpbb_version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; ! } ! } ! ! $phpbb_version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; ! ! return $phpbb_version_info; ! } } Index: bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/bbcode.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bbcode.php 4 Oct 2008 07:04:25 -0000 1.1 --- bbcode.php 31 Oct 2008 18:54:23 -0000 1.2 *************** *** 16,34 **** // ! // Here comes a mxp version of original phpbb2 bbcode.php ! // Last in file are the mxp wrapper functions // ! ! define("BBCODE_UID_LEN", 10); ! ! // global that holds loaded-and-prepared bbcode templates, so we only have to do ! // that stuff once. ! ! $bbcode_tpl = null; ! $bbcode_uid = null; ! ! // Need to initialize the random numbers only ONCE ! mt_srand( (double) microtime() * 1000000); ! /** --- 16,22 ---- // ! // Now load some bbcodes, to be extended for this backend (see below) // ! include_once($mx_root_path . 'includes/mx_functions_bbcode.' . $phpEx); // BBCode associated functions /** *************** *** 36,43 **** * @package MX-Publisher */ ! class mx_bbcode { var $smiley_path_url = ''; var $smiley_root_path = ''; var $smiley_url = 'smile_url'; --- 24,32 ---- * @package MX-Publisher */ ! class mx_bbcode extends bbcode_base { var $smiley_path_url = ''; var $smiley_root_path = ''; + var $smilies_path = ''; var $smiley_url = 'smile_url'; *************** *** 45,765 **** var $emotion = 'emoticon'; ! function mx_bbcode() ! { ! global $phpbb_root_path; ! ! $this->smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed ! $this->smiley_root_path = $phpbb_root_path; //same here ! } ! ! /** ! * Loads bbcode templates from the bbcode.tpl file of the current template set. ! * Creates an array, keys are bbcode names like "b_open" or "url", values ! * are the associated template. ! * Probably pukes all over the place if there's something really screwed ! * with the bbcode.tpl file. ! * ! * Nathan Codding, Sept 26 2001. ! * This a temporary function ! */ ! function load_bbcode_template() ! { ! global $template; ! $tpl_filename = $template->make_filename('bbcode.tpl'); ! $tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename)); ! ! // replace \ with \\ and then ' with \'. ! $tpl = str_replace('\\', '\\\\', $tpl); ! $tpl = str_replace('\'', '\\\'', $tpl); ! ! // strip newlines. ! $tpl = str_replace("\n", '', $tpl); ! ! // Turn template blocks into PHP assignment statements for the values of $bbcode_tpls.. ! $tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl); ! ! $bbcode_tpls = array(); ! ! eval($tpl); ! ! return $bbcode_tpls; ! } ! ! /** ! * Prepares the loaded bbcode templates for insertion into preg_replace() ! * or str_replace() calls in the bbencode_second_pass functions. This ! * means replacing template placeholders with the appropriate preg backrefs ! * or with language vars. NOTE: If you change how the regexps work in ! * bbencode_second_pass(), you MUST change this function. ! * ! * Nathan Codding, Sept 26 2001 ! * ! * This a temporary function ! */ ! function prepare_bbcode_template($bbcode_tpl) ! { ! global $lang; ! ! $bbcode_tpl['olist_open'] = str_replace('{LIST_TYPE}', '\\1', $bbcode_tpl['olist_open']); ! ! $bbcode_tpl['color_open'] = str_replace('{COLOR}', '\\1', $bbcode_tpl['color_open']); ! ! $bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']); ! ! $bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']); ! ! $bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']); ! $bbcode_tpl['quote_username_open'] = str_replace('{L_WROTE}', $lang['wrote'], $bbcode_tpl['quote_username_open']); ! $bbcode_tpl['quote_username_open'] = str_replace('{USERNAME}', '\\1', $bbcode_tpl['quote_username_open']); ! ! $bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']); ! ! $bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']); ! ! // We do URLs in several different ways.. ! $bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']); ! ! $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']); ! ! $bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']); ! ! $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']); ! ! $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); ! ! //Start more bbcode ! $bbcode_tpl['stream'] = str_replace('{URL}', '\\1', $bbcode_tpl['stream']); ! $bbcode_tpl['web'] = str_replace('{URL}', '\\1', $bbcode_tpl['web']); ! $bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']); ! $bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']); ! $bbcode_tpl['flash'] = str_replace('{URL}', '\\3', $bbcode_tpl['flash']); ! $bbcode_tpl['video'] = str_replace('{URL}', '\\3', $bbcode_tpl['video']); ! $bbcode_tpl['video'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['video']); ! $bbcode_tpl['video'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['video']); ! $bbcode_tpl['GVideo'] = str_replace('{GVIDEOID}', '\\1', $bbcode_tpl['GVideo']); ! $bbcode_tpl['GVideo'] = str_replace('{GVIDEOLINK}', $lang['Link'], $bbcode_tpl['GVideo']); ! $bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']); ! $bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['Link'], $bbcode_tpl['youtube']); ! //Stop more bbcode ! ! define("BBCODE_TPL_READY", true); ! ! return $bbcode_tpl; ! } ! ! /** ! * Does second-pass bbencoding. This should be used before displaying the message in ! * a thread. Assumes the message is already first-pass encoded, and we are given the ! * correct UID as used in first-pass encoding. ! * This a temporary function ! */ ! function bbencode_second_pass($text, $uid) ! { ! global $lang, $bbcode_tpl; ! ! $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text); ! ! // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0). ! // This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it. ! $text = " " . $text; ! ! // First: If there isn't a "[" and a "]" in the message, don't bother. ! if (! (strpos($text, "[") && strpos($text, "]")) ) ! { ! // Remove padding, return. ! $text = substr($text, 1); ! return $text; ! } ! ! // Only load the templates ONCE.. ! if (!defined("BBCODE_TPL_READY")) ! { ! // load templates from file into array. ! $bbcode_tpl = $this->load_bbcode_template(); ! ! // prepare array for use in regexps. ! $bbcode_tpl = $this->prepare_bbcode_template($bbcode_tpl); ! } ! ! // [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts. ! $text = $this->bbencode_second_pass_code($text, $uid, $bbcode_tpl); ! ! // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. ! $text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text); ! $text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text); ! ! // New one liner to deal with opening quotes with usernames... ! // replaces the two line version that I had here before.. ! $text = preg_replace("/\[quote:$uid=\"(.*?)\"\]/si", $bbcode_tpl['quote_username_open'], $text); ! ! // [list] and [list=x] for (un)ordered lists. ! // unordered lists ! $text = str_replace("[list:$uid]", $bbcode_tpl['ulist_open'], $text); ! // li tags ! $text = str_replace("[*:$uid]", $bbcode_tpl['listitem'], $text); ! // ending tags ! $text = str_replace("[/list:u:$uid]", $bbcode_tpl['ulist_close'], $text); ! $text = str_replace("[/list:o:$uid]", $bbcode_tpl['olist_close'], $text); ! // Ordered lists ! $text = preg_replace("/\[list=([a1]):$uid\]/si", $bbcode_tpl['olist_open'], $text); ! ! // colours ! $text = preg_replace("/\[color=(\#[0-9A-F]{6}|[a-z]+):$uid\]/si", $bbcode_tpl['color_open'], $text); ! $text = str_replace("[/color:$uid]", $bbcode_tpl['color_close'], $text); ! ! // size ! $text = preg_replace("/\[size=([1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text); ! $text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text); ! ! // [b] and [/b] for bolding text. ! $text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text); ! $text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text); ! ! // [u] and [/u] for underlining text. ! $text = str_replace("[u:$uid]", $bbcode_tpl['u_open'], $text); ! $text = str_replace("[/u:$uid]", $bbcode_tpl['u_close'], $text); ! ! // [i] and [/i] for italicizing text. ! $text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); ! $text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text); ! ! //$text = str_replace('url:' . $uid, 'url', $text); ! ! // Patterns and replacements for URL and email tags.. ! $patterns = array(); ! $replacements = array(); ! ! // [img]image_url_here[/img] code.. ! // This one gets first-passed.. ! $patterns[] = "#\[img:$uid\]([^?](?:[^\[]+|\[(?!url))*?)\[/img:$uid\]#i"; ! $replacements[] = $bbcode_tpl['img']; ! ! // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url1']; ! ! // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url2']; ! ! // [url=xxxx://www.phpbb.com]phpBB[/url] code.. ! $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url3']; ! ! // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url4']; ! ! // [email]us...@do...[/email] code.. ! $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; ! $replacements[] = $bbcode_tpl['email']; ! ! //Strat more bbcode ! ! // [stream]Sound URL[/stream] code.. ! $patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si"; ! $replacements[] = $bbcode_tpl['stream']; ! ! // [flash width=X height=X]Flash URL[/flash] code.. ! $patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/flash:$uid\]#si"; ! $replacements[] = $bbcode_tpl['flash']; ! ! // [video width=X height=X]Video URL[/video] code.. ! $patterns[] = "#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/video:$uid\]#si"; ! $replacements[] = $bbcode_tpl['video']; ! $text = preg_replace($patterns, $replacements, $text); ! ! // [GVideo]GVideo URL[/GVideo] code.. ! $patterns[] = "#\[GVideo\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\?docid=([0-9A-Za-z-_]*)[^[]*\[/GVideo\]#is"; ! $replacements[] = $bbcode_tpl['GVideo']; ! ! // [youtube]YouTube URL[/youtube] code.. ! $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is"; ! $replacements[] = $bbcode_tpl['youtube']; ! ! //Stop more bbcode ! ! $text = preg_replace($patterns, $replacements, $text); ! ! // Remove the uid from tags that have not been transformed into HTML ! //$text = str_replace(':' . $uid, '', $text); ! ! // Remove our padding from the string.. ! $text = substr($text, 1); ! ! return $text; ! ! } // bbencode_second_pass() ! ! /** ! * This is used to change a [*] tag into a [*:$uid] tag as part ! * of the first-pass bbencoding of [list] tags. It fits the ! * standard required in order to be passed as a variable ! * function into bbencode_first_pass_pda(). ! */ ! function replace_listitems($text, $uid) ! { ! $text = str_replace("[*]", "[*:$uid]", $text); ! ! return $text; ! } ! ! function make_bbcode_uid() ! { ! global $mx_backend; ! // Unique ID for this message.. ! ! $uid = $mx_backend->dss_rand(); ! ! // BBCode UID length fix ! @define('BBCODE_UID_LEN', (PORTAL_BACKEND == 'phpbb3') ? 8 : 10); ! ! $uid = substr($uid, 0, BBCODE_UID_LEN); ! ! return $uid; ! } ! ! function bbencode_first_pass($text, $uid) ! { ! // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0). ! // This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it. ! $text = " " . $text; ! ! // [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts. ! $text = $this->bbencode_first_pass_pda($text, $uid, '[code]', '[/code]', '', true, ''); ! ! // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. ! $text = $this->bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, ''); ! $text = $this->bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\"(.*?)\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\"\\1\\\"]"); ! ! // [list] and [list=x] for (un)ordered lists. ! $open_tag = array(); ! $open_tag[0] = "[list]"; ! ! // unordered.. ! $text = $this->bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:u]", false, 'replace_listitems'); ! ! $open_tag[0] = "[list=1]"; ! $open_tag[1] = "[list=a]"; ! ! // ordered. ! $text = $this->bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems'); ! ! // [color] and [/color] for setting text color ! $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); ! ! // [size] and [/size] for setting text size ! $text = preg_replace("#\[size=([1-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); ! ! // [b] and [/b] for bolding text. ! $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text); ! ! // [u] and [/u] for underlining text. ! $text = preg_replace("#\[u\](.*?)\[/u\]#si", "[u:$uid]\\1[/u:$uid]", $text); ! ! // [i] and [/i] for italicizing text. ! $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); ! ! // [img]image_url_here[/img] code.. ! $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); ! ! //Start more bbcode ! $text = str_replace('url:' . $uid, 'url', $text); ! ! // [stream]Sound URL[/stream] code.. ! $text = preg_replace("#\[stream\](.*?)\[/stream\]#si", "[stream:$uid]\\1[/stream:$uid]", $text); ! ! // [flash width=X height=X]Flash URL[/flash] code.. ! $text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2:$uid\]\\3[/flash:$uid]", $text); ! ! // [video width=X height=X]Video URL[/video] code.. ! $text = preg_replace("#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/video\]#si","[video width=\\1 height=\\2:$uid\]\\3[/video:$uid]", $text); ! ! //Stop more bbcode ! ! // Remove our padding from the string.. ! return substr($text, 1);; ! ! } // bbencode_first_pass() ! ! /** ! * $text - The text to operate on. ! * $uid - The UID to add to matching tags. ! * $open_tag - The opening tag to match. Can be an array of opening tags. ! * $close_tag - The closing tag to match. ! * $close_tag_new - The closing tag to replace with. ! * $mark_lowest_level - boolean - should we specially mark the tags that occur ! * at the lowest level of nesting? (useful for [code], because ! * we need to match these tags first and transform HTML tags ! * in their contents.. ! * $func - This variable should contain a string that is the name of a function. ! * That function will be called when a match is found, and passed 2 ! * parameters: ($text, $uid). The function should return a string. ! * This is used when some transformation needs to be applied to the ! * text INSIDE a pair of matching tags. If this variable is FALSE or the ! * empty string, it will not be executed. ! * If open_tag is an array, then the pda will try to match pairs consisting of ! * any element of open_tag followed by close_tag. This allows us to match things ! * like [list=A]...[/list] and [list=1]...[/list] in one pass of the PDA. ! * ! * NOTES: - this function assumes the first character of $text is a space. ! * - every opening tag and closing tag must be of the [...] format. ! */ ! function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func, $open_regexp_replace = false) ! { ! $open_tag_count = 0; ! ! if (!$close_tag_new || ($close_tag_new == '')) ! { ! $close_tag_new = $close_tag; ! } ! ! $close_tag_length = strlen($close_tag); ! $close_tag_new_length = strlen($close_tag_new); ! $uid_length = strlen($uid); ! ! $use_function_pointer = ($func && ($func != '')); ! ! $stack = array(); ! ! if (is_array($open_tag)) ! { ! if (0 == count($open_tag)) ! { ! // No opening tags to match, so return. ! return $text; ! } ! $open_tag_count = count($open_tag); ! } ! else ! { ! // only one opening tag. make it into a 1-element array. ! $open_tag_temp = $open_tag; ! $open_tag = array(); ! $open_tag[0] = $open_tag_temp; ! $open_tag_count = 1; ! } ! ! $open_is_regexp = false; ! ! if ($open_regexp_replace) ! { ! $open_is_regexp = true; ! if (!is_array($open_regexp_replace)) ! { ! $open_regexp_temp = $open_regexp_replace; ! $open_regexp_replace = array(); ! $open_regexp_replace[0] = $open_regexp_temp; ! } ! } ! ! if ($mark_lowest_level && $open_is_regexp) ! { ! mx_message_die(GENERAL_ERROR, "Unsupported operation for bbcode_first_pass_pda()."); ! } ! ! // Start at the 2nd char of the string, looking for opening tags. ! $curr_pos = 1; ! while ($curr_pos && ($curr_pos < strlen($text))) ! { ! $curr_pos = strpos($text, "[", $curr_pos); ! ! // If not found, $curr_pos will be 0, and the loop will end. ! if ($curr_pos) ! { ! // We found a [. It starts at $curr_pos. ! // check if it's a starting or ending tag. ! $found_start = false; ! $which_start_tag = ""; ! $start_tag_index = -1; ! ! for ($i = 0; $i < $open_tag_count; $i++) ! { ! // Grab everything until the first "]"... ! $possible_start = substr($text, $curr_pos, strpos($text, ']', $curr_pos + 1) - $curr_pos + 1); ! ! // ! // We're going to try and catch usernames with "[' characters. ! // ! if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) ) ! { ! // OK we are in a quote tag that probably contains a ] bracket. ! // Grab a bit more of the string to hopefully get all of it.. ! if ($close_pos = strpos($text, '"]', $curr_pos + 14)) ! { ! if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false) ! { ! $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7); ! } ! } ! } ! ! // Now compare, either using regexp or not. ! if ($open_is_regexp) ! { ! $match_result = array(); ! if (preg_match($open_tag[$i], $possible_start, $match_result)) ! { ! $found_start = true; ! $which_start_tag = $match_result[0]; ! $start_tag_index = $i; ! break; ! } ! } ! else ! { ! // straightforward string comparison. ! if (0 == strcasecmp($open_tag[$i], $possible_start)) ! { ! $found_start = true; ! $which_start_tag = $open_tag[$i]; ! $start_tag_index = $i; ! break; ! } ! } ! } ! ! if ($found_start) ! { ! // We have an opening tag. ! // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right. ! $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index); ! array_push($stack, $match); ! // ! // Rather than just increment $curr_pos ! // Set it to the ending of the tag we just found ! // Keeps error in nested tag from breaking out ! // of table structure.. ! // ! $curr_pos += strlen($possible_start); ! } ! else ! { ! // check for a closing tag.. ! $possible_end = substr($text, $curr_pos, $close_tag_length); ! if (0 == strcasecmp($close_tag, $possible_end)) ! { ! // We have an ending tag. ! // Check if we've already found a matching starting tag. ! if (sizeof($stack) > 0) ! { ! // There exists a starting tag. ! $curr_nesting_depth = sizeof($stack); ! // We need to do 2 replacements now. ! $match = array_pop($stack); ! $start_index = $match['pos']; ! $start_tag = $match['tag']; ! $start_length = strlen($start_tag); ! $start_tag_index = $match['index']; ! ! if ($open_is_regexp) ! { ! $start_tag = preg_replace($open_tag[$start_tag_index], $open_regexp_replace[$start_tag_index], $start_tag); ! } ! ! // everything before the opening tag. ! $before_start_tag = substr($text, 0, $start_index); ! ! // everything after the opening tag, but before the closing tag. ! $between_tags = substr($text, $start_index + $start_length, $curr_pos - $start_index - $start_length); ! ! // Run the given function on the text between the tags.. ! if ($use_function_pointer) ! { ! $between_tags = $this->$func($between_tags, $uid); ! } ! ! // everything after the closing tag. ! $after_end_tag = substr($text, $curr_pos + $close_tag_length); ! ! // Mark the lowest nesting level if needed. ! if ($mark_lowest_level && ($curr_nesting_depth == 1)) ! { ! if ($open_tag[0] == '[code]') ! { ! $code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#'); ! $code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}'); ! $between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags); ! } ! $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]"; ! $text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]"; ! } ! else ! { ! if ($open_tag[0] == '[code]') ! { ! $text = $before_start_tag . '[code]'; ! $text .= $between_tags . '[/code]'; ! } ! else ! { ! if ($open_is_regexp) ! { ! $text = $before_start_tag . $start_tag; ! } ! else ! { ! $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]"; ! } ! $text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]"; ! } ! } ! ! $text .= $after_end_tag; ! ! // Now.. we've screwed up the indices by changing the length of the string. ! // So, if there's anything in the stack, we want to resume searching just after it. ! // otherwise, we go back to the start. ! if (sizeof($stack) > 0) ! { ! $match = array_pop($stack); ! $curr_pos = $match['pos']; ! // bbcode_array_push($stack, $match); ! // ++$curr_pos; ! } ! else ! { ! $curr_pos = 1; ! } ! } ! else ! { ! // No matching start tag found. Increment pos, keep going. ! ++$curr_pos; ! } ! } ! else ! { ! // No starting tag or ending tag.. Increment pos, keep looping., ! ++$curr_pos; ! } ! } ! } ! } // while ! return $text; ! } // bbencode_first_pass_pda() ! /** ! * Does second-pass bbencoding of the [code] tags. This includes ! * running htmlspecialchars() over the text contained between ! * any pair of [code] tags that are at the first level of ! * nesting. Tags at the first level of nesting are indicated ! * by this format: [code:1:$uid] ... [/code:1:$uid] ! * Other tags are in this format: [code:$uid] ... [/code:$uid] ! * This a temporary function ! */ ! function bbencode_second_pass_code($text, $uid, $bbcode_tpl) { ! global $lang; ! ! $code_start_html = $bbcode_tpl['code_open']; ! $code_end_html = $bbcode_tpl['code_close']; ! ! // First, do all the 1st-level matches. These need an htmlspecialchars() run, ! // so they have to be handled differently. ! $match_count = preg_match_all("#\[code:1:$uid\](.*?)\[/code:1:$uid\]#si", $text, $matches); ! for ($i = 0; $i < $match_count; $i++) { ! $before_replace = $matches[1][$i]; ! $after_replace = $matches[1][$i]; ! ! // Replace 2 spaces with " " so non-tabbed code indents without making huge long lines. ! $after_replace = str_replace(" ", " ", $after_replace); ! // now Replace 2 spaces with " " to catch odd #s of spaces. ! $after_replace = str_replace(" ", " ", $after_replace); ! ! // Replace tabs with " " so tabbed code indents sorta right without making huge long lines. ! $after_replace = str_replace("\t", " ", $after_replace); ! ! // now Replace space occurring at the beginning of a line ! $after_replace = preg_replace("/^ {1}/m", ' ', $after_replace); ! ! $str_to_match = "[code:1:$uid]" . $before_replace . "[/code:1:$uid]"; ! ! $replacement = $code_start_html; ! $replacement .= $after_replace; ! $replacement .= $code_end_html; ! ! $text = str_replace($str_to_match, $replacement, $text); } ! // Now, do all the non-first-level matches. These are simple. ! $text = str_replace("[code:$uid]", $code_start_html, $text); ! $text = str_replace("[/code:$uid]", $code_end_html, $text); ! ! return $text; ! ! } // bbencode_second_pass_code() ! ! //phpBB Temporary code ends ! ! /** ! * Rewritten by Nathan Codding - Feb 6, 2001. ! * - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> tag linking ! * to that URL ! * - Goes through the given string, and replaces www.xxxx.yyyy[zzzz] with an HTML <a> tag linking ! * to http://www.xxxx.yyyy[/zzzz] ! * - Goes through the given string, and replaces xxxx@yyyy with an HTML mailto: tag linking ! * to that email address ! * - Only matches these 2 patterns either after a space, or at the beginning of a line ! * ! * Notes: the email one might get annoying - it's easy to make it more restrictive, though.. maybe ! * have it require something like xx...@yy... or such. We'll see. ! * We can add here more phpBB3 stuff in time - Ory ! */ ! function make_clickable($text) ! { ! $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text); ! ! // pad it with a space so we can match things at the start of the 1st line. ! $ret = ' ' . $text; ! ! // matches an "xxxx://yyyy" URL at the start of a line, or after a space. ! // xxxx can only be alpha characters. ! // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret); ! ! // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing ! // Must contain at least 2 dots. xxxx contains either alphanum, or "-" ! // zzzz is optional.. will contain everything up to the first space, newline, ! // comma, double quote or <. ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); ! ! // matches an email@domain type address at the start of a line, or after a space. ! // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". ! $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); ! ! // Remove our padding.. ! $ret = substr($ret, 1); ! ! return($ret); ! } ! ! /** ! * Nathan Codding - Feb 6, 2001 ! * Reverses the effects of make_clickable(), for use in editpost. ! * - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs. ! * ! */ ! function undo_make_clickable($text) ! { ! $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\" target=\"_blank\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text); ! $text = preg_replace("#<!-- BBcode auto-mailto start --><a href=\"mailto:(.*?)\">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text); ! ! return $text; } - // - // MXP Wrapper - // - /** * bbcode to html. --- 34,63 ---- var $emotion = 'emoticon'; ! var $bbcode_uid = ''; ! var $bbcode_bitfield = ''; ! var $bbcode_cache = array(); ! var $bbcode_template = array(); ! var $bbcodes = array(); ! var $template_bitfield; ! var $template_filename = ''; ! function mx_bbcode($bitfield = '') { ! global $board_config, $phpbb_root_path; ! if ($bitfield) { ! $this->bbcode_bitfield = $bitfield; ! $this->bbcode_cache_init(); } ! $this->smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed ! $this->smiley_root_path = $phpbb_root_path; //same here + $this->smilies_path = str_replace("//", "/", $board_config['smilies_path']); } /** * bbcode to html. *************** *** 789,861 **** } - /** - * phpBB Smilies pass. - * - * Hacking smilies_pass from phpbb/includes/bbcode.php - * - * @param string $message - * @return string - * - */ - function smilies_pass($message) - { - static $orig, $repl; - global $board_config, $mx_root_path, $phpbb_root_path, $phpEx; - - if (!isset($orig)) - { - global $db; - $orig = $repl = array(); - - $sql = 'SELECT * FROM ' . SMILIES_TABLE; - if( !$result = $db->sql_query($sql) ) - { - mx_message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql); - } - - $smilies = $db->sql_fetchrowset($result); - - if (count($smilies)) - { - @usort($smilies, 'smiley_sort'); - } - - for ($i = 0; $i < count($smilies); $i++) - { - $orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; - $repl[] = '<img src="' . $this->smiley_path_url . $board_config['smilies_path'] . '/' . $smilies[$i][$this->smiley_url] . '" alt="' . $smilies[$i][$this->emotion] . '" border="0" />'; - } - } - - if (count($orig)) - { - $message = preg_replace($orig, $repl, ' ' . $message . ' '); - $message = substr($message, 1, -1); - } - - return $message; - } - - /** - * phpBB Smilies pass. - * - * Hacking smilies_pass from phpbb/includes/bbcode.php - * - * NOTE: This is only kept for reference - not used. - * - * @param string $message - * @return string - */ - function mx_smilies_pass_old($message) - { - global $mx_page, $board_config, $phpbb_root_path, $phpEx; - - $smilies_path = $board_config['smilies_path']; - $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; - $message = smilies_pass($message); - $board_config['smilies_path'] = $smilies_path; - return $message; - } - // // This function will prepare a posted message for --- 87,90 ---- *************** *** 907,911 **** } ! //Core BBCode Starts /** * Generate smilies. --- 136,187 ---- } ! /** ! * phpBB Smilies pass. ! * ! * Hacking smilies_pass from phpbb/includes/bbcode.php ! * ! * @param string $message ! * @return string ! * ! */ ! function smilies_pass($message) ! { ! static $orig, $repl; ! global $board_config, $mx_root_path, $phpbb_root_path, $phpEx; ! ! if (!isset($orig)) ! { ! global $db; ! $orig = $repl = array(); ! ! $sql = 'SELECT * FROM ' . SMILIES_TABLE; ! if( !$result = $db->sql_query($sql) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql); ! } ! ! $smilies = $db->sql_fetchrowset($result); ! ! if (count($smilies)) ! { ! @usort($smilies, 'smiley_sort'); ! } ! ! for ($i = 0; $i < count($smilies); $i++) ! { ! $orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; ! $repl[] = '<img src="' . $this->smiley_path_url . $board_config['smilies_path'] . '/' . $smilies[$i][$this->smiley_url] . '" alt="' . $smilies[$i][$this->emotion] . '" border="0" />'; ! } ! } ! ! if (count($orig)) ! { ! $message = preg_replace($orig, $repl, ' ' . $message . ' '); ! $message = substr($message, 1, -1); ! } ! ! return $message; ! } ! /** * Generate smilies. |
|
From: Jon O. <jon...@us...> - 2008-10-31 18:54:30
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6117/phpbb3 Modified Files: bbcode.php constants.php core.php login.php session.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: login.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/login.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** login.php 9 Oct 2008 18:31:28 -0000 1.8 --- login.php 31 Oct 2008 18:54:23 -0000 1.9 *************** *** 17,21 **** if($mx_request_vars->is_request('login') && ($userdata['user_id'] == ANONYMOUS || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? $phpBB2->phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); --- 17,21 ---- if($mx_request_vars->is_request('login') && ($userdata['user_id'] == ANONYMOUS || $mx_request_vars->is_post('admin')) ) { ! $username = $mx_request_vars->is_post('username') ? phpBB2::phpbb_clean_username($mx_request_vars->post('username', MX_TYPE_NO_TAGS)) : ''; $password = $mx_request_vars->post('password', MX_TYPE_NO_TAGS); *************** *** 63,67 **** $password_new_format = ''; ! $phpBB3->set_var($password_new_format, stripslashes($password_old_format), 'string'); //mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", $password_new_format, ''); --- 63,67 ---- $password_new_format = ''; ! phpBB3::set_var($password_new_format, stripslashes($password_old_format), 'string'); //mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", $password_new_format, ''); *************** *** 78,82 **** if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password']) { ! $hash = $phpBB3->phpbb_hash($password_new_format); // Update the password in the users table to the new format and remove user_pass_convert flag --- 78,82 ---- if (md5($password_old_format) == $row['user_password'] || md5(utf8_to_cp1252($password_old_format)) == $row['user_password']) { ! $hash = phpBB3::phpbb_hash($password_new_format); // Update the password in the users table to the new format and remove user_pass_convert flag *************** *** 105,109 **** ); } ! } } else --- 105,109 ---- ); } ! } } else *************** *** 113,117 **** $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format; $password_new_format = ''; ! $phpBB3->set_var($password_new_format, stripslashes($password_old_format), 'string'); //mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", $password_new_format, ''); --- 113,117 ---- $password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format; $password_new_format = ''; ! phpBB3::set_var($password_new_format, stripslashes($password_old_format), 'string'); //mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", $password_new_format, ''); *************** *** 123,129 **** include_once($mx_root_path . 'includes/utf/data/recode_basic.' . $phpEx); } ! // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding ! if (md5($password_old_format) == $row['user_password'] || md5($password) == $row['user_password'] || $phpBB3->phpbb_check_hash($password, $row['user_password'])) { $autologin = $mx_request_vars->is_post('autologin'); --- 123,129 ---- include_once($mx_root_path . 'includes/utf/data/recode_basic.' . $phpEx); } ! // cp1252 is phpBB2's default encoding, characters outside ASCII range might work when converted into that encoding ! if (md5($password_old_format) == $row['user_password'] || md5($password) == $row['user_password'] || phpBB3::phpbb_check_hash($password, $row['user_password'])) { $autologin = $mx_request_vars->is_post('autologin'); *************** *** 131,135 **** $mx_user->session_create($row['user_id'], $admin, $autologin, $viewonline = true); $session_id = $mx_user->session_id; ! // Reset login tries --- 131,135 ---- $mx_user->session_create($row['user_id'], $admin, $autologin, $viewonline = true); $session_id = $mx_user->session_id; ! // Reset login tries *************** *** 175,179 **** } // Check password ... ! if (!$row['user_pass_convert'] && $phpBB3->phpbb_check_hash($password, $row['user_password'])) { if ($row['user_login_attempts'] != 0) --- 175,179 ---- } // Check password ... ! if (!$row['user_pass_convert'] && phpBB3::phpbb_check_hash($password, $row['user_password'])) { if ($row['user_login_attempts'] != 0) *************** *** 202,206 **** mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__); } ! } } } --- 202,206 ---- mx_message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__); } ! } } } Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** core.php 28 Oct 2008 04:48:26 -0000 1.17 --- core.php 31 Oct 2008 18:54:23 -0000 1.18 *************** *** 712,723 **** } else ! { if (!defined('CONFIG_TABLE')) { global $table_prefix, $mx_root_path, $phpEx; ! include($mx_root_path . 'includes/sessions/phpbb3/constants.' . $phpEx); } ! $sql = "SELECT * FROM " . CONFIG_TABLE; --- 712,723 ---- } else ! { if (!defined('CONFIG_TABLE')) { global $table_prefix, $mx_root_path, $phpEx; ! include($mx_root_path . 'includes/sessions/phpbb3/constants.' . $phpEx); } ! $sql = "SELECT * FROM " . CONFIG_TABLE; *************** *** 751,754 **** --- 751,959 ---- /** + * Obtain ranks + */ + function obtain_ranks() + { + global $mx_cache; + + if (($ranks = $mx_cache->get('_ranks')) === false) + { + global $db; + + $sql = 'SELECT * + FROM ' . RANKS_TABLE . ' + ORDER BY rank_min DESC'; + $result = $db->sql_query($sql); + + $ranks = array(); + while ($row = $db->sql_fetchrow($result)) + { + if ($row['rank_special']) + { + $ranks['special'][$row['rank_id']] = array( + 'rank_title' => $row['rank_title'], + 'rank_image' => $row['rank_image'] + ); + } + else + { + $ranks['normal'][] = array( + 'rank_title' => $row['rank_title'], + 'rank_min' => $row['rank_min'], + 'rank_image' => $row['rank_image'] + ); + } + } + $db->sql_freeresult($result); + + $mx_cache->put('_ranks', $ranks); + } + + return $ranks; + } + + /** + * Obtain allowed extensions + * + * @param mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations. + * + * @return array allowed extensions array. + */ + function obtain_attach_extensions($forum_id) + { + global $mx_cache; + + if (($extensions = $mx_cache->get('_extensions')) === false) + { + global $db; + + $extensions = array( + '_allowed_post' => array(), + '_allowed_pm' => array(), + ); + + // The rule is to only allow those extensions defined. ;) + $sql = 'SELECT e.extension, g.* + FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g + WHERE e.group_id = g.group_id + AND (g.allow_group = 1 OR g.allow_in_pm = 1)'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $extension = strtolower(trim($row['extension'])); + + $extensions[$extension] = array( + 'display_cat' => (int) $row['cat_id'], + 'download_mode' => (int) $row['download_mode'], + 'upload_icon' => trim($row['upload_icon']), + 'max_filesize' => (int) $row['max_filesize'], + 'allow_group' => $row['allow_group'], + 'allow_in_pm' => $row['allow_in_pm'], + ); + + $allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array(); + + // Store allowed extensions forum wise + if ($row['allow_group']) + { + $extensions['_allowed_post'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums; + } + + if ($row['allow_in_pm']) + { + $extensions['_allowed_pm'][$extension] = 0; + } + } + $db->sql_freeresult($result); + + $mx_cache->put('_extensions', $extensions); + } + + // Forum post + if ($forum_id === false) + { + // We are checking for private messages, therefore we only need to get the pm extensions... + $return = array('_allowed_' => array()); + + foreach ($extensions['_allowed_pm'] as $extension => $check) + { + $return['_allowed_'][$extension] = 0; + $return[$extension] = $extensions[$extension]; + } + + $extensions = $return; + } + else if ($forum_id === true) + { + return $extensions; + } + else + { + $forum_id = (int) $forum_id; + $return = array('_allowed_' => array()); + + foreach ($extensions['_allowed_post'] as $extension => $check) + { + // Check for allowed forums + if (is_array($check)) + { + $allowed = (!in_array($forum_id, $check)) ? false : true; + } + else + { + $allowed = true; + } + + if ($allowed) + { + $return['_allowed_'][$extension] = 0; + $return[$extension] = $extensions[$extension]; + } + } + + $extensions = $return; + } + + if (!isset($extensions['_allowed_'])) + { + $extensions['_allowed_'] = array(); + } + + return $extensions; + } + + /** + * Obtain active bots + */ + function obtain_bots() + { + global $mx_cache; + + if (($bots = $mx_cache->get('_bots')) === false) + { + global $db; + + switch ($db->sql_layer) + { + case 'mssql': + case 'mssql_odbc': + $sql = 'SELECT user_id, bot_agent, bot_ip + FROM ' . BOTS_TABLE . ' + WHERE bot_active = 1 + ORDER BY LEN(bot_agent) DESC'; + break; + + case 'firebird': + $sql = 'SELECT user_id, bot_agent, bot_ip + FROM ' . BOTS_TABLE . ' + WHERE bot_active = 1 + ORDER BY CHAR_LENGTH(bot_agent) DESC'; + break; + + // LENGTH supported by MySQL, IBM DB2 and Oracle for sure... + default: + $sql = 'SELECT user_id, bot_agent, bot_ip + FROM ' . BOTS_TABLE . ' + WHERE bot_active = 1 + ORDER BY LENGTH(bot_agent) DESC'; + break; + } + $result = $db->sql_query($sql); + + $bots = array(); + while ($row = $db->sql_fetchrow($result)) + { + $bots[] = $row; + } + $db->sql_freeresult($result); + + $mx_cache->put('_bots', $bots); + } + + return $bots; + } + + /** * Obtain cfg file data * *************** *** 803,806 **** --- 1008,1071 ---- /** + * Obtain disallowed usernames + */ + function obtain_disallowed_usernames() + { + global $mx_cache; + + if (($usernames = $mx_cache->get('_disallowed_usernames')) === false) + { + global $db; + + $sql = 'SELECT disallow_username + FROM ' . DISALLOW_TABLE; + $result = $db->sql_query($sql); + + $usernames = array(); + while ($row = $db->sql_fetchrow($result)) + { + $usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#')); + } + $db->sql_freeresult($result); + + $mx_cache->put('_disallowed_usernames', $usernames); + } + + return $usernames; + } + + /** + * Obtain hooks... + */ + function obtain_hooks() + { + global $phpbb_root_path, $phpEx, $mx_cache; + + if (($hook_files = $mx_cache->get('_hooks')) === false) + { + $hook_files = array(); + + // Now search for hooks... + $dh = @opendir($phpbb_root_path . 'includes/hooks/'); + + if ($dh) + { + while (($file = readdir($dh)) !== false) + { + if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) + { + $hook_files[] = substr($file, 0, -(strlen($phpEx) + 1)); + } + } + closedir($dh); + } + + $mx_cache->put('_hooks', $hook_files); + } + + return $hook_files; + } + + /** * Enter description here... * *************** *** 813,820 **** FROM " . GROUPS_TABLE . " g WHERE g.group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY g.group_type ASC, g.group_name"; return $sql; } ! /** * Get username details for placing into templates. --- 1078,1148 ---- FROM " . GROUPS_TABLE . " g WHERE g.group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY g.group_type ASC, g.group_name"; return $sql; } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function generate_session_online_sql($guest = false) ! { ! if ($guest) ! { ! $sql = "SELECT u.*, s.* ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id = " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! } ! else ! { ! $sql = "SELECT u.*, s.*, s.session_time AS user_session_time ! FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE . " s ! WHERE u.user_id <> " . ANONYMOUS . " ! AND u.user_id = s.session_user_id ! AND s.session_time >= " . ( time() - 300 ) . " ! ORDER BY s.session_time DESC"; ! } ! return $sql; ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $str_ip ! * @return unknown ! */ ! function decode_ip($str_ip) ! { ! return $str_ip; ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function get_phpbb_version() ! { ! global $board_config; ! ! return $board_config['version']; ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function confirm_backend() ! { ! global $portal_config; ! ! return PORTAL_BACKEND == $portal_config['portal_backend']; ! } ! /** * Get username details for placing into templates. *************** *** 834,841 **** $profile_url = ''; ! //Added by OryNider if (($username == false) || ($username_colour == false)) ! { $this_userdata = mx_get_userdata($user_id, false); $user_id = $this_userdata['user_id']; --- 1162,1169 ---- $profile_url = ''; ! //Added by OryNider if (($username == false) || ($username_colour == false)) ! { $this_userdata = mx_get_userdata($user_id, false); $user_id = $this_userdata['user_id']; *************** *** 845,849 **** //Added Ends ! $username_colour = ($username_colour) ? '#' . $username_colour : ''; if ($guest_username === false) --- 1173,1177 ---- //Added Ends ! $username_colour = ($username_colour) ? '#' . $username_colour : ''; if ($guest_username === false) *************** *** 914,919 **** break; } ! } ! } --- 1242,1523 ---- break; } ! } ! ! // ! // ACP ! // ! /** ! * Enter description here... ! * ! */ ! function load_phpbb_acp_menu() ! { ! global $phpbb_root_path, $template, $lang, $phpEx, $theme, $userdata, $mx_user; ! ! $template->assign_block_vars('module_phpbb', array( ! 'L_PHPBB' => $lang['Phpbb'], ! "L_FORUM_INDEX" => $lang['Main_index'], ! "L_PREVIEW_FORUM" => $lang['Preview_forum'], ! "U_FORUM_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), ! )); ! ! $menu_cat_id = 0; ! ! $template->assign_block_vars('module_phpbb.catrow', array( ! //+MOD: DHTML Menu for ACP ! 'MENU_CAT_ID' => $menu_cat_id, ! 'MENU_CAT_ROWS' => 1, ! //-MOD: DHTML Menu for ACP ! 'ADMIN_CATEGORY' => 'Olympus adminCP') ! ); ! ! $template->assign_block_vars('module_phpbb.catrow.modulerow', array( ! "ROW_COLOR" => "#" . $theme['td_color1'], ! "ROW_CLASS" => $theme['td_class1'], ! //+MOD: DHTML Menu for ACP ! 'ROW_COUNT' => 0, ! //-MOD: DHTML Menu for ACP ! "ADMIN_MODULE" => 'Go!', ! "U_ADMIN_MODULE" => mx_append_sid($phpbb_root_path . 'adm/index.php?sid='.$mx_user->session_id)) ! ); ! } ! ! /** ! * Enter description here... ! * ! */ ! function load_forum_stats() ! { ! global $db, $template, $board_config, $portal_config, $phpbb_root_path, $mx_root_path, $lang, $theme, $mx_user, $userdata; ! ! $template->assign_block_vars("forum_stats", array()); ! // ! // Get forum statistics ! // ! $total_posts = phpBB2::get_db_stat('postcount'); ! $total_users = phpBB2::get_db_stat('usercount'); ! $total_topics = phpBB2::get_db_stat('topiccount'); ! ! $start_date = phpBB2::create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); ! ! $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; ! ! $posts_per_day = sprintf("%.2f", $total_posts / $boarddays); ! $topics_per_day = sprintf("%.2f", $total_topics / $boarddays); ! $users_per_day = sprintf("%.2f", $total_users / $boarddays); ! ! $avatar_dir_size = 0; ! ! if ($avatar_dir = @opendir($phpbb_root_path . $board_config['avatar_path']) ) ! { ! while( $file = @readdir($avatar_dir) ) ! { ! if( $file != "." && $file != ".." ) ! { ! $avatar_dir_size += @filesize($phpbb_root_path . $board_config['avatar_path'] . "/" . $file); ! } ! } ! @closedir($avatar_dir); ! ! // ! // This bit of code translates the avatar directory size into human readable format ! // Borrowed the code from the PHP.net annoted manual, origanally written by: ! // Jesse (je...@je...) ! // ! if($avatar_dir_size >= 1048576) ! { ! $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . " MB"; ! } ! else if($avatar_dir_size >= 1024) ! { ! $avatar_dir_size = round($avatar_dir_size / 1024 * 100) / 100 . " KB"; ! } ! else ! { ! $avatar_dir_size = $avatar_dir_size . " Bytes"; ! } ! } ! else ! { ! // Couldn't open Avatar dir. ! $avatar_dir_size = $lang['Not_available']; ! } ! ! if($posts_per_day > $total_posts) ! { ! $posts_per_day = $total_posts; ! } ! ! if($topics_per_day > $total_topics) ! { ! $topics_per_day = $total_topics; ! } ! ! if($users_per_day > $total_users) ! { ! $users_per_day = $total_users; ! } ! ! // ! // DB size ... MySQL only ! // ! // This code is heavily influenced by a similar routine ! // in phpMyAdmin 2.2.0 ! // ! if( preg_match("/^mysql/", SQL_LAYER) ) ! { ! $sql = "SELECT VERSION() AS mysql_version"; ! if($result = $db->sql_query($sql)) ! { ! $row = $db->sql_fetchrow($result); ! $version = $row['mysql_version']; ! ! if( preg_match("/^(3\.23|4\.|5\.)/", $version) ) ! { ! $db_name = ( preg_match("/^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)/", $version) ) ? "`$dbname`" : $dbname; ! ! $sql = "SHOW TABLE STATUS ! FROM " . $db_name; ! if($result = $db->sql_query($sql)) ! { ! $tabledata_ary = $db->sql_fetchrowset($result); ! ! $dbsize = 0; ! for($i = 0; $i < count($tabledata_ary); $i++) ! { ! if( $tabledata_ary[$i]['Type'] != "MRG_MyISAM" ) ! { ! if( $table_prefix != "" ) ! { ! if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ) ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! else ! { ! $dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length']; ! } ! } ! } ! } // Else we couldn't get the table status. ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else if( preg_match("/^mssql/", SQL_LAYER) ) ! { ! $sql = "SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize ! FROM sysfiles"; ! if( $result = $db->sql_query($sql) ) ! { ! $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! $db->sql_freeresult($result); ! } ! else ! { ! $dbsize = $lang['Not_available']; ! } ! ! if ( is_integer($dbsize) ) ! { ! if( $dbsize >= 1048576 ) ! { ! $dbsize = sprintf("%.2f MB", ( $dbsize / 1048576 )); ! } ! else if( $dbsize >= 1024 ) ! { ! $dbsize = sprintf("%.2f KB", ( $dbsize / 1024 )); ! } ! else ! { ! $dbsize = sprintf("%.2f Bytes", $dbsize); ! } ! } ! ! $template->assign_vars(array( ! "NUMBER_OF_POSTS" => $total_posts, ! "NUMBER_OF_TOPICS" => $total_topics, ! "NUMBER_OF_USERS" => $total_users, ! "START_DATE" => $start_date, ! "POSTS_PER_DAY" => $posts_per_day, ! "TOPICS_PER_DAY" => $topics_per_day, ! "USERS_PER_DAY" => $users_per_day, ! "AVATAR_DIR_SIZE" => $avatar_dir_size, ! "DB_SIZE" => $dbsize, ! "GZIP_COMPRESSION" => ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']) ! ); ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function phpbb_version_check() ! { ! global $board_config, $lang; ! ! $current_phpbb_version = explode('.', '' . $board_config['version']); ! $minor_phpbb_revision = (int) $current_phpbb_version[3]; ! ! $errno = 0; ! $errstr = $phpbb_version_info = ''; ! ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) ! { ! $phpbb_version_info = mx_get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); ! if ($info === false) ! { ! trigger_error($errstr, E_USER_WARNING); ! } ! ! $phpbb_version_info = explode("\n", $phpbb_version_info); ! ! $announcement_url = trim($info[1]); ! //$update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); ! $latest_phpbb_head_revision = trim($phpbb_version_info[0]); ! $latest_phpbb_minor_revision = trim($phpbb_version_info[2]); ! $latest_phpbb_version = trim($phpbb_version_info[0]) . '.' . trim($phpbb_version_info[1]) . '.' . trim($phpbb_version_info[2]); ! ! if ($latest_phpbb_head_revision == 3 && $minor_phpbb_revision == $latest_phpbb_minor_revision) ! { ! $phpbb_version_info = '<p style="color:green">' . $lang['Version_up_to_date'] . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $phpbb_version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_phpbb_version) . sprintf($lang['Current_version_info'], $board_config['version']) . '</p>'; ! } ! } ! else ! { ! if ($errstr) ! { ! $phpbb_version_info = '<p style="color:red">' . sprintf($lang['Connect_socket_error'], $errstr) . '</p>'; ! } ! else ! { ! $phpbb_version_info = '<p>' . $lang['Socket_functions_disabled'] . '</p>'; ! } ! } ! ! $phpbb_version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>'; ! ! return $phpbb_version_info; ! } } Index: constants.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** constants.php 15 Jun 2008 09:15:44 -0000 1.3 --- constants.php 31 Oct 2008 18:54:23 -0000 1.4 *************** *** 55,58 **** --- 55,64 ---- @define('LOGIN_ERROR_PASSWORD_CONVERT', 15); + // Error codes (from phpbb2) + @define('GENERAL_MESSAGE', 200); + @define('GENERAL_ERROR', 202); + @define('CRITICAL_MESSAGE', 203); + @define('CRITICAL_ERROR', 204); + // Group settings @define('GROUP_OPEN', 0); Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** session.php 7 Oct 2008 09:12:07 -0000 1.38 --- session.php 31 Oct 2008 18:54:23 -0000 1.39 *************** *** 129,133 **** function extract_current_page($root_path) { - global $phpBB2; $page_array = array(); --- 129,132 ---- *************** *** 166,171 **** // current directory within the phpBB root (for example: adm) ! $root_dirs = explode('/', str_replace('\\', '/', $phpBB2->phpbb_realpath($root_path))); ! $page_dirs = explode('/', str_replace('\\', '/', $phpBB2->phpbb_realpath('./'))); $intersection = array_intersect_assoc($root_dirs, $page_dirs); --- 165,170 ---- // current directory within the phpBB root (for example: adm) ! $root_dirs = explode('/', str_replace('\\', '/', phpBB2::phpbb_realpath($root_path))); ! $page_dirs = explode('/', str_replace('\\', '/', phpBB2::phpbb_realpath('./'))); $intersection = array_intersect_assoc($root_dirs, $page_dirs); *************** *** 229,233 **** function session_begin($update_session_page = true) { ! global $phpEx, $SID, $_SID, $_EXTRA_URL, $db, $board_config, $phpbb_root_path, $phpBB3; // Give us some basic information --- 228,232 ---- function session_begin($update_session_page = true) { ! global $phpEx, $SID, $_SID, $_EXTRA_URL, $db, $board_config, $phpbb_root_path; // Give us some basic information *************** *** 270,276 **** if (isset($_COOKIE[$board_config['cookie_name'] . '_sid']) || isset($_COOKIE[$board_config['cookie_name'] . '_u'])) { ! $this->cookie_data['u'] = $phpBB3->request_var($board_config['cookie_name'] . '_u', 0, false, true); ! $this->cookie_data['k'] = $phpBB3->request_var($board_config['cookie_name'] . '_k', '', false, true); ! $this->session_id = $phpBB3->request_var($board_config['cookie_name'] . '_sid', '', false, true); // original code: $SID = (defined('NEED_SID')) ? 'sid=' . $this->session_id : 'sid='; --- 269,275 ---- if (isset($_COOKIE[$board_config['cookie_name'] . '_sid']) || isset($_COOKIE[$board_config['cookie_name'] . '_u'])) { ! $this->cookie_data['u'] = phpBB3::request_var($board_config['cookie_name'] . '_u', 0, false, true); ! $this->cookie_data['k'] = phpBB3::request_var($board_config['cookie_name'] . '_k', '', false, true); ! $this->session_id = phpBB3::request_var($board_config['cookie_name'] . '_sid', '', false, true); // original code: $SID = (defined('NEED_SID')) ? 'sid=' . $this->session_id : 'sid='; *************** *** 280,284 **** if (empty($this->session_id)) { ! $this->session_id = $_SID = $phpBB3->request_var('sid', ''); $SID = 'sid=' . $this->session_id; $this->cookie_data = array('u' => 0, 'k' => ''); --- 279,283 ---- if (empty($this->session_id)) { ! $this->session_id = $_SID = phpBB3::request_var('sid', ''); $SID = 'sid=' . $this->session_id; $this->cookie_data = array('u' => 0, 'k' => ''); *************** *** 287,291 **** else { ! $this->session_id = $_SID = $phpBB3->request_var('sid', ''); $SID = 'sid=' . $this->session_id; } --- 286,290 ---- else { ! $this->session_id = $_SID = phpBB3::request_var('sid', ''); $SID = 'sid=' . $this->session_id; } *************** *** 439,444 **** function session_create($user_id = false, $set_admin = false, $persist_login = false, $viewonline = true) { ! global $SID, $_SID, $db, $board_config, $cache, $phpbb_root_path, $phpEx; ! global $phpBB3; $this->data = array(); --- 438,442 ---- function session_create($user_id = false, $set_admin = false, $persist_login = false, $viewonline = true) { ! global $SID, $_SID, $db, $board_config, $cache, $phpbb_root_path, $phpEx, $mx_backend; $this->data = array(); *************** *** 465,469 **** */ $bot = false; ! $active_bots = $cache->obtain_bots(); foreach ($active_bots as $row) --- 463,467 ---- */ $bot = false; ! $active_bots = $mx_backend->obtain_bots(); foreach ($active_bots as $row) *************** *** 713,717 **** } ! $this->session_id = $this->data['session_id'] = md5($phpBB3->unique_id()); $sql_ary['session_id'] = (string) $this->session_id; --- 711,715 ---- } ! $this->session_id = $this->data['session_id'] = md5(phpBB3::unique_id()); $sql_ary['session_id'] = (string) $this->session_id; *************** *** 1204,1208 **** function set_login_key($user_id = false, $key = false, $user_ip = false) { ! global $board_config, $db, $phpBB3; $user_id = ($user_id === false) ? $this->data['user_id'] : $user_id; --- 1202,1206 ---- function set_login_key($user_id = false, $key = false, $user_ip = false) { ! global $board_config, $db; $user_id = ($user_id === false) ? $this->data['user_id'] : $user_id; *************** *** 1210,1214 **** $key = ($key === false) ? (($this->cookie_data['k']) ? $this->cookie_data['k'] : false) : $key; ! $key_id = $phpBB3->unique_id(hexdec(substr($this->session_id, 0, 8))); $sql_ary = array( --- 1208,1212 ---- $key = ($key === false) ? (($this->cookie_data['k']) ? $this->cookie_data['k'] : false) : $key; ! $key_id = phpBB3::unique_id(hexdec(substr($this->session_id, 0, 8))); $sql_ary = array( *************** *** 1309,1313 **** $this->dst = $board_config['board_dst'] * 3600; } ! if ((@include $this->lang_path . "common.$phpEx") === false) --- 1307,1311 ---- $this->dst = $board_config['board_dst'] * 3600; } ! if ((@include $this->lang_path . "common.$phpEx") === false) *************** *** 1319,1323 **** } } ! // // We include common language file here to not load it every time a custom language file is included --- 1317,1321 ---- } } ! // // We include common language file here to not load it every time a custom language file is included *************** *** 1335,1339 **** { global $db, $template, $board_config, $userdata, $phpbb_auth, $phpEx, $phpbb_root_path, $mx_root_path, $mx_cache; ! global $mx_request_vars, $portal_config, $mx_backend, $phpBB3; //added for mxp if (!empty($_GET['style']) && $phpbb_auth->acl_get('a_styles')) --- 1333,1337 ---- { global $db, $template, $board_config, $userdata, $phpbb_auth, $phpEx, $phpbb_root_path, $mx_root_path, $mx_cache; ! global $mx_request_vars, $portal_config, $mx_backend; //added for mxp if (!empty($_GET['style']) && $phpbb_auth->acl_get('a_styles')) *************** *** 1341,1345 **** global $SID, $_EXTRA_URL; ! $style = $phpBB3->request_var('style', 0); $SID .= '&style=' . $style; $_EXTRA_URL = array('style=' . $style); --- 1339,1343 ---- global $SID, $_EXTRA_URL; ! $style = phpBB3::request_var('style', 0); $SID .= '&style=' . $style; $_EXTRA_URL = array('style=' . $style); *************** *** 1348,1367 **** { $style = $this->style; ! if(!$board_config['override_user_style'] && ($this->data['user_id'] != ANONYMOUS)) ! { // Set up style $style = $this->data['user_style'] ? $this->data['user_style'] : $board_config['default_style']; } else ! { $default_style = $portal_config['default_style']; //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up //Anonymouse users should see all block graphic corect //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT s.style_id FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t WHERE m.themes_id = " . (int) $default_style . " ! AND t.template_path = m.template_name AND t.template_id = s.template_id"; --- 1346,1365 ---- { $style = $this->style; ! if(!$board_config['override_user_style'] && ($this->data['user_id'] != ANONYMOUS)) ! { // Set up style $style = $this->data['user_style'] ? $this->data['user_style'] : $board_config['default_style']; } else ! { $default_style = $portal_config['default_style']; //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up //Anonymouse users should see all block graphic corect //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT s.style_id FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t WHERE m.themes_id = " . (int) $default_style . " ! AND t.template_path = m.template_name AND t.template_id = s.template_id"; *************** *** 1369,1390 **** { $style = $row['style_id']; //User style ! } else { ! $style = $this->data['user_style'] ? $this->data['user_style'] : $board_config['default_style']; } } ! // Set up style Temp code should be removed after bugtraking $style = ($style) ? $style : ((!$board_config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $this->phpbb_style['style_id']); ! } $sql = "SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name FROM " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t, " . STYLES_THEME_TABLE . " AS c, " . STYLES_IMAGESET_TABLE . " i ! WHERE s.style_id = " . (int) $style . " AND t.template_id = s.template_id AND c.theme_id = s.theme_id ! AND i.imageset_id = s.imageset_id"; if ( !($result = $db->sql_query($sql, 3600)) ) --- 1367,1388 ---- { $style = $row['style_id']; //User style ! } else { ! $style = $this->data['user_style'] ? $this->data['user_style'] : $board_config['default_style']; } } ! // Set up style Temp code should be removed after bugtraking $style = ($style) ? $style : ((!$board_config['override_user_style'] && $this->data['user_id'] != ANONYMOUS) ? $this->data['user_style'] : $this->phpbb_style['style_id']); ! } $sql = "SELECT s.style_id, t.template_storedb, t.template_path, t.template_id, t.bbcode_bitfield, c.theme_path, c.theme_name, c.theme_storedb, c.theme_id, i.imageset_path, i.imageset_id, i.imageset_name FROM " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t, " . STYLES_THEME_TABLE . " AS c, " . STYLES_IMAGESET_TABLE . " i ! WHERE s.style_id = " . (int) $style . " AND t.template_id = s.template_id AND c.theme_id = s.theme_id ! AND i.imageset_id = s.imageset_id"; if ( !($result = $db->sql_query($sql, 3600)) ) *************** *** 1528,1532 **** if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg")) { ! $cfg_data_imageset_data = $phpBB3->parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"); foreach ($cfg_data_imageset_data as $image_name => $value) { --- 1526,1530 ---- if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg")) { ! $cfg_data_imageset_data = phpBB3::parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"); foreach ($cfg_data_imageset_data as $image_name => $value) { *************** *** 1869,1875 **** $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row; $db->sql_freeresult($result); ! } - /** * Specify/Get images --- 1867,1873 ---- $this->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row; $db->sql_freeresult($result); ! } ! /** * Specify/Get images *************** *** 1897,1901 **** $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; ! switch ($type) { --- 1895,1899 ---- $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; ! switch ($type) { Index: bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/bbcode.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bbcode.php 7 Oct 2008 03:17:57 -0000 1.4 --- bbcode.php 31 Oct 2008 18:54:23 -0000 1.5 *************** *** 16,34 **** // ! // Here comes a mxp version of original phpbb2 bbcode.php ! // Last in file are the mxp wrapper functions // ! ! define("BBCODE_UID_LEN", 10); ! ! // global that holds loaded-and-prepared bbcode templates, so we only have to do ! // that stuff once. [...1703 lines suppressed...] ! } return $message; } - - //Core BBCode Starts /** --- 246,256 ---- // Make sure the delimiter # is added in front and at the end of every element within $match $message = trim(preg_replace(explode(chr(0), '#' . implode('#' . chr(0) . '#', $match) . '#'), $replace, $message)); } } ! $message = str_replace("{SMILIES_PATH}", $this->smiley_path_url . $this->smilies_path . $smilies[$i][$this->smiley_url], ' ' . $message . ' '); return $message; } /** |
Update of /cvsroot/mxbb/core/includes/db In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6068 Modified Files: firebird.php mssql.php mssql_odbc.php mysql.php mysql4.php mysqli.php oracle.php postgres.php sqlite.php Log Message: http://www.mx-publisher.com/phpBB2/viewtopic.php?p=65197#65197 Massive update. Index: mysqli.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysqli.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mysqli.php 19 Aug 2008 02:46:22 -0000 1.20 --- mysqli.php 31 Oct 2008 18:53:49 -0000 1.21 *************** *** 37,41 **** { var $multi_insert = true; ! /** * Connect to server --- 37,41 ---- { var $multi_insert = true; ! /** * Connect to server *************** *** 56,63 **** // mysqli only supported by phpBB3 //if (UTF_STATUS === 'phpbb3') ! //{ @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'"); // enforce strict mode on databases that support it ! //} if (mysqli_get_server_version($this->db_connect_id) >= 50002) { --- 56,63 ---- // mysqli only supported by phpBB3 //if (UTF_STATUS === 'phpbb3') ! //{ @mysqli_query($this->db_connect_id, "SET NAMES 'utf8'"); // enforce strict mode on databases that support it ! //} if (mysqli_get_server_version($this->db_connect_id) >= 50002) { *************** *** 283,286 **** --- 283,288 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 288,291 **** --- 290,298 ---- } + if (!is_object($query_id) && isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + return ($query_id) ? @mysqli_data_seek($query_id, $rownum) : false; } *************** *** 304,307 **** --- 311,316 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 309,319 **** } ! // Make sure it is not a cached query ! if (is_object($this->query_result)) { ! return @mysqli_free_result($query_id); } ! return false; } --- 318,327 ---- } ! if (!is_object($query_id) && isset($mx_cache->sql_rowset[$query_id])) { ! return $mx_cache->sql_freeresult($query_id); } ! return @mysqli_free_result($query_id); } Index: sqlite.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/sqlite.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** sqlite.php 7 Mar 2008 00:59:03 -0000 1.15 --- sqlite.php 31 Oct 2008 18:53:49 -0000 1.16 *************** *** 253,256 **** --- 253,258 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 258,261 **** --- 260,268 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + return ($query_id) ? @sqlite_seek($query_id, $rownum) : false; } *************** *** 274,277 **** --- 281,296 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + + if ($query_id === false) + { + $query_id = $this->query_result; + } + + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + return true; } Index: postgres.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/postgres.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** postgres.php 20 Jul 2008 02:41:41 -0000 1.16 --- postgres.php 31 Oct 2008 18:53:49 -0000 1.17 *************** *** 66,70 **** $connect_string .= "host=$sqlserver "; } ! if ($port) { --- 66,70 ---- $connect_string .= "host=$sqlserver "; } ! if ($port) { *************** *** 323,326 **** --- 323,328 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 328,331 **** --- 330,338 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + return ($query_id) ? @pg_result_seek($query_id, $rownum) : false; } *************** *** 364,367 **** --- 371,376 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 369,372 **** --- 378,386 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[(int) $query_id])) { *************** *** 374,377 **** --- 388,392 ---- return @pg_free_result($query_id); } + return false; } Index: mysql4.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql4.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mysql4.php 19 Aug 2008 02:46:22 -0000 1.20 --- mysql4.php 31 Oct 2008 18:53:49 -0000 1.21 *************** *** 26,30 **** define('SQL_LAYER', 'mysql4'); include_once($mx_root_path . 'includes/db/dbal.' . $phpEx); ! $sql_db = 'dbal_' . $dbms; /** --- 26,30 ---- define('SQL_LAYER', 'mysql4'); include_once($mx_root_path . 'includes/db/dbal.' . $phpEx); ! $sql_db = 'dbal_' . $dbms; // Repopulated for multiple db connections /** *************** *** 40,46 **** var $mysql_version; var $multi_insert = true; ! /** ! * Connect to server ! */ /** * Connect to server --- 40,44 ---- var $mysql_version; var $multi_insert = true; ! /** * Connect to server *************** *** 54,57 **** --- 52,57 ---- $this->dbname = $database; + $this->sql_layer = 'mysql4'; + $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link); *************** *** 65,72 **** if (version_compare($this->mysql_version, '4.1.3', '>=')) { - $this->sql_layer = 'mysql4'; - if (UTF_STATUS === 'phpbb3') ! { @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); // enforce strict mode on databases that support it --- 65,70 ---- if (version_compare($this->mysql_version, '4.1.3', '>=')) { if (UTF_STATUS === 'phpbb3') ! { @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); // enforce strict mode on databases that support it *************** *** 103,110 **** $this->sql_layer = 'mysql4'; } ! else //if (version_compare($this->mysql_version, '4.0.0', '<')) { $this->sql_layer = 'mysql'; ! } return $this->db_connect_id; --- 101,108 ---- $this->sql_layer = 'mysql4'; } ! else { $this->sql_layer = 'mysql'; ! } return $this->db_connect_id; *************** *** 114,118 **** return $this->sql_error(''); } ! /** * Version information about used database --- 112,116 ---- return $this->sql_error(''); } ! /** * Version information about used database *************** *** 312,315 **** --- 310,315 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 317,320 **** --- 317,325 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false; } *************** *** 333,336 **** --- 338,343 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 338,341 **** --- 345,353 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[(int) $query_id])) { Index: firebird.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/firebird.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** firebird.php 7 Mar 2008 00:59:02 -0000 1.15 --- firebird.php 31 Oct 2008 18:53:49 -0000 1.16 *************** *** 53,73 **** /** - * Connect to server - */ - function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) - { - $this->persistency = $persistency; - $this->user = $sqluser; - $this->server = $sqlserver . (($port) ? ':' . $port : ''); - $this->dbname = $database; - - $this->db_connect_id = ($this->persistency) ? @ibase_pconnect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3) : @ibase_connect($this->server . ':' . $this->dbname, $this->user, $sqlpassword, false, false, 3); - - $this->service_handle = (function_exists('ibase_service_attach')) ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false; - - return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error(''); - } - - /** * sql transaction */ --- 53,56 ---- Index: mssql.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mssql.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mssql.php 19 Aug 2008 02:46:22 -0000 1.17 --- mssql.php 31 Oct 2008 18:53:49 -0000 1.18 *************** *** 38,44 **** * Connect to server */ - /** - * Connect to server - */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) { --- 38,41 ---- *************** *** 49,56 **** if (UTF_STATUS === 'phpbb3') ! { @ini_set('mssql.charset', 'UTF-8'); // enforce strict mode on databases that support it ! } @ini_set('mssql.textlimit', 2147483647); @ini_set('mssql.textsize', 2147483647); --- 46,53 ---- if (UTF_STATUS === 'phpbb3') ! { @ini_set('mssql.charset', 'UTF-8'); // enforce strict mode on databases that support it ! } @ini_set('mssql.textlimit', 2147483647); @ini_set('mssql.textsize', 2147483647); *************** *** 312,323 **** function sql_nextid() { ! $result_id = @mssql_query('SELECT @@IDENTITY', $this->db_connect_id); if ($result_id) { ! if (@mssql_fetch_assoc($result_id)) { - $id = @mssql_result($result_id, 1); @mssql_free_result($result_id); ! return $id; } @mssql_free_result($result_id); --- 309,320 ---- function sql_nextid() { ! $result_id = @mssql_query('SELECT SCOPE_IDENTITY()', $this->db_connect_id); if ($result_id) { ! if ($row = @mssql_fetch_assoc($result_id)) { @mssql_free_result($result_id); ! return $row['computed']; ! } @mssql_free_result($result_id); *************** *** 332,335 **** --- 329,334 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 337,340 **** --- 336,344 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[$query_id])) { Index: mysql.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mysql.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mysql.php 4 Oct 2008 17:30:23 -0000 1.22 --- mysql.php 31 Oct 2008 18:53:49 -0000 1.23 *************** *** 37,41 **** var $mysql_version; var $multi_insert = true; ! /** * Connect to server --- 37,41 ---- var $mysql_version; var $multi_insert = true; ! /** * Connect to server *************** *** 49,56 **** $this->dbname = $database; - $this->sql_layer = 'mysql4'; - $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link); ! if ($this->db_connect_id && $this->dbname != '') { --- 49,54 ---- $this->dbname = $database; $this->db_connect_id = ($this->persistency) ? @mysql_pconnect($this->server, $this->user, $sqlpassword, $new_link) : @mysql_connect($this->server, $this->user, $sqlpassword, $new_link); ! if ($this->db_connect_id && $this->dbname != '') { *************** *** 59,70 **** // Determine what version we are using and if it natively supports UNICODE $this->mysql_version = mysql_get_server_info($this->db_connect_id); ! if (version_compare($this->mysql_version, '4.1.3', '>=')) { if (UTF_STATUS === 'phpbb3') ! { @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); // enforce strict mode on databases that support it } if (version_compare($this->mysql_version, '5.0.2', '>=')) { --- 57,71 ---- // Determine what version we are using and if it natively supports UNICODE $this->mysql_version = mysql_get_server_info($this->db_connect_id); ! if (version_compare($this->mysql_version, '4.1.3', '>=')) { + $this->sql_layer = 'mysql4'; + if (UTF_STATUS === 'phpbb3') ! { @mysql_query("SET NAMES 'utf8'", $this->db_connect_id); // enforce strict mode on databases that support it } + if (version_compare($this->mysql_version, '5.0.2', '>=')) { *************** *** 92,96 **** } } ! else if (version_compare($this->mysql_version, '4.0.0', '<')) { $this->sql_layer = 'mysql'; --- 93,101 ---- } } ! else if (version_compare($this->mysql_version, '4.0.0', '>=')) ! { ! $this->sql_layer = 'mysql4'; ! } ! else { $this->sql_layer = 'mysql'; *************** *** 100,104 **** } } ! return $this->sql_error(); } --- 105,109 ---- } } ! return $this->sql_error(''); } *************** *** 212,216 **** if ($total == 0) { ! $total = -1; } --- 217,222 ---- if ($total == 0) { ! // Because MySQL 4.1+ no longer supports -1 in LIMIT queries we set it to the maximum value ! $total = '18446744073709551615'; } *************** *** 300,303 **** --- 306,311 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 305,308 **** --- 313,321 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + return ($query_id) ? @mysql_data_seek($query_id, $rownum) : false; } *************** *** 321,324 **** --- 334,339 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 326,329 **** --- 341,349 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[(int) $query_id])) { *************** *** 349,372 **** /** - * return sql error array - * @private - */ - function _sql_error() - { - if (!$this->db_connect_id) - { - return array( - 'message' => @mysql_error(), - 'code' => @mysql_errno() - ); - } - - return array( - 'message' => @mysql_error($this->db_connect_id), - 'code' => @mysql_errno($this->db_connect_id) - ); - } - - /** * Build LIKE expression * @access private --- 369,372 ---- *************** *** 394,397 **** --- 394,417 ---- /** + * return sql error array + * @private + */ + function _sql_error() + { + if (!$this->db_connect_id) + { + return array( + 'message' => @mysql_error(), + 'code' => @mysql_errno() + ); + } + + return array( + 'message' => @mysql_error($this->db_connect_id), + 'code' => @mysql_errno($this->db_connect_id) + ); + } + + /** * Close sql connection * @private Index: oracle.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/oracle.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** oracle.php 7 Mar 2008 00:59:03 -0000 1.15 --- oracle.php 31 Oct 2008 18:53:49 -0000 1.16 *************** *** 46,49 **** --- 46,59 ---- $this->dbname = $database; + // support for "easy connect naming" + if ($sqlserver !== '' && $sqlserver !== '/') + { + if (substr($sqlserver, -1, 1) == '/') + { + $sqlserver == substr($sqlserver, 0, -1); + } + $connect = $sqlserver . (($port) ? ':' . $port : '') . '/' . $database; + } + $this->db_connect_id = ($this->persistency) ? @ociplogon($this->user, $sqlpassword, $this->server) : @ocinlogon($this->user, $sqlpassword, $this->server); *************** *** 125,129 **** --- 135,224 ---- } + $array = array(); + + // We overcome Oracle's 4000 char limit by binding vars + if (strlen($query) > 4000) + { + if (preg_match('/^(INSERT INTO[^(]++)\\(([^()]+)\\) VALUES[^(]++\\((.*?)\\)$/s', $query, $regs)) + { + if (strlen($regs[3]) > 4000) + { + $cols = explode(', ', $regs[2]); + preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER); + + $inserts = $vals[0]; + unset($vals); + + foreach ($inserts as $key => $value) + { + if (!empty($value) && $value[0] === "'" && strlen($value) > 4002) // check to see if this thing is greater than the max + 'x2 + { + $inserts[$key] = ':' . strtoupper($cols[$key]); + $array[$inserts[$key]] = str_replace("''", "'", substr($value, 1, -1)); + } + } + + $query = $regs[1] . '(' . $regs[2] . ') VALUES (' . implode(', ', $inserts) . ')'; + } + } + else if (preg_match_all('/^(UPDATE [\\w_]++\\s+SET )([\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+)(?:,\\s*[\\w_]++\\s*=\\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]+))*+)\\s+(WHERE.*)$/s', $query, $data, PREG_SET_ORDER)) + { + if (strlen($data[0][2]) > 4000) + { + $update = $data[0][1]; + $where = $data[0][3]; + preg_match_all('/([\\w_]++)\\s*=\\s*(\'(?:[^\']++|\'\')*+\'|[\d-.]++)/', $data[0][2], $temp, PREG_SET_ORDER); + unset($data); + + $cols = array(); + foreach ($temp as $value) + { + if (!empty($value[2]) && $value[2][0] === "'" && strlen($value[2]) > 4002) // check to see if this thing is greater than the max + 'x2 + { + $cols[] = $value[1] . '=:' . strtoupper($value[1]); + $array[$value[1]] = str_replace("''", "'", substr($value[2], 1, -1)); + } + else + { + $cols[] = $value[1] . '=' . $value[2]; + } + } + + $query = $update . implode(', ', $cols) . ' ' . $where; + unset($cols); + } + } + } + + switch (substr($query, 0, 6)) + { + case 'DELETE': + if (preg_match('/^(DELETE FROM [\w_]++ WHERE)((?:\s*(?:AND|OR)?\s*[\w_]+\s*(?:(?:=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|[\d-.]+)|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))*+)$/', $query, $regs)) + { + $query = $regs[1] . $this->_rewrite_where($regs[2]); + unset($regs); + } + break; + + case 'UPDATE': + if (preg_match('/^(UPDATE [\\w_]++\\s+SET [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]++|:\w++)(?:, [\\w_]+\s*=\s*(?:\'(?:[^\']++|\'\')*+\'|[\d-.]++|:\w++))*+\\s+WHERE)(.*)$/s', $query, $regs)) + { + $query = $regs[1] . $this->_rewrite_where($regs[2]); + unset($regs); + } + break; + + case 'SELECT': + $query = preg_replace_callback('/([\w_.]++)\s*(?:(=|<>)\s*(?>\'(?>[^\']++|\'\')*+\'|[\d-.]++|([\w_.]++))|(?:NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]++,? ?)*+\))/', array($this, '_rewrite_col_compare'), $query); + break; + } + $this->query_result = @ociparse($this->db_connect_id, $query); + + foreach ($array as $key => $value) + { + @ocibindbyname($this->query_result, $key, $array[$key], -1); + } + $success = @ociexecute($this->query_result, OCI_DEFAULT); *************** *** 287,290 **** --- 382,387 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 292,295 **** --- 389,397 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + if (!$query_id) { *************** *** 349,352 **** --- 451,456 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 354,357 **** --- 458,466 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[(int) $query_id])) { Index: mssql_odbc.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/db/mssql_odbc.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mssql_odbc.php 7 Mar 2008 00:59:02 -0000 1.15 --- mssql_odbc.php 31 Oct 2008 18:53:49 -0000 1.16 *************** *** 48,51 **** --- 48,74 ---- $this->dbname = $database; + $max_size = @ini_get('odbc.defaultlrl'); + if (!empty($max_size)) + { + $unit = strtolower(substr($max_size, -1, 1)); + $max_size = (int) $max_size; + + if ($unit == 'k') + { + $max_size = floor($max_size / 1024); + } + else if ($unit == 'g') + { + $max_size *= 1024; + } + else if (is_numeric($unit)) + { + $max_size = floor((int) ($max_size . $unit) / 1048576); + } + $max_size = max(8, $max_size) . 'M'; + + @ini_set('odbc.defaultlrl', $max_size); + } + $this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword); *************** *** 268,271 **** --- 291,296 ---- function sql_rowseek($rownum, $query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 273,276 **** --- 298,311 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_rowseek($rownum, $query_id); + } + + if (!$query_id) + { + return false; + } + $this->sql_freeresult($query_id); $query_id = $this->sql_query($this->last_query_text); *************** *** 319,322 **** --- 354,359 ---- function sql_freeresult($query_id = false) { + global $mx_cache; + if (!$query_id) { *************** *** 324,327 **** --- 361,369 ---- } + if (isset($mx_cache->sql_rowset[$query_id])) + { + return $mx_cache->sql_freeresult($query_id); + } + if (isset($this->open_queries[(int) $query_id])) { |
|
From: FlorinCB <ory...@us...> - 2008-10-31 12:16:37
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7523 Modified Files: mx_functions_tools.php Log Message: this will allow pafiledb to post phpbb3 comments, some to do torog Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** mx_functions_tools.php 14 Oct 2008 04:43:40 -0000 1.47 --- mx_functions_tools.php 31 Oct 2008 11:41:08 -0000 1.48 *************** *** 3125,3129 **** $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata, $phpBB2; // --- 3125,3129 ---- $smilies_on = 1) { ! global $db, $phpbb_root_path, $phpEx, $board_config, $user_ip, $portal_config, $lang, $userdata, $mx_user, $phpbb_auth, $phpBB2, $mx_bbcode; // *************** *** 3245,3257 **** if ( $mode == 'newtopic' || $mode == 'reply' ) { ! $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $user_id . ", '$username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $user_attach_sig)"; } else { $edited_sql = !$is_last_post ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; ! $sql = "UPDATE " . POSTS_TABLE . " SET post_username = '$username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $user_attach_sig" . $edited_sql . " WHERE post_id = $post_id"; } ! if ( !$db->sql_query( $sql ) ) { $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); --- 3245,3297 ---- if ( $mode == 'newtopic' || $mode == 'reply' ) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! ! case 'phpbb2': ! $sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $user_id . ", '$username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $user_attach_sig)"; ! break; ! ! case 'phpbb3': ! $sql_data = array( ! 'post_id' => (int) $post_id, ! 'topic_id' => (int) $topic_id, ! 'forum_id' => (int) $forum_id, ! 'poster_id' => (int) $mx_user->data['user_id'], ! 'icon_id' => (!empty($icon_id)) ? $icon_id : 0, ! 'poster_ip' => $mx_user->ip, ! 'post_time' => $current_time, ! 'post_approved' => (!$phpbb_auth->acl_get('f_noapprove', $forum_id) && !$phpbb_auth->acl_get('m_approve', $forum_id)) ? 0 : 1, ! 'enable_bbcode' => !empty($bbcode_on) ? $bbcode_on : 0, ! 'enable_smilies' => !empty($smilies_on) ? $smilies_on : 0, ! 'enable_magic_url' => !empty($bbcode_on) ? $bbcode_on : 0, ! 'enable_sig' => $user_attach_sig, ! 'post_username' => $username, ! 'post_subject' => $subject, ! 'post_text' => $mx_bbcode->bbcode_nl2br($message), ! 'post_checksum' => md5($message), ! 'post_attachment' => (!empty($attachment_data)) ? 1 : 0, ! 'bbcode_bitfield' => 'lNg=', ! 'bbcode_uid' => $bbcode_uid, ! 'post_postcount' => ($phpbb_auth->acl_get('f_postcount', $forum_id)) ? 1 : 0, ! 'post_edit_locked' => !empty($post_edit_locked) ? $post_edit_locked : 0 ! ); ! ! $sql = "INSERT INTO " . POSTS_TABLE . $db->sql_build_array('INSERT', $sql_data); ! break; ! } ! } else { $edited_sql = !$is_last_post ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; ! ! $sql = "UPDATE " . POSTS_TABLE . " ! SET post_username = '$username', enable_bbcode = $bbcode_on, enable_smilies = $smilies_on, enable_sig = $user_attach_sig" . $edited_sql . " ! WHERE post_id = $post_id"; //Temp fix - removed html_on } ! if ( !$db->sql_query($sql) ) { $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); *************** *** 3263,3278 **** // insert the actual post text for our new post // ! if ( $mode == 'newtopic' || $mode == 'reply' ) ! { ! $sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')"; ! } ! else { ! $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$message', bbcode_uid = '$bbcode_uid', post_subject = '$subject' WHERE post_id = $post_id"; ! } ! if ( !$db->sql_query( $sql ) ) ! { ! $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); } --- 3303,3330 ---- // insert the actual post text for our new post // ! switch (PORTAL_BACKEND) { ! case 'internal': ! break; ! ! case 'phpbb2': ! if ( $mode == 'newtopic' || $mode == 'reply' ) ! { ! $sql = "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$subject', '$bbcode_uid', '$message')"; ! } ! else ! { ! $sql = "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$message', bbcode_uid = '$bbcode_uid', post_subject = '$subject' WHERE post_id = $post_id"; ! } ! ! if ( !$db->sql_query( $sql ) ) ! { ! $error_die_function( GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql ); ! } ! ! break; ! case 'phpbb3': ! break; } *************** *** 3323,3327 **** // add the search words for our new/edited post // ! add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); // --- 3375,3391 ---- // add the search words for our new/edited post // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! break; ! ! case 'phpbb2': ! $phpBB2->add_search_words('single', $post_id, stripslashes($message), stripslashes($subject)); ! ! break; ! case 'phpbb3': ! //To do ! break; ! } // |
|
From: FlorinCB <ory...@us...> - 2008-10-28 04:48:40
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv18421 Modified Files: core.php Log Message: fix Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** core.php 28 Oct 2008 04:36:24 -0000 1.16 --- core.php 28 Oct 2008 04:48:26 -0000 1.17 *************** *** 867,871 **** else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx_append_sid(PHPBB_URL . "memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } --- 867,871 ---- else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx3_append_sid(PHPBB_URL . "memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } |
|
From: FlorinCB <ory...@us...> - 2008-10-28 04:40:24
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17966 Modified Files: mx_online.php Log Message: fix Index: mx_online.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_online.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** mx_online.php 27 Oct 2008 04:50:35 -0000 1.30 --- mx_online.php 28 Oct 2008 04:40:16 -0000 1.31 *************** *** 381,385 **** else { ! $legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $mx_user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>'; } } --- 381,385 ---- else { ! $legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . mx3_append_sid(PHPBB_URL . "memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $mx_user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>'; } } |
|
From: FlorinCB <ory...@us...> - 2008-10-28 04:36:32
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv17847 Modified Files: core.php Log Message: fix Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** core.php 26 Oct 2008 04:00:04 -0000 1.15 --- core.php 28 Oct 2008 04:36:24 -0000 1.16 *************** *** 867,871 **** else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } --- 867,871 ---- else { ! $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx_append_sid(PHPBB_URL . "memberlist.$phpEx", 'mode=viewprofile'); $profile_url .= '&u=' . (int) $user_id; } |
|
From: FlorinCB <ory...@us...> - 2008-10-27 04:50:45
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv331 Modified Files: mx_online.php Log Message: fix Index: mx_online.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_online.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** mx_online.php 4 Oct 2008 07:04:38 -0000 1.29 --- mx_online.php 27 Oct 2008 04:50:35 -0000 1.30 *************** *** 117,121 **** if ($row['user_allow_viewonline']) { ! $user_online_link = mx_get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); $logged_visible_online++; } --- 117,121 ---- if ($row['user_allow_viewonline']) { ! $user_online_link = $mx_backend->get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); $logged_visible_online++; } *************** *** 291,295 **** } $newest_style_color = 'style="color:#' . $newest_color . '"'; ! $newest_user = sprintf($lang['Newest_user'], '<a href="' . mx_append_sid(PHPBB_URL."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '"' . $style_color .'>', $newest_username, '</a>'); break; --- 291,295 ---- } $newest_style_color = 'style="color:#' . $newest_color . '"'; ! $newest_user = sprintf($lang['Newest_user'], $mx_backend->get_username_string('full', $newest_uid, $newest_username, $newest_color)); break; *************** *** 297,301 **** $newest_color = $board_config['newest_user_colour']; $newest_style_color = ($newest_color) ? ' style="color:#' . $newest_color . '" class="username-coloured"' : ''; ! $newest_user = sprintf($mx_user->lang['NEWEST_USER'], mx_get_username_string('full', $newest_uid, $newest_username, $newest_color)); break; } --- 297,301 ---- $newest_color = $board_config['newest_user_colour']; $newest_style_color = ($newest_color) ? ' style="color:#' . $newest_color . '" class="username-coloured"' : ''; ! $newest_user = sprintf($mx_user->lang['NEWEST_USER'], $mx_backend->get_username_string('full', $newest_uid, $newest_username, $newest_color)); break; } *************** *** 409,413 **** while ($row = $db->sql_fetchrow($result)) { ! $birthday_list .= (($birthday_list != '') ? ', ' : '') . mx_get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); if ($age = (int) substr($row['user_birthday'], -4)) --- 409,413 ---- while ($row = $db->sql_fetchrow($result)) { ! $birthday_list .= (($birthday_list != '') ? ', ' : '') . $mx_backend->get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']); if ($age = (int) substr($row['user_birthday'], -4)) |