Index: inc/admin/actions/class.dcaction.php
===================================================================
--- inc/admin/actions/class.dcaction.php	(revision 1796)
+++ 	(revision )
@@ -1,165 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-abstract class dcAction {
-	protected $actionset;
-		
-	public function setActionSet($as) {
-		$this->actionset = $as;
-	}
-	abstract public function onAction($post,$actionset,$post);
-}
-
-class dcSimpleAction extends dcAction {
-	protected $callback;
-	
-	public function __construct($callback) {
-		$this->callback = $callback;
-	}
-	
-	public function onAction($core,$actionset,$post) {
-		return call_user_func($this->callback,$core,$actionset,$post);
-	}
-}
-
-class dcActionSet
-{
-	protected $uri;
-	protected $core;
-	protected $combo;
-	protected $actions;
-	protected $ids;
-	protected $rs;
-	protected $redir_args;
-	protected $redirect_fields;
-	protected $action;
-	
-	public function __construct($core,$uri) {
-		$this->core = $core;
-		$this->actions = new ArrayObject();
-		$this->combo = array();
-		$this->uri = $uri;
-		$this->redir_args = array();
-		$this->redirect_fields = array();
-		$this->action = '';
-	}
-	
-	public function addAction ($actions,$callback) {
-		if (is_array($callback)) {
-			$callback = new dcSimpleAction($callback);
-		}
-		foreach ($actions as $k => $a) {
-			if (is_array($a)) {
-				$values = array_values($a);
-				if (!isset($this->combo[$k])) {
-					$this->combo[$k]=array();
-				}
-				$this->combo[$k] = array_merge ($this->combo[$k],$a);
-			} elseif ($a instanceof formSelectOption) {
-				$values = $a->value;
-				$this->combo[$k] = $a->value;
-			} else {
-				$values = $a;
-				$this->combo[$k] = $a;
-			}
-			foreach ($values as $v) {
-				$this->actions[$v]=$callback;
-			}
-		}
-		$callback->setActionSet($this);
-	}
-	
-	public function getCombo() {
-		return $this->combo;
-	}
-	
-	public function getIDs() {
-		return $this->ids;
-	}
-	public function getIDsHidden() {
-		$ret = '';
-		foreach  ($this->ids as $id) {
-			$ret .= form::hidden('entries[]',$id);
-		}
-		return $ret;
-	}
-	public function getHiddenFields($with_ids = false) {
-		$ret = '';
-		foreach ($this->redir_args as $k => $v) {
-			$ret .= form::hidden(array($k),$v);
-		}
-		if ($with_ids) {
-			$ret .= $this->getIDsHidden();
-		}
-		return $ret;
-	}
-	public function getRS() {
-		return $this->rs;
-	}
-	
-	public function setupRedir($from) {
-		foreach ($this->redirect_fields as $p) {
-			if (isset($from[$p])) {
-				$redir_args[$p] = $from[$p];
-			}
-		}
-	}
-	public function getRedirection($params=array(),$with_selected_entries=false) {
-		$redir_args = array_merge($params,$this->redir_args);
-		if ($with_selected_entries) {
-			$redir_args['entries'] = $this->ids;
-		}
-		return $this->uri.'?'.http_build_query($redir_args);
-	}
-
-	public function redirect($params=array(),$with_selected_entries=false) {
-		http::redirect($this->getRedirection($params,$with_selected_entries));
-	}	
-	
-	public function beginPage($head='') {
-	}
-	
-	public function endPage() {
-	}
-	public function getAction() {
-		return $this->action;
-	}
-	public function process() {
-		$from = new ArrayObject($_POST);
-		if (isset($from['redir']) && strpos($from['redir'],'://') === false) {
-			$this->redir = html::escapeURL($_POST['redir']);
-		} else {
-			$this->setupRedir($from);
-		}
-		$this->fetchEntries($from);	
-		if (isset($from['action'])) {
-			$this->action = $from['action'];
-			try {
-				$performed=false;
-				foreach ($this->actions as $k=>$v) {
-					if ($from['action']==$k) {
-						$performed = true;
-						$v->onAction($this->core,$this,$from);
-					}
-				}
-				if ($performed) {
-					exit;
-				}
-			} catch (Exception $e) {
-				$this->error($e);
-			}
-		}
-	}
-	
-}
-
Index: inc/admin/actions/class.dcactionposts.php
===================================================================
--- inc/admin/actions/class.dcactionposts.php	(revision 1796)
+++ 	(revision )
@@ -1,422 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-$GLOBALS['core']->addBehavior('adminPostsActionSet',array('dcDefaultPostActions','adminPostsActionSet'));
-$GLOBALS['core']->addBehavior('adminPostsActionSet',array('dcLegacyPosts','adminPostsActionSet'));
-
-class dcPostsActionSet extends dcActionSet
-{
-	public function __construct($core,$uri) {
-		parent::__construct($core,$uri);
-		$this->redirect_fields = array('user_id','cat_id','status',
-		'selected','month','lang','sortby','order','page','nb');
-		$core->callBehavior('adminPostsActionSet',$core,$this);
-
-	}
-
-	public function beginPage($breadcrumb='',$head='') {
-		dcPage::open(
-			__('Entries'),
-			dcPage::jsLoad('js/jquery/jquery.autocomplete.js').
-			dcPage::jsLoad('js/_posts_actions.js').
-			dcPage::jsMetaEditor().
-			$head,
-			$breadcrumb
-		);	
-		echo '<p><a class="back" href="'.$this->getRedirection(array(),true).'">'.__('Back to entries list').'</a></p>';
-	}
-	
-	public function endPage() {
-		dcPage::close();
-	}
-	
-	public function error(Exception $e) {
-		$this->core->erorr->add($e->getMessage());
-		$this->beginPage(dcPage::breadcrumb(
-			array(
-				html::escapeHTML($core->blog->name) => '',
-				__('Entries') => 'posts.php',
-				'<span class="page-title">'.__('Entries actions').'</span>' => ''
-			))
-		);
-		$this->endPage();
-	}
-	
-	public function getCheckboxes() {
-		$ret = 
-			'<table class="posts-list"><tr>'.
-			'<th colspan="2">'.__('Title').'</th>'.
-			'</tr>';
-		foreach ($this->entries as $id=>$title) {
-			$ret .= 
-				'<tr><td>'.
-				form::checkbox(array('entries[]'),$id,true,'','').'</td>'.
-				'<td>'.	$title.'</td></tr>';
-		}
-		$ret .= '</table>';
-		return $ret;
-	}
-	
-	
-	public function fetchEntries($from) {
-		if (!empty($from['entries']))
-		{
-			$entries = $from['entries'];
-			
-			foreach ($entries as $k => $v) {
-				$entries[$k] = (integer) $v;
-			}
-			
-			$params['sql'] = 'AND P.post_id IN('.implode(',',$entries).') ';
-			
-			if (!isset($from['full_content']) || empty($from['full_content'])) {
-				$params['no_content'] = true;
-			}
-			
-			if (isset($from['post_type'])) {
-				$params['post_type'] = $from['post_type'];
-			}
-			
-			$posts = $this->core->blog->getPosts($params);
-			while ($posts->fetch())	{
-				$this->ids[] = $posts->post_id;
-				$this->entries[$posts->post_id] = $posts->post_title;
-			}
-			$this->rs = $posts;			
-		} else {
-			$this->rs = $this->core->con->select("SELECT blog_id FROM ".$this->core->prefix."blog WHERE false");;
-		}
-	}
-}
-
-class dcDefaultPostActions 
-{
-	public static function adminPostsActionSet($core, dcPostsActionSet $as) {
-		if ($core->auth->check('publish,contentadmin',$core->blog->id)) {
-			$as->addAction(
-				array(__('Status') => array(
-					__('Publish') => 'publish',
-					__('Unpublish') => 'unpublish',
-					__('Schedule') => 'schedule',
-					__('Mark as pending') => 'pending'
-				)),
-				array('dcDefaultPostActions','doChangePostStatus')
-			);
-		}
-		$as->addAction(
-			array(__('Mark')=> array(
-				__('Mark as selected') => 'selected',
-				__('Mark as unselected') => 'unselected'
-			)),
-			array('dcDefaultPostActions','doUpdateSelectedPost')
-		);
-		$as->addAction(
-			array(__('Change') => array(
-				__('Change category') => 'category',
-			)),
-			array('dcDefaultPostActions','doChangePostCategory')
-		);
-		$as->addAction(
-			array(__('Change') => array(
-				__('Change language') => 'lang',
-			)),
-			array('dcDefaultPostActions','doChangePostLang')
-		);
-		if ($core->auth->check('admin',$core->blog->id))
-		{
-			$as->addAction(
-				array(__('Change') => array(
-					__('Change author') => 'author')),
-				array('dcDefaultPostActions','doChangePostLang')
-			);
-		}
-		if ($core->auth->check('delete,contentadmin',$core->blog->id)) {
-			$as->addAction(
-				array(__('Delete') => array(
-					__('Delete') => 'delete')),
-				array('dcDefaultPostActions','doDeletePost')
-			);
-		}
-	}
-
-	public static function doChangePostStatus($core, dcPostsActionSet $as, $post) {
-		switch ($as->getAction()) {
-			case 'unpublish' : $status = 0; break;
-			case 'schedule' : $status = -1; break;
-			case 'pending' : $status = -2; break;
-			default : $status = 1; break;
-		}
-		
-		try
-		{
-			$posts_ids = $as->getIDs();
-			if (empty($posts_ids)) {
-				throw new Exception(__('No entry selected'));
-			}
-			$core->blog->updPostsStatus($posts_ids,$status);
-			
-			$as->redirect(array('upd' => 1),true);
-		}
-		catch (Exception $e)
-		{
-			$core->error->add($e->getMessage());
-		}		
-	}
-	
-	public static function doUpdateSelectedPost($core, dcPostsActionSet $as, $post) {
-		try
-		{
-			$posts_ids = $as->getIDs();
-			if (empty($posts_ids)) {
-				throw new Exception(__('No entry selected'));
-			}
-			
-			$core->blog->updPostsSelected($posts_ids,$action == 'selected');
-			
-			$as->redirect(array('upd' => 1),true);
-		}
-		catch (Exception $e)
-		{
-			$core->error->add($e->getMessage());
-		}
-	}
-	
-	public static function doDeletePost($core, dcPostsActionSet $as, $post) {
-
-		$posts_ids = $as->getIDs();
-		if (empty($posts_ids)) {
-			throw new Exception(__('No entry selected'));
-		}
-		// Backward compatibility
-		foreach($posts_ids as $post_id)
-		{
-			# --BEHAVIOR-- adminBeforePostDelete
-			$core->callBehavior('adminBeforePostDelete',(integer) $post_id);
-		}
-		
-		# --BEHAVIOR-- adminBeforePostsDelete
-		$core->callBehavior('adminBeforePostsDelete',$posts_ids);
-		
-		$core->blog->delPosts($posts_ids);
-		
-		$as->redirect(array('del',1),false);
-	}
-
-	public static function doChangePostCategory($core, dcPostsActionSet $as, $post) {
-		if (isset($post['new_cat_id'])) {
-			$posts_ids = $as->getIDs();
-			if (empty($posts_ids)) {
-				throw new Exception(__('No entry selected'));
-			}
-			$new_cat_id = $post['new_cat_id'];
-			if (!empty($post['new_cat_title']) && $core->auth->check('categories', $core->blog->id))
-			{
-				$cur_cat = $core->con->openCursor($core->prefix.'category');
-				$cur_cat->cat_title = $post['new_cat_title'];
-				$cur_cat->cat_url = '';
-				
-				$parent_cat = !empty($post['new_cat_parent']) ? $post['new_cat_parent'] : '';
-				
-				# --BEHAVIOR-- adminBeforeCategoryCreate
-				$core->callBehavior('adminBeforeCategoryCreate', $cur_cat);
-				
-				$new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat);
-				
-				# --BEHAVIOR-- adminAfterCategoryCreate
-				$core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id);
-			}
-			
-			$core->blog->updPostsCategory($posts_ids, $new_cat_id);
-			
-			$as->redirect(array('upd'=>1),true);
-		} else {
-			$as->beginPage(
-				dcPage::breadcrumb(
-					array(
-						html::escapeHTML($core->blog->name) => '',
-						__('Entries') => 'posts.php',
-						'<span class="page-title">'.__('Change category for entries').'</span>' => ''
-			)));
-			
-			# categories list
-			# Getting categories
-			$categories_combo = dcAdminCombos::getCategoriesCombo(
-				$core->blog->getCategories(array('post_type'=>'post'))
-			);			
-			echo
-			'<form action="posts.php" method="post">'.
-			$as->getCheckboxes().
-			'<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '.
-			form::combo('new_cat_id',$categories_combo,'');
-			
-			if ($core->auth->check('categories', $core->blog->id)) {
-				echo 
-				'<div>'.
-				'<p id="new_cat">'.__('Create a new category for the post(s)').'</p>'.
-				'<p><label for="new_cat_title">'.__('Title:').'</label> '.
-				form::field('new_cat_title',30,255,'','').'</p>'.
-				'<p><label for="new_cat_parent">'.__('Parent:').'</label> '.
-				form::combo('new_cat_parent',$categories_combo,'','').
-				'</p>'.
-				'</div>';
-			}
-			
-			echo
-			$core->formNonce().
-			form::hidden(array('action'),'category').
-			'<input type="submit" value="'.__('Save').'" /></p>'.
-			'</form>';
-			$as->endPage();
-
-		}
-	
-	}
-	public static function doChangePostAuthor($core, dcPostsActionSet $as, $post) {
-		if (isset($post['new_auth_id']) && $core->auth->check('admin',$core->blog->id)) {
-			$new_user_id = $post['new_auth_id'];
-			$posts_ids = $as->getIDs();
-			if (empty($posts_ids)) {
-				throw new Exception(__('No entry selected'));
-			}
-			
-			try
-			{
-				if ($core->getUser($new_user_id)->isEmpty()) {
-					throw new Exception(__('This user does not exist'));
-				}
-				
-				$cur = $core->con->openCursor($core->prefix.'post');
-				$cur->user_id = $new_user_id;
-				$cur->update('WHERE post_id '.$core->con->in($posts_ids));
-				
-				$as->redirect(array('upd' => 1),true);
-			}
-			catch (Exception $e)
-			{
-				$core->error->add($e->getMessage());
-			}
-		} else {
-			$usersList = '';
-			if ($core->auth->check('admin',$core->blog->id)) {
-				$params = array(
-					'limit' => 100,
-					'order' => 'nb_post DESC'
-					);
-				$rs = $core->getUsers($params);
-				while ($rs->fetch())
-				{
-					$usersList .= ($usersList != '' ? ',' : '').'"'.$rs->user_id.'"';
-				}
-			}
-			$as->beginPage(
-				dcPage::breadcrumb(
-					array(
-						html::escapeHTML($core->blog->name) => '',
-						__('Entries') => 'posts.php',
-						'<span class="page-title">'.__('Change author for entries').'</span>' => ''
-				)),
-				'<script type="text/javascript">'."\n".
-				"//<![CDATA[\n".
-				'usersList = ['.$usersList.']'."\n".
-				"\n//]]>\n".
-				"</script>\n"
-			);
-
-			echo
-			'<form action="posts_actions.php" method="post">'.
-			$as->getCheckboxes().
-			'<p><label for="new_auth_id" class="classic">'.__('New author (author ID):').'</label> '.
-			form::field('new_auth_id',20,255);
-			
-			echo
-				$core->formNonce().
-				form::hidden(array('action'),'author').
-				'<input type="submit" value="'.__('Save').'" /></p>'.
-				'</form>';
-			$as->endPage();
-		}
-	}
-	public static function doChangePostLang($core, dcPostsActionSet $as, $post) {
-		if (isset($post['new_lang'])) {
-			$new_lang = $post['new_lang'];
-			try
-			{
-				$cur = $core->con->openCursor($core->prefix.'post');
-				$cur->post_lang = $new_lang;
-				$cur->update('WHERE post_id '.$core->con->in($posts_ids));
-				
-				$as->redirect(array('upd' => 1),true);
-			}
-			catch (Exception $e)
-			{
-				$core->error->add($e->getMessages());
-			}
-		} else {
-			$as->beginPage(
-				dcPage::breadcrumb(
-					array(
-						html::escapeHTML($core->blog->name) => '',
-						__('Entries') => 'posts.php',
-						'<span class="page-title">'.__('Change language for entries').'</span>' => ''
-			)));
-			# lang list
-			# Languages combo
-			$rs = $core->blog->getLangs(array('order'=>'asc'));
-			$all_langs = l10n::getISOcodes(0,1);
-			$lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
-			while ($rs->fetch()) {
-				if (isset($all_langs[$rs->post_lang])) {
-					$lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang;
-					unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]);
-				} else {
-					$lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang;
-				}
-			}
-			unset($all_langs);
-			unset($rs);
-			
-			echo
-			'<form action="posts_actions.php" method="post">'.
-			$as->getCheckboxes().
-			
-			'<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '.
-			form::combo('new_lang',$lang_combo,'');
-			
-			echo
-				$core->formNonce().
-				form::hidden(array('action'),'lang').
-				'<input type="submit" value="'.__('Save').'" /></p>'.
-				'</form>';
-		}
-	}
-}
-
-
-class dcLegacyPosts
-{
-	public static function adminPostsActionSet($core, dcPostsActionSet $as) {
-		$stub_actions = new ArrayObject();
-		$core->callBehavior('adminPostsActionsCombo',array($stub_actions));
-		if (!empty($stub_actions)) {
-			$as->addAction($stub_actions,array('dcLegacyPosts','onActionLegacy'));
-		}
-	}
-	
-	public static function onActionLegacy($core, dcPostsActionSet $as, $post) {
-		$core->callBehavior('adminPostsActions',$core,$as->getRS(),$as->getAction(),$as->getRedirection());
-		$as->beginPage($core->callBehavior('adminPostsActionsHeaders'),'');
-		$core->callBehavior('adminPostsActionsContent',$core,$as->getAction(),$as->getHiddenFields(true));
-		$as->endPage();
-	
-	}
-}
Index: inc/admin/lib.admincombos.php
===================================================================
--- inc/admin/lib.admincombos.php	(revision 1780)
+++ 	(revision )
@@ -1,180 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-/**
-@ingroup DC_CORE
-@nosubgrouping
-@brief Admin combo library 
-
-Dotclear utility class that provides reuseable combos across all admin
-
-*/
-class dcAdminCombos {
-
-	/** @var dcCore dcCore instance */
-	public static $core;
-	
-	/**
-	Returns an hierarchical categories combo from a category record
-	
-	@param	categories		<b>record</b>		the category record
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/
-	public static function getCategoriesCombo($categories,$include_empty = true) {
-		$categories_combo = array();
-		if ($include_empty) {
-			$categories_combo = array(new formSelectOption(__('(No cat)'),''));
-		}
-		while ($categories->fetch()) {
-			$categories_combo[] = new formSelectOption (
-				str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').
-				html::escapeHTML($categories->cat_title).' ('.$categories->nb_post.')',
-				$categories->cat_id
-			);
-		}
-		return $categories_combo;
-	}
-	
-	/**
-	Returns available post status combo 
-	
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/
-	public static function getPostStatusesCombo() {
-		$status_combo =  array();
-		foreach (self::$core->blog->getAllPostStatus() as $k => $v) {
-			$status_combo[$v] = (string) $k;
-		}
-		return $status_combo;
-	}
-	
-	/**
-	Returns an users combo from a users record
-	
-	@param	users		<b>record</b>		the users record
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/
-	public static function getUsersCombo($users) {
-		$users_combo = array();
-		while ($users->fetch())
-		{
-			$user_cn = dcUtils::getUserCN($users->user_id,$users->user_name,
-			$users->user_firstname,$users->user_displayname);
-			
-			if ($user_cn != $users->user_id) {
-				$user_cn .= ' ('.$users->user_id.')';
-			}
-			
-			$users_combo[$user_cn] = $users->user_id; 
-		}
-		return $users_combo;
-	}
-	
-	/**
-	Returns an date combo from a date record
-	
-	@param	dates		<b>record</b>		the dates record
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getDatesCombo($dates) {
-		$dt_m_combo= array();
-		while ($dates->fetch()) {
-			$dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month();
-		}		
-		return $dt_m_combo;
-	}
-	
-	/**
-	Returns an lang combo from a lang record
-	
-	@param	langs		<b>record</b>		the langs record
-	@param	with_available	<b>boolean</b>	if false, only list items from record
-											if true, also list available languages
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getLangsCombo($langs,$with_available=false) {
-		$all_langs = l10n::getISOcodes(0,1);
-		if ($with_available) {
-			$langs_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1));
-			while ($langs->fetch()) {
-				if (isset($all_langs[$langs->post_lang])) {
-					$langs_combo[__('Most used')][$all_langs[$langs->post_lang]] = $langs->post_lang;
-					unset($langs_combo[__('Available')][$all_langs[$langs->post_lang]]);
-				} else {
-					$langs_combo[__('Most used')][$langs->post_lang] = $langs->post_lang;
-				}
-			}
-		} else {
-			$langs_combo = array();
-			while ($langs->fetch()) {
-				$lang_name = isset($all_langs[$langs->post_lang]) ? $all_langs[$langs->post_lang] : $langs->post_lang;
-				$langs_combo[$lang_name] = $langs->post_lang;
-			}
-		}
-		unset($all_langs);
-		return $langs_combo;
-	}
-	
-	/**
-	Returns a combo containing all available and installed languages for administration pages
-	
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getAdminLangsCombo() {
-		$lang_combo = array();
-		$langs = l10n::getISOcodes(1,1);
-		foreach ($langs as $k => $v) {
-			$lang_avail = $v == 'en' || is_dir(DC_L10N_ROOT.'/'.$v);
-			$lang_combo[] = new formSelectOption($k,$v,$lang_avail ? 'avail10n' : '');
-		}
-		return $lang_combo;
-	}
-	
-	/**
-	Returns a combo containing all available formaters in admin
-	
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getFormatersCombo() {
-		foreach (self::$core->getFormaters() as $v) {
-			$formaters_combo[$v] = $v;
-		}
-		return $formaters_combo;
-	}
-	
-	/**
-	Returns a combo containing available blog statuses
-	
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getBlogStatusesCombo() {
-		$status_combo = array();
-		foreach (self::$core->getAllBlogStatus() as $k => $v) {
-			$status_combo[$v] = (string) $k;
-		}
-		return $status_combo;
-	}
-	
-	/**
-	Returns a combo containing available comment statuses
-	
-	@return	<b>array</b> the combo box (form::combo -compatible format)
-	*/	
-	public static function getCommentStatusescombo() {
-		$status_combo = array();
-		foreach (self::$core->blog->getAllCommentStatus() as $k => $v) {
-			$status_combo[$v] = (string) $k;
-		}
-		return $status_combo;
-	}
-}
-dcAdminCombos::$core = $GLOBALS['core'];
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 1793)
+++ inc/admin/lib.dc.page.php	(revision 1700)
@@ -49,5 +49,5 @@
 
 	# Top of admin page
