We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 44753d64 authored by Evan Prodromou's avatar Evan Prodromou

use Poll_response::pkeyGet() in Poll::getResponse()

parent c468b0d7
......@@ -160,15 +160,9 @@ class Poll extends Managed_DataObject
function getResponse(Profile $profile)
$pr = new Poll_response();
$pr->poll_id = $this->id;
$pr->profile_id = $profile->id;
if ($pr->fetch()) {
return $pr;
} else {
return null;
$pr = Poll_response::pkeyGet(array('poll_id' => $this->id,
'profile_id' => $profile->id));
return $pr;
function countResponses()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment