Only set selectVerbs if it's not set in class var

This commit is contained in:
Mikael Nordfeldth 2016-01-21 02:37:38 +01:00
parent be1759f112
commit 45446f17ad

View File

@ -46,14 +46,18 @@ if (!defined('STATUSNET')) {
*/
abstract class NoticeStream
{
protected $selectVerbs = array();
protected $unselectVerbs = array();
protected $selectVerbs = null; // must be set to array
protected $unselectVerbs = null; // must be set to array
public function __construct()
{
if ($this->selectVerbs === null) {
$this->selectVerbs = array(ActivityVerb::POST, ActivityUtils::resolveUri(ActivityVerb::POST, true));
}
if ($this->unselectVerbs === null) {
$this->unselectVerbs = array(ActivityVerb::DELETE);
}
}
abstract function getNoticeIds($offset, $limit, $since_id, $max_id);