-	public static function open($title='',$head='',$breadcrumb='')
+	public static function open($title='', $head='')
 	{
 		global $core;
@@ -73,9 +73,9 @@
 			}
 			$blog_box =
-			'<p><label for="switchblog" class="classic nomobile">'.
-			__('Blogs:').'</label> '.
+			'<p><label for="switchblog" class="classic">'.
+			__('Blogs:').' '.
 			$core->formNonce().
 			form::combo('switchblog',$blogs,$core->blog->id).
-			'</p>'.
+			'</label></p>'.
 			'<noscript><p><input type="submit" value="'.__('ok').'" /></p></noscript>';
 		}
@@ -93,15 +93,14 @@
 		"<head>\n".
 		'  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n".
+		'  <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n".
+
 		'  <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n".
 		'  <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n".
-		'  <meta name="viewport" content="width=device-width, initial-scale=1.0" />'."\n".
-		'  <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n".
-
 
 		self::jsLoadIE7().
-		'  <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";
+		'  	<link rel="stylesheet" href="style/default.css" type="text/css" media="screen" />'."\n";
 		if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') {
 			echo
-			'  <link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";
+			'  	<link rel="stylesheet" href="style/default-rtl.css" type="text/css" media="screen" />'."\n";
 		}
 
@@ -114,5 +113,4 @@
 		echo
 		self::jsCommon().
