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
1 changed files with 8 additions and 4 deletions

View File

@ -46,13 +46,17 @@ 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()
{
$this->selectVerbs = array(ActivityVerb::POST, ActivityUtils::resolveUri(ActivityVerb::POST, true));
$this->unselectVerbs = array(ActivityVerb::DELETE);
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);