1
0

Add book Tier-List
Build Docker and Deploy / Build Docker (push) Successful in 2m10s
Build Docker and Deploy / Deploy to Server (push) Successful in 18s

This commit is contained in:
2026-04-15 17:15:54 +02:00
parent 63989d9bc7
commit 8e0039f6bd
14 changed files with 1495 additions and 806 deletions
+18 -5
View File
@@ -17,18 +17,31 @@ class EbookHistory implements IWebsiteModule
public function checkConsistency(): array
{
$fn = $this->dir().'/snippet.html';
$fns = [
$this->dir().'/snippet_hist.html',
$this->dir().'/snippet_tier.html'
];
if (!file_exists($fn)) return ['result'=>'err', 'message' => 'File not found: ' . $fn];
foreach ($fns as $fn) {
if (!file_exists($fn)) return ['result'=>'err', 'message' => 'File not found: ' . $fn];
if (filemtime($fn) < time()-(10*24*60*60)) return ['result'=>'warn', 'message' => 'Rendered data is older than 10 days'];
if (filemtime($fn) < time()-(10*24*60*60)) return ['result'=>'warn', 'message' => 'Rendered data is older than 10 days'];
}
return ['result' => 'ok', 'message' => ''];
}
public function get(): string
public function getHistory(): string
{
$fn = $this->dir().'/snippet.html';
$fn = $this->dir().'/snippet_hist.html';
if (!file_exists($fn)) return '';
return file_get_contents($fn);
}
public function getTierlist(): string
{
$fn = $this->dir().'/snippet_tier.html';
if (!file_exists($fn)) return '';
return file_get_contents($fn);