diff --git a/.gitignore b/.gitignore
index 4fb846732a7cd79f03ddd1650d21c87ea1488b37..b96a0554bdddd313f4037697ef48b632474fa923 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,15 @@
 /data/tmp/*
 /lib/tpl/*
 /lib/plugins/*
+!/lib/plugins/acl
+!/lib/plugins/config
+!/lib/plugins/info
+!/lib/plugins/plugin
+!/lib/plugins/popularity
+!/lib/plugins/revert
+!/lib/plugins/safefnrecode
+!/lib/plugins/usermanager
+!/lib/plugins/action.php
+!/lib/plugins/admin.php
+!/lib/plugins/index.html
+!/lib/plugins/syntax.php
diff --git a/README b/README
index 76a7cf6cd9fd68b1dd17e76485420f0b14cc4113..6bb9a3bd94279f0872b565ff005032f80b49f2b2 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ at http://www.dokuwiki.org/
 For Installation Instructions see
 http://www.dokuwiki.org/install
 
-DokuWiki - 2004-2010 (c) Andreas Gohr <andi@splitbrain.org>
+DokuWiki - 2004-2011 (c) Andreas Gohr <andi@splitbrain.org>
                          and the DokuWiki Community
 See COPYING and file headers for license info
 
diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/cases/inc/pageutils_getid.test.php
index 7fccc3a6089ef6896647d68eaa9323c375de1b3a..6eddeb5ea519266ec732a1477138d2c8465e85e2 100644
--- a/_test/cases/inc/pageutils_getid.test.php
+++ b/_test/cases/inc/pageutils_getid.test.php
@@ -99,7 +99,7 @@ class init_getID_test extends UnitTestCase {
         $_SERVER['PATH_TRANSLATED'] = '/var/www/index.html';
         $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/';
 
-        $this->assertEqual(getID(), 'start');
+        $this->assertEqual(getID(), cleanID($conf['start']));
     }
 
 }
diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/cases/inc/pageutils_resolve_pageid.test.php
index d9ea89869c9fa47132768e6dc86398755905b8bd..c65ed1866e7b639688d11753771c9c956dd73d5f 100644
--- a/_test/cases/inc/pageutils_resolve_pageid.test.php
+++ b/_test/cases/inc/pageutils_resolve_pageid.test.php
@@ -50,6 +50,10 @@ class init_resolve_pageid_test extends UnitTestCase {
         $tests[] = array('foo','foo:','foo:start');
         $tests[] = array('foo','playground:','playground:playground');
 
+        // empty $page
+        global $ID;
+        $ID = 'my:space';
+        $tests[] = array('my', '', 'my:space');
 
         foreach($tests as $test){
             $page = $test[1];
@@ -59,5 +63,23 @@ class init_resolve_pageid_test extends UnitTestCase {
         }
     }
 
+    /**
+     * Empty page on homepage should resolve to start page
+     */
+    function test_resolve_pageid_empty_homepage() {
+        global $ID;
+        $ID = '';
+
+        global $conf;
+        $conf['start'] = 'someverystrangestartname';
+
+        $ns = '';
+        $page = '';
+        $exist = true;
+
+        resolve_pageid($ns, $page, $exist);
+        $this->assertEqual($page, $conf['start']);
+   }
+
 }
 //Setup VIM: ex: et ts=4 :
diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php
index a4a8c58266ac1c95498c708226ab6308355c2b26..53871e110e2741cfec0872bcfc2eb90de557ab05 100644
--- a/_test/cases/inc/parser/parser_links.test.php
+++ b/_test/cases/inc/parser/parser_links.test.php
@@ -221,6 +221,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser {
         $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls);
     }
 
+    function testInternalLinkNoChar() {
+        $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink());
+        $this->P->parse("Foo [[]] Bar");
+        $calls = array (
+            array('document_start',array()),
+            array('p_open',array()),
+            array('cdata',array("\n".'Foo ')),
+            array('internallink',array('',NULL)),
+            array('cdata',array(' Bar')),
+            array('p_close',array()),
+            array('document_end',array()),
+        );
+        $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls);
+    }
+
     function testInternalLinkNamespaceNoTitle() {
         $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink());
         $this->P->parse("Foo [[foo:bar]] Bar");
diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php
index 0ad96c793fe41f5a809a497f176d3fc29b633d2b..a9a6dfdbc14c3d0fb8d5b019a4b6f1ce2f4b05f4 100644
--- a/_test/cases/inc/parser/xhtml_links.test.php
+++ b/_test/cases/inc/parser/xhtml_links.test.php
@@ -1,6 +1,7 @@
 <?php
 if (!defined('DOKU_BASE')) define('DOKU_BASE','./');
 require_once DOKU_INC.'inc/parser/xhtml.php';
+require_once DOKU_INC.'inc/pageutils.php';
 
 class xhtml_links_test extends UnitTestCase {
 
@@ -41,4 +42,198 @@ class xhtml_links_test extends UnitTestCase {
         $this->assertEqual($p->doc,$expect);
     }
 
+    /**
+      *  Produced by syntax like [[ ]]
+      */
+    function test_empty_internallink(){
+        $page = 'my:space';
+
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['start'] = 'start';
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->internallink('');
+
+
+        if (page_exists($page)) {
+            $class = 'wikilink1';
+            $rel = '';
+        }
+        else {
+            $class = 'wikilink2';
+            $rel = ' rel="nofollow"';
+        }
+
+        $parts = split(':', $page);
+        $caption = $parts[count($parts)-1];
+
+        $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
+
+    /**
+      *  Produced by syntax like [[ |my caption]]
+      */
+    function test_empty_internallink_with_caption(){
+        $page = 'my:space';
+        $caption = 'my caption';
+
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->internallink('', $caption);
+
+        if (page_exists($page)) {
+            $class = 'wikilink1';
+            $rel = '';
+        }
+        else {
+            $class = 'wikilink2';
+            $rel = ' rel="nofollow"';
+        }
+
+        $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
+
+    /**
+      *  Produced by syntax like [[?do=index]]
+      */
+    function test_empty_internallink_index(){
+        $page = 'my:space';
+
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['start'] = 'start';
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->internallink('?do=index');
+
+        if (page_exists($page)) {
+            $class = 'wikilink1';
+            $rel = '';
+        }
+        else {
+            $class = 'wikilink2';
+            $rel = ' rel="nofollow"';
+        }
+
+        $parts = split(':', $page);
+        $caption = $parts[count($parts)-1];
+
+        $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'&amp;do=index" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
+
+    /**
+      *  Produced by syntax like [[?do=index|my caption]]
+      */
+    function test_empty_internallink_index_with_caption(){
+        $page = 'my:space';
+        $caption = 'my caption';
+
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->internallink('?do=index', $caption);
+
+        if (page_exists($page)) {
+            $class = 'wikilink1';
+            $rel = '';
+        }
+        else {
+            $class = 'wikilink2';
+            $rel = ' rel="nofollow"';
+        }
+
+        $expect = '<span class="curid"><a href="/./doku.php?id='.$page.'&amp;do=index" class="'.$class.'" title="'.$page.'"'.$rel.'>'.$caption.'</a></span>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
+
+    /**
+      *  Produced by syntax like [[#test]]
+      */
+    function test_empty_locallink(){
+        $page = 'my:spacex';
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->locallink('test');
+
+        $expect = '<a href="#test" title="'.$page.' &crarr;" class="wikilink1">test</a>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
+
+    /**
+      *  Produced by syntax like [[#test|my caption]]
+      */
+    function test_empty_locallink_with_caption(){
+        $page = 'my:spacex';
+        $caption = 'my caption';
+
+        global $ID;
+        $ID = $page;
+
+        global $conf;
+        $conf['basedir']     = '/';
+        $conf['useheading']  = 0;
+        $conf['userewrite']  = 0;
+        $conf['useslash']    = 0;
+        $conf['canonical']   = 0;
+
+        $p = new Doku_Renderer_xhtml();
+        $p->locallink('test', $caption);
+
+        $expect = '<a href="#test" title="'.$page.' &crarr;" class="wikilink1">'.$caption.'</a>';
+
+        $this->assertEqual($p->doc, $expect);
+    }
 }
diff --git a/_test/cases/inc/safefn.test.php b/_test/cases/inc/safefn.test.php
index c789875bab78727ccc768fbcb9f52a592d5a7a78..1227e55783dbf38c37c3785c81787cb752dc5457 100644
--- a/_test/cases/inc/safefn.test.php
+++ b/_test/cases/inc/safefn.test.php
@@ -10,19 +10,23 @@ class safeFN_test extends UnitTestCase {
     function test1(){
         // we test multiple cases here - format: string, repl, additional, test
         $tests   = array();
-        $tests[] = array('äa.txt', '%5g.a.txt');
-        $tests[] = array('ä.', '%5g..');
+        $tests[] = array('äa.txt', '%5g]a.txt');
+        $tests[] = array('ä.', '%5g].');
         $tests[] = array('asciistring','asciistring');
         $tests[] = array('ascii-_/.string','ascii-_/.string');
-        $tests[] = array('AName','%x%1a.ame');
-        $tests[] = array('A Name','%x%0%1a.ame');
-        $tests[] = array('Another...Name','%x.nother...%1a.ame');
-        $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a.ame');
-        $tests[] = array('A%ß-∂_.ƒName','%x%%5b.-%6oy._.%aa%1a.ame');
-        $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b.-%6oy._.%aa%1a.ame');
-        $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c.');
-        $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr.');
-        $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw._%tg%sw%t5%t7%ta%sy%ta%sz%ta._%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw._%t9%sw._%td%t1%tc%sy%t1%tc%t1._p0-squid.some.domain.1270211897.txt.gz');
+        $tests[] = array('AName','%x%1a]ame');
+        $tests[] = array('A Name','%x%0%1a]ame');
+        $tests[] = array('Another...Name','%x]nother...%1a]ame');
+        $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a]ame');
+        $tests[] = array('A%ß-∂_.ƒName','%x%%5b]-%6oy]_.%aa%1a]ame');
+        $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b]-%6oy]_.%aa%1a]ame');
+        $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8].%0%xyt%10cl%164c]');
+        $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr]');
+        $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw]_%tg%sw%t5%t7%ta%sy%ta%sz%ta]_%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw]_%t9%sw]_%td%t1%tc%sy%t1%tc%t1]_p0-squid.some.domain.1270211897.txt.gz');
+
+        $tests[] = array('name[1]','name[1]');
+        $tests[] = array('Name[1]','%1a]ame[1]');
+        $tests[] = array('Name[A]','%1a]ame[%x]]');
 
         foreach($tests as $test){
             list($utf8,$safe) = $test;
@@ -30,6 +34,15 @@ class safeFN_test extends UnitTestCase {
             $this->assertEqual(SafeFN::decode($safe),$utf8);
         }
     }
