Index: CHANGELOG
===================================================================
--- CHANGELOG	(revision 331)
+++ CHANGELOG	(revision 332)
@@ -1,5 +1,8 @@
-Dotclear 2.4.0 - ongoing dev
-===========================================================
-* handling of postgres non default schemas (db_prefix = 'schema.prefix')
+Dotclear 2.3.1 - ongoing dev
+===========================================================
+* Updated makefile for cleaner distrib.
+* Better localization handling for prefs and shortcuts.
+* Misc JS & CSS cleaning.
+* Import/Export preferences-related bugfix.
 
 Dotclear 2.3.0 - 2011-05-16
Index: Makefile
===================================================================
--- Makefile	(revision 288)
+++ Makefile	(revision 290)
@@ -25,8 +25,4 @@
 	## Remove .svn folders
 	find ./$(DIST)/ -type d -name '.svn' | xargs rm -rf
-
-	## Remove .hg* files and folders
-	find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
-	find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
 	
 	## Remove config file if any
@@ -54,4 +50,8 @@
 	find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf
 	
+	## Remove .hg* files and folders
+	find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
+	find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
+
 	## "Compile" .po files
 	./build-tools/make-l10n.php ./$(DC)/
Index: admin/auth.php
===================================================================
--- admin/auth.php	(revision 270)
+++ admin/auth.php	(revision 314)
@@ -295,5 +295,5 @@
     if ($.cookie('dc_admin_test_cookie')) {
       $('#cookie_help').hide();
-      $.cookie('dc_admin_test_cookie', '', {expires: -1});
+      $.cookie('dc_admin_test_cookie', '', {'expires': -1});
     } else {
       $('#cookie_help').show();
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 270)
+++ admin/index.php	(revision 320)
@@ -84,5 +84,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
@@ -99,5 +99,5 @@
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
 				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
-			$__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon']));
+			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
 			# Let plugins set their own title for favorite on dashboard
Index: admin/js/_index.js
===================================================================
--- admin/js/_index.js	(revision 297)
+++ admin/js/_index.js	(revision 314)
@@ -65,5 +65,5 @@
 	// allow to hide quick entry div, and remember choice
 	$('#quick h3').toggleWithLegend($('#quick').children().not('h3'),{
-		cookie: 'dcx_quick_entry',
-	});
+		cookie: 'dcx_quick_entry'
+	}, positionFooter);
 });
Index: admin/js/common.js
===================================================================
--- admin/js/common.js	(revision 299)
+++ admin/js/common.js	(revision 314)
@@ -57,5 +57,5 @@
 }
 
-jQuery.fn.toggleWithLegend = function(target,s) {
+jQuery.fn.toggleWithLegend = function(target,s, callback) {
 	var defaults = {
 		img_on_src: dotclear.img_plus_src,
@@ -79,14 +79,14 @@
 	}
 
-	var toggle = function(i,speed) {
+	var toggle = function(i,speed, callback) {
 		speed = speed || 0;
 		if (p.hide) {
 			$(i).get(0).src = p.img_on_src;
 			$(i).get(0).alt = p.img_on_alt;
-			target.hide(speed, positionFooter);
+			target.hide(speed, callback);
 		} else {
 			$(i).get(0).src = p.img_off_src;
 			$(i).get(0).alt = p.img_off_alt;
-			target.show(speed, positionFooter);
+			target.show(speed, callback);
 			if (p.fn) {
 				p.fn.apply(target);
@@ -122,5 +122,5 @@
 		$(ctarget).css('cursor','pointer');
 		$(ctarget).click(function() {
-			toggle(i,p.speed, positionFooter);
+			toggle(i,p.speed, callback);
 			return false;
 		});
@@ -335,5 +335,5 @@
 			position: "static",
 			padding: ".75em 0",
-			width: "auto",
+			width: "auto"
 		});
 	}
@@ -356,14 +356,18 @@
 	}
 	$('#blog-menu h3:first').toggleWithLegend($('#blog-menu ul:first'),
-		$.extend({cookie:'dc_blog_menu'},menu_settings)
+		$.extend({cookie:'dc_blog_menu'},menu_settings),
+		positionFooter
 	);
 	$('#system-menu h3:first').toggleWithLegend($('#system-menu ul:first'),
-		$.extend({cookie:'dc_system_menu'},menu_settings)
+		$.extend({cookie:'dc_system_menu'},menu_settings),
+		positionFooter
 	);
 	$('#plugins-menu h3:first').toggleWithLegend($('#plugins-menu ul:first'),
-		$.extend({cookie:'dc_plugins_menu'},menu_settings)
+		$.extend({cookie:'dc_plugins_menu'},menu_settings),
+		positionFooter
 	);
 	$('#favorites-menu h3:first').toggleWithLegend($('#favorites-menu ul:first'),
-		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings)
+		$.extend({cookie:'dc_favorites_menu',hide:false,reverse_cookie:true},menu_settings),
+		positionFooter
 	);
 
Index: admin/js/jquery/jquery.pageTabs.js
===================================================================
--- admin/js/jquery/jquery.pageTabs.js	(revision 297)
+++ admin/js/jquery/jquery.pageTabs.js	(revision 0)
@@ -9,7 +9,7 @@
 		breakerClassName: 'clear'
 	};
-
+	
 	var index = start_tab ? start_tab : 0;
-
+	
 	this.params = jQuery.extend(defaults,settings);
 	this.divs = jQuery('div.'+this.params.className);
@@ -20,10 +20,10 @@
 jQuery._pageTabs.prototype = {
 	items: new Array(),
-
+	
 	createList: function() {
 		if (this.divs.length <= 0) {
 			return;
 		}
-
+		
 		this.block = document.createElement('div');
 		this.block.className = this.params.listClassName;
@@ -32,5 +32,5 @@
 		this.block.appendChild(this.list);
 		var li, a;
-
+		
 		var This = this;
 		var i=0;
@@ -57,30 +57,30 @@
 			}
 		});
-
+		
 		this.breaker = document.createElement('br');
 		this.breaker.className = this.params.breakerClassName;
-
+		
 		jQuery(this.divs.get(0)).before(this.block);
 		jQuery(this.block).after(this.breaker);
 	},
