summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/node.module3
-rw-r--r--modules/node/node.module3
-rw-r--r--modules/user.module18
-rw-r--r--modules/user/user.module18
4 files changed, 22 insertions, 20 deletions
diff --git a/modules/node.module b/modules/node.module
index 91516c0a2..e87cbff53 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -360,7 +360,6 @@ function node_save($node) {
function node_view($node, $main = 0) {
-
$node = array2object($node);
/*
@@ -1259,7 +1258,7 @@ function node_form($edit, $error = NULL) {
$output .= "</div></div>";
- return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], $param["options"]);
+ return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], array_merge($param["options"], array("id" => "node-form")));
}
function node_add($type) {
diff --git a/modules/node/node.module b/modules/node/node.module
index 91516c0a2..e87cbff53 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -360,7 +360,6 @@ function node_save($node) {
function node_view($node, $main = 0) {
-
$node = array2object($node);
/*
@@ -1259,7 +1258,7 @@ function node_form($edit, $error = NULL) {
$output .= "</div></div>";
- return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], $param["options"]);
+ return form($output, ($param["method"] ? $param["method"] : "post"), $param["action"], array_merge($param["options"], array("id" => "node-form")));
}
function node_add($type) {
diff --git a/modules/user.module b/modules/user.module
index 9c51bd043..bd29d03cd 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -413,16 +413,18 @@ function user_block($op = "list", $delta = 0) {
}
break;
case 2:
- $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5);
- while ($account = db_fetch_object($result)) {
- $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
- }
+ if (user_access("access content")) {
+ $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5);
+ while ($account = db_fetch_object($result)) {
+ $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
+ }
- $output = theme("theme_user_list", $items);
+ $output = theme("theme_user_list", $items);
- $block["subject"] = t("Who's new");
- $block["content"] = $output;
- return $block;
+ $block["subject"] = t("Who's new");
+ $block["content"] = $output;
+ return $block;
+ }
}
}
}
diff --git a/modules/user/user.module b/modules/user/user.module
index 9c51bd043..bd29d03cd 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -413,16 +413,18 @@ function user_block($op = "list", $delta = 0) {
}
break;
case 2:
- $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5);
- while ($account = db_fetch_object($result)) {
- $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
- }
+ if (user_access("access content")) {
+ $result = db_query_range("SELECT uid, name FROM {users} WHERE status != '0' ORDER BY uid DESC", 0, 5);
+ while ($account = db_fetch_object($result)) {
+ $items[] = l((strlen($account->name) > 15 ? substr($account->name, 0, 15) . '...' : $account->name), "user/view/$account->uid");
+ }
- $output = theme("theme_user_list", $items);
+ $output = theme("theme_user_list", $items);
- $block["subject"] = t("Who's new");
- $block["content"] = $output;
- return $block;
+ $block["subject"] = t("Who's new");
+ $block["content"] = $output;
+ return $block;
+ }
}
}
}