Index: inc/admin/class.dc.favorites.php
===================================================================
--- inc/admin/class.dc.favorites.php	(revision 2229)
+++ inc/admin/class.dc.favorites.php	(revision 2230)
@@ -78,4 +78,5 @@
 	 public function setup() {
 		$this->legacyFavorites();
+		$this->core->callBehavior('adminDashboardFavorites', $this->core, $this);
 		$this->setUserPrefs();
 	}
@@ -151,10 +152,10 @@
 			$this->user_prefs = $this->getFavorites(array('new_post'));
 		}
-
+		$u = explode('?',$_SERVER['REQUEST_URI']);
 		// Loop over prefs to enable active favorites
 		foreach ($this->user_prefs as $k=>&$v) {
 			if (isset($v['active_cb']) && is_callable($v['active_cb'])) {
 				// Use callback if defined to match whether favorite is active or not
-				$v['active'] = call_user_func($v['active_cb'],$_SERVER['REQUEST_URI'],$_REQUEST);
+				$v['active'] = call_user_func($v['active_cb'],$u[0],$_REQUEST);
 			} else {
 				// Failback active detection. We test against URI name & parameters
@@ -324,10 +325,9 @@
 	public function appendDashboardIcons($icons) {
 		foreach ($this->user_prefs as $k=>$v) {
-			if (isset($v['title_cb']) && is_callable($v['title_cb'])) {
-				$title = call_user_func($v['title_cb'],$this->core);
-			} else {
-				$title = $v['title'];
-			}
-			$icons[$k]=new ArrayObject(array($title,$v['url'],$v['large-icon']));
+			if (isset($v['dashboard_cb']) && is_callable($v['dashboard_cb'])) {
+				$v = new ArrayObject($v);
+				call_user_func($v['dashboard_cb'],$this->core,$v);
+			}
+			$icons[$k]=new ArrayObject(array($v['title'],$v['url'],$v['large-icon']));
 			$this->core->callBehavior('adminDashboardFavsIcon',$this->core,$k,$icons[$k]);
 		}		
@@ -344,5 +344,5 @@
 	 *	'large-icon' => favorite large icon (for dashboard)
 	 *	'permissions' => (optional) comma-separated list of permissions for thie fav, if not set : no restriction
-	 *	'title_cb' => (optional) callback to modify title if dynamic, if not set : title is taken as is
+	 *	'dashboard_cb' => (optional) callback to modify title if dynamic, if not set : title is taken as is
 	 *	'active_cb' => (optional) callback to tell whether current page matches favorite or not, for complex pages
 	 *
@@ -410,5 +410,5 @@
 				'large-icon' => 'images/menu/entries-b.png',
 				'permissions' => 'usage,contentadmin',
-				'title_cb' => array('defaultFavorites','postsTitle')),
+				'dashboard_cb' => array('defaultFavorites','postsDashboard')),
 			'comments' => array(
 				'title' => __('Comments'),
@@ -417,5 +417,5 @@
 				'large-icon' => 'images/menu/comments-b.png',
 				'permissions' => 'usage,contentadmin',
-				'title_cb' => array('defaultFavorites','commentsTitle')),
+				'dashboard_cb' => array('defaultFavorites','commentsDashboard')),
 			'search' => array(
 				'title' => __('Search'),
@@ -477,14 +477,14 @@
 	}
 	
-	public static function postsTitle($core) {
+	public static function postsDashboard($core,$v) {
 		$post_count = $core->blog->getPosts(array(),true)->f(0);
 		$str_entries = __('%d entry', '%d entries',$post_count);
-		return sprintf($str_entries,$post_count);
-	}
-	
-	public static function commentsTitle($core) {
+		$v['title'] = sprintf($str_entries,$post_count);
+	}
+	
+	public static function commentsDashboard($core,$v) {
 		$comment_count = $core->blog->getComments(array(),true)->f(0);
 		$str_comments = __('%d comments', '%d comments',$comment_count);
-		return sprintf($str_comments,$comment_count);
+		$v['title']= sprintf($str_comments,$comment_count);
 	}
 
Index: plugins/antispam/_admin.php
===================================================================
--- plugins/antispam/_admin.php	(revision 2022)
+++ plugins/antispam/_admin.php	(revision 2230)
@@ -24,12 +24,17 @@
 $core->addBehavior('adminDashboardIcons',array('dcAntispam','dashboardIcon'));
 
-$core->addBehavior('adminDashboardFavs','antispamDashboardFavs');
+$core->addBehavior('adminDashboardFavorites','antispamDashboardFavorites');
 $core->addBehavior('adminDashboardFavsIcon','antispamDashboardFavsIcon');
 
-function antispamDashboardFavs($core,$favs)
+function antispamDashboardFavorites($core,$favs)
 {
-	$favs['antispam'] = new ArrayObject(array('antispam','Antispam','plugin.php?p=antispam',
-		'index.php?pf=antispam/icon.png','index.php?pf=antispam/icon-big.png',
-		'admin',null,null));
+	$favs->register('antispam', array(
+		'title' => __('Antispam'),
+		'url' => 'plugin.php?p=antispam',
+		'small-icon' => 'index.php?pf=antispam/icon.png',
+		'large-icon' => 'index.php?pf=antispam/icon-big.png',
+		'permissions' => 'admin',
+		'dashboard_cb' => 'antispamDashboard')
+	);
 }
 
Index: plugins/blogroll/_admin.php
===================================================================
--- plugins/blogroll/_admin.php	(revision 1502)
+++ plugins/blogroll/_admin.php	(revision 2230)
@@ -13,5 +13,5 @@
 
 $core->addBehavior('adminDashboardIcons','blogroll_dashboard');
-$core->addBehavior('adminDashboardFavs','blogroll_dashboard_favs');
+$core->addBehavior('adminDashboardFavorites','blogroll_dashboard_favorites');
 $core->addBehavior('adminUsersActionsHeaders','blogroll_users_actions_headers');
 
@@ -20,9 +20,13 @@
 	$icons['blogroll'] = new ArrayObject(array(__('Blogroll'),'plugin.php?p=blogroll','index.php?pf=blogroll/icon.png'));
 }
