Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 1569)
+++ inc/admin/lib.dc.page.php	(revision 1462)
@@ -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,9 +93,8 @@
 		"<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().
@@ -134,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>'.
@@ -159,7 +158,4 @@
 		}
 
-		// Display breadcrumb (if given) before any error message
-		echo $breadcrumb;
-
 		if ($core->error->flag()) {
 			echo
@@ -180,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="q" class="hidden">'.__('Search:').' </label>'.form::field('q',30,255,'').
-		'<input type="submit" value="'.__('OK').'" /></p>'.
-		'</form>';
+		'<div id="main-menu">'."\n";
 
 		foreach ($menu as $k => $v) {
@@ -202,5 +193,5 @@
 		echo
 		'</div>'."\n".		// End of #main-menu
-		'<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logos/w-dotclear90.png" alt="'.$text.'" /></a></div>'."\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
 
@@ -213,5 +204,5 @@
 	}
 
-	public static function openPopup($title='',$head='',$breadcrumb='')
+	public static function openPopup($title='', $head='')
 	{
 		global $core;
@@ -225,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".
@@ -251,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
@@ -257,7 +247,4 @@
 		'<div id="main">'."\n".
 		'<div id="content">'."\n";
-
-		// display breadcrumb if given
-		echo $breadcrumb;
 
 		if ($core->error->flag()) {
@@ -279,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;
@@ -304,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>' : '');
@@ -312,9 +280,4 @@
 		}
 		return $res;
-	}
-
-	public static function success($msg,$timestamp=true,$div=false,$echo=true)
-	{
-		self::message($msg,$timestamp,$div,$echo,"success");
 	}
 
@@ -370,10 +333,4 @@
 	{
 		$args = func_get_args();
-
-		$args = new ArrayObject($args);
-
-		# --BEHAVIOR-- adminPageHelpBlock
-		$GLOBALS['core']->callBehavior('adminPageHelpBlock',$args);
-
 		if (empty($args)) {
 			return;
@@ -454,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')).
@@ -464,5 +417,5 @@
 			__('select all')).
 		self::jsVar('dotclear.msg.invert_sel',
-			__('Invert selection')).
+			__('invert selection')).
 		self::jsVar('dotclear.msg.website',
 			__('Web site:')).
@@ -481,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?')).
@@ -529,4 +478,6 @@
 		self::jsVar('dotclear.msg.confirm_change_post_format',
 			__('You have unsaved changes. Switch post format will loose these changes. Proceed anyway?')).
+		self::jsVar('dotclear.msg.confirm_change_post_format_noconvert',
+			__("Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?")).
 		self::jsVar('dotclear.msg.load_enhanced_uploader',
 			__('Loading enhanced uploader, please wait.')).
@@ -538,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";
@@ -741,4 +692,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".
@@ -757,6 +761,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.')).
@@ -765,16 +767,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 1508)
+++ inc/admin/lib.pager.php	(revision 1364)
@@ -42,13 +42,8 @@
 			$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"><tr>'.
-			'<th colspan="2" class="first">'.__('Title').'</th>'.
+			'<th colspan="2">'.__('Title').'</th>'.
 			'<th>'.__('Date').'</th>'.
 			'<th>'.__('Category').'</th>'.
@@ -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,5 +128,5 @@
 		$res .=
 		'<td class="nowrap">'.
-		form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'.
+		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>'.
@@ -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');
 		}
 		
@@ -260,10 +255,10 @@
 			$html_block =
 			'<table><tr>'.
-			'<th colspan="2" class="first">'.__('Author').'</th>'.
+			'<th colspan="2">'.__('Title').'</th>'.
 			'<th>'.__('Date').'</th>'.
-			'<th>'.__('Entry title').'</th>'.
+			'<th>'.__('Author').'</th>'.
 			'<th>'.__('Type').'</th>'.
 			'<th>'.__('Status').'</th>'.
-			'<th>'.__('Edit').'</th>'.
+			'<th>&nbsp;</th>'.
 			'</tr>%s</table>';
 			
@@ -272,5 +267,5 @@
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -285,5 +280,5 @@
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
@@ -311,20 +306,20 @@
 		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) > 50) {
-			$post_title = mb_strcut($post_title,0,47).'...';
+				$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).'...';
 		}
 		
@@ -335,13 +330,13 @@
 		'<td class="nowrap">'.
 		form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'</td>'.
