Make WordPress Core

Ticket #26403: patch.diff

File patch.diff, 2.0 KB (added by codix, 11 years ago)
  • wp-includes/ms-settings.php

    From 805004e2b518d81d507a2b45e7e3dedc866cd0f1 Mon Sep 17 00:00:00 2001
    From: S H Mohanjith <moha@mohanjith.net>
    Date: Wed, 4 Dec 2013 20:02:16 +0200
    Subject: [PATCH] Make path lower case
    
    ---
     wp-includes/ms-settings.php | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php
    index af2ea0d..f740569 100644
    a b if ( !isset( $current_site ) || !isset( $current_blog ) ) { 
    4444        $path = preg_replace( '|([a-z0-9-]+.php.*)|', '', $_SERVER['REQUEST_URI'] );
    4545        $path = str_replace ( '/wp-admin/', '/', $path );
    4646        $path = preg_replace( '|(/[a-z0-9-]+?/).*|', '$1', $path );
     47        $path = strtolower( $path );
    4748
    4849        $current_site = wpmu_current_site();
    4950        if ( ! isset( $current_site->blog_id ) )
  • wp-includes/class-wp.php

    -- 
    1.7.11.1
    
    From e85ff75de04acedcdb8cfb54fc9e0d83f6064c6a Mon Sep 17 00:00:00 2001
    From: S H Mohanjith <moha@mohanjith.net>
    Date: Wed, 4 Dec 2013 23:21:40 +0200
    Subject: [PATCH] Don't do a case sensitive match of home
    
    ---
     wp-includes/class-wp.php | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php
    index 0541d6a..1bd1655 100644
    a b class WP { 
    164164                        // requested permalink.
    165165                        $req_uri = str_replace($pathinfo, '', $req_uri);
    166166                        $req_uri = trim($req_uri, '/');
    167                         $req_uri = preg_replace("|^$home_path|i", '', $req_uri);
     167                        $req_uri = preg_replace("|^$home_path|", '', $req_uri);
    168168                        $req_uri = trim($req_uri, '/');
    169169                        $pathinfo = trim($pathinfo, '/');
    170                         $pathinfo = preg_replace("|^$home_path|i", '', $pathinfo);
     170                        $pathinfo = preg_replace("|^$home_path|", '', $pathinfo);
    171171                        $pathinfo = trim($pathinfo, '/');
    172172                        $self = trim($self, '/');
    173                         $self = preg_replace("|^$home_path|i", '', $self);
     173                        $self = preg_replace("|^$home_path|", '', $self);
    174174                        $self = trim($self, '/');
    175175
    176176                        // The requested permalink is in $pathinfo for path info requests and