]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
New events for overriding scope checks
[quix0rs-gnu-social.git] / classes / Notice.php
index 9ee5696e3f47a3cb68a8ccb79ca3422edcaccae4..9e4dbec9e33a6ec9fcc5bcddd46a06467212d6ae 100644 (file)
@@ -2365,7 +2365,11 @@ class Notice extends Managed_DataObject
         $result = self::cacheGet($keypart);
 
         if ($result === false) {
-            $bResult = $this->_inScope($profile);
+            $bResult = false;
+            if (Event::handle('StartNoticeInScope', array($notice, $profile, &$bResult))) {
+                $bResult = $this->_inScope($profile);
+                Event::handle('EndNoticeInScope', array($notice, $profile, &$bResult));
+            }
             $result = ($bResult) ? 1 : 0;
             self::cacheSet($keypart, $result, 0, 300);
         }