|
From: Paul S. O. <ps...@us...> - 2002-03-06 00:40:34
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv27209/includes
Modified Files:
functions.php
Log Message:
Localise days/months, fix bug in validate_username ... this doesn't see functions.php split, working on that separately
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -r1.122 -r1.123
*** functions.php 4 Mar 2002 13:43:35 -0000 1.122
--- functions.php 6 Mar 2002 00:40:31 -0000 1.123
***************
*** 330,334 ****
function create_date($format, $gmepoch, $tz)
{
! return @gmdate($format, $gmepoch + (3600 * $tz));
}
--- 330,347 ----
function create_date($format, $gmepoch, $tz)
{
! global $board_config, $lang;
!
! $result = @gmdate($format, $gmepoch + (3600 * $tz));
!
! if ( $board_config['default_lang'] != 'english' )
! {
! @reset($lang['datetime']);
! while ( list($match, $replace) = @each($lang['datetime']) )
! {
! $result = str_replace($match, $replace, $result);
! }
! }
!
! return $result;
}
***************
*** 449,453 ****
if ( $row = $db->sql_fetchrow($result) )
{
! return ( $userdata['session_logged_in'] ) ? ( ( $row['username'] != $userdata['username'] ) ? array('error' => true, 'error_msg' => $lang['Username_taken']) : array('error' => false, 'error_msg' => '') ) : array('error' => true, 'error_msg' => $lang['Username_taken']);
}
}
--- 462,469 ----
if ( $row = $db->sql_fetchrow($result) )
{
! if ( ( $userdata['session_logged_in'] && $row['username'] != $userdata['username'] ) || !$userdata['session_logged_in'] )
! {
! return array('error' => true, 'error_msg' => $lang['Username_taken']);
! }
}
}
|