summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/account.module4
-rw-r--r--modules/book.module4
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/module.module4
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";