Author: cfinck
Date: Sun Jul 29 17:08:23 2007
New Revision: 28000
URL: http://svn.reactos.org/svn/reactos?rev=28000&view=rev
Log:
My modifications for Bugzilla 3.0
These should work with both our Login system and Deskzilla
This is still not final as some things still need to be done, which depend on the server configuration
Added:
trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Login/ROSCMS.pmtrunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Persist/ROSCMS.pmtrunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Verify/ROSCMS.pm
Modified:
trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth.pmtrunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Auth.pmtrunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Common.pmtrunk/web/reactos.org/htdocs/bugzilla/skins/standard/global.csstrunk/web/reactos.org/htdocs/bugzilla/skins/standard/index.csstrunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/acc…trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/pre…trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/footer.htm…trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/header.htm…trunk/web/reactos.org/htdocs/bugzilla/template/en/default/index.html.tmpltrunk/web/reactos.org/htdocs/bugzilla/userprefs.cgi
Modified: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth.pm (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth.pm Sun Jul 29 17:08:23 2007
@@ -34,7 +34,7 @@
use Bugzilla::Error;
use Bugzilla::Auth::Login::Stack;
use Bugzilla::Auth::Verify::Stack;
-use Bugzilla::Auth::Persist::Cookie;
+use Bugzilla::Auth::Persist::ROSCMS;
sub new {
my ($class, $params) = @_;
@@ -48,7 +48,7 @@
$self->{_verifier} = new Bugzilla::Auth::Verify::Stack($params->{Verify});
# If we ever have any other login persistence methods besides cookies,
# this could become more configurable.
- $self->{_persister} = new Bugzilla::Auth::Persist::Cookie();
+ $self->{_persister} = new Bugzilla::Auth::Persist::ROSCMS();
return $self;
}
Added: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Login/ROSCMS.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Login/ROSCMS.pm (added)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Login/ROSCMS.pm Sun Jul 29 17:08:23 2007
@@ -1,0 +1,135 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry(a)mozilla.org>
+# Dan Mosedale <dmose(a)mozilla.org>
+# Joe Robins <jmrobins(a)tgix.com>
+# Dave Miller <justdave(a)syndicomm.com>
+# Christopher Aillon <christopher(a)aillon.com>
+# Gervase Markham <gerv(a)gerv.net>
+# Christian Reis <kiko(a)async.com.br>
+# Bradley Baetz <bbaetz(a)acm.org>
+# Erik Stambaugh <erik(a)dasbistro.com>
+# Max Kanat-Alexander <mkanat(a)bugzilla.org>
+
+# Auth::Login class for RosCMS
+# based on the former class for Bugzilla 2.x by Gé van Geldorp and Michael Wirth and the Auth::Login::CGI class
+# improved and made compatible with Bugzilla 3.x and Deskzilla by Colin Finck (2007-07-29)
+
+package Bugzilla::Auth::Login::ROSCMS;
+use strict;
+use base qw(Bugzilla::Auth::Login);
+use constant can_logout => 0; # The Bugzilla Logout feature has to be disabled, so the user can only log out with the RosCMS Logout feature
+
+use URI;
+use URI::Escape;
+
+use Bugzilla::Constants;
+use Bugzilla::WebService::Constants;
+use Bugzilla::User;
+use Bugzilla::Util;
+use Bugzilla::Error;
+
+my $session_cookie_name = "roscmsusrkey";
+my $roscms_db_name = "roscms";
+my $roscms_login_page = "/roscms/?page=login&target=";
+
+sub get_login_info {
+ my ($self) = @_;
+ my $cgi = Bugzilla->cgi;
+
+ # Check if we have username and password given (usual CGI method for apps like Deskzilla)
+ my $username = trim($cgi->param("Bugzilla_login"));
+ my $password = $cgi->param("Bugzilla_password");
+ $cgi->delete('Bugzilla_login', 'Bugzilla_password');
+
+ if(defined $username && defined $password) {
+ return { username => $username, password => $password };
+ }
+
+ # No, then check for the RosCMS Login cookie
+ my $dbh = Bugzilla->dbh;
+ my $user_id;
+ my $session_id = $cgi->cookie($session_cookie_name);
+ if ( defined $session_id ) {
+ my $session_id_clean = $session_id;
+ trick_taint($session_id_clean);
+ my $remote_addr_clean;
+ if ($ENV{'REMOTE_ADDR'} =~ m/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) {
+ $remote_addr_clean = $1;
+ } else {
+ $remote_addr_clean = 'invalid';
+ }
+ my $browser_agent_clean = $ENV{'HTTP_USER_AGENT'};
+ trick_taint($browser_agent_clean);
+ my $query = "SELECT m.map_subsys_userid " .
+ " FROM $roscms_db_name.user_sessions s, " .
+ " $roscms_db_name.users u, " .
+ " $roscms_db_name.subsys_mappings m " .
+ " WHERE s.usersession_id = ? " .
+ " AND (s.usersession_expires IS NULL OR " .
+ " NOW() <= s.usersession_expires) " .
+ " AND u.user_id = s.usersession_user_id " .
+ " AND (u.user_setting_ipaddress = 'false' OR " .
+ " s.usersession_ipaddress = ?) " .
+ " AND (u.user_setting_browseragent = 'false' OR " .
+ " s.usersession_browseragent = ?) " .
+ " AND m.map_roscms_userid = s.usersession_user_id " .
+ " AND m.map_subsys_name = 'bugzilla'";
+ my @params = ($session_id_clean, $remote_addr_clean, $browser_agent_clean);
+ ($user_id) = $dbh->selectrow_array($query, undef, @params);
+ if ($user_id) {
+ # Update time of last session use
+ $query = "UPDATE $roscms_db_name.user_sessions " .
+ " SET usersession_expires = DATE_ADD(NOW(), INTERVAL 30 MINUTE) " .
+ " WHERE usersession_id = ? " .
+ " AND usersession_expires IS NOT NULL";
+ @params = ($session_id_clean);
+ $dbh->do($query, undef, @params);
+
+ # Get the user name and the crypted password from the database
+ my $username = user_id_to_login($user_id);
+ my $crypted_password = $dbh->selectrow_array("SELECT cryptpassword FROM profiles WHERE userid = ?", undef, $user_id);
+
+ # We need to set a parameter for the Auth::Persist::ROSCMS module
+ $cgi->param('ROSCMS_login', 1);
+
+ return { username => $username, crypted_password => $crypted_password };
+ }
+ }
+
+ return { failure => AUTH_NODATA };
+}
+
+sub fail_nodata {
+ my ($self) = @_;
+ my $cgi = Bugzilla->cgi;
+
+ # Throw up the login page
+ my $this_uri = uri_escape($cgi->url(-absolute=>1, -path_info=>1, -query=>1));
+ print $cgi->redirect($roscms_login_page . $this_uri);
+ exit;
+}
+
+sub requires_persistence {
+ # Persistence is handled by RosCMS
+ return 1;
+}
+
+1;
Added: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Persist/ROSCMS.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Persist/ROSCMS.pm (added)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Persist/ROSCMS.pm Sun Jul 29 17:08:23 2007
@@ -1,0 +1,159 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry(a)mozilla.org>
+# Dan Mosedale <dmose(a)mozilla.org>
+# Joe Robins <jmrobins(a)tgix.com>
+# Dave Miller <justdave(a)syndicomm.com>
+# Christopher Aillon <christopher(a)aillon.com>
+# Gervase Markham <gerv(a)gerv.net>
+# Christian Reis <kiko(a)async.com.br>
+# Bradley Baetz <bbaetz(a)acm.org>
+# Erik Stambaugh <erik(a)dasbistro.com>
+# Max Kanat-Alexander <mkanat(a)bugzilla.org>
+
+# Auth::Persist class for RosCMS
+# developed by Colin Finck based on the Auth::Persist::Cookie class (2007-07-29)
+
+package Bugzilla::Auth::Persist::ROSCMS;
+use strict;
+use fields qw();
+
+use Bugzilla::Constants;
+use Bugzilla::Util;
+use Bugzilla::Token;
+
+use List::Util qw(first);
+
+sub new {
+ my ($class) = @_;
+ my $self = fields::new($class);
+ return $self;
+}
+
+sub persist_login {
+ my ($self, $user) = @_;
+ my $dbh = Bugzilla->dbh;
+ my $cgi = Bugzilla->cgi;
+
+ # When we log in using RosCMS, it handles the persistence itself
+ if( defined $cgi->param('ROSCMS_login') ) {
+ return;
+ }
+
+ my $ip_addr = $cgi->remote_addr;
+ unless ($cgi->param('Bugzilla_restrictlogin') ||
+ Bugzilla->params->{'loginnetmask'} == 32)
+ {
+ $ip_addr = get_netaddr($ip_addr);
+ }
+
+ # The IP address is valid, at least for comparing with itself in a
+ # subsequent login
+ trick_taint($ip_addr);
+
+ my $login_cookie =
+ Bugzilla::Token::GenerateUniqueToken('logincookies', 'cookie');
+
+ $dbh->do("INSERT INTO logincookies (cookie, userid, ipaddr, lastused)
+ VALUES (?, ?, ?, NOW())",
+ undef, $login_cookie, $user->id, $ip_addr);
+
+ # Remember cookie only if admin has told so
+ # or admin didn't forbid it and user told to remember.
+ if ( Bugzilla->params->{'rememberlogin'} eq 'on' ||
+ (Bugzilla->params->{'rememberlogin'} ne 'off' &&
+ $cgi->param('Bugzilla_remember') &&
+ $cgi->param('Bugzilla_remember') eq 'on') )
+ {
+ $cgi->send_cookie(-name => 'Bugzilla_login',
+ -value => $user->id,
+ -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
+ $cgi->send_cookie(-name => 'Bugzilla_logincookie',
+ -value => $login_cookie,
+ -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
+
+ }
+ else {
+ $cgi->send_cookie(-name => 'Bugzilla_login',
+ -value => $user->id);
+ $cgi->send_cookie(-name => 'Bugzilla_logincookie',
+ -value => $login_cookie);
+ }
+}
+
+sub logout {
+ my ($self, $param) = @_;
+
+ my $dbh = Bugzilla->dbh;
+ my $cgi = Bugzilla->cgi;
+ $param = {} unless $param;
+ my $user = $param->{user} || Bugzilla->user;
+ my $type = $param->{type} || LOGOUT_ALL;
+
+ if ($type == LOGOUT_ALL) {
+ $dbh->do("DELETE FROM logincookies WHERE userid = ?",
+ undef, $user->id);
+ return;
+ }
+
+ # The LOGOUT_*_CURRENT options require the current login cookie.
+ # If a new cookie has been issued during this run, that's the current one.
+ # If not, it's the one we've received.
+ my $cookie = first {$_->name eq 'Bugzilla_logincookie'}
+ @{$cgi->{'Bugzilla_cookie_list'}};
+ my $login_cookie;
+ if ($cookie) {
+ $login_cookie = $cookie->value;
+ }
+ else {
+ $login_cookie = $cgi->cookie("Bugzilla_logincookie");
+ }
+ trick_taint($login_cookie);
+
+ # These queries use both the cookie ID and the user ID as keys. Even
+ # though we know the userid must match, we still check it in the SQL
+ # as a sanity check, since there is no locking here, and if the user
+ # logged out from two machines simultaneously, while someone else
+ # logged in and got the same cookie, we could be logging the other
+ # user out here. Yes, this is very very very unlikely, but why take
+ # chances? - bbaetz
+ if ($type == LOGOUT_KEEP_CURRENT) {
+ $dbh->do("DELETE FROM logincookies WHERE cookie != ? AND userid = ?",
+ undef, $login_cookie, $user->id);
+ } elsif ($type == LOGOUT_CURRENT) {
+ $dbh->do("DELETE FROM logincookies WHERE cookie = ? AND userid = ?",
+ undef, $login_cookie, $user->id);
+ } else {
+ die("Invalid type $type supplied to logout()");
+ }
+
+ if ($type != LOGOUT_KEEP_CURRENT) {
+ clear_browser_cookies();
+ }
+
+}
+
+sub clear_browser_cookies {
+ my $cgi = Bugzilla->cgi;
+ $cgi->remove_cookie('Bugzilla_login');
+ $cgi->remove_cookie('Bugzilla_logincookie');
+}
+
+1;
Added: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Verify/ROSCMS.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Verify/ROSCMS.pm (added)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Auth/Verify/ROSCMS.pm Sun Jul 29 17:08:23 2007
@@ -1,0 +1,75 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry(a)mozilla.org>
+# Dan Mosedale <dmose(a)mozilla.org>
+# Joe Robins <jmrobins(a)tgix.com>
+# Dave Miller <justdave(a)syndicomm.com>
+# Christopher Aillon <christopher(a)aillon.com>
+# Gervase Markham <gerv(a)gerv.net>
+# Christian Reis <kiko(a)async.com.br>
+# Bradley Baetz <bbaetz(a)acm.org>
+# Erik Stambaugh <erik(a)dasbistro.com>
+
+# Auth::Verify class for RosCMS
+# developed by Colin Finck based on the Auth::Verify::DB class (2007-07-29)
+
+package Bugzilla::Auth::Verify::ROSCMS;
+use strict;
+use base qw(Bugzilla::Auth::Verify);
+use constant can_change_password => 0; # Password has to be changed at myReactOS
+
+use Bugzilla::Constants;
+use Bugzilla::Token;
+use Bugzilla::Util;
+use Bugzilla::User;
+
+sub check_credentials {
+ my ($self, $login_data) = @_;
+ my $dbh = Bugzilla->dbh;
+
+ my $username = $login_data->{username};
+ my $user_id = login_to_id($username);
+
+ return { failure => AUTH_NO_SUCH_USER } unless $user_id;
+
+ $login_data->{bz_username} = $username;
+
+ my ($real_password_crypted) = $dbh->selectrow_array("SELECT cryptpassword FROM profiles WHERE userid = ?", undef, $user_id);
+ my $entered_password_crypted = $login_data->{crypted_password};
+
+ if( !defined $entered_password_crypted ) {
+ my $password = $login_data->{password};
+
+ # Using the internal crypted password as the salt,
+ # crypt the password the user entered.
+ $entered_password_crypted = crypt($password, $real_password_crypted);
+ }
+
+ return { failure => AUTH_LOGINFAILED }
+ if $entered_password_crypted ne $real_password_crypted;
+
+ # The user's credentials are okay, so delete any outstanding
+ # password tokens they may have generated.
+ Bugzilla::Token::DeletePasswordTokens($user_id, "user_logged_in");
+
+ return $login_data;
+}
+
+1;
Modified: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Auth.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Auth.pm (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Auth.pm Sun Jul 29 17:08:23 2007
@@ -1,4 +1,4 @@
-# -*- Mode: perl; indent-tabs-mode: nil -*-
+# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
@@ -69,7 +69,7 @@
{
name => 'user_info_class',
type => 's',
- choices => [ 'CGI', 'Env', 'Env,CGI' ],
+ choices => [ 'CGI', 'Env', 'Env,CGI', 'ROSCMS' ],
default => 'CGI',
checker => \&check_multi
},
@@ -77,7 +77,7 @@
{
name => 'user_verify_class',
type => 's',
- choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB' ],
+ choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB', 'ROSCMS' ],
default => 'DB',
checker => \&check_user_verify_class
},
Modified: trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Common.pm
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/Bu…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Common.pm (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/Bugzilla/Config/Common.pm Sun Jul 29 17:08:23 2007
@@ -1,4 +1,4 @@
-# -*- Mode: perl; indent-tabs-mode: nil -*-
+# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
@@ -268,6 +268,8 @@
return "Error requiring Net::LDAP: '$@'" if $@;
return "LDAP servername is missing" unless Bugzilla->params->{"LDAPserver"};
return "LDAPBaseDN is empty" unless Bugzilla->params->{"LDAPBaseDN"};
+ } elsif ($class eq 'ROSCMS') {
+ # No params
} else {
return "Unknown user_verify_class '$class' in check_user_verify_class";
}
Modified: trunk/web/reactos.org/htdocs/bugzilla/skins/standard/global.css
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/sk…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/skins/standard/global.css (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/skins/standard/global.css Sun Jul 29 17:08:23 2007
@@ -22,14 +22,6 @@
* Marc Schumann <wurblzap(a)gmail.com>
*/
-/* global (begin) */
- body {
- font-family: sans-serif;
- color: #000;
- background: #fff url("global/body-back.gif") repeat-x;
- }
-/* global (end) */
-
/* header (begin) */
#header {
margin-bottom: 1em;
@@ -37,17 +29,15 @@
}
#header form {
- font-size: 85%;
display: inline;
}
#header .btn,
#header .txt {
- font-size: 80%;
+ font-size: 9pt;
}
#header .links {
- font-size: 85%;
border-left: 1px solid silver;
border-right: 1px solid silver;
border-bottom: 1px solid silver;
@@ -128,7 +118,7 @@
#footer .btn,
#footer .txt {
- font-size: 80%;
+ font-size: 9pt;
}
#footer #useful-links {
@@ -284,7 +274,7 @@
/* Style of the attachment table */
#attachment_table {
border-collapse: collapse;
- width: 40em;
+ width: 47em;
border: 1px solid #333333;
}
Modified: trunk/web/reactos.org/htdocs/bugzilla/skins/standard/index.css
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/sk…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/skins/standard/index.css (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/skins/standard/index.css Sun Jul 29 17:08:23 2007
@@ -48,8 +48,8 @@
width: 250px;
height: 200px;
- margin-top: 2.3em;
- margin-right: 2.3em;
+ margin-top: -15px;
+ margin-right: 5px;
float: right;
background: transparent no-repeat url(index/front.png);
}
Modified: trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/acc…
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/te…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/acc… (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/acc… Sun Jul 29 17:08:23 2007
@@ -25,75 +25,5 @@
# new_login_name: string. The user's new Bugzilla login whilst not confirmed. (optional)
#%]
-<table>
- <tr>
- <td colspan="3">
- Please enter your existing password to confirm account changes.
- </td>
- </tr>
- <tr>
- <th align="right">Password:</th>
- <td>
- <input type="hidden" name="Bugzilla_login"
- value="[% user.login FILTER html %]">
- <input type="password" name="Bugzilla_password">
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr></td>
- </tr>
- [% IF user.authorizer.can_change_password %]
- <tr>
- <th align="right">New password:</th>
- <td>
- <input type="password" name="new_password1">
- </td>
- </tr>
-
- <tr>
- <th align="right">Re-enter new password:</th>
- <td>
- <input type="password" name="new_password2">
- </td>
- </tr>
- [% END %]
-
- <tr>
- <th align="right">Your real name (optional, but encouraged):</th>
- <td>
- <input size="35" name="realname" value="[% realname FILTER html %]">
- </td>
- </tr>
-
- [% IF user.authorizer.can_change_email && Param('allowemailchange') %]
- [% IF login_change_date %]
- [% IF new_login_name %]
- <tr>
- <th align="right">Pending email address:</th>
- <td>[% new_login_name FILTER html %]</td>
- </tr>
- <tr>
- <th align="right">Change request expires:</th>
- <td>[% login_change_date FILTER time %]</td>
- </tr>
- [% ELSE %]
- <tr>
- <th align="right">Confirmed email address:</th>
- <td>[% user.login FILTER html %]</td>
- </tr>
- <tr>
- <th align="right">Completion date:</th>
- <td>[% login_change_date FILTER time %]</td>
- </tr>
- [% END %]
- [% ELSE %]
- <tr>
- <th align="right">New email address:</th>
- <td>
- <input size="35" name="new_login_name">
- </td>
- </tr>
- [% END %]
- [% END %]
-
-</table>
+You can change your account settings (password, email address etc.) in
+<a href="/roscms/?page=user">myReactOS</a><br><br>
Modified: trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/pre…
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/te…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/pre… (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/template/en/default/account/prefs/pre… Sun Jul 29 17:08:23 2007
@@ -1,4 +1,4 @@
-[%# 1.0(a)bugzilla.org %]
+[%# 1.0(a)bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
@@ -50,7 +50,7 @@
{ name => "saved-searches", label => "Saved Searches",
link => "userprefs.cgi?tab=saved-searches", saveable => "1" },
{ name => "account", label => "Name and Password",
- link => "userprefs.cgi?tab=account", saveable => "1" },
+ link => "userprefs.cgi?tab=account", saveable => "0" },
{ name => "permissions", label => "Permissions",
link => "userprefs.cgi?tab=permissions", saveable => "0" } ] %]
Modified: trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/footer.htm…
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/te…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/footer.htm… (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/footer.htm… Sun Jul 29 17:08:23 2007
@@ -45,6 +45,23 @@
<div class="outro"></div>
</div>
+</div>
+</td>
+</tr>
+</table>
+
+<!--
+ links/lynx/etc.. dont handle css (atleast not external
+ files by default) so dont overly depend on it.
+ -->
+<hr size="1">
+
+<address>
+ <p align="center">
+ ReactOS is a trademark of ReactOS Foundation in the United States and other countries.
+ </p>
+</address>
+
</body>
</html>
Modified: trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/header.htm…
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/te…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/header.htm… (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/template/en/default/global/header.htm… Sun Jul 29 17:08:23 2007
@@ -62,7 +62,7 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
- <title>[% title %]</title>
+ <title>ReactOS Homepage - [% title %]</title>
[%# Migration note: contents of the old Param 'headerhtml' would go here %]
@@ -84,6 +84,8 @@
[%+ INCLUDE "global/help-header.html.tmpl" %]
+ <link href="/style.css" type="text/css" rel="stylesheet">
+
[%# Set up the skin CSS cascade:
# 1. Standard Bugzilla stylesheet set (persistent)
# 2. Standard Bugzilla stylesheet set (selectable)
@@ -229,31 +231,93 @@
# 'bannerhtml'
#%]
+<div id="top">
+ <div id="topMenu">
+ <!--
+ Use <p> to align things for links/lynx, then in the css make it
+ margin: 0; and use text-align: left/right/etc;.
+ -->
+ <p align="center">
+ <a href="/?page=index">Home</a> <font color="#ffffff">|</font>
+ <a href="/?page=about">Info</a> <font color="#ffffff">|</font>
+ <a href="/?page=community">Community</a> <font color="#ffffff">|</font>
+ <a href="/?page=dev">Development</a> <font color="#ffffff">|</font>
+ <a href="/roscms/?page=user">myReactOS</a> </p>
+ </div>
+ </div>
+
+<table style="border:0" width="100%" cellpadding="0" cellspacing="0">
+ <tr valign="top">
+ <td style="width:147px" id="leftNav">
+ <div class="navTitle">Navigation</div>
+ <ol>
+ <li><a href="/?page=index">Home</a></li>
+ <li><a href="/?page=about">Info</a></li>
+ <li><a href="/?page=community">Community</a></li>
+ <li><a href="/?page=dev">Development</a></li>
+ <li><a href="/roscms/?page=user">myReactOS</a></li>
+ </ol>
+ <p></p>
+
+<div class="navTitle">Bugzilla</div>
+ <ol>
+ <li><a href="/bugzilla">Main Page</a></li>
+ <li><a href="/bugzilla/enter_bug.cgi">New</a></li>
+ <li><a href="/bugzilla/query.cgi">Search</a></li>
+ <li><a href="/bugzilla/report.cgi">Reports</a></li>
+ <li><a href="/bugzilla/request.cgi">Requests</a></li>
+ </ol>
+ <p></p>
+
+[%# TODO we don't support switching languages yet
+<div class="navTitle">Language</div>
+ <ol>
+ <li>
+ <div align="center">
+ <select id="select" size="1" name="select" class="selectbox" onchange="window.open(this.options[this.selectedIndex].value,'_main')">
+ <optgroup label="current language">
+ <option value="#" selected="selected">English</option>
+ </optgroup>
+ <optgroup label="most popular">
+ <option value="http://www.reactos.org/./[#inc_path_lang]../en/developer.htm">English</option>
+ <option value="http://www.reactos.org/./[#inc_path_lang]../de/developer.htm">Deutsch</option>
+ <option value="http://www.reactos.org/./[#inc_path_lang]../fr/developer.htm">Français</option>
+ </optgroup>
+ <optgroup label="other languages">
+ <option value="#"><placeholder></option>
+ </optgroup>
+ </select>
+ </div>
+ </li>
+ </ol>
+ <p></p>
+%]
+
+<div class="navTitle">Account</div>
+ <ol>
+[% IF user.id %]
+ <li><a href="/roscms/?page=logout">Logout [% user.name %]</a></li>
+[% ELSE %]
+ <li><a href="/roscms/?page=login&target=%2Fbugzilla">Login</a></li>
+[% END %]
+ <li><a href="/roscms/?page=register&target=%2Fbugzilla">Register</a></li>
+ </ol>
+ <p></p>
+</div>
+</td>
+
+<td id="bugzillaContent">
+<div class="contentSmall">
+[% INCLUDE global/banner.html.tmpl %]
+<span class="contentSmallTitle">ReactOS bug tracking and reporting - [% title %]</span>
+
+[%# Migration note: the following file corresponds to the old Param
+ # 'bannerhtml'
+ #%]
<div id="header">
[% INCLUDE global/banner.html.tmpl %]
-
-<table border="0" cellspacing="0" cellpadding="0" id="titles">
-<tr>
- <td id="title">
- <p>[% terms.Bugzilla %]
- [% " – $header" IF header %]</p>
- </td>
-
- [% IF subheader %]
- <td id="subtitle">
- <p class="subheader">[% subheader %]</p>
- </td>
- [% END %]
-
- [% IF header_addl_info %]
- <td id="information">
- <p class="header_addl_info">[% header_addl_info %]</p>
- </td>
- [% END %]
-</tr>
-</table>
[% PROCESS "global/common-links.html.tmpl" btn_id = "find_top" %]
Modified: trunk/web/reactos.org/htdocs/bugzilla/template/en/default/index.html.tmpl
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/te…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/template/en/default/index.html.tmpl (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/template/en/default/index.html.tmpl Sun Jul 29 17:08:23 2007
@@ -114,29 +114,15 @@
<li id="query"><a href="query.cgi">Search existing [% terms.bug %] reports</a></li>
<li id="enter-bug"><a href="enter_bug.cgi">Enter a new [% terms.bug %] report</a></li>
<li id="report"><a href="report.cgi">Summary reports and charts</a></li>
-[% IF user.id %]
- <li id="userprefs"><a href="userprefs.cgi">Change password or user preferences</a></li>
- [% IF user.authorizer.can_logout %]
- <li id="logout"><a href="relogin.cgi">Log out [% user.login FILTER html %]</a></li>
- [% END %]
-[% ELSIF user.authorizer.can_login %]
- </ul>
- [% PROCESS "account/auth/login-small.html.tmpl" %]
- <ul>
- [% IF Param('createemailregexp') && user.authorizer.user_can_create_account %]
- <li id="account"><a href="createaccount.cgi">Open a new [% terms.Bugzilla %] account</a></li>
- [% END %]
+[% IF NOT user.id %]
+ <li id="login"><a href="/roscms/?page=login&target=%2Fbugzilla">Log in to an existing account</a></li>
+ <li id="register"><a href="/roscms/?page=register&target=%2Fbugzilla">Register a new account</a></li>
[% END %]
<li id="sidebar"><a href="javascript:addSidebar()">Add to Sidebar</a> (requires a Mozilla browser like Mozilla Firefox)</li>
<li id="quick_search_plugin">
<a href="javascript:window.external.AddSearchProvider('[% Param('urlbase') %]search_plugin.cgi')">Install
the Quick Search plugin</a> (requires Firefox 2 or Internet Explorer 7)
</li>
-
-
- [%# List items of links to more things users can do on this installation. %]
- [% Hook.process("links") %]
-
</ul>
<form id="f" name="f" action="buglist.cgi" method="get"
Modified: trunk/web/reactos.org/htdocs/bugzilla/userprefs.cgi
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/us…
==============================================================================
--- trunk/web/reactos.org/htdocs/bugzilla/userprefs.cgi (original)
+++ trunk/web/reactos.org/htdocs/bugzilla/userprefs.cgi Sun Jul 29 17:08:23 2007
@@ -70,81 +70,6 @@
}
}
-sub SaveAccount {
- my $cgi = Bugzilla->cgi;
- my $dbh = Bugzilla->dbh;
- my $user = Bugzilla->user;
-
- my $pwd1 = $cgi->param('new_password1');
- my $pwd2 = $cgi->param('new_password2');
-
- if ($cgi->param('Bugzilla_password') ne "" ||
- $pwd1 ne "" || $pwd2 ne "")
- {
- my ($oldcryptedpwd) = $dbh->selectrow_array(
- q{SELECT cryptpassword FROM profiles WHERE userid = ?},
- undef, $user->id);
- $oldcryptedpwd || ThrowCodeError("unable_to_retrieve_password");
-
- if (crypt(scalar($cgi->param('Bugzilla_password')), $oldcryptedpwd) ne
- $oldcryptedpwd)
- {
- ThrowUserError("old_password_incorrect");
- }
-
- if ($pwd1 ne "" || $pwd2 ne "")
- {
- $cgi->param('new_password1')
- || ThrowUserError("new_password_missing");
- validate_password($pwd1, $pwd2);
-
- if ($cgi->param('Bugzilla_password') ne $pwd1) {
- my $cryptedpassword = bz_crypt($pwd1);
- $dbh->do(q{UPDATE profiles
- SET cryptpassword = ?
- WHERE userid = ?},
- undef, ($cryptedpassword, $user->id));
-
- # Invalidate all logins except for the current one
- Bugzilla->logout(LOGOUT_KEEP_CURRENT);
- }
- }
- }
-
- if(Bugzilla->params->{"allowemailchange"} && $cgi->param('new_login_name')) {
- my $old_login_name = $cgi->param('Bugzilla_login');
- my $new_login_name = trim($cgi->param('new_login_name'));
-
- if($old_login_name ne $new_login_name) {
- $cgi->param('Bugzilla_password')
- || ThrowUserError("old_password_required");
-
- use Bugzilla::Token;
- # Block multiple email changes for the same user.
- if (Bugzilla::Token::HasEmailChangeToken($user->id)) {
- ThrowUserError("email_change_in_progress");
- }
-
- # Before changing an email address, confirm one does not exist.
- validate_email_syntax($new_login_name)
- || ThrowUserError('illegal_email_address', {addr => $new_login_name});
- is_available_username($new_login_name)
- || ThrowUserError("account_exists", {email => $new_login_name});
-
- Bugzilla::Token::IssueEmailChangeToken($user->id, $old_login_name,
- $new_login_name);
-
- $vars->{'email_changes_saved'} = 1;
- }
- }
-
- my $realname = trim($cgi->param('realname'));
- trick_taint($realname); # Only used in a placeholder
- $dbh->do("UPDATE profiles SET realname = ? WHERE userid = ?",
- undef, ($realname, $user->id));
-}
-
-
sub DoSettings {
my $user = Bugzilla->user;
@@ -516,7 +441,7 @@
# Do any saving, and then display the current tab.
SWITCH: for ($current_tab_name) {
/^account$/ && do {
- SaveAccount() if $cgi->param('dosave');
+ #SaveAccount() if $cgi->param('dosave');
DoAccount();
last SWITCH;
};
Author: greatlrd
Date: Sun Jul 29 14:12:04 2007
New Revision: 27993
URL: http://svn.reactos.org/svn/reactos?rev=27993&view=rev
Log:
fixing swedish rc syntax fault
Modified:
trunk/reactos/dll/win32/shdocvw/Sv.rc
Modified: trunk/reactos/dll/win32/shdocvw/Sv.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/Sv.rc?re…
==============================================================================
--- trunk/reactos/dll/win32/shdocvw/Sv.rc (original)
+++ trunk/reactos/dll/win32/shdocvw/Sv.rc Sun Jul 29 14:12:04 2007
@@ -30,6 +30,5 @@
STRINGTABLE
BEGIN
- 1001 "Programmet kräver en ActiveX-komponent som inte är tillgänglig.\n"
- "Vill du ladda ner och installera Mozillas ActiveX-komponent?"
+ 1001 "Programmet kräver en ActiveX-komponent som inte är tillgänglig.\nVill du ladda ner och installera Mozillas ActiveX-komponent?"
END