diff --git a/lib/include.php b/lib/include.php index d83563b..d3e6758 100644 --- a/lib/include.php +++ b/lib/include.php @@ -416,7 +416,7 @@ protected function _postDelete() { $this->_globalVar['tube'] = null; } header( - sprintf('Location: ./?server=%s&tube=%s', $this->_globalVar['server'], urlencode($this->_globalVar['tube']))); + sprintf('Location: ./?server=%s&tube=%s', $this->_globalVar['server'], urlencode($this->_globalVar['tube'] ?? ''))); exit(); } @@ -689,7 +689,7 @@ protected function _actionSearch() { foreach ($states as $state) { $jobList[$state] = $this->findJobsByState($GLOBALS['tube'], $state, $searchStr, $limit); - $jobList['total']+=count($jobList[$state]); + $jobList['total'] += count($jobList[$state]); } $this->searchResults = $jobList; @@ -741,8 +741,8 @@ private function findJobsByState($tube, $state, $searchStr, $limit = 25) { if ($job) { $jobStats = $this->interface->_client->statsJob($job); if ($jobStats->tube === $tube && - $jobStats->state === $state && - strpos($job->getData(), $searchStr) !== false + $jobStats->state === $state && + strpos($job->getData(), $searchStr) !== false ) { $jobList[$id] = $job; $added++; diff --git a/lib/tpl/currentTubeJobsShowcase.php b/lib/tpl/currentTubeJobsShowcase.php index 0e7413a..13d4cee 100644 --- a/lib/tpl/currentTubeJobsShowcase.php +++ b/lib/tpl/currentTubeJobsShowcase.php @@ -25,8 +25,8 @@ 0 ? 'days: ' . $days . '
' : ''; echo $hours > 0 ? 'hours: ' . $hours . '
' : '';