+    
+    function test2(){
+        $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr');
+
+        foreach($tests as $test){
+            list($utf8,$safe) = $test;
+            $this->assertEqual(SafeFN::decode($safe),$utf8);
+        }
+    }
 
 }
 //Setup VIM: ex: et ts=4 :
diff --git a/conf/.htaccess b/conf/.htaccess
index 763ebf2ee20c8424dc348b2095513064c093448d..f5dda608694aefb65d91c78bcad04ebf2aca0d79 100644
--- a/conf/.htaccess
+++ b/conf/.htaccess
@@ -1,3 +1,4 @@
-## no access to the conf directory
-order allow,deny
-deny from all
+## no access to the conf directory
+order allow,deny
+deny from all
+Satisfy All
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php
index 629e7c0c693d90bdfb9d799ae883ff05b62ae41a..e90e4fc23fcde20f8063154520947de2ee0f9a9d 100644
--- a/conf/dokuwiki.php
+++ b/conf/dokuwiki.php
@@ -7,7 +7,7 @@
  *
  * This is a piece of PHP code so PHP syntax applies!
  *
- * For help with the configuration see http://www.splitbrain.org/dokuwiki/wiki:config
+ * For help with the configuration see http://www.dokuwiki.org/config
  */
 
 
@@ -134,8 +134,6 @@ $conf['broken_iua']  = 0;                //Platform with broken ignore_user_abor
 $conf['xsendfile']   = 0;                //Use X-Sendfile (1 = lighttpd, 2 = standard)
 $conf['renderer_xhtml'] = 'xhtml';       //renderer to use for main page generation
 $conf['rememberme'] = 1;                 //Enable/disable remember me on login
-$conf['external_tokenizer'] = 0;         //Use an external program to split pages into words for indexing
-$conf['tokenizer_cmd'] = '/usr/bin/mecab -O wakati';
 
 //Set target to use when creating links - leave empty for same window
 $conf['target']['wiki']      = '';
diff --git a/data/.htaccess b/data/.htaccess
index 281d5c33db37cd1cc887dbb2d36897b897835071..2cbb757e77986b86d1da9241b3019c0a073e219a 100644
--- a/data/.htaccess
+++ b/data/.htaccess
@@ -1,2 +1,3 @@
 order allow,deny
 deny from all
