|
From: Paul S. O. <ps...@us...> - 2002-04-20 00:22:31
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv5403
Modified Files:
common.php groupcp.php modcp.php posting.php privmsg.php
search.php update_script.php upgrade.php viewforum.php
viewonline.php viewtopic.php
Log Message:
merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
Index: common.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/common.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** common.php 18 Mar 2002 23:45:24 -0000 1.74
--- common.php 20 Apr 2002 00:22:27 -0000 1.75
***************
*** 30,98 ****
//
! // addslashes to vars if magic_quotes_gpc is off
! // this is a security precaution to prevent someone
! // trying to break out of a SQL statement.
//
! if( !get_magic_quotes_gpc() )
{
! if( is_array($HTTP_GET_VARS) )
{
! while( list($k, $v) = each($HTTP_GET_VARS) )
{
! if( is_array($HTTP_GET_VARS[$k]) )
! {
! while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
! {
! $HTTP_GET_VARS[$k][$k2] = addslashes($v2);
! }
! @reset($HTTP_GET_VARS[$k]);
! }
! else
! {
! $HTTP_GET_VARS[$k] = addslashes($v);
! }
}
- @reset($HTTP_GET_VARS);
- }
! if( is_array($HTTP_POST_VARS) )
! {
! while( list($k, $v) = each($HTTP_POST_VARS) )
! {
! if( is_array($HTTP_POST_VARS[$k]) )
! {
! while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
! {
! $HTTP_POST_VARS[$k][$k2] = addslashes($v2);
! }
! @reset($HTTP_POST_VARS[$k]);
! }
! else
! {
! $HTTP_POST_VARS[$k] = addslashes($v);
! }
! }
! @reset($HTTP_POST_VARS);
}
! if( is_array($HTTP_COOKIE_VARS) )
! {
! while( list($k, $v) = each($HTTP_COOKIE_VARS) )
! {
! if( is_array($HTTP_COOKIE_VARS[$k]) )
! {
! while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
! {
! $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
! }
! @reset($HTTP_COOKIE_VARS[$k]);
! }
! else
! {
! $HTTP_COOKIE_VARS[$k] = addslashes($v);
! }
! }
! @reset($HTTP_COOKIE_VARS);
! }
}
--- 30,55 ----
//
! // addslashes to vars if magic_quotes_gpc is off this is a security precaution
! // to prevent someone trying to break out of a SQL statement.
//
! function slash_input_data(&$data)
{
! if ( is_array($data) )
{
! while( list($k, $v) = each($data) )
{
! $data[$k] = ( is_array($v) ) ? slash_input_data($v) : addslashes($v);
}
! @reset($data);
}
+ return $data;
+ }
! if ( !get_magic_quotes_gpc() )
! {
! $HTTP_GET_VARS = slash_input_data($HTTP_GET_VARS);
! $HTTP_POST_VARS = slash_input_data($HTTP_POST_VARS);
! $HTTP_COOKIE_VARS = slash_input_data($HTTP_COOKIE_VARS);
}
***************
*** 102,113 ****
// URI params
//
! $board_config = Array();
! $userdata = Array();
! $theme = Array();
! $images = Array();
! $lang = Array();
$gen_simple_header = FALSE;
! @include($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") )
--- 59,70 ----
// URI params
//
! $board_config = array();
! $userdata = array();
! $theme = array();
! $images = array();
! $lang = array();
$gen_simple_header = FALSE;
! require($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") )
***************
*** 116,125 ****
}
! include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
! include($phpbb_root_path . 'includes/db.'.$phpEx);
//
--- 73,269 ----
}
! // Debug Level
! define('DEBUG', 1); // Debugging on
! //define('DEBUG', 0); // Debugging off
!
!
! // User Levels <- Do not change the values of USER or ADMIN
! define('ANONYMOUS', -1);
! define('USER', 0);
! define('ADMIN', 1);
! define('MOD', 2);
!
!
! // User related
! define('USER_ACTIVATION_NONE', 0);
! define('USER_ACTIVATION_SELF', 1);
! define('USER_ACTIVATION_ADMIN', 2);
!
! define('USER_AVATAR_NONE', 0);
! define('USER_AVATAR_UPLOAD', 1);
! define('USER_AVATAR_REMOTE', 2);
! define('USER_AVATAR_GALLERY', 3);
!
!
! // Group settings
! define('GROUP_OPEN', 0);
! define('GROUP_CLOSED', 1);
! define('GROUP_HIDDEN', 2);
!
!
! // Forum state
! define('FORUM_UNLOCKED', 0);
! define('FORUM_LOCKED', 1);
!
!
! // Topic status
! define('TOPIC_UNLOCKED', 0);
! define('TOPIC_LOCKED', 1);
! define('TOPIC_MOVED', 2);
! define('TOPIC_WATCH_NOTIFIED', 1);
! define('TOPIC_WATCH_UN_NOTIFIED', 0);
!
!
! // Topic types
! define('POST_NORMAL', 0);
! define('POST_STICKY', 1);
! define('POST_ANNOUNCE', 2);
! define('POST_GLOBAL_ANNOUNCE', 3);
!
!
! // SQL codes
! define('BEGIN_TRANSACTION', 1);
! define('END_TRANSACTION', 2);
!
!
! // Error codes
! define('GENERAL_MESSAGE', 200);
! define('GENERAL_ERROR', 202);
! define('CRITICAL_MESSAGE', 203);
! define('CRITICAL_ERROR', 204);
!
!
! // Private messaging
! define('PRIVMSGS_READ_MAIL', 0);
! define('PRIVMSGS_NEW_MAIL', 1);
! define('PRIVMSGS_SENT_MAIL', 2);
! define('PRIVMSGS_SAVED_IN_MAIL', 3);
! define('PRIVMSGS_SAVED_OUT_MAIL', 4);
! define('PRIVMSGS_UNREAD_MAIL', 5);
!
!
! // URL PARAMETERS
! define('POST_TOPIC_URL', 't');
! define('POST_CAT_URL', 'c');
! define('POST_FORUM_URL', 'f');
! define('POST_USERS_URL', 'u');
! define('POST_POST_URL', 'p');
! define('POST_GROUPS_URL', 'g');
!
! // Session parameters
! define('SESSION_METHOD_COOKIE', 100);
! define('SESSION_METHOD_GET', 101);
!
!
! // Page numbers for session handling
! define('PAGE_INDEX', 0);
! define('PAGE_LOGIN', -1);
! define('PAGE_SEARCH', -2);
! define('PAGE_REGISTER', -3);
! define('PAGE_PROFILE', -4);
! define('PAGE_VIEWONLINE', -6);
! define('PAGE_VIEWMEMBERS', -7);
! define('PAGE_FAQ', -8);
! define('PAGE_POSTING', -9);
! define('PAGE_PRIVMSGS', -10);
! define('PAGE_GROUPCP', -11);
! define('PAGE_TOPIC_OFFSET', 5000);
!
!
! // Auth settings
! define('AUTH_LIST_ALL', 0);
! define('AUTH_ALL', 0);
!
! define('AUTH_REG', 1);
! define('AUTH_ACL', 2);
! define('AUTH_MOD', 3);
! define('AUTH_ADMIN', 5);
!
! define('AUTH_VIEW', 1);
! define('AUTH_READ', 2);
! define('AUTH_POST', 3);
! define('AUTH_REPLY', 4);
! define('AUTH_EDIT', 5);
! define('AUTH_DELETE', 6);
! define('AUTH_ANNOUNCE', 7);
! define('AUTH_STICKY', 8);
! define('AUTH_POLLCREATE', 9);
! define('AUTH_VOTE', 10);
! define('AUTH_ATTACH', 11);
!
!
! // Table names
! define('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');
! define('BANLIST_TABLE', $table_prefix.'banlist');
! define('CATEGORIES_TABLE', $table_prefix.'categories');
! define('CONFIG_TABLE', $table_prefix.'config');
! define('DISALLOW_TABLE', $table_prefix.'disallow');
! define('FORUMS_TABLE', $table_prefix.'forums');
! define('GROUPS_TABLE', $table_prefix.'groups');
! define('POSTS_TABLE', $table_prefix.'posts');
! define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
! define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
! define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
! define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
! define('PRUNE_TABLE', $table_prefix.'forum_prune');
! define('RANKS_TABLE', $table_prefix.'ranks');
! define('SEARCH_TABLE', $table_prefix.'search_results');
! define('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');
! define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');
! define('SESSIONS_TABLE', $table_prefix.'sessions');
! define('SMILIES_TABLE', $table_prefix.'smilies');
! define('THEMES_TABLE', $table_prefix.'themes');
! define('THEMES_NAME_TABLE', $table_prefix.'themes_name');
! define('TOPICS_TABLE', $table_prefix.'topics');
! define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
! define('USER_GROUP_TABLE', $table_prefix.'user_group');
! define('USERS_TABLE', $table_prefix.'users');
! define('WORDS_TABLE', $table_prefix.'words');
! define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
! define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
! define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
!
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
!
! switch($dbms)
! {
! case 'mysql':
! include($phpbb_root_path . 'db/mysql.'.$phpEx);
! break;
!
! case 'mysql4':
! include($phpbb_root_path . 'db/mysql4.'.$phpEx);
! break;
!
! case 'postgres':
! include($phpbb_root_path . 'db/postgres7.'.$phpEx);
! break;
!
! case 'mssql':
! include($phpbb_root_path . 'db/mssql.'.$phpEx);
! break;
!
! case 'oracle':
! include($phpbb_root_path . 'db/oracle.'.$phpEx);
! break;
!
! case 'msaccess':
! include($phpbb_root_path . 'db/msaccess.'.$phpEx);
! break;
!
! case 'mssql-odbc':
! include($phpbb_root_path . 'db/mssql-odbc.'.$phpEx);
! break;
! }
!
! // Make the database connection.
! $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
! if ( !$db->db_connect_id )
! {
! message_die(CRITICAL_ERROR, "Could not connect to the database");
! }
//
***************
*** 171,184 ****
$sql = "SELECT *
FROM " . CONFIG_TABLE;
! if(!$result = $db->sql_query($sql))
{
! message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
! else
{
! while($row = $db->sql_fetchrow($result))
! {
! $board_config[$row['config_name']] = $row['config_value'];
! }
}
--- 315,326 ----
$sql = "SELECT *
FROM " . CONFIG_TABLE;
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(CRITICAL_ERROR, 'Could not query config information', '', __LINE__, __FILE__, $sql);
}
!
! while($row = $db->sql_fetchrow($result))
{
! $board_config[$row['config_name']] = $row['config_value'];
}
***************
*** 186,190 ****
// Show 'Board is disabled' message if needed.
//
! if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
--- 328,332 ----
// Show 'Board is disabled' message if needed.
//
! if ( $board_config['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN') )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -r1.58 -r1.59
*** groupcp.php 3 Apr 2002 22:24:56 -0000 1.58
--- groupcp.php 20 Apr 2002 00:22:27 -0000 1.59
***************
*** 30,34 ****
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
{
! global $lang, $images, $board_config;
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' ';
--- 30,34 ----
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
{
! global $lang, $images, $board_config, $phpEx;
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' ';
***************
*** 208,212 ****
if ( !$userdata['session_logged_in'] )
{
! header($header_location . ppend_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
--- 208,212 ----
if ( !$userdata['session_logged_in'] )
{
! header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
}
***************
*** 309,313 ****
if ( $cancel )
{
! header($header_location . ppend_sid("groupcp.$phpEx", true));
}
elseif ( !$userdata['session_logged_in'] )
--- 309,313 ----
if ( $cancel )
{
! header($header_location . append_sid("groupcp.$phpEx", true));
}
elseif ( !$userdata['session_logged_in'] )
***************
*** 913,917 ****
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_PM' => $lang['Private_Message'],
! 'L_EMAIL' => $lang['Email'],
'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'],
--- 913,918 ----
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_PM' => $lang['Private_Message'],
! 'L_EMAIL' => $lang['Email'],
! 'L_POSTS' => $lang['Posts'],
'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'],
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/modcp.php,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -r1.71 -r1.72
*** modcp.php 4 Apr 2002 11:41:32 -0000 1.71
--- modcp.php 20 Apr 2002 00:22:27 -0000 1.72
***************
*** 344,348 ****
for($i = 0; $i < count($topics); $i++)
{
! $hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . $topics[$i] . '" />';
}
}
--- 344,348 ----
for($i = 0; $i < count($topics); $i++)
{
! $hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . intval($topics[$i]) . '" />';
}
}
***************
*** 392,396 ****
for($i = 0; $i < count($topics); $i++)
{
! $topic_list .= ( ( $topic_list != '' ) ? ', ' : '' ) . $topics[$i];
}
--- 392,396 ----
for($i = 0; $i < count($topics); $i++)
{
! $topic_list .= ( ( $topic_list != '' ) ? ', ' : '' ) . intval($topics[$i]);
}
***************
*** 625,629 ****
}
! $new_forum_id = $HTTP_POST_VARS['new_forum_id'];
$topic_time = time();
--- 625,629 ----
}
! $new_forum_id = intval($HTTP_POST_VARS['new_forum_id']);
$topic_time = time();
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.159
retrieving revision 1.160
diff -C2 -r1.159 -r1.160
*** posting.php 1 Apr 2002 20:07:51 -0000 1.159
--- posting.php 20 Apr 2002 00:22:27 -0000 1.160
***************
*** 83,97 ****
{
$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
! $post_append = "";
}
else if ( $forum_id )
{
$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
! $post_append = "";
}
else
{
$redirect = "index.$phpEx";
! $post_append = "";
}
--- 83,97 ----
{
$redirect = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
! $post_append = '';
}
else if ( $forum_id )
{
$redirect = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id";
! $post_append = '';
}
else
{
$redirect = "index.$phpEx";
! $post_append = '';
}
***************
*** 443,447 ****
if ( !empty($HTTP_POST_VARS['vote_id']) )
{
! $vote_option_id = $HTTP_POST_VARS['vote_id'];
$sql = "SELECT vd.vote_id
--- 443,447 ----
if ( !empty($HTTP_POST_VARS['vote_id']) )
{
! $vote_option_id = intval($HTTP_POST_VARS['vote_id']);
$sql = "SELECT vd.vote_id
***************
*** 872,876 ****
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
! if ( $post_data['topic_type'] == POST_STICKY )
{
$topic_type_toggle .= ' checked="checked"';
--- 872,876 ----
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
! if ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY )
{
$topic_type_toggle .= ' checked="checked"';
***************
*** 882,886 ****
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
! if ( $post_data['topic_type'] == POST_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
--- 882,886 ----
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
! if ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
***************
*** 891,895 ****
if ( $topic_type_toggle != '' )
{
! $topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . ' ' . $topic_type_toggle;
}
}
--- 891,895 ----
if ( $topic_type_toggle != '' )
{
! $topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . ' ' . $topic_type_toggle;
}
}
***************
*** 1083,1085 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 1083,1085 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/privmsg.php,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** privmsg.php 31 Mar 2002 00:06:33 -0000 1.96
--- privmsg.php 20 Apr 2002 00:22:28 -0000 1.97
***************
*** 100,108 ****
}
! $start = ( !empty($HTTP_GET_VARS['start']) ) ? $HTTP_GET_VARS['start'] : 0;
if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
{
! $privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? $HTTP_POST_VARS[POST_POST_URL] : $HTTP_GET_VARS[POST_POST_URL];
}
else
--- 100,108 ----
}
! $start = ( !empty($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
if ( isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]) )
{
! $privmsg_id = ( isset($HTTP_POST_VARS[POST_POST_URL]) ) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
***************
*** 174,178 ****
if ( !empty($HTTP_GET_VARS[POST_POST_URL]) )
{
! $privmsgs_id = $HTTP_GET_VARS[POST_POST_URL];
}
else
--- 174,178 ----
if ( !empty($HTTP_GET_VARS[POST_POST_URL]) )
{
! $privmsgs_id = intval($HTTP_GET_VARS[POST_POST_URL]);
}
else
***************
*** 473,479 ****
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
! if ( !empty($privmsg['user_viewemail']) || $is_auth['auth_mod'] )
{
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $privmsg['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
--- 473,479 ----
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
! if ( !empty($privmsg['user_viewemail']) || $userdata['user_level'] == ADMIN )
{
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $user_id_from) : 'mailto:' . $privmsg['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
***************
*** 911,915 ****
if ( !$userdata['session_logged_in'] )
{
! $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . $HTTP_GET_VARS[POST_USERS_URL] : '';
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
--- 911,915 ----
if ( !$userdata['session_logged_in'] )
{
! $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : '';
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true));
***************
*** 1038,1042 ****
$msg_time = time();
! if ( $mode != "edit" )
{
//
--- 1038,1042 ----
$msg_time = time();
! if ( $mode != 'edit' )
{
//
***************
*** 1088,1092 ****
}
! if ( $mode != "edit" )
{
$privmsg_sent_id = $db->sql_nextid();
--- 1088,1092 ----
}
! if ( $mode != 'edit' )
{
$privmsg_sent_id = $db->sql_nextid();
***************
*** 1226,1230 ****
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) )
{
! $user_id = $HTTP_GET_VARS[POST_USERS_URL];
$sql = "SELECT username
--- 1226,1230 ----
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) )
{
! $user_id = intval($HTTP_GET_VARS[POST_USERS_URL]);
$sql = "SELECT username
***************
*** 1746,1750 ****
if ( $submit_msgdays && ( !empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays']) ) )
{
! $msg_days = ( !empty($HTTP_POST_VARS['msgdays']) ) ? $HTTP_POST_VARS['msgdays'] : $HTTP_GET_VARS['msgdays'];
$min_msg_time = time() - ($msg_days * 86400);
--- 1746,1750 ----
if ( $submit_msgdays && ( !empty($HTTP_POST_VARS['msgdays']) || !empty($HTTP_GET_VARS['msgdays']) ) )
{
! $msg_days = ( !empty($HTTP_POST_VARS['msgdays']) ) ? intval($HTTP_POST_VARS['msgdays']) : intval($HTTP_GET_VARS['msgdays']);
$min_msg_time = time() - ($msg_days * 86400);
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/search.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -r1.72 -r1.73
*** search.php 31 Mar 2002 19:13:06 -0000 1.72
--- search.php 20 Apr 2002 00:22:28 -0000 1.73
***************
*** 116,124 ****
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
- //
- // Define some globally used data
- //
$sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']);
- $sort_by_sql = array('p.post_time', 'pt.post_subject', 't.topic_title', 'u.username', 'f.forum_id');
//
--- 116,120 ----
***************
*** 162,166 ****
else
{
! header("Location: login.$phpEx?redirect=search&search_id=newposts");
exit;
}
--- 158,162 ----
else
{
! header("Location: login.$phpEx?redirect=search.$phpEx&search_id=newposts", true);
exit;
}
***************
*** 180,184 ****
else
{
! header("Location: login.$phpEx?redirect=search&search_id=egosearch");
exit;
}
--- 176,180 ----
else
{
! header("Location: login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true);
exit;
}
***************
*** 447,452 ****
else if ( $search_author != '' || $search_time || $auth_sql != '' )
{
! $where_sql = ( $search_author == '' && $auth_sql == '' ) ? "post_id IN (" . implode(', ', $search_ids) . ")" : "p.post_id IN (" . implode(", ", $search_ids) . ")";
! $from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . " p";
if ( $search_time )
--- 443,448 ----
else if ( $search_author != '' || $search_time || $auth_sql != '' )
{
! $where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_ids) . ')' : 'p.post_id IN (' . implode(', ', $search_ids) . ')';
! $from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . ' p';
if ( $search_time )
***************
*** 641,648 ****
AND u2.user_id = p2.poster_id";
}
!
$per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
! $sql .= " ORDER BY " . $sort_by_sql[$sort_by] . " $sort_dir LIMIT $start, " . $per_page;
if ( !$result = $db->sql_query($sql) )
--- 637,663 ----
AND u2.user_id = p2.poster_id";
}
!
$per_page = ( $show_results == 'posts' ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
! $sql .= " ORDER BY ";
! switch ( $sort_by )
! {
! case 1:
! $sql .= ( $show_results == 'posts' ) ? 'pt.post_subject' : 't.topic_title';
! break;
! case 2:
! $sql .= 't.topic_title';
! break;
! case 3:
! $sql .= 'u.username';
! break;
! case 4:
! $sql .= 'f.forum_id';
! break;
! default:
! $sql .= ( $show_results == 'posts' ) ? 'p.post_time' : 'p2.post_time';
! break;
! }
! $sql .= " $sort_dir LIMIT $start, " . $per_page;
if ( !$result = $db->sql_query($sql) )
***************
*** 726,730 ****
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']);
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] . "&highlight=$highlight_active");
! $post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['post_id'] . "&highlight=$highlight_active#" . $searchset[$i]['post_id']);
$post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
--- 741,745 ----
$forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $searchset[$i]['forum_id']);
$topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $searchset[$i]['topic_id'] . "&highlight=$highlight_active");
! $post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $searchset[$i]['post_id'] . "&highlight=$highlight_active") . '#' . $searchset[$i]['post_id'];
$post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
***************
*** 1299,1301 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 1314,1316 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: update_script.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/update_script.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** update_script.php 4 Apr 2002 21:44:36 -0000 1.1
--- update_script.php 20 Apr 2002 00:22:28 -0000 1.2
***************
*** 21,38 ****
if ( $row = $db->sql_fetchrow($result) )
{
! if ( $row['config_value'] != '.1.0 [20020402]' )
{
! $sql = "UPDATE " . CONFIG_TABLE . "
! SET config_value = '.1.0 [20020402]'
! WHERE config_name = 'version'";
! if ( !($result = $db->sql_query($sql)) )
{
! die("Couldn't update version info");
}
-
- die("UPDATING COMPLETE");
}
}
echo "\n<br />\n<b>COMPLETE!</b><br />\n";
--- 21,61 ----
if ( $row = $db->sql_fetchrow($result) )
{
! $sql = array();
! switch ( $row['config_value'] )
{
! case '.1.0 [20020402]':
! echo 'Updating from [20020402] :: ';
! flush();
!
! $sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
! VALUES ('session_gc', '3600')";
! $sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
! VALUES ('session_last_gc', '0')";
!
! echo '<span style="color:green">DONE</span><br /><br />';
! break;
! default;
! echo 'No updates made<br /><br />';
! }
!
! if ( count($sql) )
! {
! for($i = 0; $i < count($sql); $i++)
{
! if ( !($result = $db->sql_query($sql[$i])) )
! {
! die("Couldn't run update >> " . $sql);
! }
}
}
}
+ $sql = "UPDATE " . CONFIG_TABLE . "
+ SET config_value = '.1.0 [20020420]'
+ WHERE config_name = 'version'";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ die("Couldn't update version info");
+ }
echo "\n<br />\n<b>COMPLETE!</b><br />\n";
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/upgrade.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** upgrade.php 25 Mar 2002 20:28:11 -0000 1.27
--- upgrade.php 20 Apr 2002 00:22:28 -0000 1.28
***************
*** 162,166 ****
}
! function smiley_replace($text = "")
{
global $db;
--- 162,166 ----
}
! function smiley_replace($text = '')
{
global $db;
***************
*** 187,191 ****
}
! return ( $text != "" ) ? preg_replace($search, $replace, $text) : "";
}
--- 187,191 ----
}
! return ( $text != '' ) ? preg_replace($search, $replace, $text) : '';
}
***************
*** 202,221 ****
$line = $schemafile[$i];
! if ( preg_match("/^CREATE TABLE (\w+)/i", $line, $matches) )
{
// Start of a new table definition, set some variables and go to the next line.
$tabledata = 1;
// Replace the 'phpbb_' prefix by the user defined prefix.
! $table = str_replace("phpbb_", $table_prefix, $matches[1]);
$table_def[$table] = "CREATE TABLE $table (\n";
continue;
}
! if ( preg_match("/^\);/", $line) )
{
// End of the table definition
// After this we will skip everything until the next 'CREATE' line
$tabledata = 0;
! $table_def[$table] .= ")"; // We don't need the closing semicolon
}
--- 202,221 ----
$line = $schemafile[$i];
! if ( preg_match('/^CREATE TABLE (\w+)/i', $line, $matches) )
{
// Start of a new table definition, set some variables and go to the next line.
$tabledata = 1;
// Replace the 'phpbb_' prefix by the user defined prefix.
! $table = str_replace('phpbb_', $table_prefix, $matches[1]);
$table_def[$table] = "CREATE TABLE $table (\n";
continue;
}
! if ( preg_match('/^\);/', $line) )
{
// End of the table definition
// After this we will skip everything until the next 'CREATE' line
$tabledata = 0;
! $table_def[$table] .= ')'; // We don't need the closing semicolon
}
***************
*** 225,229 ****
// Add the current line to the complete table definition:
$table_def[$table] .= $line;
! if ( preg_match("/^\s*(\w+)\s+(\w+)\((\d+)\)(.*)$/", $line, $matches) )
{
// This is a column definition
--- 225,229 ----
// Add the current line to the complete table definition:
$table_def[$table] .= $line;
! if ( preg_match('/^\s*(\w+)\s+(\w+)\(([\d,]+)\)(.*)$/', $line, $matches) )
{
// This is a column definition
***************
*** 232,240 ****
$size = $matches[3];
! preg_match("/DEFAULT (NULL|\'.*?\')[,\s](.*)$/i", $matches[4], $match);
$default = $match[1];
! $notnull = ( preg_match("/NOT NULL/i", $matches[4]) ) ? 1 : 0;
! $auto_increment = ( preg_match("/auto_increment/i", $matches[4]) ) ? 1 : 0;
$field_def[$table][$field] = array(
--- 232,240 ----
$size = $matches[3];
! preg_match('/DEFAULT (NULL|\'.*?\')[,\s](.*)$/i', $matches[4], $match);
$default = $match[1];
! $notnull = ( preg_match('/NOT NULL/i', $matches[4]) ) ? 1 : 0;
! $auto_increment = ( preg_match('/auto_increment/i', $matches[4]) ) ? 1 : 0;
$field_def[$table][$field] = array(
***************
*** 247,261 ****
}
! if ( preg_match("/\s*PRIMARY\s+KEY\s*\((.*)\).*/", $line, $matches) )
{
// Primary key
$key_def[$table]['PRIMARY'] = $matches[1];
}
! else if ( preg_match("/\s*KEY\s+(\w+)\s*\((.*)\)/", $line, $matches) )
{
// Normal key
$key_def[$table][$matches[1]] = $matches[2];
}
! else if ( preg_match("/^\s*(\w+)\s*(.*?),?\s*$/", $line, $matches) )
{
// Column definition
--- 247,261 ----
}
! if ( preg_match('/\s*PRIMARY\s+KEY\s*\((.*)\).*/', $line, $matches) )
{
// Primary key
$key_def[$table]['PRIMARY'] = $matches[1];
}
! else if ( preg_match('/\s*KEY\s+(\w+)\s*\((.*)\)/', $line, $matches) )
{
// Normal key
$key_def[$table][$matches[1]] = $matches[2];
}
! else if ( preg_match('/^\s*(\w+)\s*(.*?),?\s*$/', $line, $matches) )
{
// Column definition
***************
*** 281,289 ****
global $table_prefix;
! $insertfile = file("db/schemas/mysql_basic.sql");
for($i = 0; $i < count($insertfile); $i++)
{
! if ( preg_match("/(INSERT INTO (\w+)\s.*);/i", str_replace("phpbb_", $table_prefix, $insertfile[$i]), $matches) )
{
$returnvalue[$matches[2]][] = $matches[1];
--- 281,289 ----
global $table_prefix;
! $insertfile = file('db/schemas/mysql_basic.sql');
for($i = 0; $i < count($insertfile); $i++)
{
! if ( preg_match('/(INSERT INTO (\w+)\s.*);/i', str_replace('phpbb_', $table_prefix, $insertfile[$i]), $matches) )
{
$returnvalue[$matches[2]][] = $matches[1];
***************
*** 324,337 ****
{
// Undo [code]
! $code_start_html = "<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>";
! $code_end_html = "</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->";
! $message = str_replace($code_start_html, "[code]", $message);
! $message = str_replace($code_end_html, "[/code]", $message);
// Undo [quote]
! $quote_start_html = "<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>";
! $quote_end_html = "</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->";
! $message = str_replace($quote_start_html, "[quote]", $message);
! $message = str_replace($quote_end_html, "[/quote]", $message);
// Undo [b] and [i]
--- 324,337 ----
{
// Undo [code]
! $code_start_html = '<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Code:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><PRE>';
! $code_end_html = '</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode End -->';
! $message = str_replace($code_start_html, '[code]', $message);
! $message = str_replace($code_end_html, '[/code]', $message);
// Undo [quote]
! $quote_start_html = '<!-- BBCode Quote Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>';
! $quote_end_html = '</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->';
! $message = str_replace($quote_start_html, '[quote]', $message);
! $message = str_replace($quote_end_html, '[/quote]', $message);
// Undo [b] and [i]
***************
*** 354,368 ****
// <li> tags:
! $message = str_replace("<!-- BBCode --><LI>", "[*]", $message);
// [list] tags:
! $message = str_replace("<!-- BBCode ulist Start --><UL>", "[list]", $message);
// [list=x] tags:
! $message = preg_replace("#<!-- BBCode olist Start --><OL TYPE=([A1])>#si", "[list=\\1]", $message);
// [/list] tags:
! $message = str_replace("</UL><!-- BBCode ulist End -->", "[/list]", $message);
! $message = str_replace("</OL><!-- BBCode olist End -->", "[/list]", $message);
return $message;
--- 354,368 ----
// <li> tags:
! $message = str_replace('<!-- BBCode --><LI>', '[*]', $message);
// [list] tags:
! $message = str_replace('<!-- BBCode ulist Start --><UL>', '[list]', $message);
// [list=x] tags:
! $message = preg_replace('#<!-- BBCode olist Start --><OL TYPE=([A1])>#si', "[list=\\1]", $message);
// [/list] tags:
! $message = str_replace('</UL><!-- BBCode ulist End -->', '[/list]', $message);
! $message = str_replace('</OL><!-- BBCode olist End -->', '[/list]', $message);
return $message;
***************
*** 1076,1080 ****
$row['post_text'] = bbdecode(stripslashes($row['post_text']));
$row['post_text'] = undo_make_clickable($row['post_text']);
! $row['post_text'] = str_replace("<BR>", "\n", $row['post_text']);
// make a uid
--- 1076,1080 ----
$row['post_text'] = bbdecode(stripslashes($row['post_text']));
$row['post_text'] = undo_make_clickable($row['post_text']);
! $row['post_text'] = str_replace('<BR>', "\n", $row['post_text']);
// make a uid
***************
*** 1087,1098 ****
$edited_sql = "";
! if ( preg_match("/^(.*?)([\n]+<font size=\-1>\[ This message was .*?)$/s", $row['post_text'], $matches) )
{
$row['post_text'] = $matches[1];
$edit_info = $matches[2];
! $edit_times = count(explode(" message ", $edit_info)) - 1; // Taken from example for substr_count in annotated PHP manual
! if ( preg_match("/^.* by: (.*?) on (....)-(..)-(..) (..):(..) \]<\/font>/s", $edit_info, $matches) )
{
$edited_user = $matches[1];
--- 1087,1098 ----
$edited_sql = "";
! if ( preg_match('/^(.*?)([\n]+<font size=\-1>\[ This message was .*?)$/s', $row['post_text'], $matches) )
{
$row['post_text'] = $matches[1];
$edit_info = $matches[2];
! $edit_times = count(explode(' message ', $edit_info)) - 1; // Taken from example for substr_count in annotated PHP manual
! if ( preg_match('/^.* by: (.*?) on (....)-(..)-(..) (..):(..) \]<\/font>/s', $edit_info, $matches) )
{
$edited_user = $matches[1];
***************
*** 1131,1135 ****
if ( $inc == $per_pct )
{
! print ".";
flush();
$inc = 0;
--- 1131,1135 ----
if ( $inc == $per_pct )
{
! print '.';
flush();
$inc = 0;
***************
*** 1260,1264 ****
if ( $inc == $per_pct )
{
! print ".";
flush();
$inc = 0;
--- 1260,1264 ----
if ( $inc == $per_pct )
{
! print '.';
flush();
$inc = 0;
***************
*** 1280,1284 ****
{
// Check if this moderator and this forum still exist
! $sql = "SELECT NULL
FROM " . USERS_TABLE . ", " . FORUMS_TABLE . "
WHERE user_id = " . $row['user_id'] . "
--- 1280,1284 ----
{
// Check if this moderator and this forum still exist
! $sql = "SELECT user_id
FROM " . USERS_TABLE . ", " . FORUMS_TABLE . "
WHERE user_id = " . $row['user_id'] . "
***************
*** 1310,1313 ****
--- 1310,1342 ----
print "<span class=\"ok\"><b>OK</b></span><br />\n";
}
+
+ print " * Setting correct user_level for moderators ::";
+ flush();
+
+ $sql = "SELECT DISTINCT u.user_id
+ FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
+ WHERE aa.auth_mod = 1
+ AND ug.group_id = aa.group_id
+ AND u.user_id = ug.user_id
+ AND u.user_level <> " . ADMIN;
+ $result = query($sql, "Couldn't obtain list of moderators");
+
+ if ( $row = $db->sql_fetchrow($result) )
+ {
+ $ug_sql = '';
+
+ do
+ {
+ $ug_sql .= ( ( $ug_sql != '' ) ? ', ' : '' ) . $row['user_id'];
+ }
+ while ( $row = $db->sql_fetchrow($result) );
+
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_level = " . MOD . "
+ WHERE user_id IN ($ug_sql)";
+ query($sql, "Couldn't set moderator status for users");
+ }
+
+ print "<span class=\"ok\"><b>OK</b></span><br />\n";
end_step('convert_privforums');
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -r1.139 -r1.140
*** viewforum.php 4 Apr 2002 11:47:43 -0000 1.139
--- viewforum.php 20 Apr 2002 00:22:28 -0000 1.140
***************
*** 35,39 ****
else if ( isset($HTTP_GET_VARS['forum']))
{
! $forum_id = $HTTP_GET_VARS['forum'];
}
else
--- 35,39 ----
else if ( isset($HTTP_GET_VARS['forum']))
{
! $forum_id = intval($HTTP_GET_VARS['forum']);
}
else
Index: viewonline.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewonline.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -r1.54 -r1.55
*** viewonline.php 4 Apr 2002 11:25:56 -0000 1.54
--- viewonline.php 20 Apr 2002 00:22:28 -0000 1.55
***************
*** 80,88 ****
// Get user list
//
! $sql = "SELECT u.user_id, u.username, u.user_session_time, u.user_session_page, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
! AND ( s.session_time >= ".( time() - 300 ) . "
! OR u.user_session_time >= " . ( time() - 300 ) . " )
ORDER BY u.username ASC, s.session_ip ASC";
if ( !($result = $db->sql_query($sql)) )
--- 80,87 ----
// Get user list
//
! $sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
! AND s.session_time >= ".( time() - 300 ) . "
ORDER BY u.username ASC, s.session_ip ASC";
if ( !($result = $db->sql_query($sql)) )
***************
*** 135,141 ****
}
- $last_update = $row['user_session_time'];
- $user_page = $row['user_session_page'];
-
$which_counter = 'reg_counter';
$which_row = 'reg_user_row';
--- 134,137 ----
***************
*** 147,157 ****
if ( $row['session_ip'] != $prev_ip )
{
$view_online = true;
$guest_users++;
- $username = $lang['Guest'];
- $last_update = $row['session_time'];
- $user_page = $row['session_page'];
-
$which_counter = 'guest_counter';
$which_row = 'guest_user_row';
--- 143,150 ----
if ( $row['session_ip'] != $prev_ip )
{
+ $username = $lang['Guest'];
$view_online = true;
$guest_users++;
$which_counter = 'guest_counter';
$which_row = 'guest_user_row';
***************
*** 163,169 ****
if ( $view_online )
{
! if ( $user_page < 1 || !$is_auth_ary[$user_page]['auth_view'] )
{
! switch( $user_page )
{
case PAGE_INDEX:
--- 156,162 ----
if ( $view_online )
{
! if ( $row['session_page'] < 1 || !$is_auth_ary[$row['session_page']]['auth_view'] )
{
! switch( $row['session_page'] )
{
case PAGE_INDEX:
***************
*** 210,215 ****
else
{
! $location_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $user_page);
! $location = $forum_data[$user_page];
}
--- 203,208 ----
else
{
! $location_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $row['session_page']);
! $location = $forum_data[$row['session_page']];
}
***************
*** 221,225 ****
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
! 'LASTUPDATE' => create_date($board_config['default_dateformat'], $last_update, $board_config['board_timezone']),
'FORUM_LOCATION' => $location,
--- 214,218 ----
'ROW_CLASS' => $row_class,
'USERNAME' => $username,
! 'LASTUPDATE' => create_date($board_config['default_dateformat'], $row['session_time'], $board_config['board_timezone']),
'FORUM_LOCATION' => $location,
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.186
retrieving revision 1.187
diff -C2 -r1.186 -r1.187
*** viewtopic.php 31 Mar 2002 00:06:34 -0000 1.186
--- viewtopic.php 20 Apr 2002 00:22:28 -0000 1.187
***************
*** 991,995 ****
$temp_url = append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
! $delpost_img = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
}
else
--- 991,995 ----
$temp_url = append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
! $delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
}
else
|