Rewrite Rules: After [36953], correctly replace existing rules on IIS when updating them.
Merge of [37273] to the 4.5 branch. Props WiZZarD_. Fixes #36506. Built from https://develop.svn.wordpress.org/branches/4.5@37274 git-svn-id: http://core.svn.wordpress.org/branches/4.5@37240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
58ef0cfe87
commit
9f63726656
|
@ -491,7 +491,7 @@ function iis7_rewrite_rule_exists($filename) {
|
|||
if ( $doc->load($filename) === false )
|
||||
return false;
|
||||
$xpath = new DOMXPath($doc);
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $rules->length == 0 )
|
||||
return false;
|
||||
else
|
||||
|
@ -521,7 +521,7 @@ function iis7_delete_rewrite_rule($filename) {
|
|||
if ( $doc -> load($filename) === false )
|
||||
return false;
|
||||
$xpath = new DOMXPath($doc);
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $rules->length > 0 ) {
|
||||
$child = $rules->item(0);
|
||||
$parent = $child->parentNode;
|
||||
|
@ -562,7 +562,7 @@ function iis7_add_rewrite_rule($filename, $rewrite_rule) {
|
|||
$xpath = new DOMXPath($doc);
|
||||
|
||||
// First check if the rule already exists as in that case there is no need to re-add it
|
||||
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
|
||||
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
|
||||
if ( $wordpress_rules->length > 0 )
|
||||
return true;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5.1-alpha-37257';
|
||||
$wp_version = '4.5.1-alpha-37274';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue