delete form after deleting survey

Shiny - July 9, 2007 - 08:40
Project:Survey
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

after deleting a survey, the unused form lives on in the database.
Here's a patch, to also delete the form

<?php
function survey_delete(&$node) {
 
forms_delete($node->form);
 
db_query("DELETE FROM {survey} WHERE nid=%d", $node->nid);
 
//AND delete the form
 
$form = forms_load(array('fid' => $node->nid));
 
forms_delete($form);
}
?>

AttachmentSize
survey.module_4.patch420 bytes

#1

WiredEscape - February 12, 2008 - 02:07

subscribe

#2

quicksketch - March 22, 2008 - 06:26
Status:active» closed

Survey module is no longer being maintained, use Webform module instead.

---Closing down issue queue of survey module---

 
 

Drupal is a registered trademark of Dries Buytaert.