Index: trunk/tmpl/cms/include/template_table.tmpl
===================================================================
--- trunk/tmpl/cms/include/template_table.tmpl (revision 2934)
+++ trunk/tmpl/cms/include/template_table.tmpl (revision 3082)
@@ -25,5 +25,5 @@
     <mt:if name="template_type" eq="index">
         <a href="javascript:void(0)"
-            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_index_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
+            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type" default="template"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_index_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
             accesskey="a"
             title="<__trans phrase="Publish selected templates (a)">"
@@ -31,5 +31,5 @@
     <mt:else if name="template_type" eq="archive">
         <a href="javascript:void(0)"
-            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_archive_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
+            onclick="doForMarkedInThisWindow(getByID('<$mt:var name="template_type" default="template"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">', 'id', 'publish_archive_templates', {}, '<__trans phrase="to publish" escape="js">'); return false;"
             accesskey="a"
             title="<__trans phrase="Publish selected templates (a)">"
@@ -37,5 +37,5 @@
     </mt:if>
     <a href="javascript:void(0)"
-        onclick="doRemoveItems(getByID('<$mt:var name="template_type"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">'); return false;"
+        onclick="doRemoveItems(getByID('<$mt:var name="template_type" default="template"$>-listing-form'), '<__trans phrase="template" escape="js">', '<__trans phrase="templates" escape="js">'); return false;"
         accesskey="x"
         title="<__trans phrase="Delete selected [_1] (x)" params="<$mt:var name="object_label_plural"$>">"
@@ -74,5 +74,5 @@
         <tbody>
     </mt:if>
-            <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if> template-<$mt:var name="template_type"$>">
+            <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if> template-<$mt:var name="template_type" default="template"$>">
                 <td class="cb"><input type="checkbox" name="id" class="select" value="<mt:var name="id">" /></td>
                 <td class="template-name"><a href="<mt:var name="script_url">?__mode=view&amp;_type=template&amp;id=<mt:var name="id">&amp;blog_id=<mt:var name="blog_id">"><mt:var name="name" escape="html"></a></td>
@@ -139,5 +139,5 @@
 <mt:else>
     <mt:if name="blog_id">
-    <div id="<$mt:var name="template_type"$>-listing" class="listing zero-state-listing zero-state">
+    <div id="<$mt:var name="template_type" default="template"$>-listing" class="listing zero-state-listing zero-state">
         <div class="listing-header">
             <$mt:var name="listing_header"$>
Index: trunk/tmpl/cms/error.tmpl
===================================================================
--- trunk/tmpl/cms/error.tmpl (revision 2784)
+++ trunk/tmpl/cms/error.tmpl (revision 3082)
@@ -24,4 +24,6 @@
                 <mt:if name="dialog">
                 onclick="if ( window.opener ) { window.close(); } else { window.parent.closeDialog('<mt:var name="link" escape="js">'); }; return false;"
+                <mt:elseif name="fs">
+                onclick="window.location='<mt:var name="link" escape="js">'; return false;"
                 <mt:else>
                 onclick="if ( window.opener ) { window.opener.location.href='<mt:var name="link" escape="js">'; window.close(); } else { window.open('<mt:var name="link" escape="js">') }; return false;"
Index: trunk/tmpl/cms/list_template.tmpl
===================================================================
--- trunk/tmpl/cms/list_template.tmpl (revision 2622)
+++ trunk/tmpl/cms/list_template.tmpl (revision 3082)
@@ -21,4 +21,5 @@
         </mt:if>
         </ul>
+        <$mtapp:ListFilters$>
     </mtapp:widget>
     <mtapp:widget
Index: trunk/tmpl/cms/widget/blog_stats_tag_cloud.tmpl
===================================================================
--- trunk/tmpl/cms/widget/blog_stats_tag_cloud.tmpl (revision 1857)
+++ trunk/tmpl/cms/widget/blog_stats_tag_cloud.tmpl (revision 3082)
@@ -5,4 +5,5 @@
 
     <div id="tag-panel" class="<mt:unless name="tab" eq="tag">hidden</mt:unless>" mt:tab-content="tag">
+<mt:Section cache_prefix="tagcloud" period="3600" by_blog="1" by_user="1">
         <div id="tag-cloud">
             <ul id="tag-cloud-list">
@@ -12,4 +13,5 @@
             </ul>
         </div>
+</mt:Section>
         <div id="tag-cloud-recent-entries"></div>
     </div>
Index: trunk/tmpl/cms/cfg_archives.tmpl
===================================================================
--- trunk/tmpl/cms/cfg_archives.tmpl (revision 2213)
+++ trunk/tmpl/cms/cfg_archives.tmpl (revision 3082)
@@ -116,4 +116,16 @@
         return false;
     }
+    if (f.enable_archive_paths.checked) {
+        if (!f.archive_path.value) {
+            alert('<__trans phrase="You must set Local Archive Path." escape="singlequotes">');
+            return false;
+        } else if (!is_valid_url(f.archive_url.value)){
+            alert('<__trans phrase="You must set a valid Archive URL." escape="singlequotes">');
+            return false;
+        } else if (!is_valid_path(f.archive_path.value)){
+            alert('<__trans phrase="You must set a valid Local Archive Path." escape="singlequotes">');
+            return false;
+        }
+    }
     f.site_url.disabled = false;
     f.site_path.disabled = false;
@@ -126,12 +138,11 @@
 }
 function is_valid_path(path_){
-    for(i = 0; i < path_.length; i++){
-        var buf = escape(path_.substr(i, 1));
-        if (buf.match(/^%u.*/)){
-            return false;
-        }
-        if (buf.match(/(%.{2}){2}?/)){
-        	return false;
-        }
+    var str = path_.replace(/[ "%<>\[\\\]\^`{\|}~]/g, "");
+    str = encodeURI(str);
+    if (str.indexOf('%') != -1) {
+        return false;
+    }
+    if (str.match(/\.\./)) {
+        return false;
     }
     return true;
