Replace direct calls to strftime with dformat calls
This is in preparation for fixing #3573
This commit is contained in:
parent
36a1a8807f
commit
10f359ad04
12
doku.php
12
doku.php
|
@ -79,10 +79,14 @@ if($DATE_AT) {
|
|||
$DATE_AT = null;
|
||||
} else if ($rev_t === false) { //page did not exist
|
||||
$rev_n = $pagelog->getRelativeRevision($DATE_AT,+1);
|
||||
msg(sprintf($lang['page_nonexist_rev'],
|
||||
strftime($conf['dformat'],$DATE_AT),
|
||||
wl($ID, array('rev' => $rev_n)),
|
||||
strftime($conf['dformat'],$rev_n)));
|
||||
msg(
|
||||
sprintf(
|
||||
$lang['page_nonexist_rev'],
|
||||
dformat($DATE_AT),
|
||||
wl($ID, array('rev' => $rev_n)),
|
||||
dformat($rev_n)
|
||||
)
|
||||
);
|
||||
$REV = $DATE_AT; //will result in a page not exists message
|
||||
} else {
|
||||
$REV = $rev_t;
|
||||
|
|
|
@ -637,8 +637,8 @@ abstract class ChangeLog
|
|||
} else {
|
||||
// $fileRev is older than $lastRev, that is erroneous/incorrect occurence.
|
||||
$msg = "Warning: current file modification time is older than last revision date";
|
||||
$details = 'File revision: '.$fileRev.' '.strftime("%Y-%m-%d %H:%M:%S", $fileRev)."\n"
|
||||
.'Last revision: '.$lastRev.' '.strftime("%Y-%m-%d %H:%M:%S", $lastRev);
|
||||
$details = 'File revision: '.$fileRev.' '.dformat($fileRev, "%Y-%m-%d %H:%M:%S")."\n"
|
||||
.'Last revision: '.$lastRev.' '.dformat($lastRev, "%Y-%m-%d %H:%M:%S");
|
||||
Logger::error($msg, $details, $this->getFilename());
|
||||
$timestamp = false;
|
||||
$sum = $lang['external_edit'].' ('.$lang['unknowndate'].')';
|
||||
|
|
|
@ -1164,7 +1164,7 @@ function parsePageTemplate(&$data) {
|
|||
$tpl = preg_replace_callback(
|
||||
'/%./',
|
||||
function ($m) {
|
||||
return strftime($m[0]);
|
||||
return dformat(null, $m[0]);
|
||||
},
|
||||
$tpl
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue