summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-04-18 17:00:40 +0300
commitf493983cbddc6c8c387a76bf3f6631853485162b (patch)
tree38cc53f0b287fde2a1b4426faa8a6fff1e56d769
parent058f1c3e98b1437a691cc77a36002dee1c41f007 (diff)
parent342e58c8c048bfd5f57f10bd88cee95aa2732e96 (diff)
downloadrpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.gz
rpg-f493983cbddc6c8c387a76bf3f6631853485162b.tar.bz2
Merge remote-tracking branch 'upstream/master'
-rw-r--r--.gitignore12
-rw-r--r--README2
-rw-r--r--_test/cases/inc/pageutils_getid.test.php2
-rw-r--r--_test/cases/inc/pageutils_resolve_pageid.test.php22
-rw-r--r--_test/cases/inc/parser/parser_links.test.php15
-rw-r--r--_test/cases/inc/parser/xhtml_links.test.php195
-rw-r--r--_test/cases/inc/safefn.test.php35
-rw-r--r--conf/.htaccess7
-rw-r--r--conf/dokuwiki.php4
-rw-r--r--data/.htaccess1
-rw-r--r--inc/.htaccess7
-rw-r--r--inc/DifferenceEngine.php43
-rw-r--r--inc/SafeFN.class.php6
-rw-r--r--inc/auth.php23
-rw-r--r--inc/form.php2
-rw-r--r--inc/html.php30
-rw-r--r--inc/indexer.php204
-rw-r--r--inc/lang/.htaccess7
-rw-r--r--[-rwxr-xr-x]inc/lang/az/admin.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/adminplugins.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/backlinks.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/conflict.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/denied.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/diff.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/draft.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/edit.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/editrev.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/index.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/install.html0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/locked.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/login.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/mailtext.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/newpage.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/norev.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/password.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/preview.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/pwconfirm.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/read.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/recent.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/register.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/registermail.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/resendpwd.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/revisions.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/searchpage.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/showrev.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/stopwords.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/updateprofile.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/uploadmail.txt0
-rw-r--r--[-rwxr-xr-x]inc/lang/az/wordblock.txt0
-rw-r--r--inc/lang/bg/install.html9
-rw-r--r--inc/lang/bg/lang.php4
-rw-r--r--inc/lang/bg/pwconfirm.txt2
-rw-r--r--inc/lang/eo/lang.php3
-rw-r--r--inc/lang/fi/lang.php3
-rw-r--r--inc/lang/ja/lang.php3
-rw-r--r--inc/pageutils.php6
-rw-r--r--inc/parser/parser.php2
-rw-r--r--inc/parser/xhtml.php9
-rw-r--r--lib/_fla/.htaccess1
-rw-r--r--lib/plugins/acl/admin.php72
-rw-r--r--lib/plugins/acl/lang/bg/lang.php2
-rw-r--r--lib/plugins/config/admin.php2
-rw-r--r--lib/plugins/config/lang/bg/lang.php8
-rw-r--r--lib/plugins/config/lang/eo/lang.php1
-rw-r--r--lib/plugins/config/lang/fi/lang.php1
-rw-r--r--lib/plugins/config/lang/fr/lang.php2
-rw-r--r--lib/plugins/config/lang/ja/lang.php1
-rw-r--r--lib/plugins/plugin/classes/ap_delete.class.php2
-rw-r--r--lib/plugins/plugin/classes/ap_download.class.php2
-rw-r--r--lib/plugins/plugin/lang/bg/admin_plugin.txt2
-rw-r--r--lib/plugins/plugin/lang/en/lang.php1
-rw-r--r--lib/plugins/plugin/lang/fr/lang.php1
-rw-r--r--lib/plugins/plugin/lang/ja/lang.php1
-rw-r--r--lib/plugins/plugin/lang/zh-tw/lang.php1
-rw-r--r--lib/plugins/popularity/admin.php4
-rw-r--r--lib/plugins/popularity/lang/eo/lang.php5
-rw-r--r--lib/plugins/popularity/lang/fi/lang.php5
-rw-r--r--lib/plugins/popularity/lang/fi/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/ja/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ja/submitted.txt3
-rw-r--r--lib/plugins/revert/lang/bg/intro.txt2
-rw-r--r--lib/plugins/safefnrecode/action.php68
-rw-r--r--lib/plugins/safefnrecode/plugin.info.txt7
-rw-r--r--lib/plugins/usermanager/lang/bg/lang.php4
-rw-r--r--lib/plugins/usermanager/lang/bg/list.txt2
-rw-r--r--lib/scripts/edit.js14
-rw-r--r--lib/scripts/media.js2
-rw-r--r--lib/tpl/default/main.php2
88 files changed, 645 insertions, 239 deletions
diff --git a/.gitignore b/.gitignore
index 4fb846732..b96a0554b 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 76a7cf6cd..6bb9a3bd9 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 7fccc3a60..6eddeb5ea 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 d9ea89869..c65ed1866 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 a4a8c5826..53871e110 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 0ad96c793..a9a6dfdbc 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 c789875ba..1227e5578 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 763ebf2ee..f5dda6086 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 629e7c0c6..e90e4fc23 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 281d5c33d..2cbb757e7 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 aebb21cd2..68ae43e72 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 906a17b2d..6e1d07382 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 ac6698a63..43b19e9ab 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 53376be34..a480a4a8a 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 30e16b626..e74c52c5d 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 fcfa54b6c..6e187ebe1 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 b42c092fa..1db966656 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 2ca129b12..572f5156f 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
index 000caa06d..000caa06d 100755..100644
--- a/inc/lang/az/admin.txt
+++ b/inc/lang/az/admin.txt
diff --git a/inc/lang/az/adminplugins.txt b/inc/lang/az/adminplugins.txt
index 62b1f8793..62b1f8793 100755..100644
--- a/inc/lang/az/adminplugins.txt
+++ b/inc/lang/az/adminplugins.txt
diff --git a/inc/lang/az/backlinks.txt b/inc/lang/az/backlinks.txt
index 72a7c858d..72a7c858d 100755..100644
--- a/inc/lang/az/backlinks.txt
+++ b/inc/lang/az/backlinks.txt
diff --git a/inc/lang/az/conflict.txt b/inc/lang/az/conflict.txt
index 908be09f1..908be09f1 100755..100644
--- a/inc/lang/az/conflict.txt
+++ b/inc/lang/az/conflict.txt
diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt
index a68b08c8c..a68b08c8c 100755..100644
--- a/inc/lang/az/denied.txt
+++ b/inc/lang/az/denied.txt
diff --git a/inc/lang/az/diff.txt b/inc/lang/az/diff.txt
index a944f84f4..a944f84f4 100755..100644
--- a/inc/lang/az/diff.txt
+++ b/inc/lang/az/diff.txt
diff --git a/inc/lang/az/draft.txt b/inc/lang/az/draft.txt
index 65c743de3..65c743de3 100755..100644
--- a/inc/lang/az/draft.txt
+++ b/inc/lang/az/draft.txt
diff --git a/inc/lang/az/edit.txt b/inc/lang/az/edit.txt
index 7ce66307e..7ce66307e 100755..100644
--- a/inc/lang/az/edit.txt
+++ b/inc/lang/az/edit.txt
diff --git a/inc/lang/az/editrev.txt b/inc/lang/az/editrev.txt
index 8e98d2ff3..8e98d2ff3 100755..100644
--- a/inc/lang/az/editrev.txt
+++ b/inc/lang/az/editrev.txt
diff --git a/inc/lang/az/index.txt b/inc/lang/az/index.txt
index dc3ffa3b0..dc3ffa3b0 100755..100644
--- a/inc/lang/az/index.txt
+++ b/inc/lang/az/index.txt
diff --git a/inc/lang/az/install.html b/inc/lang/az/install.html
index d41511438..d41511438 100755..100644
--- a/inc/lang/az/install.html
+++ b/inc/lang/az/install.html
diff --git a/inc/lang/az/locked.txt b/inc/lang/az/locked.txt
index 8ab934443..8ab934443 100755..100644
--- a/inc/lang/az/locked.txt
+++ b/inc/lang/az/locked.txt
diff --git a/inc/lang/az/login.txt b/inc/lang/az/login.txt
index e0a559bc1..e0a559bc1 100755..100644
--- a/inc/lang/az/login.txt
+++ b/inc/lang/az/login.txt
diff --git a/inc/lang/az/mailtext.txt b/inc/lang/az/mailtext.txt
index 439458658..439458658 100755..100644
--- a/inc/lang/az/mailtext.txt
+++ b/inc/lang/az/mailtext.txt
diff --git a/inc/lang/az/newpage.txt b/inc/lang/az/newpage.txt
index c749f20af..c749f20af 100755..100644
--- a/inc/lang/az/newpage.txt
+++ b/inc/lang/az/newpage.txt
diff --git a/inc/lang/az/norev.txt b/inc/lang/az/norev.txt
index 453dad56b..453dad56b 100755..100644
--- a/inc/lang/az/norev.txt
+++ b/inc/lang/az/norev.txt
diff --git a/inc/lang/az/password.txt b/inc/lang/az/password.txt
index 31bf387da..31bf387da 100755..100644
--- a/inc/lang/az/password.txt
+++ b/inc/lang/az/password.txt
diff --git a/inc/lang/az/preview.txt b/inc/lang/az/preview.txt
index dbeaa44f5..dbeaa44f5 100755..100644
--- a/inc/lang/az/preview.txt
+++ b/inc/lang/az/preview.txt
diff --git a/inc/lang/az/pwconfirm.txt b/inc/lang/az/pwconfirm.txt
index 177e5a1fa..177e5a1fa 100755..100644
--- a/inc/lang/az/pwconfirm.txt
+++ b/inc/lang/az/pwconfirm.txt
diff --git a/inc/lang/az/read.txt b/inc/lang/az/read.txt
index 39b31f108..39b31f108 100755..100644
--- a/inc/lang/az/read.txt
+++ b/inc/lang/az/read.txt
diff --git a/inc/lang/az/recent.txt b/inc/lang/az/recent.txt
index 8766d9953..8766d9953 100755..100644
--- a/inc/lang/az/recent.txt
+++ b/inc/lang/az/recent.txt
diff --git a/inc/lang/az/register.txt b/inc/lang/az/register.txt
index eb6386f72..eb6386f72 100755..100644
--- a/inc/lang/az/register.txt
+++ b/inc/lang/az/register.txt
diff --git a/inc/lang/az/registermail.txt b/inc/lang/az/registermail.txt
index 51919756f..51919756f 100755..100644
--- a/inc/lang/az/registermail.txt
+++ b/inc/lang/az/registermail.txt
diff --git a/inc/lang/az/resendpwd.txt b/inc/lang/az/resendpwd.txt
index cc286174a..cc286174a 100755..100644
--- a/inc/lang/az/resendpwd.txt
+++ b/inc/lang/az/resendpwd.txt
diff --git a/inc/lang/az/revisions.txt b/inc/lang/az/revisions.txt
index 7164a9959..7164a9959 100755..100644
--- a/inc/lang/az/revisions.txt
+++ b/inc/lang/az/revisions.txt
diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt
index 4f8efe007..4f8efe007 100755..100644
--- a/inc/lang/az/searchpage.txt
+++ b/inc/lang/az/searchpage.txt
diff --git a/inc/lang/az/showrev.txt b/inc/lang/az/showrev.txt
index dd398704b..dd398704b 100755..100644
--- a/inc/lang/az/showrev.txt
+++ b/inc/lang/az/showrev.txt
diff --git a/inc/lang/az/stopwords.txt b/inc/lang/az/stopwords.txt
index 04eb312eb..04eb312eb 100755..100644
--- a/inc/lang/az/stopwords.txt
+++ b/inc/lang/az/stopwords.txt
diff --git a/inc/lang/az/updateprofile.txt b/inc/lang/az/updateprofile.txt
index 569e425d4..569e425d4 100755..100644
--- a/inc/lang/az/updateprofile.txt
+++ b/inc/lang/az/updateprofile.txt
diff --git a/inc/lang/az/uploadmail.txt b/inc/lang/az/uploadmail.txt
index d538f8258..d538f8258 100755..100644
--- a/inc/lang/az/uploadmail.txt
+++ b/inc/lang/az/uploadmail.txt
diff --git a/inc/lang/az/wordblock.txt b/inc/lang/az/wordblock.txt
index ec8b102af..ec8b102af 100755..100644
--- a/inc/lang/az/wordblock.txt
+++ b/inc/lang/az/wordblock.txt
diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html
index 6dde7e4ce..9d275d82a 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 c7c52b70f..1acf39acb 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 2c4252e15..802153fd4 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 305c080f1..4bb1c005d 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 bc52625e0..35f7b3c09 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 d503bae31..e8999e05b 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 cd01dcae7..c9bf60135 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 e47ce56fa..68d4e4569 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 9405d9420..ab295dd01 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 9a7d38c12..055d099c7 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 3e7bd8121..c8b7b1e6e 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 2b956deba..0746e32c9 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 d245d3fce..e24f3b87b 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 eb2c3a426..5f9088c3e 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 b519aa4e3..a3b74691f 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 b033e312b..a4c0fbb85 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 99e140af5..f5a8da0e2 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 9ec416196..35f288b03 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 231147479..581a6295f 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 784095aaf..e3afd142a 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 0227d6fe8..bad73e136 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 ccbd207e9..437c168bd 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 5daf3b3ad..618e7a75b 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 0deb420c9..56a827b7e 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 77e692fcf..54234212d 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 40c3f5452..f9f6ceb65 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 9326cc741..a7c124f51 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 3aa5dc23b..a73f63501 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 000000000..31059c880
--- /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 1e0dbdc3f..736924bb1 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 000000000..604f8e55f
--- /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 791c96857..44d5a0938 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 000000000..5d3eaae3a
--- /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 000000000..b1600060c
--- /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 909c1e8fe..9ed27f42a 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 e90205fe6..106856c0e 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 45c1fb111..e8a59deb9 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 57f599163..530e93055 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 754a6e482..94c2322aa 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()?>