-		self::jsToggles().
 		$head;
 
@@ -123,12 +121,9 @@
 		"</head>\n".
 		'<body id="dotclear-admin'.
-		($safe_mode ? ' safe-mode' : '').'" class="no-js">'."\n".
+		($safe_mode ? ' safe-mode' : '').
+		'">'."\n".
 
 		'<div id="header">'.
-		'<ul id="prelude">'.
-		'<li><a href="#content">'.__('Go to the content').'</a></li>'.
-		'<li><a href="#main-menu">'.__('Go to the menu').'</a></li>'.
-		'<li><a href="#qx">'.__('Go to search').'</a></li>'.
-		'</ul>'."\n".
+		'<ul id="prelude"><li><a href="#content">'.__('Go to the content').'</a></li><li><a href="#main-menu">'.__('Go to the menu').'</a></li></ul>'."\n".
 		'<div id="top"><h1><a href="index.php">'.DC_VENDOR_NAME.'</a></h1></div>'."\n";
 
@@ -138,11 +133,11 @@
 		'<form action="index.php" method="post">'.
 		$blog_box.
-		'<p class="nomobile"><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').'<img src="images/outgoing.png" alt="" /></a>'.
+		'<p><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').' <img src="images/outgoing.png" alt="" /></a>'.
 		'</p></form>'.
 		'</div>'.
 		'<div id="info-box2">'.
-		'<a class="smallscreen'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="index.php">'.__('My dashboard').'</a>'.
-		'<span class="smallscreen"> | </span><a class="smallscreen'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="preferences.php">'.__('My preferences').'</a>'.
-		'<span class="smallscreen"> | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).'<img src="images/logout.png" alt="" /></a>'.
+		'<a'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').' href="index.php">'.__('My dashboard').'</a>'.
+		'<span> | </span><a'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').' href="preferences.php">'.__('My preferences').'</a>'.
+		'<span> | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).' <img src="images/logout.png" alt="" /></a>'.
 		'</div>'.
 		'</div>'.
@@ -150,7 +145,7 @@
 
 		echo
-		'<div id="wrapper" class="clearfix">'."\n".
+		'<div id="wrapper">'."\n".
 		'<div id="main">'."\n".
-		'<div id="content" class="clearfix">'."\n";
+		'<div id="content">'."\n";
 
 		# Safe mode
@@ -163,7 +158,4 @@
 		}
 
-		// Display breadcrumb (if given) before any error message
-		echo $breadcrumb;
-
 		if ($core->error->flag()) {
 			echo
@@ -184,10 +176,5 @@
 		"</div>\n".		// End of #main
 
-		'<div id="main-menu">'."\n".
-
-		'<form id="search-menu" action="search.php" method="get">'.
-		'<p><label for="qx" class="hidden">'.__('Search:').' </label>'.form::field('qx',30,255,'').
-		'<input type="submit" value="'.__('OK').'" /></p>'.
-		'</form>';
+		'<div id="main-menu">'."\n";
 
 		foreach ($menu as $k => $v) {
@@ -206,15 +193,5 @@
 		echo
 		'</div>'."\n".		// End of #main-menu
-		'<div id="footer">'.
-		'<span class="helplink"><a href="help.php">'.__('Global help').'</a></span> '.
-		'<a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logos/w-dotclear90.png" alt="'.$text.'" /></a></div>'."\n".
-		'<!-- '."\n".
-'                  .'."\n".
-'               ,;:\'`\'::'."\n".
-'            __||'."\n".
-'      _____/LLLL\_'."\n".
-'      \__________"|'."\n".
-'    ~^~^~^~^~^~^~^~^~^~'."\n".
-' -->'."\n".
+		'<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logo_footer.png" alt="'.$text.'" /></a></div>'."\n".
 		"</div>\n";		// End of #wrapper
 
@@ -227,5 +204,5 @@
 	}
 
-	public static function openPopup($title='',$head='',$breadcrumb='')
+	public static function openPopup($title='', $head='')
 	{
 		global $core;
@@ -239,5 +216,4 @@
 		'xml:lang="'.$core->auth->getInfo('user_lang').'" '.
 		'lang="'.$core->auth->getInfo('user_lang').'">'."\n".
-		'<meta name="viewport" content="width=device-width, initial-scale=1.0" />'."\n".
 		"<head>\n".
 		'  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n".
@@ -256,5 +232,4 @@
 		echo
 		self::jsCommon().
-		self::jsToggles().
 		$head;
 
@@ -266,5 +241,5 @@
 		'<body id="dotclear-admin" class="popup">'."\n".
 
-		'<div id="top hidden"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n";
+		'<div id="top"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n";
 
 		echo
@@ -272,7 +247,4 @@
 		'<div id="main">'."\n".
 		'<div id="content">'."\n";
-
-		// display breadcrumb if given
-		echo $breadcrumb;
 
 		if ($core->error->flag()) {
@@ -294,24 +266,5 @@
 	}
 
-	public static function breadcrumb($elements=null,$with_home_link=true,$echo=false)
-	{
-		// First item of array elements should be blog's name, System or Plugins
-		$res = '<h2>'.($with_home_link ?
-			'<a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>' :
-			'<img src="style/dashboard-alt.png" alt="" />');
-		$index = 0;
-		foreach ($elements as $element => $url) {
-			$res .= ($with_home_link ? ($index == 1 ? ' : ' : ' &rsaquo; ') : ($index == 0 ? ' ' : ' &rsaquo; ')).
-				($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : '');
-			$index++;
-		}
-		$res .= '</h2>';
-		if ($echo) {
-			echo $res;
-		}
-		return $res;
-	}
-
-	public static function message($msg,$timestamp=true,$div=false,$echo=true,$class='message')
+	public static function message($msg,$timestamp=true,$div=false,$echo=true)
 	{
 		global $core;
@@ -319,5 +272,5 @@
 		$res = '';
 		if ($msg != '') {
-			$res = ($div ? '<div class="'.$class.'">' : '').'<p'.($div ? '' : ' class="'.$class.'"').'>'.
+			$res = ($div ? '<div class="message">' : '').'<p'.($div ? '' : ' class="message"').'>'.
 			($timestamp ? dt::str(__('%H:%M:%S:'),null,$core->auth->getInfo('user_tz')).' ' : '').$msg.
 			'</p>'.($div ? '</div>' : '');
@@ -327,14 +280,4 @@
 		}
 		return $res;
-	}
-
-	public static function success($msg,$timestamp=true,$div=false,$echo=true)
-	{
-		self::message($msg,$timestamp,$div,$echo,"success");
-	}
-
-	public static function warning($msg,$timestamp=true,$div=false,$echo=true)
-	{
-		self::message($msg,$timestamp,$div,$echo,"warning-msg");
 	}
 
@@ -390,10 +333,4 @@
 	{
 		$args = func_get_args();
-
-		$args = new ArrayObject($args);
-
-		# --BEHAVIOR-- adminPageHelpBlock
-		$GLOBALS['core']->callBehavior('adminPageHelpBlock',$args);
-
 		if (empty($args)) {
 			return;
@@ -434,11 +371,6 @@
 
 		echo
-		'<div id="help"><hr /><div class="help-content clear"><h3>'.__('Help about this page').'</h3>'.
+		'<div id="help"><hr /><div class="help-content clear"><h2>'.__('Help').'</h2>'.
 		$content.
-		'</div>'.
-		'<div id="helplink"><hr />'.
-		'<p>'.
-		sprintf(__('See also %s'),sprintf('<a href="help.php">%s</a>',__('the global help'))).
-		'</p>'.
 		'</div></div>';
 	}
@@ -458,41 +390,8 @@
 	}
 
-	public static function jsToggles()
-	{
-		if($GLOBALS['core']->auth->user_prefs->toggles) {
-			$unfolded_sections = explode(',',$GLOBALS['core']->auth->user_prefs->toggles->unfolded_sections);
-			foreach ($unfolded_sections as $k=>&$v) {
-				if ($v == '') {
-					unset($unfolded_sections[$k]);
-				} else {
-					$v = "'".html::escapeJS($v)."':true";
-				}
-			}
-		} else {
-			$unfolded_sections=array();
-		}
-		return '<script type="text/javascript">'."\n".
-					"//<![CDATA[\n".
-					'dotclear.unfolded_sections = {'.join(",",$unfolded_sections)."};\n".
-					"\n//]]>\n".
-				"</script>\n";
-	}
-	
 	public static function jsCommon()
 	{
-		$mute_or_no = '';
-		if (!empty($GLOBALS['core']->blog->settings->system->jquery_migrate_mute)) {
-			$mute_or_no .=
-				'<script type="text/javascript">'."\n".
-				"//<![CDATA[\n".
-				'jQuery.migrateMute = true;'.
-				"\n//]]>\n".
-				"</script>\n";
-		}
-
 		return
 		self::jsLoad('js/jquery/jquery.js').
-		$mute_or_no.
-		self::jsLoad('js/jquery/jquery-migrate-1.2.1.js').
 		self::jsLoad('js/jquery/jquery.biscuit.js').
 		self::jsLoad('js/jquery/jquery.bgFade.js').
@@ -503,4 +402,5 @@
 		"//<![CDATA[\n".
 		self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()).
+
 		self::jsVar('dotclear.img_plus_src','images/expand.png').
 		self::jsVar('dotclear.img_plus_alt',__('uncover')).
@@ -511,9 +411,5 @@
 
 		self::jsVar('dotclear.msg.help',
-			__('Help about this page')).
-		self::jsVar('dotclear.msg.help_hide',
-			__('Hide')).
-		self::jsVar('dotclear.msg.to_select',
-			__('Select:')).
+			__('help')).
 		self::jsVar('dotclear.msg.no_selection',
 			__('no selection')).
@@ -521,5 +417,5 @@
 			__('select all')).
 		self::jsVar('dotclear.msg.invert_sel',
-			__('Invert selection')).
+			__('invert selection')).
 		self::jsVar('dotclear.msg.website',
 			__('Web site:')).
