changed functions due to the migration from two "admin"- and "contributor"-properties to one "level"

This commit is contained in:
Robert Gaggl 2001-07-21 21:51:38 +00:00
parent 2d8454e93c
commit 7cfd586e05

View file

@ -3,7 +3,7 @@
*/ */
function isAdmin() { function isAdmin() {
if (parseInt(this.admin,10)) if (parseInt(this.level,10) == 2)
return true; return true;
return false; return false;
} }
@ -13,7 +13,7 @@ function isAdmin() {
*/ */
function isContributor() { function isContributor() {
if (parseInt(this.contributor,10)) if (parseInt(this.level,10) == 1)
return true; return true;
return false; return false;
} }
@ -24,8 +24,8 @@ function isContributor() {
*/ */
function updateMember() { function updateMember() {
this.admin = (parseInt(req.data.admin) ? parseInt(req.data.admin) : 0); if (req.data.level != null && req.data.level != "")
this.contributor = (parseInt(req.data.contributor) ? parseInt(req.data.contributor) : 0); this.level = req.data.level;
this.modifytime = new Date(); this.modifytime = new Date();
this.modifier = user; this.modifier = user;
this.sendConfirmationMail(); this.sendConfirmationMail();