diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-02-23 13:40:45 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-02-23 13:40:45 +0100 |
commit | e656dcd46abfe069ea83271248dbd7aae36554ca (patch) | |
tree | 989cc97f395c6c5102ffa01aaad9a758181bbcc7 /inc/media.php | |
parent | 8acb31082c9a565d775be0739e6deaf1773f9751 (diff) | |
download | rpg-e656dcd46abfe069ea83271248dbd7aae36554ca.tar.gz rpg-e656dcd46abfe069ea83271248dbd7aae36554ca.tar.bz2 |
use strftime() instead of date() FS#1335 :!:
This patch replaces the use of the date() function with the strftime()
function. The latter will respect a set locale and will use localized
strings for things like month names.
Because the format options for strftime differ from the ones used in date,
DokuWiki will rest the value of $conf['dformat'] if it contains an old
date format string (detected by missing % characters).
Plugins or templates using the $conf['dformat'] need to be updated.
darcs-hash:20080223124045-7ad00-6afb2b839afc58781463e25577e06adb675fff79.gz
Diffstat (limited to 'inc/media.php')
-rw-r--r-- | inc/media.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/media.php b/inc/media.php index 3622ea54e..efa200d4c 100644 --- a/inc/media.php +++ b/inc/media.php @@ -364,7 +364,7 @@ function media_notify($id,$file,$mime){ if(empty($conf['notify'])) return; //notify enabled? $text = rawLocale('uploadmail'); - $text = str_replace('@DATE@',date($conf['dformat']),$text); + $text = str_replace('@DATE@',strftime($conf['dformat']),$text); $text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text); $text = str_replace('@IPADDRESS@',$_SERVER['REMOTE_ADDR'],$text); $text = str_replace('@HOSTNAME@',gethostbyaddr($_SERVER['REMOTE_ADDR']),$text); @@ -494,7 +494,7 @@ function media_printfile($item,$auth,$jump){ $info .= (int) $item['meta']->getField('File.Height'); $info .= ' '; } - $info .= '<i>'.date($conf['dformat'],$item['mtime']).'</i>'; + $info .= '<i>'.strftime($conf['dformat'],$item['mtime']).'</i>'; $info .= ' '; $info .= filesize_h($item['size']); |