@@ -538,10 +434,6 @@
 		self::jsVar('dotclear.msg.confirm_delete_posts',
 			__("Are you sure you want to delete selected entries (%s)?")).
-		self::jsVar('dotclear.msg.confirm_delete_categories',
-			__("Are you sure you want to delete selected categories (%s)?")).
 		self::jsVar('dotclear.msg.confirm_delete_post',
 			__("Are you sure you want to delete this entry?")).
-		self::jsVar('dotclear.msg.click_to_unlock',
-			__("Click here to unlock the field")).
 		self::jsVar('dotclear.msg.confirm_spam_delete',
 			__('Are you sure you want to delete all spams?')).
@@ -590,5 +482,5 @@
 		self::jsVar('dotclear.msg.load_enhanced_uploader',
 			__('Loading enhanced uploader, please wait.')).
-			"\n//]]>\n".
+		"\n//]]>\n".
 		"</script>\n";
 	}
@@ -597,6 +489,6 @@
 	{
 		return
-		'<!--[if lt IE 9]>'."\n".
-		self::jsLoad('js/ie7/IE9.js').
+		'<!--[if lt IE 8]>'."\n".
+		self::jsLoad('js/ie7/IE8.js').
 		'<link rel="stylesheet" type="text/css" href="style/iesucks.css" />'."\n".
 		'<![endif]-->'."\n";
@@ -812,4 +704,57 @@
 	'<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n".
 
+	'<script id="template-upload" type="text/x-tmpl">
+	{% for (var i=0, file; file=o.files[i]; i++) { %}
+	<div class="template-upload fade">
+	<div class="upload-file">
+	<div class="upload-fileinfo">
+		<span class="upload-filename">{%=file.name%}</span>
+		<span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span>
+		<span class="upload-filecancel cancel">'.__('Cancel').'</span>
+		{% if (!o.files.error && !i && !o.options.autoUpload) { %}
+		<input type="submit" class="button start"  value="'.__('Send').'"/>
+		{% } %}
+		<span class="upload-filemsg"></span>
+	</div>
+	{% if (!o.files.error) { %}
+	<div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
+	{% } %}
+	</div>
+	{% } %}
+	</script>
+	<!-- The template to display files available for download -->
+	<script id="template-download" type="text/x-tmpl">
+	{% for (var i=0, file; file=o.files[i]; i++) { %}
+	<div class="template-download fade">
+	<div class="upload-file">
+	<div class="upload-fileinfo">
+		<span class="upload-filename">{%=file.name%}</span>
+		<span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span>
+		<span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}">
+		{% if (file.error) { %}
+		'.__('Error:').' {%=file.error%}
+		{% } else { %}
+		'.__('File successfully uploaded.').'
+		{% } %}
+		</span>
+	</div>
+	<div class="upload-progress">
+		{% if (!file.error) { %}
+		<div class="bar" style="width:100%;">100%</div>
+		{% } %}
+	</div>
+	</div>
+	{% } %}
+	</script>'.
+
+	self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js').
+	self::jsLoad('js/jsUpload/tmpl.js').
+	self::jsLoad('js/jsUpload/load-image.js').
+	self::jsLoad('js/jsUpload/jquery.iframe-transport.js').
+	self::jsLoad('js/jsUpload/jquery.fileupload.js').
+	self::jsLoad('js/jsUpload/jquery.fileupload-process.js').
+	self::jsLoad('js/jsUpload/jquery.fileupload-resize.js').
+	self::jsLoad('js/jsUpload/jquery.fileupload-ui.js').
+
 	'<script type="text/javascript">'."\n".
 	"//<![CDATA[\n".
@@ -828,6 +773,4 @@
 	self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')).
 	self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')).
-	self::jsVar('dotclear.jsUpload.msg.send',__('Send')).
-	self::jsVar('dotclear.jsUpload.msg.file_successfully_uploaded',__('File successfully uploaded.')).
 	self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')).
 	self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')).
@@ -836,16 +779,5 @@
 	self::jsVar('dotclear.jsUpload.base_url',$base_url).
 	"\n//]]>\n".
-	"</script>\n".
-
-	self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js').
-	self::jsLoad('js/jsUpload/tmpl.js').
-	self::jsLoad('js/jsUpload/template-upload.js').
-	self::jsLoad('js/jsUpload/template-download.js').
-	self::jsLoad('js/jsUpload/load-image.js').
-	self::jsLoad('js/jsUpload/jquery.iframe-transport.js').
-	self::jsLoad('js/jsUpload/jquery.fileupload.js').
-	self::jsLoad('js/jsUpload/jquery.fileupload-process.js').
-	self::jsLoad('js/jsUpload/jquery.fileupload-resize.js').
-	self::jsLoad('js/jsUpload/jquery.fileupload-ui.js');
+	"</script>\n";
 }
 
Index: inc/admin/lib.pager.php
===================================================================
--- inc/admin/lib.pager.php	(revision 1670)
+++ inc/admin/lib.pager.php	(revision 1364)
@@ -23,6 +23,6 @@
 		$this->rs =& $rs;
 		$this->rs_count = $rs_count;
-		$this->html_prev = __('&#171; prev.');
-		$this->html_next = __('next &#187;');
+		$this->html_prev = __('&#171;prev.');
+		$this->html_next = __('next&#187;');
 	}
 }
@@ -42,19 +42,14 @@
 			$pager->html_next = $this->html_next;
 			$pager->var_page = 'page';
-			$entries = array();
-			if (isset($_REQUEST['entries'])) {
-				foreach ($_REQUEST['entries'] as $v) {
-					$entries[(integer)$v]=true;
-				}
-			}
+			
 			$html_block =
-			'<table class="clear"><caption class="hidden">'.__('Entries list').'</caption><tr>'.
-			'<th colspan="2" class="first">'.__('Title').'</th>'.
-			'<th scope="col">'.__('Date').'</th>'.
-			'<th scope="col">'.__('Category').'</th>'.
-			'<th scope="col">'.__('Author').'</th>'.
-			'<th scope="col">'.__('Comments').'</th>'.
-			'<th scope="col">'.__('Trackbacks').'</th>'.
-			'<th scope="col">'.__('Status').'</th>'.
+			'<table class="clear"><tr>'.
+			'<th colspan="2">'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Category').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Comments').'</th>'.
+			'<th>'.__('Trackbacks').'</th>'.
+			'<th>'.__('Status').'</th>'.
 			'</tr>%s</table>';
 			
@@ -63,5 +58,5 @@
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -71,14 +66,14 @@
 			while ($this->rs->fetch())
 			{
-				echo $this->postLine(isset($entries[$this->rs->post_id]));
+				echo $this->postLine();
 			}
 			
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
 	
