Fix backreferences in mysql2date(). Props tenpura. fixes #2564
git-svn-id: http://svn.automattic.com/wordpress/trunk@3654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
46df065de5
commit
b5b8986bca
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue