diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-21 21:35:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-21 21:35:03 +0000 |
commit | 6d107b084ca28e4ddbe431e541cdd1e0617a72af (patch) | |
tree | a238487d2403d8426adbadade3984f6356053b4d /modules | |
parent | 7c34f8f4cf526e6053e4c9d2e5265e2b4b0ec23b (diff) | |
download | brdo-6d107b084ca28e4ddbe431e541cdd1e0617a72af.tar.gz brdo-6d107b084ca28e4ddbe431e541cdd1e0617a72af.tar.bz2 |
- Fixed bug in account.module (reported by Gerhard and Kristjan).
- Incorporated some of the suggestions. More to come.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/account.module | 4 | ||||
-rw-r--r-- | modules/book.module | 4 | ||||
-rw-r--r-- | modules/book/book.module | 4 | ||||
-rw-r--r-- | modules/module.module | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/account.module b/modules/account.module index 45cb32722..ab4270743 100644 --- a/modules/account.module +++ b/modules/account.module @@ -161,9 +161,9 @@ function account_save($edit) { if ($edit[id]) { // Updating existing account foreach ($edit as $key=>$value) { - $query .= "$key = '". addslashes($value) ."', "; + $query[] = "$key = '". addslashes($value) ."'"; } - db_query("UPDATE users SET $query WHERE id = $edit[id]"); + db_query("UPDATE users SET ". implode(", ", $query) ." WHERE id = $edit[id]"); watchdog("account", "account: modified user '$edit[userid]'"); return $edit[userid]; } diff --git a/modules/book.module b/modules/book.module index 138b5e5a7..6e994c4a9 100644 --- a/modules/book.module +++ b/modules/book.module @@ -10,7 +10,7 @@ class Book { } function book_perm() { - return array("maintain book structure"); + return array("edit book"); } function book_status() { @@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) { function book_admin() { global $user; - if (user_access($user, "maintain book structure")) { + if (user_access($user, "edit book")) { print book_tree(); } else { diff --git a/modules/book/book.module b/modules/book/book.module index 138b5e5a7..6e994c4a9 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -10,7 +10,7 @@ class Book { } function book_perm() { - return array("maintain book structure"); + return array("edit book"); } function book_status() { @@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) { function book_admin() { global $user; - if (user_access($user, "maintain book structure")) { + if (user_access($user, "edit book")) { print book_tree(); } else { diff --git a/modules/module.module b/modules/module.module index 71bcc99a7..a528c5fe1 100644 --- a/modules/module.module +++ b/modules/module.module @@ -7,7 +7,7 @@ function module_help() { } function module_perm() { - return array("install and uninstall modules"); + return array("edit modules"); } function module_admin_rehash() { @@ -39,7 +39,7 @@ function module_admin_overview() { function module_admin() { global $user, $op, $name; - if (user_access($user, "install and uninstall modules")) { + if (user_access($user, "edit modules")) { print "<SMALL><A HREF=\"admin.php?mod=module\">overview</A> | <A HREF=\"admin.php?mod=module&op=help\">help</A></SMALL><HR>\n"; |