Index: inc/admin/actions/class.dcactioncomments.php
===================================================================
--- inc/admin/actions/class.dcactioncomments.php	(revision 2550)
+++ inc/admin/actions/class.dcactioncomments.php	(revision 2627)
@@ -89,4 +89,5 @@
 
 	protected function fetchEntries($from) {
+		$params=array();
 		if (!empty($from['comments'])) {
 			$comments = $from['comments'];
@@ -97,20 +98,19 @@
 
 			$params['sql'] = 'AND C.comment_id IN('.implode(',',$comments).') ';
+		} else {
+			$params['sql'] = 'AND 1=0 ';
+		}
 
-			if (!isset($from['full_content']) || empty($from['full_content'])) {
-				$params['no_content'] = true;
-			}
-
-			$co = $this->core->blog->getComments($params);
-			while ($co->fetch())	{
-				$this->entries[$co->comment_id] = array(
-					'title' => $co->post_title,
-					'author' => $co->comment_author
-				);
-			}
-			$this->rs = $co;
-		} else {
-			$this->rs = $this->core->con->select("SELECT blog_id FROM ".$this->core->prefix."blog WHERE false");;
+		if (!isset($from['full_content']) || empty($from['full_content'])) {
+			$params['no_content'] = true;
 		}
+		$co = $this->core->blog->getComments($params);
+		while ($co->fetch())	{
+			$this->entries[$co->comment_id] = array(
+				'title' => $co->post_title,
+				'author' => $co->comment_author
+			);
+		}
+		$this->rs = $co;
 	}
 }
Index: inc/admin/actions/class.dcactionposts.php
===================================================================
--- inc/admin/actions/class.dcactionposts.php	(revision 2494)
+++ inc/admin/actions/class.dcactionposts.php	(revision 2627)
@@ -68,4 +68,5 @@
 
 	protected function fetchEntries($from) {
+		$params = array();
 		if (!empty($from['entries']))
 		{
@@ -77,21 +78,21 @@
 
 			$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->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");;
-		}
+		} else {
+			$params['sql'] = 'AND 1=0 ';
+		}
+
+		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->entries[$posts->post_id] = $posts->post_title;
+		}
+		$this->rs = $posts;
 	}
 }
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 2614)
+++ inc/admin/lib.dc.page.php	(revision 2513)
@@ -589,5 +589,4 @@
 		'<script type="text/javascript">'."\n".
 		"//<![CDATA[\n".
-		'jsToolBar = {}, jsToolBar.prototype = { elements : {} };'."\n".
 		self::jsVar('dotclear.nonce',$GLOBALS['core']->getNonce()).
 		self::jsVar('dotclear.img_plus_src','images/expand.png').
@@ -829,8 +828,88 @@
 	}
 
-	
 	public static function jsToolBar()
 	{
-		# Deprecated but we keep this for plugins.
+		$res =
+		'<link rel="stylesheet" type="text/css" href="style/jsToolBar/jsToolBar.css" />'.
+		'<script type="text/javascript" src="js/jsToolBar/jsToolBar.js"></script>';
+
+		if (isset($GLOBALS['core']->auth) && $GLOBALS['core']->auth->getOption('enable_wysiwyg')) {
+			$res .= '<script type="text/javascript" src="js/jsToolBar/jsToolBar.wysiwyg.js"></script>';
+		}
+
+		$res .=
+		'<script type="text/javascript" src="js/jsToolBar/jsToolBar.dotclear.js"></script>'.
+		'<script type="text/javascript">'."\n".
+		"//<![CDATA[\n".
+		"jsToolBar.prototype.dialog_url = 'popup.php'; ".
+		"jsToolBar.prototype.iframe_css = '".
+		'body{'.
+		'font: 12px "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;'.
+		'color : #000;'.
+		'background: #f9f9f9;'.
+		'margin: 0;'.
+		'padding : 2px;'.
+		'border: none;'.
+		(l10n::getTextDirection($GLOBALS['_lang']) == 'rtl' ? 'direction:rtl;' : '').
+		'}'.
+		'pre, code, kbd, samp {'.
+		'font-family:"Courier New",Courier,monospace;'.
+		'font-size : 1.1em;'.
+		'}'.
+		'code {'.
+		'color : #666;'.
+		'font-weight : bold;'.
+		'}'.
+		'body > p:first-child {'.
+		'margin-top: 0;'.
+		'}'.
+		"'; ".
+		"jsToolBar.prototype.base_url = '".html::escapeJS($GLOBALS['core']->blog->host)."'; ".
+		"jsToolBar.prototype.switcher_visual_title = '".html::escapeJS(__('visual'))."'; ".
+		"jsToolBar.prototype.switcher_source_title = '".html::escapeJS(__('source'))."'; ".
+		"jsToolBar.prototype.legend_msg = '".
+		html::escapeJS(__('You can use the following shortcuts to format your text.'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.none = '".html::escapeJS(__('-- none --'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.nonebis = '".html::escapeJS(__('-- block format --'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.p = '".html::escapeJS(__('Paragraph'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h1 = '".html::escapeJS(__('Level 1 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h2 = '".html::escapeJS(__('Level 2 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h3 = '".html::escapeJS(__('Level 3 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h4 = '".html::escapeJS(__('Level 4 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h5 = '".html::escapeJS(__('Level 5 header'))."'; ".
+		"jsToolBar.prototype.elements.blocks.options.h6 = '".html::escapeJS(__('Level 6 header'))."'; ".
+		"jsToolBar.prototype.elements.strong.title = '".html::escapeJS(__('Strong emphasis'))."'; ".
+		"jsToolBar.prototype.elements.em.title = '".html::escapeJS(__('Emphasis'))."'; ".
+		"jsToolBar.prototype.elements.ins.title = '".html::escapeJS(__('Inserted'))."'; ".
+		"jsToolBar.prototype.elements.del.title = '".html::escapeJS(__('Deleted'))."'; ".
+		"jsToolBar.prototype.elements.quote.title = '".html::escapeJS(__('Inline quote'))."'; ".
+		"jsToolBar.prototype.elements.code.title = '".html::escapeJS(__('Code'))."'; ".
+		"jsToolBar.prototype.elements.br.title = '".html::escapeJS(__('Line break'))."'; ".
+		"jsToolBar.prototype.elements.blockquote.title = '".html::escapeJS(__('Blockquote'))."'; ".
+		"jsToolBar.prototype.elements.pre.title = '".html::escapeJS(__('Preformated text'))."'; ".
+		"jsToolBar.prototype.elements.ul.title = '".html::escapeJS(__('Unordered list'))."'; ".
+		"jsToolBar.prototype.elements.ol.title = '".html::escapeJS(__('Ordered list'))."'; ".
+
+		"jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ".
+		"jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ".
+		"jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ".
+
+		"jsToolBar.prototype.elements.img.title = '".html::escapeJS(__('External image'))."'; ".
+		"jsToolBar.prototype.elements.img.src_prompt = '".html::escapeJS(__('URL?'))."'; ".
+
+		"jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ".
+		"jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; ".
+
+		"jsToolBar.prototype.elements.removeFormat.title = '".html::escapeJS(__('Remove text formating'))."'; ";
+
+		if (!$GLOBALS['core']->auth->check('media,media_admin',$GLOBALS['core']->blog->id)) {
+			$res .= "jsToolBar.prototype.elements.img_select.disabled = true;\n";
+		}
+
+		$res .=
+		"\n//]]>\n".
+		"</script>\n";
+
+		return $res;
 	}
 
