mirror of
https://github.com/friendica/friendica
synced 2025-04-30 04:24:23 +02:00
API: We can now display polls
This commit is contained in:
parent
ee05bd91a3
commit
9b646dad97
10 changed files with 245 additions and 7 deletions
|
@ -53,4 +53,14 @@ class Question
|
|||
|
||||
return DBA::update('post-question', $fields, ['uri-id' => $uri_id], $insert_if_missing ? true : []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $id Question ID
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @return array|boolean Question record if it exists, false otherwise
|
||||
*/
|
||||
public static function getById($id, $fields = [])
|
||||
{
|
||||
return DBA::selectFirst('post-question', $fields, ['id' => $id]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue