summaryrefslogtreecommitdiff
path: root/modules/poll
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-12-28 12:02:29 +0000
committerDries Buytaert <dries@buytaert.net>2005-12-28 12:02:29 +0000
commit753f11d8c98982b3b8dd5c9266d6f7fd91f7e719 (patch)
treea6b4645eba917866909cd1622a45457b5b74b9cd /modules/poll
parent4c66ab52f31d0b9718b7f4255536797695d187fc (diff)
downloadbrdo-753f11d8c98982b3b8dd5c9266d6f7fd91f7e719.tar.gz
brdo-753f11d8c98982b3b8dd5c9266d6f7fd91f7e719.tar.bz2
- Patch #41755 by Cvbge:
1. "int(10)" -> "int", fixed typo in index name [pgsql change only] 2. added defaults for uid and hostname (needed for both) 3. postgres supports "DROP column" syntax 4. added missing DELETEs for new table in poll_delete() and poll_update()
Diffstat (limited to 'modules/poll')
-rw-r--r--modules/poll/poll.module2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index d3385000b..8ea1cd3e5 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -87,6 +87,7 @@ function poll_cron() {
function poll_delete($node) {
db_query("DELETE FROM {poll} WHERE nid = %d", $node->nid);
db_query("DELETE FROM {poll_choices} WHERE nid = %d", $node->nid);
+ db_query("DELETE FROM {poll_votes} WHERE nid = %d", $node->nid);
}
/**
@@ -482,6 +483,7 @@ function poll_update($node) {
db_query('UPDATE {poll} SET runtime = %d, active = %d WHERE nid = %d', $node->runtime, $node->active, $node->nid);
db_query('DELETE FROM {poll_choices} WHERE nid = %d', $node->nid);
+ db_query('DELETE FROM {poll_votes} WHERE nid = %d', $node->nid);
foreach ($node->choice as $choice) {
$chvotes = (int)$choice['chvotes'];
$chtext = $choice['chtext'];