- Fixed bug in account.module (reported by Gerhard and Kristjan).
- Incorporated some of the suggestions. More to come.3-00
parent
7c34f8f4cf
commit
6d107b084c
|
@ -161,9 +161,9 @@ function account_save($edit) {
|
||||||
if ($edit[id]) {
|
if ($edit[id]) {
|
||||||
// Updating existing account
|
// Updating existing account
|
||||||
foreach ($edit as $key=>$value) {
|
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]'");
|
watchdog("account", "account: modified user '$edit[userid]'");
|
||||||
return $edit[userid];
|
return $edit[userid];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Book {
|
||||||
}
|
}
|
||||||
|
|
||||||
function book_perm() {
|
function book_perm() {
|
||||||
return array("maintain book structure");
|
return array("edit book");
|
||||||
}
|
}
|
||||||
|
|
||||||
function book_status() {
|
function book_status() {
|
||||||
|
@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) {
|
||||||
|
|
||||||
function book_admin() {
|
function book_admin() {
|
||||||
global $user;
|
global $user;
|
||||||
if (user_access($user, "maintain book structure")) {
|
if (user_access($user, "edit book")) {
|
||||||
print book_tree();
|
print book_tree();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Book {
|
||||||
}
|
}
|
||||||
|
|
||||||
function book_perm() {
|
function book_perm() {
|
||||||
return array("maintain book structure");
|
return array("edit book");
|
||||||
}
|
}
|
||||||
|
|
||||||
function book_status() {
|
function book_status() {
|
||||||
|
@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) {
|
||||||
|
|
||||||
function book_admin() {
|
function book_admin() {
|
||||||
global $user;
|
global $user;
|
||||||
if (user_access($user, "maintain book structure")) {
|
if (user_access($user, "edit book")) {
|
||||||
print book_tree();
|
print book_tree();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -7,7 +7,7 @@ function module_help() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function module_perm() {
|
function module_perm() {
|
||||||
return array("install and uninstall modules");
|
return array("edit modules");
|
||||||
}
|
}
|
||||||
|
|
||||||
function module_admin_rehash() {
|
function module_admin_rehash() {
|
||||||
|
@ -39,7 +39,7 @@ function module_admin_overview() {
|
||||||
function module_admin() {
|
function module_admin() {
|
||||||
global $user, $op, $name;
|
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";
|
print "<SMALL><A HREF=\"admin.php?mod=module\">overview</A> | <A HREF=\"admin.php?mod=module&op=help\">help</A></SMALL><HR>\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue