Skip to content

Commit 34bf252

Browse files
committed
replace strftime use with dformat
This fixes deprecation messages
1 parent 6553f23 commit 34bf252

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

syntax/footer.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class syntax_plugin_include_footer extends DokuWiki_Syntax_Plugin {
1111
function getType() {
1212
return 'formatting';
1313
}
14-
14+
1515
function getSort() {
1616
return 300;
1717
}
@@ -22,14 +22,14 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
2222

2323
/**
2424
* Renders a permalink header.
25-
*
25+
*
2626
* Code heavily copied from the header renderer from inc/parser/xhtml.php, just
2727
* added an href parameter to the anchor tag linking to the wikilink.
2828
*/
2929
function render($mode, Doku_Renderer $renderer, $data) {
3030

3131
list($page, $sect, $sect_title, $flags, $redirect_id, $footer_lvl) = $data;
32-
32+
3333
if ($mode == 'xhtml') {
3434
$renderer->doc .= $this->html_footer($page, $sect, $sect_title, $flags, $footer_lvl, $renderer);
3535
return true;
@@ -72,18 +72,18 @@ function html_footer($page, $sect, $sect_title, $flags, $footer_lvl, &$renderer)
7272
if ($flags['date'] && $exists) {
7373
$date = $meta['date']['created'];
7474
if ($date) {
75-
$xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $date).'">'
76-
. strftime($conf['dformat'], $date)
75+
$xhtml[] = '<abbr class="published" title="'.dformat($date, '%Y-%m-%dT%H:%M:%SZ').'">'
76+
. dformat($date)
7777
. '</abbr>';
7878
}
7979
}
80-
80+
8181
// modified date
8282
if ($flags['mdate'] && $exists) {
8383
$mdate = $meta['date']['modified'];
8484
if ($mdate) {
85-
$xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $mdate).'">'
86-
. strftime($conf['dformat'], $mdate)
85+
$xhtml[] = '<abbr class="published" title="'.dformat($mdate, '%Y-%m-%dT%H:%M:%SZ').'">'
86+
. dformat($mdate)
8787
. '</abbr>';
8888
}
8989
}

0 commit comments

Comments
 (0)