-	private function postLine($checked)
+	private function postLine()
 	{
 		if ($this->core->auth->check('categories',$this->core->blog->id)) {
@@ -98,14 +93,14 @@
 		switch ($this->rs->post_status) {
 			case 1:
-				$img_status = sprintf($img,__('Published'),'check-on.png');
+				$img_status = sprintf($img,__('published'),'check-on.png');
 				break;
 			case 0:
-				$img_status = sprintf($img,__('Unpublished'),'check-off.png');
+				$img_status = sprintf($img,__('unpublished'),'check-off.png');
 				break;
 			case -1:
-				$img_status = sprintf($img,__('Scheduled'),'scheduled.png');
+				$img_status = sprintf($img,__('scheduled'),'scheduled.png');
 				break;
 			case -2:
-				$img_status = sprintf($img,__('Pending'),'check-wrn.png');
+				$img_status = sprintf($img,__('pending'),'check-wrn.png');
 				break;
 		}
@@ -113,10 +108,10 @@
 		$protected = '';
 		if ($this->rs->post_password) {
-			$protected = sprintf($img,__('Protected'),'locker.png');
+			$protected = sprintf($img,__('protected'),'locker.png');
 		}
 		
 		$selected = '';
 		if ($this->rs->post_selected) {
-			$selected = sprintf($img,__('Selected'),'selected.png');
+			$selected = sprintf($img,__('selected'),'selected.png');
 		}
 		
@@ -133,12 +128,12 @@
 		$res .=
 		'<td class="nowrap">'.
-		form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'.
-		'<td class="maximal" scope="row"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'.
+		form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'.
+		'<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'.
 		html::escapeHTML($this->rs->post_title).'</a></td>'.
-		'<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
 		'<td class="nowrap">'.$cat_title.'</td>'.
 		'<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'.
-		'<td class="nowrap count">'.$this->rs->nb_comment.'</td>'.
-		'<td class="nowrap count">'.$this->rs->nb_trackback.'</td>'.
+		'<td class="nowrap">'.$this->rs->nb_comment.'</td>'.
+		'<td class="nowrap">'.$this->rs->nb_trackback.'</td>'.
 		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
 		'</tr>';
@@ -164,9 +159,9 @@
 			
 			$html_block =
-			'<table class="clear"><caption class="hidden">'.__('Entries list').'</caption><tr>'.
-			'<th scope="col">'.__('Title').'</th>'.
-			'<th scope="col">'.__('Date').'</th>'.
-			'<th scope="col">'.__('Author').'</th>'.
-			'<th scope="col">'.__('Status').'</th>'.
+			'<table class="clear"><tr>'.
+			'<th>'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Status').'</th>'.
 			'</tr>%s</table>';
 			
@@ -175,5 +170,5 @@
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -188,5 +183,5 @@
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
@@ -197,14 +192,14 @@
 		switch ($this->rs->post_status) {
 			case 1:
-				$img_status = sprintf($img,__('Published'),'check-on.png');
+				$img_status = sprintf($img,__('published'),'check-on.png');
 				break;
 			case 0:
-				$img_status = sprintf($img,__('Unpublished'),'check-off.png');
+				$img_status = sprintf($img,__('unpublished'),'check-off.png');
 				break;
 			case -1:
-				$img_status = sprintf($img,__('Scheduled'),'scheduled.png');
+				$img_status = sprintf($img,__('scheduled'),'scheduled.png');
 				break;
 			case -2:
-				$img_status = sprintf($img,__('Pending'),'check-wrn.png');
+				$img_status = sprintf($img,__('pending'),'check-wrn.png');
 				break;
 		}
@@ -212,10 +207,10 @@
 		$protected = '';
 		if ($this->rs->post_password) {
-			$protected = sprintf($img,__('Protected'),'locker.png');
+			$protected = sprintf($img,__('protected'),'locker.png');
 		}
 		
 		$selected = '';
 		if ($this->rs->post_selected) {
-			$selected = sprintf($img,__('Selected'),'selected.png');
+			$selected = sprintf($img,__('selected'),'selected.png');
 		}
 		
@@ -231,8 +226,8 @@
 		
 		$res .=
-		'<td scope="row" class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '.
+		'<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'" '.
 		'title="'.html::escapeHTML($this->rs->getURL()).'">'.
 		html::escapeHTML($this->rs->post_title).'</a></td>'.
-		'<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'.
 		'<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'.
 		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
@@ -259,17 +254,18 @@
 			
 			$html_block =
-			'<table><caption class="hidden">'.__('Comments and trackbacks list').'</caption><tr>'.
-			'<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'.
-			'<th scope="col">'.__('Author').'</th>'.
-			'<th scope="col">'.__('Date').'</th>'.
-			'<th scope="col" class="txt-center">'.__('Status').'</th>'.
-			'<th scope="col" abbr="entry">'.__('Entry title').'</th>'.
+			'<table><tr>'.
+			'<th colspan="2">'.__('Title').'</th>'.
+			'<th>'.__('Date').'</th>'.
+			'<th>'.__('Author').'</th>'.
+			'<th>'.__('Type').'</th>'.
+			'<th>'.__('Status').'</th>'.
+			'<th>&nbsp;</th>'.
 			'</tr>%s</table>';
-
+			
 			if ($enclose_block) {
 				$html_block = sprintf($enclose_block,$html_block);
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -284,5 +280,5 @@
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
@@ -310,24 +306,21 @@
 		switch ($this->rs->comment_status) {
 			case 1:
-				$img_status = sprintf($img,__('Published'),'check-on.png');
+				$img_status = sprintf($img,__('published'),'check-on.png');
 				break;
 			case 0:
-				$img_status = sprintf($img,__('Unpublished'),'check-off.png');
+				$img_status = sprintf($img,__('unpublished'),'check-off.png');
 				break;
 			case -1:
-				$img_status = sprintf($img,__('Pending'),'check-wrn.png');
+				$img_status = sprintf($img,__('pending'),'check-wrn.png');
 				break;
 			case -2:
-				$img_status = sprintf($img,__('Junk'),'junk.png');
-				break;
-		}
-		
-		$post_title = html::escapeHTML($this->rs->post_title);
-		if (mb_strlen($post_title) > 60) {
-			$post_title = mb_strcut($post_title,0,57).'...';
-		}
-		$comment_title = sprintf(__('Edit the %1$s from %2$s'),
-			$this->rs->comment_trackback ? __('trackback') : __('comment'),
-			html::escapeHTML($this->rs->comment_author));
+				$img_status = sprintf($img,__('junk'),'junk.png');
+				break;
+		}
+		
+		$comment_author = html::escapeHTML($this->rs->comment_author);
+		if (mb_strlen($comment_author) > 20) {
+			$comment_author = mb_strcut($comment_author,0,17).'...';
+		}
 		
 		$res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'.
@@ -337,14 +330,13 @@
 		'<td class="nowrap">'.
 		form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'</td>'.
-		'<td class="nowrap" abbr="'.__('Type and author').'" scope="raw">'.
-			'<a href="'.$comment_url.'" title="'.$comment_title.'">'.
-			'<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '.
-			($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>'.
-		'<td class="nowrap maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'.
-		'<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'.
-		'<td class="nowrap status txt-center">'.$img_status.'</td>'.
-		'<td class="nowrap"><a href="'.$post_url.'">'.
-		html::escapeHTML($post_title).'</a>'.
-		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>';
+		'<td class="maximal"><a href="'.$post_url.'">'.
+		html::escapeHTML($this->rs->post_title).'</a>'.
+		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'.
+		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'.
+		'<td class="nowrap"><a href="'.$author_url.'">'.html::escapeHTML($comment_author).'</a></td>'.
+		'<td class="nowrap">'.($this->rs->comment_trackback ? __('trackback') : __('comment')).'</td>'.
+		'<td class="nowrap status">'.$img_status.'</td>'.
+		'<td class="nowrap status"><a href="'.$comment_url.'">'.
+		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>';
 		
 		$res .= '</tr>';
@@ -370,10 +362,10 @@
 			
 			$html_block =
-			'<table class="clear"><caption class="hidden">'.__('Users list').'</caption><tr>'.
-			'<th colspan="2" scope="col" class="first">'.__('Username').'</th>'.
-			'<th scope="col">'.__('First Name').'</th>'.
-			'<th scope="col">'.__('Last Name').'</th>'.
-			'<th scope="col">'.__('Display name').'</th>'.
-			'<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'.
+			'<table class="clear"><tr>'.
+			'<th colspan="2">'.__('Username').'</th>'.
+			'<th>'.__('First Name').'</th>'.
+			'<th>'.__('Last Name').'</th>'.
+			'<th>'.__('Display name').'</th>'.
+			'<th class="nowrap">'.__('Entries').'</th>'.
 			'</tr>%s</table>';
 			
@@ -382,5 +374,5 @@
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -395,5 +387,5 @@
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
@@ -416,10 +408,10 @@
 		'<td class="nowrap">'.form::hidden(array('nb_post[]'),(integer) $this->rs->nb_post).
 		form::checkbox(array('users[]'),$this->rs->user_id).'</td>'.
-		'<td class="maximal" scope="row"><a href="user.php?id='.$this->rs->user_id.'">'.
+		'<td class="maximal"><a href="user.php?id='.$this->rs->user_id.'">'.
 		$this->rs->user_id.'</a>&nbsp;'.$img_status.'</td>'.
 		'<td class="nowrap">'.html::escapeHTML($this->rs->user_firstname).'</td>'.
 		'<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>'.
 		'<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>'.
-		'<td class="nowrap count"><a href="posts.php?user_id='.$this->rs->user_id.'">'.
+		'<td class="nowrap"><a href="posts.php?user_id='.$this->rs->user_id.'">'.
 		$this->rs->nb_post.'</a></td>'.
 		'</tr>';
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 1793)
+++ inc/admin/prepend.php	(revision 1592)
@@ -261,5 +261,5 @@
 		'images/menu/users.png','images/menu/users-b.png',
 		null,null,null));
-	$_fav['plugins'] = new ArrayObject(array('plugins','Plugins management','plugins.php',
+	$_fav['plugins'] = new ArrayObject(array('plugins','Plugins','plugins.php',
 		'images/menu/plugins.png','images/menu/plugins-b.png',
 		null,null,null));
@@ -267,8 +267,4 @@
 		'images/menu/langs.png','images/menu/langs-b.png',
 		null,null,null));
-
-	$_fav['help'] = new ArrayObject(array('help','Global help','help.php',
-		'images/menu/help.png','images/menu/help-b.png',
-		'*',null,null));
 	
 	# Menus creation
@@ -288,5 +284,5 @@
 	# Set menu titles
 	
-	$_menu['System']->title = __('System settings');
+	$_menu['System']->title = __('System');
 	$_menu['Blog']->title = __('Blog');
 	$_menu['Plugins']->title = __('Plugins');
@@ -332,5 +328,5 @@
 		preg_match('/langs.php(\?.*)?$/',$_SERVER['REQUEST_URI']),
 		$core->auth->isSuperAdmin());
-	$_menu['System']->prependItem(__('Plugins management'),'plugins.php','images/menu/plugins.png',
+	$_menu['System']->prependItem(__('Plugins'),'plugins.php','images/menu/plugins.png',
 		preg_match('/plugins.php(\?.*)?$/',$_SERVER['REQUEST_URI']),
 		$core->auth->isSuperAdmin());
@@ -378,8 +374,4 @@
 		}
 	}
-	
-	if (empty($core->blog->settings->system->jquery_migrate_mute)) {
-		$core->blog->settings->system->put('jquery_migrate_mute', true, 'boolean', 'Mute warnings for jquery migrate plugin ?', false);
-	}
 }
 ?>
Index: inc/config.php.in
===================================================================
--- inc/config.php.in	(revision 1743)
+++ inc/config.php.in	(revision 1535)
@@ -12,5 +12,5 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-// Database driver (mysql, mysqli, pgsql, sqlite)
+// Database driver (mysql, pgsql, sqlite)
 define('DC_DBDRIVER','');
 
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 1743)
+++ inc/core/class.dc.blog.php	(revision 1570)
@@ -81,5 +81,5 @@
 			$this->desc = $b->blog_desc;
 			$this->url = $b->blog_url;
-			$this->host = http::getHostFromURL($this->url);
+			$this->host = preg_replace('|^([a-z]{3,}://)(.*?)/.*$|','$1$2',$this->url);
 			$this->creadt = strtotime($b->blog_creadt);
 			$this->upddt = strtotime($b->blog_upddt);
@@ -91,13 +91,13 @@
 			$this->public_path = path::fullFromRoot($this->settings->system->public_path,DC_ROOT);
 			
-			$this->post_status['-2'] = __('Pending');
-			$this->post_status['-1'] = __('Scheduled');
-			$this->post_status['0'] = __('Unpublished');
-			$this->post_status['1'] = __('Published');
-			
-			$this->comment_status['-2'] = __('Junk');
-			$this->comment_status['-1'] = __('Pending');
-			$this->comment_status['0'] = __('Unpublished');
-			$this->comment_status['1'] = __('Published');
+			$this->post_status['-2'] = __('pending');
+			$this->post_status['-1'] = __('scheduled');
+			$this->post_status['0'] = __('unpublished');
+			$this->post_status['1'] = __('published');
+			
+			$this->comment_status['-2'] = __('junk');
+			$this->comment_status['-1'] = __('pending');
+			$this->comment_status['0'] = __('unpublished');
+			$this->comment_status['1'] = __('published');
 			
 			# --BEHAVIOR-- coreBlogConstruct
