From b5b8986bcab106507b30c3f4c00d26c1fdfd1e20 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 21 Mar 2006 04:19:52 +0000 Subject: [PATCH] Fix backreferences in mysql2date(). Props tenpura. fixes #2564 git-svn-id: http://svn.automattic.com/wordpress/trunk@3654 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3d53697edf..513c242936 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -35,10 +35,10 @@ function mysql2date($dateformatstring, $mysqlstring, $translate = true) { $dateweekday = $weekday[date('w', $i)]; $dateweekday_abbrev = $weekday_abbrev[$dateweekday]; $dateformatstring = ' '.$dateformatstring; - $dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring); - $dateformatstring = preg_replace("/([^\\\])F/", "\\1".backslashit($datemonth), $dateformatstring); - $dateformatstring = preg_replace("/([^\\\])l/", "\\1".backslashit($dateweekday), $dateformatstring); - $dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit($datemonth_abbrev), $dateformatstring); + $dateformatstring = preg_replace("/([^\\\])D/", "\${1}".backslashit($dateweekday_abbrev), $dateformatstring); + $dateformatstring = preg_replace("/([^\\\])F/", "\${1}".backslashit($datemonth), $dateformatstring); + $dateformatstring = preg_replace("/([^\\\])l/", "\${1}".backslashit($dateweekday), $dateformatstring); + $dateformatstring = preg_replace("/([^\\\])M/", "\${1}".backslashit($datemonth_abbrev), $dateformatstring); $dateformatstring = substr($dateformatstring, 1, strlen($dateformatstring)-1); }