]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'rewrites-nightly/type-hints-asserts' into nightly
authorRoland Haeder <roland@mxchange.org>
Fri, 27 Mar 2015 21:25:25 +0000 (22:25 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 27 Mar 2015 21:25:25 +0000 (22:25 +0100)
Conflicts:
classes/Notice.php

Signed-off-by: Roland Haeder <roland@mxchange.org>
1  2 
classes/Notice.php

index a6cf90da5555d86cba759b9ac223e8d2ca29d6a7,5c18f03500f1de2625ad9b57ad67a484d1faf3b3..834b5399240155df6dee9c97eb3a0db5134e1343
@@@ -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);
+     }
  }