-		'<td class="maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></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="'.$post_url.'">'.
-		html::escapeHTML($post_title).'</a>'.
-		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</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').'" /> '.__('Edit').'</a></td>';
+		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>';
 		
 		$res .= '</tr>';
@@ -379,5 +374,5 @@
 			}
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 			
 			$blocks = explode('%s',$html_block);
@@ -392,5 +387,5 @@
 			echo $blocks[1];
 			
-			echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>';
+			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
 		}
 	}
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 1337)
+++ inc/admin/prepend.php	(revision 1179)
@@ -284,5 +284,5 @@
 	# Set menu titles
 	
-	$_menu['System']->title = __('System settings');
+	$_menu['System']->title = __('System');
 	$_menu['Blog']->title = __('Blog');
 	$_menu['Plugins']->title = __('Plugins');
Index: inc/config.php.in
===================================================================
--- inc/config.php.in	(revision 1179)
+++ inc/config.php.in	(revision 1535)
@@ -50,5 +50,5 @@
 
 // Template cache directory
-define('DC_TPL_CACHE',dirname(__FILE__).'/../cache');
+define('DC_TPL_CACHE',path::real(dirname(__FILE__).'/..').'/cache');
 
 
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 1532)
+++ 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
@@ -203,75 +203,64 @@
 	@param	ids		<b>mixed</b>		Comment(s) ID(s)
 	@param	del		<b>boolean</b>		If comment is delete, set this to true