@@ -199,5 +199,5 @@
 	/**
 	Updates comments and trackbacks counters in post table. Should be called
-	every time comments or trackbacks are added, removed or changed their status.
+	every time comments or trackbacks are added, removed or changed there status.
 	
 	@param	ids		<b>mixed</b>		Comment(s) ID(s)
@@ -300,9 +300,5 @@
 		$counter = $this->getCategoriesCounter($c_params);
 		
-		if (isset($params['without_empty']) && ($params['without_empty'] == false)) {
-			$without_empty = false;
-		} else {
-			$without_empty = $this->core->auth->userID() == false; # Get all categories if in admin display
-		}
+		$without_empty = $this->core->auth->userID() == false; # For public display
 		
 		$start = isset($params['start']) ? (integer) $params['start'] : 0;
@@ -554,17 +550,4 @@
 		$this->triggerBlog();
 	}
-
-        /**
-        Set category position
-
-        @param  id              <b>integer</b>          Category ID
-        @param  left            <b>integer</b>          Category ID before
-        @param  right           <b>integer</b>          Category ID after
-        */
-        public function updCategoryPosition($id,$left,$right)
-        {
-                $this->categories()->updatePosition($id,$left,$right);
-                $this->triggerBlog();
-        }
 	
 	/**
@@ -658,5 +641,5 @@
 		if (!$rs->isEmpty())
 		{
-			if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
+			if ($this->con->driver() == 'mysql') {
 				$clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'";
 			} elseif ($this->con->driver() == 'pgsql') {
@@ -1828,5 +1811,5 @@
 		if (!$rs->isEmpty())
 		{
-			if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
+			if ($this->con->driver() == 'mysql') {
 				$clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'";
 			} elseif ($this->con->driver() == 'pgsql') {
@@ -1880,5 +1863,4 @@
 	- cat_id: (integer or array) Get comments belonging to entries of given category ID
 	- comment_id: (integer) Get comment with given ID
-	- comment_site: (string) Get comments with given comment_site
 	- comment_status: (integer) Get comments with given comment_status
 	- comment_trackback: (integer) Get only comments (0) or trackbacks (1)
@@ -1970,9 +1952,4 @@
 		if (isset($params['comment_id']) && $params['comment_id'] !== '') {
 			$strReq .= 'AND comment_id = '.(integer) $params['comment_id'].' ';
-		}
-		
-		if (isset($params['comment_site'])) {
-			$comment_site = $this->con->escape(str_replace('*','%',$params['comment_site']));
-			$strReq .= "AND comment_site LIKE '".$comment_site."' ";
 		}
 		
@@ -2187,5 +2164,5 @@
 		
 		# mySQL uses "JOIN" synthax
-		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
+		if ($this->con->driver() == 'mysql') {
 			$strReq .= 
 				'JOIN '.$this->prefix.'post tp ON tc.post_id = tp.post_id ';
@@ -2196,5 +2173,5 @@
 		
 		# pgSQL uses "FROM" synthax
-		if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') {
+		if ($this->con->driver() != 'mysql') {
 			$strReq .= 
 				'FROM '.$this->prefix.'post tp ';
@@ -2206,5 +2183,5 @@
 		
 		# add pgSQL "WHERE" clause
-		if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') {
+		if ($this->con->driver() != 'mysql') {
 			$strReq .= 
 				'AND tc.post_id = tp.post_id ';
@@ -2265,5 +2242,5 @@
 		
 		# mySQL uses "INNER JOIN" synthax
-		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
+		if ($this->con->driver() == 'mysql') {
 			$strReq = 
 				'DELETE FROM tc '.
@@ -2302,5 +2279,5 @@
 		
 		# mySQL uses "INNER JOIN" synthax
-		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
+		if ($this->con->driver() == 'mysql') {
 			$strReq = 
 				'DELETE FROM tc '.
Index: inc/core/class.dc.categories.php
===================================================================
--- inc/core/class.dc.categories.php	(revision 1532)
+++ inc/core/class.dc.categories.php	(revision 1179)
@@ -188,22 +188,4 @@
 	}
 	
-        public function updatePosition($id,$left,$right)
-        {
-                $sql = 'UPDATE '.$this->table.' SET '
-                        .$this->f_left.' = '.$left.', '
-                        .$this->f_right.' = '.$right
-                        .' WHERE '.$this->f_id .' = '.(integer) $id
-                        .$this->getCondition();
-
-                $this->con->begin();
-                try {
-                        $this->con->execute($sql);
-                        $this->con->commit();
-                } catch (Exception $e) {
-                        $this->con->rollback();
-                        throw $e;
-                }
-        }
-
 	public function deleteNode($node,$keep_children=true)
 	{
Index: inc/core/class.dc.core.php
===================================================================
--- inc/core/class.dc.core.php	(revision 1743)
+++ inc/core/class.dc.core.php	(revision 1593)
@@ -64,6 +64,4 @@
 		if ($this->con instanceof mysqlConnection) {
 			mysqlConnection::$weak_locks = true;
-		} elseif ($this->con instanceof mysqliConnection) {
-			mysqliConnection::$weak_locks = true;
 		}
 		
@@ -347,10 +345,9 @@
 	}
 	
-	public function setPostType($type,$admin_url,$public_url,$label='')
+	public function setPostType($type,$admin_url,$public_url)
 	{
 		$this->post_types[$type] = array(
 			'admin_url' => $admin_url,
-			'public_url' => $public_url,
-			'label' => ($label != '' ? $label : $type)
+			'public_url' => $public_url
 		);
 	}
@@ -820,5 +817,5 @@
 		$strReq =
 		'SELECT U.user_id AS user_id, user_super, user_name, user_firstname, '.
-		'user_displayname, user_email, permissions '.
+		'user_displayname, permissions '.
 		'FROM '.$this->prefix.'user U '.
 		'JOIN '.$this->prefix.'permissions P ON U.user_id = P.user_id '.
@@ -829,5 +826,5 @@
 			'UNION '.
 			'SELECT U.user_id AS user_id, user_super, user_name, user_firstname, '.
-			"user_displayname, user_email, NULL AS permissions ".
+			"user_displayname, NULL AS permissions ".
 			'FROM '.$this->prefix.'user U '.
 			'WHERE user_super = 1 ';
@@ -844,5 +841,4 @@
 				'firstname' => $rs->user_firstname,
 				'displayname' => $rs->user_displayname,
-				'email' => $rs->user_email,
 				'super' => (boolean) $rs->user_super,
 				'p' => $this->auth->parsePermissions($rs->permissions)
Index: inc/core/class.dc.media.php
===================================================================
--- inc/core/class.dc.media.php	(revision 1718)
+++ inc/core/class.dc.media.php	(revision 1708)
@@ -516,7 +516,8 @@
 	@param	post_id	<b>integer</b>		Post ID
 	@param	media_id	<b>integer</b>		Optionnal media ID
-	@return	<b>array</b> Array of fileItems
-	*/
-	public function getPostMedia($post_id,$media_id=null)
+	@param	return_rs	<b>boolean</b>		Whether to return a resultset (true) or an array (false, default value).
+	@return	<b>array</b> Array or ResultSet of fileItems
+	*/
+	public function getPostMedia($post_id,$media_id=null,$return_rs=false)
 	{
 		$params = array(
@@ -534,9 +535,9 @@
 			$f = $this->fileRecord($rs);
 			if ($f !== null) {
-				$res[] = $f;
-			}
-		}
-		
-		return $res;
+				$res[] = $return_rs ? new ArrayObject($f) : $f;
+			}
+		}
+		
+		return $return_rs ? staticRecord::newFromArray($res) : $res;
 	}
 	
Index: inc/core/class.dc.postmedia.php
===================================================================
--- inc/core/class.dc.postmedia.php	(revision 1505)
+++ inc/core/class.dc.postmedia.php	(revision 1179)
Index: inc/core/class.dc.trackback.php
===================================================================
--- inc/core/class.dc.trackback.php	(revision 1689)
+++ inc/core/class.dc.trackback.php	(revision 1179)
@@ -14,7 +14,7 @@
 /**
 @ingroup DC_CORE
-@brief Trackbacks/Pingbacks sender and server
+@brief Trackbacks sender and server
 
-Sends and receives trackbacks/pingbacks. Also handles trackbacks/pingbacks auto discovery.
+Sends and receives trackbacks. Also handles trackbacks auto discovery.
 */
 class dcTrackback
@@ -80,56 +80,36 @@
 		}
 		
-		$ping_parts = explode('|',$url);
-		
-		# Let's walk by the trackback way
-		if (count($ping_parts) < 2) {
-			$data = array(
-				'title' => $post_title,
-				'excerpt' => $post_excerpt,
-				'url' => $post_url,
-				'blog_name' => trim(html::escapeHTML(html::clean($this->core->blog->name)))
-				//,'__debug' => false
-			);
-			
-			# Ping
-			try
-			{
-				$http = self::initHttp($url,$path);
-				$http->post($path,$data,'UTF-8');
-				$res = $http->getContent();
-			}
-			catch (Exception $e)
-			{
-				throw new Exception(__('Unable to ping URL'));
-			}
-			
-			$pattern =
-			'|<response>.*<error>(.*)</error>(.*)'.
-			'(<message>(.*)</message>(.*))?'.
-			'</response>|msU';
-			
-			if (!preg_match($pattern,$res,$match))
-			{
-				throw new Exception(sprintf(__('%s is not a ping URL'),$url));
-			}
-			
-			$ping_error = trim($match[1]);
-			$ping_msg = (!empty($match[4])) ? $match[4] : '';
-		}
-		# Damnit ! Let's play pingback
-		else {
-			try {
-				$xmlrpc = new xmlrpcClient($ping_parts[0]);
-				$res = $xmlrpc->query('pingback.ping', $post_url, $ping_parts[1]);
-				$ping_error = '0';
-			}
-			catch (xmlrpcException $e) {
-				$ping_error = $e->getCode();
-				$ping_msg = $e->getMessage();	
-			}
-			catch (Exception $e) {
-				throw new Exception(__('Unable to ping URL'));
-			}
-		}
+		$data = array(
+			'title' => $post_title,
+			'excerpt' => $post_excerpt,
+			'url' => $post_url,
+			'blog_name' => trim(html::escapeHTML(html::clean($this->core->blog->name)))
+			//,'__debug' => false
+		);
+		
+		# Ping
+		try
+		{
+			$http = self::initHttp($url,$path);
+			$http->post($path,$data,'UTF-8');
+			$res = $http->getContent();
+		}
+		catch (Exception $e)
+		{
+			throw new Exception(__('Unable to ping URL'));
+		}
+		
+		$pattern =
+		'|<response>.*<error>(.*)</error>(.*)'.
+		'(<message>(.*)</message>(.*))?'.
+		'</response>|msU';
+		
+		if (!preg_match($pattern,$res,$match))
+		{
+			throw new Exception(sprintf(__('%s is not a ping URL'),$url));
+		}
+		
+		$ping_error = trim($match[1]);
+		$ping_msg = (!empty($match[4])) ? $match[4] : '';
 		
 		if ($ping_error != '0') {
@@ -146,50 +126,4 @@
 	}
 	//@}
-	
-	private function pingAlreadyDone($post_id, $from_url)
-	{
-		$params = array(
-			'post_id' => $post_id,
-			'comment_site' => $from_url,
-			'comment_trackback' => 1,
-		);
-		
-		$rs = $this->core->blog->getComments($params, true);
-		if ($rs && !$rs->isEmpty()) {
-			return ($rs->f(0));
-		}
-		
-		return false;
-	}
-	
-	private function addBacklink($post_id, $url, $blog_name, $title, $excerpt, &$comment)
-	{
-		if (empty($blog_name)) {
-			$blog_name = 'Anonymous blog';
-		}
-		
-		$comment =
-		"<!-- TB -->\n".
-		'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
-		'<p>'.$excerpt.'</p>';
-		
-		$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-		$cur->comment_author = (string) $blog_name;
-		$cur->comment_site = (string) $url;
-		$cur->comment_content = (string) $comment;
-		$cur->post_id = $post_id;
-		$cur->comment_trackback = 1;
-		$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
-		$cur->comment_ip = http::realIP();
-		
-		# --BEHAVIOR-- publicBeforeTrackbackCreate
-		$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
-		if ($cur->post_id) {
-			$comment_id = $this->core->blog->addComment($cur);
-			
-			# --BEHAVIOR-- publicAfterTrackbackCreate
-			$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
-		}
-	}
 	
 	/// @name Receive trackbacks
@@ -222,5 +156,5 @@
 		$charset = '';
 		$comment = '';
-				
+		
 		$err = false;
 		$msg = '';
@@ -255,10 +189,4 @@
 				$msg = 'Trackbacks are not allowed for this post or weblog.';
 			}
-
-			$url = trim(html::clean($url));
-			if ($this->pingAlreadyDone($post->post_id, $url)) {
-				$err = true;
-				$msg = 'The trackback has already been registered';
-			}
 		}
 		
