From c1c612b12826ab9bf65283f5430f4c7558e24699 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 31 Jan 2002 20:23:44 +0000 Subject: - 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. --- modules/page/page.module | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/page/page.module') diff --git a/modules/page/page.module b/modules/page/page.module index 03925a1e3..20cdcc2c7 100644 --- a/modules/page/page.module +++ b/modules/page/page.module @@ -2,8 +2,8 @@ // $Id$ function page_node($field) { - $info["name"] = t("page"); - $info["description"] = t("If you just want to add a page with a link in the menu to your site, this would be the best choice. Unlike a story, a page by-passes the submission queue."); + $info["name"] = t("site page"); + $info["description"] = t("If you just want to add a page with a link in the menu to your site, this would be the best choice. Unlike a story, a site page by-passes the submission queue."); return $info[$field]; } @@ -59,14 +59,16 @@ function page_link($type) { } } + if ($type == "menu.create" && user_access("administer nodes")) { + $links[] = "". t("create site page") .""; + } + return $links ? $links : array(); } function page_body($node) { global $theme, $op; - - if ($node->format) { /* ** Make sure only authorized users can preview static (PHP) @@ -74,7 +76,7 @@ function page_body($node) { */ if ($op == t("Preview")) { - if (user_access("adminster nodes")) { + if (user_access("administer nodes")) { $node->body = stripslashes($node->body); // see also page_form() } else { -- cgit v1.2.3