From 45446f17adb1ee6fd2b4830b1d4eae1e47ee6f70 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 21 Jan 2016 02:37:38 +0100 Subject: [PATCH] Only set selectVerbs if it's not set in class var --- lib/noticestream.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); -- 2.39.5