Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikke Schirén <mikke.schiren@digitalistgroup.com>2022-05-23 00:09:47 +0300
committersgiehl <stefan@matomo.org>2022-08-04 11:47:38 +0300
commit49819504f869d825840324a8b0b9c865838348c6 (patch)
treec3188e703ec4a563ee69229df27ca06fbc703698
parent02e2f82e3bb5d5be884bc3bc875ccf92473f8629 (diff)
format timestamp as date to make it more easy to read
-rw-r--r--plugins/Diagnostics/Diagnostic/ReportInformational.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/Diagnostics/Diagnostic/ReportInformational.php b/plugins/Diagnostics/Diagnostic/ReportInformational.php
index d9623f5f14..a69cce0d48 100644
--- a/plugins/Diagnostics/Diagnostic/ReportInformational.php
+++ b/plugins/Diagnostics/Diagnostic/ReportInformational.php
@@ -1,10 +1,12 @@
<?php
+
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+
namespace Piwik\Plugins\Diagnostics\Diagnostic;
use Piwik\Access;
@@ -42,8 +44,10 @@ class ReportInformational implements Diagnostic
$results[] = DiagnosticResult::informationalResult('Had visits in last 1 day', $this->hadVisitsInLastDays(1));
$results[] = DiagnosticResult::informationalResult('Had visits in last 3 days', $this->hadVisitsInLastDays(3));
$results[] = DiagnosticResult::informationalResult('Had visits in last 5 days', $this->hadVisitsInLastDays(5));
- $results[] = DiagnosticResult::informationalResult('Archive Time Last Started', Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS));
- $results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS));
+ $archiveStart = Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS);
+ $results[] = DiagnosticResult::informationalResult('Archive Time Last Started', ($archiveStart ? date("Y-m-d H:i:s", $archiveStart) : '-'));
+ $archiveEnd = Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS);
+ $results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', ($archiveEnd ? date("Y-m-d H:i:s", $archiveEnd) : '-'));
}
return $results;
@@ -56,8 +60,8 @@ class ReportInformational implements Diagnostic
try {
$idSites = $this->getImplodedIdSitesSecure();
- $row = Db::fetchOne('SELECT idsite from ' . $table . ' where idsite in ('.$idSites.') and visit_last_action_time > ? LIMIT 1', $time );
- } catch ( \Exception $e ) {
+ $row = Db::fetchOne('SELECT idsite from ' . $table . ' where idsite in (' . $idSites . ') and visit_last_action_time > ? LIMIT 1', $time);
+ } catch (\Exception $e) {
$row = null;
}