summaryrefslogtreecommitdiff
path: root/modules/page/page.module
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/page/page.module
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/page/page.module')
-rw-r--r--modules/page/page.module12
1 files changed, 7 insertions, 5 deletions
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[] = "<a href=\"module.php?mod=node&op=add&type=page\" title=\"". t("Add a new site page.") ."\">". t("create site page") ."</a>";
+ }
+
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 {