From 7123b0b62a467d66ed82b542b358ba22ecc946ff Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 11 Jun 2011 03:33:17 +0000 Subject: [PATCH] Restore the md5 in the Dash widget cache key, prevents issues with long widget ids. Props nacin. Fixes #16927 git-svn-id: http://svn.automattic.com/wordpress/trunk@18265 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 9547f8f92..169923ff8 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1042,7 +1042,7 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar $check_urls = array( $widgets[$widget_id]['url'] ); } - $cache_key = 'dash_' . $widget_id; + $cache_key = 'dash_' . md5( $widget_id ); if ( false !== ( $output = get_transient( $cache_key ) ) ) { echo $output; return true; @@ -1118,7 +1118,7 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { } } update_option( 'dashboard_widget_options', $widget_options ); - $cache_key = 'dash_' . $widget_id; + $cache_key = 'dash_' . md5( $widget_id ); delete_transient( $cache_key ); }