-
+	
 	showDiv: function(index) {
 		var This = this;
 		var i = 0;
 		var to_trigger = null;
-
+		
 		this.divs.each(function() {
 			if ((this.id != '' && this.id == index) || i == index) {
-				jQuery(this).show(0, positionFooter);
+				jQuery(this).show();
 				This.items[i].className = This.params.listClassName+'-active';
 				to_trigger = i;
 			} else {
-				jQuery(this).hide(0, positionFooter);
+				jQuery(this).hide();
 				This.items[i].className = '';
 			}
-
+			
 			i++;
 		});
-
+		
 		if (to_trigger != null) {
 			jQuery(this.divs[to_trigger]).onetabload();
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 322)
+++ admin/post.php	(revision 270)
@@ -527,7 +527,4 @@
 	}
 	
-	# --BEHAVIOR-- adminCommentsActionsCombo
-	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
-	
 	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
 	
Index: admin/preferences.php
===================================================================
--- admin/preferences.php	(revision 270)
+++ admin/preferences.php	(revision 324)
@@ -499,5 +499,5 @@
 				form::field(array('order['.$k.']'),2,3,$count,'position','',false,'title="'.sprintf(__('position of %s'),$fav['title']).'"').
 				form::hidden(array('dynorder[]','dynorder-'.$k.''),$k).
-				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).$fav['title'].'</label>'.
+				'<label for="fuk-'.$k.'">'.form::checkbox(array('remove[]','fuk-'.$k),$k).__($fav['title']).'</label>'.
 				'</li>';
 		}
@@ -542,5 +542,5 @@
 			$count++;
 			echo '<li id="fd-'.$k.'">'.
-			'<img src="'.$fav['small-icon'].'" alt="" /> '.$fav['title'].'</li>';
+			'<img src="'.$fav['small-icon'].'" alt="" /> '.__($fav['title']).'</li>';
 		}
 	}
@@ -568,6 +568,6 @@
 		echo '<li id="fa-'.$fav[0].'">'.'<label for="fak-'.$fav[0].'">'.
 			form::checkbox(array('append[]','fak-'.$fav[0]),$k).
-			'<img src="'.$fav[3].'" alt="" /> '.'<span class="zoom"><img src="'.$fav[4].'" alt="" /></span>'.$fav[1].
-			'</label>'.'</li>';
+			'<img src="'.$fav[3].'" alt="" /> '.'<span class="zoom"><img src="'.$fav[4].'" alt="" /></span>'.
+			__($fav[1]).'</label>'.'</li>';
 	}
 }	
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 323)
+++ admin/services.php	(revision 270)
@@ -133,5 +133,6 @@
 			$rsp->comment_ip($rs->comment_ip);
 			$rsp->comment_email($rs->comment_email);
-			$rsp->comment_spam_disp(dcAntispam::statusMessage($rs));
+			# --BEHAVIOR-- adminAfterCommentDesc
+			$rsp->comment_spam_disp($core->callBehavior('adminAfterCommentDesc', $rs));
 		}
 		
Index: admin/user.php
===================================================================
--- admin/user.php	(revision 313)
+++ admin/user.php	(revision 270)
@@ -96,8 +96,4 @@
 		$cur->user_post_status = $user_post_status = $_POST['user_post_status'];
 		
-		if ($cur->user_id == $core->auth->userID() && $core->auth->isSuperAdmin()) {
-			// force super_user to true if current user
-			$cur->user_super = $user_super = true;
-		}
 		if ($core->auth->allowPassChange()) {
 			$cur->user_change_pwd = !empty($_POST['user_change_pwd']) ? 1 : 0;
@@ -259,8 +255,6 @@
 }
 
-$super_disabled = $user_super && $user_id == $core->auth->userID();
-
 echo
-'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16,$super_disabled).' '.
+'<p><label for="user_super" class="classic">'.form::checkbox('user_super','1',$user_super,'',16).' '.
 __('Super administrator').'</label></p>'.
 '</div>'.
Index: admin/users.php
===================================================================
--- admin/users.php	(revision 313)
+++ admin/users.php	(revision 270)
@@ -24,7 +24,6 @@
 			# --BEHAVIOR-- adminBeforeUserDelete
 			$core->callBehavior('adminBeforeUserDelete',$u);
-			if ($u != $core->auth->userID()) {
-				$core->delUser($u);
-			}
+			
+			$core->delUser($u);
 		}
 		catch (Exception $e)
@@ -33,4 +32,5 @@
 		}
 	}
+	
 	if (!$core->error->flag()) {
 		http::redirect('users.php?del=1');
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 270)
+++ inc/admin/lib.dc.page.php	(revision 321)
@@ -270,7 +270,7 @@
 			} else {
 				$prof_url = http::getSelfURI();
-				$prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&amp;';
+				$prof_url .= (strpos($prof_url,'?') === false) ? '?' : '&';
 				$prof_url .= 'XDEBUG_PROFILE';
-				$res .= '<p><a href="'.$prof_url.'">Trigger profiler</a></p>';
+				$res .= '<p><a href="'.html::escapeURL($prof_url).'">Trigger profiler</a></p>';
 			}
 			
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 270)
+++ inc/admin/prepend.php	(revision 324)
@@ -185,43 +185,43 @@
 	# NB : '*' in permissions means any, null means super admin only
 	
