Commit 6d107b08 authored by Dries's avatar Dries

- Fixed bug in account.module (reported by Gerhard and Kristjan).

- Incorporated some of the suggestions.  More to come.
parent 7c34f8f4
......@@ -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];
}
......
......@@ -10,7 +10,7 @@ function Book($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 {
......
......@@ -10,7 +10,7 @@ function Book($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 {
......
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment