Ticket #36506: misc.php.3.patch
File misc.php.3.patch, 1.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/misc.php
491 491 if ( $doc->load($filename) === false ) 492 492 return false; 493 493 $xpath = new DOMXPath($doc); 494 $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] ');494 $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]'); 495 495 if ( $rules->length == 0 ) 496 496 return false; 497 497 else … … 521 521 if ( $doc -> load($filename) === false ) 522 522 return false; 523 523 $xpath = new DOMXPath($doc); 524 $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] ');524 $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]'); 525 525 if ( $rules->length > 0 ) { 526 526 $child = $rules->item(0); 527 527 $parent = $child->parentNode; … … 562 562 $xpath = new DOMXPath($doc); 563 563 564 564 // First check if the rule already exists as in that case there is no need to re-add it 565 $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] ');565 $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]'); 566 566 if ( $wordpress_rules->length > 0 ) 567 567 return true; 568 568