Index: .hgsubstate
===================================================================
--- .hgsubstate	(revision 1225)
+++ .hgsubstate	(revision 1258)
@@ -1,1 +1,1 @@
-e2e1a2c966318f4c5ea67f3c3de72ae0ac79b333 inc/libs/clearbricks
+4a0351ee5d566a83ff06ca8bc9fffeb99885f545 inc/libs/clearbricks
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 1179)
+++ admin/index.php	(revision 1247)
@@ -59,7 +59,7 @@
 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) {
 	if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) {
-		$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true);
-	}
-	$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean');
+		$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true);
+	}
+	$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean');
 }
 
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 1179)
+++ admin/install/index.php	(revision 1247)
@@ -190,5 +190,5 @@
 		$core->auth->user_prefs->dashboard->put('doclinks',true,'boolean','',null,true);
 		$core->auth->user_prefs->dashboard->put('dcnews',true,'boolean','',null,true);
-		$core->auth->user_prefs->dashboard->put('quickentry',true,'boolean','',null,true);
+		$core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true);
 
 		# Add accessibility options
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 1140)
+++ admin/js/_post.js	(revision 1256)
@@ -79,7 +79,15 @@
 		// Get document format and prepare toolbars
 		var formatField = $('#post_format').get(0);
+		var last_post_format = $(formatField).val();
 		$(formatField).change(function() {
-			excerptTb.switchMode(this.value);
-			contentTb.switchMode(this.value);
+			// Confirm post format change
+			if(window.confirm(dotclear.msg.confirm_change_post_format_noconvert)){
+				excerptTb.switchMode(this.value);
+				contentTb.switchMode(this.value);
+				last_post_format = $(this).val();
+			}else{
+				// Restore last format if change cancelled
+				$(this).val(last_post_format);
+			}
 		});
 		
Index: admin/plugins.php
===================================================================
--- admin/plugins.php	(revision 1182)
+++ admin/plugins.php	(revision 1238)
@@ -387,4 +387,9 @@
 echo '</div>';
 
+if ($core->plugins->moduleExists('daInstaller')) {
+	echo '<p><a href="plugin.php?p=daInstaller" class="multi-part">'.__('DotAddict.org Installer').'</a></p>';
+}
+
+
 # --BEHAVIOR-- pluginsToolsTabs
 $core->callBehavior('pluginsToolsTabs',$core);
Index: admin/users.php
===================================================================
--- admin/users.php	(revision 1179)
+++ admin/users.php	(revision 1237)
@@ -106,5 +106,5 @@
 	
 	echo 
-	'<h2 class="post-title">'.__('Users').'</h2>'.
+	'<h2 class="page-title">'.__('Users').'</h2>'.
 	'<p class="top-add"><strong><a class="button add" href="user.php">'.__('Create a new user').'</a></strong></p>';
 	
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 1188)
+++ inc/admin/lib.dc.page.php	(revision 1256)
@@ -476,4 +476,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.')).
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 1541)
+++ inc/core/class.dc.blog.php	(revision 1542)
@@ -203,22 +203,26 @@
 	@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)
+	@param	affected_posts		<b>mixed</b>		Posts(s) ID(s)
+	*/
+	public function triggerComments($ids, $del=false, $affected_posts=null)
 	{
 		$co_ids = dcUtils::cleanIds($ids);
+		$a_ids = dcUtils::cleanIds($affected_posts);
+		$a_tbs = array();
 		
 		# a) Retrieve posts affected by comments edition
-		$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;
+		if (empty($a_ids)) {
+			$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);
+			
+			while ($rs->fetch()) {
+				$a_ids[] = (integer) $rs->post_id;
+				$a_tbs[] = (integer) $rs->comment_trackback;
+			}
 		}
 		
