Archive

Posts Tagged ‘Poll’

magento disappear poll after voting

November 9th, 2010 1 comment

app/code/core/Mage/Poll/Model/Poll.php

public function getVotedPollsIds()
{
$idsArray = array();
/*
foreach ($this->getCookie()->get() as $cookieName => $cookieValue) {
$pattern = ‘#^’ . preg_quote($this->_pollCookieDefaultName, ‘#’) . ‘(\d+)$#’;
$match = array();
if (preg_match($pattern, $cookieName, $match)) {
if ($match[1] != Mage::getSingleton(‘core/session’)->getJustVotedPoll()) {
$idsArray[$match[1]] = $match[1];
}
}
}

// load from db for this ip
foreach ($this->_getResource()->getVotedPollIdsByIp(Mage::helper(‘core/http’)->getRemoteAddr()) as $pollId) {
$idsArray[$pollId] = $pollId;
}*/

return $idsArray;
}

Categories: System Tags: , ,