From 1cbcaf48bd244ed1e2ea626c896f33bafec54566 Mon Sep 17 00:00:00 2001 From: Lukas Bestle Date: Sun, 21 Jun 2020 13:14:34 +0200 Subject: [PATCH] Update qdated for server migration --- content/legal/default.txt | 2 +- site/plugins/qdated/index.php | 7 ++++--- site/snippets/header.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/content/legal/default.txt b/content/legal/default.txt index 6de5eab..d4cb2ef 100644 --- a/content/legal/default.txt +++ b/content/legal/default.txt @@ -16,7 +16,7 @@ DE 300 983 590 ### Contact -(qdated:) +(qdated: cddmail1) (link: pgp.asc text: PGP: D703 9FD2 4AAE 69E9 97A6  92FF 2E2A DD32 FE50 61C1 rel: pgpkey) This email address is valid for one week, after which it expires. Emails to this address are received by me personally and are responded to as fast as possible. Together with my reply, you will get my permanently valid email address. diff --git a/site/plugins/qdated/index.php b/site/plugins/qdated/index.php index 4811502..af75447 100644 --- a/site/plugins/qdated/index.php +++ b/site/plugins/qdated/index.php @@ -7,7 +7,7 @@ Kirby::plugin('lukasbestle/qdated', [ 'tags' => [ 'qdated' => [ 'html' => function($tag) { - $qdated = qdated(); + $qdated = qdated($tag->qdated); return '' . $qdated . ''; } ] @@ -18,10 +18,11 @@ Kirby::plugin('lukasbestle/qdated', [ * Returns the current qdated address * If qdated is not available, returns null * + * @param string $destination * @return string */ -function qdated() { - $path = $_SERVER['HOME'] . DS . '.qdated-current'; +function qdated(string $destination) { + $path = $_SERVER['HOME'] . '/.config/qdated/' . $destination . '/current'; if(!is_file($path)) return null; return 'dated-' . trim(F::read($path)) . '@' . Url::host(); diff --git a/site/snippets/header.php b/site/snippets/header.php index d5a9aca..0cc9d76 100644 --- a/site/snippets/header.php +++ b/site/snippets/header.php @@ -28,7 +28,7 @@ code designer