/** * Index action contains the most important statistics * * @return void */ public function indexAction() { $this->view->assignMultiple(array('records' => $this->administrationRepository->getRecordsNumbers(), 'phash' => $this->administrationRepository->getPageHashTypes())); if ($this->pageUid) { $last24hours = ' AND tstamp > ' . ($GLOBALS['EXEC_TIME'] - 24 * 60 * 60); $last30days = ' AND tstamp > ' . ($GLOBALS['EXEC_TIME'] - 30 * 24 * 60 * 60); $this->view->assignMultiple(array('pageUid' => $this->pageUid, 'all' => $this->administrationRepository->getGeneralSearchStatistic('', $this->pageUid), 'last24hours' => $this->administrationRepository->getGeneralSearchStatistic($last24hours, $this->pageUid), 'last30days' => $this->administrationRepository->getGeneralSearchStatistic($last30days, $this->pageUid))); } }
/** * Index action contains the most important statistics * * @return void */ public function indexAction() { $this->view->assignMultiple(['records' => $this->administrationRepository->getRecordsNumbers(), 'phash' => $this->administrationRepository->getPageHashTypes()]); if ($this->pageUid) { $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('index_stat_word')->expr(); $last24hours = $expressionBuilder->gt('tstamp', $GLOBALS['EXEC_TIME'] - 86400); $last30days = $expressionBuilder->gt('tstamp', $GLOBALS['EXEC_TIME'] - 30 * 86400); $this->view->assignMultiple(['pageUid' => $this->pageUid, 'all' => $this->administrationRepository->getGeneralSearchStatistic('', $this->pageUid), 'last24hours' => $this->administrationRepository->getGeneralSearchStatistic($last24hours, $this->pageUid), 'last30days' => $this->administrationRepository->getGeneralSearchStatistic($last30days, $this->pageUid)]); } }