diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-07 22:11:44 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-07 22:11:44 +0000 |
commit | 831ee213032623aefb9d40cc0ebb97234e56fa63 (patch) | |
tree | 1fc05827a5fd28106c8ee001eb61f89ddcd39ee1 /modules/poll.module | |
parent | 3aba0fda70b825a588d20d6f9797acab9418c436 (diff) | |
download | brdo-831ee213032623aefb9d40cc0ebb97234e56fa63.tar.gz brdo-831ee213032623aefb9d40cc0ebb97234e56fa63.tar.bz2 |
- Renamed "form.admin" to "form admin".
- Added node_admin_settings() to let users set node defaults.
* Added _nodeapi("conf")
- Modified form_checkbox() to unset options. (Modified the patch from Ax.)
- Removed the _save() hook.
- Fixed a logical flaw in field_get() and field_set() which would break
moderation.
- Moved some admin menus around and cleaned up some typos.
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/modules/poll.module b/modules/poll.module index 0e6a453ba..0061f219e 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -232,29 +232,6 @@ function poll_perm() { return array("create polls", "vote on polls"); } -function poll_save($op, $node) { - if ($op == "approve") { - return array("status" => 1, "promote" => 1); - } - - if ($op == "create") { - if (user_access("administer nodes")) { - return array("runtime", "active", "choice", "choices", "chvotes", "body" => "", "moderate" => 0, "status" => 1, "teaser" => poll_teaser($node)); - } - else { - return array("runtime", "active", "choice", "choices", "chvotes", "body" => "", "moderate" => 1, "status" => 0, "teaser" => poll_teaser($node)); - } - } - - if ($op == "decline") { - return array("status" => 0, "promote" => 0); - } - - if ($op == "update") { - return array("runtime", "active", "choice", "choices", "chvotes"); - } -} - function poll_system($field){ $system["description"] = t("Enables your site to capture votes on different topics in the form of multiple choice questions."); return $system[$field]; @@ -413,4 +390,8 @@ function poll_update($node) { } } +function poll_validate(&$node) { + $node ->teaser = poll_teaser($node); +} + ?> |