Source for file poll.class.php
Documentation is available at poll.class.php
* @copyright Refer to copyright.php
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author Mambo Foundation Inc see README.php
//** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
/** @var int Primary key */
* @param database A database connector object
$this->mosDBTable( '#__polls', 'id', $db );
// overloaded check function
$this->_error =
T_('Your Poll must contain a title.');
$this->_error =
T_("Your Poll must have a non-zero lag time.");
// check for existing title
$this->_db->setQuery( "SELECT id FROM #__polls WHERE title='$this->title'"
if ($xid &&
$xid !=
intval( $this->id )) {
$this->_error =
T_("There is a module already with that name, please try again.");
// overloaded delete function
function delete( $oid=
null ) {
$this->_db->setQuery( "DELETE FROM #__poll_data WHERE pollid='".
$this->$k.
"'" );
if (!$this->_db->query()) {
$this->_error .=
$this->_db->getErrorMsg() .
"\n";
$this->_db->setQuery( "DELETE FROM #__poll_date WHERE pollid='".
$this->$k.
"'" );
if (!$this->_db->query()) {
$this->_error .=
$this->_db->getErrorMsg() .
"\n";
$this->_db->setQuery( "DELETE from #__poll_menu where pollid='".
$this->$k.
"'" );
if (!$this->_db->query()) {
$this->_error .=
$this->_db->getErrorMsg() .
"\n";
Documentation generated on Mon, 05 May 2008 16:22:31 +0400 by phpDocumentor 1.4.0