summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-07-01 21:45:25 +0000
committerDries Buytaert2003-07-01 21:45:25 +0000
commit7997ebb9820f0fe6cd8220aefb9365d29c6ee426 (patch)
treefb7b0fa862eef41bdafaf41ccb495d9886793daa
parentdc15ba06e05df99885d0024b2fc9173291e79038 (diff)
- Bugfix: added more permissions checks. Patches #60-62 by Al. Should fix
bug #2163 and #2164.
-rw-r--r--modules/archive.module2
-rw-r--r--modules/archive/archive.module2
-rw-r--r--modules/blog.module4
-rw-r--r--modules/blog/blog.module4
-rw-r--r--modules/statistics.module2
-rw-r--r--modules/statistics/statistics.module2
6 files changed, 10 insertions, 6 deletions
diff --git a/modules/archive.module b/modules/archive.module
index c29546d..1afd48c 100644
--- a/modules/archive.module
+++ b/modules/archive.module
@@ -161,7 +161,7 @@ function archive_block($op = "list", $delta = 0) {
$blocks[0]["info"] = t("Calendar to browse archives");
return $blocks;
}
- else {
+ else if (user_access("access content")) {
switch ($delta) {
case 0:
$block["subject"] = t("Browse archives");
diff --git a/modules/archive/archive.module b/modules/archive/archive.module
index c29546d..1afd48c 100644
--- a/modules/archive/archive.module
+++ b/modules/archive/archive.module
@@ -161,7 +161,7 @@ function archive_block($op = "list", $delta = 0) {
$blocks[0]["info"] = t("Calendar to browse archives");
return $blocks;
}
- else {
+ else if (user_access("access content")) {
switch ($delta) {
case 0:
$block["subject"] = t("Browse archives");
diff --git a/modules/blog.module b/modules/blog.module
index e360431..939ba82 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -65,7 +65,9 @@ function blog_user($type, &$edit, &$user) {
switch ($type) {
case "view_public":
case "view_private":
- return form_item(t("Blog"), l(t("view recent blog entries"), "blog/$user->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $user->name)))));
+ if (user_access("maintain personal blog", $user)) {
+ return form_item(t("Blog"), l(t("view recent blog entries"), "blog/$user->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $user->name)))));
+ }
}
}
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index e360431..939ba82 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -65,7 +65,9 @@ function blog_user($type, &$edit, &$user) {
switch ($type) {
case "view_public":
case "view_private":
- return form_item(t("Blog"), l(t("view recent blog entries"), "blog/$user->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $user->name)))));
+ if (user_access("maintain personal blog", $user)) {
+ return form_item(t("Blog"), l(t("view recent blog entries"), "blog/$user->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $user->name)))));
+ }
}
}
diff --git a/modules/statistics.module b/modules/statistics.module
index ad0180a..7804bb9 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -710,7 +710,7 @@ function statistics_block($op = "list", $delta = 0) {
}
return $blocks;
}
- else {
+ else if (user_access("access content")) {
switch($delta) {
case 0:
$block["subject"] = variable_get("statistics_block_top_title", t("Popular content"));
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index ad0180a..7804bb9 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -710,7 +710,7 @@ function statistics_block($op = "list", $delta = 0) {
}
return $blocks;
}
- else {
+ else if (user_access("access content")) {
switch($delta) {
case 0:
$block["subject"] = variable_get("statistics_block_top_title", t("Popular content"));