From 831ee213032623aefb9d40cc0ebb97234e56fa63 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Fri, 7 Mar 2003 22:11:44 +0000 Subject: - 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. --- modules/poll.module | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'modules/poll.module') 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); +} + ?> -- cgit v1.2.3