Beispiel #1
0
 public function execute()
 {
     GWF3::setConfig('log_request', false);
     $back = array();
     $user = GWF_User::getStaticOrGuest();
     $back['news'] = (int) $this->module->getNewsCount();
     $back['pm'] = (int) WC_HTML::getUnreadPMCount($user);
     $back['links'] = (int) WC_HTML::getUnreadLinksCount($user);
     $back['forum'] = (int) WC_HTML::getUnreadThreadCount($user);
     return json_encode($back);
 }
Beispiel #2
0
 private function privateData(GWF_User $user)
 {
     $back = '';
     $ulc = WC_HTML::getUnreadLinksCount($user);
     $back .= 'NewLinks:' . $ulc . PHP_EOL;
     $utc = WC_HTML::getUnreadThreadCount($user);
     $back .= 'NewThreads:' . $utc . PHP_EOL;
     $upc = WC_HTML::getUnreadPMCount($user);
     $back .= 'NewPMs:' . $upc . PHP_EOL;
     return $back;
 }