From a450c80a6a8ef8af656657cdf2584f993f343af9 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 4 Oct 2006 03:49:56 +0000 Subject: [PATCH] case insensitive sorting. props Nazgul. fixes #3108 git-svn-id: http://svn.automattic.com/wordpress/trunk@4289 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 2 +- wp-admin/users.php | 2 +- wp-includes/cron.php | 4 ++-- wp-includes/plugin.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 108a67bc18..b4ebf165c1 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -127,7 +127,7 @@ foreach ( $menu as $id => $data ) { unset($id); -ksort($menu); // make it all pretty +uksort($menu, "strnatcasecmp"); // make it all pretty if (! user_can_access_admin_page()) { wp_die( __('You do not have sufficient permissions to access this page.') ); diff --git a/wp-admin/users.php b/wp-admin/users.php index 25c83f2759..f21de0393d 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -373,7 +373,7 @@ default: $roleclass) { - ksort($roleclass); + uksort($roleclass, "strnatcasecmp"); ?> diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 511e7f9356..f5f6a9803d 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -5,7 +5,7 @@ function wp_schedule_single_event( $timestamp, $hook ) { $crons = _get_cron_array(); $key = md5(serialize($args)); $crons[$timestamp][$hook][$key] = array( 'schedule' => false, 'args' => $args ); - ksort( $crons ); + uksort( $crons, "strnatcasecmp" ); _set_cron_array( $crons ); } @@ -17,7 +17,7 @@ function wp_schedule_event( $timestamp, $recurrence, $hook ) { if ( !isset( $schedules[$recurrence] ) ) return false; $crons[$timestamp][$hook][$key] = array( 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] ); - ksort( $crons ); + uksort( $crons, "strnatcasecmp" ); _set_cron_array( $crons ); } diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 365a6f862c..cac08973f8 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -70,7 +70,7 @@ function merge_filters($tag) { } if ( isset($wp_filter[$tag]) ) - ksort( $wp_filter[$tag] ); + uksort( $wp_filter[$tag], "strnatcasecmp" ); }