@@ -268,5 +196,8 @@
 			
 			if (!$charset) {
-				$charset = self::detectCharset($title.' '.$excerpt.' '.$blog_name);
+				$charset = mb_detect_encoding($title.' '.$excerpt.' '.$blog_name,
+				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
+				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
+				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
 			}
 			
@@ -293,7 +224,34 @@
 			$blog_name = text::cutString($blog_name,60);
 			
+			$url = trim(html::clean($url));
+			
+			if (!$blog_name) {
+				$blog_name = 'Anonymous blog';
+			}
+			
+			$comment =
+			"<!-- TB -->\n".
+			'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
+			'<p>'.$excerpt.'</p>';
+			
+			$cur = $this->core->con->openCursor($this->core->prefix.'comment');
+			$cur->comment_author = (string) $blog_name;
+			$cur->comment_site = (string) $url;
+			$cur->comment_content = (string) $comment;
+			$cur->post_id = $post_id;
+			$cur->comment_trackback = 1;
+			$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
+			$cur->comment_ip = http::realIP();
+			
 			try
 			{
-				$this->addBacklink($post_id, $url, $blog_name, $title, $excerpt, $comment);
+				# --BEHAVIOR-- publicBeforeTrackbackCreate
+				$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
+				if ($cur->post_id) {
+					$comment_id = $this->core->blog->addComment($cur);
+					
+					# --BEHAVIOR-- publicAfterTrackbackCreate
+					$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
+				}
 			}
 			catch (Exception $e)
@@ -303,4 +261,15 @@
 			}
 		}
+		
+		
+		$debug_trace =
+		"  <debug>\n".
+		'    <title>'.$title."</title>\n".
+		'    <excerpt>'.$excerpt."</excerpt>\n".
+		'    <url>'.$url."</url>\n".
+		'    <blog_name>'.$blog_name."</blog_name>\n".
+		'    <charset>'.$charset."</charset>\n".
+		'    <comment>'.$comment."</comment>\n".
+		"  </debug>\n";
 		
 		$resp =
@@ -314,143 +283,8 @@
 		
 		if (!empty($_POST['__debug'])) {
-			$resp .= 
-			"  <debug>\n".
-			'    <title>'.$title."</title>\n".
-			'    <excerpt>'.$excerpt."</excerpt>\n".
-			'    <url>'.$url."</url>\n".
-			'    <blog_name>'.$blog_name."</blog_name>\n".
-			'    <charset>'.$charset."</charset>\n".
-			'    <comment>'.$comment."</comment>\n".
-			"  </debug>\n";
+			$resp .= $debug_trace;
 		}
 		
 		echo	$resp."</response>";
-	}
-	//@}
-
-	/// @name Receive pingbacks
-	//@{
-	/**
-	Receives a pingback and insert it as a comment of given post.
-	
-	@param	from_url		<b>string</b>		Source URL
-	@param	to_url			<b>string</b>		Target URL
-	*/
-	public function receive_pb($from_url, $to_url)
-	{
-		$reg = '!^'.preg_quote($this->core->blog->url).'(.*)!';
-		$type = $args = $next = '';
-		
-		# Are you dumb?
-		if (!preg_match($reg, $to_url, $m)) {
-			throw new Exception(__('Any chance you ping one of my contents? No? Really?'), 0);
-		}
-		
-		# Does the targeted URL look like a registered post type? 
-		$url_part = $m[1];
-		$p_type = '';
-		$post_types = $this->core->getPostTypes();
-		foreach ($post_types as $k => $v) {
-			$reg = '!^'.preg_quote(str_replace('%s', '', $v['public_url'])).'(.*)!';
-			if (preg_match($reg, $url_part, $n)) {
-				$p_type = $k;
-				$post_url = $n[1];
-				break;
-			}
-		}
-		
-		if (empty($p_type)) {
-			throw new Exception(__('Sorry but you can not ping this type of content.'), 33);
-		}
-
-		# Time to see if we've got a winner...
-		$params = array(
-			'post_type' => $p_type,
-			'post_url' => $post_url,
-		);
-		$posts = $this->core->blog->getPosts($params);
-		
-		# Missed! 
-		if ($posts->isEmpty()) {
-			throw new Exception(__('Oops. Kinda "not found" stuff. Please check the target URL twice.'), 33);
-		}
-		
-		# Nice try. But, sorry, no.
-		if (!$posts->trackbacksActive()) {
-			throw new Exception(__('Sorry, dude. This entry does not accept pingback at the moment.'), 33);
-		}
-
-		if ($this->pingAlreadyDone($posts->post_id, $from_url)) {
-			throw new Exception(__('Don\'t repeat yourself, please.'), 48);
-		}
-		
-		# OK. We've found our champion. Time to check the remote part.
-		try {
-			$http = self::initHttp($from_url, $from_path);
-			
-			# First round : just to be sure the ping comes from an acceptable resource type.
-			$http->setHeadersOnly(true);
-			$http->get($from_path);
-			$c_type = explode(';', $http->getHeader('content-type'));
-
-			# Bad luck. Bye, bye...
-			if (!in_array($c_type[0],array('text/html', 'application/xhtml+xml'))) {
-				throw new Exception(__('Your source URL does not look like a supported content type. Sorry. Bye, bye!'), 0);
-			}
-			
-			# Second round : let's go fetch and parse the remote content
-			$http->setHeadersOnly(false);
-			$http->get($from_path);
-			$remote_content = $http->getContent();
-
-			$charset = self::getCharsetFromRequest($http->getHeader('content-type'));
-
-			if (!$charset) {
-				$charset = self::detectCharset($remote_content);
-			}
-			
-			if (strtolower($charset) != 'utf-8') {
-				$remote_content = iconv($charset,'UTF-8',$remote_content);
-			}
-			
-			# We want a title...
-			if (!preg_match('!<title>([^<].*?)</title>!mis', $remote_content, $m)) {
-				throw new Exception(__('Where\'s your title?'), 0);
-			}
-			$title = trim(html::clean($m[1]));
-			$title = html::decodeEntities($title);
-			$title = html::escapeHTML($title);
-			$title = text::cutString($title,60);
-			
-			preg_match('!<body[^>]*?>(.*)?</body>!msi', $remote_content, $m);
-			$source = $m[1];
-			$source = preg_replace('![\r\n\s]+!ms',' ',$source);
-			$source = preg_replace( "/<\/*(h\d|p|th|td|li|dt|dd|pre|caption|input|textarea|button)[^>]*>/", "\n\n", $source );
-			$source = strip_tags($source, '<a>');
-			$source = explode("\n\n",$source);
-			
-			$excerpt = '';
-			foreach ($source as $line) {
-				if (strpos($line, $to_url) !== false) {
-					if (preg_match("!<a[^>]+?".$to_url."[^>]*>([^>]+?)</a>!", $line, $m)) {
-						$excerpt = strip_tags($line);
-						break;
-					}
-				}
-			}
-			if ($excerpt) {
-				$excerpt = '(&#8230;) '.text::cutString(html::escapeHTML($excerpt),200).' (&#8230;)';
-			}
-			else {
-				$excerpt = '(&#8230;)';
-			}
-
-			$this->addBacklink($posts->post_id, $from_url, '', $title, $excerpt, $comment);
-		}
-		catch (Exception $e) {
-			throw new Exception(__('Sorry, an internal problem has occured.'), 0);
-		}
-		
-		return __('Thanks, mate. It was a pleasure.');
 	}
 	//@}
@@ -467,12 +301,9 @@
 	}
 	