-	$_fav['prefs'] = new ArrayObject(array('prefs',__('My preferences'),'preferences.php',
+	$_fav['prefs'] = new ArrayObject(array('prefs','My preferences','preferences.php',
 		'images/menu/user-pref.png','images/menu/user-pref-b.png',
 		'*',null,null));
 
-	$_fav['new_post'] = new ArrayObject(array('new_post',__('New entry'),'post.php',
+	$_fav['new_post'] = new ArrayObject(array('new_post','New entry','post.php',
 		'images/menu/edit.png','images/menu/edit-b.png',
 		'usage,contentadmin',null,'menu-new-post'));
-	$_fav['posts'] = new ArrayObject(array('posts',__('Entries'),'posts.php',
+	$_fav['posts'] = new ArrayObject(array('posts','Entries','posts.php',
 		'images/menu/entries.png','images/menu/entries-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['comments'] = new ArrayObject(array('comments',__('Comments'),'comments.php',
+	$_fav['comments'] = new ArrayObject(array('comments','Comments','comments.php',
 		'images/menu/comments.png','images/menu/comments-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['search'] = new ArrayObject(array('search',__('Search'),'search.php',
+	$_fav['search'] = new ArrayObject(array('search','Search','search.php',
 		'images/menu/search.png','images/menu/search-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['categories'] = new ArrayObject(array('categories',__('Categories'),'categories.php',
+	$_fav['categories'] = new ArrayObject(array('categories','Categories','categories.php',
 		'images/menu/categories.png','images/menu/categories-b.png',
 		'categories',null,null));
-	$_fav['media'] = new ArrayObject(array('media',__('Media manager'),'media.php',
+	$_fav['media'] = new ArrayObject(array('media','Media manager','media.php',
 		'images/menu/media.png','images/menu/media-b.png',
 		'media,media_admin',null,null));
-	$_fav['blog_pref'] = new ArrayObject(array('blog_pref',__('Blog settings'),'blog_pref.php',
+	$_fav['blog_pref'] = new ArrayObject(array('blog_pref','Blog settings','blog_pref.php',
 		'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 		'admin',null,null));
-	$_fav['blog_theme'] = new ArrayObject(array('blog_theme',__('Blog appearance'),'blog_theme.php',
+	$_fav['blog_theme'] = new ArrayObject(array('blog_theme','Blog appearance','blog_theme.php',
 		'images/menu/themes.png','images/menu/blog-theme-b.png',
 		'admin',null,null));
 
-	$_fav['blogs'] = new ArrayObject(array('blogs',__('Blogs'),'blogs.php',
+	$_fav['blogs'] = new ArrayObject(array('blogs','Blogs','blogs.php',
 		'images/menu/blogs.png','images/menu/blogs-b.png',
 		'usage,contentadmin',null,null));
-	$_fav['users'] = new ArrayObject(array('users',__('Users'),'users.php',
+	$_fav['users'] = new ArrayObject(array('users','Users','users.php',
 		'images/menu/users.png','images/menu/users-b.png',
 		null,null,null));
-	$_fav['plugins'] = new ArrayObject(array('plugins',__('Plugins'),'plugins.php',
+	$_fav['plugins'] = new ArrayObject(array('plugins','Plugins','plugins.php',
 		'images/menu/plugins.png','images/menu/plugins-b.png',
 		null,null,null));
-	$_fav['langs'] = new ArrayObject(array('langs',__('Languages'),'langs.php',
+	$_fav['langs'] = new ArrayObject(array('langs','Languages','langs.php',
 		'images/menu/langs.png','images/menu/langs-b.png',
 		null,null,null));
@@ -311,5 +311,5 @@
 			$count++;
 			$fav = unserialize($v['value']);
-			$_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],
+			$_menu['Favorites']->addItem(__($fav['title']),$fav['url'],$fav['small-icon'],
 				preg_match(dc_prepare_url($fav['url']),$_SERVER['REQUEST_URI']),
 				(($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);
@@ -321,5 +321,5 @@
 			$count++;
 			$fav = unserialize($v['value']);
-			$_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],
+			$_menu['Favorites']->addItem(__($fav['title']),$fav['url'],$fav['small-icon'],
 				preg_match(dc_prepare_url($fav['url']),$_SERVER['REQUEST_URI']),
 				(($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);
Index: inc/core/class.dc.auth.php
===================================================================
--- inc/core/class.dc.auth.php	(revision 333)
+++ inc/core/class.dc.auth.php	(revision 270)
@@ -4,5 +4,5 @@
 # This file is part of Dotclear 2.
 #
-# Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear
+# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
 # Licensed under the GPL version 2.0 license.
 # See LICENSE file or
@@ -13,52 +13,37 @@
 
 /**
-* @ingroup DC_CORE
-* @nosubgrouping
-* @brief Authentication and user credentials management
-* 
-* dcAuth is a class used to handle everything related to user authentication
-* and credentials. Object is provided by dcCore $auth property.
+@ingroup DC_CORE
+@nosubgrouping
+@brief Authentication and user credentials management
+
+dcAuth is a class used to handle everything related to user authentication
+and credentials. Object is provided by dcCore $auth property.
 */
 class dcAuth
 {
-	/** @var dcCore dcCore instance */
-	protected $core;
-	/** @var connection Database connection object */
-	protected $con;
-	
-	/** @var string User table name */
-	protected $user_table;
-	/** @var string Perm table name */
-	protected $perm_table;
-	
-	/** @var string Current user ID */
-	protected $user_id;
-	/** @var array Array with user information */
-	protected $user_info = array();
-	/** @var array Array with user options */
-	protected $user_options = array();
-	/** @var boolean User must change his password after login */
-	protected $user_change_pwd;
-	/** @var boolean User is super admin */
-	protected $user_admin;
-	/** @var array Permissions for each blog */
-	protected $permissions = array();
-	/** @var boolean User can change its password */
-	protected $allow_pass_change = true;
-	/** @var array List of blogs on which the user has permissions */
-	protected $blogs = array();
-	/** @var integer Count of user blogs */
-	public $blog_count = null;
-	
-	/** @var array Permission types */
-	protected $perm_types;
-	
-	/** @var dcPrefs dcPrefs object */
-	public $user_prefs;
-	
-	/**
-	* Class constructor. Takes dcCore object as single argument.
-	* 
-	* @param dcCore	$core		dcCore object
+	protected $core;		///< <b>dcCore</b> dcCore instance
+	protected $con;		///< <b>connection</b> Database connection object
+	
+	protected $user_table;	///< <b>string</b>	User table name
+	protected $perm_table;	///< <b>string</b>	Perm table name
+	
+	protected $user_id;					///< <b>string</b>		Current user ID
+	protected $user_info = array();		///< <b>array</b>		Array with user information
+	protected $user_options = array();		///< <b>array</b>		Array with user options
+	protected $user_change_pwd;			///< <b>boolean</b>		User must change his password after login
+	protected $user_admin;				///< <b>boolean</b>		User is super admin
+	protected $permissions = array();		///< <b>array</b>		Permissions for each blog
+	protected $allow_pass_change = true;	///< <b>boolean</b>		User can change its password
+	protected $blogs = array();			///< <b>array</b>		List of blogs on which the user has permissions
+	public $blog_count = null;				///< <b>integer</b>		Count of user blogs
+	
+	protected $perm_types;	///< <b>array</b> Permission types
+	
+	public $user_prefs;	///< <b>dcPrefs</b>	dcPrefs object
+	
+	/**
+	Class constructor. Takes dcCore object as single argument.
+	
+	@param	core		<b>dcCore</b>		dcCore object
 	*/
 	public function __construct($core)
@@ -85,15 +70,14 @@
 	//@{
 	/**
-	* Checks if user exists and can log in. <var>$pwd</var> argument is optionnal
-	* while you may need to check user without password. This method will create
-	* credentials and populate all needed object properties.
-	* 
-	* @param string	$user_id		User ID
-	* @param string	$pwd			User password
-	* @param string	$user_key		User key check
-	* @param boolean	$check_blog	checks if user is associated to a blog or not.
-	* @return boolean
-	*/
-	public function checkUser($user_id, $pwd=null, $user_key=null, $check_blog=true)
+	Checks if user exists and can log in. <var>$pwd</var> argument is optionnal
+	while you may need to check user without password. This method will create
+	credentials and populate all needed object properties.
+	
+	@param	user_id	<b>string</b>		User ID
+	@param	pwd		<b>string</b>		User password
+	@param	user_key	<b>string</b>		User key check
+	@return	<b>boolean</b>
+	*/
+	public function checkUser($user_id, $pwd=null, $user_key=null)
 	{
 		# Check user and password
@@ -157,5 +141,5 @@
 		
 		# Get permissions on blogs
-		if ($check_blog && ($this->findUserBlog() === false)) {
+		if ($this->findUserBlog() === false) {
 			return false;
 		}
@@ -164,8 +148,8 @@
 	
 	/**
-	* This method only check current user password.
-	* 
-	* @param string	$pwd			User password
-	* @return boolean
+	This method only check current user password.
+	
+	@param	pwd		<b>string</b>		User password
+	@return	<b>boolean</b>
 	*/
 	public function checkPassword($pwd)
@@ -179,7 +163,7 @@
 	
 	/**
-	* This method checks if user session cookie exists
-	* 
-	* @return boolean
+	This method checks if user session cookie exists
+	
+	@return	<b>boolean</b>
 	*/
 	public function sessionExists()
@@ -189,7 +173,7 @@
 	
 	/**
-	* This method checks user session validity.
-	* 
-	* @return boolean
+	This method checks user session validity.
+	
+	@return	<b>boolean</b>
 	*/
 	public function checkSession($uid=null)
@@ -228,7 +212,7 @@
 	
 	/**
-	* Checks if user is super admin
-	* 
-	* @return boolean
+	Checks if user is super admin
+	
+	@return	<b>boolean</b>
 	*/
 	public function isSuperAdmin()
@@ -238,11 +222,11 @@
 	
 	/**
-	* Checks if user has permissions given in <var>$permissions</var> for blog
-	* <var>$blog_id</var>. <var>$permissions</var> is a coma separated list of
-	* permissions.
-	* 
-	* @param string	$permissions	Permissions list
-	* @param string	$blog_id		Blog ID
-	* @return boolean
+	Checks if user has permissions given in <var>$permissions</var> for blog
+	<var>$blog_id</var>. <var>$permissions</var> is a coma separated list of
+	permissions.
+	
+	@param	permissions	<b>string</b>		Permissions list
+	@param	blog_id		<b>string</b>		Blog ID
+	@return	<b>boolean</b>
 	*/
 	public function check($permissions,$blog_id)
@@ -273,7 +257,7 @@
 	
 	/**
-	* Returns true if user is allowed to change its password.
-	* 
-	* @return	boolean
+	Returns true if user is allowed to change its password.
+	
+	@return	<b>boolean</b>
 	*/
 	public function allowPassChange()
@@ -328,9 +312,8 @@
 	//@{
 	/**
-	* Calls $f function with super admin rights.
-	* Returns the function result.
-	* 
-	* @param callback	$f			Callback function
-	* @return mixed
+	Calls <var>$f</var> function with super admin rights.
+	
+	@param	f		<b>callback</b>	Callback function
+	@return	<b>mixed</b> Function result
 	*/
 	public function sudo($f)
@@ -363,12 +346,11 @@
 	//@{
 	/**
-	* Returns user permissions for a blog as an array which looks like:
-	* 
-	*  - [blog_id]
-	*    - [permission] => true
-	*    - ...
-	* 
-	* @param string	$blog_id		Blog ID
-	* @return array
+	Returns user permissions for a blog as an array which looks like:
+	
+	 - [blog_id]
+	   - [permission] => true
+	   - ...
+	
+	@return	<b>array</b>
 	*/
 	public function getPermissions($blog_id)
@@ -440,7 +422,7 @@
 	
 	/**
-	* Returns current user ID
-	* 
-	* @return string
+	Returns current user ID
+	
+	@return	<b>string</b>
 	*/
 	public function userID()
@@ -450,8 +432,8 @@
 	
 	/**
-	* Returns information about a user .
-	* 
-	* @param string	$n			Information name
-	* @return string
+	Returns information about a user .
+	
+	@param	n		<b>string</b>		Information name
+	@return	<b>string</b> Information value
 	*/
 	public function getInfo($n)
@@ -465,8 +447,8 @@
 	
 	/**
-	* Returns a specific user option
-	* 
-	* @param string	$n			Option name
-	* @return string
+	Returns a specific user option
+	
+	@param	n		<b>string</b>		Option name
+	@return	<b>string</b> Option value
 	*/
 	public function getOption($n)
@@ -479,7 +461,7 @@
 	
 	/**
-	* Returns all user options in an associative array.
-	* 
-	* @return array
+	Returns all user options in an associative array.
+	
+	@return	<b>array</b>
 	*/
 	public function getOptions()
@@ -492,8 +474,8 @@
 	//@{
 	/**
-	* Returns an array with permissions parsed from the string <var>$level</var>
-	* 
-	* @param string	$level		Permissions string
-	* @return array
+	Returns an array with permissions parsed from the string <var>$level</var>
+	
+	@param	level	<b>string</b>		Permissions string
+	@return	<b>array</b>
 	*/
 	public function parsePermissions($level)
@@ -510,7 +492,7 @@
 	
 	/**
-	* Returns <var>perm_types</var> property content.
-	* 
-	* @return array
+	Returns <var>perm_types</var> property content.
+	
+	@return	<b>array</b>
 	*/
 	public function getPermissionsTypes()
@@ -520,8 +502,8 @@
 	
 	/**
-	* Adds a new permission type.
-	* 
-	* @param string	$name		Permission name
-	* @param string	$title		Permission title
+	Adds a new permission type.
+	
+	@param	name		<b>string</b>		Permission name
+	@param	title	<b>string</b>		Permission title
 	*/
 	public function setPermissionType($name,$title)
@@ -534,10 +516,10 @@
 	//@{
 	/**
-	* Add a recover key to a specific user identified by its email and
-	* password.
-	* 
-	* @param string	$user_id		User ID
-	* @param string	$user_email	User Email
-	* @return string
+	Add a recover key to a specific user identified by its email and
+	password.
+	
+	@param	user_id		<b>string</b>		User ID
+	@param	user_email	<b>string</b>		User Email
+	@return	<b>string</b> Recover key
 	*/
 	public function setRecoverKey($user_id,$user_email)
@@ -565,12 +547,12 @@
 	
 	/**
-	* Creates a new user password using recovery key. Returns an array:
-	* 
-	* - user_email
-	* - user_id
-	* - new_pass
-	* 
-	* @param string	$recover_key	Recovery key
-	* @return array
+	Creates a new user password using recovery key. Returns an array:
+	
+	- user_email
+	- user_id
+	- new_pass
+	
+	@param	recover_key	<b>string</b>		Recovery key
+	@return	<b>array</b>
 	*/
 	public function recoverUserPassword($recover_key)
@@ -608,22 +590,22 @@
 	
 	/**
-	* Called after core->addUser
-	* @see dcCore::addUser
-	* @param cursor	$cur			User cursor
+	Called after core->addUser
+	@see		dcCore::addUser
+	@param	cur		<b>cursor</b>		User cursor
 	*/
 	public function afterAddUser($cur) {}
 	
 	/**
-	* Called after core->updUser
-	* @see dcCore::updUser
-	* @param string	$id			User ID
-	* @param cursor	$cur			User cursor
+	Called after core->updUser
+	@see		dcCore::updUser
+	@param	id		<b>string</b>		User ID
+	@param	cur		<b>cursor</b>		User cursor
 	*/
 	public function afterUpdUser($id,$cur) {}
 	
 	/**
-	* Called after core->delUser
-	* @see dcCore::delUser
-	* @param string	$id			User ID
+	Called after core->delUser
+	@see		dcCore::delUser
+	@param	id		<b>string</b>		User ID
 	*/
 	public function afterDelUser($id) {}
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 340)
+++ inc/core/class.dc.blog.php	(revision 270)
@@ -21,36 +21,21 @@
 class dcBlog
 {
-	/** @var dcCore dcCore instance */
-	protected $core;
-	/** @var connection Database connection object */
-	public $con;
-	/** @var string Database table prefix */
-	public $prefix;
-	
-	/** @var string Blog ID */
-	public $id;
-	/** @var string Blog unique ID */
-	public $uid;
-	/** @var string Blog name */
-	public $name;
-	/** @var string Blog description */
-	public $desc;
-	/** @var string Blog URL */
-	public $url;
-	/** @var string Blog host */
-	public $host;
-	/** @var string Blog creation date */
-	public $creadt;
-	/** @var string Blog last update date */
-	public $upddt;
-	/** @var string Blog status */
-	public $status;
-	
-	/** @var dcSettings dcSettings object */
-	public $settings;
-	/** @var string Blog theme path */
-	public $themes_path;
-	/** @var string Blog public path */
-	public $public_path;
+	protected $core;	///< <b>dcCore</b> dcCore instance
+	public $con;		///< <b>connection</b>	Database connection object
+	public $prefix;	///< <b>string</b>		Database table prefix
+	
+	public $id;		///< <b>string</b>		Blog ID
+	public $uid;		///< <b>string</b>		Blog unique ID
+	public $name;		///< <b>string</b>		Blog name
+	public $desc;		///< <b>string</b>		Blog description
+	public $url;		///< <b>string</b>		Blog URL
+	public $host;		///< <b>string</b>		Blog host
+	public $creadt;	///< <b>string</b>		Blog creation date
+	public $upddt;		///< <b>string</b>		Blog last update date
+	public $status;	///< <b>string</b>		Blog status
+	
+	public $settings;		///< <b>dcSettings</b>	dcSettings object
+	public $themes_path;	///< <b>string</b>		Blog theme path
+	public $public_path;	///< <b>string</b>		Blog public path
 	
 	private $post_status = array();
@@ -59,6 +44,5 @@
 	private $categories;
 	
-	/** @var boolean Disallow entries password protection */
-	public $without_password = true;
+	public $without_password = true;	///< <b>boolean</b> Disallow entries password protection
 	
 	/**
@@ -407,5 +391,5 @@
 		
 		if (!empty($params['post_type'])) {
-			$strReq .= 'AND P.post_type '.$this->con->in($params['post_type']);
+			$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
 		}
 		
@@ -727,5 +711,9 @@
 		if (isset($params['post_type']))
 		{
-			$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
+			if (is_array($params['post_type']) && !empty($params['post_type'])) {
+				$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
+			} elseif ($params['post_type'] != '') {
+				$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
+			}
 		}
 		else
@@ -870,11 +858,11 @@
 		
 		if($dir > 0) {
-			$sign = '>';
-			$order = 'ASC';
-		}
-		else {
-			$sign = '<';
-			$order = 'DESC';
-		}
+               $sign = '>';
+               $order = 'ASC';
+          }
+          else {
+               $sign = '<';
+               $order = 'DESC';
+          }
 		
 		$params['post_type'] = $post->post_type;
@@ -1037,5 +1025,5 @@
 			$strReq .= "AND post_type = 'post' ";
 		}
-		
+				
 		if (!empty($params['year'])) {
 			$strReq .= 'AND '.$this->con->dateFormat('post_dt','%Y')." = '".sprintf('%04d',$params['year'])."' ";
@@ -1177,5 +1165,5 @@
 		$cur->post_upddt = date('Y-m-d H:i:s');
 		
-		#If user is only "usage", we need to check the post's owner
+		#�If user is only "usage", we need to check the post's owner
 		if (!$this->core->auth->check('contentadmin',$this->id))
 		{
@@ -1780,5 +1768,9 @@
 		if (!empty($params['post_type']))
 		{
-			$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
+			if (is_array($params['post_type']) && !empty($params['post_type'])) {
+				$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
+			} else {
+				$strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";
+			}
 		}
 		
Index: inc/core/class.dc.core.php
===================================================================
--- inc/core/class.dc.core.php	(revision 331)
+++ inc/core/class.dc.core.php	(revision 270)
@@ -63,16 +63,4 @@
 		if ($this->con instanceof mysqlConnection) {
 			mysqlConnection::$weak_locks = true;
-		}
-		
-		# define searchpath for postgresql
-		if ($this->con instanceof pgsqlConnection)
-		{
-			$searchpath = explode ('.',$prefix,2);
-			if (count($searchpath) > 1)
-			{
-				$prefix = $searchpath[1];
-				$sql = 'SET search_path TO '.$searchpath[0].',public;';
-				$this->con->execute($sql);
-			}
 		}
 		
Index: inc/core/class.dc.error.php
===================================================================
--- inc/core/class.dc.error.php	(revision 334)
+++ inc/core/class.dc.error.php	(revision 270)
@@ -13,24 +13,20 @@
 
 /**
-* @ingroup DC_CORE
-* @brief Error class
-* 
-* dcError is a very simple error class, with a stack. Call dcError::add to
-* add an error in stack. In administration area, errors are automatically
-* displayed.
+@ingroup DC_CORE
+@brief Error class
+
+dcError is a very simple error class, with a stack. Call dcError::add to
+add an error in stack. In administration area, errors are automatically
+displayed.
 */
 class dcError
 {
-	/** @var array Errors stack */
-	protected $errors = array();
-	/** @var boolean True if stack is not empty */
-	protected $flag = false;
-	/** @var string HTML errors list pattern */
-	protected $html_list = "<ul>\n%s</ul>\n";
-	/** @var string HTML error item pattern */
-	protected $html_item = "<li>%s</li>\n";
+	protected $errors = array();				///< <b>array</b>	Errors stack
+	protected $flag = false;					///< <b>boolean</b>	True if stack is not empty
+	protected $html_list = "<ul>\n%s</ul>\n";	///< <b>string</b>	HTML errors list pattern
+	protected $html_item = "<li>%s</li>\n";	///< <b>string</b>	HTML error item pattern
 	
 	/**
-	* Object constructor.
+	Object constructor.
 	*/
 	public function __construct()
@@ -41,7 +37,7 @@
 	
 	/**
-	* Object string representation. Returns errors stack.
-	* 
-	* @return string
+	Object string representation. Returns errors stack.
+	
+	@return	<b>string</b>
 	*/
 	public function __toString()
@@ -58,7 +54,7 @@
 	
 	/**
-	* Adds an error to stack.
-	* 
-	* @param string	$msg			Error message
+	Adds an error to stack.
+	
+	@param	msg		<b>string</b>		Error message
 	*/
 	public function add($msg)
@@ -69,7 +65,7 @@
 	
 	/**
-	* Returns the value of <var>flag</var> property. True if errors stack is not empty
-	* 
-	* @return boolean
+	Returns the value of <var>flag</var> property.
+	
+	@return	<b>boolean</b> True if errors stack is not empty
 	*/
 	public function flag()
@@ -79,5 +75,5 @@
 	
 	/**
-	* Resets errors stack.
+	Resets errors stack.
 	*/
 	public function reset()
@@ -88,7 +84,7 @@
 	
 	/**
-	* Returns <var>errors</var> property.
-	* 
-	* @return array
+	Returns <var>errors</var> property.
+	
+	@return	<b>array</b>
 	*/
 	public function getErrors()
@@ -98,8 +94,8 @@
 	
 	/**
-	* Sets <var>list</var> and <var>item</var> properties.
-	* 
-	* @param string	$list		HTML errors list pattern
-	* @param string	$item		HTML error item pattern
+	Sets <var>list</var> and <var>item</var> properties.
+	
+	@param	list		<b>string</b>		HTML errors list pattern
+	@param	item		<b>string</b>		HTML error item pattern
 	*/
 	public function setHTMLFormat($list,$item)
@@ -110,7 +106,7 @@
 	
 	/**
-	* Returns errors stack as HTML.
-	* 
-	* @return string
+	Returns errors stack as HTML.
+	
+	@return	<b>string</b>
 	*/
 	public function toHTML()
Index: inc/core/class.dc.settings.php
===================================================================
--- inc/core/class.dc.settings.php	(revision 301)
+++ inc/core/class.dc.settings.php	(revision 270)
@@ -308,77 +308,4 @@
 	}
 
-	/**
-	Returns a list of settings matching given criteria, for any blog.
-	<b>$params</b> is an array taking the following
-	optionnal parameters:
-	
-	- ns : retrieve setting from given namespace
-	- id : retrieve only settings corresponding to the given id
-	
-	@param	params		<b>array</b>		Parameters
-	@return	<b>record</b>	A record 
-	*/
-	public function getGlobalSettings($params=array())
-	{
-		$strReq = "SELECT * from ".$this->table." ";
-		$where = array();
-		if (!empty($params['ns'])) {
-			$where[] = "setting_ns = '".$this->con->escape($params['ns'])."'";
-		}
-		if (!empty($params['id'])) {
-			$where[] = "setting_id = '".$this->con->escape($params['id'])."'";
-		}
-		if (isset($params['blog_id'])) {
-			if (!empty($params['blog_id'])) {
-				$where[] = "blog_id = '".$this->con->escape($params['blog_id'])."'";
-			} else {
-				$where[] = "blog_id IS NULL";
-			}
-		}
-		if (count($where) != 0) {
-			$strReq .= " WHERE ".join(" AND ", $where);
-		}
-		$strReq .= " ORDER by blog_id";
-		return $this->con->select($strReq);
-	}
-
-	/**
-	Updates a setting from a given record
-	
-	@param	rs		<b>record</b>		the setting to update
-	*/
-	public function updateSetting($rs) 
-	{
-		$cur = $this->con->openCursor($this->table);
-		$cur->setting_id = $rs->setting_id;
-		$cur->setting_value = $rs->setting_value;
-		$cur->setting_type = $rs->setting_type;
-		$cur->setting_label = $rs->setting_label;
-		$cur->blog_id = $rs->blog_id;
-		$cur->setting_ns = $rs->setting_ns;
-		if ($cur->blog_id == null) {
-				$where = 'WHERE blog_id IS NULL ';
-		} else {
-			$where = "WHERE blog_id = '".$this->con->escape($cur->blog_id)."' ";
-		}
-		$cur->update($where."AND setting_id = '".$this->con->escape($cur->setting_id)."' AND setting_ns = '".$this->con->escape($cur->setting_ns)."' ");
-	}
-	
-	/**
-	Drops a setting from a given record
-	
-	@param	rs		<b>record</b>		the setting to drop
-	@return	int		number of deleted records (0 if setting does not exist)
-	*/
-	public function dropSetting($rs) {
-		$strReq = "DELETE FROM ".$this->table.' ';
-		if ($rs->blog_id == null) {
-			$strReq .= 'WHERE blog_id IS NULL ';
-		} else {
-			$strReq .= "WHERE blog_id = '".$this->con->escape($rs->blog_id)."' ";
-		}
-		$strReq .= "AND setting_id = '".$this->con->escape($rs->setting_id)."' AND setting_ns = '".$this->con->escape($rs->setting_ns)."' ";
-		return $this->con->execute($strReq);
-	}
 }
 ?>
Index: inc/dbschema/upgrade.php
===================================================================
--- inc/dbschema/upgrade.php	(revision 270)
+++ inc/dbschema/upgrade.php	(revision 324)
@@ -149,27 +149,27 @@
 				$init_fav = array();
 
-				$init_fav['new_post'] = array('new_post',__('New entry'),'post.php',
+				$init_fav['new_post'] = array('new_post','New entry','post.php',
 					'images/menu/edit.png','images/menu/edit-b.png',
 					'usage,contentadmin',null,'menu-new-post');
-				$init_fav['posts'] = array('posts',__('Entries'),'posts.php',
+				$init_fav['posts'] = array('posts','Entries','posts.php',
 					'images/menu/entries.png','images/menu/entries-b.png',
 					'usage,contentadmin',null,null);
-				$init_fav['comments'] = array('comments',__('Comments'),'comments.php',
+				$init_fav['comments'] = array('comments','Comments','comments.php',
 					'images/menu/comments.png','images/menu/comments-b.png',
 					'usage,contentadmin',null,null);
-				$init_fav['prefs'] = array('prefs',__('My preferences'),'preferences.php',
+				$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
 					'images/menu/user-pref.png','images/menu/user-pref-b.png',
 					'*',null,null);
-				$init_fav['blog_pref'] = array('blog_pref',__('Blog settings'),'blog_pref.php',
+				$init_fav['blog_pref'] = array('blog_pref','Blog settings','blog_pref.php',
 					'images/menu/blog-pref.png','images/menu/blog-pref-b.png',
 					'admin',null,null);
-				$init_fav['blog_theme'] = array('blog_theme',__('Blog appearance'),'blog_theme.php',
+				$init_fav['blog_theme'] = array('blog_theme','Blog appearance','blog_theme.php',
 					'images/menu/themes.png','images/menu/blog-theme-b.png',
 					'admin',null,null);
 
-				$init_fav['pages'] = array('pages',__('Pages'),'plugin.php?p=pages',
+				$init_fav['pages'] = array('pages','Pages','plugin.php?p=pages',
 					'index.php?pf=pages/icon.png','index.php?pf=pages/icon-big.png',
 					'contentadmin,pages',null,null);
-				$init_fav['blogroll'] = array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
+				$init_fav['blogroll'] = array('blogroll','Blogroll','plugin.php?p=blogroll',
 					'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
 					'usage,contentadmin',null,null);
@@ -290,4 +290,11 @@
 			}
 			
+			if (version_compare($version,'2.3.1','<'))
+			{
+				# Remove unecessary file
+				@unlink(DC_ROOT.'/'.'inc/libs/clearbricks/.hgignore');
+			}
+			
+			
 			$core->setVersion('core',DC_VERSION);
 			$core->blogDefaults();
Index: inc/prepend.php
===================================================================
--- inc/prepend.php	(revision 289)
+++ inc/prepend.php	(revision 332)
@@ -118,5 +118,5 @@
 # Constants
 define('DC_ROOT',path::real(dirname(__FILE__).'/..'));
-define('DC_VERSION','2.4.0-dev');
+define('DC_VERSION','2.3.1-dev');
 define('DC_DIGESTS',dirname(__FILE__).'/digests');
 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales');
Index: inc/public/class.dc.template.php
===================================================================
--- inc/public/class.dc.template.php	(revision 270)
+++ inc/public/class.dc.template.php	(revision 341)
@@ -563,5 +563,5 @@
 		}
 		
-		if (empty($attr['no_context']))
+		if (empty($attr['no_context']) && !isset($attr['category']))
 		{
 			$p .=
@@ -1324,13 +1324,19 @@
 		if (empty($attr['no_context']))
 		{
-			$p .=
-			'if ($_ctx->exists("users")) { '.
-				"\$params['user_id'] = \$_ctx->users->user_id; ".
-			"}\n";
+			if (!isset($attr['author']))
+			{
+				$p .=
+				'if ($_ctx->exists("users")) { '.
+					"\$params['user_id'] = \$_ctx->users->user_id; ".
+				"}\n";
+			}
 			
-			$p .=
-			'if ($_ctx->exists("categories")) { '.
-				"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
-			"}\n";
+			if (!isset($attr['category']) && (!isset($attr['no_category']) || !$attr['no_category']))
+			{
+				$p .=
+				'if ($_ctx->exists("categories")) { '.
+					"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
+				"}\n";
+			}
 			
 			$p .=
Index: inc/public/lib.urlhandlers.php
===================================================================
--- inc/public/lib.urlhandlers.php	(revision 306)
+++ inc/public/lib.urlhandlers.php	(revision 270)
@@ -204,9 +204,6 @@
 		
 		$n = self::getPageNumber($args);
-		$params = new ArrayObject(array(
-			'lang' => $args));
-		
-		$core->callBehavior('publicLangBeforeGetLangs',$params,$args);
-		
+		
+		$params['lang'] = $args;
 		$_ctx->langs = $core->blog->getLangs($params);
 		
@@ -238,9 +235,6 @@
 		else
 		{
-			$params = new ArrayObject(array(
-				'cat_url' => $args,
-				'post_type' => 'post'));
-			
-			$core->callBehavior('publicCategoryBeforeGetCategories',$params,$args);
+			$params['cat_url'] = $args;
+			$params['post_type'] = 'post';
 			
 			$_ctx->categories = $core->blog->getCategories($params);
@@ -273,11 +267,7 @@
 		elseif (preg_match('|^/([0-9]{4})/([0-9]{2})$|',$args,$m))
 		{
-			$params = new ArrayObject(array(
-				'year' => $m[1],
-				'month' => $m[2],
-				'type' => 'month'));
-			
-			$core->callBehavior('publicArchiveBeforeGetDates',$params,$args);
-			
+			$params['year'] = $m[1];
+			$params['month'] = $m[2];
+			$params['type'] = 'month';
 			$_ctx->archives = $core->blog->getDates($params);
 			
@@ -310,9 +300,7 @@
 			$core->blog->withoutPassword(false);
 			
-			$params = new ArrayObject(array(
-				'post_url' => $args));
-			
-			$core->callBehavior('publicPostBeforeGetPosts',$params,$args);
-
+			$params = new ArrayObject();
+			$params['post_url'] = $args;
+			
 			$_ctx->posts = $core->blog->getPosts($params);
 			
@@ -422,5 +410,5 @@
 						
 						$redir = $_ctx->posts->getURL();
-						$redir .= $core->blog->settings->system->url_scan == 'query_string' ? '&' : '?';
+						$redir .= strpos($redir,'?') !== false ? '&' : '?';
 						
 						try
@@ -493,4 +481,5 @@
 		$cat_url = false;
 		$post_id = null;
+		$params = array();
 		$subtitle = '';
 		
@@ -501,9 +490,6 @@
 		
 		if (preg_match('!^([a-z]{2}(-[a-z]{2})?)/(.*)$!',$args,$m)) {
-			$params = new ArrayObject(array('lang' => $m[1]));
-			
+			$params['lang'] = $m[1];
 			$args = $m[3];
-			
-			$core->callBehavior('publicFeedBeforeGetLangs',$params,$args);
 			
 			$_ctx->langs = $core->blog->getLangs($params);
@@ -549,10 +535,6 @@
 		if ($cat_url)
 		{
-			$params = new ArrayObject(array(
-				'cat_url' => $cat_url,
-				'post_type' => 'post'));
-			
-			$core->callBehavior('publicFeedBeforeGetCategories',$params,$args);
-			
+			$params['cat_url'] = $cat_url;
+			$params['post_type'] = 'post';
 			$_ctx->categories = $core->blog->getCategories($params);
 			
@@ -567,10 +549,6 @@
 		elseif ($post_id)
 		{
-			$params = new ArrayObject(array(
-				'post_id' => $post_id,
-				'post_type' => ''));
-				
-			$core->callBehavior('publicFeedBeforeGetPosts',$params,$args);
-			
+			$params['post_id'] = $post_id;
+			$params['post_type'] = '';
 			$_ctx->posts = $core->blog->getPosts($params);
 			
Index: plugins/antispam/_admin.php
===================================================================
--- plugins/antispam/_admin.php	(revision 270)
+++ plugins/antispam/_admin.php	(revision 324)
@@ -29,5 +29,5 @@
 function antispamDashboardFavs($core,$favs)
 {
-	$favs['antispam'] = new ArrayObject(array('antispam',__('Antispam'),'plugin.php?p=antispam',
+	$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));
Index: plugins/blogroll/_admin.php
===================================================================
--- plugins/blogroll/_admin.php	(revision 270)
+++ plugins/blogroll/_admin.php	(revision 324)
@@ -20,5 +20,5 @@
 function blogroll_dashboard_favs($core,$favs)
 {
-	$favs['blogroll'] = new ArrayObject(array('blogroll',__('Blogroll'),'plugin.php?p=blogroll',
+	$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));
Index: plugins/importExport/_admin.php
===================================================================
--- plugins/importExport/_admin.php	(revision 270)
+++ plugins/importExport/_admin.php	(revision 324)
@@ -25,5 +25,5 @@
 function importExportDashboardFavs($core,$favs)
 {
-	$favs['importExport'] = new ArrayObject(array('importExport',__('Import/Export'),'plugin.php?p=importExport',
+	$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));
Index: plugins/importExport/inc/flat/class.dc.import.php
===================================================================
--- plugins/importExport/inc/flat/class.dc.import.php	(revision 270)
+++ plugins/importExport/inc/flat/class.dc.import.php	(revision 298)
@@ -371,4 +371,8 @@
 	private function insertPref($pref)
 	{
+		if ($this->prefExists($pref->pref_ws,$pref->pref_id,$pref->user_id)) {
+			return;
+		}
+		
 		$this->cur_pref->clean();
 		
@@ -751,4 +755,21 @@
 		$this->stack['users'][$user_id] = !$rs->isEmpty();
 		return $this->stack['users'][$user_id];
+	}
+	
+	private function prefExists($pref_ws,$pref_id,$user_id)
+	{
+		$strReq = 'SELECT pref_id,pref_ws,user_id '.
+				'FROM '.$this->prefix.'pref '.
+				"WHERE pref_id = '".$this->con->escape($pref_id)."' ".
+				"AND pref_ws = '".$this->con->escape($pref_ws)."' ";
+		if (!$user_id) {
+			$strReq .= "AND user_id IS NULL ";
+		} else {
+			$strReq .= "AND user_id = '".$this->con->escape($user_id)."' ";
+		}
+		
+		$rs = $this->con->select($strReq);
+		
+		return !$rs->isEmpty();
 	}
 	
Index: plugins/maintenance/_admin.php
===================================================================
--- plugins/maintenance/_admin.php	(revision 270)
+++ plugins/maintenance/_admin.php	(revision 324)
@@ -20,5 +20,5 @@
 function maintenanceDashboardFavs($core,$favs)
 {
-	$favs['maintenance'] = new ArrayObject(array('maintenance',__('Maintenance'),'plugin.php?p=maintenance',
+	$favs['maintenance'] = new ArrayObject(array('maintenance','Maintenance','plugin.php?p=maintenance',
 		'index.php?pf=maintenance/icon.png','index.php?pf=maintenance/icon-big.png',
 		null,null,null));
Index: plugins/pages/_admin.php
===================================================================
--- plugins/pages/_admin.php	(revision 270)
+++ plugins/pages/_admin.php	(revision 324)
@@ -21,8 +21,8 @@
 function pages_dashboard_favs($core,$favs)
 {
-	$favs['pages'] = new ArrayObject(array('pages',__('Pages'),'plugin.php?p=pages',
+	$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',
+	$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));
Index: plugins/pages/_public.php
===================================================================
--- plugins/pages/_public.php	(revision 306)
+++ plugins/pages/_public.php	(revision 270)
@@ -33,9 +33,7 @@
 			$core->blog->withoutPassword(false);
 			
-			$params = new ArrayObject(array(
-				'post_type' => 'page',
-				'post_url' => $args));
-			
-			$core->callBehavior('publicPagesBeforeGetPosts',$params,$args);
+			$params = new ArrayObject();
+			$params['post_type'] = 'page';
+			$params['post_url'] = $args;
 			
 			$_ctx->posts = $core->blog->getPosts($params);
Index: plugins/pings/_admin.php
===================================================================
--- plugins/pings/_admin.php	(revision 270)
+++ plugins/pings/_admin.php	(revision 324)
@@ -41,5 +41,5 @@
 function pingDashboardFavs($core,$favs)
 {
-	$favs['pings'] = new ArrayObject(array('pings',__('Pings'),'plugin.php?p=pings',
+	$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));
Index: plugins/tags/_admin.php
===================================================================
--- plugins/tags/_admin.php	(revision 270)
+++ plugins/tags/_admin.php	(revision 324)
@@ -45,5 +45,5 @@
 	public static function dashboardFavs($core,$favs)
 	{
-		$favs['tags'] = new ArrayObject(array('tags',__('Tags'),'plugin.php?p=tags&amp;m=tags',
+		$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));
Index: plugins/widgets/_admin.php
===================================================================
--- plugins/widgets/_admin.php	(revision 270)
+++ plugins/widgets/_admin.php	(revision 324)
@@ -16,5 +16,5 @@
 function widgets_dashboard_favs($core,$favs)
 {
-	$favs['widgets'] = new ArrayObject(array('widgets',__('Presentation widgets'),'plugin.php?p=widgets',
+	$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));
