*
* @return Poll found poll or null
*/
- static function getByNotice($notice)
+ static function getByNotice(Notice $notice)
{
return self::getKV('uri', $notice->uri);
}
*
* @return Notice saved notice
*/
- static function saveNew($profile, $question, $opts, $options=null)
+ static function saveNew(Profile $profile, $question, $opts, array $options = array())
{
- if (empty($options)) {
- $options = array();
- }
-
$p = new Poll();
$p->id = UUID::gen();
array('id' => $p->id));
}
- common_log(LOG_DEBUG, "Saving poll: $p->id $p->uri");
+ common_debug("Saving poll: $p->id $p->uri");
$p->insert();
// TRANS: Notice content creating a poll.