/** * This method gets the list of all the log runs * It also assembles a limited list of the most recent log runs up to a limit defined by maxLogRuns * * @return void */ function getLogRuns() { $this->logRuns = array(); $this->recentRuns = array(); $runLimit = empty($this->extConf['maxLogRuns']) ? 0 : $this->extConf['maxLogRuns']; $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT crmsec,crdate', 'tx_devlog', '', '', 'crmsec DESC'); // Assemble those runs in an associative array with run timestamp as a key $counter = 0; while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) { $formattedDate = t3lib_befunc::dateTimeAge($row['crdate']); $this->logRuns[$row['crmsec']] = $formattedDate; if ($runLimit != 0 && $counter < $runLimit) { $this->recentRuns[$row['crmsec']] = $formattedDate; } $counter++; } $GLOBALS['TYPO3_DB']->sql_free_result($dbres); }