Update qdated for server migration
This commit is contained in:
@@ -7,7 +7,7 @@ Kirby::plugin('lukasbestle/qdated', [
|
||||
'tags' => [
|
||||
'qdated' => [
|
||||
'html' => function($tag) {
|
||||
$qdated = qdated();
|
||||
$qdated = qdated($tag->qdated);
|
||||
return '<a href="mailto:' . $qdated . '">' . $qdated . '</a>';
|
||||
}
|
||||
]
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user