From: Mikael Nordfeldth Date: Thu, 21 Jan 2016 01:37:38 +0000 (+0100) Subject: Only set selectVerbs if it's not set in class var X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=45446f17adb1ee6fd2b4830b1d4eae1e47ee6f70;p=quix0rs-gnu-social.git Only set selectVerbs if it's not set in class var --- diff --git a/lib/noticestream.php b/lib/noticestream.php index 3b597fa08c..01c5ee4a72 100644 --- a/lib/noticestream.php +++ b/lib/noticestream.php @@ -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);