-	*/
-	public function triggerComments($ids,$del=false)
-	{
-		$co_ids = dcUtils::cleanIds($ids);
-		
-		# a) Retrieve posts affected by comments edition
+	@param	affected_posts		<b>mixed</b>		Posts(s) ID(s)
+	*/
+	public function triggerComments($ids, $del=false, $affected_posts=null)
+	{
+		$comments_ids = dcUtils::cleanIds($ids);
+		
+		# Get posts affected by comments edition
+		if (empty($affected_posts)) {
+			$strReq = 
+				'SELECT post_id '.
+				'FROM '.$this->prefix.'comment '.
+				'WHERE comment_id'.$this->con->in($comments_ids).
+				'GROUP BY post_id';
+			
+			$rs = $this->con->select($strReq);
+			
+			$affected_posts = array();
+			while ($rs->fetch()) {
+				$affected_posts[] = (integer) $rs->post_id;
+			}
+		}
+		
+		if (!is_array($affected_posts) || empty($affected_posts)) {
+			return;
+		}
+		
+		# Count number of comments if exists for affected posts
 		$strReq = 
-			'SELECT post_id, comment_trackback '.
-			'FROM '.$this->prefix.'comment '.
-			'WHERE comment_id'.$this->con->in($co_ids).
-			'GROUP BY post_id,comment_trackback';
-		
-		$rs = $this->con->select($strReq);
-		
-		$a_ids = $a_tbs = array();
-		while ($rs->fetch()) {
-			$a_ids[] = (integer) $rs->post_id;
-			$a_tbs[] = (integer) $rs->comment_trackback;
-		}
-		
-		# b) Count comments of each posts previously retrieved
-		# Note that this does not return posts without comment
-		$strReq = 
-			'SELECT post_id, COUNT(post_id) AS nb_comment,comment_trackback '.
+			'SELECT post_id, COUNT(post_id) AS nb_comment, comment_trackback '.
 			'FROM '.$this->prefix.'comment '.
 			'WHERE comment_status = 1 '.
-			(count($a_ids) > 0 ? 'AND post_id'.$this->con->in($a_ids) : ' ');
-		
-		if ($del) {
-			$strReq .= 
-				'AND comment_id NOT'.$this->con->in($co_ids);
-		}
-		
-		$strReq .= 
+			'AND post_id'.$this->con->in($affected_posts).
 			'GROUP BY post_id,comment_trackback';
 		
 		$rs = $this->con->select($strReq);
 		
-		$b_ids = $b_tbs = $b_nbs = array();
+		$posts = array();
 		while ($rs->fetch()) {
-			$b_ids[] = (integer) $rs->post_id;
-			$b_tbs[] = (integer) $rs->comment_trackback;
-			$b_nbs[] = (integer) $rs->nb_comment;
-		}
-		
-		# c) Update comments numbers on posts
-		# This compare previous requests to update also posts without comment
+			if ($rs->comment_trackback) {
+				$posts[$rs->post_id]['trackback'] = $rs->nb_comment;
+			} else {
+				$posts[$rs->post_id]['comment'] = $rs->nb_comment;
+			}
+		}
+		
+		# Update number of comments on affected posts
 		$cur = $this->con->openCursor($this->prefix.'post');
-		
-		foreach($a_ids as $a_key => $a_id)
-		{
-			$nb_comment = $nb_trackback = 0;
-			foreach($b_ids as $b_key => $b_id)
-			{
-				if ($a_id != $b_id || $a_tbs[$a_key] != $b_tbs[$b_key]) {
-					continue;
-				}
-				
-				if ($b_tbs[$b_key]) {
-					$nb_trackback = $b_nbs[$b_key];
-				} else {
-					$nb_comment = $b_nbs[$b_key];
-				}
-			}
-			
-			if ($a_tbs[$a_key]) {
-				$cur->nb_trackback = $nb_trackback;
+		foreach($affected_posts as $post_id)
+		{
+			$cur->clean();
+			
+			if (!array_key_exists($post_id,$posts)) {
+				$cur->nb_trackback = 0;
+				$cur->nb_comment = 0;
 			} else {
-				$cur->nb_comment = $nb_comment;
-			}
-			$cur->update('WHERE post_id = '.$a_id);
+				$cur->nb_trackback = empty($posts[$post_id]['trackback']) ? 0 : $posts[$post_id]['trackback'];
+				$cur->nb_comment = empty($posts[$post_id]['comment']) ? 0 : $posts[$post_id]['comment'];
+			}
+			
+			$cur->update('WHERE post_id = '.$post_id);
 		}
 	}
@@ -505,5 +494,11 @@
 		$this->core->callBehavior('coreBeforeCategoryCreate',$this,$cur);
 		
-		$this->categories()->addNode($cur,$parent);
+		$id = $this->categories()->addNode($cur,$parent);
+		# Update category's cursor
+		$rs = $this->getCategory($id);
+		if (!$rs->isEmpty()) {
+			$cur->cat_lft = $rs->cat_lft;
+			$cur->cat_rgt = $rs->cat_rgt;
+		}
 		
 		# --BEHAVIOR-- coreAfterCategoryCreate
@@ -555,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();
-        }
 	
 	/**
@@ -735,5 +717,5 @@
 	- no_content: Don't retrieve entry content (excerpt and content)
 	- post_type: Get only entries with given type (default "post", array for many types and '' for no type)
-	- post_id: (integer) Get entry with given post_id
+	- post_id: (integer or array) Get entry with given post_id
 	- post_url: Get entry with given post_url field
 	- user_id: (integer) Get entries belonging to given user ID
@@ -755,4 +737,5 @@
 	- limit: Limit parameter
 	- sql_only : return the sql request instead of results. Only ids are selected
+	- exclude_post_id : (integer or array) Exclude entries with given post_id
 	
 	Please note that on every cat_id or cat_url, you can add ?not to exclude
@@ -848,4 +831,13 @@
 			}
 			$strReq .= 'AND P.post_id '.$this->con->in($params['post_id']);
+		}
+		
+		if (isset($params['exclude_post_id']) && $params['exclude_post_id'] !== '') {
+			if (is_array($params['exclude_post_id'])) {
+				array_walk($params['exclude_post_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}'));
+			} else {
+				$params['exclude_post_id'] = array((integer) $params['exclude_post_id']);
+			}
+			$strReq .= 'AND P.post_id NOT '.$this->con->in($params['exclude_post_id']);
 		}
 		
@@ -2231,6 +2223,20 @@
 		$co_ids = dcUtils::cleanIds($ids);
 		
-		if (empty($ids)) {
+		if (empty($co_ids)) {
 			throw new Exception(__('No such comment ID'));
+		}
+		
+		# Retrieve posts affected by comments edition
+		$affected_posts = array();
+		$strReq =
+			'SELECT post_id '.
+			'FROM '.$this->prefix.'comment '.
+			'WHERE comment_id'.$this->con->in($co_ids).
+			'GROUP BY post_id';
+		
+		$rs = $this->con->select($strReq);
+		
+		while ($rs->fetch()) {
+			$affected_posts[] = (integer) $rs->post_id;
 		}
 		
@@ -2262,5 +2268,5 @@
 		
 		$this->con->execute($strReq);
-		$this->triggerComments($co_ids,true);
+		$this->triggerComments($co_ids, true, $affected_posts);
 		$this->triggerBlog();
 	}
@@ -2317,6 +2323,8 @@
 		
 		if ($cur->comment_site !== null && $cur->comment_site != '') {
-			if (!preg_match('|^http(s?)://|',$cur->comment_site)) {
+			if (!preg_match('|^http(s?)://|i',$cur->comment_site, $matches)) {
 				$cur->comment_site = 'http://'.$cur->comment_site;
+			}else{
+				$cur->comment_site = strtolower($matches[0]).substr($cur->comment_site, strlen($matches[0]));
 			}
 		}
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.media.php
===================================================================
--- inc/core/class.dc.media.php	(revision 1468)
+++ inc/core/class.dc.media.php	(revision 1381)
@@ -499,7 +499,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(
@@ -517,9 +518,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.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/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 1468)
+++ inc/prepend.php	(revision 1352)
@@ -123,5 +123,5 @@
 # Constants
 define('DC_ROOT',path::real(dirname(__FILE__).'/..'));
-define('DC_VERSION','2.6-dev');
+define('DC_VERSION','2.5.3-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 1280)
+++ inc/public/class.dc.template.php	(revision 1249)
@@ -67,4 +67,5 @@
 		$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'));
@@ -839,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)
@@ -845,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)').'; ?>';
 	}
     
Index: inc/public/lib.tpl.context.php
===================================================================
--- inc/public/lib.tpl.context.php	(revision 1179)
+++ inc/public/lib.tpl.context.php	(revision 1537)
@@ -416,62 +416,67 @@
 		global $core, $_ctx;
 		
-		$media = new dcMedia($core);
-		$sizes = implode('|',array_keys($media->thumb_sizes)).'|o';
-		if (!preg_match('/^'.$sizes.'$/',$size)) {
-			$size = 's';
-		}
-		$p_url = $core->blog->settings->system->public_url;
-		$p_site = preg_replace('#^(.+?//.+?)/(.*)$#','$1',$core->blog->url);
-		$p_root = $core->blog->public_path;
-		
-		$pattern = '(?:'.preg_quote($p_site,'/').')?'.preg_quote($p_url,'/');
-		$pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg|jpeg|gif|png))"[^>]+/msui',$pattern);
-		
-		$src = '';
-		$alt = '';
-		
-		# We first look in post content
-		if (!$cat_only && $_ctx->posts)
-		{
-			$subject = ($content_only ? '' : $_ctx->posts->post_excerpt_xhtml).$_ctx->posts->post_content_xhtml;
-			if (preg_match_all($pattern,$subject,$m) > 0)
+		try {
+			$media = new dcMedia($core);
+			$sizes = implode('|',array_keys($media->thumb_sizes)).'|o';
+			if (!preg_match('/^'.$sizes.'$/',$size)) {
+				$size = 's';
+			}
+			$p_url = $core->blog->settings->system->public_url;
+			$p_site = preg_replace('#^(.+?//.+?)/(.*)$#','$1',$core->blog->url);
+			$p_root = $core->blog->public_path;
+			
+			$pattern = '(?:'.preg_quote($p_site,'/').')?'.preg_quote($p_url,'/');
+			$pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg|jpeg|gif|png))"[^>]+/msui',$pattern);
+			
+			$src = '';
+			$alt = '';
+			
+			# We first look in post content
+			if (!$cat_only && $_ctx->posts)
 			{
-				foreach ($m[1] as $i => $img) {
-					if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) {
-						$dirname = str_replace('\\', '/', dirname($img)); 
-						$src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src;
-						if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) {
-							$alt = $malt[1];
+				$subject = ($content_only ? '' : $_ctx->posts->post_excerpt_xhtml).$_ctx->posts->post_content_xhtml;
+				if (preg_match_all($pattern,$subject,$m) > 0)
+				{
+					foreach ($m[1] as $i => $img) {
+						if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) {
+							$dirname = str_replace('\\', '/', dirname($img)); 
+							$src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src;
+							if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) {
+								$alt = $malt[1];
+							}
+							break;
 						}
-						break;
 					}
 				}
 			}
-		}
-		
-		# No src, look in category description if available
-        if (!$src && $with_category && $_ctx->posts->cat_desc)
-        {
-			if (preg_match_all($pattern,$_ctx->posts->cat_desc,$m) > 0)
-			{
-				foreach ($m[1] as $i => $img) {
-					if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) {
-						$dirname = str_replace('\\', '/', dirname($img)); 
-						$src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src;
-						if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) {
-							$alt = $malt[1];
+			
+			# No src, look in category description if available
+	        if (!$src && $with_category && $_ctx->posts->cat_desc)
+	        {
+				if (preg_match_all($pattern,$_ctx->posts->cat_desc,$m) > 0)
+				{
+					foreach ($m[1] as $i => $img) {
+						if (($src = self::ContentFirstImageLookup($p_root,$img,$size)) !== false) {
+							$dirname = str_replace('\\', '/', dirname($img)); 
+							$src = $p_url.($dirname != '/' ? $dirname : '').'/'.$src;
+							if (preg_match('/alt="([^"]+)"/',$m[0][$i],$malt)) {
+								$alt = $malt[1];
+							}
+							break;
 						}
-						break;
 					}
-				}
-			};
-		}
-		
-		if ($src) {
-			if ($no_tag) {
-				return $src;
-			} else {
-				return '<img alt="'.$alt.'" src="'.$src.'" class="'.$class.'" />';
-			}
+				};
+			}
+			
+			if ($src) {
+				if ($no_tag) {
+					return $src;
+				} else {
+					return '<img alt="'.$alt.'" src="'.$src.'" class="'.$class.'" />';
+				}
+			}
+			
+		} catch (Exception $e) {
+			$core->error->add($e->getMessage());
 		}
 	}
@@ -485,37 +490,41 @@
 		$base = $info['base'];
 		
-		$media = new dcMedia($core);
-		$sizes = implode('|',array_keys($media->thumb_sizes));
-		if (preg_match('/^\.(.+)_('.$sizes.')$/',$base,$m)) {
-			$base = $m[1];
-		}
-		
-		$res = false;
-		if ($size != 'o' && file_exists($root.'/'.$info['dirname'].'/.'.$base.'_'.$size.'.jpg'))
-		{
-			$res = '.'.$base.'_'.$size.'.jpg';
-		}
-		else
-		{
-			$f = $root.'/'.$info['dirname'].'/'.$base;
-			if (file_exists($f.'.'.$info['extension'])) {
-				$res = $base.'.'.$info['extension'];
-			} elseif (file_exists($f.'.jpg')) {
-				$res = $base.'.jpg';
-			} elseif (file_exists($f.'.jpeg')) {
-				$res = $base.'.jpeg';
-			} elseif (file_exists($f.'.png')) {
-				$res = $base.'.png';
-			} elseif (file_exists($f.'.gif')) {
-				$res = $base.'.gif';
-			} elseif (file_exists($f.'.JPG')) {
-				$res = $base.'.JPG';
-			} elseif (file_exists($f.'.JPEG')) {
-				$res = $base.'.JPEG';
-			} elseif (file_exists($f.'.PNG')) {
-				$res = $base.'.PNG';
-			} elseif (file_exists($f.'.GIF')) {
-				$res = $base.'.GIF';
-			}
+		try {
+			$media = new dcMedia($core);
+			$sizes = implode('|',array_keys($media->thumb_sizes));
+			if (preg_match('/^\.(.+)_('.$sizes.')$/',$base,$m)) {
+				$base = $m[1];
+			}
+			
+			$res = false;
+			if ($size != 'o' && file_exists($root.'/'.$info['dirname'].'/.'.$base.'_'.$size.'.jpg'))
+			{
+				$res = '.'.$base.'_'.$size.'.jpg';
+			}
+			else
+			{
+				$f = $root.'/'.$info['dirname'].'/'.$base;
+				if (file_exists($f.'.'.$info['extension'])) {
+					$res = $base.'.'.$info['extension'];
+				} elseif (file_exists($f.'.jpg')) {
+					$res = $base.'.jpg';
+				} elseif (file_exists($f.'.jpeg')) {
+					$res = $base.'.jpeg';
+				} elseif (file_exists($f.'.png')) {
+					$res = $base.'.png';
+				} elseif (file_exists($f.'.gif')) {
+					$res = $base.'.gif';
+				} elseif (file_exists($f.'.JPG')) {
+					$res = $base.'.JPG';
+				} elseif (file_exists($f.'.JPEG')) {
+					$res = $base.'.JPEG';
+				} elseif (file_exists($f.'.PNG')) {
+					$res = $base.'.PNG';
+				} elseif (file_exists($f.'.GIF')) {
+					$res = $base.'.GIF';
+				}
+			}
+		} catch (Exception $e) {
+			$core->error->add($e->getMessage());
 		}
 		
