From f22635779b10fe3735a11bc1af5c88653e580534 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Oct 2009 15:36:14 +0200 Subject: New dformat() function for fuzzy date support Ignore-this: 7193cd788fee2c05a9068bf6edd5dc17 It is now possible to use the %f placeholder in $conf['dformat'] to add a fuzzy age string. Template developers and plugin authors should replace their strftime + $conf['dformat'] calls with calls to the new dformat() function. Example: %Y/%m/%d %H:%M (%f) produces dates like this: 2009/09/16 10:36 (3 weeks ago) darcs-hash:20091007133614-6e07b-677108d1b43928ef8fd886813e43514507b5e073.gz --- inc/toolbar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/toolbar.php') diff --git a/inc/toolbar.php b/inc/toolbar.php index a1851c746..701723b58 100644 --- a/inc/toolbar.php +++ b/inc/toolbar.php @@ -236,7 +236,7 @@ function toolbar_signature(){ $sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig); $sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig); $sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig); - $sig = str_replace('@DATE@',strftime($conf['dformat']),$sig); + $sig = str_replace('@DATE@',dformat(),$sig); $sig = str_replace('\\\\n','\\n',addslashes($sig)); return $sig; } -- cgit v1.2.3