### Eclipse Workspace Patch 1.0
#P wordpress-trunk
Index: wp-admin/includes/dashboard.php
===================================================================
--- wp-admin/includes/dashboard.php	(revision 12527)
+++ wp-admin/includes/dashboard.php	(working copy)
@@ -770,23 +770,39 @@
  * @since unknown
  */
 function wp_dashboard_plugins_output() {
-	$popular = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/popular/' );
-	$new     = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/new/' );
-	$updated = fetch_feed( 'http://wordpress.org/extend/plugins/rss/browse/updated/' );
 
+	/* feed configurations */
+	$feeds = array(		
+		'popular' => array(
+			'url'   => 'http://wordpress.org/extend/plugins/rss/browse/popular/',
+			'label' => __('Most Popular'),
+			),
+		'new'     => array(
+			'url' => 'http://wordpress.org/extend/plugins/rss/browse/popular/',
+			'label' => __('Newest Plugins'),
+			),
+		'updated' => array(
+			'url' => 'http://wordpress.org/extend/plugins/rss/browse/popular/',
+			'label' => __('Recently Updated'),
+			),
+	);
+
 	if ( false === $plugin_slugs = get_transient( 'plugin_slugs' ) ) {
 		$plugin_slugs = array_keys( get_plugins() );
 		set_transient( 'plugin_slugs', $plugin_slugs, 86400 );
 	}
 
-	foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) {
-		if ( is_wp_error($$feed) || !$$feed->get_item_quantity() )
+	foreach ( $feeds as $feed_key => $feed_data  ) {
+		$label = $feed_data['label'];
+		$feed  = fetch_feed( $feed_data['url'] );
+
+		if ( is_wp_error($feed) || !$feed->get_item_quantity() )
 			continue;
 
-		$items = $$feed->get_items(0, 5);
+		$items = $feed->get_items(0, 5);
 
 		// Pick a random, non-installed plugin
-		while ( true ) {
+		do {
 			// Abort this foreach loop iteration if there's no plugins left of this type
 			if ( 0 == count($items) )
 				continue 2;
@@ -812,11 +828,8 @@
 					continue 2;
 				}
 			}
+		} while ( false );
 
-			// If we get to this point, then the random plugin isn't installed and we can stop the while().
-			break;
-		}
-
 		// Eliminate some common badly formed plugin descriptions
 		while ( ( null !== $item_key = array_rand($items) ) && false !== strpos( $items[$item_key]->get_description(), 'Plugin Name:' ) )
 			unset($items[$item_key]);
@@ -840,8 +853,8 @@
 		echo "<h5><a href='$link'>$title</a></h5>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";
 		echo "<p>$description</p>\n";
 		
-		$$feed->__destruct();
-		unset($$feed);
+		$feed->__destruct();
+		unset($feed);
 	}
 }
 
