function createSpeedDialImage($userId, $headerServer) { /* * Because the speeddial image shows stuff like last update and amount of new spots, * we want to make sure this is not a totally closed system */ $this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_view_spots_index, ''); /* * Initialize the service to get the new spotcount for this user */ $svcCacheNewSpotCount = new Services_Actions_CacheNewSpotCount($this->_daoFactory->getUserFilterCountDao(), $this->_daoFactory->getUserFilterDao(), $this->_daoFactory->getSpotDao(), new Services_Search_QueryParser($this->_daoFactory->getConnection())); $newSpots = $svcCacheNewSpotCount->getNewCountForFilter($userId, ''); /* * Get the total amount of spots */ $totalSpots = $svcCacheNewSpotCount->getSpotCount(''); $lastUpdate = $this->_tplHelper->formatDate($this->_daoFactory->getUsenetStateDao()->getLastUpdate(Dao_UsenetState::State_Spots), 'lastupdate'); $svc_ImageSpeedDial = new Services_Image_SpeedDial(); return $svc_ImageSpeedDial->createSpeedDial($totalSpots, $newSpots, $lastUpdate); }
$retriever = null; ## Spots /* * Actually retrieve spots from the server */ $retriever = new Services_Retriever_Spots($daoFactory, $settings, $forceMode, $retroMode); $newSpotCount = $retriever->perform(); # Show the cumulative timings of the spotsretrieval if ($showTiming) { SpotTiming::displayCumul(); SpotTiming::clear(); } # if ## Creating filter counts if ($newSpotCount > 0) { $svcPrv_cacheSpotCount = new Services_Actions_CacheNewSpotCount($daoFactory->getUserFilterCountDao(), $daoFactory->getUserFilterDao(), $daoFactory->getSpotDao(), new Services_Search_QueryParser($daoFactory->getConnection())); echo 'Calculating how many spots are new'; $notifyNewArray = $svcPrv_cacheSpotCount->cacheNewSpotCount(); echo ', done.' . PHP_EOL; # Show the cumulative timings of the caching of these spots if ($showTiming) { SpotTiming::displayCumul(); SpotTiming::clear(); } # if } # if /* * Should we retrieve comments? */ if ($settings->get('retrieve_comments')) {