Fix backreferences in mysql2date(). Props tenpura. fixes #2564
git-svn-id: https://develop.svn.wordpress.org/trunk@3654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3432ea28ff
commit
26d26f8ce6
@ -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
Block a user