+Satisfy All
diff --git a/inc/.htaccess b/inc/.htaccess
index aebb21cd2519d1c9f0c0124c673786faaa1c7492..68ae43e72ba5e5399d23c43c7ebba2000e791da4 100644
--- a/inc/.htaccess
+++ b/inc/.htaccess
@@ -1,3 +1,4 @@
-## no access to the inc directory
-order allow,deny
-deny from all
+## no access to the inc directory
+order allow,deny
+deny from all
+Satisfy All
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index 906a17b2d34d48915e91aea01f5a009051e82f13..6e1d07382a8aa7aef0d301200ca5db16cc32da26 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -29,8 +29,8 @@ class _DiffOp {
 
 class _DiffOp_Copy extends _DiffOp {
     var $type = 'copy';
-
-    function _DiffOp_Copy($orig, $closing = false) {
+    
+    function __construct($orig, $closing = false) {
         if (!is_array($closing))
             $closing = $orig;
         $this->orig = $orig;
@@ -44,8 +44,8 @@ class _DiffOp_Copy extends _DiffOp {
 
 class _DiffOp_Delete extends _DiffOp {
     var $type = 'delete';
-
-    function _DiffOp_Delete($lines) {
+    
+    function __construct($lines) {
         $this->orig = $lines;
         $this->closing = false;
     }
@@ -57,8 +57,8 @@ class _DiffOp_Delete extends _DiffOp {
 
 class _DiffOp_Add extends _DiffOp {
     var $type = 'add';
-
-    function _DiffOp_Add($lines) {
+    
+    function __construct($lines) {
         $this->closing = $lines;
         $this->orig = false;
     }
@@ -70,8 +70,8 @@ class _DiffOp_Add extends _DiffOp {
 
 class _DiffOp_Change extends _DiffOp {
     var $type = 'change';
-
-    function _DiffOp_Change($orig, $closing) {
+    
+    function __construct($orig, $closing) {
         $this->orig = $orig;
         $this->closing = $closing;
     }
@@ -499,7 +499,7 @@ class Diff {
      *      (Typically these are lines from a file.)
      * @param $to_lines array An array of strings.
      */
-    function Diff($from_lines, $to_lines) {
+    function __construct($from_lines, $to_lines) {
         $eng = new _DiffEngine;
         $this->edits = $eng->diff($from_lines, $to_lines);
         //$this->_check($from_lines, $to_lines);
@@ -645,12 +645,12 @@ class MappedDiff extends Diff {
      * @param $mapped_to_lines array This array should
      *  have the same number of elements as $to_lines.
      */
-    function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
+    function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
 
         assert(count($from_lines) == count($mapped_from_lines));
         assert(count($to_lines) == count($mapped_to_lines));
 
-        $this->Diff($mapped_from_lines, $mapped_to_lines);
+        parent::__construct($mapped_from_lines, $mapped_to_lines);
 
         $xi = $yi = 0;
         $ecnt = count($this->edits);
@@ -827,7 +827,8 @@ class DiffFormatter {
 define('NBSP', "\xC2\xA0");     // utf-8 non-breaking space.
 
 class _HWLDF_WordAccumulator {
-    function _HWLDF_WordAccumulator() {
+
+    function __construct() {
         $this->_lines = array();
         $this->_line = '';
         $this->_group = '';
@@ -882,11 +883,11 @@ class _HWLDF_WordAccumulator {
 
 class WordLevelDiff extends MappedDiff {
 
-    function WordLevelDiff($orig_lines, $closing_lines) {
+    function __construct($orig_lines, $closing_lines) {
         list ($orig_words, $orig_stripped) = $this->_split($orig_lines);
         list ($closing_words, $closing_stripped) = $this->_split($closing_lines);
 
-        $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped);
+        parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped);
     }
 
     function _split($lines) {
@@ -923,12 +924,12 @@ class WordLevelDiff extends MappedDiff {
 }
 
 class InlineWordLevelDiff extends MappedDiff {
-
-    function InlineWordLevelDiff($orig_lines, $closing_lines) {
+    
+    function __construct($orig_lines, $closing_lines) {
         list ($orig_words, $orig_stripped) = $this->_split($orig_lines);
         list ($closing_words, $closing_stripped) = $this->_split($closing_lines);
 
-        $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped);
+        parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped);
     }
 
     function _split($lines) {
@@ -965,7 +966,7 @@ class InlineWordLevelDiff extends MappedDiff {
  */
 class UnifiedDiffFormatter extends DiffFormatter {
 
-    function UnifiedDiffFormatter($context_lines = 4) {
+    function __construct($context_lines = 4) {
         $this->leading_context_lines = $context_lines;
         $this->trailing_context_lines = $context_lines;
     }
@@ -996,7 +997,7 @@ class UnifiedDiffFormatter extends DiffFormatter {
  */
 class TableDiffFormatter extends DiffFormatter {
 
-    function TableDiffFormatter() {
+    function __construct() {
         $this->leading_context_lines = 2;
         $this->trailing_context_lines = 2;
     }
@@ -1020,7 +1021,7 @@ class TableDiffFormatter extends DiffFormatter {
         $l1 = $lang['line'].' '.$xbeg;
         $l2 = $lang['line'].' '.$ybeg;
         $r = '<tr><td class="diff-blockheader" colspan="2">'.$l1.":</td>\n".
-             '    <td class="diff-blockheader" colspan="2">'.$l2.":</td>\n".
+             '<td class="diff-blockheader" colspan="2">'.$l2.":</td>\n".
              "</tr>\n";
         return $r;
     }
@@ -1089,7 +1090,7 @@ class TableDiffFormatter extends DiffFormatter {
 class InlineDiffFormatter extends DiffFormatter {
     var $colspan = 4;
 
-    function InlineDiffFormatter() {
+    function __construct() {
         $this->leading_context_lines = 2;
         $this->trailing_context_lines = 2;
     }
diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php
index ac6698a63114913c8684fa788aec4bbcef60d750..43b19e9abf0c6e1332b51bb8d6a94b683a251ef6 100644
--- a/inc/SafeFN.class.php
+++ b/inc/SafeFN.class.php
@@ -16,9 +16,9 @@
 class SafeFN {
 
     // 'safe' characters are a superset of $plain, $pre_indicator and $post_indicator
-    private static $plain = '-/_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted
+    private static $plain = '-./[_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted
     private static $pre_indicator = '%';
-    private static $post_indicator = '.';
+    private static $post_indicator = ']';
 
     /**
      * Convert an UTF-8 string to a safe ASCII String
@@ -37,7 +37,7 @@ class SafeFN {
      *    - reduce codepoint value for non-printable ASCII characters (0x00 - 0x1f).  Space becomes our zero.
      *    - convert reduced value to base36 (0-9a-z)
      *    - append $pre_indicator characater followed by base36 string to output, set converted flag
-     *      continue to next character)
+     *    (continue to next character)
      *
      * @param    string    $filename     a utf8 string, should only include printable characters - not 0x00-0x1f
      * @return   string    an encoded representation of $filename using only 'safe' ASCII characters
diff --git a/inc/auth.php b/inc/auth.php
index 53376be342a93bfe5bc93927aa20ed623af7bf6f..a480a4a8ab416f665920fd6231df5c20ec6ad993 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -189,8 +189,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){
         if ($auth->checkPass($user,$pass)){
             // make logininfo globally available
             $_SERVER['REMOTE_USER'] = $user;
-            $secret = auth_cookiesalt();
-            if(!$sticky) $secret .= session_id; //bind non-sticky to session
+            $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session
             auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky);
             return true;
         }else{
@@ -220,8 +219,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){
                 return true;
             }
             // no we don't trust it yet - recheck pass but silent
-            $secret = auth_cookiesalt();
-            if(!$sticky) $secret .= session_id(); //bind non-sticky to session
+            $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session
             $pass = PMA_blowfish_decrypt($pass,$secret);
             return auth_login($user,$pass,$sticky,true);
         }
@@ -303,10 +301,10 @@ function auth_browseruid(){
  * and stored in this file.
  *
  * @author  Andreas Gohr <andi@splitbrain.org>
- *
+ * @param   bool $addsession if true, the sessionid is added to the salt
  * @return  string
  */
-function auth_cookiesalt(){
+function auth_cookiesalt($addsession=false){
     global $conf;
     $file = $conf['metadir'].'/_htcookiesalt';
     $salt = io_readFile($file);
@@ -314,6 +312,9 @@ function auth_cookiesalt(){
         $salt = uniqid(rand(),true);
         io_saveFile($file,$salt);
     }
+    if($addsession){
+        $salt .= session_id();
+    }
     return $salt;
 }
 
@@ -814,11 +815,11 @@ function updateprofile() {
 
     if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) {
         // update cookie and session with the changed data
-        $cookie = base64_decode($_COOKIE[DOKU_COOKIE]);
-        list($user,$sticky,$pass) = explode('|',$cookie,3);
-        if ($changes['pass']) $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt());
-
-        auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky);
+        if ($changes['pass']){
+            list($user,$sticky,$pass) = auth_getCookie();
+            $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky));
+            auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky);
+        }
         return true;
     }
 }
diff --git a/inc/form.php b/inc/form.php
index 30e16b626cf7954f715385ca1e6217dceb5dab1f..e74c52c5d38ec41292dc44652765ef8abd0e0415 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -252,7 +252,7 @@ class Doku_Form {
         global $lang;
         $form = '';
         $this->params['accept-charset'] = $lang['encoding'];
-        $form .= '<form ' . buildAttributes($this->params,true) . '><div class="no">' . DOKU_LF;
+        $form .= '<form ' . buildAttributes($this->params,false) . '><div class="no">' . DOKU_LF;
         if (!empty($this->_hidden)) {
             foreach ($this->_hidden as $name=>$value)
                 $form .= form_hidden(array('name'=>$name, 'value'=>$value));
diff --git a/inc/html.php b/inc/html.php
index fcfa54b6c7f8cd7744453a7875219c1aa1bec69b..6e187ebe1e5a671931cfded36e96e1e64eec2b5d 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -355,7 +355,7 @@ function html_search(){
         }
         print '</ul> ';
         //clear float (see http://www.complexspiral.com/publications/containing-floats/)
-        print '<div class="clearer">&nbsp;</div>';
+        print '<div class="clearer"></div>';
         print '</div>';
     }
     flush();
@@ -457,11 +457,7 @@ function html_revisions($first=0){
         $form->addElement($date);
         $form->addElement(form_makeCloseTag('span'));
 
-        $form->addElement(form_makeTag('img', array(
-                        'src' =>  DOKU_BASE.'lib/images/blank.gif',
-                        'width' => '15',
-                        'height' => '11',
-                        'alt'    => '')));
+        $form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
 
         $form->addElement(form_makeOpenTag('a', array(
                         'class' => 'wikilink1',
@@ -499,11 +495,7 @@ function html_revisions($first=0){
                             'name' => 'rev2[]',
                             'value' => $rev)));
         }else{
-            $form->addElement(form_makeTag('img', array(
-                            'src' => DOKU_BASE.'lib/images/blank.gif',
-                            'width' => 14,
-                            'height' => 11,
-                            'alt' => '')));
+            $form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
         }
 
         $form->addElement(form_makeOpenTag('span', array('class' => 'date')));
@@ -524,11 +516,7 @@ function html_revisions($first=0){
             $form->addElement($ID);
             $form->addElement(form_makeCloseTag('a'));
         }else{
-            $form->addElement(form_makeTag('img', array(
-                            'src' => DOKU_BASE.'lib/images/blank.gif',
-                            'width' => '15',
-                            'height' => '11',
-                            'alt'   => '')));
+            $form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
             $form->addElement($ID);
         }
 
@@ -1004,7 +992,7 @@ function html_diff($text='',$intro=true,$type=null){
     if($intro) print p_locale_xhtml('diff');
 
     if (!$text) {
-        ptln('<p class="difflink">');
+        ptln('<div class="diffoptions">');
 
         $form = new Doku_Form(array('action'=>wl()));
         $form->addHidden('id',$ID);
@@ -1030,8 +1018,8 @@ function html_diff($text='',$intro=true,$type=null){
                         'rev2[1]'  => $r_rev,
                         'difftype' => $type,
                       ));
-        ptln('<br /><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a>');
-        ptln('</p>');
+        ptln('<p><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a></p>');
+        ptln('</div>');
     }
     ?>
     <table class="diff diff_<?php echo $type?>">
@@ -1109,7 +1097,7 @@ function html_register(){
     $form->startFieldset($lang['btn_register']);
     $form->addHidden('do', 'register');
     $form->addHidden('save', '1');
-    $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], null, 'block', array('size'=>'50')));
+    $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block', array('size'=>'50')));
     if (!$conf['autopasswd']) {
         $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50')));
         $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50')));
@@ -1436,7 +1424,7 @@ function html_admin(){
 
     // data security check
     // @todo: could be checked and only displayed if $conf['savedir'] is under the web root
-    echo '<a style="border:none; float:right;" target="_blank"
+    echo '<a style="border:none; float:right;"
             href="http://www.dokuwiki.org/security#web_access_security">
             <img src="data/security.png" alt="Your data directory seems to be protected properly."
              onerror="this.parentNode.style.display=\'none\'" /></a>';
diff --git a/inc/indexer.php b/inc/indexer.php
index b42c092fa05ecfd706c2c790f4af5078ae3c7762..1db966656afae3a624d9f9a09d73f3bf1b744f9f 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -117,41 +117,41 @@ class Doku_Indexer {
      * @author Andreas Gohr <andi@splitbrain.org>
      */
     public function addPageWords($page, $text) {
-        if (!$this->_lock())
+        if (!$this->lock())
             return "locked";
 
         // load known documents
-        $pid = $this->_addIndexKey('page', '', $page);
+        $pid = $this->addIndexKey('page', '', $page);
         if ($pid === false) {
-            $this->_unlock();
+            $this->unlock();
             return false;
         }
 
         $pagewords = array();
         // get word usage in page
-        $words = $this->_getPageWords($text);
+        $words = $this->getPageWords($text);
         if ($words === false) {
-            $this->_unlock();
+            $this->unlock();
             return false;
         }
 
         if (!empty($words)) {
             foreach (array_keys($words) as $wlen) {
-                $index = $this->_getIndex('i', $wlen);
+                $index = $this->getIndex('i', $wlen);
                 foreach ($words[$wlen] as $wid => $freq) {
                     $idx = ($wid<count($index)) ? $index[$wid] : '';
-                    $index[$wid] = $this->_updateTuple($idx, $pid, $freq);
+                    $index[$wid] = $this->updateTuple($idx, $pid, $freq);
                     $pagewords[] = "$wlen*$wid";
                 }
-                if (!$this->_saveIndex('i', $wlen, $index)) {
-                    $this->_unlock();
+                if (!$this->saveIndex('i', $wlen, $index)) {
+                    $this->unlock();
                     return false;
                 }
             }
         }
 
         // Remove obsolete index entries
-        $pageword_idx = $this->_getIndexKey('pageword', '', $pid);
+        $pageword_idx = $this->getIndexKey('pageword', '', $pid);
         if ($pageword_idx !== '') {
             $oldwords = explode(':',$pageword_idx);
             $delwords = array_diff($oldwords, $pagewords);
@@ -164,32 +164,34 @@ class Doku_Indexer {
                 }
             }
             foreach ($upwords as $wlen => $widx) {
-                $index = $this->_getIndex('i', $wlen);
+                $index = $this->getIndex('i', $wlen);
                 foreach ($widx as $wid) {
-                    $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0);
+                    $index[$wid] = $this->updateTuple($index[$wid], $pid, 0);
                 }
-                $this->_saveIndex('i', $wlen, $index);
+                $this->saveIndex('i', $wlen, $index);
             }
         }
         // Save the reverse index
         $pageword_idx = join(':', $pagewords);
-        if (!$this->_saveIndexKey('pageword', '', $pid, $pageword_idx)) {
-            $this->_unlock();
+        if (!$this->saveIndexKey('pageword', '', $pid, $pageword_idx)) {
+            $this->unlock();
             return false;
         }
 
-        $this->_unlock();
+        $this->unlock();
         return true;
     }
 
     /**
      * Split the words in a page and add them to the index.
      *
+     * @param string    $text   content of the page
+     * @return array            list of word IDs and number of times used
      * @author Andreas Gohr <andi@splitbrain.org>
      * @author Christopher Smith <chris@jalakai.co.uk>
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _getPageWords($text) {
+    protected function getPageWords($text) {
         global $conf;
 
         $tokens = $this->tokenizer($text);
@@ -209,7 +211,7 @@ class Doku_Indexer {
         $word_idx_modified = false;
         $index = array();   //resulting index
         foreach (array_keys($words) as $wlen) {
-            $word_idx = $this->_getIndex('w', $wlen);
+            $word_idx = $this->getIndex('w', $wlen);
             foreach ($words[$wlen] as $word => $freq) {
                 $wid = array_search($word, $word_idx);
                 if ($wid === false) {
@@ -222,7 +224,7 @@ class Doku_Indexer {
                 $index[$wlen][$wid] = $freq;
             }
             // save back the word index
-            if ($word_idx_modified && !$this->_saveIndex('w', $wlen, $word_idx))
+            if ($word_idx_modified && !$this->saveIndex('w', $wlen, $word_idx))
                 return false;
         }
 
@@ -252,13 +254,13 @@ class Doku_Indexer {
             trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING);
         }
 
-        if (!$this->_lock())
+        if (!$this->lock())
             return "locked";
 
         // load known documents
-        $pid = $this->_addIndexKey('page', '', $page);
+        $pid = $this->addIndexKey('page', '', $page);
         if ($pid === false) {
-            $this->_unlock();
+            $this->unlock();
             return false;
         }
 
@@ -267,20 +269,20 @@ class Doku_Indexer {
             $value = $key['title'];
             if (is_array($value))
                 $value = $value[0];
-            $this->_saveIndexKey('title', '', $pid, $value);
+            $this->saveIndexKey('title', '', $pid, $value);
             unset($key['title']);
         }
 
         foreach ($key as $name => $values) {
             $metaname = idx_cleanName($name);
-            $this->_addIndexKey('metadata', '', $metaname);
-            $metaidx = $this->_getIndex($metaname, '_i');
-            $metawords = $this->_getIndex($metaname, '_w');
+            $this->addIndexKey('metadata', '', $metaname);
+            $metaidx = $this->getIndex($metaname.'_i', '');
+            $metawords = $this->getIndex($metaname.'_w', '');
             $addwords = false;
 
             if (!is_array($values)) $values = array($values);
 
-            $val_idx = $this->_getIndexKey($metaname, '_p', $pid);
+            $val_idx = $this->getIndexKey($metaname.'_p', '', $pid);
             if ($val_idx != '') {
                 $val_idx = explode(':', $val_idx);
                 // -1 means remove, 0 keep, 1 add
@@ -308,30 +310,30 @@ class Doku_Indexer {
             }
 
             if ($addwords)
-                $this->_saveIndex($metaname.'_w', '', $metawords);
+                $this->saveIndex($metaname.'_w', '', $metawords);
             $vals_changed = false;
             foreach ($val_idx as $id => $action) {
                 if ($action == -1) {
-                    $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0);
+                    $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 0);
                     $vals_changed = true;
                     unset($val_idx[$id]);
                 } elseif ($action == 1) {
-                    $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1);
+                    $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 1);
                     $vals_changed = true;
                 }
             }
 
             if ($vals_changed) {
-                $this->_saveIndex($metaname.'_i', '', $metaidx);
+                $this->saveIndex($metaname.'_i', '', $metaidx);
                 $val_idx = implode(':', array_keys($val_idx));
-                $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx);
+                $this->saveIndexKey($metaname.'_p', '', $pid, $val_idx);
             }
 
             unset($metaidx);
             unset($metawords);
         }
 
-        $this->_unlock();
+        $this->unlock();
         return true;
     }
 
@@ -345,18 +347,18 @@ class Doku_Indexer {
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
     public function deletePage($page) {
-        if (!$this->_lock())
+        if (!$this->lock())
             return "locked";
 
         // load known documents
-        $pid = $this->_getIndexKey('page', '', $page);
+        $pid = $this->getIndexKey('page', '', $page);
         if ($pid === false) {
-            $this->_unlock();
+            $this->unlock();
             return false;
         }
 
         // Remove obsolete index entries
-        $pageword_idx = $this->_getIndexKey('pageword', '', $pid);
+        $pageword_idx = $this->getIndexKey('pageword', '', $pid);
         if ($pageword_idx !== '') {
             $delwords = explode(':',$pageword_idx);
             $upwords = array();
@@ -368,32 +370,32 @@ class Doku_Indexer {
                 }
             }
             foreach ($upwords as $wlen => $widx) {
-                $index = $this->_getIndex('i', $wlen);
+                $index = $this->getIndex('i', $wlen);
                 foreach ($widx as $wid) {
-                    $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0);
+                    $index[$wid] = $this->updateTuple($index[$wid], $pid, 0);
                 }
-                $this->_saveIndex('i', $wlen, $index);
+                $this->saveIndex('i', $wlen, $index);
             }
         }
         // Save the reverse index
-        if (!$this->_saveIndexKey('pageword', '', $pid, "")) {
-            $this->_unlock();
+        if (!$this->saveIndexKey('pageword', '', $pid, "")) {
+            $this->unlock();
             return false;
         }
 
-        $this->_saveIndexKey('title', '', $pid, "");
-        $keyidx = $this->_getIndex('metadata', '');
+        $this->saveIndexKey('title', '', $pid, "");
+        $keyidx = $this->getIndex('metadata', '');
         foreach ($keyidx as $metaname) {
-            $val_idx = explode(':', $this->_getIndexKey($metaname.'_p', '', $pid));
-            $meta_idx = $this->_getIndex($metaname.'_i', '');
+            $val_idx = explode(':', $this->getIndexKey($metaname.'_p', '', $pid));
+            $meta_idx = $this->getIndex($metaname.'_i', '');
             foreach ($val_idx as $id) {
-                $meta_idx[$id] = $this->_updateTuple($meta_idx[$id], $pid, 0);
+                $meta_idx[$id] = $this->updateTuple($meta_idx[$id], $pid, 0);
             }
-            $this->_saveIndex($metaname.'_i', '', $meta_idx);
-            $this->_saveIndexKey($metaname.'_p', '', $pid, '');
+            $this->saveIndex($metaname.'_i', '', $meta_idx);
+            $this->saveIndexKey($metaname.'_p', '', $pid, '');
         }
 
-        $this->_unlock();
+        $this->unlock();
         return true;
     }
 
@@ -469,17 +471,17 @@ class Doku_Indexer {
      */
     public function lookup(&$tokens) {
         $result = array();
-        $wids = $this->_getIndexWords($tokens, $result);
+        $wids = $this->getIndexWords($tokens, $result);
         if (empty($wids)) return array();
         // load known words and documents
-        $page_idx = $this->_getIndex('page', '');
+        $page_idx = $this->getIndex('page', '');
         $docs = array();
         foreach (array_keys($wids) as $wlen) {
             $wids[$wlen] = array_unique($wids[$wlen]);
-            $index = $this->_getIndex('i', $wlen);
+            $index = $this->getIndex('i', $wlen);
             foreach($wids[$wlen] as $ixid) {
                 if ($ixid < count($index))
-                    $docs["$wlen*$ixid"] = $this->_parseTuples($page_idx, $index[$ixid]);
+                    $docs["$wlen*$ixid"] = $this->parseTuples($page_idx, $index[$ixid]);
             }
         }
         // merge found pages into final result array
@@ -531,9 +533,9 @@ class Doku_Indexer {
 
         // get all words in order to search the matching ids
         if ($key == 'title') {
-            $words = $this->_getIndex('title', '');
+            $words = $this->getIndex('title', '');
         } else {
-            $words = $this->_getIndex($metaname, '_w');
+            $words = $this->getIndex($metaname.'_w', '');
         }
 
         if (!is_null($func)) {
@@ -576,7 +578,7 @@ class Doku_Indexer {
             $result[$val] = array();
         }
 
-        $page_idx = $this->_getIndex('page', '');
+        $page_idx = $this->getIndex('page', '');
 
         // Special handling for titles
         if ($key == 'title') {
@@ -588,12 +590,12 @@ class Doku_Indexer {
             }
         } else {
             // load all lines and pages so the used lines can be taken and matched with the pages
-            $lines = $this->_getIndex($metaname, '_i');
+            $lines = $this->getIndex($metaname.'_i', '');
 
             foreach ($value_ids as $value_id => $val_list) {
                 // parse the tuples of the form page_id*1:page2_id*1 and so on, return value
                 // is an array with page_id => 1, page2_id => 1 etc. so take the keys only
-                $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id]));
+                $pages = array_keys($this->parseTuples($page_idx, $lines[$value_id]));
                 foreach ($val_list as $val) {
                     $result[$val] = array_merge($result[$val], $pages);
                 }
@@ -616,7 +618,7 @@ class Doku_Indexer {
      * @return array            Set to length => array(id ...)
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _getIndexWords(&$words, &$result) {
+    protected function getIndexWords(&$words, &$result) {
         $tokens = array();
         $tokenlength = array();
         $tokenwild = array();
@@ -656,12 +658,12 @@ class Doku_Indexer {
         // $tokenlength = array( base word length => base word ... )
         // $tokenwild = array( base word => base word length ... )
         $length_filter = empty($tokenwild) ? $tokenlength : min(array_keys($tokenlength));
-        $indexes_known = $this->_indexLengths($length_filter);
+        $indexes_known = $this->indexLengths($length_filter);
         if (!empty($tokenwild)) sort($indexes_known);
         // get word IDs
         $wids = array();
         foreach ($indexes_known as $ixlen) {
-            $word_idx = $this->_getIndex('w', $ixlen);
+            $word_idx = $this->getIndex('w', $ixlen);
             // handle exact search
             if (isset($tokenlength[$ixlen])) {
                 foreach ($tokenlength[$ixlen] as $xword) {
@@ -697,14 +699,14 @@ class Doku_Indexer {
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
     public function getPages($key=null) {
-        $page_idx = $this->_getIndex('page', '');
+        $page_idx = $this->getIndex('page', '');
         if (is_null($key)) return $page_idx;
 
         $metaname = idx_cleanName($key);
 
         // Special handling for titles
         if ($key == 'title') {
-            $title_idx = $this->_getIndex('title', '');
+            $title_idx = $this->getIndex('title', '');
             array_splice($page_idx, count($title_idx));
             foreach ($title_idx as $i => $title)
                 if ($title === "") unset($page_idx[$i]);
@@ -712,9 +714,9 @@ class Doku_Indexer {
         }
 
         $pages = array();
-        $lines = $this->_getIndex($metaname, '_i');
+        $lines = $this->getIndex($metaname.'_i', '');
         foreach ($lines as $line) {
-            $pages = array_merge($pages, $this->_parseTuples($page_idx, $line));
+            $pages = array_merge($pages, $this->parseTuples($page_idx, $line));
         }
         return array_keys($pages);
     }
@@ -738,7 +740,7 @@ class Doku_Indexer {
         $result = array();
 
         if ($key == 'title') {
-            $index = $this->_getIndex('title', '');
+            $index = $this->getIndex('title', '');
             $index = array_count_values($index);
             foreach ($index as $val => $cnt) {
                 if ($cnt >= $min && (!$max || $cnt <= $max) && strlen($val) >= $minlen)
@@ -747,15 +749,15 @@ class Doku_Indexer {
         }
         elseif (!is_null($key)) {
             $metaname = idx_cleanName($key);
-            $index = $this->_getIndex($metaname.'_i', '');
+            $index = $this->getIndex($metaname.'_i', '');
             $val_idx = array();
             foreach ($index as $wid => $line) {
-                $freq = $this->_countTuples($line);
+                $freq = $this->countTuples($line);
                 if ($freq >= $min && (!$max || $freq <= $max) && strlen($val) >= $minlen)
                     $val_idx[$wid] = $freq;
             }
             if (!empty($val_idx)) {
-                $words = $this->_getIndex($metaname.'_w', '');
+                $words = $this->getIndex($metaname.'_w', '');
                 foreach ($val_idx as $wid => $freq)
                     $result[$words[$wid]] = $freq;
             }
@@ -764,13 +766,13 @@ class Doku_Indexer {
             $lengths = idx_listIndexLengths();
             foreach ($lengths as $length) {
                 if ($length < $minlen) continue;
-                $index = $this->_getIndex('i', $length);
+                $index = $this->getIndex('i', $length);
                 $words = null;
                 foreach ($index as $wid => $line) {
-                    $freq = $this->_countTuples($line);
+                    $freq = $this->countTuples($line);
                     if ($freq >= $min && (!$max || $freq <= $max)) {
                         if ($words === null)
-                            $words = $this->_getIndex('w', $length);
+                            $words = $this->getIndex('w', $length);
                         $result[$words[$wid]] = $freq;
                     }
                 }
@@ -786,7 +788,7 @@ class Doku_Indexer {
      *
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _lock() {
+    protected function lock() {
         global $conf;
         $status = true;
         $run = 0;
@@ -816,7 +818,7 @@ class Doku_Indexer {
      *
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _unlock() {
+    protected function unlock() {
         global $conf;
         @rmdir($conf['lockdir'].'/_indexer.lock');
         return true;
@@ -825,9 +827,16 @@ class Doku_Indexer {
     /**
      * Retrieve the entire index.
      *
+     * The $suffix argument is for an index that is split into
+     * multiple parts. Different index files should use different
+     * base names.
+     *
+     * @param string    $idx    name of the index
+     * @param string    $suffix subpart identifier
+     * @return array            list of lines without CR or LF
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _getIndex($idx, $suffix) {
+    protected function getIndex($idx, $suffix) {
         global $conf;
         $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
         if (!@file_exists($fn)) return array();
@@ -837,9 +846,12 @@ class Doku_Indexer {
     /**
      * Replace the contents of the index with an array.
      *
+     * @param string    $idx    name of the index
+     * @param string    $suffix subpart identifier
+     * @param arrayref  $linex  list of lines without LF
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _saveIndex($idx, $suffix, &$lines) {
+    protected function saveIndex($idx, $suffix, &$lines) {
         global $conf;
         $fn = $conf['indexdir'].'/'.$idx.$suffix;
         $fh = @fopen($fn.'.tmp', 'w');
@@ -850,16 +862,20 @@ class Doku_Indexer {
             chmod($fn.'.tmp', $conf['fperm']);
         io_rename($fn.'.tmp', $fn.'.idx');
         if ($suffix !== '')
-            $this->_cacheIndexDir($idx, $suffix, empty($lines));
+            $this->cacheIndexDir($idx, $suffix, empty($lines));
         return true;
     }
 
     /**
      * Retrieve a line from the index.
      *
+     * @param string    $idx    name of the index
+     * @param string    $suffix subpart identifier
+     * @param int       $id     the line number
+     * @return string           a line with trailing whitespace removed
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _getIndexKey($idx, $suffix, $id) {
+    protected function getIndexKey($idx, $suffix, $id) {
         global $conf;
         $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
         if (!@file_exists($fn)) return '';
@@ -876,9 +892,13 @@ class Doku_Indexer {
     /**
      * Write a line into the index.
      *
+     * @param string    $idx    name of the index
+     * @param string    $suffix subpart identifier
+     * @param int       $id     the line number
+     * @param string    $line   line to write
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _saveIndexKey($idx, $suffix, $id, $line) {
+    protected function saveIndexKey($idx, $suffix, $id, $line) {
         global $conf;
         if (substr($line, -1) != "\n")
             $line .= "\n";
@@ -908,22 +928,26 @@ class Doku_Indexer {
             chmod($fn.'.tmp', $conf['fperm']);
         io_rename($fn.'.tmp', $fn.'.idx');
         if ($suffix !== '')
-            $this->_cacheIndexDir($idx, $suffix);
+            $this->cacheIndexDir($idx, $suffix);
         return true;
     }
 
     /**
      * Retrieve or insert a value in the index.
      *
+     * @param string    $idx    name of the index
+     * @param string    $suffix subpart identifier
+     * @param string    $value  line to find in the index
+     * @return int              line number of the value in the index
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _addIndexKey($idx, $suffix, $value) {
-        $index = $this->_getIndex($idx, $suffix);
+    protected function addIndexKey($idx, $suffix, $value) {
+        $index = $this->getIndex($idx, $suffix);
         $id = array_search($value, $index);
         if ($id === false) {
             $id = count($index);
             $index[$id] = $value;
-            if (!$this->_saveIndex($idx, $suffix, $index)) {
+            if (!$this->saveIndex($idx, $suffix, $index)) {
                 trigger_error("Failed to write $idx index", E_USER_ERROR);
                 return false;
             }
@@ -931,7 +955,7 @@ class Doku_Indexer {
         return $id;
     }
 
-    private function _cacheIndexDir($idx, $suffix, $delete=false) {
+    protected function cacheIndexDir($idx, $suffix, $delete=false) {
         global $conf;
         if ($idx == 'i')
             $cachename = $conf['indexdir'].'/lengths';
@@ -968,7 +992,7 @@ class Doku_Indexer {
      *
      * @author YoBoY <yoboy.leguesh@gmail.com>
      */
-    private function _listIndexLengths() {
+    protected function listIndexLengths() {
         global $conf;
         $cachename = $conf['indexdir'].'/lengths';
         clearstatcache();
@@ -1018,7 +1042,7 @@ class Doku_Indexer {
      *
      * @author YoBoY <yoboy.leguesh@gmail.com>
      */
-    private function _indexLengths($filter) {
+    protected function indexLengths($filter) {
         global $conf;
         $idx = array();
         if (is_array($filter)) {
@@ -1044,7 +1068,7 @@ class Doku_Indexer {
      *
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _updateTuple($line, $id, $count) {
+    protected function updateTuple($line, $id, $count) {
         $newLine = $line;
         if ($newLine !== '')
             $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine);
@@ -1064,7 +1088,7 @@ class Doku_Indexer {
      * @author Tom N Harris <tnharris@whoopdedo.org>
      * @author Andreas Gohr <andi@splitbrain.org>
      */
-    private function _parseTuples(&$keys, $line) {
+    protected function parseTuples(&$keys, $line) {
         $result = array();
         if ($line == '') return $result;
         $parts = explode(':', $line);
@@ -1084,7 +1108,7 @@ class Doku_Indexer {
      *
      * @author Tom N Harris <tnharris@whoopdedo.org>
      */
-    private function _countTuples($line) {
+    protected function countTuples($line) {
         $freq = 0;
         $parts = explode(':', $line);
         foreach ($parts as $tuple) {
diff --git a/inc/lang/.htaccess b/inc/lang/.htaccess
index 2ca129b1236ffd9f114abc2e4894a58bb192b5e9..572f5156ff6416ed577efba7c2ca0f1af1f66b3a 100644
--- a/inc/lang/.htaccess
+++ b/inc/lang/.htaccess
@@ -1,3 +1,4 @@
-## no access to the lang directory
-order allow,deny
-deny from all
+## no access to the lang directory
+order allow,deny
+deny from all
+Satisfy All
diff --git a/inc/lang/az/admin.txt b/inc/lang/az/admin.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/adminplugins.txt b/inc/lang/az/adminplugins.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/backlinks.txt b/inc/lang/az/backlinks.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/conflict.txt b/inc/lang/az/conflict.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/diff.txt b/inc/lang/az/diff.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/draft.txt b/inc/lang/az/draft.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/edit.txt b/inc/lang/az/edit.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/editrev.txt b/inc/lang/az/editrev.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/index.txt b/inc/lang/az/index.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/install.html b/inc/lang/az/install.html
old mode 100755
new mode 100644
diff --git a/inc/lang/az/locked.txt b/inc/lang/az/locked.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/login.txt b/inc/lang/az/login.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/mailtext.txt b/inc/lang/az/mailtext.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/newpage.txt b/inc/lang/az/newpage.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/norev.txt b/inc/lang/az/norev.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/password.txt b/inc/lang/az/password.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/preview.txt b/inc/lang/az/preview.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/pwconfirm.txt b/inc/lang/az/pwconfirm.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/read.txt b/inc/lang/az/read.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/recent.txt b/inc/lang/az/recent.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/register.txt b/inc/lang/az/register.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/registermail.txt b/inc/lang/az/registermail.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/resendpwd.txt b/inc/lang/az/resendpwd.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/revisions.txt b/inc/lang/az/revisions.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/showrev.txt b/inc/lang/az/showrev.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/stopwords.txt b/inc/lang/az/stopwords.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/updateprofile.txt b/inc/lang/az/updateprofile.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/uploadmail.txt b/inc/lang/az/uploadmail.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/az/wordblock.txt b/inc/lang/az/wordblock.txt
old mode 100755
new mode 100644
diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html
index 6dde7e4cefc57a62a48136b127c32544b8df21d5..9d275d82ac6afbd126f9c2e6e2685c44bc51dcc1 100644
--- a/inc/lang/bg/install.html
+++ b/inc/lang/bg/install.html
@@ -7,12 +7,11 @@
 За да функционира нормално DokuWiki 
 <strong>трябва</strong> да има право за писане в директориите, които съдържат тези
 файлове. Инсталаторът не може да настройва правата на директориите. 
-Обикновено трябва да направите това директно от командният ред или ако 
-ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).</p>
+Вие трябва да направите това директно от командният ред или ако ползвате хостинг през FTP или контролния панела на хоста (примерно cPanel).</p>
 
 <p>Инсталаторът ще настрои вашата DokuWiki конфигурация на
 <acronym title="списъка за достъп">ACL</acronym>, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол 
-на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.</p>
+на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането по-лесно.</p>
 
-<p>Опитните потребители или потребителите със специални изисквания към настройките имат на разположение информация относно <a href="http://dokuwiki.org/install"> инсталацията</a>
-и <a href="http://dokuwiki.org/config">настройките</a>.</p>
+<p>Опитните потребители и потребителите със специални изисквания към настройките имат на разположение допълнителна информация относно <a href="http://dokuwiki.org/install">инсталирането</a>
+и <a href="http://dokuwiki.org/config">настройването</a>.</p>
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index c7c52b70f1cb833a7cd52bde02f3a271e24f941e..1acf39acbba4c47d9c7c535ea0cadb19f46f116e 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -134,7 +134,7 @@ $lang['uploadexist']           = 'Файлът вече съществува. Н
 $lang['uploadbadcontent']      = 'Каченото съдържание не съответства на файлово разширение %s .';
 $lang['uploadspam']            = 'Качването е блокирано от SPAM списъка.';
 $lang['uploadxss']             = 'Качването е блокирано, поради възможно зловредно съдържание.';
-$lang['uploadsize']            = 'Файльт за качване е прекалено голям. (макс. %s)';
+$lang['uploadsize']            = 'Файлът за качване е прекалено голям. (макс. %s)';
 $lang['deletesucc']            = 'Файлът "%s" бе изтрит.';
 $lang['deletefail']            = '"%s" не може да бъде изтрит - проверете правата.';
 $lang['mediainuse']            = 'Файлът "%s" не бе изтрит - все още се ползва.';
@@ -241,7 +241,7 @@ $lang['i_wikiname']            = 'Име на Wiki-то';
 $lang['i_enableacl']           = 'Ползване на списък за достъп (ACL) [препоръчително]';
 $lang['i_superuser']           = 'Супер потребител';
 $lang['i_problems']            = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.';
-$lang['i_modified']            = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталация на Dokuwiki</a>.';
+$lang['i_modified']            = 'Поради мерки за сигурност инсталатора работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с <a href="http://dokuwiki.org/install">Инструкциите за инсталиране на Dokuwiki</a>.';
 $lang['i_funcna']              = 'PHP функцията <code>%s</code> не е достъпна. Може би е забранена от доставчика на хостинг.';
 $lang['i_phpver']              = 'Инсталираната версия <code>%s</code> на PHP е по-стара от необходимата <code>%s</code>. Актуализирайте PHP инсталацията.';
 $lang['i_permfail']            = '<code>%s</code> не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!';
diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt
index 2c4252e151a79e3f805164ffe417e69edd8a525d..802153fd472a0f243fd7558555c2a685e38b98ff 100644
--- a/inc/lang/bg/pwconfirm.txt
+++ b/inc/lang/bg/pwconfirm.txt
@@ -3,7 +3,7 @@
 Някой е поискал нова парола за потребител @TITLE@
 на @DOKUWIKIURL@
 
-Ако не сте поискали нова парола, товава просто игнорирайте това писмо.
+Ако не сте поискали нова парола, тогава просто игнорирайте това писмо.
 
 За да потвърдите, че искането е наистина от вас, моля ползвайте следния линк:
 
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index 305c080f11a0440ec5c9b2e23967600a9c17ca65..4bb1c005d3b2eb4378855a480c90d20dc93b0ed4 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -161,6 +161,9 @@ $lang['yours']                 = 'Via Versio';
 $lang['diff']                  = 'Montri diferencojn el la aktuala versio';
 $lang['diff2']                 = 'Montri diferencojn inter la elektitaj revizioj';
 $lang['difflink']              = 'Ligilo al kompara rigardo';
+$lang['diff_type']             = 'Rigardi malsamojn:';
+$lang['diff_inline']           = 'Samlinie';
+$lang['diff_side']             = 'Apude';
 $lang['line']                  = 'Linio';
 $lang['breadcrumb']            = 'Paŝoj';
 $lang['youarehere']            = 'Vi estas ĉi tie';
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index bc52625e02188383200d581bbb4897793b9fbff3..35f7b3c096d9169c21b584124a77d4f0438da5f2 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -159,6 +159,9 @@ $lang['yours']                 = 'Sinun versiosi';
 $lang['diff']                  = 'Näytä eroavaisuudet nykyiseen versioon';
 $lang['diff2']                 = 'Näytä eroavaisuudet valittuun versioon';
 $lang['difflink']              = 'Linkki vertailunäkymään';
+$lang['diff_type']             = 'Näytä eroavaisuudet:';
+$lang['diff_inline']           = 'Sisäkkäin';
+$lang['diff_side']             = 'Vierekkäin';
 $lang['line']                  = 'Rivi';
 $lang['breadcrumb']            = 'Jäljet';
 $lang['youarehere']            = 'Olet täällä';
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index d503bae316a01f5a1f3ed13612043748ac9520bc..e8999e05bca51918c09788c22c50a6d83891db43 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -158,6 +158,9 @@ $lang['yours']                 = 'あなたのバージョン';
 $lang['diff']                  = '現在のリビジョンとの差分を表示';
 $lang['diff2']                 = '選択したリビジョン間の差分を表示';
 $lang['difflink']              = 'この比較画面にリンクする';
+$lang['diff_type']             = '差分の表示方法:';
+$lang['diff_inline']           = 'インライン';
+$lang['diff_side']             = '横に並べる';
 $lang['line']                  = 'ライン';
 $lang['breadcrumb']            = 'トレース';
 $lang['youarehere']            = '現在位置';
diff --git a/inc/pageutils.php b/inc/pageutils.php
index cd01dcae75df09aeed779a04e5b0251507d9299f..c9bf601359f565615376241bc498035cf30474fa 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -423,8 +423,14 @@ function resolve_mediaid($ns,&$page,&$exists){
  */
 function resolve_pageid($ns,&$page,&$exists){
     global $conf;
+    global $ID;
     $exists = false;
 
+    //empty address should point to current page
+    if ($page === "") {
+        $page = $ID;
+    }
+
     //keep hashlink if exists then clean both parts
     if (strpos($page,'#')) {
         list($page,$hash) = explode('#',$page,2);
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index e47ce56fa3dab93de895c3404bd6a7f940d6a03d..68d4e4569b130928924a6a5c3c2f65711fa5e7c2 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode {
 
     function connectTo($mode) {
         // Word boundaries?
-        $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink');
+        $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.*?)\]\]",$mode,'internallink');
     }
 
     function getSort() {
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 9405d94208967f35b4bdcdbb97eefc70e22b9870..ab295dd017cf132521e1419a3eb61c6536a8bda3 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -574,11 +574,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
             $params = $parts[1];
         }
 
+        // For empty $id we need to know the current $ID
+        // We need this check because _simpleTitle needs
+        // correct $id and resolve_pageid() use cleanID($id)
+        // (some things could be lost)
+        if ($id === '') {
+            $id = $ID;
+        }
+
         // default name is based on $id as given
         $default = $this->_simpleTitle($id);
 
         // now first resolve and clean up the $id
         resolve_pageid(getNS($ID),$id,$exists);
+
         $name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype);
         if ( !$isImage ) {
             if ( $exists ) {
diff --git a/lib/_fla/.htaccess b/lib/_fla/.htaccess
index 9a7d38c121dabd8256a70cda5cc6f2604ab9039a..055d099c772b155fa0749e628b58e7f49b649c30 100644
--- a/lib/_fla/.htaccess
+++ b/lib/_fla/.htaccess
@@ -1,3 +1,4 @@
 ## no access to the fla directory
 order allow,deny
 deny from all
+Satisfy All
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 3e7bd8121ffc1a4322087679141074815f0cd3fa..c8b7b1e6e55c14983718d0ad4d60093e26985cc4 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -17,7 +17,7 @@ if(!defined('DOKU_INC')) die();
 class admin_plugin_acl extends DokuWiki_Admin_Plugin {
     var $acl = null;
     var $ns  = null;
-    /** 
+    /**
      * The currently selected item, associative array with id and type.
      * Populated from (in this order):
      * $_REQUEST['current_ns']
@@ -37,7 +37,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
         return array(
             'author' => 'Andreas Gohr',
             'email'  => 'andi@splitbrain.org',
-            'date'   => '2010-01-17',
+            'date'   => '2011-04-16',
             'name'   => 'ACL Manager',
             'desc'   => 'Manage Page Access Control Lists',
             'url'    => 'http://dokuwiki.org/plugin:acl',
@@ -449,7 +449,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
             $user   = '';
             $groups = array(ltrim($who,'@'));
         }else{
-            $user = auth_nameencode($who);
+            $user = $who;
             $info = $auth->getUserData($user);
             if($info === false){
                 $groups = array();
@@ -521,7 +521,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
         }
 
         // highlight?
-        if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) 
+        if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id']))
             $cl = ' cur';
 
         // namespace or page?
@@ -800,38 +800,42 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
         echo '<select name="acl_t" class="edit">'.NL;
         echo '  <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL;
         echo '  <option value="__u__"  class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL;
-        echo '  <optgroup label="&nbsp;">'.NL;
-        foreach($this->specials as $ug){
-            if($ug == $this->who){
-                $sel    = ' selected="selected"';
-                $inlist = true;
-            }else{
-                $sel = '';
-            }
-
-            if($ug{0} == '@'){
-                    echo '  <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
-            }else{
-                    echo '  <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
-            }
+        if (!empty($this->specials)) {
+	        echo '  <optgroup label="&nbsp;">'.NL;
+	        foreach($this->specials as $ug){
+	            if($ug == $this->who){
+	                $sel    = ' selected="selected"';
+	                $inlist = true;
+	            }else{
+	                $sel = '';
+	            }
+
+	            if($ug{0} == '@'){
+	                    echo '  <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
+	            }else{
+	                    echo '  <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
+	            }
+	        }
+	        echo '  </optgroup>'.NL;
         }
-        echo '  </optgroup>'.NL;
-        echo '  <optgroup label="&nbsp;">'.NL;
-        foreach($this->usersgroups as $ug){
-            if($ug == $this->who){
-                $sel    = ' selected="selected"';
-                $inlist = true;
-            }else{
-                $sel = '';
-            }
-
-            if($ug{0} == '@'){
-                    echo '  <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
-            }else{
-                    echo '  <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
-            }
+        if (!empty($this->usersgroups)) {
+	        echo '  <optgroup label="&nbsp;">'.NL;
+	        foreach($this->usersgroups as $ug){
+	            if($ug == $this->who){
+	                $sel    = ' selected="selected"';
+	                $inlist = true;
+	            }else{
+	                $sel = '';
+	            }
+
+	            if($ug{0} == '@'){
+	                    echo '  <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL;
+	            }else{
+	                    echo '  <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL;
+	            }
+	        }
+	        echo '  </optgroup>'.NL;
         }
-        echo '  </optgroup>'.NL;
         echo '</select>'.NL;
         return $inlist;
     }
diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php
index 2b956deba50f0fdbcd6b38fff77e9898c61023e1..0746e32c94cf06ec7bd21dfb5b854ed7f28c389c 100644
--- a/lib/plugins/acl/lang/bg/lang.php
+++ b/lib/plugins/acl/lang/bg/lang.php
@@ -24,7 +24,7 @@ $lang['p_inherited']           = 'Бележка: Тези разрешения
 $lang['p_isadmin']             = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.';
 $lang['p_include']             = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не  за страници.';
 $lang['current']               = 'Текущи ACL права';
-$lang['where']                 = 'Страница/Именно постранство';
+$lang['where']                 = 'Страница/Именно пространство';
 $lang['who']                   = 'Потребител/Група';
 $lang['perm']                  = 'Права';
 $lang['acl_perm0']             = 'Никакви';
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index d245d3fce7bbc67e484bc7536d6f6df96ead3d8b..e24f3b87b3c3d146aa900533cd4e07f2831198af 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -113,7 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
       // rewrite config is broken. Add $ID as hidden field to remember
       // current ID in most cases.
       ptln('<form action="'.script().'" method="post">');
-      ptln('<input type="hidden" name="id" value="'.$ID.'" />');
+      ptln('<div class="no"><input type="hidden" name="id" value="'.$ID.'" /></div>');
       formSecurityToken();
       $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
 
diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php
index eb2c3a426c7fc0894afb3b2a863c5b4301c2f15c..5f9088c3e2f77ed8cccb4f06cc25133cec11e7a1 100644
--- a/lib/plugins/config/lang/bg/lang.php
+++ b/lib/plugins/config/lang/bg/lang.php
@@ -8,11 +8,11 @@
  * @author Kiril <neohidra@gmail.com>
  */
 $lang['menu']                  = 'Настройки';
-$lang['error']                 = 'Обновяването на настройките е невъзможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново.
+$lang['error']                 = 'Обновяването на настройките не е възможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново.
 <br />Неверните стойности ще бъдат обградени с червена рамка.';
 $lang['updated']               = 'Обновяването на настройките е успешно.';
 $lang['nochoice']              = '(няма друг възможен избор)';
-$lang['locked']                = 'Обновяването на файла с настройките е невъзможно, ако това не е нарочно, проверете,<br /> дали името на локалния файл с настройки и правата са верни.';
+$lang['locked']                = 'Обновяването на файла с настройките не е възможно, ако това не е нарочно, проверете,<br /> дали името на локалния файл с настройки и правата са верни.';
 $lang['danger']                = 'Внимание: промяна на опцията може да направи wiki-то и менюто за настройване недостъпни.';
 $lang['warning']               = 'Предупреждение: промяна на опцията може предизвика нежелани последици.';
 $lang['security']              = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.';
@@ -84,8 +84,8 @@ $lang['disableactions_subscription'] = 'Записване/Отписване';
 $lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия';
 $lang['disableactions_other']  = 'Други действия (разделени със запетая)';
 $lang['sneaky_index']          = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. ';
-$lang['auth_security_timeout'] = 'Считане на вписване за неуспешно след (сек)';
-$lang['securecookie']          = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване в системата, а четенето е възможно и без SSL.
+$lang['auth_security_timeout'] = 'Автоматично проверяване на удостоверяването всеки (сек)';
+$lang['securecookie']          = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване, а четенето е без SSL.
 ';
 $lang['xmlrpc']                = 'Включване/Изключване на интерфейса XML-RPC.';
 $lang['xmlrpcuser']            = 'Ограничаване на XML-RPC достъпа до отделени със запетая групи или потребители. Оставете празно, за да даде достъп на всеки.';
diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php
index b519aa4e3914768961300edc13c941b4ca481840..a3b74691fb329d0c501ae8db562e0abe6d670f85 100644
--- a/lib/plugins/config/lang/eo/lang.php
+++ b/lib/plugins/config/lang/eo/lang.php
@@ -108,6 +108,7 @@ $lang['fetchsize']             = 'Maksimuma grandeco (bitokoj) permesita al "fet
 $lang['notify']                = 'Sendi avizojn pri ŝanĝoj al tiu ĉi retadreso';
 $lang['registernotify']        = 'Sendi informon pri ĵus aliĝintoj al tiu ĉi retadreso';
 $lang['mailfrom']              = 'Retadreso uzota por aŭtomataj retmesaĝoj ';
+$lang['mailprefix']            = 'Retpoŝta temo-prefikso por uzi en aŭtomataj mesaĝoj';
 $lang['gzip_output']           = 'Uzi gzip-a enhav-enkodigo por XHTML';
 $lang['gdlib']                 = 'Versio de GD Lib';
 $lang['im_convert']            = 'Pado al la konvertilo de ImageMagick';
diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php
index b033e312b04133bdcfd8b01b0a1df563d68f4cb9..a4c0fbb855d50cce1b6bcf5ccd6d81482f4f1024 100644
--- a/lib/plugins/config/lang/fi/lang.php
+++ b/lib/plugins/config/lang/fi/lang.php
@@ -103,6 +103,7 @@ $lang['fetchsize']             = 'Suurin koko (bytejä), jonka fetch.php voi lad
 $lang['notify']                = 'Lähetä muutosilmoitukset tähän osoitteeseen';
 $lang['registernotify']        = 'Lähetä ilmoitus uusista rekisteröitymisistä tähän osoitteeseen';
 $lang['mailfrom']              = 'Sähköpostiosoite automaattisia postituksia varten';
+$lang['mailprefix']            = 'Etuliite automaattisesti lähetettyihin dähköposteihin';
 $lang['gzip_output']           = 'Käytä gzip "Content-Encoding"-otsaketta xhtml-tiedostojen lähettämiseen';
 $lang['gdlib']                 = 'GD Lib versio';
 $lang['im_convert']            = 'ImageMagick-muunnostyökalun polku';
diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php
index 99e140af5139d7cfaff306bebf3d92fdc5f430dc..f5a8da0e2c1ab3c6be4f5ca48456ce89b6d9be3d 100644
--- a/lib/plugins/config/lang/fr/lang.php
+++ b/lib/plugins/config/lang/fr/lang.php
@@ -103,7 +103,7 @@ $lang['useslash']              = 'Utiliser « / » comme séparateur de catég
 $lang['usedraft']              = 'Enregistrer automatiquement un brouillon pendant l\'édition';
 $lang['sepchar']               = 'Séparateur de mots dans les noms de page';
 $lang['canonical']             = 'Utiliser des URL canoniques';
-$lang['fnencode']              = 'Méhtode pou r l\'encodage des fichiers non-ASCII';
+$lang['fnencode']              = 'Méthode pour l\'encodage des fichiers non-ASCII';
 $lang['autoplural']            = 'Rechercher les formes plurielles dans les liens';
 $lang['compression']           = 'Méthode de compression pour les fichiers dans attic';
 $lang['cachetime']             = 'Âge maximum d\'un fichier en cache (en secondes)';
diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php
index 9ec4161964dca3c40bd06ed19d6236767dce0fb2..35f288b03c37a8ed3a6f60c834f086e06e022407 100644
--- a/lib/plugins/config/lang/ja/lang.php
+++ b/lib/plugins/config/lang/ja/lang.php
@@ -106,6 +106,7 @@ $lang['fetchsize']             = '外部からのダウンロード最大サイ
 $lang['notify']                = '変更を通知するメールアドレス';
 $lang['registernotify']        = '新規ユーザー登録を通知するメールアドレス';
 $lang['mailfrom']              = 'メール送信時の送信元アドレス';
+$lang['mailprefix']            = '自動メールの題名に使用する接頭語';
 $lang['gzip_output']           = 'xhtmlに対するコンテンツ圧縮(gzip)を使用';
 $lang['gdlib']                 = 'GDlibバージョン';
 $lang['im_convert']            = 'ImageMagick変換ツールへのパス';
diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php
index 231147479078e76bf25c3a9796e20c1ba962ca2a..581a6295f5d45745f5377763be061a58758f548e 100644
--- a/lib/plugins/plugin/classes/ap_delete.class.php
+++ b/lib/plugins/plugin/classes/ap_delete.class.php
@@ -6,7 +6,7 @@ class ap_delete extends ap_manage {
         if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) {
             $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin);
         } else {
-            msg("Plugin {$this->manager->plugin} successfully deleted.");
+            msg(sprintf($this->lang['deleted'],$this->plugin));
             $this->refresh();
         }
     }
diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php
index 784095aaf74788684124b12c7cce1c3fd467d901..e3afd142a9367f9bc24b21ce2171871ae8e739c3 100644
--- a/lib/plugins/plugin/classes/ap_download.class.php
+++ b/lib/plugins/plugin/classes/ap_download.class.php
@@ -114,7 +114,7 @@ class ap_download extends ap_manage {
         if ($tmp) $this->dir_delete($tmp);
 
         if (!$this->manager->error) {
-            msg('Plugin package ('.count($this->downloaded).' plugin'.(count($this->downloaded) != 1?'s':'').': '.join(',',$this->downloaded).') successfully installed.',1);
+            msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), (count($this->downloaded) != 1?'s':''), join(',',$this->downloaded)),1);
             $this->refresh();
             return true;
         }
diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt
index 0227d6fe85293b833efc9aa8226cdafa976cbd8b..bad73e136d46916705c4efe87a83316aed6cabb2 100644
--- a/lib/plugins/plugin/lang/bg/admin_plugin.txt
+++ b/lib/plugins/plugin/lang/bg/admin_plugin.txt
@@ -1,3 +1,3 @@
 ====== Управление на приставките ======
 
-На тази страница можете на управлявате всичко свързано с [[doku>plugins|приставките]] на Dokuwiki. За да можете да свалите и инсталирате приставка, е необходимо писането в директорията plugin да е позволено на сървъра.
+От тази страница можете на управлявате [[doku>plugins|приставките]] на Dokuwiki. За да свалите и инсталирате приставка, е необходимо писането в директорията .../lib/plugins/ да е позволено на сървъра.
diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php
index ccbd207e9fbda3a63301bd109a46a62b2f26d501..437c168bdd26dcd9277a03aa93e721326c0a7f4e 100644
--- a/lib/plugins/plugin/lang/en/lang.php
+++ b/lib/plugins/plugin/lang/en/lang.php
@@ -73,5 +73,6 @@ $lang['enabled']          = 'Plugin %s enabled.';
 $lang['notenabled']       = 'Plugin %s could not be enabled, check file permissions.';
 $lang['disabled']         = 'Plugin %s disabled.';
 $lang['notdisabled']      = 'Plugin %s could not be disabled, check file permissions.';
+$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.';
 
 //Setup VIM: ex: et ts=4 :
diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php
index 5daf3b3addf47db98c30f11f5b5b4cb2043718bc..618e7a75b733e5c1496fb077c8f153e774b5baa6 100644
--- a/lib/plugins/plugin/lang/fr/lang.php
+++ b/lib/plugins/plugin/lang/fr/lang.php
@@ -61,3 +61,4 @@ $lang['enabled']               = 'Module %s activé.';
 $lang['notenabled']            = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.';
 $lang['disabled']              = 'Module %s désactivé.';
 $lang['notdisabled']           = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.';
+$lang['packageinstalled']      = 'Ensemble de modules (%d module%s: %s) installé avec succès.';
diff --git a/lib/plugins/plugin/lang/ja/lang.php b/lib/plugins/plugin/lang/ja/lang.php
index 0deb420c9442fb54d2a283d55c6dc385a5942a4d..56a827b7e8980f10da9a948b7921e776d55dd0b5 100644
--- a/lib/plugins/plugin/lang/ja/lang.php
+++ b/lib/plugins/plugin/lang/ja/lang.php
@@ -53,3 +53,4 @@ $lang['enabled']               = 'プラグイン %s が有効です。';
 $lang['notenabled']            = 'プラグイン %s を有効にすることができません。権限を確認してください。';
 $lang['disabled']              = 'プラグイン %s が無効です。';
 $lang['notdisabled']           = 'プラグイン %s を無効にすることができません。権限を確認してください。';
+$lang['packageinstalled']      = 'プラグインパッケージ(%d plugin%s: %s)は正しくインストールされました。';
diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php
index 77e692fcf29440a3ef61ff0d122c5303baf68b64..54234212dfb9e23545dab7b349121711859ebcc1 100644
--- a/lib/plugins/plugin/lang/zh-tw/lang.php
+++ b/lib/plugins/plugin/lang/zh-tw/lang.php
@@ -54,3 +54,4 @@ $lang['enabled']               = '插件 %s 已啟用。';
 $lang['notenabled']            = '插件 %s 無法啟用,請檢查檔案權限。';
 $lang['disabled']              = '插件 %s 已停用。';
 $lang['notdisabled']           = '插件 %s 無法停用,請檢查檔案權限。';
+$lang['packageinstalled']      = '插件 (%d 插件%s: %s) 已成功地安裝。';
diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php
index 40c3f545284a63b8880d007c2d6f62fc35c5a0ce..f9f6ceb6534ed5cabb4b861cfca0c8cc39d84324 100644
--- a/lib/plugins/popularity/admin.php
+++ b/lib/plugins/popularity/admin.php
@@ -137,8 +137,8 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin {
                 .($this->helper->isAutosubmitEnabled() ? 'checked' : '' )
                 .'/>' . $this->getLang('autosubmit') .'<br />'
                 .'</label>'
-                .'<input type="hidden" name="do" value="admin">'
-                .'<input type="hidden" name="page" value="popularity">';
+                .'<input type="hidden" name="do" value="admin" />'
+                .'<input type="hidden" name="page" value="popularity" />';
         }
         $form .= '<input type="submit" class="button" value="'.$this->getLang('submit').'"/>'
             .'</fieldset>'
diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php
index 9326cc7418f520d1f14b4e978522d4719d25eb77..a7c124f51b707ff91d3da0a26e027dc8ad4a0094 100644
--- a/lib/plugins/popularity/lang/eo/lang.php
+++ b/lib/plugins/popularity/lang/eo/lang.php
@@ -12,3 +12,8 @@
  */
 $lang['name']                  = 'Populareca enketo (eble la ŝargo prokrastos iomete)';
 $lang['submit']                = 'Sendi datenaron';
+$lang['autosubmit']            = 'AÅ­tomate sendi datumaron monate';
+$lang['submissionFailed']      = 'La datumaro ne povis esti sendata pro la jena eraro:';
+$lang['submitDirectly']        = 'Vi povas sendi vi mem la datumaron per la sekva informilo.';
+$lang['autosubmitError']       = 'La lasta aÅ­tomata sendo malsukcesis, pro la jena eraro:';
+$lang['lastSent']              = 'La datumaro estas sendita';
diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php
index 3aa5dc23b7c64fd138c2f08a603aabd944446e95..a73f6350161cbdf2bc469c2190eac737bf1864bf 100644
--- a/lib/plugins/popularity/lang/fi/lang.php
+++ b/lib/plugins/popularity/lang/fi/lang.php
@@ -7,3 +7,8 @@
  */
 $lang['name']                  = 'Suosion palaute (voi kestää jonkun aikaa latautua)';
 $lang['submit']                = 'Lähetä tiedot';
+$lang['autosubmit']            = 'Lähetä tiedot automaattisesti kerran kuussa';
+$lang['submissionFailed']      = 'Tietoja ei voitu lähettää seuraavan virheen vuoksi:';
+$lang['submitDirectly']        = 'Voit lähettää tiedot käsin seuraavan kaavakkeen avulla';
+$lang['autosubmitError']       = 'Edellinen automaattilähetys epäonnistui seuraavan virheen vuoksi:';
+$lang['lastSent']              = 'Tiedot on lähetetty';
diff --git a/lib/plugins/popularity/lang/fi/submitted.txt b/lib/plugins/popularity/lang/fi/submitted.txt
new file mode 100644
index 0000000000000000000000000000000000000000..31059c880b5bbe0b25ae0e0a81887cb9e7f4bf89
--- /dev/null
+++ b/lib/plugins/popularity/lang/fi/submitted.txt
@@ -0,0 +1,3 @@
+====== Suosion palaute ======
+
+Tiedot lähetettiin onnistuneesti.
\ No newline at end of file
diff --git a/lib/plugins/popularity/lang/ja/lang.php b/lib/plugins/popularity/lang/ja/lang.php
index 1e0dbdc3f9095bc61f8f6fb68dde4f3be1c480aa..736924bb11ab2aedd6b3d4675d5fc06cf06eaf0e 100644
--- a/lib/plugins/popularity/lang/ja/lang.php
+++ b/lib/plugins/popularity/lang/ja/lang.php
@@ -9,3 +9,8 @@
  */
 $lang['name']                  = '利用状況調査(ロードに少し時間が掛かります)';
 $lang['submit']                = 'データ送信';
+$lang['autosubmit']            = '月に一度は自動的にデータを送付';
+$lang['submissionFailed']      = '次のエラーによりデータが送信できませんでした:';
+$lang['submitDirectly']        = '次のフォームを使ってデータを手動で送信することができます。';
+$lang['autosubmitError']       = '以下のエラーにより最後の自動送信に失敗しました:';
+$lang['lastSent']              = 'データを送信しました。';
diff --git a/lib/plugins/popularity/lang/ja/submitted.txt b/lib/plugins/popularity/lang/ja/submitted.txt
new file mode 100644
index 0000000000000000000000000000000000000000..604f8e55fd72f56de6460a1a96518cfb1df2a96b
--- /dev/null
+++ b/lib/plugins/popularity/lang/ja/submitted.txt
@@ -0,0 +1,3 @@
+====== 利用状況調査 ======
+
+データの送信に成功しました。
\ No newline at end of file
diff --git a/lib/plugins/revert/lang/bg/intro.txt b/lib/plugins/revert/lang/bg/intro.txt
index 791c96857c644bfb420c572f96692f5cd284b7c1..44d5a0938db650d04904602f249b9918b2c426e3 100644
--- a/lib/plugins/revert/lang/bg/intro.txt
+++ b/lib/plugins/revert/lang/bg/intro.txt
@@ -1,4 +1,4 @@
 ====== Възстановяване ======
 
-Страницата помага за автоматично възстановяване след SPAM атака. За да намерите списък със спамнати страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите версии.
+Страницата помага за автоматично възстановяване след SPAM атака. За да намерите спамнатите страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите им версии.
 
diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php
new file mode 100644
index 0000000000000000000000000000000000000000..5d3eaae3ab1fe4b42b0c83cd21680a86534d5343
--- /dev/null
+++ b/lib/plugins/safefnrecode/action.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * DokuWiki Plugin safefnrecode (Action Component)
+ *
+ * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
+ * @author  Andreas Gohr <andi@splitbrain.org>
+ */
+
+// must be run within Dokuwiki
+if (!defined('DOKU_INC')) die();
+
+require_once DOKU_PLUGIN.'action.php';
+
+class action_plugin_safefnrecode extends DokuWiki_Action_Plugin {
+
+    public function register(Doku_Event_Handler &$controller) {
+
+       $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run');
+
+    }
+
+    public function handle_indexer_tasks_run(Doku_Event &$event, $param) {
+        global $conf;
+        if($conf['fnencode'] != 'safe') return;
+
+        if(!file_exists($conf['datadir'].'_safefn.recoded')){
+            $this->recode($conf['datadir']);
+            touch($conf['datadir'].'_safefn.recoded');
+        }
+
+        if(!file_exists($conf['olddir'].'_safefn.recoded')){
+            $this->recode($conf['olddir']);
+            touch($conf['olddir'].'_safefn.recoded');
+        }
+
+        if(!file_exists($conf['metadir'].'_safefn.recoded')){
+            $this->recode($conf['metadir']);
+            touch($conf['metadir'].'_safefn.recoded');
+        }
+
+        if(!file_exists($conf['mediadir'].'_safefn.recoded')){
+            $this->recode($conf['mediadir']);
+            touch($conf['mediadir'].'_safefn.recoded');
+        }
+
+    }
+
+    /**
+     * Recursive function to rename all safe encoded files to use the new
+     * square bracket post indicator
+     */
+    private function recode($dir){
+        $dh = opendir($dir);
+        if(!$dh) return;
+        while (($file = readdir($dh)) !== false) {
+            if($file == '.' || $file == '..') continue;           # cur and upper dir
+            if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse
+            if(strpos($file,'%') === false) continue;             # no encoding used
+            $new = preg_replace('/(%[^\]]*?)\./','\1]',$file);    # new post indicator
+            if(preg_match('/%[^\]]+$/',$new)) $new .= ']';        # fix end FS#2122
+            rename("$dir/$file","$dir/$new");                     # rename it
+        }
+        closedir($dh);
+    }
+
+}
+
+// vim:ts=4:sw=4:et:
diff --git a/lib/plugins/safefnrecode/plugin.info.txt b/lib/plugins/safefnrecode/plugin.info.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b1600060c6fc3402213b26e8149ff27de3fb7f38
--- /dev/null
+++ b/lib/plugins/safefnrecode/plugin.info.txt
@@ -0,0 +1,7 @@
+base   safefnrecode
+author Andreas Gohr
+email  andi@splitbrain.org
+date   2011-04-03
+name   safefnrecode plugin
+desc   Changes existing page and foldernames for the change in the safe filename encoding
+url    http://www.dokuwiki.org/plugin:safefnrecode
diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php
index 909c1e8fea17290410f1206ff4043924eb2dbdbc..9ed27f42a89dab2e9d53a3aefc2181188faed4bd 100644
--- a/lib/plugins/usermanager/lang/bg/lang.php
+++ b/lib/plugins/usermanager/lang/bg/lang.php
@@ -45,5 +45,5 @@ $lang['note_group']            = 'Новите потребители биват
 $lang['note_pass']             = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.';
 $lang['add_ok']                = 'Добавянето на потребителя е успешно';
 $lang['add_fail']              = 'Добавянето на потребителя се провали';
-$lang['notify_ok']             = 'Осведомително е-писмо бе изпратено';
-$lang['notify_fail']           = 'Пращането на осведомително е-писмо е невъзможно';
+$lang['notify_ok']             = 'Изпратено е осведомително ел. писмо';
+$lang['notify_fail']           = 'Изпращането на осведомително ел. писмо не е възможно';
diff --git a/lib/plugins/usermanager/lang/bg/list.txt b/lib/plugins/usermanager/lang/bg/list.txt
index e90205fe61f95bf9c5484e4447c846d378561c20..106856c0ec7d37a054d305baf337efa714c0c645 100644
--- a/lib/plugins/usermanager/lang/bg/list.txt
+++ b/lib/plugins/usermanager/lang/bg/list.txt
@@ -1 +1 @@
-===== Списък с потребителите  =====
+===== Списък на потребителите  =====
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 45c1fb111880fa7d862e13fd82514e64c6025921..e8a59deb9887416206f44b9d1507371002a27ddb 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -261,7 +261,7 @@ function currentHeadlineLevel(textboxId){
 /**
  * global var used for not saved yet warning
  */
-var textChanged = false;
+window.textChanged = false;
 
 /**
  * Delete the draft before leaving the page
@@ -305,14 +305,14 @@ addInitEvent(function (){
     }
 
     var checkfunc = function(){
-        textChanged = true; //global var
+        window.textChanged = true; //global var
         summaryCheck();
     };
     addEvent(editform, 'change', checkfunc);
     addEvent(editform, 'keydown', checkfunc);
 
     window.onbeforeunload = function(){
-        if(textChanged) {
+        if(window.textChanged) {
             return LANG.notsavedyet;
         }
     };
@@ -320,17 +320,19 @@ addInitEvent(function (){
 
     // reset change memory var on submit
     addEvent($('edbtn__save'), 'click', function(){
-        textChanged = false;
+        window.onbeforeunload = '';
+        window.textChanged = false;
     });
     addEvent($('edbtn__preview'), 'click', function(){
-        textChanged = false;
+        window.onbeforeunload = '';
+        window.textChanged = false;
         window.keepDraft = true; // needed to keep draft on page unload
     });
 
     var summary = $('edit__summary');
     addEvent(summary, 'change', summaryCheck);
     addEvent(summary, 'keyup', summaryCheck);
-    if (textChanged) summaryCheck();
+    if (window.textChanged) summaryCheck();
 });
 
 /**
diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index 57f599163367d9441424ff331d6fe7f2ed45cd71..530e93055af93747a4afa67471b0d369220a8f47 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -774,6 +774,6 @@ addInitEvent(function(){
     media_manager.selectorattach($('media__content'));
     media_manager.confirmattach($('media__content'));
     media_manager.attachoptions($('media__opts'));
-    media_manager.initpopup();
+    //media_manager.initpopup();
     media_manager.initFlashUpload();
 });
diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php
index 754a6e48233e352388c8067d4918d8677ebeb543..94c2322aa730fd680d8301082e84cb215a2c4c1f 100644
--- a/lib/tpl/default/main.php
+++ b/lib/tpl/default/main.php
@@ -92,7 +92,7 @@ if (!defined('DOKU_INC')) die();
     <!-- wikipage stop -->
   </div>
 
-  <div class="clearer">&nbsp;</div>
+  <div class="clearer"></div>
 
   <?php tpl_flush()?>