v2.6.5 (Lyra): Dynamische pad-resolutie, WordPress-stijl docblocks, security-fix wachtwoord, git-historie schoon

- Bug: dashboard toonde 0 content (AdminPluginAPI::getContentDir() gaf relatief pad terug zonder normalisatie)
- Dynamische pad-resolutie: PluginAPIInterface uitgebreid met getProjectRoot/getContentDir/getPluginsDir/getVersionInfo; CMSAPI en AdminPluginAPI implementeren deze universeel
- public/index.php media-serving gebruikt $config['content_dir'] i.p.v. hardcoded /content
- Navigation en Logs plugins halen paden via de API i.p.v. hardcoded dirname(__DIR__)
- WordPress-stijl docblocks toegevoegd voor alle classes, methods, properties en functies (~450 docblocks, @since 2.6.5)
- Security: hardcoded plaintext-wachtwoord 'admin' verwijderd uit AdminAuth.php; bij eerste installatie wordt een cryptografisch veilig wachtwoord gegenereerd (random_bytes, 16 tekens) en eenmalig op het inlogscherm getoond
- Security: git-geschiedenis schoongemaakt (admin.json, admin.json.example, admin-console/config/admin.json verwijderd uit alle commits; filter-branch over alle branches + tags, gc --prune --aggressive)
- README.md, README.en.md, AGENTS.md bijgewerkt
- Test-scripts bijgewerkt naar clean-URL structuur + actuele ARIA-waarden
- Versie verhoogd naar 2.6.5
- Tests: pentest 29/29, WCAG 25/25, functioneel 16/16, enhanced 25/25
This commit is contained in:
2026-08-27 09:05:51 +00:00
parent 74612aefbb
commit d9ea2eee47
38 changed files with 771 additions and 572 deletions
+12 -12
View File
@@ -6,14 +6,14 @@
* Systeem-plugin die een overzichtspagina biedt met site-informatie,
* content-statistieken en een lijst van geïnstalleerde plugins.
*
* @since 2.6.4
* @since 2.6.5
*/
class Dashboard
{
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -21,7 +21,7 @@ class Dashboard
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -33,7 +33,7 @@ class Dashboard
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie met title, viewable en type.
*/
public function getConfig(): array
@@ -48,7 +48,7 @@ class Dashboard
/**
* Geeft de admin-menu-items voor deze plugin.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, array<string, mixed>> Lijst met admin-menu-item configuraties.
*/
public function getAdminMenu(): array
@@ -72,7 +72,7 @@ class Dashboard
* Geeft een HTML-weergave van site-informatie, content-statistieken
* en een plugin-overzicht.
*
* @since 2.6.4
* @since 2.6.5
* @param string $action De uit te voeren actie.
* @return string|null De HTML-uitvoer van het dashboard, of null.
*/
@@ -193,7 +193,7 @@ class Dashboard
/**
* Haalt de site-configuratie op via de AdminPluginAPI.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> De site-configuratie, of een lege array.
*/
private function getSiteConfig(): array
@@ -211,7 +211,7 @@ class Dashboard
/**
* Bepaalt het type (system of content) van een plugin door het hoofdbestand te lezen.
*
* @since 2.6.4
* @since 2.6.5
* @param string $pluginDir Pad naar de plugin-map.
* @param string $pluginName Naam van de plugin.
* @return string Het plugin-type ('system' of 'content').
@@ -235,7 +235,7 @@ class Dashboard
*
* Slaat verborgen en met '-' voorafgegane bestanden en mappen over.
*
* @since 2.6.4
* @since 2.6.5
* @param string $dir Pad naar de map die doorzocht moet worden.
* @param string[] $extensions Optionele lijst van toegestane extensies.
* @return int Het aantal gevonden bestanden.
@@ -269,7 +269,7 @@ class Dashboard
*
* Slaat verborgen en met '-' voorafgegane mappen over.
*
* @since 2.6.4
* @since 2.6.5
* @param string $dir Pad naar de map die doorzocht moet worden.
* @return int Het aantal gevonden submappen.
*/
@@ -294,7 +294,7 @@ class Dashboard
/**
* Berekent de totale bestandsgrootte in bytes van alle bestanden in een map.
*
* @since 2.6.4
* @since 2.6.5
* @param string $dir Pad naar de map die doorzocht moet worden.
* @return int De totale grootte in bytes.
*/
@@ -316,7 +316,7 @@ class Dashboard
/**
* Formateert een byte-grootte naar een leesbare string met eenheid.
*
* @since 2.6.4
* @since 2.6.5
* @param int $bytes Het aantal bytes.
* @return string De geformatteerde grootte met eenheid (bijv. '1.5 MB').
*/
+7 -7
View File
@@ -6,14 +6,14 @@
* Systeem-plugin die een admin-pagina biedt met het IP-adres van de bezoeker
* en het bijbehorende land via de GeoIP-dienst.
*
* @since 2.6.4
* @since 2.6.5
*/
class GeoIPInfo
{
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -21,7 +21,7 @@ class GeoIPInfo
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -33,7 +33,7 @@ class GeoIPInfo
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie met title en type.
*/
public function getConfig(): array
@@ -47,7 +47,7 @@ class GeoIPInfo
/**
* Geeft de admin-menu-items voor deze plugin terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, array<string, mixed>> Lijst met admin-menu-item configuraties.
*/
public function getAdminMenu(): array
@@ -66,7 +66,7 @@ class GeoIPInfo
/**
* Geeft de admin-routes terug die deze plugin afhandelt.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, string> Lijst met admin-route namen.
*/
public function getAdminRoutes(): array
@@ -79,7 +79,7 @@ class GeoIPInfo
*
* Bepaalt het IP-adres van de bezoeker en toont het land en de vlag.
*
* @since 2.6.4
* @since 2.6.5
* @param string $route De af te handelen admin-route.
* @return void
*/
+8 -8
View File
@@ -6,14 +6,14 @@
* Content-plugin die informatie over de huidige pagina toont,
* inclusief taal, homepage-status, bestandsinformatie en snelle navigatie.
*
* @since 2.6.4
* @since 2.6.5
*/
class HTMLBlock
{
/**
* Plugin-configuratie.
*
* @since 2.6.4
* @since 2.6.5
* @var array<string, mixed>
*/
private array $config;
@@ -21,7 +21,7 @@ class HTMLBlock
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -29,7 +29,7 @@ class HTMLBlock
/**
* Initialiseert de plugin met standaardconfiguratie.
*
* @since 2.6.4
* @since 2.6.5
*/
public function __construct()
{
@@ -42,7 +42,7 @@ class HTMLBlock
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -57,7 +57,7 @@ class HTMLBlock
* Toont informatie over de huidige pagina, taal, homepage-status,
* bestandsinformatie en een snelle navigatielijst.
*
* @since 2.6.4
* @since 2.6.5
* @return string De opgebouwde HTML voor de zijbalk.
*/
public function getSidebarContent(): string
@@ -134,7 +134,7 @@ class HTMLBlock
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie.
*/
public function getConfig(): array
@@ -145,7 +145,7 @@ class HTMLBlock
/**
* Stelt de plugin-configuratie in door deze te mergen met standaardwaarden.
*
* @since 2.6.4
* @since 2.6.5
* @param array<string, mixed> $config De configuratie die samengevoegd moet worden.
* @return void
*/
+7 -7
View File
@@ -6,14 +6,14 @@
* Systeem-plugin die logbestanden uitleest en in een tabel toont,
* met tabbladen voor admin-logs en request-logs.
*
* @since 2.6.4
* @since 2.6.5
*/
class Logs
{
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -21,7 +21,7 @@ class Logs
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -33,7 +33,7 @@ class Logs
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie met title, viewable en type.
*/
public function getConfig(): array
@@ -48,7 +48,7 @@ class Logs
/**
* Geeft de admin-menu-items voor deze plugin terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, array<string, mixed>> Lijst met admin-menu-item configuraties.
*/
public function getAdminMenu(): array
@@ -75,7 +75,7 @@ class Logs
*
* Leest standaardwaarden uit plugin.json en overschrijft deze met config.json.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> De samengevoegde plugin-configuratie.
*/
private function getPluginConfig(): array
@@ -108,7 +108,7 @@ class Logs
* Leest de geselecteerde log, parset de regels en toont deze in een tabel
* met tabbladen voor admin- en request-logs.
*
* @since 2.6.4
* @since 2.6.5
* @param string $action De uit te voeren actie.
* @return string|null De HTML-uitvoer van de logs-pagina, of null.
*/
+18 -18
View File
@@ -6,14 +6,14 @@
* Content-plugin die de navigatie opbouwt op basis van de mappenstructuur,
* met ondersteuning voor guide-pagina's en reguliere content-pagina's.
*
* @since 2.6.4
* @since 2.6.5
*/
class Navigation
{
/**
* Plugin-configuratie.
*
* @since 2.6.4
* @since 2.6.5
* @var array<string, mixed>
*/
private array $config;
@@ -21,7 +21,7 @@ class Navigation
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -29,7 +29,7 @@ class Navigation
/**
* Initialiseert de plugin met standaardconfiguratie.
*
* @since 2.6.4
* @since 2.6.5
*/
public function __construct()
{
@@ -43,7 +43,7 @@ class Navigation
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -55,7 +55,7 @@ class Navigation
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie.
*/
public function getConfig(): array
@@ -66,7 +66,7 @@ class Navigation
/**
* Stelt de plugin-configuratie in door deze te mergen met standaardwaarden.
*
* @since 2.6.4
* @since 2.6.5
* @param array<string, mixed> $config De configuratie die samengevoegd moet worden.
* @return void
*/
@@ -78,7 +78,7 @@ class Navigation
/**
* Geeft het pad naar het CSS-bestand van deze plugin (relatief ten opzichte van de webroot).
*
* @since 2.6.4
* @since 2.6.5
* @return string Het CSS-URL-pad.
*/
public function getCssUrl(): string
@@ -92,7 +92,7 @@ class Navigation
* Detecteert of het om een guide-pagina of een content-pagina gaat en
* bouwt de navigatie dienovereenkomstig op.
*
* @since 2.6.4
* @since 2.6.5
* @return string De HTML-navigatie, of een lege string in admin-context.
*/
public function getSidebarContent(): string
@@ -117,7 +117,7 @@ class Navigation
/**
* Bouwt de navigatie voor de guide-sectie.
*
* @since 2.6.4
* @since 2.6.5
* @param string $lang De huidige taalcode.
* @param string $currentPage De huidige pagina-pad.
* @param bool $isAdmin Of dit in admin-context is.
@@ -141,7 +141,7 @@ class Navigation
/**
* Bouwt de navigatie voor de content-sectie.
*
* @since 2.6.4
* @since 2.6.5
* @param string $lang De huidige taalcode.
* @param string $currentPage De huidige pagina-pad.
* @return string De opgebouwde HTML-navigatie, of een lege string.
@@ -162,7 +162,7 @@ class Navigation
/**
* Bouwt recursief navigatie op vanuit een mapstructuur.
*
* @since 2.6.4
* @since 2.6.5
* @param string $dir Huidige map.
* @param string $relPath Relatief pad vanaf de root.
* @param string $currentPage Huidige pagina-pad.
@@ -257,7 +257,7 @@ class Navigation
/**
* Bouwt de URL voor een pagina-referentie.
*
* @since 2.6.4
* @since 2.6.5
* @param string $pageRef De pagina-referentie.
* @param string $lang De huidige taalcode.
* @param bool $isAdmin Of dit in admin-context is.
@@ -279,7 +279,7 @@ class Navigation
/**
* Controleert of een navigatie-item de huidige pagina is.
*
* @since 2.6.4
* @since 2.6.5
* @param string $pageRef De pagina-referentie van het item.
* @param string $currentPage Het huidige pagina-pad.
* @param string $mode Modus: 'guide' of 'content'.
@@ -297,7 +297,7 @@ class Navigation
/**
* Geeft de beschikbare taalcodes terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, string> Lijst met taalcodes.
*/
private function getLanguageCodes(): array
@@ -308,7 +308,7 @@ class Navigation
/**
* Formateert een slug naar een leesbare titel.
*
* @since 2.6.4
* @since 2.6.5
* @param string $slug De te formatteren slug.
* @return string De geformatteerde titel.
*/
@@ -324,7 +324,7 @@ class Navigation
*
* Valt terug op formatTitle() wanneer geen H1 gevonden is.
*
* @since 2.6.4
* @since 2.6.5
* @param string $filePath Pad naar het bestand.
* @return string De gevonden titel, of een lege string.
*/
@@ -347,7 +347,7 @@ class Navigation
/**
* Rendert de navigatie-items als HTML.
*
* @since 2.6.4
* @since 2.6.5
* @param array $items Navigatie-items.
* @param int $depth Nesting-diepte (0 = topniveau). Standaard 0.
* @return string De gegenereerde HTML.
+8 -8
View File
@@ -6,14 +6,14 @@
* Systeem-plugin die analytics-gegevens toont, zoals totaal aantal views,
* unieke bezoekers, landen en top-pagina's.
*
* @since 2.6.4
* @since 2.6.5
*/
class Statistics
{
/**
* Plugin-API instantie voor communicatie met de CMS-core.
*
* @since 2.6.4
* @since 2.6.5
* @var PluginAPIInterface|null
*/
private ?PluginAPIInterface $api = null;
@@ -21,7 +21,7 @@ class Statistics
/**
* Stelt de Plugin-API instantie in.
*
* @since 2.6.4
* @since 2.6.5
* @param PluginAPIInterface $api De Plugin-API instantie.
* @return void
*/
@@ -33,7 +33,7 @@ class Statistics
/**
* Geeft de plugin-configuratie terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> Plugin-configuratie met title, viewable en type.
*/
public function getConfig(): array
@@ -48,7 +48,7 @@ class Statistics
/**
* Geeft de admin-menu-items voor deze plugin terug.
*
* @since 2.6.4
* @since 2.6.5
* @return array<int, array<string, mixed>> Lijst met admin-menu-item configuraties.
*/
public function getAdminMenu(): array
@@ -75,7 +75,7 @@ class Statistics
*
* Leest standaardwaarden uit plugin.json en overschrijft deze met config.json.
*
* @since 2.6.4
* @since 2.6.5
* @return array<string, mixed> De samengevoegde plugin-configuratie.
*/
private function getPluginConfig(): array
@@ -108,7 +108,7 @@ class Statistics
* Toont analytics-gegevens zoals views, unieke bezoekers, landen en
* top-pagina's, mits analytics ingeschakeld is.
*
* @since 2.6.4
* @since 2.6.5
* @param string $action De uit te voeren actie.
* @return string|null De HTML-uitvoer van de statistieken-pagina, of null.
*/
@@ -233,7 +233,7 @@ class Statistics
/**
* Haalt de Analytics-instantie op basis van de analytics-configuratie.
*
* @since 2.6.4
* @since 2.6.5
* @return Analytics|null De Analytics-instantie, of null als analytics uitgeschakeld is.
*/
private function getAnalytics(): ?Analytics