summaryrefslogtreecommitdiff
path: root/modules/poll.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-12-10 20:35:20 +0000
committerDries Buytaert <dries@buytaert.net>2002-12-10 20:35:20 +0000
commit7ce686c152416dc3a240861840f9c18791e38762 (patch)
treef771ce209303d39fed6915d1f90d5fc0030e3f23 /modules/poll.module
parenteceead1819b8e480725db17816d1b2af4f3fd768 (diff)
downloadbrdo-7ce686c152416dc3a240861840f9c18791e38762.tar.gz
brdo-7ce686c152416dc3a240861840f9c18791e38762.tar.bz2
o Permission improvements:
+ Removed the "post content" permission and replaced it by more fine-grained permissions such as "maintain static pages", "maintain personal blog", "maintain stories", etc. o Usability improvements to teasers: + Teaser forms are no more. Teasers are extracted automatically but can also be instructed using a delimiter "---". Furthermore, when a post it too short for a teaser, the user won't be bother with teaser stuff anymore. + Added an option to set the teaser length, or to disable teasers all together. + When previewing a post, both the short (if any) and the full version of a post are shown. This addresses a common complaint; for example, when writing a book page there was no way you could preview the short version of your post. + Forum posts can be teasered now. This is particularly helpful in the context of drupal.org where we promote forum topics. o Bugfix: replaced all PHP short tags (<?) with long tags (<?php). o Bugfix: removed hard-coded dependence on comment module. o Bugfix: when the queue module was disabled, it was not possible to approve updated book pages. o Bugfix: applied modified version of Marco's node_teaser() fix.
Diffstat (limited to 'modules/poll.module')
-rw-r--r--modules/poll.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/poll.module b/modules/poll.module
index 3994a4f3b..a9d61bc79 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -38,7 +38,7 @@ function poll_access($op, $node) {
}
if ($op == "create") {
- return 1;
+ return user_access("create polls");
}
}
@@ -152,7 +152,7 @@ function poll_insert($node) {
}
function poll_link($type, $node = 0, $main) {
- if ($type == "menu.create" && user_access("post content")) {
+ if ($type == "menu.create" && user_access("create polls")) {
$links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), "", array("title" => t("Add a new poll.")));
}
else if ($type == "page" && user_access("access content")) {
@@ -229,7 +229,7 @@ function poll_page() {
}
function poll_perm() {
- return array("vote on polls");
+ return array("create polls", "vote on polls");
}
function poll_save($op, $node) {