1
0

and more selftest fixes... ... ...

This commit is contained in:
Mike Schwörer 2020-01-20 18:47:06 +01:00
parent 25b1c02a3f
commit 274257a015
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,12 @@ require_once (__DIR__ . '/../internals/website.php');
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
?>
<?php
if (!isset($API_OPTIONS['ulname'])) { $FRAME_OPTIONS->forceResult(400, "Wrong parameters."); return; }
$ulname = $API_OPTIONS['ulname'];
?>
<div class="stripedtable_container" style="width: 100%;">
<table class="stripedtable">
<thead>
@ -15,7 +21,7 @@ require_once (__DIR__ . '/../internals/website.php');
</tr>
</thead>
<tbody>
<?php foreach ($SITE->modules->UpdatesLog()->getEntries($_GET['ulname'], 512) as $entry): ?>
<?php foreach ($SITE->modules->UpdatesLog()->getEntries($ulname, 512) as $entry): ?>
<tr>
<td><?php echo $entry['ip']; ?></td>
<td><?php echo $entry['version']; ?></td>

View File

@ -125,7 +125,7 @@ class SelfTest implements IWebsiteModule
$this->addMethodMultiPathStatus("api::default::updatecheck-7", 200, '/api/update/{0}', function(){ return array_keys(Website::inst()->modules->UpdatesLog()->listUpdateData()); });
$this->addMethodPathStatus( "api::default::egg-status", 200, "/api/extendedgitgraph::status?secret=$ajaxsecret");
$this->addMethodPathStatus( "api::default::an-show", 200, "/api/alephnote::show?secret=$ajaxsecret");
$this->addMethodPathStatus( "api::default::updates-show", 200, "/api/updates::show?secret=$ajaxsecret");
$this->addMethodMultiPathStatus("api::default::updates-show", 200, "/api/updates::show?secret=$ajaxsecret&ulname={0}", function(){ return array_key_map(Website::inst()->modules->UpdatesLog()->listProgramsInformation(), 'name'); });
$this->addMethodPathStatus( "api::default::aoc-ajax", 200, "/api/html::panel_aoc_calendar");
$this->addMethodPathStatus( "api::default::404-1", 404, '/api/update/no_prog_xx');
$this->addMethodPathStatus( "api::default::404-2", 404, '/api/asdf::notfound');