1
0

smaller prog previews + self test

This commit is contained in:
2018-01-27 14:21:34 +01:00
parent 88e04c4a87
commit a84a475008
58 changed files with 521 additions and 54 deletions

View File

@@ -26,4 +26,26 @@ class MikescherGitGraph
return $v;
}
public static function getPathRenderedData()
{
return __DIR__ . '/../dynamic/egh.html';
}
public static function includeRender()
{
if (file_exists(__DIR__ . '/../dynamic/egh.html'))
include __DIR__ . '/../dynamic/egh.html';
}
public static function checkConsistency()
{
$p = self::getPathRenderedData();
if (!file($p)) return ['result'=>'err', 'message' => 'Rendered data not found'];
if (filemtime($p) < time()-(3*7*24*60*60)) return ['result'=>'warn', 'message' => 'Rendered data is older than 3 weeks'];
return ['result'=>'ok', 'message' => ''];
}
}