Update of /cvsroot/phpbb-php5mod/phpbb-php5
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28399
Modified Files:
groupcp.php login.php privmsg.php viewtopic.php
Log Message:
- phpBB 2.0.15
- some bug fixes courtesy of astute users
- a few long arrays turned to short ones
Index: login.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/login.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** login.php 20 Nov 2004 01:01:10 -0000 1.3
--- login.php 8 May 2005 02:12:43 -0000 1.4
***************
*** 53,59 ****
if( isset($_POST['login']) || isset($_GET['login']) || isset($_POST['logout']) || isset($_GET['logout']) )
{
! if( ( isset($_POST['login']) || isset($_GET['login']) ) && !$userdata['session_logged_in'] )
{
! $username = isset($HTTP_POST_VARS['username']) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
--- 53,59 ----
if( isset($_POST['login']) || isset($_GET['login']) || isset($_POST['logout']) || isset($_GET['logout']) )
{
! if( ( isset($_POST['login']) || isset($_GET['login']) ) && (!$userdata['session_logged_in'] || isset($_POST['admin'])) )
{
! $username = isset($_POST['username']) ? phpbb_clean_username($_POST['username']) : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
***************
*** 78,82 ****
$autologin = ( isset($_POST['autologin']) ) ? TRUE : 0;
! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin);
if( $session_id )
--- 78,83 ----
$autologin = ( isset($_POST['autologin']) ) ? TRUE : 0;
! $admin = (isset($_POST['admin'])) ? 1 : 0;
! $session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin);
if( $session_id )
***************
*** 159,163 ****
// user not already logged in
//
! if( !$userdata['session_logged_in'] )
{
$page_title = $lang['Login'];
--- 160,164 ----
// user not already logged in
//
! if( !$userdata['session_logged_in'] || (isset($_GET['admin']) && $userdata['session_logged_in'] && $userdata['user_level'] == ADMIN))
{
$page_title = $lang['Login'];
***************
*** 208,211 ****
--- 209,213 ----
$s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';
+ $s_hidden_fields .= (isset($_GET['admin'])) ? '<input type="hidden" name="admin" value="1" />' : '';
make_jumpbox('viewforum.'.$phpEx, $forum_id);
***************
*** 213,218 ****
'USERNAME' => $username,
! 'L_ENTER_PASSWORD' => $lang['Enter_password'],
! 'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
--- 215,219 ----
'USERNAME' => $username,
! 'L_ENTER_PASSWORD' => (isset($_GET['admin'])) ? $lang['Admin_reauthenticate'] : $lang['Enter_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/groupcp.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** groupcp.php 20 Nov 2004 01:01:10 -0000 1.3
--- groupcp.php 8 May 2005 02:12:43 -0000 1.4
***************
*** 338,342 ****
}
! if ( !($row = $db->sql_fetchrow($result)) )
{
$sql = "UPDATE " . USERS_TABLE . "
--- 338,342 ----
}
! if ( !($row = $db->sql_fetchrow($result)) || $row['is_auth_mod'] == 0)
{
$sql = "UPDATE " . USERS_TABLE . "
***************
*** 473,477 ****
if ( isset($_POST['add']) )
{
! $username = ( isset($_POST['username']) ) ? phpbb_clean_username($HTTP_POST_VARS['username']) : '';
$sql = "SELECT user_id, user_email, user_lang, user_level
--- 473,477 ----
if ( isset($_POST['add']) )
{
! $username = ( isset($_POST['username']) ) ? phpbb_clean_username($_POST['username']) : '';
$sql = "SELECT user_id, user_email, user_lang, user_level
Index: privmsg.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/privmsg.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** privmsg.php 16 Apr 2005 21:02:23 -0000 1.4
--- privmsg.php 8 May 2005 02:12:43 -0000 1.5
***************
*** 1133,1137 ****
if ( !empty($_POST['username']) )
{
! $to_username = phpbb_clean_username($HTTP_POST_VARS['username']);
$sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active
--- 1133,1137 ----
if ( !empty($_POST['username']) )
{
! $to_username = phpbb_clean_username($_POST['username']);
$sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** viewtopic.php 16 Apr 2005 21:02:23 -0000 1.7
--- viewtopic.php 8 May 2005 02:12:43 -0000 1.8
***************
*** 1108,1113 ****
// This was shamelessly 'borrowed' from volker at multiartstudio dot de
// via php.net's annotated manual
! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1)); }
!
//
// Replace naughty words
--- 1108,1112 ----
// This was shamelessly 'borrowed' from volker at multiartstudio dot de
// via php.net's annotated manual
! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
//
// Replace naughty words
|