nieuws/replies: shift date part from file names
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 3 Jul 2019 19:36:32 +0000 (21:36 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jul 2019 02:18:16 +0000 (04:18 +0200)
Fix date formatting since dummy parameter to showdate() was dropped in
commit v3.9-6-ga16bdccbbe [nieuws/feed: conform article dates to RFC-3339]
(2019-06-25).

widget/nieuws/replies.php

index 0847c7ef0d9aa0dde103257861863b1f847ed810..06af5d3eea15cfed0b39468c29b8822f384b2a5e 100644 (file)
@@ -27,7 +27,7 @@ foreach (glob("$pagelink/*.html") as $reply) {
        preg_match('</(\d{2,14}) : ([^:]*) [^/]* \.html$>x', $reply, $replymeta);
        if (!$replymeta) continue;
        $replydate = str_split($replymeta[1], 2);
-       $replydate[1] = $replydate[0] . $replydate[1];
+       $replydate[0] = array_shift($replydate) . $replydate[0];
        $replyuser = new User("profile/{$replymeta[2]}");
        print '<li>';
        printf('<strong>%s</strong> <small class=date>%s</small>',