mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
issue 1971 deleted a poll when deleted a poll title.
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11175 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
48cb160b99
commit
9db28e2db4
2 changed files with 47 additions and 1 deletions
|
|
@ -80,12 +80,19 @@
|
|||
/**
|
||||
* @brief Delete the poll (when several questions are registered in one poll, delete this question)
|
||||
**/
|
||||
function deletePollTitle($poll_index_srl) {
|
||||
function deletePollTitle($poll_index_srl)
|
||||
{
|
||||
$args->poll_index_srl = $poll_index_srl;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$output = executeQueryArray('poll.getPollByDeletePollTitle', $args);
|
||||
if($output->toBool() && $output->data && $output->data[0]->count == 1)
|
||||
{
|
||||
$dargs->poll_srl = $output->data[0]->poll_srl;
|
||||
}
|
||||
|
||||
$output = $oDB->executeQuery('poll.deletePollTitle', $args);
|
||||
if(!$output) {
|
||||
$oDB->rollback();
|
||||
|
|
@ -98,6 +105,20 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
if($dargs->poll_srl)
|
||||
{
|
||||
$output = executeQuery('poll.deletePoll', $dargs);
|
||||
if(!$output) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output = executeQuery('poll.deletePollLog', $dargs);
|
||||
if(!$output) {
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
$oDB->commit();
|
||||
|
||||
return new Object();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue