summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-01-31 20:23:44 +0000
committerDries Buytaert <dries@buytaert.net>2002-01-31 20:23:44 +0000
commitc1c612b12826ab9bf65283f5430f4c7558e24699 (patch)
treea77fe6d40f7412e8aa89102c3ff25460c8c3540e /modules/blog
parent64d11e1cc2a330778bb57dff2daf3e5bec29f5ee (diff)
downloadbrdo-c1c612b12826ab9bf65283f5430f4c7558e24699.tar.gz
brdo-c1c612b12826ab9bf65283f5430f4c7558e24699.tar.bz2
- Made the calendar module accept a $date parameter such that you
can jump directly to a certain date in the archives. Also made the calendar link to itself such that it is self-contained. - Code beautifications: quoted a lot of arrays, removed dead code and simplified a few things. - Replaced the Calendar class by one function "calendar_display": using a class (or class instance, or object) doesn't make sense in the archives' case. - Renamed "calendar.module" to "archive.module". - Fixed a /problem/ with node settings not always being saved like expected. - Reorganized the user menu: renamed a couple of links for clarity and structure. - Fixed a few typos.
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module26
1 files changed, 10 insertions, 16 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 1674394a1..0791a2237 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -47,7 +47,7 @@ function blog_save($op, $node) {
}
if ($op == "create") {
- if (user_access("adminster nodes")) {
+ if (user_access("administer nodes")) {
return array();
}
else {
@@ -60,27 +60,21 @@ function blog_save($op, $node) {
}
if ($op == "update") {
- if (strstr($REQUEST_URI, "module.php?mod=node&op=edit")) {
+ if (user_access("administer nodes")) {
/*
- ** Updating your own blog entry will demote it (if promoted),
- ** and will queue it in the moderation queue for promotion.
- ** If a node administrator updates his own blog entry through
- ** the blog update mechanism that regular users use, then he
- ** will be treated as a regular user and his blog entry will
- ** be demoted. We use the $REQUEST_URI field to dectect this
- ** as we don't want to interfer with the updating of blog
- ** entries through the admin pages.
+ ** When an administrator updates blog entries through the admin
+ ** pages, they will not be changed unless explicitly specified.
*/
- return array("body" => filter($node->body), "promote" => 0, "moderate" => 1, "score" => 0, "teaser" => filter($node->teaser), "votes" => 0, "users" => 0);
+ return array();
}
- else if (user_access("adminster nodes")) {
+ else {
/*
- ** When an administrator updates blog entries through the admin
- ** pages, they will not be changed unless explicitly specified.
+ ** Updating your own blog entry will demote it (if promoted),
+ ** and will queue it in the moderation queue for promotion.
*/
- return array();
+ return array("body" => filter($node->body), "promote" => 0, "moderate" => 1, "score" => 0, "teaser" => filter($node->teaser), "votes" => 0, "users" => 0);
}
}
@@ -315,7 +309,7 @@ function blog_link($type, $node = 0) {
}
if ($type == "menu.create" && user_access("post content")) {
- $links[] = "<a href=\"module.php?mod=node&op=add&type=blog\" title=\"". t("Post a new entry to your personal blog.") ."\">". t("create blog entry") ."</a>";
+ $links[] = "<a href=\"module.php?mod=node&op=add&type=blog\" title=\"". t("Add a new personal blog entry.") ."\">". t("create blog entry") ."</a>";
}
if ($type == "menu.view" && user_access("access content")) {