@@ -255,4 +259,5 @@
 		{
 			$nb_comment = $nb_trackback = 0;
+			//$cur->nb_comment = $nb_comment;
 			foreach($b_ids as $b_key => $b_id)
 			{
@@ -505,5 +510,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
@@ -2191,6 +2202,19 @@
 		$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 distinct(post_id) '.
+			'FROM '.$this->prefix.'comment '.
+			'WHERE comment_id'.$this->con->in($co_ids);
+		
+		$rs = $this->con->select($strReq);
+		
+		while ($rs->fetch()) {
+			$affected_posts[] = (integer) $rs->post_id;
 		}
 		
@@ -2222,5 +2246,5 @@
 		
 		$this->con->execute($strReq);
-		$this->triggerComments($co_ids,true);
+		$this->triggerComments($co_ids, true, $affected_posts);
 		$this->triggerBlog();
 	}
Index: inc/load_plugin_file.php
===================================================================
--- inc/load_plugin_file.php	(revision 1179)
+++ 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/public/class.dc.template.php
===================================================================
--- inc/public/class.dc.template.php	(revision 1179)
+++ 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: locales/en/main.po
===================================================================
--- locales/en/main.po	(revision 1039)
+++ locales/en/main.po	(revision 1256)
@@ -2154,4 +2154,7 @@
 msgstr ""
 
+msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?"
+msgstr ""
+
 msgid "Loading enhanced uploader, please wait."
 msgstr ""
Index: locales/fr/main.po
===================================================================
--- locales/fr/main.po	(revision 1233)
+++ locales/fr/main.po	(revision 1256)
@@ -1038,5 +1038,5 @@
 #, fuzzy, php-format
 msgid "Path <strong>%s</strong> is not writable."
-msgstr "Le répertoire de cache %s n'est pas accessible en écriture."
+msgstr "Le répertoire <strong>%s</strong> n'est pas accessible en écriture."
 
 #, fuzzy
@@ -1123,5 +1123,5 @@
 #, php-format
 msgid "You can change your user language in your <a href=\"%1$s\">preferences</a> or change your blog's main language in your <a href=\"%2$s\">blog settings</a>."
-msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres de blog</a>."
+msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres du blog</a>."
 
 msgid "Installed languages"
@@ -2142,9 +2142,9 @@
 #, fuzzy
 msgid "Go to the content"
-msgstr "Voir ce billet sur le site"
+msgstr "Aller au contenu"
 
 #, fuzzy
 msgid "Go to the menu"
-msgstr "Aller sur le site"
+msgstr "Aller au menu"
 
 msgid "Go to site"
@@ -2264,4 +2264,7 @@
 msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?"
 
+msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?"
+msgstr "Attention : le changement de syntaxe ne transformera pas les balises des contenus déjà saisis. Pensez à les réadapter après cette opération. Confirmez-vous ce changement de syntaxe ?"
+
 msgid "Loading enhanced uploader, please wait."
 msgstr "Chargement de l'interface avancée."
@@ -2512,5 +2515,5 @@
 #, fuzzy
 msgid "You are not allowed to reset categories order"
-msgstr "Vous n'êtes pas autorisé à supprimer des catégories"
+msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories"
 
 msgid "Category URL must be unique."
Index: plugins/daInstaller/index.php
===================================================================
--- plugins/daInstaller/index.php	(revision 1046)
+++ plugins/daInstaller/index.php	(revision 1237)
@@ -256,5 +256,5 @@
 '<body>'.
 infoMessages().
-'<h2>'.__('DotAddict.org Installer').'</h2>'.
+'<h2 class="page-title">'.__('DotAddict.org Installer').'</h2>'.
 '<p>'.__('Install and update your extensions live from DotAddict.org').'</p>';
 
Index: plugins/pages/page.php
===================================================================
--- plugins/pages/page.php	(revision 1215)
+++ plugins/pages/page.php	(revision 1239)
@@ -302,4 +302,5 @@
   dcPage::jsToolBar().
   dcPage::jsModal().
+  dcPage::jsMetaEditor().
   dcPage::jsLoad('js/_post.js').
   dcPage::jsConfirmClose('entry-form','comment-form').
Index: plugins/tags/_admin.php
===================================================================
--- plugins/tags/_admin.php	(revision 1179)
+++ plugins/tags/_admin.php	(revision 1239)
@@ -23,4 +23,6 @@
 $core->addBehavior('adminAfterPostUpdate',array('tagsBehaviors','setTags'));
 
+$core->addBehavior('adminPageHeaders',array('tagsBehaviors','pageHeaders'));
+
 $core->addBehavior('adminPostHeaders',array('tagsBehaviors','postHeaders'));
 $core->addBehavior('adminPostsActionsHeaders',array('tagsBehaviors','postsActionsHeaders'));
@@ -99,4 +101,33 @@
 			}
 		}
