mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Localise days/months, fix bug in validate_username ... this doesn't see functions.php split, working on that separately
git-svn-id: file:///svn/phpbb/trunk@2274 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2275d7716f
commit
66eb4b2c16
1 changed files with 18 additions and 2 deletions
|
@ -329,7 +329,20 @@ function decode_ip($int_ip)
|
||||||
//
|
//
|
||||||
function create_date($format, $gmepoch, $tz)
|
function create_date($format, $gmepoch, $tz)
|
||||||
{
|
{
|
||||||
return @gmdate($format, $gmepoch + (3600 * $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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -448,7 +461,10 @@ function validate_username($username)
|
||||||
{
|
{
|
||||||
if ( $row = $db->sql_fetchrow($result) )
|
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']);
|
if ( ( $userdata['session_logged_in'] && $row['username'] != $userdata['username'] ) || !$userdata['session_logged_in'] )
|
||||||
|
{
|
||||||
|
return array('error' => true, 'error_msg' => $lang['Username_taken']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue