Skip to:
Content

BuddyPress.org

Changeset 7583


Ignore:
Timestamp:
11/16/2013 07:23:43 PM (11 years ago)
Author:
boonebgorges
Message:

Convert group slug to lower case when checking whether slug exists

For slugs containing only latin characters, the clause WHERE foo = 'bar'
is non-case-sensitive. However, this is not the case for different UTF8 slugs.
The result is that using the incorrect case in a URL would result in 404s.

Fixes #5056

Props gametako, r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r7503 r7583  
    224224            return false;
    225225
    226         return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$table_name} WHERE slug = %s", $slug ) );
     226        return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$table_name} WHERE slug = %s", strtolower( $slug ) ) );
    227227    }
    228228
Note: See TracChangeset for help on using the changeset viewer.