@@ 115-121 (lines=7) @@ | ||
112 | * @param int $pid is used to delete all options by this id |
|
113 | * @return mixed results of deleting objects from database |
|
114 | */ |
|
115 | public function deleteByPollId($pid) |
|
116 | { |
|
117 | $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . '::' . __METHOD__ . ' is deprecated since Xoopspoll 1.40, please use XoopspollPollHandler::' . __METHOD__ . ' instead.'); |
|
118 | $criteria = new Criteria('poll_id', (int)$pid, '='); |
|
119 | ||
120 | return $this->optHandler->deleteAll($criteria); |
|
121 | } |
|
122 | ||
123 | /** |
|
124 | * Get all options for a particular poll |
|
@@ 130-136 (lines=7) @@ | ||
127 | * @param int $pid poll id |
|
128 | * @return mixed results of getting objects from database |
|
129 | */ |
|
130 | public function getAllByPollId($pid) |
|
131 | { |
|
132 | $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . '::' . __METHOD__ . ' is deprecated since Xoopspoll 1.40, please use XoopspollPollHandler::' . __METHOD__ . ' instead.'); |
|
133 | $criteria = new Criteria('poll_id', (int)$pid, '='); |
|
134 | ||
135 | return $this->optHandler->getAll($criteria); |
|
136 | } |
|
137 | ||
138 | /** |
|
139 | * Reset the poll's options vote count |
|
@@ 145-151 (lines=7) @@ | ||
142 | * @uses XoopsPersistableObjectHandler::updateAll |
|
143 | * @return mixed results of the object(s) update |
|
144 | */ |
|
145 | public function resetCountByPollId($pid) |
|
146 | { |
|
147 | $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . '::' . __METHOD__ . ' is deprecated since Xoopspoll 1.40, please use XoopspollPollHandler::' . __METHOD__ . ' instead.'); |
|
148 | $criteria = new Criteria('poll_id', (int)$pid, '='); |
|
149 | ||
150 | return $this->optHandler->updateAll('option_count', 0, $criteria); |
|
151 | } |
|
152 | } |
|
153 | ||
154 | /** |