aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-06 00:40:31 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-06 00:40:31 +0000
commit66eb4b2c1694a7fcbee5016dd42e25f5b735bb56 (patch)
treeca340a97f8b29d883cd2a400392fccf5915f150d
parent2275d7716f27413ad522de46984fdc77a9d26d27 (diff)
downloadforums-66eb4b2c1694a7fcbee5016dd42e25f5b735bb56.tar
forums-66eb4b2c1694a7fcbee5016dd42e25f5b735bb56.tar.gz
forums-66eb4b2c1694a7fcbee5016dd42e25f5b735bb56.tar.bz2
forums-66eb4b2c1694a7fcbee5016dd42e25f5b735bb56.tar.xz
forums-66eb4b2c1694a7fcbee5016dd42e25f5b735bb56.zip
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
-rw-r--r--phpBB/includes/functions.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c6bff2ce34..244f4d579a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -329,7 +329,20 @@ function decode_ip($int_ip)
//
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) )
{
- 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']);
+ }
}
}