mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
issue 46 apply validator to poll module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8548 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a65976f913
commit
f020e75e09
11 changed files with 67 additions and 19 deletions
|
|
@ -119,6 +119,7 @@
|
|||
if(!$srl) continue;
|
||||
$item_srls[] = $srl;
|
||||
}
|
||||
|
||||
// If there is no response item, display an error
|
||||
if(!count($item_srls)) return new Object(-1, 'msg_check_poll_item');
|
||||
// Make sure is the poll has already been taken
|
||||
|
|
@ -167,6 +168,11 @@
|
|||
$this->add('poll_srl', $poll_srl);
|
||||
$this->add('tpl',$tpl);
|
||||
$this->setMessage('success_poll');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPollAdminConfig');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue