Skip to content
Snippets Groups Projects

OP#7365 PHP-8.1 - Upgrade - cronlog Viewer (monitors.ascii)https://projects.iml.unibe.ch/work_packages/7365

Merged Hahn Axel (hahn) requested to merge freshup-php into master
Files
3
@@ -33,7 +33,7 @@ require_once 'cronlog.class.php';
* @license GNU GPL 3.0
* @author Axel Hahn <axel.hahn@iml.unibe.ch>
*
* 2024-09-20 <axel.hahn@unibe.ch> added type declarations; update php docs
* 2024-10-01 <axel.hahn@unibe.ch> added type declarations; update php docs
*/
class cronlogrenderer extends cronlog
{
@@ -342,7 +342,7 @@ class cronlogrenderer extends cronlog
return '';
}
$sReturn = '';
$sServer = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : false;
$sServer = isset($_SERVER['SERVER_NAME']) ?? false;
$sReturn .= '<li class="nav-item"><a class="nav-link nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a></li>'
. '<li class="nav-item d-none d-sm-inline-block"><a href="#" class="nav-link">' . $this->t('instances') . ':</a></li>';
@@ -360,7 +360,7 @@ class cronlogrenderer extends cronlog
* @param array $aData result of $oCL->getServerLogs()
* @return string
*/
public function renderJoblist(array $aData = []): string
public function renderHistoryTable(array $aData = []): string
{
$sTaskId = __FUNCTION__ . '-' . $this->_sActiveServer;
$sHtml = $this->_getCacheData($sTaskId);
@@ -381,6 +381,7 @@ class cronlogrenderer extends cronlog
krsort($aTmp);
$aData = array_values($aTmp);
// render table
$sTblHead = '';
$iOK = 0;
$iErrors = 0;
@@ -482,7 +483,7 @@ class cronlogrenderer extends cronlog
*
* @return string
*/
public function renderJoblistOfAllServers(): string
public function renderHistoryOfAllServers(): string
{
$aData = [];
foreach (array_keys($this->getServers()) as $sServer) {
@@ -490,7 +491,7 @@ class cronlogrenderer extends cronlog
$aData = array_merge($aData, $this->getServerJobHistory());
}
$this->setServer('ALL');
return $this->renderJoblist($aData);
return $this->renderHistoryTable($aData);
}
/**
Loading