Make WordPress Core

Changeset 5345


Ignore:
Timestamp:
04/29/2007 09:00:54 PM (17 years ago)
Author:
rob1n
Message:

Check basename(). see #4169

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/upgrade-functions.php

    r5344 r5345  
    11051105    $plugins = __get_option( 'active_plugins' );
    11061106   
    1107     if ( in_array( 'widgets/widgets.php', $plugins ) ) {
    1108         array_splice( $plugins, array_search( 'widgets/widgets.php', $plugins ), 1 );
    1109         update_option( 'active_plugins', $plugins );
     1107    foreach ( $plugins as $plugin ) {
     1108        if ( basename( $plugin ) == 'widgets.php' ) {
     1109            array_splice( $plugins, array_search( $plugin, $plugins ), 1 );
     1110            update_option( 'active_plugins', $plugins );
     1111            break;
     1112        }
    11101113    }
    11111114}
  • trunk/wp-admin/upgrade-functions.php

    r5344 r5345  
    11171117    $plugins = __get_option( 'active_plugins' );
    11181118   
    1119     if ( in_array( 'widgets/widgets.php', $plugins ) ) {
    1120         array_splice( $plugins, array_search( 'widgets/widgets.php', $plugins ), 1 );
    1121         update_option( 'active_plugins', $plugins );
     1119    foreach ( $plugins as $plugin ) {
     1120        if ( basename( $plugin ) == 'widgets.php' ) {
     1121            array_splice( $plugins, array_search( $plugin, $plugins ), 1 );
     1122            update_option( 'active_plugins', $plugins );
     1123            break;
     1124        }
    11221125    }
    11231126}
Note: See TracChangeset for help on using the changeset viewer.