mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
fix poll
This commit is contained in:
parent
e232b7e928
commit
fda7a51786
|
@ -37,16 +37,6 @@ class ModulePoll_EntityAnswer extends EntityORM {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected function afterDelete() {
|
||||
/**
|
||||
* Удаляем голосования
|
||||
*/
|
||||
$aVoteItems=$this->Poll_GetVoteItemsByAnswerId($this->getId());
|
||||
foreach($aVoteItems as $oVote) {
|
||||
$oVote->Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public function ValidateCheckTitle() {
|
||||
$this->setTitle(htmlspecialchars($this->getTitle()));
|
||||
return true;
|
||||
|
|
|
@ -70,6 +70,13 @@ class ModulePoll_EntityPoll extends EntityORM {
|
|||
foreach($aAnswerItems as $oAnswer) {
|
||||
$oAnswer->Delete();
|
||||
}
|
||||
/**
|
||||
* Удаляем голосования
|
||||
*/
|
||||
$aVoteItems=$this->Poll_GetVoteItemsByPollId($this->getId());
|
||||
foreach($aVoteItems as $oVote) {
|
||||
$oVote->Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public function ValidateCheckTitle() {
|
||||
|
|
Loading…
Reference in a new issue