Make WordPress Core

Ticket #36506: misc.php.3.patch

File misc.php.3.patch, 1.7 KB (added by WiZZarD_, 9 years ago)
  • src/wp-admin/includes/misc.php

     
    491491        if ( $doc->load($filename) === false )
    492492                return false;
    493493        $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\')]');
    495495        if ( $rules->length == 0 )
    496496                return false;
    497497        else
     
    521521        if ( $doc -> load($filename) === false )
    522522                return false;
    523523        $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\')]');
    525525        if ( $rules->length > 0 ) {
    526526                $child = $rules->item(0);
    527527                $parent = $child->parentNode;
     
    562562        $xpath = new DOMXPath($doc);
    563563
    564564        // 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\')]');
    566566        if ( $wordpress_rules->length > 0 )
    567567                return true;
    568568