diff --git a/trunk/functions.pl b/trunk/functions.pl
index 1653836..7fedb44 100644
--- a/trunk/functions.pl
+++ b/trunk/functions.pl
@@ -6,13 +6,13 @@ sub get_userinfo_from_sid
my ($sid) = @_;
#prepare query
- my $sth = $dbh->prepare(qq{select id, username, locale, pagesize from users where sid = ?}) or die $dbh->errstr;
+ my $sth = $dbh->prepare(qq{select id, username, pagesize from users where sid = ?}) or die $dbh->errstr;
#execute it
$sth->execute($sid) or die $dbh->errstr;
#save the resulting username
- ($userinfo->{'id'}, $userinfo->{'username'}, $userinfo->{'locale'}, $userinfo->{'pagesize'}) = $sth->fetchrow_array();
+ ($userinfo->{'id'}, $userinfo->{'username'}, $userinfo->{'pagesize'}) = $sth->fetchrow_array();
#finish query
$sth->finish() or die $dbh->errstr;
@@ -26,19 +26,10 @@ sub get_page_array
#get parameters
my (@userinfo) = @_;
- #if user is logged in, use his locale setting and check for new upload status
- if($userinfo->{'username'})
+ ($page->{'locale'}) = $query->http('HTTP_ACCEPT_LANGUAGE') =~ /^([^,]+),.*$/;
+ if (!$page->{'locale'})
{
- $page->{'locale'} = $userinfo->{'locale'};
- }
- #else get the locale from the http server variable
- else
- {
- ($page->{'locale'}) = $query->http('HTTP_ACCEPT_LANGUAGE') =~ /^([^,]+),.*$/;
- unless($page->{'locale'})
- {
- $page->{'locale'} = "en_us";
- }
+ $page->{'locale'} = "en_us";
}
$page->{'username'} = $userinfo->{'username'};
diff --git a/trunk/init_sql.pl b/trunk/init_sql.pl
index 522f1eb..dc97444 100644
--- a/trunk/init_sql.pl
+++ b/trunk/init_sql.pl
@@ -39,7 +39,6 @@ $dbh->do(qq{create table
password char(41) not null,
sid char(32) not null,
timestamp bigint not null,
- locale varchar(10) not null,
pagesize tinyint unsigned default 5,
primary key (id)
)
diff --git a/trunk/locale/en-us.xml b/trunk/locale/en-us.xml
index cf33969..bea4610 100755
--- a/trunk/locale/en-us.xml
+++ b/trunk/locale/en-us.xml
@@ -205,7 +205,6 @@
account settings for
- locale
choose pagesize
diff --git a/trunk/register.pl b/trunk/register.pl
index 86d933f..c16c4b2 100644
--- a/trunk/register.pl
+++ b/trunk/register.pl
@@ -39,8 +39,8 @@ elsif($query->param('user') and $query->param('pass') and $query->param('pass_re
else
{
#insert new user
- $dbh->do(qq{insert into users (username, password, timestamp, locale) values ( ?, password( ? ), unix_timestamp(), ?)}, undef,
- $query->param("user"), $query->param("pass"), $page->{'locale'}) or die $dbh->errstr;
+ $dbh->do(qq{insert into users (username, password, timestamp) values ( ?, password( ? ), unix_timestamp(), ?)}, undef,
+ $query->param("user"), $query->param("pass")) or die $dbh->errstr;
print $query->redirect("index.pl?information=information_registered");
}
diff --git a/trunk/settings.pl b/trunk/settings.pl
index ee28ff6..6488dba 100644
--- a/trunk/settings.pl
+++ b/trunk/settings.pl
@@ -11,7 +11,7 @@ if($userinfo->{'username'})
{
if($query->param('submit'))
{
- $dbh->do(qq{update users set locale = ?, pagesize = ? where id = ?}, undef, $query->param('locale'), $query->param('pagesize'), $userinfo->{'id'} ) or die $dbh->errstr;
+ $dbh->do(qq{update users set pagesize = ? where id = ?}, undef, $query->param('pagesize'), $userinfo->{'id'} ) or die $dbh->errstr;
$page->{'message'}->{'type'} = "information";
$page->{'message'}->{'text'} = "information_settings_changed";
@@ -24,7 +24,6 @@ if($userinfo->{'username'})
if($userinfo->{'username'})
{
- $page->{'settings'}->{'locale'} = $userinfo->{'locale'};
$page->{'settings'}->{'pagesize'} = $userinfo->{'pagesize'};
}
else
diff --git a/trunk/xsl/xhtml/settings.xsl b/trunk/xsl/xhtml/settings.xsl
index cf755a5..b9b055e 100644
--- a/trunk/xsl/xhtml/settings.xsl
+++ b/trunk/xsl/xhtml/settings.xsl
@@ -21,32 +21,6 @@
-
-
-
-
-
-