+	}
+
+	public static function pageHeaders()
+	{
+		$tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag');
+		
+		$opts = $GLOBALS['core']->auth->getOptions();
+		$type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more';
+		
+		return 
+		'<script type="text/javascript" src="index.php?pf=tags/js/jquery.autocomplete.js"></script>'.
+		'<script type="text/javascript" src="index.php?pf=tags/js/page.js"></script>'.
+		'<script type="text/javascript">'."\n".
+		"//<![CDATA[\n".
+		"metaEditor.prototype.meta_url = 'plugin.php?p=tags&m=tag_posts&amp;tag=';\n".
+		"metaEditor.prototype.meta_type = '".html::escapeJS($type)."';\n".
+		"metaEditor.prototype.text_confirm_remove = '".html::escapeJS(__('Are you sure you want to remove this %s?'))."';\n".
+		"metaEditor.prototype.text_add_meta = '".html::escapeJS(__('Add a %s to this entry'))."';\n".
+		"metaEditor.prototype.text_choose = '".html::escapeJS(__('Choose from list'))."';\n".
+		"metaEditor.prototype.text_all = '".html::escapeJS(__('all'))."';\n".
+		"metaEditor.prototype.text_separation = '';\n".
+		"jsToolBar.prototype.elements.tag.title = '".html::escapeJS(__('Tag'))."';\n".
+		"jsToolBar.prototype.elements.tag.url = '".html::escapeJS($tag_url)."';\n".
+		"dotclear.msg.tags_autocomplete = '".html::escapeJS(__('used in %e - frequency %p%'))."';\n".
+		"dotclear.msg.entry = '".html::escapeJS(__('entry'))."';\n".
+		"dotclear.msg.entries = '".html::escapeJS(__('entries'))."';\n".
+		"\n//]]>\n".
+		"</script>\n".
+		'<link rel="stylesheet" type="text/css" href="index.php?pf=tags/style.css" />';
 	}
 	
Index: plugins/tags/js/page.js
===================================================================
--- plugins/tags/js/page.js	(revision 1240)
+++ plugins/tags/js/page.js	(revision 1240)
@@ -0,0 +1,70 @@
+$(function () {
+    $('#edit-entry').onetabload(function () {
+        var tags_edit = $('#tags-edit');
+        var post_id = $('#id');
+        var meta_field = null;
+        if (tags_edit.length > 0) {
+            post_id = (post_id.length > 0) ? post_id.get(0).value : false;
+            if (post_id == false) {
+                meta_field = $('<input type="hidden" name="post_tags" />');
+                meta_field.val($('#post_tags').val());
+            }
+            var mEdit = new metaEditor(tags_edit, meta_field, 'tag');
+            mEdit.meta_url = 'plugin.php?p=tags&m=tag_posts&amp;tag=';
+            mEdit.displayMeta('tag', post_id);
+            window.dc_tag_editor = mEdit;
+        }
+    });
+});
+jsToolBar.prototype.elements.tagSpace = {
+    type: 'space'
+};
+jsToolBar.prototype.elements.tag = {
+    type: 'button',
+    title: 'Keyword',
+    fn: {}
+};
+jsToolBar.prototype.elements.tag.context = 'post';
+jsToolBar.prototype.elements.tag.icon = 'index.php?pf=tags/img/tag-add.png';
+jsToolBar.prototype.elements.tag.fn.wiki = function () {
+    this.encloseSelection('', '', function (str) {
+        if (str == '') {
+            window.alert(dotclear.msg.no_selection);
+            return '';
+        }
+        if (str.indexOf(',') != -1) {
+            return str;
+        } else {
+            return '[' + str + '|tag:' + str + ']';
+        }
+    });
+};
+jsToolBar.prototype.elements.tag.fn.xhtml = function () {
+    var url = this.elements.tag.url;
+    this.encloseSelection('', '', function (str) {
+        if (str == '') {
+            window.alert(dotclear.msg.no_selection);
+            return '';
+        }
+        if (str.indexOf(',') != -1) {
+            return str;
+        } else {
+            return '<a href="' + this.stripBaseURL(url + '/' + str) + '">' + str + '</a>';
+        }
+    });
+};
+jsToolBar.prototype.elements.tag.fn.wysiwyg = function () {
+    var t = this.getSelectedText();
+    if (t == '') {
+        window.alert(dotclear.msg.no_selection);
+        return;
+    }
+    if (t.indexOf(',') != -1) {
+        return;
+    }
+    var n = this.getSelectedNode();
+    var a = document.createElement('a');
+    a.href = this.stripBaseURL(this.elements.tag.url + '/' + t);
+    a.appendChild(n);
+    this.insertNode(a);
+};
Index: plugins/widgets/_widgets_functions.php
===================================================================
--- plugins/widgets/_widgets_functions.php	(revision 1179)
+++ plugins/widgets/_widgets_functions.php	(revision 1253)
@@ -29,8 +29,6 @@
 		($w->title ? '<h2><label for="q">'.html::escapeHTML($w->title).'</label></h2>' : '').
 		'<form action="'.$core->blog->url.'" method="get">'.
-		'<fieldset>'.
 		'<p><input type="text" size="10" maxlength="255" id="q" name="q" value="'.$value.'" /> '.
 		'<input type="submit" class="submit" value="ok" /></p>'.
-		'</fieldset>'.
 		'</form>'.
 		($w->content_only ? '' : '</div>');
