Example #1
0
 public static function close()
 {
     if (!self::$open) {
         return;
     }
     self::$open = false;
     $params = array();
     self::trigger('onEnd', $params);
 }
Example #2
0
 public function onAfterKarma($target, $actor, $delta)
 {
     $params = array('actor' => $actor, 'target' => $target, 'delta' => $delta);
     KunenaIntegrationComprofiler::trigger('onAfterKarma', $params);
 }
Example #3
0
 public static function trigger($event, &$params)
 {
     KunenaIntegrationComprofiler::trigger($event, $params);
 }
Example #4
0
 protected function loadGroups()
 {
     if ($this->groups === false) {
         $this->groups = array();
         $params = array('groups' => &$this->groups, 'categories' => $this->categories);
         KunenaIntegrationComprofiler::trigger('loadGroups', $params);
         if ($this->categories !== false) {
             $this->tree->add($this->groups);
         }
     }
 }
Example #5
0
 /**
  * Authorise list of userids to topic or category.
  *
  * @param	mixed	Category or topic.
  * @param	array	list(allow, deny).
  */
 public function authoriseUsers(KunenaDatabaseObject $topic, array &$userids)
 {
     if (empty($userids)) {
         return;
     }
     $category = $topic->getCategory();
     $allow = $deny = array();
     if ($category->accesstype == 'communitybuilder') {
         $params = array('category' => $category, 'topic' => $topic, 'userids' => $userids, 'allow' => &$allow, 'deny' => &$deny);
         KunenaIntegrationComprofiler::trigger('authoriseUsers', $params);
     }
     return array($allow, $deny);
 }