-function blogroll_dashboard_favs($core,$favs)
+function blogroll_dashboard_favorites($core,$favs)
 {
-	$favs['blogroll'] = new ArrayObject(array('blogroll','Blogroll','plugin.php?p=blogroll',
-		'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
-		'usage,contentadmin',null,null));
+	$favs->register('blogroll', array(
+		'title' => __('Blogroll'),
+		'url' => 'plugin.php?p=blogroll',
+		'small-icon' => 'index.php?pf=blogroll/icon-small.png',
+		'large-icon' => 'index.php?pf=blogroll/icon.png',
+		'permissions' => 'usage,contentadmin'
+	));
 }
 function blogroll_users_actions_headers()
Index: plugins/importExport/_admin.php
===================================================================
--- plugins/importExport/_admin.php	(revision 2044)
+++ plugins/importExport/_admin.php	(revision 2230)
@@ -20,15 +20,14 @@
 );
 
-$core->addBehavior('adminDashboardFavs','importExportDashboardFavs');
+$core->addBehavior('adminDashboardFavorites','importExportDashboardFavorites');
 
-function importExportDashboardFavs($core,$favs)
+function importExportDashboardFavorites($core,$favs)
 {
-	$favs['importExport'] = new ArrayObject(array(
-		'importExport',
-		__('Import/Export'),
-		'plugin.php?p=importExport',
-		'index.php?pf=importExport/icon.png',
-		'index.php?pf=importExport/icon-big.png',
-		'admin',null,null
+	$favs->register('importExport', array(
+		'title' => __('Import/Export'),
+		'url' => 'plugin.php?p=importExport',
+		'small-icon' => 'index.php?pf=importExport/icon.png',
+		'large-icon' => 'index.php?pf=importExport/icon-big.png',
+		'permissions' => 'admin'
 	));
 }
Index: plugins/pages/_admin.php
===================================================================
--- plugins/pages/_admin.php	(revision 2141)
+++ plugins/pages/_admin.php	(revision 2230)
@@ -13,25 +13,32 @@
 
 $core->addBehavior('adminDashboardIcons','pages_dashboard');
-$core->addBehavior('adminDashboardFavs','pages_dashboard_favs');
+$core->addBehavior('adminDashboardFavorites',array('pagesDashboard','pagesDashboardFavs'));
 $core->addBehavior('adminDashboardFavsIcon','pages_dashboard_favs_icon');
 $core->addBehavior('adminUsersActionsHeaders','pages_users_actions_headers');
 
-function pages_dashboard($core,$icons)
+class pagesDashboard
 {
-	$icons['pages'] = new ArrayObject(array(__('Pages'),'plugin.php?p=pages','index.php?pf=pages/icon-big.png'));
-}
-function pages_dashboard_favs($core,$favs)
-{
-	$favs['pages'] = new ArrayObject(array('pages','Pages','plugin.php?p=pages',
-		'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
-		'contentadmin,pages',null,null));
-	$favs['newpage'] = new ArrayObject(array('newpage','New page','plugin.php?p=pages&amp;act=page',
-		'index.php?pf=pages/icon-np.png','index.php?pf=pages/icon-np-big.png',
-		'contentadmin,pages',null,null));
-}
-function pages_dashboard_favs_icon($core,$name,$icon)
-{
-	// Check if it is one of my own favs
-	if ($name == 'pages') {
+	public static function pagesDashboardFavs($core,$favs)
+	{
+		$favs->register('pages', array(
+			'title' => __('Pages'),
+			'url' => 'plugin.php?p=pages',
+			'small-icon' => 'index.php?pf=pages/icon.png',
+			'large-icon' => 'index.php?pf=pages/icon-big.png',
+			'permissions' => 'contentadmin,pages',
+			'dashboard_cb' => array('pagesDashboard','pagesDashboardCB'),
+			'active_cb' => array('pagesDashboard','pagesActiveCB')
+		));
+		$favs->register('newpage', array(
+			'title' => __('New page'),
+			'url' => 'plugin.php?p=pages&amp;act=page',
+			'small-icon' => 'index.php?pf=pages/icon-np.png',
+			'large-icon' => 'index.php?pf=pages/icon-np-big.png',
+			'permissions' => 'contentadmin,pages',
+			'active_cb' => array('pagesDashboard','newPageActiveCB')
+		));
+	}
+	
+	public static function pagesDashboardCB($core,$v) {
 		$params = new ArrayObject();
 		$params['post_type'] = 'page';
@@ -39,8 +46,23 @@
 		if ($page_count > 0) {
 			$str_pages = ($page_count > 1) ? __('%d pages') : __('%d page');
-			$icon[0] = sprintf($str_pages,$page_count);
+			$v['title'] = sprintf($str_pages,$page_count);
 		}
 	}
+	
+	public static function pagesActiveCB($request,$params) {
+		return ($request == "plugin.php") &&
+			isset($params['p']) && $params['p'] == 'pages'
+			&& !(isset($params['act']) && $params['act']=='page');
+	}
+	
+	public static function newPageActiveCB($request,$params) {
+		return ($request == "plugin.php") &&
+			isset($params['p']) && $params['p'] == 'pages'
+			&& isset($params['act']) && $params['act']=='page';
+	}
+	
 }
+
+
 function pages_users_actions_headers()
 {
Index: plugins/pings/_admin.php
===================================================================
--- plugins/pings/_admin.php	(revision 1970)
+++ plugins/pings/_admin.php	(revision 2230)
@@ -37,11 +37,14 @@
 $core->addBehavior('adminAfterPostUpdate',array('pingsBehaviors','doPings'));
 
-$core->addBehavior('adminDashboardFavs','pingDashboardFavs');
+$core->addBehavior('adminDashboardFavorites','pingDashboardFavorites');
 
-function pingDashboardFavs($core,$favs)
+function pingDashboardFavorites($core,$favs)
 {
-	$favs['pings'] = new ArrayObject(array('pings','Pings','plugin.php?p=pings',
-		'index.php?pf=pings/icon.png','index.php?pf=pings/icon-big.png',
-		null,null,null));
+	$favs->register('pings', array(
+		'title' => __('Pings'),
+		'url' => 'plugin.php?p=pings',
+		'small-icon' => 'index.php?pf=pings/icon.png',
+		'large-icon' => 'index.php?pf=pings/icon-big.png',
+	));
 }
 ?>
Index: plugins/tags/_admin.php
===================================================================
--- plugins/tags/_admin.php	(revision 2169)
+++ plugins/tags/_admin.php	(revision 2230)
@@ -36,14 +36,17 @@
 $core->addBehavior('coreInitWikiPost',array('tagsBehaviors','coreInitWikiPost'));
 
-$core->addBehavior('adminDashboardFavs',array('tagsBehaviors','dashboardFavs'));
+$core->addBehavior('adminDashboardFavorites',array('tagsBehaviors','dashboardFavorites'));
 
 # BEHAVIORS
 class tagsBehaviors
 {
-	public static function dashboardFavs($core,$favs)
-	{
-		$favs['tags'] = new ArrayObject(array('tags','Tags','plugin.php?p=tags&amp;m=tags',
-			'index.php?pf=tags/icon.png','index.php?pf=tags/icon-big.png',
-			'usage,contentadmin',null,null));
+	public static function dashboardFavorites($core,$favs)
+	{
+		$favs->register('tags', array(
+			'title' => __('Tags'),
+			'url' => 'plugin.php?p=tags&amp;m=tags',
+			'small-icon' => 'index.php?pf=tags/icon.png',
+			'large-icon' => 'index.php?pf=tags/icon-big.png',
+		));
 	}
 
Index: plugins/widgets/_admin.php
===================================================================
--- plugins/widgets/_admin.php	(revision 1179)
+++ plugins/widgets/_admin.php	(revision 2230)
@@ -12,11 +12,14 @@
 if (!defined('DC_CONTEXT_ADMIN')) { return; }
 
-$core->addBehavior('adminDashboardFavs','widgets_dashboard_favs');
+$core->addBehavior('adminDashboardFavorites','widgets_dashboard_favorites');
 
-function widgets_dashboard_favs($core,$favs)
+function widgets_dashboard_favorites($core,$favs)
 {
-	$favs['widgets'] = new ArrayObject(array('widgets','Presentation widgets','plugin.php?p=widgets',
-		'index.php?pf=widgets/icon.png','index.php?pf=widgets/icon-big.png',
-		'admin',null,null));
+	$favs->register('widgets', array(
+		'title' => __('Presentation widgets'),
+		'url' => 'plugin.php?p=widgets',
+		'small-icon' => 'index.php?pf=widgets/icon.png',
+		'large-icon' => 'index.php?pf=widgets/icon-big.png',
+	));
 }
 
