1
0

continue working on selftest

This commit is contained in:
2020-01-19 13:16:40 +01:00
parent 335fc764e8
commit a78d8ff9c9
22 changed files with 204 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
<?php
class UpdatesLog
class UpdatesLog implements IWebsiteModule
{
/** @var Website */
private $site;
@@ -61,4 +61,20 @@ class UpdatesLog
[':lt', $limit, PDO::PARAM_INT],
]);
}
public function checkConsistency()
{
$warn = null;
$this->load();
foreach ($this->staticData as $name => $data)
{
if (!key_exists('version', $data)) return ['result'=>'err', 'message' => 'Missing value [version]'];
if (!key_exists('url', $data)) return ['result'=>'err', 'message' => 'Missing value [url]'];
}
if ($warn != null) return $warn;
return ['result'=>'ok', 'message' => ''];
}
}