[AppDB] Actually use the versions table from bugzilla.
tony_lambregts at telusplanet.net
tony_lambregts at telusplanet.net
Mon Jan 3 22:47:30 CST 2005
Change log: Store the users Wine version in the users table.
Files changed: tables/user_list.sql preferences.php include/user.php
Jeremy will need to run the following before this can be commited.
alter table user_list add CVSrelease text after perm;
Jeremy: Please let Chris know when he can apply this. (or apply it yourself..)
-------------- next part --------------
Index: tables/user_list.sql
===================================================================
RCS file: /home/wine/appdb/tables/user_list.sql,v
retrieving revision 1.3
diff -u -r1.3 user_list.sql
--- tables/user_list.sql 19 Apr 2004 20:49:52 -0000 1.3
+++ tables/user_list.sql 4 Jan 2005 04:25:25 -0000
@@ -12,6 +12,7 @@
created datetime not null,
status int(4),
perm int(4),
+ CVSrelease text,
unique key(userid),
unique(username(12))
);
Index: preferences.php
===================================================================
RCS file: /home/wine/appdb/preferences.php,v
retrieving revision 1.8
diff -u -r1.8 preferences.php
--- preferences.php 27 Dec 2004 23:54:55 -0000 1.8
+++ preferences.php 4 Jan 2005 04:25:25 -0000
@@ -56,9 +56,9 @@
$ext_email = $user->lookup_email($_SESSION['current']->userid);
include(BASE."include/"."form_edit.php");
- $version = "unspecified";
- echo "<tr><td> wine version </td><td>";
- make_bugzilla_version_list("version", $version);
+
+ echo "<tr><td> Wine version </td><td>";
+ make_bugzilla_version_list("CVSrelease", $CVSrelease);
echo "</td></tr>";
}
@@ -83,7 +83,7 @@
addmsg("The Passwords you entered did not match.", "red");
}
- if ($user->update($_SESSION['current']->userid, $str_passwd, $_REQUEST['ext_realname'], $_REQUEST['ext_email']))
+ if ($user->update($_SESSION['current']->userid, $str_passwd, $_REQUEST['ext_realname'], $_REQUEST['ext_email'], $_REQUEST['CVSrelease']))
{
addmsg("Preferences Updated", "green");
}
Index: include/user.php
===================================================================
RCS file: /home/wine/appdb/include/user.php,v
retrieving revision 1.17
diff -u -r1.17 user.php
--- include/user.php 31 Dec 2004 00:30:00 -0000 1.17
+++ include/user.php 4 Jan 2005 04:25:25 -0000
@@ -12,6 +12,7 @@
var $created;
var $status;
var $perm;
+ var $CVSrelease;
/**
* constructor
@@ -123,7 +124,7 @@
/**
* Update User Account;
*/
- function update($userid = 0, $password = null, $realname = null, $email = null)
+ function update($userid = 0, $password = null, $realname = null, $email = null, $CVSrelease = null)
{
if (!$userid)
return 0;
@@ -144,6 +145,13 @@
if (!mysql_query("UPDATE user_list SET email = '".addslashes($email)."' WHERE userid = $userid"))
return 0;
}
+
+ if ($CVSrelease)
+ {
+ if (!mysql_query("UPDATE user_list SET CVSrelease = '".addslashes($CVSrelease)."' WHERE userid = $userid"))
+ return 0;
+ }
+
return 1;
}
More information about the wine-patches
mailing list