diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-15 07:30:44 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-15 07:30:44 +0000 |
commit | 96576a6ef748f960b1f8318aa5d425627627d851 (patch) | |
tree | d82d09706ffd230df5acc00d48c7963b519707d1 /modules/poll/poll.module | |
parent | 8f241243f0cd0e50a94f61aa7e918649b35ebf8d (diff) | |
download | brdo-96576a6ef748f960b1f8318aa5d425627627d851.tar.gz brdo-96576a6ef748f960b1f8318aa5d425627627d851.tar.bz2 |
- Added meta.module, an improved index.module that allows you to
associate different collections - think "combobox" here - with
different content types, all hardcoded references to "section"
have been removed and the admin-friendliness of the meta admin
section has been slightly improved.
I'll keep working on it during the weekend - if time allows me
to. Moreover, I'll focus on the usability/user-friendlines of
the meta admin section as well as graceful input-checking, and
error-handling.
Requires an SQL update, see updates/2.00-to-x.xx.sql!
Index.module will be removed, or meta.module will be renamed as
soon we can ditch one of them. For now, having both coexist is
not going to harm your setup and is useful to make a comparison
and / or to migrate from index.module to meta.module.
Index.module is de-coupled form the rest of the system so you
will have to use meta.module after having upgraded. You have
been warned.
- Updated CHANGELOG.
Diffstat (limited to 'modules/poll/poll.module')
-rw-r--r-- | modules/poll/poll.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module index df4c64b57..880529c68 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -202,7 +202,7 @@ function poll_form($edit = array(), $nocheck = 0) { $form .= form_select(t("Poll duration"), "runtime", $edit[runtime] ? $edit[runtime] : t("1 week"), $duration, t("After this period, the poll will automatically be closed.")); if ($admin) $form .= form_select(t("Poll status"), "active", $edit[active], $active); - $form .= node_attributes_edit($edit); + $form .= node_attributes_edit("poll", $edit); // hidden fields: if ($edit[nid] > 0) { @@ -232,10 +232,10 @@ function poll_save($edit) { global $status, $user; if (!$edit[nid]) { - $nid = node_save($edit, array(active => 1, attributes => node_attributes_save($edit), author => $user->id, cid, comment => variable_get("poll_comment", 0), moderate => variable_get("poll_moderate", ""), promote => variable_get("poll_promote", 0), runtime, score => 0, status => variable_get("poll_status", $status[queued]), tid, timestamp => time(), title, type => "poll", votes => 0, voters => "")); + $nid = node_save($edit, array(active => 1, attributes => node_attributes_save("poll", $edit), author => $user->id, cid, comment => variable_get("poll_comment", 0), moderate => variable_get("poll_moderate", ""), promote => variable_get("poll_promote", 0), runtime, score => 0, status => variable_get("poll_status", $status[queued]), tid, timestamp => time(), title, type => "poll", votes => 0, voters => "")); } else if (user_access($user)) { - $nid = node_save($edit, array(active, attributes => node_attributes_save($edit), cid, tid, runtime, title, type => "poll")); + $nid = node_save($edit, array(active, attributes => node_attributes_save("poll", $edit), cid, tid, runtime, title, type => "poll")); db_query("DELETE FROM poll_choices WHERE nid='" . $nid . "'"); } if ($nid) { |