-	private static function getCharsetFromRequest($header = '')
-	{
-		if (!$header && isset($_SERVER['CONTENT_TYPE'])) {
-			$header = $_SERVER['CONTENT_TYPE'];
-		}
-		
-		if ($header) {
-			if (preg_match('|charset=([a-zA-Z0-9-]+)|',$header,$m)) {
+	private static function getCharsetFromRequest()
+	{
+		if (isset($_SERVER['CONTENT_TYPE']))
+		{
+			if (preg_match('|charset=([a-zA-Z0-9-]+)|',$_SERVER['CONTENT_TYPE'],$m)) {
 				return $m[1];
 			}
@@ -481,13 +312,5 @@
 		return null;
 	}
-
-	private static function detectCharset($string)
-	{
-		return mb_detect_encoding($remote_content,
-				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
-				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
-				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
-	}
-		
+	
 	/// @name Trackbacks auto discovery
 	//@{
@@ -523,5 +346,5 @@
 			for ($i = 0; $i<count($match); $i++)
 			{
-				if (preg_match('/href="((https?:\/)?\/[^"]+)"/ms', $match[$i][1], $matches)) {
+				if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) {
 					$res[$matches[1]] = 1;
 				}
@@ -535,5 +358,5 @@
 			for ($i = 0; $i<count($match); $i++)
 			{
-				if (preg_match('/cite="((https?:\/)?\/[^"]+)"/ms', $match[$i][2], $matches)) {
+				if (preg_match('/cite="(http:\/\/[^"]+)"/ms', $match[$i][2], $matches)) {
 					$res[$matches[1]] = 1;
 				}
@@ -546,8 +369,4 @@
 	private function getPingURL($url)
 	{
-		if (strpos($url,'/') === 0) {
-			$url = http::getHost().$url;
-		}
-		
 		try
 		{
@@ -555,5 +374,4 @@
 			$http->get($path);
 			$page_content = $http->getContent();
-			$pb_url = $http->getHeader('x-pingback');
 		}
 		catch (Exception $e)
@@ -562,20 +380,4 @@
 		}
 		
-		# If we've got a X-Pingback header and it's a valid URL, it will be enough
-		if ($pb_url && filter_var($pb_url,FILTER_VALIDATE_URL) && preg_match('!^https?:!',$pb_url)) {
-			return $pb_url.'|'.$url;
-		}
-		
-		# No X-Pingback header. A link rel=pingback, maybe ?
-		$pattern_pingback = '!<link rel="pingback" href="(.*?)"( /)?>!msi';
-		
-		if (preg_match($pattern_pingback,$page_content,$m)) {
-			$pb_url = $m[1];
-			if (filter_var($pb_url,FILTER_VALIDATE_URL) && preg_match('!^https?:!',$pb_url)) {
-				return $pb_url.'|'.$url;
-			}
-		}
-
-		# No pingback ? OK, let's check for a trackback data chunk...
 		$pattern_rdf =
 		'/<rdf:RDF.*?>.*?'.
@@ -586,12 +388,9 @@
 		preg_match_all($pattern_rdf,$page_content,$rdf_all,PREG_SET_ORDER);
 		
-		$url_path = parse_url($url, PHP_URL_PATH);
-		$sanitized_url = str_replace($url_path, html::sanitizeURL($url_path), $url);
-		
 		for ($i=0; $i<count($rdf_all); $i++)
 		{
 			$rdf = $rdf_all[$i][1];
-			if (preg_match('/dc:identifier="'.preg_quote($url,'/').'"/msi',$rdf) ||
-				preg_match('/dc:identifier="'.preg_quote($sanitized_url,'/').'"/msi',$rdf)) {
+			
+			if (preg_match('/dc:identifier="'.preg_quote($url,'/').'"/msi',$rdf)) {
 				if (preg_match('/trackback:ping="(.*?)"/msi',$rdf,$tb_link)) {
 					return $tb_link[1];
Index: inc/core/class.dc.update.php
===================================================================
--- inc/core/class.dc.update.php	(revision 1280)
+++ inc/core/class.dc.update.php	(revision 1231)
@@ -32,4 +32,5 @@
 	
 	protected $cache_ttl = '-6 hours';
+	protected $nocache_ttl = '-2 mins';
 	protected $forced_files = array();
 	
@@ -55,9 +56,10 @@
 	 * 
 	 * @param version		string	Current version to compare
+	 * @param nocache		boolean	Force checking
 	 * @return string				Latest version if available
 	 */
-	public function check($version)
-	{
-		$this->getVersionInfo();
+	public function check($version, $nocache=false)
+	{
+		$this->getVersionInfo($nocache);
 		$v = $this->getVersion();
 		if ($v && version_compare($version,$v,'<')) {
@@ -68,8 +70,13 @@
 	}
 	
-	public function getVersionInfo()
-	{
+	public function getVersionInfo($nocache=false)
+	{
+		# Check minimum time without cache (prevents from server flood)
+		if ($nocache && is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->nocache_ttl)) {
+			$nocache = false;
+		}
+		
 		# Check cached file
-		if (is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->cache_ttl))
+		if (is_readable($this->cache_file) && filemtime($this->cache_file) > strtotime($this->cache_ttl) && !$nocache)
 		{
 			$c = @file_get_contents($this->cache_file);
Index: inc/core/class.dc.xmlrpc.php
===================================================================
--- inc/core/class.dc.xmlrpc.php	(revision 1688)
+++ inc/core/class.dc.xmlrpc.php	(revision 1179)
@@ -214,9 +214,4 @@
 			array('array','integer','string','string'),
 			'Retrieve all of the comment statuses.');
-			
-		# Pingback support
-		$this->addCallback('pingback.ping',array($this,'pingback_ping'),
-			array('string', 'string', 'string'),
-			'Notify a link to a post.');
 	}
 	
@@ -275,5 +270,5 @@
 	}
 	
-	private function setBlog($bypass = false)
+	private function setBlog()
 	{
 		if (!$this->blog_id) {
@@ -293,7 +288,6 @@
 		}
 		
-		if (!$bypass &&
-			(!$this->core->blog->settings->system->enable_xmlrpc ||
-			!$this->core->auth->check('usage,contentadmin',$this->core->blog->id))) {
+		if (!$this->core->blog->settings->system->enable_xmlrpc ||
+		!$this->core->auth->check('usage,contentadmin',$this->core->blog->id)) {
 			$this->core->blog = null;
 			throw new Exception('Not enough permissions on this blog.');
@@ -1635,27 +1629,4 @@
 		);
 	}
-
-	/* Pingback support
-	--------------------------------------------------- */
-	public function pingback_ping($from_url, $to_url)
-	{
-		# Come on, buddy! Don't make me waste time with this kind of silliness...
-		if (!(filter_var($from_url, FILTER_VALIDATE_URL) && preg_match('!^https?://!',$from_url))) {
-			throw new Exception(__('No valid source URL provided? Try again!'), 0);
-		}
-
-		if (!(filter_var($to_url, FILTER_VALIDATE_URL) && preg_match('!^https?://!',$to_url))) {
-			throw new Exception(__('No valid target URL provided? Try again!'), 0);
-		}
-
-		if (html::sanitizeURL(urldecode($from_url)) == html::sanitizeURL(urldecode($to_url))) {
-			throw new Exception(__('LOL!'), 0);
-		}
-		
-		# Time to get things done...
-		$this->setBlog(true);
-		$tb = new dcTrackback($this->core);
-		return $tb->receive_pb($from_url, $to_url);
-	}
 }
 ?>
Index: inc/dbschema/upgrade.php
===================================================================
--- inc/dbschema/upgrade.php	(revision 1785)
+++ inc/dbschema/upgrade.php	(revision 1205)
@@ -152,16 +152,26 @@
 					'images/menu/edit.png','images/menu/edit-b.png',
 					'usage,contentadmin',null,'menu-new-post');
-				$init_fav['newpage'] = 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);
-				$init_fav['media'] = array('media','Media manager','media.php',
-					'images/menu/media.png','images/menu/media-b.png',
-					'media,media_admin',null,null);
-				$init_fav['widgets'] = array('widgets','Presentation widgets','plugin.php?p=widgets',
-					'index.php?pf=widgets/icon.png','index.php?pf=widgets/icon-big.png',
+				$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',
+					'images/menu/comments.png','images/menu/comments-b.png',
+					'usage,contentadmin',null,null);
+				$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',
+					'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',
 					'images/menu/themes.png','images/menu/blog-theme-b.png',
 					'admin',null,null);
+
+				$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',
+					'index.php?pf=blogroll/icon-small.png','index.php?pf=blogroll/icon.png',
+					'usage,contentadmin',null,null);
 
 				$count = 0;
@@ -326,17 +336,8 @@
 			}
 
-			if (version_compare($version,'2.5.1','<='))
+			if (version_compare($version, '2.5.1', '<='))
 			{
 				// Flash enhanced upload no longer needed
 				@unlink(DC_ROOT.'/'.'inc/swf/swfupload.swf');
-			}
-
-			if (version_compare($version,'2.6','<='))
-			{
-				// README has been replaced by README.md and CONTRIBUTING.md
-				@unlink(DC_ROOT.'/'.'README');
-
-				// trackbacks are now merged into posts
-				@unlink(DC_ROOT.'/'.'admin/trackbacks.php');
 			}
 			
Index: inc/load_plugin_file.php
===================================================================
--- inc/load_plugin_file.php	(revision 1280)
+++ inc/load_plugin_file.php	(revision 1241)
@@ -86,5 +86,5 @@
 }
 
-http::$cache_max_age = 7200;
+http::$cache_max_age = (!defined('DC_CACHE_MAX_AGE') ? 604800 : DC_CACHE_MAX_AGE);
 http::cache(array_merge(array($PF),get_included_files()));
 
Index: inc/prepend.php
===================================================================
--- inc/prepend.php	(revision 1796)
+++ inc/prepend.php	(revision 1804)
@@ -59,11 +59,8 @@
 $__autoload['adminCommentList']		= dirname(__FILE__).'/admin/lib.pager.php';
 $__autoload['adminUserList']			= dirname(__FILE__).'/admin/lib.pager.php';
-$__autoload['dcAdminCombos']			= dirname(__FILE__).'/admin/lib.admincombos.php';
 
 $__autoload['dcTemplate']			= dirname(__FILE__).'/public/class.dc.template.php';
 $__autoload['context']				= dirname(__FILE__).'/public/lib.tpl.context.php';
 $__autoload['dcUrlHandlers']			= dirname(__FILE__).'/public/lib.urlhandlers.php';
-$__autoload['dcPostsActionSet']			= dirname(__FILE__).'/admin/actions/class.dcactionposts.php';
-$__autoload['dcActionSet']			= dirname(__FILE__).'/admin/actions/class.dcaction.php';
 
 # Clearbricks extensions
@@ -126,5 +123,5 @@
 # Constants
 define('DC_ROOT',path::real(dirname(__FILE__).'/..'));
-define('DC_VERSION','2.6-dev');
+define('DC_VERSION','2.5.3');
 define('DC_DIGESTS',dirname(__FILE__).'/digests');
 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales');
@@ -223,5 +220,5 @@
 $core->url->register('xmlrpc','xmlrpc','^xmlrpc/(.+)$',array('dcUrlHandlers','xmlrpc'));
 
-$core->setPostType('post','post.php?id=%d',$core->url->getURLFor('post','%s'),'Posts');
+$core->setPostType('post','post.php?id=%d',$core->url->getURLFor('post','%s'));
 
 # Store upload_max_filesize in bytes
Index: inc/public/class.dc.template.php
===================================================================
--- inc/public/class.dc.template.php	(revision 1674)
+++ inc/public/class.dc.template.php	(revision 1249)
@@ -67,8 +67,8 @@
 		$this->addValue('BlogLanguage',array($this,'BlogLanguage'));
 		$this->addValue('BlogThemeURL',array($this,'BlogThemeURL'));
+		$this->addValue('BlogParentThemeURL',array($this,'BlogParentThemeURL'));
 		$this->addValue('BlogUpdateDate',array($this,'BlogUpdateDate'));
 		$this->addValue('BlogID',array($this,'BlogID'));
 		$this->addValue('BlogURL',array($this,'BlogURL'));
-		$this->addValue('BlogXMLRPCURL',array($this,'BlogXMLRPCURL'));
 		$this->addValue('BlogPublicURL',array($this,'BlogPublicURL'));
 		$this->addValue('BlogQmarkURL',array($this,'BlogQmarkURL'));
@@ -840,5 +840,5 @@
 	
 	/*dtd
-	<!ELEMENT tpl:BlogThemeURL - O -- Blog's current Themei URL -->
+	<!ELEMENT tpl:BlogThemeURL - O -- Blog's current Theme URL -->
 	*/
 	public function BlogThemeURL($attr)
@@ -846,4 +846,14 @@
 		$f = $this->getFilters($attr);
 		return '<?php echo '.sprintf($f,'$core->blog->settings->system->themes_url."/".$core->blog->settings->system->theme').'; ?>';
+	}
+	
+	/*dtd
+	<!ELEMENT tpl:BlogParentThemeURL - O -- Blog's current Theme's parent URL -->
+	*/
+	public function BlogParentThemeURL($attr)
+	{
+		$f = $this->getFilters($attr);
+		$parent = '$core->themes->moduleInfo($core->blog->settings->system->theme,\'parent\')';
+		return '<?php echo '.sprintf($f,'$core->blog->settings->system->themes_url."/".('."$parent".' ? '."$parent".' : $core->blog->settings->system->theme)').'; ?>';
 	}
     
@@ -907,13 +917,4 @@
 	
 	/*dtd
-	<!ELEMENT tpl:BlogXMLRPCURL - O -- Blog XML-RPC URL -->
-	*/
-	public function BlogXMLRPCURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor(\'xmlrpc\',$core->blog->id)').'; ?>';
-	}
-	
-	/*dtd
 	<!ELEMENT tpl:BlogURL - O -- Blog URL -->
 	*/
@@ -964,8 +965,4 @@
 		if (!empty($attr['level'])) {
 			$p .= "\$params['level'] = ".(integer) $attr['level'].";\n";
-		}
-
-		if (isset($attr['with_empty']) && ((boolean) $attr['with_empty'] == true)) {
-			$p .= '$params[\'without_empty\'] = false;';
 		}
 		
Index: inc/public/default-templates/post.html
===================================================================
--- inc/public/default-templates/post.html	(revision 1674)
+++ inc/public/default-templates/post.html	(revision 932)
@@ -25,5 +25,4 @@
   <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
   <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
-  <tpl:EntryIf pings_active="1"><link rel="pingback" href="{{tpl:BlogXMLRPCURL}}" /></tpl:EntryIf>
   
   <tpl:EntryNext><link rel="next" href="{{tpl:EntryURL}}"
Index: inc/public/lib.urlhandlers.php
===================================================================
--- inc/public/lib.urlhandlers.php	(revision 1674)
+++ inc/public/lib.urlhandlers.php	(revision 1179)
@@ -263,6 +263,5 @@
 			$params = new ArrayObject(array(
 				'cat_url' => $args,
-				'post_type' => 'post',
-				'without_empty' => false));
+				'post_type' => 'post'));
 			
 			$core->callBehavior('publicCategoryBeforeGetCategories',$params,$args);
@@ -480,7 +479,4 @@
 				
 				# The entry
-				if ($_ctx->posts->trackbacksActive()) {
-					header('X-Pingback: '.$core->blog->url.$core->url->getURLFor("xmlrpc",$core->blog->id));
-				}
 				self::serveDocument('post.html');
 			}
