From: Roland Haeder <roland@mxchange.org>
Date: Fri, 27 Mar 2015 21:25:25 +0000 (+0100)
Subject: Merge branch 'rewrites-nightly/type-hints-asserts' into nightly
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8e27eb356c72a0eb18b6b5f8af3339009d44aa75;p=quix0rs-gnu-social.git

Merge branch 'rewrites-nightly/type-hints-asserts' into nightly

Conflicts:
	classes/Notice.php

Signed-off-by: Roland Haeder <roland@mxchange.org>
---

8e27eb356c72a0eb18b6b5f8af3339009d44aa75
diff --cc classes/Notice.php
index a6cf90da55,5c18f03500..834b539924
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@@ -2905,4 -2951,41 +2941,14 @@@ class Notice extends Managed_DataObjec
          }
      }
  
 -    protected $_repeats = array();
 -
 -    function getRepeats()
 -    {
 -        if (isset($this->_repeats[$this->id])) {
 -            return $this->_repeats[$this->id];
 -        }
 -        $repeatMap = Notice::listGet('repeat_of', array($this->id));
 -        $this->_setRepeats($repeatMap[$this->id]);
 -        return $this->_repeats[$this->id];
 -    }
 -
 -    function _setRepeats(array $repeats)
 -    {
 -        $this->_repeats[$this->id] = $repeats;
 -    }
 -
 -    static function fillRepeats(array &$notices)
 -    {
 -        $ids = self::_idsOf($notices);
 -        $repeatMap = Notice::listGet('repeat_of', $ids);
 -        foreach ($notices as $notice) {
 -            $repeats = $repeatMap[$notice->id];
 -            $notice->_setRepeats($repeats);
 -        }
 -    }
 -
+     /**
+      * Checks whether this notice is in "private scope" (non-public notice)
+      *
+      * @return $isPrivate Whether this notice is private
+      */
+     public function isPrivateScope ()
+     {
+         return ($this->scope != Notice::SITE_SCOPE &&
+                 $this->scope != Notice::PUBLIC_SCOPE);
+     }
  }