|
From: Jon O. <jon...@us...> - 2007-09-09 19:35:48
|
Update of /cvsroot/mxbb/mx_bugsbt/bugsbt/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2027/bugsbt/includes Modified Files: functions.php functions_admin.php functions_bugsbt.php functions_comment.php Log Message: for 2.9.x Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_bugsbt/bugsbt/includes/functions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions.php 6 Aug 2007 21:12:27 -0000 1.8 --- functions.php 9 Sep 2007 19:35:11 -0000 1.9 *************** *** 99,103 **** global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $user_ip, $session_length, $starttime; ! global $userdata, $mx_bugsbt; global $mx_root_path, $module_root_path, $is_block, $phpEx; --- 99,103 ---- global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $user_ip, $session_length, $starttime; ! global $userdata, $mx_user, $mx_bugsbt; global $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 110,115 **** --- 110,118 ---- if ( $mode == 'window' ) { + /* $userdata = session_pagestart( $user_ip, $page_id ); init_userprefs( $userdata ); + */ + $mx_user->init($user_ip, PAGE_INDEX); $gen_simple_header = true; *************** *** 184,188 **** $template->assign_vars( array( 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) ) ); } --- 187,191 ---- $template->assign_vars( array( 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => mx_append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) ) ); } Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_bugsbt/bugsbt/includes/functions_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_admin.php 5 May 2007 20:18:03 -0000 1.2 --- functions_admin.php 9 Sep 2007 19:35:11 -0000 1.3 *************** *** 64,77 **** $category_name = $category['category_name']; ! $temp_url = append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=edit&cat=$category_id" ); $edit = '<a href="' . $temp_url . '">'.$lang['Edit'].'</a>'; ! $temp_url = append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=delete&cat=$category_id" ); $delete = '<a href="' . $temp_url . '" class="gen">'.$lang['Delete'].'</a>'; ! $temp_url = append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=up&cat=$category_id" ); $up = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_up'] . '</a>'; ! $temp_url = append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=down&cat=$category_id" ); $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; --- 64,77 ---- $category_name = $category['category_name']; ! $temp_url = mx_append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=edit&cat=$category_id" ); $edit = '<a href="' . $temp_url . '">'.$lang['Edit'].'</a>'; ! $temp_url = mx_append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=delete&cat=$category_id" ); $delete = '<a href="' . $temp_url . '" class="gen">'.$lang['Delete'].'</a>'; ! $temp_url = mx_append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=up&cat=$category_id" ); $up = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_up'] . '</a>'; ! $temp_url = mx_append_sid( $module_root_path . "admin/admin_bugsbt.$phpEx?action=cat_manage&mode=down&cat=$category_id" ); $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_bugsbt/bugsbt/includes/functions_comment.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_comment.php 12 Jul 2007 22:43:55 -0000 1.3 --- functions_comment.php 9 Sep 2007 19:35:11 -0000 1.4 *************** *** 19,56 **** * */ ! class mx_bugsbt_comments { - // - // Comments - // - var $cid = ''; // comment id - var $comments_type = ''; // internal or phpbb - [...1414 lines suppressed...] ! $sql = "SELECT * ! FROM " . RANKS_TABLE . " ! ORDER BY rank_special, rank_min"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, "Could not obtain ranks information.", '', __LINE__, __FILE__, $sql ); } ! $ranks = array(); ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $ranks[] = $row; } $db->sql_freeresult( $result ); ! $mx_bugsbt_cache->put( 'ranks', $ranks ); } } } Index: functions_bugsbt.php =================================================================== RCS file: /cvsroot/mxbb/mx_bugsbt/bugsbt/includes/functions_bugsbt.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_bugsbt.php 10 Aug 2007 18:34:46 -0000 1.6 --- functions_bugsbt.php 9 Sep 2007 19:35:11 -0000 1.7 *************** *** 599,604 **** // Format the date for the given file // =================================================== ! $bug_date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['bug_date'], $board_config['board_timezone'] ); ! $bug_update_date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['bug_update_date'], $board_config['board_timezone'] ); // --- 599,604 ---- // Format the date for the given file // =================================================== ! $bug_date = phpBB2::create_date( $board_config['default_dateformat'], $file_rowset[$i]['bug_date'], $board_config['board_timezone'] ); ! $bug_update_date = phpBB2::create_date( $board_config['default_dateformat'], $file_rowset[$i]['bug_update_date'], $board_config['board_timezone'] ); // *************** *** 630,634 **** // author information // ! $author = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; --- 630,634 ---- // author information // ! $author = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . mx_append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; *************** *** 638,642 **** $bug_title = strlen($file_rowset[$i]['bug_title']) > 30 ? substr($file_rowset[$i]['bug_title'], 0, 30) . '...' : $file_rowset[$i]['bug_title']; ! $bug_url = append_sid( $this->this_mxurl( "mode=bug&k=$bug_id" ) ); $bug_description = !empty($file_rowset[$i]['bug_description']) ? '<br />- ' . (strlen($file_rowset[$i]['bug_description']) > 30 ? substr($file_rowset[$i]['bug_description'], 0, 30) . '...' : $file_rowset[$i]['bug_description']) : ''; --- 638,642 ---- $bug_title = strlen($file_rowset[$i]['bug_title']) > 30 ? substr($file_rowset[$i]['bug_title'], 0, 30) . '...' : $file_rowset[$i]['bug_title']; ! $bug_url = mx_append_sid( $this->this_mxurl( "mode=bug&k=$bug_id" ) ); $bug_description = !empty($file_rowset[$i]['bug_description']) ? '<br />- ' . (strlen($file_rowset[$i]['bug_description']) > 30 ? substr($file_rowset[$i]['bug_description'], 0, 30) . '...' : $file_rowset[$i]['bug_description']) : ''; *************** *** 712,716 **** break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'mode=cat&cat=' . $cat_row['category_id'] ) ) . '" class=' . $class . '>' . $cat_row['category_name'] . '</a>'; } /* --- 712,716 ---- break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . mx_append_sid( $this->this_mxurl( 'mode=cat&cat=' . $cat_row['category_id'] ) ) . '" class=' . $class . '>' . $cat_row['category_name'] . '</a>'; } /* *************** *** 729,733 **** break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a> '; } } --- 729,733 ---- break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a> '; } } *************** *** 779,783 **** $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( $this->this_mxurl( 'mode=cat&cat=' . $parent_cat_id ) ) ) ); } --- 779,783 ---- $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => mx_append_sid( $this->this_mxurl( 'mode=cat&cat=' . $parent_cat_id ) ) ) ); } *************** *** 786,790 **** $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['category_name'], ! 'U_VIEW_CAT' => append_sid( $this->this_mxurl( 'mode=cat&cat=' . $this->cat_rowset[$cat_id]['category_id'] ) ) ) ); } --- 786,790 ---- $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['category_name'], ! 'U_VIEW_CAT' => mx_append_sid( $this->this_mxurl( 'mode=cat&cat=' . $this->cat_rowset[$cat_id]['category_id'] ) ) ) ); } *************** *** 963,967 **** $category_name = $category['category_name']; ! $category_url = append_sid( $this->this_mxurl( "mode=cat&cat=$category_id" ) ); $num_of_cats++; --- 963,967 ---- $category_name = $category['category_name']; ! $category_url = mx_append_sid( $this->this_mxurl( "mode=cat&cat=$category_id" ) ); $num_of_cats++; *************** *** 972,980 **** if ( !empty( $last_file_info['article_id'] ) && $this->auth_user[$category_id]['auth_view'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['article_date'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['article_title'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['article_title'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['article_title'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'mode=article&k=' . $last_file_info['article_id'] ) ) . '" alt="' . stripslashes( $last_file_info['article_title'] ) . '" title="' . stripslashes( $last_file_info['article_title'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'mode=article&k=' . $last_file_info['article_id'] ) ) . '"><img src="' . $images['bugsbt_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 972,980 ---- if ( !empty( $last_file_info['article_id'] ) && $this->auth_user[$category_id]['auth_view'] ) { ! $last_file_time = phpBB2::create_date( $board_config['default_dateformat'], $last_file_info['article_date'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['article_title'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['article_title'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['article_title'] ); ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'mode=article&k=' . $last_file_info['article_id'] ) ) . '" alt="' . stripslashes( $last_file_info['article_title'] ) . '" title="' . stripslashes( $last_file_info['article_title'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'mode=article&k=' . $last_file_info['article_id'] ) ) . '"><img src="' . $images['bugsbt_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 1133,1137 **** // Format the date for the given file // =================================================== ! $article_date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['article_date'], $board_config['board_timezone'] ); // // If the file is new then put a new image in front of it --- 1133,1137 ---- // Format the date for the given file // =================================================== ! $article_date = phpBB2::create_date( $board_config['default_dateformat'], $file_rowset[$i]['article_date'], $board_config['board_timezone'] ); // // If the file is new then put a new image in front of it *************** *** 1144,1148 **** $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['file_catid']]['category_name'] : ''; ! $cat_url = append_sid( $this->this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['article_category_id'] ) ); $article_description = $file_rowset[$i]['article_description'] ; --- 1144,1148 ---- $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['file_catid']]['category_name'] : ''; ! $cat_url = mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['article_category_id'] ) ); $article_description = $file_rowset[$i]['article_description'] ; *************** *** 1158,1162 **** // author information // ! $author = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; --- 1158,1162 ---- // author information // ! $author = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . mx_append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $author .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; *************** *** 1166,1170 **** $article_title = $file_rowset[$i]['article_title']; ! $article_url = append_sid( $this->this_mxurl( "mode=article&k=$article_id" ) ); // =================================================== --- 1166,1170 ---- $article_title = $file_rowset[$i]['article_title']; ! $article_url = mx_append_sid( $this->this_mxurl( "mode=article&k=$article_id" ) ); // =================================================== *************** *** 1183,1187 **** 'ARTICLE_VOTES' => $file_rowset[$i]['total_votes'], 'L_RATING' => $lang['Votes_label'], ! //'DO_RATE' => $this->auth_user[$cat_id]['auth_rate'] ? '<a href="' . append_sid( $this->this_mxurl( 'mode=rate&k=' . $file_rowset[$i]['article_id'] ) ) . '">' . $lang['ADD_RATING'] . '</a>' : '', 'RATING' => $rating, --- 1183,1187 ---- 'ARTICLE_VOTES' => $file_rowset[$i]['total_votes'], 'L_RATING' => $lang['Votes_label'], ! //'DO_RATE' => $this->auth_user[$cat_id]['auth_rate'] ? '<a href="' . mx_append_sid( $this->this_mxurl( 'mode=rate&k=' . $file_rowset[$i]['article_id'] ) ) . '">' . $lang['ADD_RATING'] . '</a>' : '', 'RATING' => $rating, *************** *** 1281,1290 **** 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "mode=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $bugsbt_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $bugsbt_config['pagination'] ) + 1 ), ceil( $total_file / $bugsbt_config['pagination'] ) ), 'ID' => $cat_id, 'START' => $start, ! 'S_ACTION_SORT' => append_sid( $this->this_mxurl( "mode=$action" ) ) ) ); } --- 1281,1290 ---- 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => phpBB2::generate_pagination( mx_append_sid( $this->this_mxurl( "mode=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $bugsbt_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $bugsbt_config['pagination'] ) + 1 ), ceil( $total_file / $bugsbt_config['pagination'] ) ), 'ID' => $cat_id, 'START' => $start, ! 'S_ACTION_SORT' => mx_append_sid( $this->this_mxurl( "mode=$action" ) ) ) ); } *************** *** 1844,1848 **** $row = $db->sql_fetchrow( $result ); ! $temp_url = append_sid( $this->this_mxurl( 'mode=cat&cat=' . $row['category_id'] ) ); $path_kb_array[] .= ' » <a href="' . $temp_url . '" class="nav">' . $row['category_name'] . '</a> '; --- 1844,1848 ---- $row = $db->sql_fetchrow( $result ); ! $temp_url = mx_append_sid( $this->this_mxurl( 'mode=cat&cat=' . $row['category_id'] ) ); $path_kb_array[] .= ' » <a href="' . $temp_url . '" class="nav">' . $row['category_name'] . '</a> '; |