From: Mischa POSLAWSKY Date: Thu, 28 Jun 2018 22:03:05 +0000 (+0200) Subject: page: localise page variables within template includes X-Git-Tag: v3.4~14 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/d3d149e5d0a1dd80333077966c1b9d12fd18a87a page: localise page variables within template includes Clean up parameter interface: - $Page provides containing page instead of parent script; - $Args reserved for placeholder arguments; - $Place inherited and joined with placeholder options. The latter replaces GET overrides without bleeding into subsequent includes. --- diff --git a/login/admin.html b/login/admin.html index c07a25e..9192063 100644 --- a/login/admin.html +++ b/login/admin.html @@ -8,4 +8,4 @@ Wijzigingen zijn direct zichtbaar, en worden periodiek bijgehouden:

Laatste aanpassingen

-[[login/commits pagesize=10]] +[[login/commits n=10]] diff --git a/login/commits.html b/login/commits.html index 4750f32..b7a0413 100644 --- a/login/commits.html +++ b/login/commits.html @@ -1,4 +1,4 @@

Aanpassingen

-[[login/commits pagesize=50]] +[[login/commits n=50]] diff --git a/login/commits.php b/login/commits.php index c411f47..7b88964 100644 --- a/login/commits.php +++ b/login/commits.php @@ -4,7 +4,7 @@ if (!function_exists('popen')) { return; } -$pagesize = intval(@$_GET['pagesize']) ?: 20; +$pagesize = intval(@$Place['n'] ?: @$_GET['n']) ?: 20; $gitcmd = "git log -n $pagesize --pretty='%at\t%an\t%s'"; if ( $offset = intval(@$_GET['start']) ) { diff --git a/login/visits.php b/login/visits.php index 8e5d1f6..93bdd94 100644 --- a/login/visits.php +++ b/login/visits.php @@ -9,7 +9,7 @@ foreach (glob('profile/*') as $userdir) { ]; } -if (@$_GET['order'] == 'seen') { +if (@$Place['order'] == 'seen') { array_multisort(array_column($logins, 'seen'), SORT_DESC, SORT_NUMERIC, $logins); } diff --git a/nieuws.php b/nieuws.php index cafc94c..6bf6616 100644 --- a/nieuws.php +++ b/nieuws.php @@ -1,4 +1,4 @@