summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:40:15 +0100
committerGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:40:15 +0100
commitfc30ac3acbd4e17e25955ccdd0c5539ee2c9beca (patch)
tree3d287ae466500a6072b84d14ff4911fa936d1479
parentde4634ec87b1a277c1686990d993dafc43db05ed (diff)
parent8da2ebf4f4261eb8f54df5704b5d9af283b5402d (diff)
downloadrpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.gz
rpg-fc30ac3acbd4e17e25955ccdd0c5539ee2c9beca.tar.bz2
Merge branch 'master' into new_css.php
-rw-r--r--.travis.yml9
-rw-r--r--_test/core/TestRequest.php2
-rw-r--r--_test/data/media/wiki/kind_zu_katze.ogvbin0 -> 45883 bytes
-rw-r--r--_test/data/media/wiki/kind_zu_katze.pngbin0 -> 970 bytes
-rw-r--r--_test/data/media/wiki/kind_zu_katze.webmbin0 -> 101529 bytes
-rw-r--r--_test/tests/inc/changelog_getlastrevisionat.test.php127
-rw-r--r--_test/tests/inc/common_ml.test.php11
-rw-r--r--_test/tests/inc/common_wl.test.php11
-rw-r--r--_test/tests/inc/init_checkssl.test.php81
-rw-r--r--_test/tests/inc/input.test.php50
-rw-r--r--_test/tests/inc/parser/parser_footnote.test.php2
-rw-r--r--_test/tests/inc/parser/parser_lists.test.php20
-rw-r--r--_test/tests/inc/parser/parser_media.test.php103
-rw-r--r--_test/tests/lib/exe/js_js_compress.test.php78
-rwxr-xr-xbin/gittool.php10
-rwxr-xr-xbin/striplangs.php3
-rwxr-xr-xbin/wantedpages.php20
-rw-r--r--conf/mime.conf5
-rw-r--r--conf/mysql.conf.php.example10
-rw-r--r--doku.php44
-rw-r--r--feed.php6
-rw-r--r--inc/DifferenceEngine.php80
-rw-r--r--inc/HTTPClient.php60
-rw-r--r--inc/IXR_Library.php622
-rw-r--r--inc/Input.class.php67
-rw-r--r--inc/JpegMeta.php84
-rw-r--r--inc/Mailer.class.php31
-rw-r--r--inc/PassHash.class.php23
-rw-r--r--inc/RemoteAPICore.php138
-rw-r--r--inc/Sitemapper.php20
-rw-r--r--inc/Tar.class.php24
-rw-r--r--inc/ZipLib.class.php81
-rw-r--r--inc/actions.php51
-rw-r--r--inc/auth.php45
-rw-r--r--inc/blowfish.php15
-rw-r--r--inc/cache.php6
-rw-r--r--inc/changelog.php32
-rw-r--r--inc/cli.php23
-rw-r--r--inc/cliopts.php8
-rw-r--r--inc/common.php59
-rw-r--r--inc/compatibility.php46
-rw-r--r--inc/config_cascade.php114
-rw-r--r--inc/confutils.php4
-rw-r--r--inc/events.php35
-rw-r--r--inc/fetch.functions.php7
-rw-r--r--inc/form.php98
-rw-r--r--inc/fulltext.php50
-rw-r--r--inc/html.php101
-rw-r--r--inc/httputils.php11
-rw-r--r--inc/indexer.php69
-rw-r--r--inc/infoutils.php30
-rw-r--r--inc/init.php46
-rw-r--r--inc/io.php71
-rw-r--r--inc/lang/ar/lang.php14
-rw-r--r--inc/lang/ar/searchpage.txt2
-rw-r--r--inc/lang/az/lang.php1
-rw-r--r--inc/lang/az/searchpage.txt2
-rw-r--r--inc/lang/bg/lang.php1
-rw-r--r--inc/lang/bg/searchpage.txt2
-rw-r--r--inc/lang/ca-valencia/lang.php1
-rw-r--r--inc/lang/ca-valencia/searchpage.txt2
-rw-r--r--inc/lang/ca/lang.php1
-rw-r--r--inc/lang/ca/searchpage.txt2
-rw-r--r--inc/lang/cs/lang.php37
-rw-r--r--inc/lang/cs/mailtext.txt2
-rw-r--r--inc/lang/cs/password.txt4
-rw-r--r--inc/lang/cs/pwconfirm.txt6
-rw-r--r--inc/lang/cs/registermail.txt2
-rw-r--r--inc/lang/cs/resendpwd.txt2
-rw-r--r--inc/lang/cs/searchpage.txt2
-rw-r--r--inc/lang/cs/subscr_digest.txt6
-rw-r--r--inc/lang/cs/subscr_list.txt4
-rw-r--r--inc/lang/cs/subscr_single.txt6
-rw-r--r--inc/lang/cs/uploadmail.txt4
-rw-r--r--inc/lang/da/lang.php21
-rw-r--r--inc/lang/da/searchpage.txt2
-rw-r--r--inc/lang/de-informal/lang.php1
-rw-r--r--inc/lang/de-informal/searchpage.txt2
-rw-r--r--inc/lang/de/backlinks.txt2
-rw-r--r--inc/lang/de/lang.php8
-rw-r--r--inc/lang/de/searchpage.txt2
-rw-r--r--inc/lang/el/searchpage.txt2
-rw-r--r--inc/lang/en/lang.php3
-rw-r--r--inc/lang/en/searchpage.txt2
-rw-r--r--inc/lang/eo/lang.php1
-rw-r--r--inc/lang/eo/searchpage.txt2
-rw-r--r--inc/lang/es/lang.php1
-rw-r--r--inc/lang/es/searchpage.txt2
-rw-r--r--inc/lang/et/lang.php1
-rw-r--r--inc/lang/et/searchpage.txt2
-rw-r--r--inc/lang/eu/lang.php12
-rw-r--r--inc/lang/eu/searchpage.txt2
-rw-r--r--inc/lang/fa/lang.php4
-rw-r--r--inc/lang/fa/searchpage.txt2
-rw-r--r--inc/lang/fi/lang.php11
-rw-r--r--inc/lang/fi/searchpage.txt2
-rw-r--r--inc/lang/fo/lang.php1
-rw-r--r--inc/lang/fo/searchpage.txt2
-rw-r--r--inc/lang/fr/denied.txt2
-rw-r--r--inc/lang/fr/lang.php6
-rw-r--r--inc/lang/fr/newpage.txt2
-rw-r--r--inc/lang/fr/searchpage.txt2
-rw-r--r--inc/lang/gl/lang.php1
-rw-r--r--inc/lang/gl/searchpage.txt2
-rw-r--r--inc/lang/he/lang.php1
-rw-r--r--inc/lang/he/searchpage.txt2
-rw-r--r--inc/lang/hr/adminplugins.txt2
-rw-r--r--inc/lang/hr/backlinks.txt4
-rw-r--r--inc/lang/hr/edit.txt2
-rw-r--r--inc/lang/hr/index.txt4
-rw-r--r--inc/lang/hr/lang.php144
-rw-r--r--inc/lang/hr/revisions.txt2
-rw-r--r--inc/lang/hr/searchpage.txt6
-rw-r--r--inc/lang/hr/showrev.txt2
-rw-r--r--inc/lang/hu/lang.php1
-rw-r--r--inc/lang/hu/searchpage.txt2
-rw-r--r--inc/lang/ia/lang.php1
-rw-r--r--inc/lang/ia/searchpage.txt2
-rw-r--r--inc/lang/id/lang.php1
-rw-r--r--inc/lang/id/searchpage.txt2
-rw-r--r--inc/lang/it/lang.php7
-rw-r--r--inc/lang/it/searchpage.txt2
-rw-r--r--inc/lang/ja/lang.php3
-rw-r--r--inc/lang/ja/searchpage.txt2
-rw-r--r--inc/lang/ko/lang.php15
-rw-r--r--inc/lang/ko/searchpage.txt4
-rw-r--r--inc/lang/ku/lang.php1
-rw-r--r--inc/lang/ku/searchpage.txt2
-rw-r--r--inc/lang/la/searchpage.txt2
-rw-r--r--inc/lang/lb/lang.php1
-rw-r--r--inc/lang/lb/searchpage.txt2
-rw-r--r--inc/lang/lt/lang.php1
-rw-r--r--inc/lang/lt/searchpage.txt2
-rw-r--r--inc/lang/lv/lang.php1
-rw-r--r--inc/lang/lv/searchpage.txt3
-rw-r--r--inc/lang/mg/lang.php2
-rw-r--r--inc/lang/mg/searchpage.txt2
-rw-r--r--inc/lang/mr/lang.php1
-rw-r--r--inc/lang/mr/searchpage.txt2
-rw-r--r--inc/lang/ne/lang.php1
-rw-r--r--inc/lang/ne/searchpage.txt4
-rw-r--r--inc/lang/nl/lang.php1
-rw-r--r--inc/lang/nl/searchpage.txt2
-rw-r--r--inc/lang/no/lang.php5
-rw-r--r--inc/lang/no/searchpage.txt2
-rw-r--r--inc/lang/pl/lang.php1
-rw-r--r--inc/lang/pl/searchpage.txt2
-rw-r--r--inc/lang/pt-br/lang.php1
-rw-r--r--inc/lang/pt-br/searchpage.txt2
-rw-r--r--inc/lang/pt/lang.php1
-rw-r--r--inc/lang/pt/searchpage.txt2
-rw-r--r--inc/lang/ro/lang.php1
-rw-r--r--inc/lang/ro/searchpage.txt2
-rw-r--r--inc/lang/ru/lang.php32
-rw-r--r--inc/lang/ru/mailtext.txt2
-rw-r--r--inc/lang/ru/password.txt2
-rw-r--r--inc/lang/ru/pwconfirm.txt2
-rw-r--r--inc/lang/ru/registermail.txt2
-rw-r--r--inc/lang/ru/revisions.txt2
-rw-r--r--inc/lang/ru/searchpage.txt2
-rw-r--r--inc/lang/ru/uploadmail.txt2
-rw-r--r--inc/lang/sk/lang.php1
-rw-r--r--inc/lang/sk/searchpage.txt2
-rw-r--r--inc/lang/sl/lang.php1
-rw-r--r--inc/lang/sl/searchpage.txt2
-rw-r--r--inc/lang/sq/lang.php1
-rw-r--r--inc/lang/sq/searchpage.txt2
-rw-r--r--inc/lang/sr/lang.php1
-rw-r--r--inc/lang/sr/searchpage.txt2
-rw-r--r--inc/lang/sv/lang.php1
-rw-r--r--inc/lang/sv/searchpage.txt2
-rw-r--r--inc/lang/ta/lang.php7
-rw-r--r--inc/lang/th/lang.php1
-rw-r--r--inc/lang/th/searchpage.txt3
-rw-r--r--inc/lang/tr/lang.php1
-rw-r--r--inc/lang/tr/searchpage.txt2
-rw-r--r--inc/lang/uk/lang.php1
-rw-r--r--inc/lang/uk/searchpage.txt2
-rw-r--r--inc/lang/vi/lang.php1
-rw-r--r--inc/lang/vi/searchpage.txt2
-rw-r--r--inc/lang/zh-tw/lang.php4
-rw-r--r--inc/lang/zh-tw/searchpage.txt2
-rw-r--r--inc/lang/zh/lang.php3
-rw-r--r--inc/lang/zh/searchpage.txt2
-rw-r--r--inc/mail.php2
-rw-r--r--inc/media.php346
-rw-r--r--inc/pageutils.php48
-rw-r--r--inc/parser/handler.php28
-rw-r--r--inc/parser/lexer.php25
-rw-r--r--inc/parser/metadata.php19
-rw-r--r--inc/parser/renderer.php13
-rw-r--r--inc/parser/xhtml.php141
-rw-r--r--inc/parserutils.php65
-rw-r--r--inc/plugin.php102
-rw-r--r--inc/plugincontroller.class.php27
-rw-r--r--inc/pluginutils.php6
-rw-r--r--inc/remote.php107
-rw-r--r--inc/search.php6
-rw-r--r--inc/subscription.php7
-rw-r--r--inc/template.php134
-rw-r--r--inc/utf8.php99
-rw-r--r--install.php25
-rw-r--r--lib/exe/css.php45
-rw-r--r--lib/exe/detail.php3
-rw-r--r--lib/exe/indexer.php7
-rw-r--r--lib/exe/js.php58
-rw-r--r--lib/exe/xmlrpc.php13
-rw-r--r--lib/images/smileys/index.php2
-rw-r--r--lib/plugins/acl/admin.php6
-rw-r--r--lib/plugins/acl/lang/cs/help.txt13
-rw-r--r--lib/plugins/acl/lang/eu/lang.php5
-rw-r--r--lib/plugins/acl/lang/fr/help.txt2
-rw-r--r--lib/plugins/acl/remote.php32
-rw-r--r--lib/plugins/admin.php44
-rw-r--r--lib/plugins/auth.php16
-rw-r--r--lib/plugins/authad/adLDAP/adLDAP.php2
-rw-r--r--lib/plugins/authad/auth.php11
-rw-r--r--lib/plugins/authad/lang/ar/lang.php8
-rw-r--r--lib/plugins/authad/lang/cs/lang.php8
-rw-r--r--lib/plugins/authad/lang/fa/settings.php10
-rw-r--r--lib/plugins/authad/lang/no/lang.php8
-rw-r--r--lib/plugins/authad/lang/no/settings.php2
-rw-r--r--lib/plugins/authad/lang/ru/settings.php11
-rw-r--r--lib/plugins/authad/lang/zh-tw/lang.php8
-rw-r--r--lib/plugins/authad/lang/zh-tw/settings.php2
-rw-r--r--lib/plugins/authldap/auth.php30
-rw-r--r--lib/plugins/authldap/lang/fa/settings.php10
-rw-r--r--lib/plugins/authldap/lang/hr/settings.php4
-rw-r--r--lib/plugins/authldap/lang/no/settings.php2
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php10
-rw-r--r--lib/plugins/authmysql/auth.php203
-rw-r--r--lib/plugins/authmysql/lang/cs/settings.php5
-rw-r--r--lib/plugins/authmysql/lang/da/settings.php4
-rw-r--r--lib/plugins/authmysql/lang/fa/settings.php10
-rw-r--r--lib/plugins/authmysql/lang/fi/settings.php11
-rw-r--r--lib/plugins/authmysql/lang/hr/settings.php2
-rw-r--r--lib/plugins/authmysql/lang/no/settings.php14
-rw-r--r--lib/plugins/authpgsql/auth.php23
-rw-r--r--lib/plugins/authpgsql/lang/cs/settings.php5
-rw-r--r--lib/plugins/authpgsql/lang/fa/settings.php8
-rw-r--r--lib/plugins/authpgsql/lang/it/settings.php2
-rw-r--r--lib/plugins/authpgsql/lang/ru/settings.php6
-rw-r--r--lib/plugins/authplain/_test/escaping.test.php48
-rw-r--r--lib/plugins/authplain/auth.php39
-rw-r--r--lib/plugins/config/admin.php45
-rw-r--r--lib/plugins/config/settings/config.class.php214
-rw-r--r--lib/plugins/config/settings/extra.class.php105
-rw-r--r--lib/plugins/extension/admin.php10
-rw-r--r--lib/plugins/extension/helper/extension.php8
-rw-r--r--lib/plugins/extension/helper/list.php16
-rw-r--r--lib/plugins/extension/helper/repository.php6
-rw-r--r--lib/plugins/extension/lang/cs/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/cs/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/cs/lang.php92
-rw-r--r--lib/plugins/extension/lang/da/lang.php24
-rw-r--r--lib/plugins/extension/lang/en/lang.php7
-rw-r--r--lib/plugins/extension/lang/fa/lang.php40
-rw-r--r--lib/plugins/extension/lang/fi/lang.php37
-rw-r--r--lib/plugins/extension/lang/hr/lang.php66
-rw-r--r--lib/plugins/extension/lang/it/lang.php21
-rw-r--r--lib/plugins/extension/lang/ja/lang.php6
-rw-r--r--lib/plugins/extension/lang/ko/lang.php9
-rw-r--r--lib/plugins/extension/lang/nl/lang.php2
-rw-r--r--lib/plugins/extension/lang/ru/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/ru/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/ru/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/ru/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/ru/lang.php44
-rw-r--r--lib/plugins/extension/lang/zh-tw/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/zh-tw/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/zh-tw/lang.php69
-rw-r--r--lib/plugins/info/syntax.php38
-rw-r--r--lib/plugins/popularity/helper.php13
-rw-r--r--lib/plugins/popularity/lang/eu/lang.php5
-rw-r--r--lib/plugins/popularity/lang/hr/intro.txt7
-rw-r--r--lib/plugins/popularity/lang/hr/lang.php14
-rw-r--r--lib/plugins/popularity/lang/hr/submitted.txt3
-rw-r--r--lib/plugins/revert/lang/ar/lang.php1
-rw-r--r--lib/plugins/revert/lang/cs/lang.php2
-rw-r--r--lib/plugins/revert/lang/eu/lang.php6
-rw-r--r--lib/plugins/revert/lang/hr/intro.txt3
-rw-r--r--lib/plugins/revert/lang/hr/lang.php16
-rw-r--r--lib/plugins/revert/lang/ko/lang.php2
-rw-r--r--lib/plugins/revert/lang/no/lang.php1
-rw-r--r--lib/plugins/syntax.php11
-rw-r--r--lib/plugins/usermanager/admin.php34
-rw-r--r--lib/plugins/usermanager/lang/cs/lang.php14
-rw-r--r--lib/plugins/usermanager/lang/da/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/da/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/eu/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/fa/lang.php3
-rw-r--r--lib/plugins/usermanager/lang/fi/lang.php10
-rw-r--r--lib/plugins/usermanager/lang/hr/add.txt1
-rw-r--r--lib/plugins/usermanager/lang/hr/delete.txt1
-rw-r--r--lib/plugins/usermanager/lang/hr/edit.txt1
-rw-r--r--lib/plugins/usermanager/lang/hr/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/hr/intro.txt1
-rw-r--r--lib/plugins/usermanager/lang/hr/lang.php66
-rw-r--r--lib/plugins/usermanager/lang/hr/list.txt1
-rw-r--r--lib/plugins/usermanager/lang/ko/lang.php8
-rw-r--r--lib/plugins/usermanager/lang/ru/import.txt3
-rw-r--r--lib/plugins/usermanager/lang/ru/lang.php5
-rw-r--r--lib/scripts/behaviour.js15
-rw-r--r--lib/tpl/dokuwiki/detail.php6
-rw-r--r--lib/tpl/dokuwiki/images/pagetools-build.php2
-rw-r--r--lib/tpl/dokuwiki/main.php14
-rw-r--r--lib/tpl/dokuwiki/tpl_header.php14
307 files changed, 5217 insertions, 1213 deletions
diff --git a/.travis.yml b/.travis.yml
index 9c3193d19..0bef94048 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,14 +4,13 @@ php:
- "5.5"
- "5.4"
- "5.3"
-# PHP 5.6 is not yet released, allow failures
-matrix:
- allow_failures:
- - php: "5.6"
notifications:
irc:
channels:
- "chat.freenode.net#dokuwiki"
on_success: change
on_failure: change
-script: cd _test && phpunit --verbose --stderr
+install:
+ - wget https://phar.phpunit.de/phpunit-4.3.5.phar -O _test/phpunit
+ - chmod 755 _test/phpunit
+script: cd _test && ./phpunit --verbose --stderr
diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php
index 060e37d28..dad2060e5 100644
--- a/_test/core/TestRequest.php
+++ b/_test/core/TestRequest.php
@@ -45,8 +45,6 @@ class TestRequest {
*/
public function execute($uri='/doku.php') {
global $INPUT;
- global $ID;
- global $INFO;
// save old environment
$server = $_SERVER;
diff --git a/_test/data/media/wiki/kind_zu_katze.ogv b/_test/data/media/wiki/kind_zu_katze.ogv
new file mode 100644
index 000000000..1ad3732dc
--- /dev/null
+++ b/_test/data/media/wiki/kind_zu_katze.ogv
Binary files differ
diff --git a/_test/data/media/wiki/kind_zu_katze.png b/_test/data/media/wiki/kind_zu_katze.png
new file mode 100644
index 000000000..a5c151e3f
--- /dev/null
+++ b/_test/data/media/wiki/kind_zu_katze.png
Binary files differ
diff --git a/_test/data/media/wiki/kind_zu_katze.webm b/_test/data/media/wiki/kind_zu_katze.webm
new file mode 100644
index 000000000..2973ff833
--- /dev/null
+++ b/_test/data/media/wiki/kind_zu_katze.webm
Binary files differ
diff --git a/_test/tests/inc/changelog_getlastrevisionat.test.php b/_test/tests/inc/changelog_getlastrevisionat.test.php
new file mode 100644
index 000000000..84b185ce8
--- /dev/null
+++ b/_test/tests/inc/changelog_getlastrevisionat.test.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * Tests for requesting revisioninfo of a revision of a page with getRevisionInfo()
+ *
+ * This class uses the files:
+ * - data/pages/mailinglist.txt
+ * - data/meta/mailinglist.changes
+ */
+class changelog_getlastrevisionat_test extends DokuWikiTest {
+
+ private $pageid = 'mailinglist';
+
+ function setup() {
+ parent::setup();
+ global $cache_revinfo;
+ $cache =& $cache_revinfo;
+ if(isset($cache['nonexist'])) {
+ unset($cache['nonexist']);
+ }
+ if(isset($cache['mailinglist'])) {
+ unset($cache['mailinglist']);
+ }
+ }
+
+
+ /**
+ * no nonexist.changes meta file available
+ */
+ function test_changemetadatanotexists() {
+ $rev = 1362525899;
+ $id = 'nonexist';
+ $revsexpected = false;
+
+ $pagelog = new PageChangeLog($id, $chunk_size = 8192);
+ $revs = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+ /**
+ * start at exact current revision of mailinglist page
+ *
+ */
+ function test_startatexactcurrentrev() {
+ $rev = 1385051947;
+ $revsexpected = '';
+
+ //set a known timestamp
+ touch(wikiFN($this->pageid), $rev);
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revsexpected, $revs);
+
+ }
+
+ /**
+ * test a future revision
+ *
+ */
+ function test_futurerev() {
+ $rev = 1385051947;
+ $revsexpected = '';
+
+ //set a known timestamp
+ touch(wikiFN($this->pageid), $rev);
+
+ $rev +=1;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revsexpected, $revs);
+
+ }
+
+ /**
+ * start at exact last revision of mailinglist page
+ *
+ */
+ function test_exactlastrev() {
+ $rev = 1360110636;
+ $revsexpected = 1360110636;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revs = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revsexpected, $revs);
+ }
+
+
+ /**
+ * Request not existing revision
+ *
+ */
+ function test_olderrev() {
+ $rev = 1;
+ $revexpected = false;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * Start at non existing revision somewhere between existing revisions
+ */
+ function test_notexistingrev() {
+ $rev = 1362525890;
+ $revexpected = 1362525359;
+
+ $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192);
+ $revfound = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($revexpected, $revfound);
+ }
+
+ /**
+ * request nonexisting page
+ *
+ */
+ function test_notexistingpage() {
+ $rev = 1385051947;
+ $currentexpected = false;
+
+ $pagelog = new PageChangeLog('nonexistingpage', $chunk_size = 8192);
+ $current = $pagelog->getLastRevisionAt($rev);
+ $this->assertEquals($currentexpected, $current);
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/common_ml.test.php b/_test/tests/inc/common_ml.test.php
index 415c0a88d..027dcaef2 100644
--- a/_test/tests/inc/common_ml.test.php
+++ b/_test/tests/inc/common_ml.test.php
@@ -146,4 +146,15 @@ class common_ml_test extends DokuWikiTest {
$this->assertEquals($expect, ml($id, $args));
}
+
+ function test_ml_empty_rev() {
+ global $conf;
+ $conf['useslash'] = 0;
+ $conf['userewrite'] = 0;
+
+ $args = array('a' => 'b', 'c' => 'd', 'rev' => '');
+
+ $expect = DOKU_BASE . $this->script . '?a=b&amp;c=d&amp;media=some:img.jpg';
+ $this->assertEquals($expect, ml('some:img.jpg', $args));
+ }
}
diff --git a/_test/tests/inc/common_wl.test.php b/_test/tests/inc/common_wl.test.php
index 2e34dcae3..4bfde3f39 100644
--- a/_test/tests/inc/common_wl.test.php
+++ b/_test/tests/inc/common_wl.test.php
@@ -142,6 +142,17 @@ class common_wl_test extends DokuWikiTest {
$expect = DOKU_BASE . DOKU_SCRIPT . '/some/one?a=b&c=d';
$this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&'));
}
+
+ function test_wl_empty_rev() {
+ global $conf;
+ $conf['useslash'] = 0;
+ $conf['userewrite'] = 0;
+
+ $args = array('a' => 'b', 'c' => 'd', 'rev' => '');
+
+ $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&amp;a=b&amp;c=d';
+ $this->assertEquals($expect, wl('some:', $args));
+ }
diff --git a/_test/tests/inc/init_checkssl.test.php b/_test/tests/inc/init_checkssl.test.php
new file mode 100644
index 000000000..c57d3c37e
--- /dev/null
+++ b/_test/tests/inc/init_checkssl.test.php
@@ -0,0 +1,81 @@
+<?php
+
+class init_checkssl_test extends DokuWikiTest {
+
+ /**
+ * Running behind an SSL proxy, HTTP between server and proxy
+ * HTTPS not set
+ * HTTP_X_FORWARDED_PROTO
+ * set to https
+ */
+ function test1() {
+ $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
+
+ $this->assertEquals(is_ssl(), true);
+ }
+
+ /**
+ * Running behind a plain HTTP proxy, HTTP between server and proxy
+ * HTTPS not set
+ * HTTP_X_FORWARDED_PROTO set to http
+ */
+ function test2() {
+ $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'http';
+
+ $this->assertEquals(is_ssl(), false);
+ }
+
+ /**
+ * Running behind an SSL proxy, HTTP between server and proxy
+ * HTTPS set to off,
+ * HTTP_X_FORWARDED_PROTO set to https
+ */
+ function test3() {
+ $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
+ $_SERVER['HTTPS'] = 'off';
+
+ $this->assertEquals(is_ssl(), true);
+ }
+
+ /**
+ * Not running behind a proxy, HTTPS server
+ * HTTPS set to on,
+ * HTTP_X_FORWARDED_PROTO not set
+ */
+ function test4() {
+ $_SERVER['HTTPS'] = 'on';
+
+ $this->assertEquals(is_ssl(), true);
+ }
+
+ /**
+ * Not running behind a proxy, plain HTTP server
+ * HTTPS not set
+ * HTTP_X_FORWARDED_PROTO not set
+ */
+ function test5() {
+ $this->assertEquals(is_ssl(), false);
+ }
+
+ /**
+ * Not running behind a proxy, plain HTTP server
+ * HTTPS set to off
+ * HTTP_X_FORWARDED_PROTO not set
+ */
+ function test6() {
+ $_SERVER['HTTPS'] = 'off';
+ $this->assertEquals(is_ssl(), false);
+ }
+
+ /**
+ * Running behind an SSL proxy, SSL between proxy and HTTP server
+ * HTTPS set to on,
+ * HTTP_X_FORWARDED_PROTO set to https
+ */
+ function test7() {
+ $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
+ $_SERVER['HTTPS'] = 'on';
+
+ $this->assertEquals(is_ssl(), true);
+ }
+}
diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php
index cec0b80f6..4a8fb8d71 100644
--- a/_test/tests/inc/input.test.php
+++ b/_test/tests/inc/input.test.php
@@ -14,8 +14,58 @@ class input_test extends DokuWikiTest {
'empty' => '',
'emptya' => array(),
'do' => array('save' => 'Speichern'),
+
);
+ /**
+ * custom filter function
+ *
+ * @param $string
+ * @return mixed
+ */
+ public function myfilter($string) {
+ $string = str_replace('foo', 'bar', $string);
+ $string = str_replace('baz', '', $string);
+ return $string;
+ }
+
+ public function test_filter() {
+ $_GET = array(
+ 'foo' => 'foo',
+ 'zstring'=> "foo\0bar",
+ 'znull' => "\0",
+ 'zint' => '42'."\0".'42',
+ 'zintbaz'=> "baz42",
+ );
+ $_POST = $_GET;
+ $_REQUEST = $_GET;
+ $INPUT = new Input();
+
+ $filter = array($this,'myfilter');
+
+ $this->assertNotSame('foobar', $INPUT->str('zstring'));
+ $this->assertSame('foobar', $INPUT->filter()->str('zstring'));
+ $this->assertSame('bar', $INPUT->filter($filter)->str('foo'));
+ $this->assertSame('bar', $INPUT->filter()->str('znull', 'bar', true));
+ $this->assertNotSame('foobar', $INPUT->str('zstring')); // make sure original input is unmodified
+
+ $this->assertNotSame('foobar', $INPUT->get->str('zstring'));
+ $this->assertSame('foobar', $INPUT->get->filter()->str('zstring'));
+ $this->assertSame('bar', $INPUT->get->filter($filter)->str('foo'));
+ $this->assertSame('bar', $INPUT->get->filter()->str('znull', 'bar', true));
+ $this->assertNotSame('foobar', $INPUT->get->str('zstring')); // make sure original input is unmodified
+
+ $this->assertNotSame(4242, $INPUT->int('zint'));
+ $this->assertSame(4242, $INPUT->filter()->int('zint'));
+ $this->assertSame(42, $INPUT->filter($filter)->int('zintbaz'));
+ $this->assertSame(42, $INPUT->filter()->str('znull', 42, true));
+
+ $this->assertSame(true, $INPUT->bool('znull'));
+ $this->assertSame(false, $INPUT->filter()->bool('znull'));
+
+ $this->assertSame('foobar', $INPUT->filter()->valid('zstring', array('foobar', 'bang')));
+ }
+
public function test_str() {
$_REQUEST = $this->data;
$_POST = $this->data;
diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php
index b47a575de..2457fb031 100644
--- a/_test/tests/inc/parser/parser_footnote.test.php
+++ b/_test/tests/inc/parser/parser_footnote.test.php
@@ -303,7 +303,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser {
array('nest', array ( array (
array('footnote_open',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
diff --git a/_test/tests/inc/parser/parser_lists.test.php b/_test/tests/inc/parser/parser_lists.test.php
index e4ef1f83e..6acaff637 100644
--- a/_test/tests/inc/parser/parser_lists.test.php
+++ b/_test/tests/inc/parser/parser_lists.test.php
@@ -13,7 +13,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -46,7 +46,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -80,7 +80,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -109,7 +109,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -138,7 +138,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser {
$calls = array (
array('document_start',array()),
array('listo_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -188,7 +188,7 @@ Bar');
array('cdata',array("Foo")),
array('p_close',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('listcontent_close',array()),
@@ -227,7 +227,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('strong_open',array()),
array('cdata',array("A")),
@@ -262,7 +262,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('unformatted',array("A")),
array('listcontent_close',array()),
@@ -291,7 +291,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('cdata',array("A")),
array('linebreak',array()),
@@ -355,7 +355,7 @@ Bar');
$calls = array (
array('document_start',array()),
array('listu_open',array()),
- array('listitem_open',array(1)),
+ array('listitem_open',array(1,Doku_Handler_List::NODE)),
array('listcontent_open',array()),
array('nest', array( array(
array('footnote_open',array()),
diff --git a/_test/tests/inc/parser/parser_media.test.php b/_test/tests/inc/parser/parser_media.test.php
new file mode 100644
index 000000000..d9a0626f5
--- /dev/null
+++ b/_test/tests/inc/parser/parser_media.test.php
@@ -0,0 +1,103 @@
+<?php
+require_once 'parser.inc.php';
+
+/**
+ * Tests for the implementation of audio and video files
+ *
+ * @author Michael Große <grosse@cosmocode.de>
+*/
+class TestOfDoku_Parser_Media extends TestOfDoku_Parser {
+
+ function testVideoOGVExternal() {
+ $file = 'http://some.where.far/away.ogv';
+ $parser_response = p_get_instructions('{{' . $file . '}}');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('externalmedia',array($file,null,null,null,null,'cache','details')),
+ array('cdata',array(null)),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+ $this->assertEquals(array_map('stripbyteindex',$parser_response),$calls);
+
+ $Renderer = new Doku_Renderer_xhtml();
+ $url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true);
+ //print_r("url: " . $url);
+ $video = '<video class="media" width="320" height="240" controls="controls">';
+ $this->assertEquals(substr($url,0,66),$video);
+ $source = '<source src="http://some.where.far/away.ogv" type="video/ogg" />';
+ $this->assertEquals(substr($url,67,64),$source);
+ // work around random token
+ $a_first_part = '<a href="/./lib/exe/fetch.php?cache=&amp;tok=';
+ $a_second_part = '&amp;media=http%3A%2F%2Fsome.where.far%2Faway.ogv" class="media mediafile mf_ogv" title="http://some.where.far/away.ogv">';
+ $this->assertEquals(substr($url,132,45),$a_first_part);
+ $this->assertEquals(substr($url,183,121),$a_second_part);
+ $rest = 'away.ogv</a></video>'."\n";
+ $this->assertEquals(substr($url,304),$rest);
+ }
+
+ /**
+ * unknown extension of external media file
+ */
+ function testVideoVIDExternal() {
+ $file = 'http://some.where.far/away.vid';
+ $parser_response = p_get_instructions('{{' . $file . '}}');
+
+ $calls = array(
+ array('document_start', array()),
+ array('p_open', array()),
+ array('externalmedia', array($file, null, null, null, null, 'cache', 'details')),
+ array('cdata', array(null)),
+ array('p_close', array()),
+ array('document_end', array()),
+ );
+ $this->assertEquals(array_map('stripbyteindex', $parser_response), $calls);
+
+ $Renderer = new Doku_Renderer_xhtml();
+ $url = $Renderer->externalmedia($file, null, null, null, null, 'cache', 'details', true);
+ // work around random token
+ $a_first_part = '<a href="/./lib/exe/fetch.php?tok=';
+ $a_second_part = '&amp;media=http%3A%2F%2Fsome.where.far%2Faway.vid" class="media mediafile mf_vid" title="http://some.where.far/away.vid">';
+ $this->assertEquals(substr($url,0,34),$a_first_part);
+ $this->assertEquals(substr($url,40,121),$a_second_part);
+ $rest = 'away.vid</a>';
+ $this->assertEquals(substr($url,161),$rest);
+ }
+
+
+ function testVideoOGVInternal() {
+ $file = 'wiki:kind_zu_katze.ogv';
+ $parser_response = p_get_instructions('{{' . $file . '}}');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('internalmedia',array($file,null,null,null,null,'cache','details')),
+ array('cdata',array(null)),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+ $this->assertEquals(array_map('stripbyteindex',$parser_response),$calls);
+
+ $Renderer = new Doku_Renderer_xhtml();
+ $url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true);
+
+ $video = '<video class="media" width="320" height="240" controls="controls" poster="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.png">';
+ $this->assertEquals(substr($url,0,125),$video);
+
+ $source_webm = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.webm" type="video/webm" />';
+ $this->assertEquals(substr($url,126,85),$source_webm);
+ $source_ogv = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.ogv" type="video/ogg" />';
+ $this->assertEquals(substr($url,212,83),$source_ogv);
+
+ $a_webm = '<a href="/./lib/exe/fetch.php?id=&amp;cache=&amp;media=wiki:kind_zu_katze.webm" class="media mediafile mf_webm" title="wiki:kind_zu_katze.webm (99.1 KB)">kind_zu_katze.webm</a>';
+ $a_ogv = '<a href="/./lib/exe/fetch.php?id=&amp;cache=&amp;media=wiki:kind_zu_katze.ogv" class="media mediafile mf_ogv" title="wiki:kind_zu_katze.ogv (44.8 KB)">kind_zu_katze.ogv</a>';
+ $this->assertEquals(substr($url,296,176),$a_webm);
+ $this->assertEquals(substr($url,472,172),$a_ogv);
+
+ $rest = '</video>'."\n";
+ $this->assertEquals(substr($url,644),$rest);
+ }
+}
diff --git a/_test/tests/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php
index b1ae2a84f..648ede07e 100644
--- a/_test/tests/lib/exe/js_js_compress.test.php
+++ b/_test/tests/lib/exe/js_js_compress.test.php
@@ -58,6 +58,18 @@ class js_js_compress_test extends DokuWikiTest {
$this->assertEquals(js_compress($text), 'text.replace(/"/,"//")');
}
+ function test_regex_after_and_with_slashes_outside_string(){
+ $text = 'if ( peng == bla && /pattern\//.test(url)) request = new Something();';
+ $this->assertEquals(js_compress($text),
+ 'if(peng==bla&&/pattern\//.test(url))request=new Something();');
+ }
+
+ function test_regex_after_or_with_slashes_outside_string(){
+ $text = 'if ( peng == bla || /pattern\//.test(url)) request = new Something();';
+ $this->assertEquals(js_compress($text),
+ 'if(peng==bla||/pattern\//.test(url))request=new Something();');
+ }
+
function test_dquot1(){
$text = 'var foo="Now what \\" \'do we//get /*here*/ ?";';
$this->assertEquals(js_compress($text), $text);
@@ -145,6 +157,72 @@ EOF;
$this->assertEquals($out, js_compress($text));
}
+ function test_plusplus1(){
+ $text = 'a = 5 + ++b;';
+ $this->assertEquals('a=5+ ++b;',js_compress($text));
+ }
+
+ function test_plusplus2(){
+ $text = 'a = 5+ ++b;';
+ $this->assertEquals('a=5+ ++b;',js_compress($text));
+ }
+
+ function test_plusplus3(){
+ $text = 'a = 5++ + b;';
+ $this->assertEquals('a=5++ +b;',js_compress($text));
+ }
+
+ function test_plusplus4(){
+ $text = 'a = 5++ +b;';
+ $this->assertEquals('a=5++ +b;',js_compress($text));
+ }
+
+ function test_minusminus1(){
+ $text = 'a = 5 - --b;';
+ $this->assertEquals('a=5- --b;',js_compress($text));
+ }
+
+ function test_minusminus2(){
+ $text = 'a = 5- --b;';
+ $this->assertEquals('a=5- --b;',js_compress($text));
+ }
+
+ function test_minusminus3(){
+ $text = 'a = 5-- - b;';
+ $this->assertEquals('a=5-- -b;',js_compress($text));
+ }
+
+ function test_minusminus4(){
+ $text = 'a = 5-- -b;';
+ $this->assertEquals('a=5-- -b;',js_compress($text));
+ }
+
+ function test_minusplus1(){
+ $text = 'a = 5-- +b;';
+ $this->assertEquals('a=5--+b;',js_compress($text));
+ }
+
+ function test_minusplus2(){
+ $text = 'a = 5-- + b;';
+ $this->assertEquals('a=5--+b;',js_compress($text));
+ }
+
+ function test_plusminus1(){
+ $text = 'a = 5++ - b;';
+ $this->assertEquals('a=5++-b;',js_compress($text));
+ }
+
+ function test_plusminus2(){
+ $text = 'a = 5++ -b;';
+ $this->assertEquals('a=5++-b;',js_compress($text));
+ }
+
+ function test_unusual_signs(){
+ $text='var π = Math.PI, τ = 2 * π, halfπ = π / 2, ε = 1e-6, ε2 = ε * ε, radians = π / 180, degrees = 180 / π;';
+ $this->assertEquals(js_compress($text),
+ 'var π=Math.PI,τ=2*π,halfπ=π/2,ε=1e-6,ε2=ε*ε,radians=π/180,degrees=180/π;');
+ }
+
/**
* Test the files provided with the original JsStrip
*/
diff --git a/bin/gittool.php b/bin/gittool.php
index 6944dde57..cbadb5bfa 100755
--- a/bin/gittool.php
+++ b/bin/gittool.php
@@ -101,7 +101,7 @@ class GitToolCLI extends DokuCLI {
/**
* Tries to install the given extensions using git clone
*
- * @param $extensions
+ * @param array $extensions
*/
public function cmd_clone($extensions) {
$errors = array();
@@ -130,7 +130,7 @@ class GitToolCLI extends DokuCLI {
/**
* Tries to install the given extensions using git clone with fallback to install
*
- * @param $extensions
+ * @param array $extensions
*/
public function cmd_install($extensions) {
$errors = array();
@@ -206,12 +206,13 @@ class GitToolCLI extends DokuCLI {
* Install extension from the given download URL
*
* @param string $ext
- * @return bool
+ * @return bool|null
*/
private function downloadExtension($ext) {
/** @var helper_plugin_extension_extension $plugin */
$plugin = plugin_load('helper', 'extension_extension');
if(!$ext) die("extension plugin not available, can't continue");
+
$plugin->setExtension($ext);
$url = $plugin->getDownloadURL();
@@ -291,12 +292,13 @@ class GitToolCLI extends DokuCLI {
* Returns the repository for the given extension
*
* @param $extension
- * @return bool|string
+ * @return false|string
*/
private function getSourceRepo($extension) {
/** @var helper_plugin_extension_extension $ext */
$ext = plugin_load('helper', 'extension_extension');
if(!$ext) die("extension plugin not available, can't continue");
+
$ext->setExtension($extension);
$repourl = $ext->getSourcerepoURL();
diff --git a/bin/striplangs.php b/bin/striplangs.php
index 6335bc84c..82d27d462 100755
--- a/bin/striplangs.php
+++ b/bin/striplangs.php
@@ -26,7 +26,8 @@ class StripLangsCLI extends DokuCLI {
$options->registerOption(
'keep',
'Comma separated list of languages to keep in addition to English.',
- 'k'
+ 'k',
+ 'langcodes'
);
$options->registerOption(
'english-only',
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index 8fc4ba74f..54bfd4755 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -61,6 +61,13 @@ class WantedPagesCLI extends DokuCLI {
}
}
+ /**
+ * Determine directions of the search loop
+ *
+ * @param string $entry
+ * @param string $basepath
+ * @return int
+ */
protected function dir_filter($entry, $basepath) {
if($entry == '.' || $entry == '..') {
return WantedPagesCLI::DIR_CONTINUE;
@@ -77,6 +84,13 @@ class WantedPagesCLI extends DokuCLI {
return WantedPagesCLI::DIR_CONTINUE;
}
+ /**
+ * Collects recursively the pages in a namespace
+ *
+ * @param string $dir
+ * @return array
+ * @throws DokuCLI_Exception
+ */
protected function get_pages($dir) {
static $trunclen = null;
if(!$trunclen) {
@@ -108,6 +122,12 @@ class WantedPagesCLI extends DokuCLI {
return $pages;
}
+ /**
+ * Parse instructions and returns the non-existing links
+ *
+ * @param array $page array with page id and file path
+ * @return array
+ */
function internal_links($page) {
global $conf;
$instructions = p_get_instructions(file_get_contents($page['file']));
diff --git a/conf/mime.conf b/conf/mime.conf
index 2a50fab10..c2e03b775 100644
--- a/conf/mime.conf
+++ b/conf/mime.conf
@@ -9,7 +9,6 @@ gif image/gif
png image/png
ico image/vnd.microsoft.icon
-swf application/x-shockwave-flash
mp3 audio/mpeg
ogg audio/ogg
wav audio/wav
@@ -66,3 +65,7 @@ odt !application/vnd.oasis.opendocument.text
#xml text/xml
#csv text/csv
+# Also flash may be able to execute arbitrary scripts in the website's
+# context
+#swf application/x-shockwave-flash
+
diff --git a/conf/mysql.conf.php.example b/conf/mysql.conf.php.example
index c67e77c45..8337f51b4 100644
--- a/conf/mysql.conf.php.example
+++ b/conf/mysql.conf.php.example
@@ -56,7 +56,7 @@ $conf['plugin']['authmysql']['TablesToLock']= array("users", "users AS u","group
* of the user. If the result table is empty or contains more than one
* row, access will be denied.
*
- * The plugin accesses the password as 'pass' so a alias might be necessary.
+ * The plugin accesses the password as 'pass' so an alias might be necessary.
*
* Following patters will be replaced:
* %{user} user name
@@ -107,10 +107,10 @@ $conf['plugin']['authmysql']['getGroups'] = "SELECT name as `group`
/* This statement should return a table containing all user login names
* that meet certain filter criteria. The filter expressions will be added
* case dependend by the plugin. At the end a sort expression will be added.
- * Important is that this list contains no double entries fo a user. Each
+ * Important is that this list contains no double entries for a user. Each
* user name is only allowed once in the table.
*
- * The login name will be accessed as 'user' to a alias might be neseccary.
+ * The login name will be accessed as 'user' to an alias might be neseccary.
* No patterns will be replaced in this statement but following patters
* will be replaced in the filter expressions:
* %{user} in FilterLogin user's login name
@@ -174,7 +174,7 @@ $conf['plugin']['authmysql']['delGroup'] = "DELETE FROM groups
WHERE gid='%{gid}'";
/* This statement should return the database index of a given user name.
- * The plugin will access the index with the name 'id' so a alias might be
+ * The plugin will access the index with the name 'id' so an alias might be
* necessary.
* following patters will be replaced:
* %{user} user name
@@ -240,7 +240,7 @@ $conf['plugin']['authmysql']['delUserGroup']= "DELETE FROM usergroup
AND gid='%{gid}'";
/* This statement should return the database index of a given group name.
- * The plugin will access the index with the name 'id' so a alias might
+ * The plugin will access the index with the name 'id' so an alias might
* be necessary.
*
* Following patters will be replaced:
diff --git a/doku.php b/doku.php
index da3643544..f5aa6cfa4 100644
--- a/doku.php
+++ b/doku.php
@@ -9,12 +9,17 @@
*/
// update message version
-$updateVersion = 45;
+$updateVersion = 47;
// xdebug_start_profiling();
if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/');
+// define all DokuWiki globals here (needed within test requests but also helps to keep track)
+global $ACT, $INPUT, $QUERY, $ID, $REV, $DATE_AT, $IDX,
+ $DATE, $RANGE, $HIGH, $TEXT, $PRE, $SUF, $SUM, $INFO, $JSINFO;
+
+
if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) {
$ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
} elseif(!empty($_REQUEST['idx'])) {
@@ -34,6 +39,7 @@ $QUERY = trim($INPUT->str('id'));
$ID = getID();
$REV = $INPUT->int('rev');
+$DATE_AT = $INPUT->str('at');
$IDX = $INPUT->str('idx');
$DATE = $INPUT->int('date');
$RANGE = $INPUT->str('range');
@@ -47,7 +53,41 @@ $PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1));
$SUF = cleanText($INPUT->post->str('suffix'));
$SUM = $INPUT->post->str('summary');
-//make info about the selected page available
+
+//parse DATE_AT
+if($DATE_AT) {
+ $date_parse = strtotime($DATE_AT);
+ if($date_parse) {
+ $DATE_AT = $date_parse;
+ } else { // check for UNIX Timestamp
+ $date_parse = @date('Ymd',$DATE_AT);
+ if(!$date_parse || $date_parse === '19700101') {
+ msg(sprintf($lang['unable_to_parse_date'], $DATE_AT));
+ $DATE_AT = null;
+ }
+ }
+}
+
+//check for existing $REV related to $DATE_AT
+if($DATE_AT) {
+ $pagelog = new PageChangeLog($ID);
+ $rev_t = $pagelog->getLastRevisionAt($DATE_AT);
+ if($rev_t === '') { //current revision
+ $REV = null;
+ $DATE_AT = null;
+ } else if ($rev_t === false) { //page did not exist
+ $rev_n = $pagelog->getRelativeRevision($DATE_AT,+1);
+ msg(sprintf($lang['page_nonexist_rev'],
+ strftime($conf['dformat'],$DATE_AT),
+ wl($ID, array('rev' => $rev_n)),
+ strftime($conf['dformat'],$rev_n)));
+ $REV = $DATE_AT; //will result in a page not exists message
+ } else {
+ $REV = $rev_t;
+ }
+}
+
+//make infos about the selected page available
$INFO = pageinfo();
//export minimal info to JS, plugins can add more
diff --git a/feed.php b/feed.php
index a63e22164..aa00063a1 100644
--- a/feed.php
+++ b/feed.php
@@ -306,7 +306,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
$src_r = '';
$src_l = '';
- if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) {
+ if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)), 300)) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src_r = ml($id, $more, true, '&amp;', true);
}
@@ -355,7 +355,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
break;
case 'html':
if($ditem['media']) {
- if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
+ if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
@@ -386,7 +386,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'abstract':
default:
if($ditem['media']) {
- if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
+ if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index 3c955cf88..210d1c0eb 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -14,6 +14,9 @@ class _DiffOp {
var $orig;
var $closing;
+ /**
+ * @return _DiffOp
+ */
function reverse() {
trigger_error("pure virtual", E_USER_ERROR);
}
@@ -104,6 +107,21 @@ class _DiffOp_Change extends _DiffOp {
*/
class _DiffEngine {
+ var $xchanged = array();
+ var $ychanged = array();
+ var $xv = array();
+ var $yv = array();
+ var $xind = array();
+ var $yind = array();
+ var $seq;
+ var $in_seq;
+ var $lcs;
+
+ /**
+ * @param array $from_lines
+ * @param array $to_lines
+ * @return _DiffOp[]
+ */
function diff($from_lines, $to_lines) {
$n_from = count($from_lines);
$n_to = count($to_lines);
@@ -495,9 +513,9 @@ class Diff {
* Constructor.
* Computes diff between sequences of strings.
*
- * @param $from_lines array An array of strings.
- * (Typically these are lines from a file.)
- * @param $to_lines array An array of strings.
+ * @param array $from_lines An array of strings.
+ * (Typically these are lines from a file.)
+ * @param array $to_lines An array of strings.
*/
function __construct($from_lines, $to_lines) {
$eng = new _DiffEngine;
@@ -512,8 +530,9 @@ class Diff {
*
* $diff = new Diff($lines1, $lines2);
* $rev = $diff->reverse();
- * @return object A Diff object representing the inverse of the
- * original diff.
+ *
+ * @return Diff A Diff object representing the inverse of the
+ * original diff.
*/
function reverse() {
$rev = $this;
@@ -631,19 +650,19 @@ class MappedDiff extends Diff {
* case-insensitve diffs, or diffs which ignore
* changes in white-space.
*
- * @param $from_lines array An array of strings.
- * (Typically these are lines from a file.)
+ * @param string[] $from_lines An array of strings.
+ * (Typically these are lines from a file.)
*
- * @param $to_lines array An array of strings.
+ * @param string[] $to_lines An array of strings.
*
- * @param $mapped_from_lines array This array should
- * have the same size number of elements as $from_lines.
- * The elements in $mapped_from_lines and
- * $mapped_to_lines are what is actually compared
- * when computing the diff.
+ * @param string[] $mapped_from_lines This array should
+ * have the same size number of elements as $from_lines.
+ * The elements in $mapped_from_lines and
+ * $mapped_to_lines are what is actually compared
+ * when computing the diff.
*
- * @param $mapped_to_lines array This array should
- * have the same number of elements as $to_lines.
+ * @param string[] $mapped_to_lines This array should
+ * have the same number of elements as $to_lines.
*/
function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) {
@@ -697,12 +716,13 @@ class DiffFormatter {
/**
* Format a diff.
*
- * @param $diff object A Diff object.
+ * @param Diff $diff A Diff object.
* @return string The formatted output.
*/
function format($diff) {
$xi = $yi = 1;
+ $x0 = $y0 = 0;
$block = false;
$context = array();
@@ -752,6 +772,13 @@ class DiffFormatter {
return $this->_end_diff();
}
+ /**
+ * @param int $xbeg
+ * @param int $xlen
+ * @param int $ybeg
+ * @param int $ylen
+ * @param array $edits
+ */
function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) {
$this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen));
foreach ($edits as $edit) {
@@ -779,6 +806,13 @@ class DiffFormatter {
return $val;
}
+ /**
+ * @param int $xbeg
+ * @param int $xlen
+ * @param int $ybeg
+ * @param int $ylen
+ * @return string
+ */
function _block_header($xbeg, $xlen, $ybeg, $ylen) {
if ($xlen > 1)
$xbeg .= "," . ($xbeg + $xlen - 1);
@@ -788,6 +822,9 @@ class DiffFormatter {
return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg;
}
+ /**
+ * @param string $header
+ */
function _start_block($header) {
echo $header;
}
@@ -896,6 +933,9 @@ class _HWLDF_WordAccumulator {
$this->_tag = $new_tag;
}
+ /**
+ * @param string $new_tag
+ */
function _flushLine($new_tag) {
$this->_flushGroup($new_tag);
if ($this->_line != '')
@@ -1055,6 +1095,10 @@ class TableDiffFormatter extends DiffFormatter {
$this->trailing_context_lines = 2;
}
+ /**
+ * @param Diff $diff
+ * @return string
+ */
function format($diff) {
// Preserve whitespaces by converting some to non-breaking spaces.
// Do not convert all of them to allow word-wrap.
@@ -1165,6 +1209,10 @@ class InlineDiffFormatter extends DiffFormatter {
$this->trailing_context_lines = 2;
}
+ /**
+ * @param Diff $diff
+ * @return string
+ */
function format($diff) {
// Preserve whitespaces by converting some to non-breaking spaces.
// Do not convert all of them to allow word-wrap.
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index cd4c7c4c5..76d973c38 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -57,6 +57,12 @@ class DokuHTTPClient extends HTTPClient {
* @triggers HTTPCLIENT_REQUEST_SEND
* @author Andreas Gohr <andi@splitbrain.org>
*/
+ /**
+ * @param string $url
+ * @param string|array $data the post data either as array or raw data
+ * @param string $method
+ * @return bool
+ */
function sendRequest($url,$data='',$method='GET'){
$httpdata = array('url' => $url,
'data' => $data,
@@ -104,7 +110,7 @@ class HTTPClient {
var $header_regexp; // if set this RE must match against the headers, else abort
var $headers;
var $debug;
- var $start = 0; // for timings
+ var $start = 0.0; // for timings
var $keep_alive = true; // keep alive rocks
// don't set these, read on error
@@ -166,7 +172,8 @@ class HTTPClient {
*
* @param string $url The URL to fetch
* @param bool $sloppy304 Return body on 304 not modified
- * @return bool|string response body, false on error
+ * @return false|string response body, false on error
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function get($url,$sloppy304=false){
@@ -187,7 +194,8 @@ class HTTPClient {
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
* @param bool $sloppy304 Return body on 304 not modified
- * @return bool|string response body, false on error
+ * @return false|string response body, false on error
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function dget($url,$data,$sloppy304=false){
@@ -207,7 +215,7 @@ class HTTPClient {
*
* @param string $url The URL to fetch
* @param array $data Associative array of parameters
- * @return bool|string response body, false on error
+ * @return false|string response body, false on error
* @author Andreas Gohr <andi@splitbrain.org>
*/
function post($url,$data){
@@ -229,6 +237,7 @@ class HTTPClient {
* @param mixed $data - the post data either as array or raw data
* @param string $method - HTTP Method usually GET or POST.
* @return bool - true on success
+ *
* @author Andreas Goetz <cpuidle@gmx.de>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -580,7 +589,18 @@ class HTTPClient {
$this->_debug('SSL Tunnel Response',$r_headers);
if(preg_match('/^HTTP\/1\.[01] 200/i',$r_headers)){
- if (stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
+ // set correct peer name for verification (enabled since PHP 5.6)
+ stream_context_set_option($socket, 'ssl', 'peer_name', $requestinfo['host']);
+
+ // Because of older PHP versions having trouble with TLS (enable_crypto returns true, but
+ // the conection still borks) we try SSLv3 first
+ if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
+ $requesturl = $requestinfo['path'];
+ return true;
+ }
+
+ // If the proxy does not support SSLv3 we try TLS
+ if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
$requesturl = $requestinfo['path'];
return true;
}
@@ -596,6 +616,7 @@ class HTTPClient {
* @param string $data The data to write
* @param string $message Description of what is being read
* @throws HTTPClientException
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _sendData($socket, $data, $message) {
@@ -640,6 +661,7 @@ class HTTPClient {
* @param bool $ignore_eof End-of-file is not an error if this is set
* @throws HTTPClientException
* @return string
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _readData($socket, $nbytes, $message, $ignore_eof = false) {
@@ -689,6 +711,7 @@ class HTTPClient {
* @param string $message Description of what is being read
* @throws HTTPClientException
* @return string
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function _readLine($socket, $message) {
@@ -723,6 +746,9 @@ class HTTPClient {
* Uses _debug_text or _debug_html depending on the SAPI name
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $info
+ * @param mixed $var
*/
function _debug($info,$var=null){
if(!$this->debug) return;
@@ -736,8 +762,8 @@ class HTTPClient {
/**
* print debug info as HTML
*
- * @param $info
- * @param null $var
+ * @param string $info
+ * @param mixed $var
*/
function _debug_html($info, $var=null){
print '<b>'.$info.'</b> '.($this->_time() - $this->start).'s<br />';
@@ -753,8 +779,8 @@ class HTTPClient {
/**
* prints debug info as plain text
*
- * @param $info
- * @param null $var
+ * @param string $info
+ * @param mixed $var
*/
function _debug_text($info, $var=null){
print '*'.$info.'* '.($this->_time() - $this->start)."s\n";
@@ -764,6 +790,8 @@ class HTTPClient {
/**
* Return current timestamp in microsecond resolution
+ *
+ * @return float
*/
static function _time(){
list($usec, $sec) = explode(" ", microtime());
@@ -776,6 +804,9 @@ class HTTPClient {
* All Keys are lowercased.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string
+ * @return array
*/
function _parseHeaders($string){
$headers = array();
@@ -804,6 +835,9 @@ class HTTPClient {
* convert given header array to header string
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $headers
+ * @return string
*/
function _buildHeaders($headers){
$string = '';
@@ -818,6 +852,8 @@ class HTTPClient {
* get cookies as http header string
*
* @author Andreas Goetz <cpuidle@gmx.de>
+ *
+ * @return string
*/
function _getCookies(){
$headers = '';
@@ -833,6 +869,9 @@ class HTTPClient {
* Encode data for posting
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $data
+ * @return string
*/
function _postEncode($data){
return http_build_query($data,'','&');
@@ -843,6 +882,9 @@ class HTTPClient {
*
* @fixme use of urlencode might be wrong here
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $data
+ * @return string
*/
function _postMultipartEncode($data){
$boundary = '--'.$this->boundary;
diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php
index 979dc4d16..839298680 100644
--- a/inc/IXR_Library.php
+++ b/inc/IXR_Library.php
@@ -1,101 +1,146 @@
<?php
+
/**
- * IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
+ * IXR - The Incutio XML-RPC Library
+ *
+ * Copyright (c) 2010, Incutio Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * - Neither the name of Incutio Ltd. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
- * @version 1.61
- * @author Simon Willison
- * @date 11th July 2003
- * @link http://scripts.incutio.com/xmlrpc/
- * @link http://scripts.incutio.com/xmlrpc/manual.php
- * @license Artistic License http://www.opensource.org/licenses/artistic-license.php
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package IXR
+ * @since 1.5
+ *
+ * @copyright Incutio Ltd 2010 (http://www.incutio.com)
+ * @version 1.7.4 7th September 2010
+ * @author Simon Willison
+ * @link http://scripts.incutio.com/xmlrpc/ Site/manual
*
* Modified for DokuWiki
* @author Andreas Gohr <andi@splitbrain.org>
*/
-
-
class IXR_Value {
+
+ /** @var IXR_Value[]|IXR_Date|IXR_Base64|int|bool|double|string */
var $data;
+ /** @var string */
var $type;
- function IXR_Value ($data, $type = false) {
+
+ /**
+ * @param mixed $data
+ * @param bool $type
+ */
+ function IXR_Value($data, $type = false) {
$this->data = $data;
- if (!$type) {
+ if(!$type) {
$type = $this->calculateType();
}
$this->type = $type;
- if ($type == 'struct') {
- /* Turn all the values in the array in to new IXR_Value objects */
- foreach ($this->data as $key => $value) {
+ if($type == 'struct') {
+ // Turn all the values in the array in to new IXR_Value objects
+ foreach($this->data as $key => $value) {
$this->data[$key] = new IXR_Value($value);
}
}
- if ($type == 'array') {
- for ($i = 0, $j = count($this->data); $i < $j; $i++) {
+ if($type == 'array') {
+ for($i = 0, $j = count($this->data); $i < $j; $i++) {
$this->data[$i] = new IXR_Value($this->data[$i]);
}
}
}
+
+ /**
+ * @return string
+ */
function calculateType() {
- if ($this->data === true || $this->data === false) {
+ if($this->data === true || $this->data === false) {
return 'boolean';
}
- if (is_integer($this->data)) {
+ if(is_integer($this->data)) {
return 'int';
}
- if (is_double($this->data)) {
+ if(is_double($this->data)) {
return 'double';
}
+
// Deal with IXR object types base64 and date
- if (is_object($this->data) && is_a($this->data, 'IXR_Date')) {
+ if(is_object($this->data) && is_a($this->data, 'IXR_Date')) {
return 'date';
}
- if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
+ if(is_object($this->data) && is_a($this->data, 'IXR_Base64')) {
return 'base64';
}
- // If it is a normal PHP object convert it in to a struct
- if (is_object($this->data)) {
+ // If it is a normal PHP object convert it in to a struct
+ if(is_object($this->data)) {
$this->data = get_object_vars($this->data);
return 'struct';
}
- if (!is_array($this->data)) {
+ if(!is_array($this->data)) {
return 'string';
}
- /* We have an array - is it an array or a struct ? */
- if ($this->isStruct($this->data)) {
+
+ // We have an array - is it an array or a struct?
+ if($this->isStruct($this->data)) {
return 'struct';
} else {
return 'array';
}
}
+
+ /**
+ * @return bool|string
+ */
function getXml() {
- /* Return XML for this value */
- switch ($this->type) {
+ // Return XML for this value
+ switch($this->type) {
case 'boolean':
- return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>';
+ return '<boolean>' . (($this->data) ? '1' : '0') . '</boolean>';
break;
case 'int':
- return '<int>'.$this->data.'</int>';
+ return '<int>' . $this->data . '</int>';
break;
case 'double':
- return '<double>'.$this->data.'</double>';
+ return '<double>' . $this->data . '</double>';
break;
case 'string':
- return '<string>'.htmlspecialchars($this->data).'</string>';
+ return '<string>' . htmlspecialchars($this->data) . '</string>';
break;
case 'array':
- $return = '<array><data>'."\n";
- foreach ($this->data as $item) {
- $return .= ' <value>'.$item->getXml()."</value>\n";
+ $return = '<array><data>' . "\n";
+ foreach($this->data as $item) {
+ $return .= ' <value>' . $item->getXml() . "</value>\n";
}
$return .= '</data></array>';
return $return;
break;
case 'struct':
- $return = '<struct>'."\n";
- foreach ($this->data as $name => $value) {
+ $return = '<struct>' . "\n";
+ foreach($this->data as $name => $value) {
$return .= " <member><name>$name</name><value>";
- $return .= $value->getXml()."</value></member>\n";
+ $return .= $value->getXml() . "</value></member>\n";
}
$return .= '</struct>';
return $return;
@@ -107,11 +152,17 @@ class IXR_Value {
}
return false;
}
+
+ /**
+ * Checks whether or not the supplied array is a struct or not
+ *
+ * @param array $array
+ * @return boolean
+ */
function isStruct($array) {
- /* Nasty function to check if an array is a struct or not */
$expected = 0;
- foreach ($array as $key => $value) {
- if ((string)$key != (string)$expected) {
+ foreach($array as $key => $value) {
+ if((string) $key != (string) $expected) {
return true;
}
$expected++;
@@ -120,18 +171,25 @@ class IXR_Value {
}
}
-
+/**
+ * IXR_MESSAGE
+ *
+ * @package IXR
+ * @since 1.5
+ *
+ */
class IXR_Message {
var $message;
- var $messageType; // methodCall / methodResponse / fault
+ var $messageType; // methodCall / methodResponse / fault
var $faultCode;
var $faultString;
var $methodName;
var $params;
+
// Current variable stacks
- var $_arraystructs = array(); // The stack used to keep track of the current array/struct
+ var $_arraystructs = array(); // The stack used to keep track of the current array/struct
var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array
- var $_currentStructName = array(); // A stack as well
+ var $_currentStructName = array(); // A stack as well
var $_param;
var $_value;
var $_currentTag;
@@ -139,12 +197,23 @@ class IXR_Message {
var $_lastseen;
// The XML parser
var $_parser;
- function IXR_Message ($message) {
- $this->message = $message;
+
+ /**
+ * @param string $message
+ */
+ function IXR_Message($message) {
+ $this->message =& $message;
}
+
+ /**
+ * @return bool
+ */
function parse() {
// first remove the XML declaration
- $this->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $this->message);
+ // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages
+ $header = preg_replace('/<\?xml.*?\?' . '>/', '', substr($this->message, 0, 100), 1);
+ $this->message = substr_replace($this->message, $header, 0, 100);
+
// workaround for a bug in PHP/libxml2, see http://bugs.php.net/bug.php?id=45996
$this->message = str_replace('&lt;', '&#60;', $this->message);
$this->message = str_replace('&gt;', '&#62;', $this->message);
@@ -152,7 +221,7 @@ class IXR_Message {
$this->message = str_replace('&apos;', '&#39;', $this->message);
$this->message = str_replace('&quot;', '&#34;', $this->message);
$this->message = str_replace("\x0b", ' ', $this->message); //vertical tab
- if (trim($this->message) == '') {
+ if(trim($this->message) == '') {
return false;
}
$this->_parser = xml_parser_create();
@@ -162,23 +231,40 @@ class IXR_Message {
xml_set_object($this->_parser, $this);
xml_set_element_handler($this->_parser, 'tag_open', 'tag_close');
xml_set_character_data_handler($this->_parser, 'cdata');
- if (!xml_parse($this->_parser, $this->message)) {
- /* die(sprintf('XML error: %s at line %d',
- xml_error_string(xml_get_error_code($this->_parser)),
- xml_get_current_line_number($this->_parser))); */
- return false;
- }
+ $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages
+ $final = false;
+ do {
+ if(strlen($this->message) <= $chunk_size) {
+ $final = true;
+ }
+ $part = substr($this->message, 0, $chunk_size);
+ $this->message = substr($this->message, $chunk_size);
+ if(!xml_parse($this->_parser, $part, $final)) {
+ return false;
+ }
+ if($final) {
+ break;
+ }
+ } while(true);
xml_parser_free($this->_parser);
+
// Grab the error messages, if any
- if ($this->messageType == 'fault') {
+ if($this->messageType == 'fault') {
$this->faultCode = $this->params[0]['faultCode'];
$this->faultString = $this->params[0]['faultString'];
}
return true;
}
+
+ /**
+ * @param $parser
+ * @param string $tag
+ * @param $attr
+ */
function tag_open($parser, $tag, $attr) {
- $this->currentTag = $tag;
$this->_currentTagContents = '';
+ $this->_currentTag = $tag;
+
switch($tag) {
case 'methodCall':
case 'methodResponse':
@@ -186,7 +272,7 @@ class IXR_Message {
$this->messageType = $tag;
break;
/* Deal with stacks of arrays and structs */
- case 'data': // data is to all intents and puposes more interesting than array
+ case 'data': // data is to all intents and purposes more interesting than array
$this->_arraystructstypes[] = 'array';
$this->_arraystructs[] = array();
break;
@@ -197,50 +283,52 @@ class IXR_Message {
}
$this->_lastseen = $tag;
}
+
+ /**
+ * @param $parser
+ * @param string $cdata
+ */
function cdata($parser, $cdata) {
$this->_currentTagContents .= $cdata;
}
+
+ /**
+ * @param $parser
+ * @param $tag
+ */
function tag_close($parser, $tag) {
$valueFlag = false;
switch($tag) {
case 'int':
case 'i4':
- $value = (int)trim($this->_currentTagContents);
- $this->_currentTagContents = '';
+ $value = (int) trim($this->_currentTagContents);
$valueFlag = true;
break;
case 'double':
- $value = (double)trim($this->_currentTagContents);
- $this->_currentTagContents = '';
+ $value = (double) trim($this->_currentTagContents);
$valueFlag = true;
break;
case 'string':
- $value = (string)$this->_currentTagContents;
- $this->_currentTagContents = '';
+ $value = (string) $this->_currentTagContents;
$valueFlag = true;
break;
case 'dateTime.iso8601':
$value = new IXR_Date(trim($this->_currentTagContents));
- // $value = $iso->getTimestamp();
- $this->_currentTagContents = '';
$valueFlag = true;
break;
case 'value':
// "If no type is indicated, the type is string."
- if($this->_lastseen == 'value'){
- $value = (string)$this->_currentTagContents;
- $this->_currentTagContents = '';
+ if($this->_lastseen == 'value') {
+ $value = (string) $this->_currentTagContents;
$valueFlag = true;
}
break;
case 'boolean':
- $value = (boolean)trim($this->_currentTagContents);
- $this->_currentTagContents = '';
+ $value = (boolean) trim($this->_currentTagContents);
$valueFlag = true;
break;
case 'base64':
$value = base64_decode($this->_currentTagContents);
- $this->_currentTagContents = '';
$valueFlag = true;
break;
/* Deal with stacks of arrays and structs */
@@ -255,75 +343,94 @@ class IXR_Message {
break;
case 'name':
$this->_currentStructName[] = trim($this->_currentTagContents);
- $this->_currentTagContents = '';
break;
case 'methodName':
$this->methodName = trim($this->_currentTagContents);
- $this->_currentTagContents = '';
break;
}
- if ($valueFlag) {
- /*
- if (!is_array($value) && !is_object($value)) {
- $value = trim($value);
- }
- */
- if (count($this->_arraystructs) > 0) {
+
+ if($valueFlag) {
+ if(count($this->_arraystructs) > 0) {
// Add value to struct or array
- if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') {
+ if($this->_arraystructstypes[count($this->_arraystructstypes) - 1] == 'struct') {
// Add to struct
- $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value;
+ $this->_arraystructs[count($this->_arraystructs) - 1][$this->_currentStructName[count($this->_currentStructName) - 1]] = $value;
} else {
// Add to array
- $this->_arraystructs[count($this->_arraystructs)-1][] = $value;
+ $this->_arraystructs[count($this->_arraystructs) - 1][] = $value;
}
} else {
- // Just add as a paramater
+ // Just add as a parameter
$this->params[] = $value;
}
}
+ $this->_currentTagContents = '';
$this->_lastseen = $tag;
}
}
-
+/**
+ * IXR_Server
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_Server {
var $data;
+ /** @var array */
var $callbacks = array();
var $message;
+ /** @var array */
var $capabilities;
- function IXR_Server($callbacks = false, $data = false) {
+
+ /**
+ * @param array|bool $callbacks
+ * @param bool $data
+ * @param bool $wait
+ */
+ function IXR_Server($callbacks = false, $data = false, $wait = false) {
$this->setCapabilities();
- if ($callbacks) {
+ if($callbacks) {
$this->callbacks = $callbacks;
}
$this->setCallbacks();
- $this->serve($data);
+
+ if(!$wait) {
+ $this->serve($data);
+ }
}
+
+ /**
+ * @param bool|string $data
+ */
function serve($data = false) {
- if (!$data) {
+ if(!$data) {
$postData = trim(http_get_raw_post_data());
- if (!$postData) {
+ if(!$postData) {
+ header('Content-Type: text/plain'); // merged from WP #9093
die('XML-RPC server accepts POST requests only.');
}
$data = $postData;
}
$this->message = new IXR_Message($data);
- if (!$this->message->parse()) {
+ if(!$this->message->parse()) {
$this->error(-32700, 'parse error. not well formed');
}
- if ($this->message->messageType != 'methodCall') {
+ if($this->message->messageType != 'methodCall') {
$this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall');
}
$result = $this->call($this->message->methodName, $this->message->params);
+
// Is the result an error?
- if (is_a($result, 'IXR_Error')) {
+ if(is_a($result, 'IXR_Error')) {
$this->error($result);
}
+
// Encode the result
$r = new IXR_Value($result);
$resultxml = $r->getXml();
+
// Create the XML
$xml = <<<EOD
<methodResponse>
@@ -340,16 +447,23 @@ EOD;
// Send it
$this->output($xml);
}
+
+ /**
+ * @param string $methodname
+ * @param array $args
+ * @return IXR_Error|mixed
+ */
function call($methodname, $args) {
- if (!$this->hasMethod($methodname)) {
- return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.');
+ if(!$this->hasMethod($methodname)) {
+ return new IXR_Error(-32601, 'server error. requested method ' . $methodname . ' does not exist.');
}
$method = $this->callbacks[$methodname];
+
// Perform the callback and send the response
# Removed for DokuWiki to have a more consistent interface
# if (count($args) == 1) {
- # // If only one paramater just send that instead of the whole array
+ # // If only one parameter just send that instead of the whole array
# $args = $args[0];
# }
@@ -359,16 +473,16 @@ EOD;
$args = (array) $args;
// Are we dealing with a function or a method?
- if (substr($method, 0, 5) == 'this:') {
+ if(is_string($method) && substr($method, 0, 5) == 'this:') {
// It's a class method - check it exists
$method = substr($method, 5);
- if (!method_exists($this, $method)) {
- return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.');
+ if(!method_exists($this, $method)) {
+ return new IXR_Error(-32601, 'server error. requested class method "' . $method . '" does not exist.');
}
// Call the method
#$result = $this->$method($args);
- $result = call_user_func_array(array(&$this,$method),$args);
- } elseif (substr($method, 0, 7) == 'plugin:') {
+ $result = call_user_func_array(array(&$this, $method), $args);
+ } elseif(substr($method, 0, 7) == 'plugin:') {
list($pluginname, $callback) = explode(':', substr($method, 7), 2);
if(!plugin_isdisabled($pluginname)) {
$plugin = plugin_load('action', $pluginname);
@@ -378,31 +492,49 @@ EOD;
}
} else {
// It's a function - does it exist?
- if (!function_exists($method)) {
- return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.');
+ if(is_array($method)) {
+ if(!is_callable(array($method[0], $method[1]))) {
+ return new IXR_Error(-32601, 'server error. requested object method "' . $method[1] . '" does not exist.');
+ }
+ } else if(!function_exists($method)) {
+ return new IXR_Error(-32601, 'server error. requested function "' . $method . '" does not exist.');
}
+
// Call the function
- #$result = $method($args);
- $result = call_user_func_array($method,$args);
+ $result = call_user_func($method, $args);
}
return $result;
}
+ /**
+ * @param int $error
+ * @param string|bool $message
+ */
function error($error, $message = false) {
// Accepts either an error object or an error code and message
- if ($message && !is_object($error)) {
+ if($message && !is_object($error)) {
$error = new IXR_Error($error, $message);
}
$this->output($error->getXml());
}
+
+ /**
+ * @param string $xml
+ */
function output($xml) {
header('Content-Type: text/xml; charset=utf-8');
echo '<?xml version="1.0"?>', "\n", $xml;
exit;
}
+
+ /**
+ * @param string $method
+ * @return bool
+ */
function hasMethod($method) {
return in_array($method, array_keys($this->callbacks));
}
+
function setCapabilities() {
// Initialises capabilities array
$this->capabilities = array(
@@ -420,31 +552,45 @@ EOD;
),
);
}
+
+ /**
+ * @return mixed
+ */
function getCapabilities() {
return $this->capabilities;
}
+
function setCallbacks() {
$this->callbacks['system.getCapabilities'] = 'this:getCapabilities';
$this->callbacks['system.listMethods'] = 'this:listMethods';
$this->callbacks['system.multicall'] = 'this:multiCall';
}
+
+ /**
+ * @return array
+ */
function listMethods() {
// Returns a list of methods - uses array_reverse to ensure user defined
// methods are listed before server defined methods
return array_reverse(array_keys($this->callbacks));
}
+
+ /**
+ * @param array $methodcalls
+ * @return array
+ */
function multiCall($methodcalls) {
// See http://www.xmlrpc.com/discuss/msgReader$1208
$return = array();
- foreach ($methodcalls as $call) {
+ foreach($methodcalls as $call) {
$method = $call['methodName'];
$params = $call['params'];
- if ($method == 'system.multicall') {
+ if($method == 'system.multicall') {
$result = new IXR_Error(-32800, 'Recursive calls to system.multicall are forbidden');
} else {
$result = $this->call($method, $params);
}
- if (is_a($result, 'IXR_Error')) {
+ if(is_a($result, 'IXR_Error')) {
$return[] = array(
'faultCode' => $result->code,
'faultString' => $result->message
@@ -457,10 +603,24 @@ EOD;
}
}
+/**
+ * IXR_Request
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_Request {
+ /** @var string */
var $method;
+ /** @var array */
var $args;
+ /** @var string */
var $xml;
+
+ /**
+ * @param string $method
+ * @param array $args
+ */
function IXR_Request($method, $args) {
$this->method = $method;
$this->args = $args;
@@ -471,7 +631,7 @@ class IXR_Request {
<params>
EOD;
- foreach ($this->args as $arg) {
+ foreach($this->args as $arg) {
$this->xml .= '<param><value>';
$v = new IXR_Value($arg);
$this->xml .= $v->getXml();
@@ -479,15 +639,28 @@ EOD;
}
$this->xml .= '</params></methodCall>';
}
+
+ /**
+ * @return int
+ */
function getLength() {
return strlen($this->xml);
}
+
+ /**
+ * @return string
+ */
function getXml() {
return $this->xml;
}
}
/**
+ * IXR_Client
+ *
+ * @package IXR
+ * @since 1.5
+ *
* Changed for DokuWiki to use DokuHTTPClient
*
* This should be compatible to the original class, but uses DokuWiki's
@@ -498,19 +671,34 @@ EOD;
*/
class IXR_Client extends DokuHTTPClient {
var $posturl = '';
+ /** @var IXR_Message|bool */
var $message = false;
+
+ // Storage place for an error message
+ /** @var IXR_Error|bool */
var $xmlerror = false;
- function IXR_Client($server, $path = false, $port = 80) {
+ /**
+ * @param string $server
+ * @param string|bool $path
+ * @param int $port
+ * @param int $timeout
+ */
+ function IXR_Client($server, $path = false, $port = 80, $timeout = 15) {
parent::__construct();
- if (!$path) {
+ if(!$path) {
// Assume we have been given a URL instead
$this->posturl = $server;
- }else{
- $this->posturl = 'http://'.$server.':'.$port.$path;
+ } else {
+ $this->posturl = 'http://' . $server . ':' . $port . $path;
}
+ $this->timeout = $timeout;
}
+ /**
+ * parameters: method and arguments
+ * @return bool success or error
+ */
function query() {
$args = func_get_args();
$method = array_shift($args);
@@ -518,55 +706,87 @@ class IXR_Client extends DokuHTTPClient {
$xml = $request->getXml();
$this->headers['Content-Type'] = 'text/xml';
- if(!$this->sendRequest($this->posturl,$xml,'POST')){
- $this->xmlerror = new IXR_Error(-32300, 'transport error - '.$this->error);
+ if(!$this->sendRequest($this->posturl, $xml, 'POST')) {
+ $this->xmlerror = new IXR_Error(-32300, 'transport error - ' . $this->error);
return false;
}
// Check HTTP Response code
- if($this->status < 200 || $this->status > 206){
- $this->xmlerror = new IXR_Error(-32300, 'transport error - HTTP status '.$this->status);
+ if($this->status < 200 || $this->status > 206) {
+ $this->xmlerror = new IXR_Error(-32300, 'transport error - HTTP status ' . $this->status);
return false;
}
// Now parse what we've got back
$this->message = new IXR_Message($this->resp_body);
- if (!$this->message->parse()) {
+ if(!$this->message->parse()) {
// XML error
$this->xmlerror = new IXR_Error(-32700, 'parse error. not well formed');
return false;
}
+
// Is the message a fault?
- if ($this->message->messageType == 'fault') {
+ if($this->message->messageType == 'fault') {
$this->xmlerror = new IXR_Error($this->message->faultCode, $this->message->faultString);
return false;
}
+
// Message must be OK
return true;
}
+
+ /**
+ * @return mixed
+ */
function getResponse() {
// methodResponses can only have one param - return that
return $this->message->params[0];
}
+
+ /**
+ * @return bool
+ */
function isError() {
return (is_object($this->xmlerror));
}
+
+ /**
+ * @return int
+ */
function getErrorCode() {
return $this->xmlerror->code;
}
+
+ /**
+ * @return string
+ */
function getErrorMessage() {
return $this->xmlerror->message;
}
}
-
+/**
+ * IXR_Error
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_Error {
var $code;
var $message;
+
+ /**
+ * @param int $code
+ * @param string $message
+ */
function IXR_Error($code, $message) {
$this->code = $code;
- $this->message = $message;
+ $this->message = htmlspecialchars($message);
}
+
+ /**
+ * @return string
+ */
function getXml() {
$xml = <<<EOD
<methodResponse>
@@ -591,7 +811,12 @@ EOD;
}
}
-
+/**
+ * IXR_Date
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_Date {
var $year;
var $month;
@@ -599,14 +824,23 @@ class IXR_Date {
var $hour;
var $minute;
var $second;
+ var $timezone;
+
+ /**
+ * @param int|string $time
+ */
function IXR_Date($time) {
// $time can be a PHP timestamp or an ISO one
- if (is_numeric($time)) {
+ if(is_numeric($time)) {
$this->parseTimestamp($time);
} else {
$this->parseIso($time);
}
}
+
+ /**
+ * @param int $timestamp
+ */
function parseTimestamp($timestamp) {
$this->year = gmdate('Y', $timestamp);
$this->month = gmdate('m', $timestamp);
@@ -614,43 +848,81 @@ class IXR_Date {
$this->hour = gmdate('H', $timestamp);
$this->minute = gmdate('i', $timestamp);
$this->second = gmdate('s', $timestamp);
+ $this->timezone = '';
}
+
+ /**
+ * @param string $iso
+ */
function parseIso($iso) {
- if(preg_match('/^(\d\d\d\d)-?(\d\d)-?(\d\d)([T ](\d\d):(\d\d)(:(\d\d))?)?/',$iso,$match)){
- $this->year = (int) $match[1];
- $this->month = (int) $match[2];
- $this->day = (int) $match[3];
- $this->hour = (int) $match[5];
+ if(preg_match('/^(\d\d\d\d)-?(\d\d)-?(\d\d)([T ](\d\d):(\d\d)(:(\d\d))?)?/', $iso, $match)) {
+ $this->year = (int) $match[1];
+ $this->month = (int) $match[2];
+ $this->day = (int) $match[3];
+ $this->hour = (int) $match[5];
$this->minute = (int) $match[6];
$this->second = (int) $match[8];
}
}
+
+ /**
+ * @return string
+ */
function getIso() {
- return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second;
+ return $this->year . $this->month . $this->day . 'T' . $this->hour . ':' . $this->minute . ':' . $this->second . $this->timezone;
}
+
+ /**
+ * @return string
+ */
function getXml() {
- return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>';
+ return '<dateTime.iso8601>' . $this->getIso() . '</dateTime.iso8601>';
}
+
+ /**
+ * @return int
+ */
function getTimestamp() {
return gmmktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);
}
}
-
+/**
+ * IXR_Base64
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_Base64 {
var $data;
+
+ /**
+ * @param string $data
+ */
function IXR_Base64($data) {
$this->data = $data;
}
+
+ /**
+ * @return string
+ */
function getXml() {
- return '<base64>'.base64_encode($this->data).'</base64>';
+ return '<base64>' . base64_encode($this->data) . '</base64>';
}
}
-
+/**
+ * IXR_IntrospectionServer
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_IntrospectionServer extends IXR_Server {
+ /** @var array[] */
var $signatures;
+ /** @var string[] */
var $help;
+
function IXR_IntrospectionServer() {
$this->setCallbacks();
$this->setCapabilities();
@@ -683,82 +955,102 @@ class IXR_IntrospectionServer extends IXR_Server {
'Returns a documentation string for the specified method'
);
}
+
+ /**
+ * @param string $method
+ * @param string $callback
+ * @param string[] $args
+ * @param string $help
+ */
function addCallback($method, $callback, $args, $help) {
$this->callbacks[$method] = $callback;
$this->signatures[$method] = $args;
$this->help[$method] = $help;
}
+
+ /**
+ * @param string $methodname
+ * @param array $args
+ * @return IXR_Error|mixed
+ */
function call($methodname, $args) {
// Make sure it's in an array
- if ($args && !is_array($args)) {
+ if($args && !is_array($args)) {
$args = array($args);
}
+
// Over-rides default call method, adds signature check
- if (!$this->hasMethod($methodname)) {
- return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.');
+ if(!$this->hasMethod($methodname)) {
+ return new IXR_Error(-32601, 'server error. requested method "' . $this->message->methodName . '" not specified.');
}
$method = $this->callbacks[$methodname];
$signature = $this->signatures[$methodname];
$returnType = array_shift($signature);
// Check the number of arguments. Check only, if the minimum count of parameters is specified. More parameters are possible.
// This is a hack to allow optional parameters...
- if (count($args) < count($signature)) {
+ if(count($args) < count($signature)) {
// print 'Num of args: '.count($args).' Num in signature: '.count($signature);
return new IXR_Error(-32602, 'server error. wrong number of method parameters');
}
+
// Check the argument types
$ok = true;
$argsbackup = $args;
- for ($i = 0, $j = count($args); $i < $j; $i++) {
+ for($i = 0, $j = count($args); $i < $j; $i++) {
$arg = array_shift($args);
$type = array_shift($signature);
- switch ($type) {
+ switch($type) {
case 'int':
case 'i4':
- if (is_array($arg) || !is_int($arg)) {
+ if(is_array($arg) || !is_int($arg)) {
$ok = false;
}
break;
case 'base64':
case 'string':
- if (!is_string($arg)) {
+ if(!is_string($arg)) {
$ok = false;
}
break;
case 'boolean':
- if ($arg !== false && $arg !== true) {
+ if($arg !== false && $arg !== true) {
$ok = false;
}
break;
case 'float':
case 'double':
- if (!is_float($arg)) {
+ if(!is_float($arg)) {
$ok = false;
}
break;
case 'date':
case 'dateTime.iso8601':
- if (!is_a($arg, 'IXR_Date')) {
+ if(!is_a($arg, 'IXR_Date')) {
$ok = false;
}
break;
}
- if (!$ok) {
+ if(!$ok) {
return new IXR_Error(-32602, 'server error. invalid method parameters');
}
}
// It passed the test - run the "real" method call
return parent::call($methodname, $argsbackup);
}
+
+ /**
+ * @param string $method
+ * @return array|IXR_Error
+ */
function methodSignature($method) {
- if (!$this->hasMethod($method)) {
- return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.');
+ if(!$this->hasMethod($method)) {
+ return new IXR_Error(-32601, 'server error. requested method "' . $method . '" not specified.');
}
// We should be returning an array of types
$types = $this->signatures[$method];
$return = array();
- foreach ($types as $type) {
- switch ($type) {
+ foreach($types as $type) {
+ switch($type) {
case 'string':
$return[] = 'string';
break;
@@ -788,18 +1080,40 @@ class IXR_IntrospectionServer extends IXR_Server {
}
return $return;
}
+
+ /**
+ * @param string $method
+ * @return mixed
+ */
function methodHelp($method) {
return $this->help[$method];
}
}
-
+/**
+ * IXR_ClientMulticall
+ *
+ * @package IXR
+ * @since 1.5
+ */
class IXR_ClientMulticall extends IXR_Client {
+
+ /** @var array[] */
var $calls = array();
+
+ /**
+ * @param string $server
+ * @param string|bool $path
+ * @param int $port
+ */
function IXR_ClientMulticall($server, $path = false, $port = 80) {
parent::IXR_Client($server, $path, $port);
//$this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
}
+
+ /**
+ * Add a call
+ */
function addCall() {
$args = func_get_args();
$methodName = array_shift($args);
@@ -809,6 +1123,10 @@ class IXR_ClientMulticall extends IXR_Client {
);
$this->calls[] = $struct;
}
+
+ /**
+ * @return bool
+ */
function query() {
// Prepare multicall, then call the parent::query() method
return parent::query('system.multicall', $this->calls);
diff --git a/inc/Input.class.php b/inc/Input.class.php
index e7eef1c29..199994d8d 100644
--- a/inc/Input.class.php
+++ b/inc/Input.class.php
@@ -21,6 +21,11 @@ class Input {
protected $access;
/**
+ * @var Callable
+ */
+ protected $filter;
+
+ /**
* Intilizes the Input class and it subcomponents
*/
function __construct() {
@@ -31,6 +36,32 @@ class Input {
}
/**
+ * Apply the set filter to the given value
+ *
+ * @param string $data
+ * @return string
+ */
+ protected function applyfilter($data){
+ if(!$this->filter) return $data;
+ return call_user_func($this->filter, $data);
+ }
+
+ /**
+ * Return a filtered copy of the input object
+ *
+ * Expects a callable that accepts one string parameter and returns a filtered string
+ *
+ * @param Callable|string $filter
+ * @return Input
+ */
+ public function filter($filter='stripctl'){
+ $this->filter = $filter;
+ $clone = clone $this;
+ $this->filter = '';
+ return $clone;
+ }
+
+ /**
* Check if a parameter was set
*
* Basically a wrapper around isset. When called on the $post and $get subclasses,
@@ -52,7 +83,6 @@ class Input {
*
* @see isset
* @param string $name Parameter name
- * @return bool
*/
public function remove($name) {
if(isset($this->access[$name])) {
@@ -77,8 +107,9 @@ class Input {
*/
public function param($name, $default = null, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
- if($nonempty && empty($this->access[$name])) return $default;
- return $this->access[$name];
+ $value = $this->applyfilter($this->access[$name]);
+ if($nonempty && empty($value)) return $default;
+ return $value;
}
/**
@@ -100,7 +131,7 @@ class Input {
* @param string $name Parameter name
* @param mixed $default If parameter is not set, initialize with this value
* @param bool $nonempty Init with $default if parameter is set but empty()
- * @return &mixed
+ * @return mixed (reference)
*/
public function &ref($name, $default = '', $nonempty = false) {
if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) {
@@ -114,33 +145,35 @@ class Input {
* Access a request parameter as int
*
* @param string $name Parameter name
- * @param mixed $default Default to return if parameter isn't set or is an array
+ * @param int $default Default to return if parameter isn't set or is an array
* @param bool $nonempty Return $default if parameter is set but empty()
* @return int
*/
public function int($name, $default = 0, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
- if($this->access[$name] === '') return $default;
- if($nonempty && empty($this->access[$name])) return $default;
+ $value = $this->applyfilter($this->access[$name]);
+ if($value === '') return $default;
+ if($nonempty && empty($value)) return $default;
- return (int) $this->access[$name];
+ return (int) $value;
}
/**
* Access a request parameter as string
*
* @param string $name Parameter name
- * @param mixed $default Default to return if parameter isn't set or is an array
+ * @param string $default Default to return if parameter isn't set or is an array
* @param bool $nonempty Return $default if parameter is set but empty()
* @return string
*/
public function str($name, $default = '', $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
- if($nonempty && empty($this->access[$name])) return $default;
+ $value = $this->applyfilter($this->access[$name]);
+ if($nonempty && empty($value)) return $default;
- return (string) $this->access[$name];
+ return (string) $value;
}
/**
@@ -158,7 +191,8 @@ class Input {
public function valid($name, $valids, $default = null) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default; // we don't allow arrays
- $found = array_search($this->access[$name], $valids);
+ $value = $this->applyfilter($this->access[$name]);
+ $found = array_search($value, $valids);
if($found !== false) return $valids[$found]; // return the valid value for type safety
return $default;
}
@@ -176,10 +210,11 @@ class Input {
public function bool($name, $default = false, $nonempty = false) {
if(!isset($this->access[$name])) return $default;
if(is_array($this->access[$name])) return $default;
- if($this->access[$name] === '') return $default;
- if($nonempty && empty($this->access[$name])) return $default;
+ $value = $this->applyfilter($this->access[$name]);
+ if($value === '') return $default;
+ if($nonempty && empty($value)) return $default;
- return (bool) $this->access[$name];
+ return (bool) $value;
}
/**
@@ -210,7 +245,7 @@ class Input {
*
* This function returns the $INPUT object itself for easy chaining
*
- * @param $name
+ * @param string $name
* @return Input
*/
public function extract($name){
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php
index a35ec3ed0..d50bad9b7 100644
--- a/inc/JpegMeta.php
+++ b/inc/JpegMeta.php
@@ -42,6 +42,7 @@
class JpegMeta {
var $_fileName;
var $_fp = null;
+ var $_fpout = null;
var $_type = 'unknown';
var $_markers;
@@ -132,6 +133,9 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array|string $fields field name or array with field names
+ * @return bool|string
*/
function getField($fields) {
if(!is_array($fields)) $fields = array($fields);
@@ -177,6 +181,10 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $field field name
+ * @param string $value
+ * @return bool success or fail
*/
function setField($field, $value) {
if(strtolower(substr($field,0,5)) == 'iptc.'){
@@ -193,6 +201,9 @@ class JpegMeta {
* through one function
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $field field name
+ * @return bool
*/
function deleteField($field) {
if(strtolower(substr($field,0,5)) == 'iptc.'){
@@ -208,6 +219,9 @@ class JpegMeta {
* Return a date field
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $field
+ * @return false|string
*/
function getDateField($field) {
if (!isset($this->_info['dates'])) {
@@ -225,6 +239,9 @@ class JpegMeta {
* Return a file info field
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $field field name
+ * @return false|string
*/
function getFileField($field) {
if (!isset($this->_info['file'])) {
@@ -243,6 +260,8 @@ class JpegMeta {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @todo handle makernotes
+ *
+ * @return false|string
*/
function getCamera(){
$make = $this->getField(array('Exif.Make','Exif.TIFFMake'));
@@ -256,6 +275,8 @@ class JpegMeta {
* Return shutter speed as a ratio
*
* @author Joe Lapp <joe.lapp@pobox.com>
+ *
+ * @return string
*/
function getShutterSpeed() {
if (!isset($this->_info['exif'])) {
@@ -274,6 +295,9 @@ class JpegMeta {
* Return an EXIF field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return false|string
*/
function getExifField($field) {
if (!isset($this->_info['exif'])) {
@@ -295,6 +319,9 @@ class JpegMeta {
* Return an XMP field
*
* @author Hakan Sandell <hakan.sandell@mydata.se>
+ *
+ * @param string $field field name
+ * @return false|string
*/
function getXmpField($field) {
if (!isset($this->_info['xmp'])) {
@@ -316,6 +343,9 @@ class JpegMeta {
* Return an Adobe Field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return false|string
*/
function getAdobeField($field) {
if (!isset($this->_info['adobe'])) {
@@ -337,6 +367,9 @@ class JpegMeta {
* Return an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return false|string
*/
function getIPTCField($field) {
if (!isset($this->_info['iptc'])) {
@@ -359,6 +392,10 @@ class JpegMeta {
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
* @author Joe Lapp <joe.lapp@pobox.com>
+ *
+ * @param string $field field name
+ * @param string $value
+ * @return bool
*/
function setExifField($field, $value) {
if (!isset($this->_info['exif'])) {
@@ -389,6 +426,10 @@ class JpegMeta {
* Set an Adobe Field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @param string $value
+ * @return bool
*/
function setAdobeField($field, $value) {
if (!isset($this->_info['adobe'])) {
@@ -413,6 +454,10 @@ class JpegMeta {
* dimensions
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param int $maxwidth
+ * @param int $maxheight
+ * @return float|int
*/
function getResizeRatio($maxwidth,$maxheight=0){
if(!$maxheight) $maxheight = $maxwidth;
@@ -442,6 +487,10 @@ class JpegMeta {
* Set an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @param string $value
+ * @return bool
*/
function setIPTCField($field, $value) {
if (!isset($this->_info['iptc'])) {
@@ -465,6 +514,9 @@ class JpegMeta {
* Delete an EXIF field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return bool
*/
function deleteExifField($field) {
if (!isset($this->_info['exif'])) {
@@ -486,6 +538,9 @@ class JpegMeta {
* Delete an Adobe field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return bool
*/
function deleteAdobeField($field) {
if (!isset($this->_info['adobe'])) {
@@ -507,6 +562,9 @@ class JpegMeta {
* Delete an IPTC field
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $field field name
+ * @return bool
*/
function deleteIPTCField($field) {
if (!isset($this->_info['iptc'])) {
@@ -527,12 +585,12 @@ class JpegMeta {
/**
* Get the image's title, tries various fields
*
- * @param int $max maximum number chars (keeps words)
+ * @param int $max maximum number chars (keeps words)
+ * @return false|string
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getTitle($max=80){
- $cap = '';
-
// try various fields
$cap = $this->getField(array('Iptc.Headline',
'Iptc.Caption',
@@ -555,11 +613,14 @@ class JpegMeta {
* Gather various date fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @return array|bool
*/
function getDates() {
$this->_parseAll();
if ($this->_markers == null) {
if (@isset($this->_info['file']['UnixTime'])) {
+ $dates = array();
$dates['FileModified'] = $this->_info['file']['UnixTime'];
$dates['Time'] = $this->_info['file']['UnixTime'];
$dates['TimeSource'] = 'FileModified';
@@ -690,6 +751,8 @@ class JpegMeta {
* Get the image width, tries various fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @return false|string
*/
function getWidth() {
if (!isset($this->_info['sof'])) {
@@ -719,6 +782,8 @@ class JpegMeta {
* Get the image height, tries various fields
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @return false|string
*/
function getHeight() {
if (!isset($this->_info['sof'])) {
@@ -748,6 +813,8 @@ class JpegMeta {
* Get an dimension string for use in img tag
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @return false|string
*/
function getDimStr() {
if ($this->_markers == null) {
@@ -764,6 +831,9 @@ class JpegMeta {
* Checks for an embedded thumbnail
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $which possible values: 'any', 'exif' or 'adobe'
+ * @return false|string
*/
function hasThumbnail($which = 'any') {
if (($which == 'any') || ($which == 'exif')) {
@@ -805,6 +875,9 @@ class JpegMeta {
* Send embedded thumbnail to browser
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
+ *
+ * @param string $which possible values: 'any', 'exif' or 'adobe'
+ * @return bool
*/
function sendThumbnail($which = 'any') {
$data = null;
@@ -855,6 +928,9 @@ class JpegMeta {
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $fileName file name or empty string for a random name
+ * @return bool
*/
function save($fileName = "") {
if ($fileName == "") {
@@ -1334,7 +1410,6 @@ class JpegMeta {
return false;
}
- $pos = 0;
$this->_info['jfif'] = array();
$vmaj = $this->_getByte($data, 5);
@@ -1420,7 +1495,6 @@ class JpegMeta {
break;
default:
return false;
- break;
}
$this->_info['sof']['Format'] = $format;
diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php
index e90b45f99..087d82c99 100644
--- a/inc/Mailer.class.php
+++ b/inc/Mailer.class.php
@@ -108,6 +108,9 @@ class Mailer {
/**
* Callback function to automatically embed images referenced in HTML templates
+ *
+ * @param array $matches
+ * @return string placeholder
*/
protected function autoembed_cb($matches) {
static $embeds = 0;
@@ -130,7 +133,7 @@ class Mailer {
* If an empy value is passed, the header is removed
*
* @param string $header the header name (no trailing colon!)
- * @param string $value the value of the header
+ * @param string|string[] $value the value of the header
* @param bool $clean remove all non-ASCII chars and line feeds?
*/
public function setHeader($header, $value, $clean = true) {
@@ -160,6 +163,8 @@ class Mailer {
*
* Whatever is set here is directly passed to PHP's mail() command as last
* parameter. Depending on the PHP setup this might break mailing alltogether
+ *
+ * @param string $param
*/
public function setParameters($param) {
$this->sendparam = $param;
@@ -177,7 +182,7 @@ class Mailer {
* @param string $text plain text body
* @param array $textrep replacements to apply on the text part
* @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep
- * @param array $html the HTML body, leave null to create it from $text
+ * @param string $html the HTML body, leave null to create it from $text
* @param bool $wrap wrap the HTML in the default header/Footer
*/
public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) {
@@ -265,6 +270,8 @@ class Mailer {
* Placeholders can be used to reference embedded attachments
*
* You probably want to use setBody() instead
+ *
+ * @param string $html
*/
public function setHTML($html) {
$this->html = $html;
@@ -274,6 +281,8 @@ class Mailer {
* Set the plain text part of the mail
*
* You probably want to use setBody() instead
+ *
+ * @param string $text
*/
public function setText($text) {
$this->text = $text;
@@ -283,7 +292,7 @@ class Mailer {
* Add the To: recipients
*
* @see cleanAddress
- * @param string|array $address Multiple adresses separated by commas or as array
+ * @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function to($address) {
$this->setHeader('To', $address, false);
@@ -293,7 +302,7 @@ class Mailer {
* Add the Cc: recipients
*
* @see cleanAddress
- * @param string|array $address Multiple adresses separated by commas or as array
+ * @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function cc($address) {
$this->setHeader('Cc', $address, false);
@@ -303,7 +312,7 @@ class Mailer {
* Add the Bcc: recipients
*
* @see cleanAddress
- * @param string|array $address Multiple adresses separated by commas or as array
+ * @param string|string[] $address Multiple adresses separated by commas or as array
*/
public function bcc($address) {
$this->setHeader('Bcc', $address, false);
@@ -340,8 +349,8 @@ class Mailer {
* Example:
* cc("föö <foo@bar.com>, me@somewhere.com","TBcc");
*
- * @param string|array $addresses Multiple adresses separated by commas or as array
- * @return bool|string the prepared header (can contain multiple lines)
+ * @param string|string[] $addresses Multiple adresses separated by commas or as array
+ * @return false|string the prepared header (can contain multiple lines)
*/
public function cleanAddress($addresses) {
// No named recipients for To: in Windows (see FS#652)
@@ -418,6 +427,8 @@ class Mailer {
* Prepare the mime multiparts for all attachments
*
* Replaces placeholders in the HTML with the correct CIDs
+ *
+ * @return string mime multiparts
*/
protected function prepareAttachments() {
$mime = '';
@@ -565,9 +576,9 @@ class Mailer {
/**
* Returns a complete, EOL terminated header line, wraps it if necessary
*
- * @param $key
- * @param $val
- * @return string
+ * @param string $key
+ * @param string $val
+ * @return string line
*/
protected function wrappedHeaderLine($key, $val){
return wordwrap("$key: $val", 78, MAILHEADER_EOL.' ').MAILHEADER_EOL;
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index db6a3a77c..15f896dcf 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -16,8 +16,9 @@ class PassHash {
* match true is is returned else false
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param $clear string Clear-Text password
- * @param $hash string Hash to compare against
+ *
+ * @param string $clear Clear-Text password
+ * @param string $hash Hash to compare against
* @return bool
*/
function verify_hash($clear, $hash) {
@@ -109,9 +110,9 @@ class PassHash {
* If $salt is not null, the value is kept, but the lenght restriction is
* applied (unless, $cut is false).
*
- * @param string &$salt The salt, pass null if you want one generated
- * @param int $len The length of the salt
- * @param bool $cut Apply length restriction to existing salt?
+ * @param string|null &$salt The salt, pass null if you want one generated
+ * @param int $len The length of the salt
+ * @param bool $cut Apply length restriction to existing salt?
*/
public function init_salt(&$salt, $len = 32, $cut = true) {
if(is_null($salt)) {
@@ -135,6 +136,7 @@ class PassHash {
* @author Andreas Gohr <andi@splitbrain.org>
* @author <mikey_nich at hotmail dot com>
* @link http://de.php.net/manual/en/function.crypt.php#73619
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @return string Hashed password
@@ -175,6 +177,7 @@ class PassHash {
*
* @author <mikey_nich at hotmail dot com>
* @link http://de.php.net/manual/en/function.crypt.php#73619
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @param string $magic The hash identifier (apr1 or 1)
@@ -337,6 +340,7 @@ class PassHash {
* an exception.
*
* @link http://www.openwall.com/phpass/
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @param string $magic The hash identifier (P or H)
@@ -404,6 +408,7 @@ class PassHash {
* This is used by the Django Python framework
*
* @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @return string Hashed password
@@ -420,6 +425,7 @@ class PassHash {
* This is used by the Django Python framework
*
* @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @return string Hashed password
@@ -486,6 +492,7 @@ class PassHash {
* method 'A' is not supported.
*
* @link http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column
+ *
* @param string $clear The clear text to hash
* @param string $salt The salt to use, null for random
* @return string Hashed password
@@ -511,7 +518,6 @@ class PassHash {
* @param string $data Message to be hashed.
* @param string $key Shared secret key used for generating the HMAC variant of the message digest.
* @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
- *
* @return string
*/
public static function hmac($algo, $data, $key, $raw_output = false) {
@@ -545,9 +551,8 @@ class PassHash {
/**
* Use DokuWiki's secure random generator if available
*
- * @param $min
- * @param $max
- *
+ * @param int $min
+ * @param int $max
* @return int
*/
protected function random($min, $max){
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index ffa03ee93..c0e6869f1 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -13,6 +13,11 @@ class RemoteAPICore {
$this->api = $api;
}
+ /**
+ * Returns details about the core methods
+ *
+ * @return array
+ */
function __getRemoteInfo() {
return array(
'dokuwiki.getVersion' => array(
@@ -158,19 +163,27 @@ class RemoteAPICore {
);
}
+ /**
+ * @return string
+ */
function getVersion() {
return getVersion();
}
+ /**
+ * @return int unix timestamp
+ */
function getTime() {
return time();
}
/**
* Return a raw wiki page
+ *
* @param string $id wiki page id
- * @param string $rev revision number of the page
- * @return page text.
+ * @param int|string $rev revision timestamp of the page or empty string
+ * @return string page text.
+ * @throws RemoteAccessDeniedException if no permission for page
*/
function rawPage($id,$rev=''){
$id = $this->resolvePageId($id);
@@ -189,8 +202,11 @@ class RemoteAPICore {
* Return a media file
*
* @author Gina Haeussge <osd@foosel.net>
+ *
* @param string $id file id
- * @return media file
+ * @return mixed media file
+ * @throws RemoteAccessDeniedException no permission for media
+ * @throws RemoteException not exist
*/
function getAttachment($id){
$id = cleanID($id);
@@ -211,6 +227,9 @@ class RemoteAPICore {
* Return info about a media file
*
* @author Gina Haeussge <osd@foosel.net>
+ *
+ * @param string $id page id
+ * @return array
*/
function getAttachmentInfo($id){
$id = cleanID($id);
@@ -230,6 +249,11 @@ class RemoteAPICore {
/**
* Return a wiki page rendered to html
+ *
+ * @param string $id page id
+ * @param string|int $rev revision timestamp or empty string
+ * @return null|string html
+ * @throws RemoteAccessDeniedException no access to page
*/
function htmlPage($id,$rev=''){
$id = $this->resolvePageId($id);
@@ -241,6 +265,8 @@ class RemoteAPICore {
/**
* List all pages - we use the indexer list here
+ *
+ * @return array
*/
function listPages(){
$list = array();
@@ -265,6 +291,12 @@ class RemoteAPICore {
/**
* List all pages in the given namespace (and below)
+ *
+ * @param string $ns
+ * @param array $opts
+ * $opts['depth'] recursion level, 0 for all
+ * $opts['hash'] do md5 sum of content?
+ * @return array
*/
function readNamespace($ns,$opts){
global $conf;
@@ -281,9 +313,12 @@ class RemoteAPICore {
/**
* List all pages in the given namespace (and below)
+ *
+ * @param string $query
+ * @return array
*/
function search($query){
- $regex = '';
+ $regex = array();
$data = ft_pageSearch($query,$regex);
$pages = array();
@@ -314,6 +349,8 @@ class RemoteAPICore {
/**
* Returns the wiki title.
+ *
+ * @return string
*/
function getTitle(){
global $conf;
@@ -328,6 +365,15 @@ class RemoteAPICore {
* a regular expression matching their name.
*
* @author Gina Haeussge <osd@foosel.net>
+ *
+ * @param string $ns
+ * @param array $options
+ * $options['depth'] recursion level, 0 for all
+ * $options['showmsg'] shows message if invalid media id is used
+ * $options['pattern'] check given pattern
+ * $options['hash'] add hashes to result list
+ * @return array
+ * @throws RemoteAccessDeniedException no access to the media files
*/
function listAttachments($ns, $options = array()) {
global $conf;
@@ -359,6 +405,9 @@ class RemoteAPICore {
/**
* Return a list of backlinks
+ *
+ * @param string $id page id
+ * @return array
*/
function listBackLinks($id){
return ft_backlinks($this->resolvePageId($id));
@@ -366,6 +415,12 @@ class RemoteAPICore {
/**
* Return some basic data about a page
+ *
+ * @param string $id page id
+ * @param string|int $rev revision timestamp or empty string
+ * @return array
+ * @throws RemoteAccessDeniedException no access for page
+ * @throws RemoteException page not exist
*/
function pageInfo($id,$rev=''){
$id = $this->resolvePageId($id);
@@ -395,6 +450,13 @@ class RemoteAPICore {
* Save a wiki page
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id page id
+ * @param string $text wiki text
+ * @param array $params parameters: summary, minor edit
+ * @return bool
+ * @throws RemoteAccessDeniedException no write access for page
+ * @throws RemoteException no id, empty new page or locked
*/
function putPage($id, $text, $params) {
global $TEXT;
@@ -451,6 +513,11 @@ class RemoteAPICore {
/**
* Appends text to a wiki page.
+ *
+ * @param string $id page id
+ * @param string $text wiki text
+ * @param array $params such as summary,minor
+ * @return bool|string
*/
function appendPage($id, $text, $params) {
$currentpage = $this->rawPage($id);
@@ -464,6 +531,12 @@ class RemoteAPICore {
* Uploads a file to the wiki.
*
* Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id page id
+ * @param string $file
+ * @param array $params such as overwrite
+ * @return false|string
+ * @throws RemoteException
*/
function putAttachment($id, $file, $params) {
$id = cleanID($id);
@@ -493,6 +566,11 @@ class RemoteAPICore {
* Deletes a file from the wiki.
*
* @author Gina Haeussge <osd@foosel.net>
+ *
+ * @param string $id page id
+ * @return int
+ * @throws RemoteAccessDeniedException no permissions
+ * @throws RemoteException file in use or not deleted
*/
function deleteAttachment($id){
$id = cleanID($id);
@@ -511,6 +589,9 @@ class RemoteAPICore {
/**
* Returns the permissions of a given wiki page
+ *
+ * @param string $id page id
+ * @return int permission level
*/
function aclCheck($id) {
$id = $this->resolvePageId($id);
@@ -521,6 +602,10 @@ class RemoteAPICore {
* Lists all links contained in a wiki page
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id page id
+ * @return array
+ * @throws RemoteAccessDeniedException no read access for page
*/
function listLinks($id) {
$id = $this->resolvePageId($id);
@@ -571,6 +656,10 @@ class RemoteAPICore {
*
* @author Michael Hamann <michael@content-space.de>
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param int $timestamp unix timestamp
+ * @return array
+ * @throws RemoteException no valid timestamp
*/
function getRecentChanges($timestamp) {
if(strlen($timestamp) != 10) {
@@ -596,7 +685,7 @@ class RemoteAPICore {
return $changes;
} else {
// in case we still have nothing at this point
- return new RemoteException('There are no changes in the specified timeframe', 321);
+ throw new RemoteException('There are no changes in the specified timeframe', 321);
}
}
@@ -605,6 +694,10 @@ class RemoteAPICore {
*
* @author Michael Hamann <michael@content-space.de>
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param int $timestamp unix timestamp
+ * @return array
+ * @throws RemoteException no valid timestamp
*/
function getRecentMediaChanges($timestamp) {
if(strlen($timestamp) != 10)
@@ -637,6 +730,12 @@ class RemoteAPICore {
* Returns a list of available revisions of a given wiki page
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id page id
+ * @param int $first skip the first n changelog lines
+ * @return array
+ * @throws RemoteAccessDeniedException no read access for page
+ * @throws RemoteException empty id
*/
function pageVersions($id, $first) {
$id = $this->resolvePageId($id);
@@ -681,6 +780,7 @@ class RemoteAPICore {
$pagelog->setChunkSize(1024);
$info = $pagelog->getRevisionInfo($time);
if(!empty($info)) {
+ $data = array();
$data['user'] = $info['user'];
$data['ip'] = $info['ip'];
$data['type'] = $info['type'];
@@ -713,6 +813,9 @@ class RemoteAPICore {
*
* Returns an associative array with the keys locked, lockfail, unlocked and
* unlockfail, each containing lists of pages.
+ *
+ * @param array[] $set list pages with array('lock' => array, 'unlock' => array)
+ * @return array
*/
function setLocks($set){
$locked = array();
@@ -747,13 +850,27 @@ class RemoteAPICore {
);
}
+ /**
+ * Return API version
+ *
+ * @return int
+ */
function getAPIVersion(){
return DOKU_API_VERSION;
}
+ /**
+ * Login
+ *
+ * @param string $user
+ * @param string $pass
+ * @return int
+ */
function login($user,$pass){
global $conf;
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
+
if(!$conf['useacl']) return 0;
if(!$auth) return 0;
@@ -774,6 +891,11 @@ class RemoteAPICore {
return $ok;
}
+ /**
+ * Log off
+ *
+ * @return int
+ */
function logoff(){
global $conf;
global $auth;
@@ -785,6 +907,12 @@ class RemoteAPICore {
return 1;
}
+ /**
+ * Resolve page id
+ *
+ * @param string $id page id
+ * @return string
+ */
private function resolvePageId($id) {
$id = cleanID($id);
if(empty($id)) {
diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php
index 6332746a6..0325f6d44 100644
--- a/inc/Sitemapper.php
+++ b/inc/Sitemapper.php
@@ -24,6 +24,8 @@ class Sitemapper {
* @author Andreas Gohr
* @link https://www.google.com/webmasters/sitemaps/docs/en/about.html
* @link http://www.sitemaps.org/
+ *
+ * @return bool
*/
public static function generate(){
global $conf;
@@ -53,7 +55,7 @@ class Sitemapper {
foreach($pages as $id){
//skip hidden, non existing and restricted files
if(isHiddenPage($id)) continue;
- if(auth_aclcheck($id,'','') < AUTH_READ) continue;
+ if(auth_aclcheck($id,'',array()) < AUTH_READ) continue;
$item = SitemapItem::createFromID($id);
if ($item !== null)
$items[] = $item;
@@ -75,6 +77,7 @@ class Sitemapper {
*
* @param $items array The SitemapItems that shall be included in the sitemap.
* @return string The sitemap XML.
+ *
* @author Michael Hamann
*/
private static function getXML($items) {
@@ -95,6 +98,7 @@ class Sitemapper {
* Helper function for getting the path to the sitemap file.
*
* @return string The path to the sitemap file.
+ *
* @author Michael Hamann
*/
public static function getFilePath() {
@@ -123,6 +127,8 @@ class Sitemapper {
* urls to ping using the SITEMAP_PING event.
*
* @author Michael Hamann
+ *
+ * @return bool
*/
public static function pingSearchEngines() {
//ping search engines...
@@ -168,9 +174,9 @@ class SitemapItem {
/**
* Create a new item.
*
- * @param $url string The url of the item
- * @param $lastmod int Timestamp of the last modification
- * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
+ * @param string $url The url of the item
+ * @param int $lastmod Timestamp of the last modification
+ * @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
* @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
*/
public function __construct($url, $lastmod, $changefreq = null, $priority = null) {
@@ -183,9 +189,9 @@ class SitemapItem {
/**
* Helper function for creating an item for a wikipage id.
*
- * @param $id string A wikipage id.
- * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
- * @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
+ * @param string $id A wikipage id.
+ * @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never.
+ * @param float|string $priority The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0.
* @return SitemapItem The sitemap item.
*/
public static function createFromID($id, $changefreq = null, $priority = null) {
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 903f7f35c..0dc7dace2 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -53,6 +53,7 @@ class Tar {
protected $file = '';
protected $comptype = Tar::COMPRESS_AUTO;
+ /** @var resource|int */
protected $fh;
protected $memory = '';
protected $closed = true;
@@ -105,6 +106,9 @@ class Tar {
*
* The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams.
* Reopen the file with open() again if you want to do additional operations
+ *
+ * @return array
+ * @throws TarIOException
*/
public function contents() {
if($this->closed || !$this->file) throw new TarIOException('Can not read from a closed archive');
@@ -270,6 +274,7 @@ class Tar {
* Add a file to the current TAR archive using an existing file in the filesystem
*
* @todo handle directory adding
+ *
* @param string $file the original file
* @param string $name the name to use for the file in the archive
* @throws TarIOException
@@ -377,6 +382,10 @@ class Tar {
* Returns the created in-memory archive data
*
* This implicitly calls close() on the Archive
+ *
+ * @param int $comptype
+ * @param int $complevel
+ * @return mixed|string
*/
public function getArchive($comptype = Tar::COMPRESS_AUTO, $complevel = 9) {
$this->close();
@@ -395,7 +404,7 @@ class Tar {
* Note: It more memory effective to specify the filename in the create() function and
* let the library work on the new file directly.
*
- * @param $file
+ * @param string $file
* @param int $comptype
* @param int $complevel
* @throws TarIOException
@@ -522,7 +531,7 @@ class Tar {
* Decode the given tar file header
*
* @param string $block a 512 byte block containign the header data
- * @return array|bool
+ * @return false|array
*/
protected function parseHeader($block) {
if(!$block || strlen($block) != 512) return false;
@@ -536,6 +545,7 @@ class Tar {
$header = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix", $block);
if(!$header) return false;
+ $return = array();
$return['checksum'] = OctDec(trim($header['checksum']));
if($return['checksum'] != $chks) return false;
@@ -570,7 +580,7 @@ class Tar {
/**
* Cleans up a path and removes relative parts, also strips leading slashes
*
- * @param string $p_dir
+ * @param string $path
* @return string
*/
public function cleanPath($path) {
@@ -590,7 +600,7 @@ class Tar {
/**
* Checks if the given compression type is available and throws an exception if not
*
- * @param $comptype
+ * @param int $comptype
* @throws TarIllegalCompressionException
*/
protected function compressioncheck($comptype) {
@@ -624,8 +634,14 @@ class Tar {
}
}
+/**
+ * Class TarIOException
+ */
class TarIOException extends Exception {
}
+/**
+ * Class TarIllegalCompressionException
+ */
class TarIllegalCompressionException extends Exception {
}
diff --git a/inc/ZipLib.class.php b/inc/ZipLib.class.php
index 918d38579..5b524c4ab 100644
--- a/inc/ZipLib.class.php
+++ b/inc/ZipLib.class.php
@@ -16,6 +16,10 @@ class ZipLib {
var $old_offset = 0;
var $dirs = Array(".");
+ /**
+ * @param string $zip_name filename path to file
+ * @return array|int
+ */
function get_List($zip_name) {
$zip = @fopen($zip_name, 'rb');
if(!$zip) return(0);
@@ -24,10 +28,12 @@ class ZipLib {
@rewind($zip);
@fseek($zip, $centd['offset']);
+ $ret = array();
for ($i=0; $i<$centd['entries']; $i++) {
$header = $this->ReadCentralFileHeaders($zip);
$header['index'] = $i;
+ $info = array();
$info['filename'] = $header['filename'];
$info['stored_filename'] = $header['stored_filename'];
$info['size'] = $header['size'];
@@ -45,9 +51,15 @@ class ZipLib {
return $ret;
}
+ /**
+ * @param array $files array filled with array(string filename, string data)
+ * @param bool $compact
+ * @return array
+ */
function Add($files,$compact) {
if(!is_array($files[0])) $files=Array($files);
+ $ret = array();
for($i=0;$files[$i];$i++){
$fn = $files[$i];
if(!in_Array(dirname($fn[0]),$this->dirs))
@@ -60,6 +72,10 @@ class ZipLib {
/**
* Zips recursively the $folder directory, from the $basedir directory
+ *
+ * @param string $folder filename path to file
+ * @param string|null $basedir
+ * @param string|null $parent
*/
function Compress($folder, $basedir=null, $parent=null) {
$full_path = $basedir."/".$parent.$folder;
@@ -70,6 +86,7 @@ class ZipLib {
}
$dir = new DirectoryIterator($full_path);
foreach($dir as $file) {
+ /** @var DirectoryIterator $file */
if(!$file->isDot()) {
$filename = $file->getFilename();
if($file->isDir()) {
@@ -84,6 +101,8 @@ class ZipLib {
/**
* Returns the Zip file
+ *
+ * @return string
*/
function get_file() {
$data = implode('', $this -> datasec);
@@ -94,6 +113,9 @@ class ZipLib {
pack('V', strlen($ctrldir)) . pack('V', strlen($data)) . "\x00\x00";
}
+ /**
+ * @param string $name the name of the directory
+ */
function add_dir($name) {
$name = str_replace("\\", "/", $name);
$fr = "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00";
@@ -117,8 +139,13 @@ class ZipLib {
/**
* Add a file named $name from a string $data
+ *
+ * @param string $data
+ * @param string $name filename
+ * @param bool $compact
+ * @return bool
*/
- function add_File($data, $name, $compact = 1) {
+ function add_File($data, $name, $compact = true) {
$name = str_replace('\\', '/', $name);
$dtime = dechex($this->DosTime());
@@ -166,6 +193,9 @@ class ZipLib {
return true;
}
+ /**
+ * @return int
+ */
function DosTime() {
$timearray = getdate();
if ($timearray['year'] < 1980) {
@@ -186,10 +216,14 @@ class ZipLib {
/**
* Extract a zip file $zn to the $to directory
+ *
+ * @param string $zn filename
+ * @param string $to filename path to file
+ * @param array $index
+ * @return array|int
*/
function Extract ( $zn, $to, $index = Array(-1) ) {
if(!@is_dir($to)) $this->_mkdir($to);
- $ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(-1);
$cdir = $this->ReadCentralDir($zip,$zn);
@@ -203,6 +237,7 @@ class ZipLib {
return(-1);
}
+ $stat = array();
for ($i=0; $i<$cdir['entries']; $i++) {
@fseek($zip, $pos_entry);
$header = $this->ReadCentralFileHeaders($zip);
@@ -218,6 +253,11 @@ class ZipLib {
return $stat;
}
+ /**
+ * @param resource $zip
+ * @param array $header
+ * @return array
+ */
function ReadFileHeader($zip, $header) {
$binary_data = fread($zip, 30);
$data = unpack('vchk/vid/vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $binary_data);
@@ -254,6 +294,10 @@ class ZipLib {
return $header;
}
+ /**
+ * @param resource $zip
+ * @return array
+ */
function ReadCentralFileHeaders($zip){
$binary_data = fread($zip, 46);
$header = unpack('vchkid/vid/vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $binary_data);
@@ -295,6 +339,11 @@ class ZipLib {
return $header;
}
+ /**
+ * @param resource $zip
+ * @param string $zip_name filename path to file
+ * @return array
+ */
function ReadCentralDir($zip,$zip_name) {
$size = filesize($zip_name);
if ($size < 277){
@@ -320,6 +369,7 @@ class ZipLib {
$data=unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size',
fread($zip, 18));
+ $centd = array();
if ($data['comment_size'] != 0){
$centd['comment'] = fread($zip, $data['comment_size']);
} else {
@@ -334,6 +384,12 @@ class ZipLib {
return $centd;
}
+ /**
+ * @param array $header
+ * @param string $to filename path to file
+ * @param resource $zip
+ * @return bool|int
+ */
function ExtractFile($header,$to,$zip) {
$header = $this->readfileheader($zip, $header);
@@ -414,14 +470,20 @@ class ZipLib {
* centralize mkdir calls and use dokuwiki io functions
*
* @author Christopher Smith <chris@jalakai.co.uk>
+ *
+ * @param string $d filename path to file
+ * @return bool|int|string
*/
function _mkdir($d) {
return io_mkdir_p($d);
}
-
+ /**
+ * @param string $zn
+ * @param string $name
+ * @return null|string
+ */
function ExtractStr($zn, $name) {
- $ok = 0;
$zip = @fopen($zn,'rb');
if(!$zip) return(null);
$cdir = $this->ReadCentralDir($zip,$zn);
@@ -445,8 +507,13 @@ class ZipLib {
return null;
}
+ /**
+ * @param array $header
+ * @param resource $zip
+ * @return null|string
+ */
function ExtractStrFile($header,$zip) {
- $hdr = $this->readfileheader($zip);
+ $hdr = $this->readfileheader($zip, $header);
$binary_data = '';
if (!($header['external']==0x41FF0010) && !($header['external']==16)) {
if ($header['compression']==0) {
@@ -484,6 +551,10 @@ class ZipLib {
return null;
}
+ /**
+ * @param string $val
+ * @return int|string
+ */
function _ret_bytes($val) {
$val = trim($val);
$last = $val{strlen($val)-1};
diff --git a/inc/actions.php b/inc/actions.php
index ef09a0dc7..709c19ddd 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -200,6 +200,7 @@ function act_dispatch(){
global $license;
//call template FIXME: all needed vars available?
+ $headers = array();
$headers[] = 'Content-Type: text/html; charset=utf-8';
trigger_event('ACTION_HEADERS_SEND',$headers,'act_sendheaders');
@@ -221,6 +222,9 @@ function act_sendheaders($headers) {
* Sanitize the action command
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array|string $act
+ * @return string
*/
function act_clean($act){
// check if the action was given as array key
@@ -245,6 +249,9 @@ function act_clean($act){
* Add all allowed commands here.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array|string $act
+ * @return string
*/
function act_validate($act) {
global $conf;
@@ -284,10 +291,12 @@ function act_validate($act) {
* Run permissionchecks
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_permcheck($act){
global $INFO;
- global $conf;
if(in_array($act,array('save','preview','edit','recover'))){
if($INFO['exists']){
@@ -330,6 +339,9 @@ function act_permcheck($act){
* Handle 'draftdel'
*
* Deletes the draft for the current page and user
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_draftdel($act){
global $INFO;
@@ -342,6 +354,9 @@ function act_draftdel($act){
* Saves a draft on preview
*
* @todo this currently duplicates code from ajax.php :-/
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_draftsave($act){
global $INFO;
@@ -372,6 +387,9 @@ function act_draftsave($act){
* returns a new action.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_save($act){
global $ID;
@@ -394,7 +412,7 @@ function act_save($act){
return 'conflict';
//save it
- saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$INPUT->bool('minor')); //use pretty mode for con
+ saveWikiText($ID,con($PRE,$TEXT,$SUF,true),$SUM,$INPUT->bool('minor')); //use pretty mode for con
//unlock it
unlock($ID);
@@ -410,6 +428,9 @@ function act_save($act){
* Revert to a certain revision
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_revert($act){
global $ID;
@@ -457,6 +478,9 @@ function act_revert($act){
* Do a redirect after receiving post data
*
* Tries to add the section id as hash mark after section editing
+ *
+ * @param string $id page id
+ * @param string $preact action command before redirect
*/
function act_redirect($id,$preact){
global $PRE;
@@ -478,7 +502,7 @@ function act_redirect($id,$preact){
/**
* Execute the redirect
*
- * @param array $opts id and fragment for the redirect
+ * @param array $opts id and fragment for the redirect and the preact
*/
function act_redirect_execute($opts){
$go = wl($opts['id'],'',true);
@@ -492,6 +516,9 @@ function act_redirect_execute($opts){
* Handle 'login', 'logout'
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_auth($act){
global $ID;
@@ -527,6 +554,9 @@ function act_auth($act){
* Handle 'edit', 'preview', 'recover'
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_edit($act){
global $ID;
@@ -591,6 +621,9 @@ function act_edit($act){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $act action command
+ * @return string action command
*/
function act_export($act){
global $ID;
@@ -600,7 +633,6 @@ function act_export($act){
$pre = '';
$post = '';
- $output = '';
$headers = array();
// search engines: never cache exported docs! (Google only currently)
@@ -644,7 +676,7 @@ function act_export($act){
$output = p_wiki_xhtml($ID,$REV,false);
break;
default:
- $output = p_cached_output(wikiFN($ID,$REV), $mode);
+ $output = p_cached_output(wikiFN($ID,$REV), $mode, $ID);
$headers = p_get_metadata($ID,"format $mode");
break;
}
@@ -672,6 +704,8 @@ function act_export($act){
* Handle sitemap delivery
*
* @author Michael Hamann <michael@content-space.de>
+ *
+ * @param string $act action command
*/
function act_sitemap($act) {
global $conf;
@@ -720,6 +754,10 @@ function act_sitemap($act) {
* Throws exception on error.
*
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $act action command
+ * @return string action command
+ * @throws Exception if (un)subscribing fails
*/
function act_subscription($act){
global $lang;
@@ -779,6 +817,9 @@ function act_subscription($act){
* default action for the event ACTION_HANDLE_SUBSCRIBE.
*
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param array &$params the parameters: target, style and action
+ * @throws Exception
*/
function subscription_handle_post(&$params) {
global $INFO;
diff --git a/inc/auth.php b/inc/auth.php
index e224b2fb5..d51534e67 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -95,9 +95,10 @@ function auth_setup() {
$INPUT->set('http_credentials', true);
}
- // apply cleaning
+ // apply cleaning (auth specific user names, remove control chars)
if (true === $auth->success) {
- $INPUT->set('u', $auth->cleanUser($INPUT->str('u')));
+ $INPUT->set('u', $auth->cleanUser(stripctl($INPUT->str('u'))));
+ $INPUT->set('p', stripctl($INPUT->str('p')));
}
if($INPUT->str('authtok')) {
@@ -126,6 +127,7 @@ function auth_setup() {
* Loads the ACL setup and handle user wildcards
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @return array
*/
function auth_loadACL() {
@@ -172,7 +174,7 @@ function auth_loadACL() {
/**
* Event hook callback for AUTH_LOGIN_CHECK
*
- * @param $evdata
+ * @param array $evdata
* @return bool
*/
function auth_login_wrapper($evdata) {
@@ -228,7 +230,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
if(!empty($user)) {
//usual login
- if($auth->checkPass($user, $pass)) {
+ if(!empty($pass) && $auth->checkPass($user, $pass)) {
// make logininfo globally available
$INPUT->server->set('REMOTE_USER', $user);
$secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session
@@ -279,8 +281,9 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
* token is correct. Will exit with a 401 Status if not.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $token The authentication token
- * @return boolean true (or will exit on failure)
+ * @return boolean|null true (or will exit on failure)
*/
function auth_validateToken($token) {
if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) {
@@ -306,6 +309,7 @@ function auth_validateToken($token) {
* NOTE: this is completely unrelated to the getSecurityToken() function
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @return string The auth token
*/
function auth_createToken() {
@@ -334,7 +338,6 @@ function auth_browseruid() {
$ip = clientIP(true);
$uid = '';
$uid .= $INPUT->server->str('HTTP_USER_AGENT');
- $uid .= $INPUT->server->str('HTTP_ACCEPT_ENCODING');
$uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET');
$uid .= substr($ip, 0, strpos($ip, '.'));
$uid = strtolower($uid);
@@ -350,6 +353,7 @@ 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
* @param bool $secure if security is more important than keeping the old value
* @return string
@@ -377,6 +381,7 @@ function auth_cookiesalt($addsession = false, $secure = false) {
* @author Mark Seecof
* @author Michael Hamann <michael@content-space.de>
* @link http://www.php.net/manual/de/function.mt-rand.php#83655
+ *
* @param int $length number of bytes to get
* @return string binary random strings
*/
@@ -443,6 +448,7 @@ function auth_randombytes($length) {
*
* @author Michael Samuel
* @author Michael Hamann <michael@content-space.de>
+ *
* @param int $min
* @param int $max
* @return int
@@ -514,6 +520,7 @@ function auth_decrypt($ciphertext, $secret) {
* off. It also clears session data.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param bool $keepbc - when true, the breadcrumb data is not cleared
*/
function auth_logoff($keepbc = false) {
@@ -554,6 +561,7 @@ function auth_logoff($keepbc = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see auth_isadmin
+ *
* @param string $user Username
* @param array $groups List of groups the user is in
* @param bool $adminonly when true checks if user is admin
@@ -598,6 +606,7 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see auth_ismanager()
+ *
* @param string $user Username
* @param array $groups List of groups the user is in
* @return bool
@@ -612,9 +621,9 @@ function auth_isadmin($user = null, $groups = null) {
*
* Note: all input should NOT be nameencoded.
*
- * @param $memberlist string commaseparated list of allowed users and groups
- * @param $user string user to match against
- * @param $groups array groups the user is member of
+ * @param string $memberlist commaseparated list of allowed users and groups
+ * @param string $user user to match against
+ * @param array $groups groups the user is member of
* @return bool true for membership acknowledged
*/
function auth_isMember($memberlist, $user, array $groups) {
@@ -638,6 +647,7 @@ function auth_isMember($memberlist, $user, array $groups) {
// compare cleaned values
foreach($members as $member) {
+ if($member == '@ALL' ) return true;
if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member);
if($member[0] == '@') {
$member = $auth->cleanGroup(substr($member, 1));
@@ -676,6 +686,7 @@ function auth_quickaclcheck($id) {
* Returns the maximum rights a user has for the given ID or its namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @triggers AUTH_ACL_CHECK
* @param string $id page ID (needs to be resolved and cleaned)
* @param string $user Username
@@ -698,6 +709,7 @@ function auth_aclcheck($id, $user, $groups) {
* DO NOT CALL DIRECTLY, use auth_aclcheck() instead
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param array $data event data
* @return int permission level
*/
@@ -830,6 +842,10 @@ function auth_aclcheck_cb($data) {
*
* @author Andreas Gohr <gohr@cosmocode.de>
* @see rawurldecode()
+ *
+ * @param string $name
+ * @param bool $skip_group
+ * @return string
*/
function auth_nameencode($name, $skip_group = false) {
global $cache_authname;
@@ -911,6 +927,7 @@ function auth_pwgen($foruser = '') {
* Sends a password to the given user
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $user Login name of the user
* @param string $password The new password in clear text
* @return bool true on success
@@ -922,7 +939,7 @@ function auth_sendPassword($user, $password) {
if(!$auth) return false;
$user = $auth->cleanUser($user);
- $userinfo = $auth->getUserData($user);
+ $userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) return false;
@@ -946,6 +963,7 @@ function auth_sendPassword($user, $password) {
* This registers a new user - Data is read directly from $_POST
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @return bool true on success, false on any error
*/
function register() {
@@ -1127,6 +1145,7 @@ function auth_deleteprofile(){
}
}
+ $deleted = array();
$deleted[] = $INPUT->server->str('REMOTE_USER');
if($auth->triggerUserMod('delete', array($deleted))) {
// force and immediate logout including removing the sticky cookie
@@ -1184,7 +1203,7 @@ function act_resendpwd() {
}
$user = io_readfile($tfile);
- $userinfo = $auth->getUserData($user);
+ $userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) {
msg($lang['resendpwdnouser'], -1);
return false;
@@ -1236,7 +1255,7 @@ function act_resendpwd() {
$user = trim($auth->cleanUser($INPUT->post->str('login')));
}
- $userinfo = $auth->getUserData($user);
+ $userinfo = $auth->getUserData($user, $requireGroups = false);
if(!$userinfo['mail']) {
msg($lang['resendpwdnouser'], -1);
return false;
@@ -1277,6 +1296,7 @@ function act_resendpwd() {
* is chosen.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $clear The clear text password
* @param string $method The hashing method
* @param string $salt A salt, null for random
@@ -1301,6 +1321,7 @@ function auth_cryptPassword($clear, $method = '', $salt = null) {
* Verifies a cleartext password against a crypted hash
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $clear The clear text password
* @param string $crypt The hash to compare with
* @return bool true if both match
diff --git a/inc/blowfish.php b/inc/blowfish.php
index bcf5804a2..7499515bc 100644
--- a/inc/blowfish.php
+++ b/inc/blowfish.php
@@ -356,7 +356,7 @@ class Horde_Cipher_blowfish
* Encrypt a block on data.
*
* @param String $block The data to encrypt
- * @param optional String $key The key to use
+ * @param String $key optional The key to use
*
* @return String the encrypted output
*/
@@ -404,8 +404,8 @@ class Horde_Cipher_blowfish
/**
* Decrypt a block on data.
*
- * @param String $block The data to decrypt
- * @param optional String $key The key to use
+ * @param String $block The data to decrypt
+ * @param String $key optional The key to use
*
* @return String the decrypted output
*/
@@ -452,6 +452,7 @@ class Horde_Cipher_blowfish
/**
* Converts a text key into an array.
*
+ * @param string $key
* @return array The key.
*/
function _formatKey($key) {
@@ -464,8 +465,8 @@ class Horde_Cipher_blowfish
/**
* Encryption using blowfish algorithm
*
- * @param string original data
- * @param string the secret
+ * @param string $data original data
+ * @param string $secret the secret
*
* @return string the encrypted result
*
@@ -493,8 +494,8 @@ function PMA_blowfish_encrypt($data, $secret) {
/**
* Decryption using blowfish algorithm
*
- * @param string encrypted data
- * @param string the secret
+ * @param string $encdata encrypted data
+ * @param string $secret the secret
*
* @return string original data
*
diff --git a/inc/cache.php b/inc/cache.php
index 6817e771b..edf394134 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -50,7 +50,7 @@ class cache {
$this->_addDependencies();
if ($this->_event) {
- return $this->_stats(trigger_event($this->_event,$this,array($this,'_useCache')));
+ return $this->_stats(trigger_event($this->_event, $this, array($this,'_useCache')));
} else {
return $this->_stats($this->_useCache());
}
@@ -316,7 +316,7 @@ class cache_instructions extends cache_parser {
* retrieve the cached data
*
* @param bool $clean true to clean line endings, false to leave line endings alone
- * @return string cache contents
+ * @return array cache contents
*/
public function retrieveCache($clean=true) {
$contents = io_readFile($this->cache, false);
@@ -326,7 +326,7 @@ class cache_instructions extends cache_parser {
/**
* cache $instructions
*
- * @param string $instructions the instruction to be cached
+ * @param array $instructions the instruction to be cached
* @return bool true on success, false otherwise
*/
public function storeCache($instructions) {
diff --git a/inc/changelog.php b/inc/changelog.php
index 8c14f21b0..c2d3cb489 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -83,17 +83,19 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
'extra' => str_replace($strip, '', $extra)
);
+ $wasCreated = ($type===DOKU_CHANGE_TYPE_CREATE);
+ $wasReverted = ($type===DOKU_CHANGE_TYPE_REVERT);
// update metadata
if (!$wasRemoved) {
$oldmeta = p_read_metadata($id);
$meta = array();
- if (!$INFO['exists'] && empty($oldmeta['persistent']['date']['created'])){ // newly created
+ if ($wasCreated && empty($oldmeta['persistent']['date']['created'])){ // newly created
$meta['date']['created'] = $created;
if ($user){
$meta['creator'] = $INFO['userinfo']['name'];
$meta['user'] = $user;
}
- } elseif (!$INFO['exists'] && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored
+ } elseif (($wasCreated || $wasReverted) && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored
$meta['date']['created'] = $oldmeta['persistent']['date']['created'];
$meta['date']['modified'] = $created; // use the files ctime here
$meta['creator'] = $oldmeta['persistent']['creator'];
@@ -725,8 +727,10 @@ abstract class ChangeLog {
* If file larger than $chuncksize, only chunck is read that could contain $rev.
*
* @param int $rev revision timestamp
- * @return array(fp, array(changeloglines), $head, $tail, $eof)|bool
- * returns false when not succeed. fp only defined for chuck reading, needs closing.
+ * @return array|false
+ * if success returns array(fp, array(changeloglines), $head, $tail, $eof)
+ * where fp only defined for chuck reading, needs closing.
+ * otherwise false
*/
protected function readloglines($rev) {
$file = $this->getChangelogFilename();
@@ -845,6 +849,25 @@ abstract class ChangeLog {
public function isCurrentRevision($rev) {
return $rev == @filemtime($this->getFilename());
}
+
+ /**
+ * Return an existing revision for a specific date which is
+ * the current one or younger or equal then the date
+ *
+ * @param string $id
+ * @param number $date_at timestamp
+ * @return string revision ('' for current)
+ */
+ function getLastRevisionAt($date_at){
+ //requested date_at(timestamp) younger or equal then modified_time($this->id) => load current
+ if($date_at >= @filemtime($this->getFilename())) {
+ return '';
+ } else if ($rev = $this->getRelativeRevision($date_at+1, -1)) { //+1 to get also the requested date revision
+ return $rev;
+ } else {
+ return false;
+ }
+ }
/**
* Returns the next lines of the changelog of the chunck before head or after tail
@@ -1072,3 +1095,4 @@ function getRevisions($id, $first, $num, $chunk_size = 8192, $media = false) {
}
return $changelog->getRevisions($first, $num);
}
+
diff --git a/inc/cli.php b/inc/cli.php
index 25bfddf7d..14e2c0c8d 100644
--- a/inc/cli.php
+++ b/inc/cli.php
@@ -108,7 +108,7 @@ abstract class DokuCLI {
/**
* Print an error message
*
- * @param $string
+ * @param string $string
*/
public function error($string) {
$this->colors->ptln("E: $string", 'red', STDERR);
@@ -117,7 +117,7 @@ abstract class DokuCLI {
/**
* Print a success message
*
- * @param $string
+ * @param string $string
*/
public function success($string) {
$this->colors->ptln("S: $string", 'green', STDERR);
@@ -126,7 +126,7 @@ abstract class DokuCLI {
/**
* Print an info message
*
- * @param $string
+ * @param string $string
*/
public function info($string) {
$this->colors->ptln("I: $string", 'cyan', STDERR);
@@ -199,8 +199,8 @@ class DokuCLI_Colors {
/**
* Convenience function to print a line in a given color
*
- * @param $line
- * @param $color
+ * @param string $line
+ * @param string $color
* @param resource $channel
*/
public function ptln($line, $color, $channel = STDOUT) {
@@ -470,8 +470,8 @@ class DokuCLI_Options {
* Can only be used after parseOptions() has been run
*
* @param string $option
- * @param mixed $default what to return if the option was not set
- * @return mixed
+ * @param bool|string $default what to return if the option was not set
+ * @return bool|string
*/
public function getOpt($option, $default = false) {
if(isset($this->options[$option])) return $this->options[$option];
@@ -593,8 +593,8 @@ class DokuCLI_Options {
/**
* Displays text in multiple word wrapped columns
*
- * @param array $widths list of column widths (in characters)
- * @param array $texts list of texts for each column
+ * @param int[] $widths list of column widths (in characters)
+ * @param string[] $texts list of texts for each column
* @return string
*/
private function tableFormat($widths, $texts) {
@@ -640,6 +640,11 @@ class DokuCLI_Exception extends Exception {
const E_OPT_ABIGUOUS = 4; //Option abiguous
const E_ARG_READ = 5; //Could not read argv
+ /**
+ * @param string $message The Exception message to throw.
+ * @param int $code The Exception code
+ * @param Exception $previous The previous exception used for the exception chaining.
+ */
public function __construct($message = "", $code = 0, Exception $previous = null) {
if(!$code) $code = DokuCLI_Exception::E_ANY;
parent::__construct($message, $code, $previous);
diff --git a/inc/cliopts.php b/inc/cliopts.php
index c75a5a93b..7d71c7dc9 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -36,9 +36,9 @@ if (version_compare(phpversion(), '4.3.0', '<') || php_sapi_name() == 'cgi') {
// PHP ini settings
set_time_limit(0);
- ini_set('track_errors', true);
- ini_set('html_errors', false);
- ini_set('magic_quotes_runtime', false);
+ ini_set('track_errors', "1");
+ ini_set('html_errors', "0");
+ ini_set('magic_quotes_runtime', "0");
// Define stream constants
define('STDIN', fopen('php://stdin', 'r'));
@@ -78,7 +78,7 @@ class Doku_Cli_Opts {
* @param string $bin_file executing file name - this MUST be passed the __FILE__ constant
* @param string $short_options short options
* @param array $long_options (optional) long options
- * @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error
+ * @return Doku_Cli_Opts_Container|Doku_Cli_Opts_Error
*/
function & getOptions($bin_file, $short_options, $long_options = null) {
$args = Doku_Cli_Opts::readPHPArgv();
diff --git a/inc/common.php b/inc/common.php
index 8c9956018..2c9359a0c 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -49,7 +49,7 @@ function ptln($string, $indent = 0) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
- * @param $string string being stripped
+ * @param string $string being stripped
* @return string
*/
function stripctl($string) {
@@ -62,6 +62,7 @@ function stripctl($string) {
* @author Andreas Gohr <andi@splitbrain.org>
* @link http://en.wikipedia.org/wiki/Cross-site_request_forgery
* @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html
+ *
* @return string
*/
function getSecurityToken() {
@@ -95,7 +96,7 @@ function checkSecurityToken($token = null) {
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param bool $print if true print the field, otherwise html of the field is returned
- * @return void|string html of hidden form field
+ * @return string html of hidden form field
*/
function formSecurityToken($print = true) {
$ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n";
@@ -120,6 +121,7 @@ function basicinfo($id, $htmlClient=true){
global $INPUT;
// set info about manager/admin status.
+ $info = array();
$info['isadmin'] = false;
$info['ismanager'] = false;
if($INPUT->server->has('REMOTE_USER')) {
@@ -335,7 +337,7 @@ function buildAttributes($params, $skipempty = false) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*
- * @return array(pageid=>name, ... )
+ * @return string[] with the data: array(pageid=>name, ... )
*/
function breadcrumbs() {
// we prepare the breadcrumbs early for quick session closing
@@ -438,6 +440,8 @@ function idfilter($id, $ue = true) {
function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&amp;') {
global $conf;
if(is_array($urlParameters)) {
+ if(isset($urlParameters['rev']) && !$urlParameters['rev']) unset($urlParameters['rev']);
+ if(isset($urlParameters['at']) && $conf['date_at_format']) $urlParameters['at'] = date($conf['date_at_format'],$urlParameters['at']);
$urlParameters = buildURLparams($urlParameters, $separator);
} else {
$urlParameters = str_replace(',', $separator, $urlParameters);
@@ -544,6 +548,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $abs = false)
if(empty($more['w'])) unset($more['w']);
if(empty($more['h'])) unset($more['h']);
if(isset($more['id']) && $direct) unset($more['id']);
+ if(isset($more['rev']) && !$more['rev']) unset($more['rev']);
$more = buildURLparams($more, $sep);
} else {
$matches = array();
@@ -685,6 +690,7 @@ function checkwordblock($text = '') {
}
if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) {
// prepare event data
+ $data = array();
$data['matches'] = $matches;
$data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
if($INPUT->server->str('REMOTE_USER')) {
@@ -968,7 +974,7 @@ function rawLocale($id, $ext = 'txt') {
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $id page id
- * @param string $rev timestamp when a revision of wikitext is desired
+ * @param string|int $rev timestamp when a revision of wikitext is desired
* @return string
*/
function rawWiki($id, $rev = '') {
@@ -1108,7 +1114,7 @@ function parsePageTemplate(&$data) {
* @param string $range in form "from-to"
* @param string $id page id
* @param string $rev optional, the revision timestamp
- * @return array with three slices
+ * @return string[] with three slices
*/
function rawWikiSlices($range, $id, $rev = '') {
$text = io_readWikiPage(wikiFN($id, $rev), $id, $rev);
@@ -1119,6 +1125,7 @@ function rawWikiSlices($range, $id, $rev = '') {
$from = !$from ? 0 : ($from - 1);
$to = !$to ? strlen($text) : ($to - 1);
+ $slices = array();
$slices[0] = substr($text, 0, $from);
$slices[1] = substr($text, $from, $to - $from);
$slices[2] = substr($text, $to);
@@ -1293,7 +1300,7 @@ function saveOldRevision($id) {
* @param int|string $rev Old page revision
* @param string $summary What changed
* @param boolean $minor Is this a minor edit?
- * @param array $replace Additional string substitutions, @KEY@ to be replaced by value
+ * @param string[] $replace Additional string substitutions, @KEY@ to be replaced by value
* @return bool
*
* @author Andreas Gohr <andi@splitbrain.org>
@@ -1373,8 +1380,8 @@ function getGoogleQuery() {
/**
* Return the human readable size of a file
*
- * @param int $size A file size
- * @param int $dec A number of decimal places
+ * @param int $size A file size
+ * @param int $dec A number of decimal places
* @return string human readable size
*
* @author Martin Benjamin <b.martin@cybernet.ch>
@@ -1457,7 +1464,7 @@ function dformat($dt = null, $format = '') {
* @author <ungu at terong dot com>
* @link http://www.php.net/manual/en/function.date.php#54072
*
- * @param int $int_date: current date in UNIX timestamp
+ * @param int $int_date current date in UNIX timestamp
* @return string
*/
function date_iso8601($int_date) {
@@ -1583,7 +1590,7 @@ function shorten($keep, $short, $max, $min = 9, $char = '…') {
}
/**
- * Return the users realname or e-mail address for use
+ * Return the users real name or e-mail address for use
* in page footer and recent changes pages
*
* @param string|null $username or null when currently logged-in user should be used
@@ -1641,22 +1648,20 @@ function userlink($username = null, $textonly = false) {
$evt = new Doku_Event('COMMON_USER_LINK', $data);
if($evt->advise_before(true)) {
if(empty($data['name'])) {
- if($conf['showuseras'] == 'loginname') {
- $data['name'] = $textonly ? $data['username'] : hsc($data['username']);
- } else {
- if($auth) $info = $auth->getUserData($username);
- if(isset($info) && $info) {
- switch($conf['showuseras']) {
- case 'username':
- case 'username_link':
- $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
- break;
- case 'email':
- case 'email_link':
- $data['name'] = obfuscate($info['mail']);
- break;
- }
+ if($auth) $info = $auth->getUserData($username);
+ if($conf['showuseras'] != 'loginname' && isset($info) && $info) {
+ switch($conf['showuseras']) {
+ case 'username':
+ case 'username_link':
+ $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
+ break;
+ case 'email':
+ case 'email_link':
+ $data['name'] = obfuscate($info['mail']);
+ break;
}
+ } else {
+ $data['name'] = $textonly ? $data['username'] : hsc($data['username']);
}
}
@@ -1823,6 +1828,8 @@ function send_redirect($url) {
} else {
header('Location: '.$url);
}
+
+ if(defined('DOKU_UNITTEST')) return; // no exits during unit tests
exit;
}
@@ -1913,7 +1920,7 @@ function set_doku_pref($pref, $val) {
/**
* Strips source mapping declarations from given text #601
*
- * @param &string $text reference to the CSS or JavaScript code to clean
+ * @param string &$text reference to the CSS or JavaScript code to clean
*/
function stripsourcemaps(&$text){
$text = preg_replace('/^(\/\/|\/\*)[@#]\s+sourceMappingURL=.*?(\*\/)?$/im', '\\1\\2', $text);
diff --git a/inc/compatibility.php b/inc/compatibility.php
index ae780e5ac..cb865a2d7 100644
--- a/inc/compatibility.php
+++ b/inc/compatibility.php
@@ -33,4 +33,50 @@ if(!function_exists('ctype_digit')) {
if(preg_match('/^\d+$/', $text)) return true;
return false;
}
+}
+
+if(!function_exists('gzopen') && function_exists('gzopen64')) {
+ /**
+ * work around for PHP compiled against certain zlib versions #865
+ *
+ * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
+ *
+ * @param string $filename
+ * @param string $mode
+ * @param int $use_include_path
+ * @return mixed
+ */
+ function gzopen($filename, $mode, $use_include_path = 0) {
+ return gzopen64($filename, $mode, $use_include_path);
+ }
+}
+
+if(!function_exists('gzseek') && function_exists('gzseek64')) {
+ /**
+ * work around for PHP compiled against certain zlib versions #865
+ *
+ * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
+ *
+ * @param resource $zp
+ * @param int $offset
+ * @param int $whence
+ * @return int
+ */
+ function gzseek($zp, $offset, $whence = SEEK_SET) {
+ return gzseek64($zp, $offset, $whence);
+ }
+}
+
+if(!function_exists('gztell') && function_exists('gztell64')) {
+ /**
+ * work around for PHP compiled against certain zlib versions #865
+ *
+ * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
+ *
+ * @param resource $zp
+ * @return int
+ */
+ function gztell($zp) {
+ return gztell64($zp);
+ }
} \ No newline at end of file
diff --git a/inc/config_cascade.php b/inc/config_cascade.php
index 2c4f1612b..a6dfadc80 100644
--- a/inc/config_cascade.php
+++ b/inc/config_cascade.php
@@ -8,71 +8,75 @@
$config_cascade = array_merge(
array(
'main' => array(
- 'default' => array(DOKU_CONF.'dokuwiki.php'),
- 'local' => array(DOKU_CONF.'local.php'),
- 'protected' => array(DOKU_CONF.'local.protected.php'),
- ),
- 'acronyms' => array(
- 'default' => array(DOKU_CONF.'acronyms.conf'),
- 'local' => array(DOKU_CONF.'acronyms.local.conf'),
- ),
- 'entities' => array(
- 'default' => array(DOKU_CONF.'entities.conf'),
- 'local' => array(DOKU_CONF.'entities.local.conf'),
- ),
+ 'default' => array(DOKU_CONF . 'dokuwiki.php'),
+ 'local' => array(DOKU_CONF . 'local.php'),
+ 'protected' => array(DOKU_CONF . 'local.protected.php'),
+ ),
+ 'acronyms' => array(
+ 'default' => array(DOKU_CONF . 'acronyms.conf'),
+ 'local' => array(DOKU_CONF . 'acronyms.local.conf'),
+ ),
+ 'entities' => array(
+ 'default' => array(DOKU_CONF . 'entities.conf'),
+ 'local' => array(DOKU_CONF . 'entities.local.conf'),
+ ),
'interwiki' => array(
- 'default' => array(DOKU_CONF.'interwiki.conf'),
- 'local' => array(DOKU_CONF.'interwiki.local.conf'),
- ),
+ 'default' => array(DOKU_CONF . 'interwiki.conf'),
+ 'local' => array(DOKU_CONF . 'interwiki.local.conf'),
+ ),
'license' => array(
- 'default' => array(DOKU_CONF.'license.php'),
- 'local' => array(DOKU_CONF.'license.local.php'),
- ),
+ 'default' => array(DOKU_CONF . 'license.php'),
+ 'local' => array(DOKU_CONF . 'license.local.php'),
+ ),
'mediameta' => array(
- 'default' => array(DOKU_CONF.'mediameta.php'),
- 'local' => array(DOKU_CONF.'mediameta.local.php'),
- ),
- 'mime' => array(
- 'default' => array(DOKU_CONF.'mime.conf'),
- 'local' => array(DOKU_CONF.'mime.local.conf'),
- ),
- 'scheme' => array(
- 'default' => array(DOKU_CONF.'scheme.conf'),
- 'local' => array(DOKU_CONF.'scheme.local.conf'),
- ),
- 'smileys' => array(
- 'default' => array(DOKU_CONF.'smileys.conf'),
- 'local' => array(DOKU_CONF.'smileys.local.conf'),
- ),
+ 'default' => array(DOKU_CONF . 'mediameta.php'),
+ 'local' => array(DOKU_CONF . 'mediameta.local.php'),
+ ),
+ 'mime' => array(
+ 'default' => array(DOKU_CONF . 'mime.conf'),
+ 'local' => array(DOKU_CONF . 'mime.local.conf'),
+ ),
+ 'scheme' => array(
+ 'default' => array(DOKU_CONF . 'scheme.conf'),
+ 'local' => array(DOKU_CONF . 'scheme.local.conf'),
+ ),
+ 'smileys' => array(
+ 'default' => array(DOKU_CONF . 'smileys.conf'),
+ 'local' => array(DOKU_CONF . 'smileys.local.conf'),
+ ),
'wordblock' => array(
- 'default' => array(DOKU_CONF.'wordblock.conf'),
- 'local' => array(DOKU_CONF.'wordblock.local.conf'),
- ),
+ 'default' => array(DOKU_CONF . 'wordblock.conf'),
+ 'local' => array(DOKU_CONF . 'wordblock.local.conf'),
+ ),
'userstyle' => array(
- 'screen' => DOKU_CONF.'userstyle.css',
- 'print' => DOKU_CONF.'userprint.css',
- 'feed' => DOKU_CONF.'userfeed.css',
- 'all' => DOKU_CONF.'userall.css',
- ),
+ 'screen' => array(DOKU_CONF . 'userstyle.css', DOKU_CONF . 'userstyle.less'),
+ 'print' => array(DOKU_CONF . 'userprint.css', DOKU_CONF . 'userprint.less'),
+ 'feed' => array(DOKU_CONF . 'userfeed.css', DOKU_CONF . 'userfeed.less'),
+ 'all' => array(DOKU_CONF . 'userall.css', DOKU_CONF . 'userall.less')
+ ),
'userscript' => array(
- 'default' => DOKU_CONF.'userscript.js'
- ),
- 'acl' => array(
- 'default' => DOKU_CONF.'acl.auth.php',
- ),
+ 'default' => array(DOKU_CONF . 'userscript.js')
+ ),
+ 'acl' => array(
+ 'default' => DOKU_CONF . 'acl.auth.php',
+ ),
'plainauth.users' => array(
- 'default' => DOKU_CONF.'users.auth.php',
- ),
-
+ 'default' => DOKU_CONF . 'users.auth.php',
+ ),
'plugins' => array(
- 'default' => array(DOKU_CONF.'plugins.php'),
- 'local' => array(DOKU_CONF.'plugins.local.php'),
+ 'default' => array(DOKU_CONF . 'plugins.php'),
+ 'local' => array(DOKU_CONF . 'plugins.local.php'),
'protected' => array(
- DOKU_CONF.'plugins.required.php',
- DOKU_CONF.'plugins.protected.php',
- ),
+ DOKU_CONF . 'plugins.required.php',
+ DOKU_CONF . 'plugins.protected.php',
),
),
- $config_cascade
+ 'lang' => array(
+ 'core' => array(DOKU_CONF . 'lang/'),
+ 'plugin' => array(DOKU_CONF . 'plugin_lang/'),
+ 'template' => array(DOKU_CONF . 'template_lang/')
+ )
+ ),
+ $config_cascade
);
diff --git a/inc/confutils.php b/inc/confutils.php
index 31371d41f..85bf5128c 100644
--- a/inc/confutils.php
+++ b/inc/confutils.php
@@ -14,6 +14,10 @@
* are returned.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file file name
+ * @param bool $knownonly
+ * @return array with extension, mimetype and if it should be downloaded
*/
function mimetype($file, $knownonly=true){
$mtypes = getMimeTypes(); // known mimetypes
diff --git a/inc/events.php b/inc/events.php
index 318a7617e..256fb561e 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -27,6 +27,9 @@ class Doku_Event {
/**
* event constructor
+ *
+ * @param string $name
+ * @param mixed $data
*/
function Doku_Event($name, &$data) {
@@ -120,14 +123,18 @@ class Doku_Event {
* stop any further processing of the event by event handlers
* this function does not prevent the default action taking place
*/
- function stopPropagation() { $this->_continue = false; }
+ function stopPropagation() {
+ $this->_continue = false;
+ }
/**
* preventDefault
*
* prevent the default action taking place
*/
- function preventDefault() { $this->_default = false; }
+ function preventDefault() {
+ $this->_default = false;
+ }
}
/**
@@ -165,13 +172,13 @@ class Doku_Event_Handler {
*
* register a hook for an event
*
- * @param $event string name used by the event, (incl '_before' or '_after' for triggers)
- * @param $advise string
- * @param $obj object object in whose scope method is to be executed,
+ * @param string $event string name used by the event, (incl '_before' or '_after' for triggers)
+ * @param string $advise
+ * @param object $obj object in whose scope method is to be executed,
* if NULL, method is assumed to be a globally available function
- * @param $method string event handler function
- * @param $param mixed data passed to the event handler
- * @param $seq int sequence number for ordering hook execution (ascending)
+ * @param string $method event handler function
+ * @param mixed $param data passed to the event handler
+ * @param int $seq sequence number for ordering hook execution (ascending)
*/
function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) {
$seq = (int)$seq;
@@ -216,14 +223,14 @@ class Doku_Event_Handler {
*
* function wrapper to process (create, trigger and destroy) an event
*
- * @param $name string name for the event
- * @param $data mixed event data
- * @param $action callback (optional, default=NULL) default action, a php callback function
- * @param $canPreventDefault bool (optional, default=true) can hooks prevent the default action
+ * @param string $name name for the event
+ * @param mixed $data event data
+ * @param callback $action (optional, default=NULL) default action, a php callback function
+ * @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action
*
* @return mixed the event results value after all event processing is complete
- * by default this is the return value of the default action however
- * it can be set or modified by event handler hooks
+ * by default this is the return value of the default action however
+ * it can be set or modified by event handler hooks
*/
function trigger_event($name, &$data, $action=null, $canPreventDefault=true) {
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index 55b31a454..3c5bdfeee 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -16,6 +16,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Gerry Weissbach <dokuwiki@gammaproduction.de>
+ *
* @param string $file local file to send
* @param string $mime mime type of the file
* @param bool $dl set to true to force a browser download
@@ -121,12 +122,13 @@ function rfc2231_encode($name, $value, $charset='utf-8', $lang='en') {
* WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE )
*
* @author Gerry Weissbach <gerry.w@gammaproduction.de>
+ *
* @param string $media reference to the media id
* @param string $file reference to the file variable
* @param string $rev
* @param int $width
* @param int $height
- * @return array(STATUS, STATUSMESSAGE)
+ * @return array as array(STATUS, STATUSMESSAGE)
*/
function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
global $MIME, $EXT, $CACHE, $INPUT;
@@ -174,6 +176,9 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
* Resolves named constants
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $cache
+ * @return int cachetime in seconds
*/
function calc_cache($cache) {
global $conf;
diff --git a/inc/form.php b/inc/form.php
index fadc71d3e..00eea9b3a 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -52,6 +52,7 @@ class Doku_Form {
* @param bool|string $action (optional, deprecated) submit URL, defaults to current page
* @param bool|string $method (optional, deprecated) 'POST' or 'GET', default is POST
* @param bool|string $enctype (optional, deprecated) Encoding type of the data
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function Doku_Form($params, $action=false, $method=false, $enctype=false) {
@@ -84,6 +85,7 @@ class Doku_Form {
* Usually results in a border drawn around the form.
*
* @param string $legend Label that will be printed with the border.
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function startFieldset($legend) {
@@ -115,6 +117,7 @@ class Doku_Form {
*
* @param string $name Field name.
* @param string $value Field value. If null, remove a previously added field.
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function addHidden($name, $value) {
@@ -132,6 +135,7 @@ class Doku_Form {
* If string, it is printed without escaping special chars. *
*
* @param string|array $elem Pseudo-tag or string to add to the form.
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function addElement($elem) {
@@ -145,6 +149,7 @@ class Doku_Form {
*
* @param string $pos 0-based index where the element will be inserted.
* @param string|array $elem Pseudo-tag or string to add to the form.
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function insertElement($pos, $elem) {
@@ -158,6 +163,7 @@ class Doku_Form {
*
* @param int $pos 0-based index the element will be placed at.
* @param string|array $elem Pseudo-tag or string to add to the form.
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function replaceElement($pos, $elem) {
@@ -172,7 +178,8 @@ class Doku_Form {
* Gets the position of the first of a type of element.
*
* @param string $type Element type to look for.
- * @return int position of element if found, otherwise false
+ * @return int|false position of element if found, otherwise false
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByType($type) {
@@ -189,7 +196,8 @@ class Doku_Form {
* Gets the position of the element with an ID attribute.
*
* @param string $id ID of the element to find.
- * @return int position of element if found, otherwise false
+ * @return int|false position of element if found, otherwise false
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementById($id) {
@@ -207,7 +215,8 @@ class Doku_Form {
*
* @param string $name Attribute name.
* @param string $value Attribute value.
- * @return int position of element if found, otherwise false
+ * @return int|false position of element if found, otherwise false
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByAttribute($name, $value) {
@@ -227,6 +236,7 @@ class Doku_Form {
*
* @param int $pos 0-based index
* @return array reference pseudo-element
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function &getElementAt($pos) {
@@ -243,6 +253,8 @@ class Doku_Form {
* 'form_$type'. The function should return the HTML to be printed.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @return string html of the form
*/
function getForm() {
global $lang;
@@ -310,6 +322,7 @@ class Doku_Form {
* @param string $tag Tag name.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeTag($tag, $attrs=array()) {
@@ -326,6 +339,7 @@ function form_makeTag($tag, $attrs=array()) {
* @param string $tag Tag name.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeOpenTag($tag, $attrs=array()) {
@@ -341,6 +355,7 @@ function form_makeOpenTag($tag, $attrs=array()) {
*
* @param string $tag Tag name.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeCloseTag($tag) {
@@ -358,6 +373,7 @@ function form_makeCloseTag($tag) {
* @param string $text Text to fill the field with.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeWikiText($text, $attrs=array()) {
@@ -378,6 +394,7 @@ function form_makeWikiText($text, $attrs=array()) {
* @param string $value (optional) Displayed label. Uses $act if not provided.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeButton($type, $act, $value='', $attrs=array()) {
@@ -406,6 +423,7 @@ function form_makeButton($type, $act, $value='', $attrs=array()) {
* reference it with a 'for' attribute.
* @param array $attrs Optional attributes.
* @return array pseudo-tag
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function form_makeField($type, $name, $value='', $label=null, $id='', $class='', $attrs=array()) {
@@ -522,6 +540,18 @@ function form_makeRadioField($name, $value='1', $label=null, $id='', $class='',
* a string.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $name Name attribute of the input.
+ * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
+ * or an associative array with the values as keys and labels as values.
+ * @param string|int $selected default selected value, string or index number
+ * @param string $class Class attribute of the label. If this is 'block',
+ * then a line break will be added after the field.
+ * @param string $label Label that will be printed before the input.
+ * @param string $id ID attribute of the input. If set, the label will
+ * reference it with a 'for' attribute.
+ * @param array $attrs Optional attributes.
+ * @return array pseudo-tag
*/
function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) {
if (is_null($label)) $label = $name;
@@ -556,6 +586,18 @@ function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $
* Items are selected by supplying its value or an array of values.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $name Name attribute of the input.
+ * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
+ * or an associative array with the values as keys and labels as values.
+ * @param array|string $selected value or array of values of the items that need to be selected
+ * @param string $class Class attribute of the label. If this is 'block',
+ * then a line break will be added after the field.
+ * @param string $label Label that will be printed before the input.
+ * @param string $id ID attribute of the input. If set, the label will
+ * reference it with a 'for' attribute.
+ * @param array $attrs Optional attributes.
+ * @return array pseudo-tag
*/
function form_makeListboxField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) {
if (is_null($label)) $label = $name;
@@ -595,6 +637,9 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id=''
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html of tag
*/
function form_tag($attrs) {
return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'/>';
@@ -608,6 +653,9 @@ function form_tag($attrs) {
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html of tag
*/
function form_opentag($attrs) {
return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'>';
@@ -621,6 +669,9 @@ function form_opentag($attrs) {
* There are no attributes.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html of tag
*/
function form_closetag($attrs) {
return '</'.$attrs['_tag'].'>';
@@ -634,6 +685,9 @@ function form_closetag($attrs) {
* Attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_openfieldset($attrs) {
$s = '<fieldset '.buildAttributes($attrs,true).'>';
@@ -648,6 +702,8 @@ function form_openfieldset($attrs) {
* There are no attributes.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @return string html
*/
function form_closefieldset() {
return '</fieldset>';
@@ -661,6 +717,9 @@ function form_closefieldset() {
* Value is passed to formText()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_hidden($attrs) {
return '<input type="hidden" name="'.$attrs['name'].'" value="'.formText($attrs['value']).'" />';
@@ -674,6 +733,9 @@ function form_hidden($attrs) {
* Text will be passed to formText(), attributes to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_wikitext($attrs) {
// mandatory attributes
@@ -693,6 +755,9 @@ function form_wikitext($attrs) {
* Other attributes are passed to buildAttributes()
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_button($attrs) {
$p = (!empty($attrs['_action'])) ? 'name="do['.$attrs['_action'].']" ' : '';
@@ -708,6 +773,9 @@ function form_button($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_field($attrs) {
$s = '<label';
@@ -729,6 +797,9 @@ function form_field($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_fieldright($attrs) {
$s = '<label';
@@ -750,6 +821,9 @@ function form_fieldright($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_textfield($attrs) {
// mandatory attributes
@@ -773,6 +847,9 @@ function form_textfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_passwordfield($attrs) {
// mandatory attributes
@@ -798,6 +875,9 @@ function form_passwordfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_filefield($attrs) {
$s = '<label';
@@ -824,6 +904,9 @@ function form_filefield($attrs) {
* $attrs['value'][1] is constructed as well.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_checkboxfield($attrs) {
// mandatory attributes
@@ -853,6 +936,9 @@ function form_checkboxfield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_radiofield($attrs) {
// mandatory attributes
@@ -879,6 +965,9 @@ function form_radiofield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_menufield($attrs) {
$attrs['size'] = '1';
@@ -924,6 +1013,9 @@ function form_menufield($attrs) {
* Other attributes are passed to buildAttributes() for the input tag.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param array $attrs attributes
+ * @return string html
*/
function form_listboxfield($attrs) {
$s = '<label';
diff --git a/inc/fulltext.php b/inc/fulltext.php
index dd918f214..d6cddc566 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -20,9 +20,13 @@ if(!defined('FT_SNIPPET_NUMBER')) define('FT_SNIPPET_NUMBER',15);
*
* refactored into ft_pageSearch(), _ft_pageSearch() and trigger_event()
*
+ * @param string $query
+ * @param array $highlight
+ * @return array
*/
function ft_pageSearch($query,&$highlight){
+ $data = array();
$data['query'] = $query;
$data['highlight'] =& $highlight;
@@ -34,6 +38,9 @@ function ft_pageSearch($query,&$highlight){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
+ *
+ * @param array $data event data
+ * @return array matching documents
*/
function _ft_pageSearch(&$data) {
$Indexer = idx_get_indexer();
@@ -205,6 +212,11 @@ function ft_mediause($id, $ignore_perms = false){
* @triggers SEARCH_QUERY_PAGELOOKUP
* @author Andreas Gohr <andi@splitbrain.org>
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $id page id
+ * @param bool $in_ns match against namespace as well?
+ * @param bool $in_title search in title?
+ * @return string[]
*/
function ft_pageLookup($id, $in_ns=false, $in_title=false){
$data = compact('id', 'in_ns', 'in_title');
@@ -212,10 +224,16 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){
return trigger_event('SEARCH_QUERY_PAGELOOKUP', $data, '_ft_pageLookup');
}
+/**
+ * Returns list of pages as array(pageid => First Heading)
+ *
+ * @param array &$data event data
+ * @return string[]
+ */
function _ft_pageLookup(&$data){
// split out original parameters
$id = $data['id'];
- if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) {
+ if (preg_match('/(?:^| )(?:@|ns:)([\w:]+)/', $id, $matches)) {
$ns = cleanID($matches[1]) . ':';
$id = str_replace($matches[0], '', $id);
}
@@ -269,6 +287,10 @@ function _ft_pageLookup(&$data){
* Tiny helper function for comparing the searched title with the title
* from the search index. This function is a wrapper around stripos with
* adapted argument order and return value.
+ *
+ * @param string $search searched title
+ * @param string $title title from index
+ * @return bool
*/
function _ft_pageLookupTitleCompare($search, $title) {
return stripos($title, $search) !== false;
@@ -278,6 +300,10 @@ function _ft_pageLookupTitleCompare($search, $title) {
* Sort pages based on their namespace level first, then on their string
* values. This makes higher hierarchy pages rank higher than lower hierarchy
* pages.
+ *
+ * @param string $a
+ * @param string $b
+ * @return int Returns < 0 if $a is less than $b; > 0 if $a is greater than $b, and 0 if they are equal.
*/
function ft_pagesorter($a, $b){
$ac = count(explode(':',$a));
@@ -295,6 +321,10 @@ function ft_pagesorter($a, $b){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @triggers FULLTEXT_SNIPPET_CREATE
+ *
+ * @param string $id page id
+ * @param array $highlight
+ * @return mixed
*/
function ft_snippet($id,$highlight){
$text = rawWiki($id);
@@ -389,6 +419,9 @@ function ft_snippet($id,$highlight){
/**
* Wraps a search term in regex boundary checks.
+ *
+ * @param string $term
+ * @return string
*/
function ft_snippet_re_preprocess($term) {
// do not process asian terms where word boundaries are not explicit
@@ -432,6 +465,7 @@ function ft_snippet_re_preprocess($term) {
* based upon PEAR's PHP_Compat function for array_intersect_key()
*
* @param array $args An array of page arrays
+ * @return array
*/
function ft_resultCombine($args){
$array_count = count($args);
@@ -461,6 +495,8 @@ function ft_resultCombine($args){
* based upon ft_resultCombine() function
*
* @param array $args An array of page arrays
+ * @return array
+ *
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*/
function ft_resultUnite($args) {
@@ -484,6 +520,8 @@ function ft_resultUnite($args) {
* nearly identical to PHP5's array_diff_key()
*
* @param array $args An array of page arrays
+ * @return array
+ *
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
*/
function ft_resultComplement($args) {
@@ -506,6 +544,10 @@ function ft_resultComplement($args) {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
+ *
+ * @param Doku_Indexer $Indexer
+ * @param string $query search query
+ * @return array of search formulas
*/
function ft_queryParser($Indexer, $query){
/**
@@ -736,6 +778,12 @@ function ft_queryParser($Indexer, $query){
* This function is used in ft_queryParser() and not for general purpose use.
*
* @author Kazutaka Miyasaka <kazmiya@gmail.com>
+ *
+ * @param Doku_Indexer $Indexer
+ * @param string $term
+ * @param bool $consider_asian
+ * @param bool $phrase_mode
+ * @return string
*/
function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false) {
$parsed = '';
diff --git a/inc/html.php b/inc/html.php
index bda6fb398..87affd47b 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -83,6 +83,10 @@ function html_denied() {
* inserts section edit buttons if wanted or removes the markers
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @param bool $show show section edit buttons?
+ * @return string
*/
function html_secedit($text,$show=true){
global $INFO;
@@ -101,8 +105,11 @@ function html_secedit($text,$show=true){
* prepares section edit button data for event triggering
* used as a callback in html_secedit
*
- * @triggers HTML_SECEDIT_BUTTON
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $matches matches with regexp
+ * @return string
+ * @triggers HTML_SECEDIT_BUTTON
*/
function html_secedit_button($matches){
$data = array('secid' => $matches[1],
@@ -121,6 +128,9 @@ function html_secedit_button($matches){
* used as default action form HTML_SECEDIT_BUTTON
*
* @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param array $data name, section id and target
+ * @return string html
*/
function html_secedit_get_button($data) {
global $ID;
@@ -147,6 +157,8 @@ function html_secedit_get_button($data) {
* Just the back to top button (in its own form)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return string html
*/
function html_topbtn(){
global $lang;
@@ -161,6 +173,15 @@ function html_topbtn(){
* If tooltip exists, the access key tooltip is replaced.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $name
+ * @param string $id
+ * @param string $akey access key
+ * @param string[] $params key-value pairs added as hidden inputs
+ * @param string $method
+ * @param string $tooltip
+ * @param bool|string $label label text, false: lookup btn_$name in localization
+ * @return string
*/
function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false){
global $conf;
@@ -213,15 +234,18 @@ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false
}
/**
- * show a wiki page
+ * Show a wiki page
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param null|string $txt wiki text or null for showing $ID
*/
function html_show($txt=null){
global $ID;
global $REV;
global $HIGH;
global $INFO;
+ global $DATE_AT;
//disable section editing for old revisions or in preview
if($txt || $REV){
$secedit = false;
@@ -241,8 +265,8 @@ function html_show($txt=null){
echo '</div></div>';
}else{
- if ($REV) print p_locale_xhtml('showrev');
- $html = p_wiki_xhtml($ID,$REV,true);
+ if ($REV||$DATE_AT) print p_locale_xhtml('showrev');
+ $html = p_wiki_xhtml($ID,$REV,true,$DATE_AT);
$html = html_secedit($html,$secedit);
if($INFO['prependTOC']) $html = tpl_toc(true).$html;
$html = html_hilight($html,$HIGH);
@@ -281,6 +305,10 @@ function html_draft(){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Harry Fuecks <hfuecks@gmail.com>
+ *
+ * @param string $html
+ * @param array|string $phrases
+ * @return string html
*/
function html_hilight($html,$phrases){
$phrases = (array) $phrases;
@@ -299,6 +327,9 @@ function html_hilight($html,$phrases){
* Callback used by html_hilight()
*
* @author Harry Fuecks <hfuecks@gmail.com>
+ *
+ * @param array $m matches
+ * @return string html
*/
function html_hilight_callback($m) {
$hlight = unslash($m[0]);
@@ -314,15 +345,17 @@ function html_hilight_callback($m) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function html_search(){
- global $QUERY;
+ global $QUERY, $ID;
global $lang;
$intro = p_locale_xhtml('searchpage');
// allow use of placeholder in search intro
+ $pagecreateinfo = (auth_quickaclcheck($ID) >= AUTH_CREATE) ? $lang['searchcreatepage'] : '';
$intro = str_replace(
- array('@QUERY@','@SEARCH@'),
- array(hsc(rawurlencode($QUERY)),hsc($QUERY)),
- $intro);
+ array('@QUERY@', '@SEARCH@', '@CREATEPAGEINFO@'),
+ array(hsc(rawurlencode($QUERY)), hsc($QUERY), $pagecreateinfo),
+ $intro
+ );
echo $intro;
flush();
@@ -422,6 +455,9 @@ function html_locked(){
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param int $first skip the first n changelog lines
+ * @param bool|string $media_id id of media, or false for current page
*/
function html_revisions($first=0, $media_id = false){
global $ID;
@@ -643,6 +679,9 @@ function html_revisions($first=0, $media_id = false){
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Ben Coburn <btcoburn@silicodon.net>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param int $first
+ * @param string $show_changes
*/
function html_recent($first=0, $show_changes='both'){
global $conf;
@@ -830,6 +869,8 @@ function html_recent($first=0, $show_changes='both'){
* Display page index
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ns
*/
function html_index($ns){
global $conf;
@@ -858,6 +899,9 @@ function html_index($ns){
* User function for html_buildlist()
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string
*/
function html_list_index($item){
global $ID, $conf;
@@ -888,10 +932,23 @@ function html_list_index($item){
* it gives different classes to opened or closed "folders"
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function html_li_index($item){
+ global $INFO;
+
+ $class = '';
+ $id = '';
+
if($item['type'] == "f"){
- return '<li class="level'.$item['level'].'">';
+ // scroll to the current item
+ if($item['id'] == $INFO['id']) {
+ $id = ' id="scroll__here"';
+ $class = ' bounce';
+ }
+ return '<li class="level'.$item['level'].$class.'" '.$id.'>';
}elseif($item['open']){
return '<li class="open">';
}else{
@@ -903,6 +960,9 @@ function html_li_index($item){
* Default List item
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function html_li_default($item){
return '<li class="level'.$item['level'].'">';
@@ -926,7 +986,7 @@ function html_li_default($item){
* @param array $data array with item arrays
* @param string $class class of ul wrapper
* @param callable $func callback to print an list item
- * @param string $lifunc callback to the opening li tag
+ * @param callable $lifunc callback to the opening li tag
* @param bool $forcewrapper Trigger building a wrapper ul if the first level is
0 (we have a root object) or 1 (just the root content)
* @return string html of an unordered list
@@ -1018,12 +1078,13 @@ function html_backlinks(){
/**
* Get header of diff HTML
+ *
* @param string $l_rev Left revisions
* @param string $r_rev Right revision
* @param string $id Page id, if null $ID is used
* @param bool $media If it is for media files
* @param bool $inline Return the header on a single line
- * @return array HTML snippets for diff header
+ * @return string[] HTML snippets for diff header
*/
function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = false) {
global $lang;
@@ -1479,7 +1540,7 @@ function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) {
/**
* Insert soft breaks in diff html
*
- * @param $diffhtml
+ * @param string $diffhtml
* @return string
*/
function html_insert_softbreaks($diffhtml) {
@@ -1518,6 +1579,9 @@ REGEX;
* show warning on conflict detection
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $text
+ * @param string $summary
*/
function html_conflict($text,$summary){
global $ID;
@@ -1678,7 +1742,6 @@ function html_edit(){
global $lang;
global $conf;
global $TEXT;
- global $RANGE;
if ($INPUT->has('changecheck')) {
$check = $INPUT->str('changecheck');
@@ -1780,6 +1843,7 @@ function html_edit(){
* Display the default edit form
*
* Is the default action for HTML_EDIT_FORMSELECTION.
+ *
* @param mixed[] $param
*/
function html_edit_form($param) {
@@ -1799,6 +1863,8 @@ function html_edit_form($param) {
* Adds a checkbox for minor edits for logged in users
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array|bool
*/
function html_minoredit(){
global $conf;
@@ -1899,6 +1965,7 @@ function html_debug(){
print '</pre>';
if (function_exists('apache_get_version')) {
+ $apache = array();
$apache['version'] = apache_get_version();
if (function_exists('apache_get_modules')) {
@@ -2077,6 +2144,9 @@ function html_resendpwd() {
* Return the TOC rendered to XHTML
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $toc
+ * @return string html
*/
function html_TOC($toc){
if(!count($toc)) return '';
@@ -2095,6 +2165,9 @@ function html_TOC($toc){
/**
* Callback for html_buildlist
+ *
+ * @param array $item
+ * @return string html
*/
function html_list_toc($item){
if(isset($item['hid'])){
@@ -2129,6 +2202,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){
* Triggers an event with the form name: HTML_{$name}FORM_OUTPUT
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
* @param string $name The name of the form
* @param Doku_Form $form The form
*/
@@ -2141,6 +2215,7 @@ function html_form($name, &$form) {
/**
* Form print function.
* Just calls printForm() on the data object.
+ *
* @param Doku_Form $data The form
*/
function html_form_output($data) {
diff --git a/inc/httputils.php b/inc/httputils.php
index efeb2a56c..ac79aa176 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -15,6 +15,7 @@ define('HTTP_CHUNK_SIZE',16*1024);
*
* @author Simon Willison <swillison@gmail.com>
* @link http://simonwillison.net/2003/Apr/23/conditionalGet/
+ *
* @param int $timestamp lastmodified time of the cache file
* @returns void or exits with previously header() commands executed
*/
@@ -64,6 +65,7 @@ function http_conditionalRequest($timestamp){
* Let the webserver send the given file via x-sendfile method
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
* @param string $file absolute path of file to send
* @returns void or exits with previous header() commands executed
*/
@@ -190,6 +192,9 @@ function http_rangeRequest($fh,$size,$mime){
* (samepath/samefilename.sameext.gz) created after the uncompressed file
*
* @author Chris Smith <chris.eureka@jalakai.co.uk>
+ *
+ * @param string $uncompressed_file
+ * @return bool
*/
function http_gzip_valid($uncompressed_file) {
$gzip = $uncompressed_file.'.gz';
@@ -206,6 +211,9 @@ function http_gzip_valid($uncompressed_file) {
* This function handles output of cacheable resource files. It ses the needed
* HTTP headers. If a useable cache is present, it is passed to the web server
* and the script is terminated.
+ *
+ * @param string $cache cache file name
+ * @param bool $cache_ok if cache can be used
*/
function http_cached($cache, $cache_ok) {
global $conf;
@@ -235,6 +243,9 @@ function http_cached($cache, $cache_ok) {
/**
* Cache content and print it
+ *
+ * @param string $file file name
+ * @param string $content
*/
function http_cached_finish($file, $content) {
global $conf;
diff --git a/inc/indexer.php b/inc/indexer.php
index 5ca2f0bb1..014c5c5eb 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -61,6 +61,8 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')');
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
+ *
+ * @return int|string
*/
function idx_get_version(){
static $indexer_version = null;
@@ -84,6 +86,9 @@ function idx_get_version(){
* Differs from strlen in handling of asian characters.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $w
+ * @return int
*/
function wordlen($w){
$l = strlen($w);
@@ -115,7 +120,8 @@ class Doku_Indexer {
*
* @param string $page a page name
* @param string $text the body of the page
- * @return boolean the function completed successfully
+ * @return string|boolean the function completed successfully
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -190,6 +196,7 @@ class Doku_Indexer {
*
* @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>
@@ -245,7 +252,8 @@ class Doku_Indexer {
* @param string $page a page name
* @param mixed $key a key string or array of key=>value pairs
* @param mixed $value the value or list of values
- * @return boolean the function completed successfully
+ * @return boolean|string the function completed successfully
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
*/
@@ -453,7 +461,8 @@ class Doku_Indexer {
* Erases entries in all known indexes.
*
* @param string $page a page name
- * @return boolean the function completed successfully
+ * @return string|boolean the function completed successfully
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function deletePage($page) {
@@ -474,6 +483,7 @@ class Doku_Indexer {
*
* @param string $page a page name
* @return boolean the function completed successfully
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function deletePageNoLock($page) {
@@ -568,6 +578,7 @@ class Doku_Indexer {
* @param string $text plain text
* @param boolean $wc are wildcards allowed?
* @return array list of words in the text
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -676,6 +687,7 @@ class Doku_Indexer {
*
* @param array $tokens list of words to search for
* @return array list of page names with usage counts
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -730,6 +742,7 @@ class Doku_Indexer {
* @param string $value search term to look for, must be a string or array of strings
* @param callback $func comparison function
* @return array lists with page names, keys are query values if $value is array
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Michael Hamann <michael@content-space.de>
*/
@@ -829,6 +842,7 @@ class Doku_Indexer {
* @param array $words The query terms.
* @param array $result Set to word => array("length*id" ...)
* @return array Set to length => array(id ...)
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function getIndexWords(&$words, &$result) {
@@ -909,6 +923,7 @@ class Doku_Indexer {
*
* @param string $key list only pages containing the metadata key (optional)
* @return array list of page names
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function getPages($key=null) {
@@ -942,6 +957,7 @@ class Doku_Indexer {
* @param int $minlen minimum length of words to count
* @param string $key metadata key to list. Uses the fulltext index if not given
* @return array list of words as the keys and frequency as values
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
public function histogram($min=1, $max=0, $minlen=3, $key=null) {
@@ -1002,6 +1018,8 @@ class Doku_Indexer {
* Lock the indexer.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @return bool|string
*/
protected function lock() {
global $conf;
@@ -1033,6 +1051,8 @@ class Doku_Indexer {
* Release the indexer lock.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @return bool
*/
protected function unlock() {
global $conf;
@@ -1050,6 +1070,7 @@ class Doku_Indexer {
* @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>
*/
protected function getIndex($idx, $suffix) {
@@ -1066,6 +1087,7 @@ class Doku_Indexer {
* @param string $suffix subpart identifier
* @param array $lines list of lines without LF
* @return bool If saving succeeded
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function saveIndex($idx, $suffix, &$lines) {
@@ -1090,6 +1112,7 @@ class Doku_Indexer {
* @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>
*/
protected function getIndexKey($idx, $suffix, $id) {
@@ -1114,6 +1137,7 @@ class Doku_Indexer {
* @param int $id the line number
* @param string $line line to write
* @return bool If saving succeeded
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function saveIndexKey($idx, $suffix, $id, $line) {
@@ -1155,6 +1179,7 @@ class Doku_Indexer {
* @param string $suffix subpart identifier
* @param string $value line to find in the index
* @return int|bool line number of the value in the index or false if writing the index failed
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
protected function addIndexKey($idx, $suffix, $value) {
@@ -1178,6 +1203,8 @@ class Doku_Indexer {
* a sorted array of lengths of the words used in the wiki.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
+ *
+ * @return array
*/
protected function listIndexLengths() {
return idx_listIndexLengths();
@@ -1190,6 +1217,9 @@ class Doku_Indexer {
* that there are indices for.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
+ *
+ * @param array|int $filter
+ * @return array
*/
protected function indexLengths($filter) {
global $conf;
@@ -1216,6 +1246,11 @@ class Doku_Indexer {
* Insert or replace a tuple in a line.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $line
+ * @param string|int $id
+ * @param int $count
+ * @return string
*/
protected function updateTuple($line, $id, $count) {
if ($line != ''){
@@ -1237,6 +1272,10 @@ class Doku_Indexer {
*
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $keys
+ * @param string $line
+ * @return array
*/
protected function parseTuples(&$keys, $line) {
$result = array();
@@ -1257,13 +1296,16 @@ class Doku_Indexer {
* Sum the counts in a list of tuples.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $line
+ * @return int
*/
protected function countTuples($line) {
$freq = 0;
$parts = explode(':', $line);
foreach ($parts as $tuple) {
if ($tuple === '') continue;
- list($pid, $cnt) = explode('*', $tuple);
+ list(/* $pid */, $cnt) = explode('*', $tuple);
$freq += (int)$cnt;
}
return $freq;
@@ -1273,7 +1315,8 @@ class Doku_Indexer {
/**
* Create an instance of the indexer.
*
- * @return Doku_Indexer a Doku_Indexer
+ * @return Doku_Indexer a Doku_Indexer
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_get_indexer() {
@@ -1288,6 +1331,7 @@ function idx_get_indexer() {
* Returns words that will be ignored.
*
* @return array list of stop words
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function & idx_get_stopwords() {
@@ -1312,7 +1356,8 @@ function & idx_get_stopwords() {
* @param string $page name of the page to index
* @param boolean $verbose print status messages
* @param boolean $force force reindexing even when the index is up to date
- * @return boolean the function completed successfully
+ * @return string|boolean the function completed successfully
+ *
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_addPage($page, $verbose=false, $force=false) {
@@ -1441,6 +1486,10 @@ function idx_tokenizer($string, $wc=false) {
* Read the list of words in an index (if it exists).
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $idx
+ * @param string $suffix
+ * @return array
*/
function idx_getIndex($idx, $suffix) {
global $conf;
@@ -1456,6 +1505,8 @@ function idx_getIndex($idx, $suffix) {
* a sorted array of lengths of the words used in the wiki.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
+ *
+ * @return array
*/
function idx_listIndexLengths() {
global $conf;
@@ -1510,6 +1561,9 @@ function idx_listIndexLengths() {
* that there are indices for.
*
* @author YoBoY <yoboy.leguesh@gmail.com>
+ *
+ * @param array|int $filter
+ * @return array
*/
function idx_indexLengths($filter) {
global $conf;
@@ -1539,6 +1593,9 @@ function idx_indexLengths($filter) {
* not a letter, number, or underscore.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $name
+ * @return string
*/
function idx_cleanName($name) {
$name = utf8_romanize(trim((string)$name));
diff --git a/inc/infoutils.php b/inc/infoutils.php
index f9ba11560..399963176 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -20,27 +20,28 @@ function checkUpdateMessages(){
if(!$conf['updatecheck']) return;
if($conf['useacl'] && !$INFO['ismanager']) return;
- $cf = $conf['cachedir'].'/messages.txt';
+ $cf = getCacheName($updateVersion, '.updmsg');
$lm = @filemtime($cf);
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
@touch($cf);
- dbglog("checkUpdateMessages(): downloading messages.txt");
+ dbglog("checkUpdateMessages(): downloading messages to ".$cf);
$http = new DokuHTTPClient();
$http->timeout = 12;
- $data = $http->get(DOKU_MESSAGEURL.$updateVersion);
- if(substr(trim($data), -1) != '%') {
- // this doesn't look like one of our messages, maybe some WiFi login interferred
- $data = '';
- }else {
- io_saveFile($cf,$data);
+ $resp = $http->get(DOKU_MESSAGEURL.$updateVersion);
+ if(is_string($resp) && ($resp == "" || substr(trim($resp), -1) == '%')) {
+ // basic sanity check that this is either an empty string response (ie "no messages")
+ // or it looks like one of our messages, not WiFi login or other interposed response
+ io_saveFile($cf,$resp);
+ } else {
+ dbglog("checkUpdateMessages(): unexpected HTTP response received");
}
}else{
- dbglog("checkUpdateMessages(): messages.txt up to date");
- $data = io_readFile($cf);
+ dbglog("checkUpdateMessages(): messages up to date");
}
+ $data = io_readFile($cf);
// show messages through the usual message mechanism
$msgs = explode("\n%\n",$data);
foreach($msgs as $msg){
@@ -113,13 +114,13 @@ function check(){
if ($INFO['isadmin'] || $INFO['ismanager']){
msg('DokuWiki version: '.getVersion(),1);
- if(version_compare(phpversion(),'5.2.0','<')){
- msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
+ if(version_compare(phpversion(),'5.3.3','<')){
+ msg('Your PHP version is too old ('.phpversion().' vs. 5.3.3+ needed)',-1);
}else{
msg('PHP version '.phpversion(),1);
}
} else {
- if(version_compare(phpversion(),'5.2.0','<')){
+ if(version_compare(phpversion(),'5.3.3','<')){
msg('Your PHP version is too old',-1);
}
}
@@ -296,6 +297,7 @@ define('MSG_ADMINS_ONLY',4);
*/
function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
global $MSG, $MSG_shown;
+ $errors = array();
$errors[-1] = 'error';
$errors[0] = 'info';
$errors[1] = 'success';
@@ -452,7 +454,7 @@ function dbg_backtrace(){
}elseif(is_array($arg)){
$params[] = '[Array]';
}elseif(is_null($arg)){
- $param[] = '[NULL]';
+ $params[] = '[NULL]';
}else{
$params[] = (string) '"'.$arg.'"';
}
diff --git a/inc/init.php b/inc/init.php
index df38326c0..12bb6f588 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -178,14 +178,6 @@ $_REQUEST = array_merge($_GET,$_POST);
// we don't want a purge URL to be digged
if(isset($_REQUEST['purge']) && !empty($_SERVER['HTTP_REFERER'])) unset($_REQUEST['purge']);
-// disable gzip if not available
-if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
- $conf['compression'] = 'gz';
-}
-if($conf['compression'] == 'gz' && !function_exists('gzopen')){
- $conf['compression'] = 0;
-}
-
// precalculate file creation modes
init_creationmodes();
@@ -201,6 +193,14 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con
// load libraries
require_once(DOKU_INC.'inc/load.php');
+// disable gzip if not available
+if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
+ $conf['compression'] = 'gz';
+}
+if($conf['compression'] == 'gz' && !function_exists('gzopen')){
+ $conf['compression'] = 0;
+}
+
// input handle class
global $INPUT;
$INPUT = new Input();
@@ -259,17 +259,33 @@ function init_paths(){
$conf['media_changelog'] = $conf['metadir'].'/_media.changes';
}
+/**
+ * Load the language strings
+ *
+ * @param string $langCode language code, as passed by event handler
+ */
function init_lang($langCode) {
//prepare language array
- global $lang;
+ global $lang, $config_cascade;
$lang = array();
//load the language files
require(DOKU_INC.'inc/lang/en/lang.php');
+ foreach ($config_cascade['lang']['core'] as $config_file) {
+ if (@file_exists($config_file . 'en/lang.php')) {
+ include($config_file . 'en/lang.php');
+ }
+ }
+
if ($langCode && $langCode != 'en') {
if (file_exists(DOKU_INC."inc/lang/$langCode/lang.php")) {
require(DOKU_INC."inc/lang/$langCode/lang.php");
}
+ foreach ($config_cascade['lang']['core'] as $config_file) {
+ if (@file_exists($config_file . "$langCode/lang.php")) {
+ include($config_file . "$langCode/lang.php");
+ }
+ }
}
}
@@ -456,10 +472,6 @@ function getBaseURL($abs=null){
$port = '';
}
- if(!$port && isset($_SERVER['SERVER_PORT'])) {
- $port = $_SERVER['SERVER_PORT'];
- }
-
if(is_null($port)){
$port = '';
}
@@ -490,6 +502,14 @@ function getBaseURL($abs=null){
* @returns bool true when SSL is active
*/
function is_ssl(){
+ // check if we are behind a reverse proxy
+ if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
+ if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
+ return true;
+ } else {
+ return false;
+ }
+ }
if (!isset($_SERVER['HTTPS']) ||
preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){
return false;
diff --git a/inc/io.php b/inc/io.php
index 27a34b045..bfa394a17 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -20,6 +20,7 @@ if(!defined('DOKU_INC')) die('meh.');
* @param string $id - a pageid, the namespace of that id will be tried to deleted
* @param string $basedir - the config name of the type to delete (datadir or mediadir usally)
* @return bool - true if at least one namespace was deleted
+ *
* @author Andreas Gohr <andi@splitbrain.org>
* @author Ben Coburn <btcoburn@silicodon.net>
*/
@@ -60,6 +61,11 @@ function io_sweepNS($id,$basedir='datadir'){
* $data[3] rev: The page revision, false for current wiki pages.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $file filename
+ * @param string $id page id
+ * @param bool|int $rev revision timestamp
+ * @return string
*/
function io_readWikiPage($file, $id, $rev=false) {
if (empty($rev)) { $rev = false; }
@@ -69,7 +75,11 @@ function io_readWikiPage($file, $id, $rev=false) {
/**
* Callback adapter for io_readFile().
+ *
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param array $data event data
+ * @return string
*/
function _io_readWikiPage_action($data) {
if (is_array($data) && is_array($data[0]) && count($data[0])===2) {
@@ -88,6 +98,10 @@ function _io_readWikiPage_action($data) {
* be sure to set $clean to false!
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename
+ * @param bool $clean
+ * @return string
*/
function io_readFile($file,$clean=true){
$ret = '';
@@ -108,9 +122,12 @@ function io_readFile($file,$clean=true){
}
/**
* Returns the content of a .bz2 compressed file as string
+ *
* @author marcel senf <marcel@rucksackreinigung.de>
+ *
+ * @param string $file filename
+ * @return string content
*/
-
function bzfile($file){
$bz = bzopen($file,"r");
$str = '';
@@ -138,6 +155,12 @@ function bzfile($file){
* $data[3] rev: The page revision, false for current wiki pages.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $file filename
+ * @param string $content
+ * @param string $id page id
+ * @param int|bool $rev timestamp of revision
+ * @return bool
*/
function io_writeWikiPage($file, $content, $id, $rev=false) {
if (empty($rev)) { $rev = false; }
@@ -149,6 +172,9 @@ function io_writeWikiPage($file, $content, $id, $rev=false) {
/**
* Callback adapter for io_saveFile().
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param array $data event data
+ * @return bool
*/
function _io_writeWikiPage_action($data) {
if (is_array($data) && is_array($data[0]) && count($data[0])===3) {
@@ -168,7 +194,11 @@ function _io_writeWikiPage_action($data) {
* and bz2 if extension is .bz2
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @return bool true on success
+ *
+ * @param string $file filename path to file
+ * @param string $content
+ * @param bool $append
+ * @return bool true on success, otherwise false
*/
function io_saveFile($file,$content,$append=false){
global $conf;
@@ -221,6 +251,10 @@ function io_saveFile($file,$content,$append=false){
* 2005-10-14 : added regex option -- Christopher Smith <chris@jalakai.co.uk>
*
* @author Steven Danz <steven-danz@kc.rr.com>
+ *
+ * @param string $file filename
+ * @param string $badline exact linematch to remove
+ * @param bool $regex use regexp?
* @return bool true on success
*/
function io_deleteFromFile($file,$badline,$regex=false){
@@ -285,6 +319,8 @@ function io_deleteFromFile($file,$badline,$regex=false){
* the lock is assumed to be stale and the function goes on
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename
*/
function io_lock($file){
global $conf;
@@ -311,6 +347,8 @@ function io_lock($file){
* Unlocks a file
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename
*/
function io_unlock($file){
global $conf;
@@ -331,6 +369,9 @@ function io_unlock($file){
* $data[1] ns_type: 'pages' or 'media' namespace tree.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @param string $id page id
+ * @param string $ns_type 'pages' or 'media'
*/
function io_createNamespace($id, $ns_type='pages') {
// verify ns_type
@@ -365,6 +406,8 @@ function io_createNamespace($id, $ns_type='pages') {
* Create the directory needed for the given file
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file file name
*/
function io_makeFileDir($file){
$dir = dirname($file);
@@ -379,6 +422,9 @@ function io_makeFileDir($file){
* @link http://www.php.net/manual/en/function.mkdir.php
* @author <saint@corenova.com>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $target filename
+ * @return bool|int|string
*/
function io_mkdir_p($target){
global $conf;
@@ -454,6 +500,9 @@ function io_rmdir($path, $removefiles = false) {
* This is used when the safemode workaround is enabled
*
* @author <andi@splitbrain.org>
+ *
+ * @param string $dir name of the new directory
+ * @return false|string
*/
function io_mkdir_ftp($dir){
global $conf;
@@ -488,6 +537,8 @@ function io_mkdir_ftp($dir){
* its path.
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @return false|string path to new directory or false
*/
function io_mktmpdir() {
global $conf;
@@ -516,6 +567,13 @@ function io_mktmpdir() {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $url url to download
+ * @param string $file path to file or directory where to save
+ * @param bool $useAttachment if true: try to use name of download, uses otherwise $defaultName, false: uses $file as path to file
+ * @param string $defaultName fallback for if using $useAttachment
+ * @param int $maxSize maximum file size
+ * @return bool|string if failed false, otherwise true or the name of the file in the given dir
*/
function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){
global $conf;
@@ -563,6 +621,10 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20
*
* rename() can not overwrite existing files on Windows
* this function will use copy/unlink instead
+ *
+ * @param string $from
+ * @param string $to
+ * @return bool succes or fail
*/
function io_rename($from,$to){
global $conf;
@@ -582,6 +644,11 @@ function io_rename($from,$to){
* Returns the exit code from the process.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
+ * @param string $cmd
+ * @param string $input input pipe
+ * @param string $output output pipe
+ * @return int exit code from process
*/
function io_exec($cmd, $input, &$output){
$descspec = array(
diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php
index a63e1ed44..50984e630 100644
--- a/inc/lang/ar/lang.php
+++ b/inc/lang/ar/lang.php
@@ -9,6 +9,7 @@
* @author uahello@gmail.com
* @author Ahmad Abd-Elghany <tolpa1@gmail.com>
* @author alhajr <alhajr300@gmail.com>
+ * @author Mohamed Belhsine <b.mohamed897@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'rtl';
@@ -53,6 +54,8 @@ $lang['btn_register'] = 'سجّل';
$lang['btn_apply'] = 'طبق';
$lang['btn_media'] = 'مدير الوسائط';
$lang['btn_deleteuser'] = 'احذف حسابي الخاص';
+$lang['btn_img_backto'] = 'عودة إلى %s';
+$lang['btn_mediaManager'] = 'اعرض في مدير الوسائط';
$lang['loggedinas'] = 'داخل باسم:';
$lang['user'] = 'اسم المستخدم';
$lang['pass'] = 'كلمة السر';
@@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'عذراً,كلمة السر غير صحيحة
$lang['minoredit'] = 'تعديلات طفيفة';
$lang['draftdate'] = 'حفظ المسودات آليا مفعّل';
$lang['nosecedit'] = 'غُيرت الصفحة في هذه الأثناء، معلومات الجزء اصبحت قديمة. حُمُلت كل الصفحة بدلا.';
+$lang['searchcreatepage'] = 'إن لم تجد ما تبحث عنه، يمكنك إنشاء صفحة جديدة بعنوان ما تبحث عنة بالضغط على زر "حرر هذه الصفحة".';
$lang['regmissing'] = 'عذرا، عليك ملء جميع الحقول.';
$lang['reguexists'] = 'عذرا، يوجد مشترك بنفس الاسم.';
$lang['regsuccess'] = 'أنشئ المستخدم و ارسلت كلمة السر بالبريد.';
@@ -86,6 +90,7 @@ $lang['profdeleteuser'] = 'احذف حساب';
$lang['profdeleted'] = 'حسابك الخاص تم حذفه من هذه الموسوعة';
$lang['profconfdelete'] = 'أنا أرغب في حذف حسابي من هذه الموسوعة.<br/>
هذا الحدث غير ممكن.';
+$lang['profconfdeletemissing'] = 'لم تقم بوضع علامة في مربع التأكيد';
$lang['pwdforget'] = 'أنسيت كلمة السر؟ احصل على واحدة جديدة';
$lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.';
$lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ';
@@ -183,6 +188,11 @@ $lang['difflink'] = 'رابط إلى هذه المقارنة';
$lang['diff_type'] = 'أظهر الفروق:';
$lang['diff_inline'] = 'ضمنا';
$lang['diff_side'] = 'جنبا إلى جنب';
+$lang['diffprevrev'] = 'المراجعة السابقة';
+$lang['diffnextrev'] = 'المراجعة التالية';
+$lang['difflastrev'] = 'المراجعة الأخيرة';
+$lang['diffbothprevrev'] = 'جانبي المراجعة السابقة';
+$lang['diffbothnextrev'] = 'جانبي المراجعة التالية';
$lang['line'] = 'سطر';
$lang['breadcrumb'] = 'أثر:';
$lang['youarehere'] = 'أنت هنا:';
@@ -239,7 +249,6 @@ $lang['admin_register'] = 'أضف مستخدما جديدا';
$lang['metaedit'] = 'تحرير البيانات الشمولية ';
$lang['metasaveerr'] = 'فشلت كتابة البيانات الشمولية';
$lang['metasaveok'] = 'حُفظت البيانات الشمولية';
-$lang['btn_img_backto'] = 'عودة إلى %s';
$lang['img_title'] = 'العنوان:';
$lang['img_caption'] = 'وصف:';
$lang['img_date'] = 'التاريخ:';
@@ -252,7 +261,6 @@ $lang['img_camera'] = 'الكمرا:';
$lang['img_keywords'] = 'كلمات مفتاحية:';
$lang['img_width'] = 'العرض:';
$lang['img_height'] = 'الإرتفاع:';
-$lang['btn_mediaManager'] = 'اعرض في مدير الوسائط';
$lang['subscr_subscribe_success'] = 'اضيف %s لقائمة اشتراك %s';
$lang['subscr_subscribe_error'] = 'خطأ في إضافة %s لقائمة اشتراك %s';
$lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك';
@@ -287,6 +295,7 @@ $lang['i_phpver'] = 'نسخة PHP التي لديك هي
وهي أقل من النسخة المطلوبة
<code>%s</code>
عليك تحديث نسخة PHP';
+$lang['i_mbfuncoverload'] = 'يجب ايقاف تشغيل mbstring.func_overload في ملف php.ini لتشغيل دوكوويكي.';
$lang['i_permfail'] = 'إن <code>%s</code> غير قابل للكتابة بواسطة دوكو ويكي، عليك تعديل إعدادات الصلاحيات لهذا المجلد!';
$lang['i_confexists'] = 'إن <code>%s</code> موجود أصلاً';
$lang['i_writeerr'] = 'لا يمكن إنشاء <code>%s</code>، عليك التأكد من صلاحيات الملف أو المجلد وإنشاء الملف يدوياً.';
@@ -340,4 +349,5 @@ $lang['media_update'] = 'ارفع إصدارا أحدث';
$lang['media_restore'] = 'استرجع هذه النسخة';
$lang['currentns'] = 'مساحة الاسم الحالية';
$lang['searchresult'] = 'نتيجة البحث';
+$lang['plainhtml'] = 'نص HTML غير منسق';
$lang['wikimarkup'] = 'علامات الوكي';
diff --git a/inc/lang/ar/searchpage.txt b/inc/lang/ar/searchpage.txt
index 62c05f5e4..56355f85f 100644
--- a/inc/lang/ar/searchpage.txt
+++ b/inc/lang/ar/searchpage.txt
@@ -1,5 +1,5 @@
====== بحث ======
-نتائج البحث . إن لم تجد ما تبحث عنه، يمكنك إنشاء صفحة جديدة بعنوان ما تبحث عنة بالضغط على زر "حرر هذه الصفحة".
+نتائج البحث . @CREATEPAGEINFO@
===== نتائج البحث ===== \ No newline at end of file
diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php
index 5edcfbe58..bcec31dae 100644
--- a/inc/lang/az/lang.php
+++ b/inc/lang/az/lang.php
@@ -58,6 +58,7 @@ $lang['badlogin'] = 'Təssüf ki istifadəçi adı və ya şifrə s
$lang['minoredit'] = 'Az dəyişiklər';
$lang['draftdate'] = 'Qaralama yadda saxlandı';
$lang['nosecedit'] = 'Bu vaxt ərzində səhifə dəyişilmişdir, və bölmə haqqında məlumat köhnəlmişdir. Səhifənin tam versiyası yüklənmişdir.';
+$lang['searchcreatepage'] = "Əgər Siz axtardığınızı tapa bilmədinizsə, onda Siz adı axtarışınız ilə uyğun düşən yeni səhifə yarada bilərsiniz. Bunu eləmək üçün, sadəcə ''Səhifəni yarat'' düyməsini sıxın.";
$lang['regmissing'] = 'Təssüf ki Siz bütün xanələri doldurmalısınız.';
$lang['reguexists'] = 'Təssüf ki bu ad ilə istifadəçi artıq mövcuddur.';
$lang['regsuccess'] = 'İstivadəci yaradıldı və şifrə sizin e-maila göndərildi.';
diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt
index 4f8efe007..6b7fce754 100644
--- a/inc/lang/az/searchpage.txt
+++ b/inc/lang/az/searchpage.txt
@@ -1,5 +1,5 @@
====== Axtarış ======
-Qarşınızda - axtarışın nəticələridir. Əgər Siz axtardığınızı tapa bilmədinizsə, onda Siz adı axtarışınız ilə uyğun düşən yeni səhifə yarada bilərsiniz. Bunu eləmək üçün, sadəcə ''Səhifəni yarat'' düyməsini sıxın.
+Qarşınızda - axtarışın nəticələridir. @CREATEPAGEINFO@
===== Nəticələr =====
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index bfa8b2ad7..cfacd09aa 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -66,6 +66,7 @@ $lang['badpassconfirm'] = 'За съжаление паролата е г
$lang['minoredit'] = 'Промените са незначителни';
$lang['draftdate'] = 'Черновата е автоматично записана на';
$lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.';
+$lang['searchcreatepage'] = 'Ако не намирате каквото сте търсили, може да създадете или редактирате страница, кръстена на вашата заявка, чрез съответния бутон.';
$lang['regmissing'] = 'Моля, попълнете всички полета.';
$lang['reguexists'] = 'Вече съществува потребител с избраното име.';
$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.';
diff --git a/inc/lang/bg/searchpage.txt b/inc/lang/bg/searchpage.txt
index 48d47515a..a44c648ca 100644
--- a/inc/lang/bg/searchpage.txt
+++ b/inc/lang/bg/searchpage.txt
@@ -1,5 +1,5 @@
====== Търсене ======
-Резултата от търсенето ще намерите по-долу. Ако не намирате каквото сте търсили, може да създадете или редактирате страница, кръстена на вашата заявка, чрез съответния бутон.
+Резултата от търсенето ще намерите по-долу. @CREATEPAGEINFO@
===== Резултати =====
diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php
index 98607d322..3a4e30923 100644
--- a/inc/lang/ca-valencia/lang.php
+++ b/inc/lang/ca-valencia/lang.php
@@ -59,6 +59,7 @@ $lang['badlogin'] = 'Disculpe, pero el nom d\'usuari o la contrasen
$lang['minoredit'] = 'Canvis menors';
$lang['draftdate'] = 'Borrador gravat el';
$lang['nosecedit'] = 'La pàgina ha canviat mentres tant, l\'informació de la secció no estava al dia, s\'ha carregat la pàgina sancera.';
+$lang['searchcreatepage'] = 'Si no ha trobat lo que buscava pot crear o editar una pàgina en el mateix nom que el text que ha buscat utilisant el botó corresponent.';
$lang['regmissing'] = 'Disculpe, pero deu omplir tots els camps.';
$lang['reguexists'] = 'Disculpe, pero ya existix un usuari en este nom.';
$lang['regsuccess'] = 'S\'ha creat l\'usuari i se li ha enviat la contrasenya per correu electrònic.';
diff --git a/inc/lang/ca-valencia/searchpage.txt b/inc/lang/ca-valencia/searchpage.txt
index 80f7e9119..7ed3cd2af 100644
--- a/inc/lang/ca-valencia/searchpage.txt
+++ b/inc/lang/ca-valencia/searchpage.txt
@@ -1,5 +1,5 @@
====== Buscar ======
-Pot vore els resultats de la busca ací avall. Si no ha trobat lo que buscava pot crear o editar una pàgina en el mateix nom que el text que ha buscat utilisant el botó corresponent.
+Pot vore els resultats de la busca ací avall. @CREATEPAGEINFO@
===== Resultats =====
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index 00d28083c..31c16ee23 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -62,6 +62,7 @@ $lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.';
$lang['minoredit'] = 'Canvis menors';
$lang['draftdate'] = 'L\'esborrany s\'ha desat automàticament';
$lang['nosecedit'] = 'Mentrestant la pàgina ha estat modificada. La informació de seccions estava obsoleta i ha calgut carregar la pàgina sencera.';
+$lang['searchcreatepage'] = "Si no trobeu allò que buscàveu, podeu crear una pàgina nova per mitjà del botó ''Edita aquesta pàgina''.";
$lang['regmissing'] = 'Heu d\'omplir tots els camps.';
$lang['reguexists'] = 'Ja existeix un altre usuari amb aquest nom.';
$lang['regsuccess'] = 'S\'ha creat l\'usuari. La contrasenya s\'ha enviat per correu.';
diff --git a/inc/lang/ca/searchpage.txt b/inc/lang/ca/searchpage.txt
index bf69aef15..27efcdabf 100644
--- a/inc/lang/ca/searchpage.txt
+++ b/inc/lang/ca/searchpage.txt
@@ -1,5 +1,5 @@
====== Cerca ======
-Heus ací els resultats de la cerca. Si no trobeu allò que buscàveu, podeu crear una pàgina nova per mitjà del botó ''Edita aquesta pàgina''.
+Heus ací els resultats de la cerca. @CREATEPAGEINFO@
===== Resultats ===== \ No newline at end of file
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index fa0a65044..1dd4def5a 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -17,6 +17,8 @@
* @author Zbyněk Křivka <krivka@fit.vutbr.cz>
* @author Petr Klíma <qaxi@seznam.cz>
* @author Radovan Buroň <radovan@buron.cz>
+ * @author Viktor Zavadil <vzavadil@newps.cz>
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -49,7 +51,7 @@ $lang['btn_delete'] = 'Vymazat';
$lang['btn_back'] = 'Zpět';
$lang['btn_backlink'] = 'Zpětné odkazy';
$lang['btn_backtomedia'] = 'Zpět do Výběru dokumentu';
-$lang['btn_subscribe'] = 'Odebírat emailem změny stránky';
+$lang['btn_subscribe'] = 'Odebírat e-mailem změny stránky';
$lang['btn_profile'] = 'Upravit profil';
$lang['btn_reset'] = 'Reset';
$lang['btn_resendpwd'] = 'Nastavit nové heslo';
@@ -68,7 +70,7 @@ $lang['user'] = 'Uživatelské jméno';
$lang['pass'] = 'Heslo';
$lang['newpass'] = 'Nové heslo';
$lang['oldpass'] = 'Současné heslo';
-$lang['passchk'] = 'ještě jednou';
+$lang['passchk'] = 'Zopakovat';
$lang['remember'] = 'Přihlásit se nastálo';
$lang['fullname'] = 'Celé jméno';
$lang['email'] = 'E-mail';
@@ -78,18 +80,19 @@ $lang['badpassconfirm'] = 'Bohužel špatné heslo';
$lang['minoredit'] = 'Drobné změny';
$lang['draftdate'] = 'Koncept automaticky uložen v';
$lang['nosecedit'] = 'Stránka byla v mezičase změněna. Informace o sekci již nebylo platné, byla načtena celá stránka.';
+$lang['searchcreatepage'] = 'Pokud jste nenašli, co hledáte, zkuste požadovanou stránku sami vytvořit stisknutím tlačítka \'\'Vytvořit stránku\'\'.';
$lang['regmissing'] = 'Musíte vyplnit všechny údaje.';
$lang['reguexists'] = 'Uživatel se stejným jménem už je zaregistrován.';
-$lang['regsuccess'] = 'Uživatelský účet byl vytvořen a heslo zasláno mailem.';
+$lang['regsuccess'] = 'Uživatelský účet byl vytvořen a heslo zasláno e-mailem.';
$lang['regsuccess2'] = 'Uživatelský účet byl vytvořen.';
$lang['regmailfail'] = 'Zdá se, že nastala chyba při posílání mailu s heslem. Zkuste kontaktovat správce.';
-$lang['regbadmail'] = 'Zadaná mailová adresa není platná. Pokud si myslíte, že to je špatně, zkuste kontaktovat správce.';
+$lang['regbadmail'] = 'Zadaná e-mailová adresa není platná. Pokud si myslíte, že to je špatně, zkuste kontaktovat správce.';
$lang['regbadpass'] = 'Heslo nebylo zadáno dvakrát stejně, zkuste to prosím znovu.';
$lang['regpwmail'] = 'Vaše heslo do systému DokuWiki';
$lang['reghere'] = 'Nemáte uživatelský účet? Zřiďte si ho';
$lang['profna'] = 'Tato wiki neumožňuje změnu profilu';
$lang['profnochange'] = 'Žádné změny nebyly provedeny.';
-$lang['profnoempty'] = 'Nelze zadat prázdné jméno nebo mailová adresa.';
+$lang['profnoempty'] = 'Nelze vynechat jméno nebo e-mailovou adresu.';
$lang['profchanged'] = 'Uživatelský profil změněn.';
$lang['profnodelete'] = 'Tato wiki nepodporuje mazání uživatelů';
$lang['profdeleteuser'] = 'Smazat účet';
@@ -102,8 +105,8 @@ $lang['resendpwd'] = 'Nastavit nové heslo pro';
$lang['resendpwdmissing'] = 'Musíte vyplnit všechny položky.';
$lang['resendpwdnouser'] = 'Bohužel takový uživatel v systému není.';
$lang['resendpwdbadauth'] = 'Autorizační kód není platný. Zadali jste opravdu celý odkaz na potvrzovací stránku?';
-$lang['resendpwdconfirm'] = 'Odkaz na potvrzovací stránku byl odeslán mailem.';
-$lang['resendpwdsuccess'] = 'Vaše nové heslo bylo odesláno emailem.';
+$lang['resendpwdconfirm'] = 'Odkaz na potvrzovací stránku byl odeslán e-mailem.';
+$lang['resendpwdsuccess'] = 'Vaše nové heslo bylo odesláno e-mailem.';
$lang['license'] = 'Kromě míst, kde je explicitně uvedeno jinak, je obsah této wiki licencován pod následující licencí:';
$lang['licenseok'] = 'Poznámka: Tím, že editujete tuto stránku, souhlasíte, aby váš obsah byl licencován pod následující licencí:';
$lang['searchmedia'] = 'Hledat jméno souboru:';
@@ -194,6 +197,11 @@ $lang['difflink'] = 'Odkaz na výstup diff';
$lang['diff_type'] = 'Zobrazit rozdíly:';
$lang['diff_inline'] = 'Vložené';
$lang['diff_side'] = 'Přidané';
+$lang['diffprevrev'] = 'Předchozí verze';
+$lang['diffnextrev'] = 'Následující verze';
+$lang['difflastrev'] = 'Poslední revize';
+$lang['diffbothprevrev'] = 'Obě strany předchozí revize';
+$lang['diffbothnextrev'] = 'Obě strany příští revize';
$lang['line'] = 'Řádek';
$lang['breadcrumb'] = 'Historie:';
$lang['youarehere'] = 'Umístění:';
@@ -270,14 +278,14 @@ $lang['subscr_unsubscribe_error'] = 'Došlo k chybě při odhlašování %s ze s
$lang['subscr_already_subscribed'] = '%s již je přihlášen do seznamu odběratelů %s';
$lang['subscr_not_subscribed'] = '%s není přihlášen do seznamu odběratelů %s';
$lang['subscr_m_not_subscribed'] = 'V současné době neodebíráte změny na aktuální stránce nebo ve jmenném prostoru.';
-$lang['subscr_m_new_header'] = 'Přihlásit k odebírání změn emailem';
+$lang['subscr_m_new_header'] = 'Přihlásit k odebírání změn e-mailem';
$lang['subscr_m_current_header'] = 'Aktuální odběratelé změn';
-$lang['subscr_m_unsubscribe'] = 'Odhlásit z odběru změn emailem';
-$lang['subscr_m_subscribe'] = 'Přihlásit se k odběru změn emailem';
+$lang['subscr_m_unsubscribe'] = 'Odhlásit z odběru změn e-mailem';
+$lang['subscr_m_subscribe'] = 'Přihlásit se k odběru změn e-mailem';
$lang['subscr_m_receive'] = 'Přejete si dostávat';
-$lang['subscr_style_every'] = 'email pro každou změnu';
-$lang['subscr_style_digest'] = 'souhrnný email změn pro každou stránku (každé %.2f dny/dní)';
-$lang['subscr_style_list'] = 'seznam změněných stránek od posledního emailu (každé %.2f dny/dní)';
+$lang['subscr_style_every'] = 'e-mail pro každou změnu';
+$lang['subscr_style_digest'] = 'souhrnný e-mail změn pro každou stránku (každé %.2f dny/dní)';
+$lang['subscr_style_list'] = 'seznam změněných stránek od posledního e-mailu (každé %.2f dny/dní)';
$lang['authtempfail'] = 'Autentizace uživatelů je dočasně nedostupná. Pokud tento problém přetrvává, informujte prosím správce této wiki.';
$lang['authpwdexpire'] = 'Platnost vašeho hesla vyprší za %d dní, měli byste ho změnit co nejdříve.';
$lang['i_chooselang'] = 'Vyberte si jazyk';
@@ -289,6 +297,7 @@ $lang['i_problems'] = 'Instalátor narazil na níže popsané problé
$lang['i_modified'] = 'Instalátor bude z bezpečnostních důvodů pracovat pouze s čistou a ještě neupravenou instalací DokuWiki. Buď znovu rozbalte soubory z instalačního balíčku, nebo zkuste prostudovat <a href="http://dokuwiki.org/install">instrukce pro instalaci DokuWiki</a>.';
$lang['i_funcna'] = 'PHP funkce <code>%s</code> není dostupná. Váš webhosting ji možná z nějakého důvodu vypnul.';
$lang['i_phpver'] = 'Verze vaší instalace PHP <code>%s</code> je nižší než požadovaná <code>%s</code>. Budete muset aktualizovat svou instalaci PHP.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload musí být vypnut v php.ini pro běh DokuWiki.';
$lang['i_permfail'] = 'DokuWiki nemůže zapisovat do <code>%s</code>. Budete muset opravit práva k tomuto adresáři.';
$lang['i_confexists'] = '<code>%s</code> již existuje';
$lang['i_writeerr'] = 'Nelze vytvořit <code>%s</code>. Budete muset zkontrolovat práva k souborům či adresářům a vytvořit tento soubor ručně.';
@@ -342,3 +351,5 @@ $lang['currentns'] = 'Aktuální jmenný prostor';
$lang['searchresult'] = 'Výsledek hledání';
$lang['plainhtml'] = 'Čisté HTML';
$lang['wikimarkup'] = 'Wiki jazyk';
+$lang['page_nonexist_rev'] = 'Stránka neexistovala na %s. Byla vytvořena dodatečne na <a href="%s">%s</a>.';
+$lang['unable_to_parse_date'] = 'Nelze rozebrat parametr "%s".';
diff --git a/inc/lang/cs/mailtext.txt b/inc/lang/cs/mailtext.txt
index f235a299b..443fc3e98 100644
--- a/inc/lang/cs/mailtext.txt
+++ b/inc/lang/cs/mailtext.txt
@@ -13,5 +13,5 @@ Uživatel : @USER@
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@
diff --git a/inc/lang/cs/password.txt b/inc/lang/cs/password.txt
index 18f21f1b1..1b9f77778 100644
--- a/inc/lang/cs/password.txt
+++ b/inc/lang/cs/password.txt
@@ -1,4 +1,4 @@
-Dobrý den,
+Dobrý den!
Zde jsou přihlašovací informace pro wiki @TITLE@ (@DOKUWIKIURL@)
@@ -7,5 +7,5 @@ Uživatelské jméno : @LOGIN@
Heslo : @PASSWORD@
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@
diff --git a/inc/lang/cs/pwconfirm.txt b/inc/lang/cs/pwconfirm.txt
index aa37b3b84..4fcc0ab26 100644
--- a/inc/lang/cs/pwconfirm.txt
+++ b/inc/lang/cs/pwconfirm.txt
@@ -1,13 +1,13 @@
-Dobrý den,
+Dobrý den!
Někdo požádal o nové heslo k vašemu uživatelskému účtu na wiki @TITLE@ (@DOKUWIKIURL@)
-Pokud jste o nové heslo nežádali, ignorujte prosím tento email.
+Pokud jste o nové heslo nežádali, ignorujte prosím tento e-mail.
Pro potvrzení, že jste tento požadavek poslali opravdu vy, prosím otevřete následující odkaz.
@CONFIRM@
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/cs/registermail.txt b/inc/lang/cs/registermail.txt
index 201e7b779..f44189941 100644
--- a/inc/lang/cs/registermail.txt
+++ b/inc/lang/cs/registermail.txt
@@ -10,5 +10,5 @@ IP adresa : @IPADDRESS@
Hostitel : @HOSTNAME@
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/cs/resendpwd.txt b/inc/lang/cs/resendpwd.txt
index 1d2aa0d97..0820f287b 100644
--- a/inc/lang/cs/resendpwd.txt
+++ b/inc/lang/cs/resendpwd.txt
@@ -1,3 +1,3 @@
====== Zaslat nové heslo ======
-Abyste získali nové heslo k vašemu učtu v této wiki, vyplňte všechny níže uvedené informace . Vaše nové heslo bude zasláno na emailovou adresu, kterou jste zadali při registraci. Uživatelské jméno by mělo být stejné jako vaše uživatelské jméno, s nímž se přihlašujete do této wiki.
+Abyste získali nové heslo ke svému účtu v této wiki, vyplňte všechny níže uvedené informace. Nové heslo bude zasláno na e-mailovou adresu, kterou jste zadali při registraci. Uživatelské jméno by mělo být stejné jako vaše uživatelské jméno, s nímž se přihlašujete do této wiki.
diff --git a/inc/lang/cs/searchpage.txt b/inc/lang/cs/searchpage.txt
index ac045e100..2f5e89ff6 100644
--- a/inc/lang/cs/searchpage.txt
+++ b/inc/lang/cs/searchpage.txt
@@ -1,5 +1,5 @@
====== Vyhledávání ======
-Výsledky hledání můžete vidět níže. Pokud jste nenašli, co hledáte, zkuste požadovanou stránku sami vytvořit stisknutím tlačítka ''Vytvořit stránku''.
+Výsledky hledání můžete vidět níže. @CREATEPAGEINFO@
===== Výsledky =====
diff --git a/inc/lang/cs/subscr_digest.txt b/inc/lang/cs/subscr_digest.txt
index 1b1770965..128d91931 100644
--- a/inc/lang/cs/subscr_digest.txt
+++ b/inc/lang/cs/subscr_digest.txt
@@ -11,12 +11,12 @@ Stará revize: @OLDPAGE@
Nová revize: @NEWPAGE@
Pro odhlášení z odebírání změn na této webové stránce
-se prosím příhlašte do wiki na adrese
+se prosím přihlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
-a odhlaště se z odebírání změn na stránce či
+a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/cs/subscr_list.txt b/inc/lang/cs/subscr_list.txt
index f85be8a9f..81b344dc8 100644
--- a/inc/lang/cs/subscr_list.txt
+++ b/inc/lang/cs/subscr_list.txt
@@ -11,9 +11,9 @@ Pro odhlášení z odebírání změn
se prosím příhlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
-a odhlaště se z odebírání změn na stránce či
+a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/cs/subscr_single.txt b/inc/lang/cs/subscr_single.txt
index 1ee33da09..6f3774cd9 100644
--- a/inc/lang/cs/subscr_single.txt
+++ b/inc/lang/cs/subscr_single.txt
@@ -14,12 +14,12 @@ Stará revize: @OLDPAGE@
Nová revize: @NEWPAGE@
Pro odhlášení z odebírání změn na této webové stránce
-se prosím příhlašte do wiki na adrese
+se prosím přihlašte do wiki na adrese
@DOKUWIKIURL@, pak navštivte
@SUBSCRIBE@
-a odhlaště se z odebírání změn na stránce či
+a odhlaste se z odebírání změn na stránce či
ve jmenném prostoru.
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/cs/uploadmail.txt b/inc/lang/cs/uploadmail.txt
index b19b0bf7e..28f4e2895 100644
--- a/inc/lang/cs/uploadmail.txt
+++ b/inc/lang/cs/uploadmail.txt
@@ -1,4 +1,4 @@
-Do vaší DokuWiki byl nahrán nový dokument. Tady jsou detaily:
+Do DokuWiki byl nahrán nový dokument. Tady jsou detaily:
Soubor : @MEDIA@
Datum : @DATE@
@@ -10,5 +10,5 @@ MIME typ : @MIME@
Uživatel : @USER@
--
-Tento email byl automaticky vygenerován systémem DokuWiki
+Tento e-mail byl automaticky vygenerován systémem DokuWiki
@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php
index 3f06bf758..3b353d50c 100644
--- a/inc/lang/da/lang.php
+++ b/inc/lang/da/lang.php
@@ -17,6 +17,8 @@
* @author Soren Birk <soer9648@hotmail.com>
* @author Jens Hyllegaard <jens.hyllegaard@gmail.com>
* @author soer9648 <soer9648@eucl.dk>
+ * @author Søren Birk <sbi@eucl.dk>
+ * @author Søren Birk <soer9648@eucl.dk>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -61,6 +63,8 @@ $lang['btn_register'] = 'Registrér';
$lang['btn_apply'] = 'Anvend';
$lang['btn_media'] = 'Media Manager';
$lang['btn_deleteuser'] = 'Fjern Min Konto';
+$lang['btn_img_backto'] = 'Tilbage til %s';
+$lang['btn_mediaManager'] = 'Vis i Media Manager';
$lang['loggedinas'] = 'Logget ind som:';
$lang['user'] = 'Brugernavn';
$lang['pass'] = 'Adgangskode';
@@ -76,6 +80,7 @@ $lang['badpassconfirm'] = 'Kodeordet var desværre forkert';
$lang['minoredit'] = 'Mindre ændringer';
$lang['draftdate'] = 'Kladde automatisk gemt d.';
$lang['nosecedit'] = 'Siden blev ændret i mellemtiden, sektions information var for gammel, hentede hele siden i stedet.';
+$lang['searchcreatepage'] = 'Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke på knappen **\'\'[Opret dette dokument]\'\'**.';
$lang['regmissing'] = 'Du skal udfylde alle felter.';
$lang['reguexists'] = 'Dette brugernavn er allerede i brug.';
$lang['regsuccess'] = 'Du er nu oprettet som bruger. Dit adgangskode bliver sendt til dig i en e-mail.';
@@ -147,6 +152,7 @@ $lang['js']['restore_confirm'] = 'Vil du virkeligt genskabe denne version?';
$lang['js']['media_diff'] = 'Vis forskelle:';
$lang['js']['media_diff_both'] = 'Side ved Side';
$lang['js']['media_diff_opacity'] = 'Skin-igennem';
+$lang['js']['media_diff_portions'] = 'Skub';
$lang['js']['media_select'] = 'Vælg filer...';
$lang['js']['media_upload_btn'] = 'Upload';
$lang['js']['media_done_btn'] = 'Færdig';
@@ -190,6 +196,11 @@ $lang['difflink'] = 'Link til denne sammenlinings vising';
$lang['diff_type'] = 'Vis forskelle:';
$lang['diff_inline'] = 'Indeni';
$lang['diff_side'] = 'Side ved Side';
+$lang['diffprevrev'] = 'Forrige revision';
+$lang['diffnextrev'] = 'Næste revision';
+$lang['difflastrev'] = 'Sidste revision';
+$lang['diffbothprevrev'] = 'Begge sider forrige revision';
+$lang['diffbothnextrev'] = 'Begge sider næste revision';
$lang['line'] = 'Linje';
$lang['breadcrumb'] = 'Sti:';
$lang['youarehere'] = 'Du er her:';
@@ -246,7 +257,6 @@ $lang['admin_register'] = 'Tilføj ny bruger';
$lang['metaedit'] = 'Rediger metadata';
$lang['metasaveerr'] = 'Skrivning af metadata fejlede';
$lang['metasaveok'] = 'Metadata gemt';
-$lang['btn_img_backto'] = 'Tilbage til %s';
$lang['img_title'] = 'Titel:';
$lang['img_caption'] = 'Billedtekst:';
$lang['img_date'] = 'Dato:';
@@ -259,7 +269,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Emneord:';
$lang['img_width'] = 'Bredde:';
$lang['img_height'] = 'Højde:';
-$lang['btn_mediaManager'] = 'Vis i Media Manager';
$lang['subscr_subscribe_success'] = 'Tilføjede %s til abonnement listen for %s';
$lang['subscr_subscribe_error'] = 'Fejl ved tilføjelse af %s til abonnement listen for %s';
$lang['subscr_subscribe_noaddress'] = 'Der er ikke nogen addresse forbundet til din bruger, så du kan ikke blive tilføjet til abonnement listen';
@@ -289,6 +298,7 @@ Du burde enten gen-udpakke filerne fra den hentede pakke eller tjekke den fuldst
<a href="http://dokuwiki.org/install">DokuWiki installations instruktioner</a>';
$lang['i_funcna'] = 'PHP funtionen <code>%s</code> er ikke tilgængelig. Måske har din udbyder slået det fra af en eller anden grund?';
$lang['i_phpver'] = 'Din PHP version <code>%s</code> er mindre en den nødvendige <code>%s</code>. Du er nød til at opgradere din PHP installation.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload skal være deaktiveret i php.ini for at køre DokuWiki.';
$lang['i_permfail'] = 'DokuWiki kan ikke skrive til <code>%s</code>. Du er nød til at rette tilladelses indstillingerne for denne mappe!';
$lang['i_confexists'] = '<code>%s</code> eksisterer allerede';
$lang['i_writeerr'] = 'Kunne ikke oprette <code>%s</code>. Du bliver nød til at tjekke mappe/fil- tilladelserne og oprette filen manuelt.';
@@ -300,10 +310,12 @@ $lang['i_policy'] = 'Begyndende ACL politik';
$lang['i_pol0'] = 'Åben Wiki (alle kan læse, skrive og uploade)';
$lang['i_pol1'] = 'Offentlig Wiki (alle kan læse, kun registrerede brugere kan skrive og overføre)';
$lang['i_pol2'] = 'Lukket Wiki (kun for registerede brugere kan læse, skrive og overføre)';
+$lang['i_allowreg'] = 'Tillad at brugere kan registrere sig selv';
$lang['i_retry'] = 'Forsøg igen';
$lang['i_license'] = 'Vælg venligst licensen du vil tilføje dit indhold under:';
$lang['i_license_none'] = 'Vis ikke licensinformationer';
$lang['i_pop_field'] = 'Hjælp os venligst med at forbedre oplevelsen af DokuWiki:';
+$lang['i_pop_label'] = 'Send anonymt brugsdata til DokuWikis udviklere, én gang om måneden';
$lang['recent_global'] = 'Du ser lige nu ændringerne i <b>%s</b> navnerummet. Du kan også <a href="%s">se de sidste ændringer for hele wiki siden </a>';
$lang['years'] = '%d år siden';
$lang['months'] = '%d måned siden';
@@ -336,3 +348,8 @@ $lang['media_perm_read'] = 'Du har ikke nok rettigheder til at læse filer
$lang['media_perm_upload'] = 'Du har ikke nok rettigheder til at uploade filer.';
$lang['media_update'] = 'Upload ny version';
$lang['media_restore'] = 'Genskab denne version';
+$lang['currentns'] = 'Nuværende navnerum';
+$lang['searchresult'] = 'Søgsresultat';
+$lang['plainhtml'] = 'Ren HTML';
+$lang['wikimarkup'] = 'Wiki Opmærkning';
+$lang['page_nonexist_rev'] = 'Siden blev ikke fundet ved %s. Den blev efterfølgende oprettet ved <a href="%s">%s</a>.';
diff --git a/inc/lang/da/searchpage.txt b/inc/lang/da/searchpage.txt
index eca1b589c..9cefd419c 100644
--- a/inc/lang/da/searchpage.txt
+++ b/inc/lang/da/searchpage.txt
@@ -1,5 +1,5 @@
====== Søgning ======
-Du kan se resultaterne af din søgning nedenunder. Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke på knappen **''[Opret dette dokument]''**.
+Du kan se resultaterne af din søgning nedenunder. @CREATEPAGEINFO@
===== Søgeresultater =====
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index c81109580..1a1491f6b 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -81,6 +81,7 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.';
$lang['minoredit'] = 'Kleine Änderung';
$lang['draftdate'] = 'Entwurf gespeichert am';
$lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, da das Sektionsinfo veraltet ist. Die ganze Seite wird stattdessen geladen.';
+$lang['searchcreatepage'] = "Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **''[Seite anlegen]''** drückst.";
$lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden';
$lang['reguexists'] = 'Der Benutzername existiert leider schon.';
$lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.';
diff --git a/inc/lang/de-informal/searchpage.txt b/inc/lang/de-informal/searchpage.txt
index 72c57b765..e78e4abdd 100644
--- a/inc/lang/de-informal/searchpage.txt
+++ b/inc/lang/de-informal/searchpage.txt
@@ -1,6 +1,6 @@
====== Suche ======
-Unten sind die Ergebnisse deiner Suche gelistet. Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **''[Seite anlegen]''** drückst.
+Unten sind die Ergebnisse deiner Suche gelistet. @CREATEPAGEINFO@
===== Ergebnisse =====
diff --git a/inc/lang/de/backlinks.txt b/inc/lang/de/backlinks.txt
index 1ffa815c2..25e0ed5f9 100644
--- a/inc/lang/de/backlinks.txt
+++ b/inc/lang/de/backlinks.txt
@@ -1,5 +1,5 @@
====== Links hierher ======
-Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite verlinken.
+Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite führen.
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index 12b7db396..2725c247a 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -26,6 +26,8 @@
* @author Joerg <scooter22@gmx.de>
* @author Simon <st103267@stud.uni-stuttgart.de>
* @author Hoisl <hoisl@gmx.at>
+ * @author Marcel Eickhoff <eickhoff.marcel@gmail.com>
+ * @author Pascal Schröder <Pascal1802@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -87,6 +89,7 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.';
$lang['minoredit'] = 'kleine Änderung';
$lang['draftdate'] = 'Entwurf gespeichert am';
$lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, Sektionsinfo ist veraltet, lade stattdessen volle Seite.';
+$lang['searchcreatepage'] = 'Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **\'\'[Seite anlegen]\'\'** Knopf drücken.';
$lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden.';
$lang['reguexists'] = 'Der Benutzername existiert leider schon.';
$lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.';
@@ -204,6 +207,8 @@ $lang['diff_side'] = 'Side by Side';
$lang['diffprevrev'] = 'Vorhergehende Überarbeitung';
$lang['diffnextrev'] = 'Nächste Überarbeitung';
$lang['difflastrev'] = 'Letzte Überarbeitung';
+$lang['diffbothprevrev'] = 'Beide Seiten der vorigen Revision';
+$lang['diffbothnextrev'] = 'Beide Seiten der Revision';
$lang['line'] = 'Zeile';
$lang['breadcrumb'] = 'Zuletzt angesehen:';
$lang['youarehere'] = 'Sie befinden sich hier:';
@@ -299,6 +304,7 @@ $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführ
$lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Skript nur mit einer neuen bzw. nicht modifizierten DokuWiki Installation. Sie sollten entweder alle Dateien noch einmal frisch installieren oder die <a href="http://dokuwiki.org/install">Dokuwiki-Installationsanleitung</a> konsultieren.';
$lang['i_funcna'] = 'Die PHP-Funktion <code>%s</code> ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?';
$lang['i_phpver'] = 'Ihre PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisieren Sie Ihre PHP-Installation.';
+$lang['i_mbfuncoverload'] = 'Um DokuWiki zu starten muss mbstring.func_overload in php.ini ausgeschaltet sein.';
$lang['i_permfail'] = '<code>%s</code> ist nicht durch DokuWiki beschreibbar. Sie müssen die Berechtigungen dieses Ordners ändern!';
$lang['i_confexists'] = '<code>%s</code> existiert bereits';
$lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Sie sollten die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
@@ -352,3 +358,5 @@ $lang['currentns'] = 'Aktueller Namensraum';
$lang['searchresult'] = 'Suchergebnisse';
$lang['plainhtml'] = 'HTML Klartext';
$lang['wikimarkup'] = 'Wiki Markup';
+$lang['page_nonexist_rev'] = 'DIe Seite exitiert nicht unter %s. Sie wurde aber unter <a herf="%s">%s</a>';
+$lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.';
diff --git a/inc/lang/de/searchpage.txt b/inc/lang/de/searchpage.txt
index 56104551b..6cd8006ac 100644
--- a/inc/lang/de/searchpage.txt
+++ b/inc/lang/de/searchpage.txt
@@ -1,6 +1,6 @@
====== Suche ======
-Unten sind die Ergebnisse Ihrer Suche gelistet. Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **''[Seite anlegen]''** Knopf drücken.
+Unten sind die Ergebnisse Ihrer Suche gelistet. @CREATEPAGEINFO@
===== Ergebnisse =====
diff --git a/inc/lang/el/searchpage.txt b/inc/lang/el/searchpage.txt
index b52162b60..c5bbbbfae 100644
--- a/inc/lang/el/searchpage.txt
+++ b/inc/lang/el/searchpage.txt
@@ -1,4 +1,4 @@
====== Αναζήτηση ======
-Τα αποτελέσματα της αναζήτησής σας:
+Τα αποτελέσματα της αναζήτησής σας. @CREATEPAGEINFO@
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 9c1e5dacd..fb455f85f 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -70,6 +70,7 @@ $lang['badpassconfirm'] = 'Sorry, the password was wrong';
$lang['minoredit'] = 'Minor Changes';
$lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added
$lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.';
+$lang['searchcreatepage'] = 'If you didn\'t find what you were looking for, you can create or edit the page named after your query with the appropriate tool.';
$lang['regmissing'] = 'Sorry, you must fill in all fields.';
$lang['reguexists'] = 'Sorry, a user with this login already exists.';
@@ -367,4 +368,6 @@ $lang['currentns'] = 'Current namespace';
$lang['searchresult'] = 'Search Result';
$lang['plainhtml'] = 'Plain HTML';
$lang['wikimarkup'] = 'Wiki Markup';
+$lang['page_nonexist_rev'] = 'Page did not exist at %s. It was subsequently created at <a href="%s">%s</a>.';
+$lang['unable_to_parse_date'] = 'Unable to parse at parameter "%s".';
//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/en/searchpage.txt b/inc/lang/en/searchpage.txt
index 50578db3f..ba0960aa6 100644
--- a/inc/lang/en/searchpage.txt
+++ b/inc/lang/en/searchpage.txt
@@ -1,5 +1,5 @@
====== Search ======
-You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate tool.
+You can find the results of your search below. @CREATEPAGEINFO@
===== Results =====
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index f81de7fa1..0cb84a2de 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -71,6 +71,7 @@ $lang['badpassconfirm'] = 'Pardonu, la pasvorto malĝustis';
$lang['minoredit'] = 'Etaj modifoj';
$lang['draftdate'] = 'Lasta konservo de la skizo:';
$lang['nosecedit'] = 'La paĝo ŝanĝiĝis intertempe, sekcio-informo estis malĝisdata, tial la tuta paĝo estas reŝargita.';
+$lang['searchcreatepage'] = 'Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paĝon kun necesa nomo per la koresponda butono.';
$lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.';
$lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.';
$lang['regsuccess'] = 'La uzanto kreiĝis kaj la pasvorto sendiĝis per retpoŝto.';
diff --git a/inc/lang/eo/searchpage.txt b/inc/lang/eo/searchpage.txt
index a940c503d..bdefe7b59 100644
--- a/inc/lang/eo/searchpage.txt
+++ b/inc/lang/eo/searchpage.txt
@@ -1,5 +1,5 @@
====== Serĉo ======
-Sube estas rezultoj de serĉo en la retejo.\\ Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paĝon kun necesa nomo per la koresponda butono.
+Sube estas rezultoj de serĉo en la retejo.\\ @CREATEPAGEINFO@
===== Rezultoj =====
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index 47bee3b6f..8f4cb2977 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -98,6 +98,7 @@ $lang['badpassconfirm'] = 'Lo siento, la contraseña es errónea';
$lang['minoredit'] = 'Cambios menores';
$lang['draftdate'] = 'Borrador guardado automáticamente:';
$lang['nosecedit'] = 'La página ha cambiado en el lapso, la información de sección estaba anticuada, en su lugar se cargó la página completa.';
+$lang['searchcreatepage'] = "Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''.";
$lang['regmissing'] = 'Lo siento, tienes que completar todos los campos.';
$lang['reguexists'] = 'Lo siento, ya existe un usuario con este nombre.';
$lang['regsuccess'] = 'El usuario ha sido creado y la contraseña se ha enviado por correo.';
diff --git a/inc/lang/es/searchpage.txt b/inc/lang/es/searchpage.txt
index 47a1a90dd..819815b15 100644
--- a/inc/lang/es/searchpage.txt
+++ b/inc/lang/es/searchpage.txt
@@ -1,5 +1,5 @@
====== Búsqueda ======
-Puedes encontrar los resultados de tu búsqueda abajo. Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''.
+Puedes encontrar los resultados de tu búsqueda abajo. @CREATEPAGEINFO@
===== Resultados ===== \ No newline at end of file
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index 9ae06d7d2..d3c510c43 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -69,6 +69,7 @@ $lang['badpassconfirm'] = 'Väär salasõna';
$lang['minoredit'] = 'Ebaolulised muudatused';
$lang['draftdate'] = 'Mustand automaatselt salvestatud';
$lang['nosecedit'] = 'Leht on vahepeal muutunud, jaotiste teave osutus aegunuks sestap laeti tervelehekülg.';
+$lang['searchcreatepage'] = "Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu.";
$lang['regmissing'] = 'Kõik väljad tuleb ära täita.';
$lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.';
$lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.';
diff --git a/inc/lang/et/searchpage.txt b/inc/lang/et/searchpage.txt
index bbc86b637..6ba57324a 100644
--- a/inc/lang/et/searchpage.txt
+++ b/inc/lang/et/searchpage.txt
@@ -1,5 +1,5 @@
====== Otsi ======
-Leiad vasted oma otsingule. Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu.
+Leiad vasted oma otsingule. @CREATEPAGEINFO@
===== Vasted =====
diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php
index 0c996feaf..fcf45b946 100644
--- a/inc/lang/eu/lang.php
+++ b/inc/lang/eu/lang.php
@@ -1,11 +1,12 @@
<?php
+
/**
- * Basque language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Xabi Ezpeleta <xezpeleta@mendikute.com>
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
+ * @author Yadav Gowda <yadav.gowda@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -49,6 +50,9 @@ $lang['btn_revert'] = 'Berrezarri';
$lang['btn_register'] = 'Erregistratu';
$lang['btn_apply'] = 'Baieztatu';
$lang['btn_media'] = 'Media Kudeatzailea';
+$lang['btn_deleteuser'] = 'Nire kontua kendu';
+$lang['btn_img_backto'] = 'Atzera hona %s';
+$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi';
$lang['loggedinas'] = 'Erabiltzailea:';
$lang['user'] = 'Erabiltzailea';
$lang['pass'] = 'Pasahitza';
@@ -63,6 +67,7 @@ $lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz
$lang['minoredit'] = 'Aldaketa Txikiak';
$lang['draftdate'] = 'Zirriborroa automatikoki gorde da hemen:';
$lang['nosecedit'] = 'Orria aldatua izan da bitartean, info atala zaharkituta geratu da, orri osoa kargatu da horren ordez.';
+$lang['searchcreatepage'] = 'Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean \'\'Sortu orri hau\'\' erabiliz.';
$lang['regmissing'] = 'Barkatu, hutsune guztiak bete behar dituzu.';
$lang['reguexists'] = 'Barkatu, izen bereko erabiltzailea existitzen da.';
$lang['regsuccess'] = 'Erabiltzailea sortu da. Pasahitza mailez bidaliko zaizu.';
@@ -76,6 +81,7 @@ $lang['profna'] = 'Wiki honek ez du profilaren aldaketa ahalbidet
$lang['profnochange'] = 'Aldaketarik ez, ez dago egiteko ezer.';
$lang['profnoempty'] = 'Izen edota e-posta hutsa ez dago onartua.';
$lang['profchanged'] = 'Erabiltzaile profila arrakastaz eguneratua.';
+$lang['profdeleteuser'] = 'Kontua ezabatu';
$lang['pwdforget'] = 'Pasahitza ahaztu duzu? Eskuratu berri bat';
$lang['resendna'] = 'Wiki honek ez du pasahitz berbidalketa onartzen.';
$lang['resendpwd'] = '-entzat pasahitza berria ezarri';
@@ -227,7 +233,6 @@ $lang['admin_register'] = 'Erabiltzaile berria gehitu';
$lang['metaedit'] = 'Metadatua Aldatu';
$lang['metasaveerr'] = 'Metadatuaren idazketak huts egin du';
$lang['metasaveok'] = 'Metadatua gordea';
-$lang['btn_img_backto'] = 'Atzera hona %s';
$lang['img_title'] = 'Izenburua:';
$lang['img_caption'] = 'Epigrafea:';
$lang['img_date'] = 'Data:';
@@ -240,7 +245,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Hitz-gakoak:';
$lang['img_width'] = 'Zabalera:';
$lang['img_height'] = 'Altuera:';
-$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi';
$lang['subscr_subscribe_success'] = '%s gehitua %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_error'] = 'Errorea %s gehitzen %s-ren harpidetza zerrendara';
$lang['subscr_subscribe_noaddress'] = 'Ez dago helbiderik zure login-arekin lotuta, ezin zara harpidetza zerrendara gehitua izan.';
diff --git a/inc/lang/eu/searchpage.txt b/inc/lang/eu/searchpage.txt
index 2a487a3bb..c632305b9 100644
--- a/inc/lang/eu/searchpage.txt
+++ b/inc/lang/eu/searchpage.txt
@@ -1,5 +1,5 @@
====== Bilaketa ======
-Emaitzak ondorengo aurkiketan bilatu ditzakezu. Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean ''Sortu orri hau'' erabiliz.
+Emaitzak ondorengo aurkiketan bilatu ditzakezu. @CREATEPAGEINFO@
===== Bilaketa emaitzak: =====
diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php
index 2649ad739..25de5c92e 100644
--- a/inc/lang/fa/lang.php
+++ b/inc/lang/fa/lang.php
@@ -12,6 +12,9 @@
* @author mehrdad <mehrdad.jafari.bojd@gmail.com>
* @author reza_khn <reza_khn@yahoo.com>
* @author Hamid <zarrabi@sharif.edu>
+ * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
+ * @author Mohammad Sadegh <msdn2013@gmail.com>
+ * @author Omid Hezaveh <hezpublic@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'rtl';
@@ -73,6 +76,7 @@ $lang['badpassconfirm'] = 'متاسفم ، رمز عبور اشتباه
$lang['minoredit'] = 'این ویرایش خُرد است';
$lang['draftdate'] = 'ذخیره خودکار پیش‌نویس';
$lang['nosecedit'] = 'این صفحه در این میان تغییر کرده است، اطلاعات بخش قدیمی شده است، در عوض محتوای کل نمایش داده می‌شود.';
+$lang['searchcreatepage'] = 'اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صفحه‌ی مورد نظر را ایجاد کنید.';
$lang['regmissing'] = 'متاسفم، شما باید همه قسمت‌ها را پر کنید.';
$lang['reguexists'] = 'نام کاربری‌ای که وارد کردید قبلن استفاده شده است. خواهشمندیم یک نام دیگر انتخاب کنید.';
$lang['regsuccess'] = 'کاربر ساخته شد و گذرواژه به صورت ایمیل ارسال گردید.';
diff --git a/inc/lang/fa/searchpage.txt b/inc/lang/fa/searchpage.txt
index 3f0378ed3..f7f1a5309 100644
--- a/inc/lang/fa/searchpage.txt
+++ b/inc/lang/fa/searchpage.txt
@@ -1,5 +1,5 @@
====== جستجو ======
-نتایج جستجو در زیر آمده است. اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صفحه‌ی مورد نظر را ایجاد کنید.
+نتایج جستجو در زیر آمده است. @CREATEPAGEINFO@
===== نتایج ===== \ No newline at end of file
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index 0f82c3b7a..9bf4aad19 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -9,6 +9,7 @@
* @author Teemu Mattila <ghcsystems@gmail.com>
* @author Sami Olmari <sami@olmari.fi>
* @author Rami Lehti <rammer@ipi.fi>
+ * @author Jussi Takala <jussi.takala@live.fi>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -53,6 +54,8 @@ $lang['btn_register'] = 'Rekisteröidy';
$lang['btn_apply'] = 'Toteuta';
$lang['btn_media'] = 'Media manager';
$lang['btn_deleteuser'] = 'Poista tilini';
+$lang['btn_img_backto'] = 'Takaisin %s';
+$lang['btn_mediaManager'] = 'Näytä mediamanagerissa';
$lang['loggedinas'] = 'Kirjautunut nimellä:';
$lang['user'] = 'Käyttäjänimi';
$lang['pass'] = 'Salasana';
@@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'Valitan. Salasana oli väärin';
$lang['minoredit'] = 'Pieni muutos';
$lang['draftdate'] = 'Luonnos tallennettu automaattisesti';
$lang['nosecedit'] = 'Sivu on muuttunut välillä ja kappaleen tiedot olivat vanhentuneet. Koko sivu ladattu.';
+$lang['searchcreatepage'] = 'Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä \'\'Muokkaa tätä sivua\'\' -napilla.';
$lang['regmissing'] = 'Kaikki kentät tulee täyttää.';
$lang['reguexists'] = 'Käyttäjä tällä käyttäjänimellä on jo olemassa.';
$lang['regsuccess'] = 'Käyttäjä luotiin ja salasana lähetettiin sähköpostilla.';
@@ -184,6 +188,9 @@ $lang['difflink'] = 'Linkki vertailunäkymään';
$lang['diff_type'] = 'Näytä eroavaisuudet:';
$lang['diff_inline'] = 'Sisäkkäin';
$lang['diff_side'] = 'Vierekkäin';
+$lang['diffprevrev'] = 'Edellinen revisio';
+$lang['diffnextrev'] = 'Seuraava revisio';
+$lang['difflastrev'] = 'Viimeisin revisio';
$lang['line'] = 'Rivi';
$lang['breadcrumb'] = 'Jäljet:';
$lang['youarehere'] = 'Olet täällä:';
@@ -240,7 +247,6 @@ $lang['admin_register'] = 'Lisää uusi käyttäjä';
$lang['metaedit'] = 'Muokkaa metadataa';
$lang['metasaveerr'] = 'Metadatan kirjoittaminen epäonnistui';
$lang['metasaveok'] = 'Metadata tallennettu';
-$lang['btn_img_backto'] = 'Takaisin %s';
$lang['img_title'] = 'Otsikko:';
$lang['img_caption'] = 'Kuvateksti:';
$lang['img_date'] = 'Päivämäärä:';
@@ -253,7 +259,6 @@ $lang['img_camera'] = 'Kamera:';
$lang['img_keywords'] = 'Avainsanat:';
$lang['img_width'] = 'Leveys:';
$lang['img_height'] = 'Korkeus:';
-$lang['btn_mediaManager'] = 'Näytä mediamanagerissa';
$lang['subscr_subscribe_success'] = '%s lisätty %s tilauslistalle';
$lang['subscr_subscribe_error'] = 'Virhe lisättäessä %s tilauslistalle %s';
$lang['subscr_subscribe_noaddress'] = 'Login tiedoissasi ei ole sähköpostiosoitetta. Sinua ei voi lisätä tilaukseen';
@@ -281,6 +286,7 @@ $lang['i_problems'] = 'Asennusohjelma löysi alla listattuja ongelmia
$lang['i_modified'] = 'Turvallisuussyistä tämä ohjelma toimii vain uusien ja muokkaamattomien Dokuwiki-asennusten kanssa. Pura tiedostot uudestaan asennuspaketista, tai lue <a href="http://dokuwiki.org/install">Dokuwikin asennusohje (englanniksi)</a>';
$lang['i_funcna'] = 'PHP:n funktio <code>%s</code> ei ole käytettävissä. Palveluntarjoajasi on saattanut poistaa sen jostain syystä.';
$lang['i_phpver'] = 'Käyttämäsi PHP-ohjelmiston versio <code>%s</code> on pienempi, kuin tarvitaan <code>%s</code>. PHP-asennuksesi pitää päivittää.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload pitää ottaa pois käytöstä php.ini -tiedostosta käyttääksesi DokuWikiä';
$lang['i_permfail'] = '<code>%s</code> ei ole DokuWikin kirjoitettavissa. Muokkaa hakemiston oikeuksia!';
$lang['i_confexists'] = '<code>%s</code> on jo olemassa';
$lang['i_writeerr'] = '<code>%s</code>n luonti epäonnistui. Tarkista hakemiston/tiedoston oikeudet ja luo tiedosto käsin.';
@@ -334,3 +340,4 @@ $lang['currentns'] = 'Nykyinen nimiavaruus';
$lang['searchresult'] = 'Haun tulokset';
$lang['plainhtml'] = 'pelkkä HTML';
$lang['wikimarkup'] = 'Wiki markup';
+$lang['unable_to_parse_date'] = 'Parametrin "%s" jäsennys ei onnistu.';
diff --git a/inc/lang/fi/searchpage.txt b/inc/lang/fi/searchpage.txt
index aa9fbf52f..b2ad8cc98 100644
--- a/inc/lang/fi/searchpage.txt
+++ b/inc/lang/fi/searchpage.txt
@@ -1,5 +1,5 @@
====== Etsi ======
-Löydät etsinnän tulokset alta. Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä ''Muokkaa tätä sivua'' -napilla.
+Löydät etsinnän tulokset alta. @CREATEPAGEINFO@
===== Tulokset =====
diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php
index b326d27ac..0aee76e01 100644
--- a/inc/lang/fo/lang.php
+++ b/inc/lang/fo/lang.php
@@ -59,6 +59,7 @@ $lang['badlogin'] = 'Skeivt brúkaranavn ella loyniorð.';
$lang['minoredit'] = 'Smærri broytingar';
$lang['draftdate'] = 'Goym kladdu sett frá';
$lang['nosecedit'] = 'Hendan síðan var broytt undir tilevnan, brotið var ikki rætt dagfest, heintaði fulla síðu í staðin';
+$lang['searchcreatepage'] = "Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin.";
$lang['regmissing'] = 'Tú skalt fylla út øll øki.';
$lang['reguexists'] = 'Hetta brúkaranavn er upptiki.';
$lang['regsuccess'] = 'Tú ert nú stovnavur sum brúkari. Títt loyniorð verður sent til tín í einum T-posti.';
diff --git a/inc/lang/fo/searchpage.txt b/inc/lang/fo/searchpage.txt
index 6304a8901..33bcc3206 100644
--- a/inc/lang/fo/searchpage.txt
+++ b/inc/lang/fo/searchpage.txt
@@ -1,5 +1,5 @@
====== Leiting ======
-Tú kanst síggja úrslitini av tíni leiting niðanfyri. Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin.
+Tú kanst síggja úrslitini av tíni leiting niðanfyri. @CREATEPAGEINFO@
===== Leitiúrslit =====
diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt
index da01a4086..6de193004 100644
--- a/inc/lang/fr/denied.txt
+++ b/inc/lang/fr/denied.txt
@@ -1,4 +1,4 @@
====== Autorisation refusée ======
-Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande.
+Désolé, vous n'avez pas suffisamment d'autorisations pour poursuivre votre demande.
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index c5edd4cf7..7a9b82158 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -35,6 +35,7 @@
* @author Caillot <remicaillot5@gmail.com>
* @author Schplurtz le Déboulonné <schplurtz@laposte.net>
* @author YoBoY <yoboy@ubuntu-fr.org>
+ * @author james <j.mccann@celcat.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -77,7 +78,7 @@ $lang['btn_draftdel'] = 'Effacer le brouillon';
$lang['btn_revert'] = 'Restaurer';
$lang['btn_register'] = 'Créer un compte';
$lang['btn_apply'] = 'Appliquer';
-$lang['btn_media'] = 'Gestionnaire de médias';
+$lang['btn_media'] = 'Gestionnaire Multimédia';
$lang['btn_deleteuser'] = 'Supprimer mon compte';
$lang['btn_img_backto'] = 'Retour vers %s';
$lang['btn_mediaManager'] = 'Voir dans le gestionnaire de médias';
@@ -96,6 +97,7 @@ $lang['badpassconfirm'] = 'Désolé, le mot de passe est erroné';
$lang['minoredit'] = 'Modification mineure';
$lang['draftdate'] = 'Brouillon enregistré automatiquement le';
$lang['nosecedit'] = 'La page a changé entre temps, les informations de la section sont obsolètes ; la page complète a été chargée à la place.';
+$lang['searchcreatepage'] = 'Si vous n\'avez pas trouvé ce que vous cherchiez, vous pouvez créer ou modifier la page correspondante à votre requête en cliquant sur le bouton approprié.';
$lang['regmissing'] = 'Désolé, vous devez remplir tous les champs.';
$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà pris.';
$lang['regsuccess'] = 'L\'utilisateur a été créé. Le mot de passe a été expédié par courriel.';
@@ -360,7 +362,7 @@ $lang['media_perm_read'] = 'Désolé, vous n\'avez pas l\'autorisation de
$lang['media_perm_upload'] = 'Désolé, vous n\'avez pas l\'autorisation d\'envoyer des fichiers.';
$lang['media_update'] = 'Envoyer une nouvelle version';
$lang['media_restore'] = 'Restaurer cette version';
-$lang['currentns'] = 'Namespace actuel';
+$lang['currentns'] = 'Catégorie courante';
$lang['searchresult'] = 'Résultat de la recherche';
$lang['plainhtml'] = 'HTML brut';
$lang['wikimarkup'] = 'Wiki balise';
diff --git a/inc/lang/fr/newpage.txt b/inc/lang/fr/newpage.txt
index b23bf4fe4..c649489fa 100644
--- a/inc/lang/fr/newpage.txt
+++ b/inc/lang/fr/newpage.txt
@@ -1,4 +1,4 @@
====== Cette page n'existe pas encore ======
-Vous avez suivi un lien vers une page qui n'existe pas encore. Si vos autorisations sont suffisants, vous pouvez la créer en cliquant sur « Créer cette page ».
+Vous avez suivi un lien vers une page qui n'existe pas encore. Si vos permissions sont suffisantes, vous pouvez la créer en cliquant sur « Créer cette page ».
diff --git a/inc/lang/fr/searchpage.txt b/inc/lang/fr/searchpage.txt
index a9bd91608..5577a3a2a 100644
--- a/inc/lang/fr/searchpage.txt
+++ b/inc/lang/fr/searchpage.txt
@@ -1,5 +1,5 @@
====== Recherche ======
-Voici les résultats de votre recherche. Si vous n'avez pas trouvé ce que vous cherchiez, vous pouvez créer ou modifier la page correspondante à votre requête en cliquant sur le bouton approprié.
+Voici les résultats de votre recherche. @CREATEPAGEINFO@
===== Résultats =====
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index aed225359..82cbbbfab 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -63,6 +63,7 @@ $lang['badlogin'] = 'Sentímolo, mais o nome de usuario ou o contra
$lang['minoredit'] = 'Trocos Menores';
$lang['draftdate'] = 'Borrador gardado automaticamente en';
$lang['nosecedit'] = 'A páxina mudou entrementres, a información da sección estaba desfasada polo que se cargou a páxina completa no seu lugar.';
+$lang['searchcreatepage'] = "Se non atopaches o que estabas a procurar, podes crear ou editar a páxina co nome relacionado coa túa procura empregando o botón axeitado.";
$lang['regmissing'] = 'Sentímolo, mais tes que cubrir todos os campos.';
$lang['reguexists'] = 'Sentímolo, mais xa existe un usuario con ese nome.';
$lang['regsuccess'] = 'O usuario foi creado e o contrasinal enviado por correo-e.';
diff --git a/inc/lang/gl/searchpage.txt b/inc/lang/gl/searchpage.txt
index 227ca5dbc..e37ec4642 100644
--- a/inc/lang/gl/searchpage.txt
+++ b/inc/lang/gl/searchpage.txt
@@ -1,5 +1,5 @@
====== Procura ======
-Podes atopar os resultados da túa procura a continuación. Se non atopaches o que estabas a procurar, podes crear ou editar a páxina co nome relacionado coa túa procura empregando o botón axeitado.
+Podes atopar os resultados da túa procura a continuación. @CREATEPAGEINFO@
===== Resultados =====
diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php
index 101102b48..5e2ecbdff 100644
--- a/inc/lang/he/lang.php
+++ b/inc/lang/he/lang.php
@@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'מצטערים, הסיסמה שגויה';
$lang['minoredit'] = 'שינוים מזעריים';
$lang['draftdate'] = 'הטיוטה נשמרה אוטומטית ב־';
$lang['nosecedit'] = 'הדף השתנה בינתיים, הקטע שערכת אינו מעודכן - העמוד כולו נטען במקום זאת.';
+$lang['searchcreatepage'] = 'אם לא נמצאו דפים בחיפוש, לחיצה על הכפתור "עריכה" תיצור דף חדש על שם מילת החיפוש שהוזנה.';
$lang['regmissing'] = 'עליך למלא את כל השדות, עמך הסליחה.';
$lang['reguexists'] = 'משתמש בשם זה כבר נרשם, עמך הסליחה.';
$lang['regsuccess'] = 'ההרשמה הצליחה, המשתמש נרשם והודעה נשלחה בדוא״ל.';
diff --git a/inc/lang/he/searchpage.txt b/inc/lang/he/searchpage.txt
index aed23be24..78839c371 100644
--- a/inc/lang/he/searchpage.txt
+++ b/inc/lang/he/searchpage.txt
@@ -1,5 +1,5 @@
====== חיפוש ======
-ניתן לראות את תוצאות החיפוש למטה. אם לא נמצאו דפים בחיפוש, לחיצה על הכפתור "עריכה" תיצור דף חדש על שם מילת החיפוש שהוזנה.
+ניתן לראות את תוצאות החיפוש למטה. @CREATEPAGEINFO@
===== תוצאות ===== \ No newline at end of file
diff --git a/inc/lang/hr/adminplugins.txt b/inc/lang/hr/adminplugins.txt
index 556ffda0b..5a7656d27 100644
--- a/inc/lang/hr/adminplugins.txt
+++ b/inc/lang/hr/adminplugins.txt
@@ -1 +1 @@
-===== Dodatni Pluginovi ===== \ No newline at end of file
+===== Dodatni dodatci ===== \ No newline at end of file
diff --git a/inc/lang/hr/backlinks.txt b/inc/lang/hr/backlinks.txt
index e7115a6b6..a78b9213e 100644
--- a/inc/lang/hr/backlinks.txt
+++ b/inc/lang/hr/backlinks.txt
@@ -1,3 +1,3 @@
-====== Linkovi na stranicu ======
+====== Veze na stranicu ======
-Slijedi spisak svih dokumenata koji imaju link na trenutni.
+Slijedi spisak svih stanica koje imaju vezu na trenutnu stranicu.
diff --git a/inc/lang/hr/edit.txt b/inc/lang/hr/edit.txt
index 8cd57d524..bce1abeea 100644
--- a/inc/lang/hr/edit.txt
+++ b/inc/lang/hr/edit.txt
@@ -1 +1 @@
-Nakon što ste napravili sve potrebne promjene - odaberite ''Snimi'' za snimanje dokumenta.
+Uredite stranicu i pritisnite "Snimi". Pogledajte [[wiki:syntax]] za Wiki sintaksu. Molimo izmijenite samo ako možete unaprijediti sadržaj. Ako trebate testirati ili naučiti kako se nešto radi, molimo koristite za to namijenjene stranice kao što je [[playground:playground|igraonica]].
diff --git a/inc/lang/hr/index.txt b/inc/lang/hr/index.txt
index 9c30a805c..4395994c4 100644
--- a/inc/lang/hr/index.txt
+++ b/inc/lang/hr/index.txt
@@ -1 +1,3 @@
-====== Indeks ======
+====== Mapa stranica ======
+
+Ovo je mapa svih dostupnih stranica poredanih po [[doku>namespaces|imenskom prostoru]].
diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php
index 6a3fa20e2..c3cf6d822 100644
--- a/inc/lang/hr/lang.php
+++ b/inc/lang/hr/lang.php
@@ -16,42 +16,42 @@ $lang['doublequoteclosing'] = '”';
$lang['singlequoteopening'] = '‘';
$lang['singlequoteclosing'] = '’';
$lang['apostrophe'] = '\'';
-$lang['btn_edit'] = 'Izmijeni dokument';
-$lang['btn_source'] = 'Prikaži kod dokumenta';
+$lang['btn_edit'] = 'Izmijeni stranicu';
+$lang['btn_source'] = 'Prikaži kod stranice';
$lang['btn_show'] = 'Prikaži dokument';
-$lang['btn_create'] = 'Novi dokument';
+$lang['btn_create'] = 'Stvori ovu stranicu';
$lang['btn_search'] = 'Pretraži';
$lang['btn_save'] = 'Spremi';
$lang['btn_preview'] = 'Prikaži';
$lang['btn_top'] = 'Na vrh';
$lang['btn_newer'] = '<< noviji';
$lang['btn_older'] = 'stariji >>';
-$lang['btn_revs'] = 'Stare inačice';
+$lang['btn_revs'] = 'Stare promjene';
$lang['btn_recent'] = 'Nedavne izmjene';
-$lang['btn_upload'] = 'Postavi';
+$lang['btn_upload'] = 'Učitaj';
$lang['btn_cancel'] = 'Odustani';
-$lang['btn_index'] = 'Indeks';
-$lang['btn_secedit'] = 'Izmjeni';
+$lang['btn_index'] = 'Mapa lokacije';
+$lang['btn_secedit'] = 'Uredi';
$lang['btn_login'] = 'Prijavi se';
$lang['btn_logout'] = 'Odjavi se';
$lang['btn_admin'] = 'Administriranje';
-$lang['btn_update'] = 'Ažuriraj';
+$lang['btn_update'] = 'Dopuni';
$lang['btn_delete'] = 'Obriši';
-$lang['btn_back'] = 'Povratak';
+$lang['btn_back'] = 'Nazad';
$lang['btn_backlink'] = 'Povratni linkovi';
-$lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik';
-$lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta';
-$lang['btn_profile'] = 'Ažuriraj profil';
-$lang['btn_reset'] = 'Poništi promjene';
+$lang['btn_backtomedia'] = 'Natrag na odabir datoteka';
+$lang['btn_subscribe'] = 'Uređivanje pretplata';
+$lang['btn_profile'] = 'Dopuni profil';
+$lang['btn_reset'] = 'Poništi';
$lang['btn_resendpwd'] = 'Postavi novu lozinku';
$lang['btn_draft'] = 'Uredi nacrt dokumenta';
-$lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta';
-$lang['btn_draftdel'] = 'Obriši nacrt dokumenta';
+$lang['btn_recover'] = 'Vrati nacrt stranice';
+$lang['btn_draftdel'] = 'Obriši nacrt stranice';
$lang['btn_revert'] = 'Vrati';
$lang['btn_register'] = 'Registracija';
$lang['btn_apply'] = 'Primjeni';
$lang['btn_media'] = 'Upravitelj datoteka';
-$lang['btn_deleteuser'] = 'Ukloni mojeg korisnika';
+$lang['btn_deleteuser'] = 'Ukloni mog korisnika';
$lang['btn_img_backto'] = 'Povratak na %s';
$lang['btn_mediaManager'] = 'Pogledaj u upravitelju datoteka';
$lang['loggedinas'] = 'Prijavljen kao:';
@@ -59,16 +59,17 @@ $lang['user'] = 'Korisničko ime';
$lang['pass'] = 'Lozinka';
$lang['newpass'] = 'Nova lozinka';
$lang['oldpass'] = 'Potvrdi trenutnu lozinku';
-$lang['passchk'] = 'Ponoviti';
+$lang['passchk'] = 'još jednom';
$lang['remember'] = 'Zapamti me';
$lang['fullname'] = 'Ime i prezime';
-$lang['email'] = 'Email';
+$lang['email'] = 'E-pošta';
$lang['profile'] = 'Korisnički profil';
$lang['badlogin'] = 'Ne ispravno korisničko ime ili lozinka.';
$lang['badpassconfirm'] = 'Nažalost, lozinka nije ispravna';
$lang['minoredit'] = 'Manje izmjene';
-$lang['draftdate'] = 'Nacrt dokumenta je automatski spremljen u ';
+$lang['draftdate'] = 'Nacrt promjena automatski spremljen u';
$lang['nosecedit'] = 'Stranica se u međuvremenu promijenila. Informacija o odjeljku je ostarila pa je učitana kompletna stranica.';
+$lang['searchcreatepage'] = 'Ako ne možete naći što tražite, možete urediti ili stvoriti novu stranicu s odgovarajućim alatom.';
$lang['regmissing'] = 'Morate popuniti sva polja.';
$lang['reguexists'] = 'Korisnik s tim korisničkim imenom već postoji.';
$lang['regsuccess'] = 'Korisnik je uspješno stvoren i poslana je lozinka emailom.';
@@ -80,7 +81,7 @@ $lang['regpwmail'] = 'Vaša DokuWiki lozinka';
$lang['reghere'] = 'Još uvijek nemate korisnički račun? Registrirajte se.';
$lang['profna'] = 'Ovaj wiki ne dopušta izmjene korisničkog profila.';
$lang['profnochange'] = 'Nema izmjena.';
-$lang['profnoempty'] = 'Prazno korisničko ime ili email nisu dopušteni.';
+$lang['profnoempty'] = 'Prazno korisničko ime ili e-pošta nisu dopušteni.';
$lang['profchanged'] = 'Korisnički profil je uspješno izmijenjen.';
$lang['profnodelete'] = 'Ovaj wiki ne podržava brisanje korisnika';
$lang['profdeleteuser'] = 'Obriši korisnika';
@@ -88,22 +89,22 @@ $lang['profdeleted'] = 'Vaš korisnik je obrisan s ovog wiki-a';
$lang['profconfdelete'] = 'Želim ukloniti mojeg korisnika s ovog wiki-a. <br/> Ova akcija se ne može poništiti.';
$lang['profconfdeletemissing'] = 'Kvačica za potvrdu nije označena';
$lang['pwdforget'] = 'Izgubili ste lozinku? Zatražite novu';
-$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke emailom.';
+$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke e-poštom.';
$lang['resendpwd'] = 'Postavi novu lozinku za';
$lang['resendpwdmissing'] = 'Ispunite sva polja.';
$lang['resendpwdnouser'] = 'Nije moguće pronaći korisnika.';
$lang['resendpwdbadauth'] = 'Neispravan autorizacijski kod. Provjerite da li ste koristili potpun potvrdni link.';
-$lang['resendpwdconfirm'] = 'Potvrdni link je poslan emailom.';
-$lang['resendpwdsuccess'] = 'Nova lozinka je poslana emailom.';
+$lang['resendpwdconfirm'] = 'Potvrdni link je poslan e-poštom.';
+$lang['resendpwdsuccess'] = 'Nova lozinka je poslana e-poštom.';
$lang['license'] = 'Osim na mjestima gdje je naznačeno drugačije, sadržaj ovog wikija je licenciran sljedećom licencom:';
$lang['licenseok'] = 'Pažnja: promjenom ovog dokumenta pristajete licencirati sadržaj sljedećom licencom: ';
$lang['searchmedia'] = 'Traži naziv datoteke:';
$lang['searchmedia_in'] = 'Traži u %s';
-$lang['txt_upload'] = 'Odaberite datoteku za postavljanje:';
-$lang['txt_filename'] = 'Postaviti kao (nije obavezno):';
+$lang['txt_upload'] = 'Odaberite datoteku za učitavanje:';
+$lang['txt_filename'] = 'Učitaj kao (nije obavezno):';
$lang['txt_overwrt'] = 'Prepiši postojeću datoteku';
$lang['maxuploadsize'] = 'Moguće je učitati maks. %s po datoteci.';
-$lang['lockedby'] = 'Zaključao:';
+$lang['lockedby'] = 'Trenutno zaključao:';
$lang['lockexpire'] = 'Zaključano do:';
$lang['js']['willexpire'] = 'Dokument kojeg mijenjate će biti zaključan još 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".';
$lang['js']['notsavedyet'] = 'Vaše izmjene će se izgubiti.
@@ -149,16 +150,16 @@ $lang['js']['media_cancel'] = 'ukloni';
$lang['js']['media_overwrt'] = 'Prepiši preko postojeće datoteke';
$lang['rssfailed'] = 'Došlo je do greške prilikom preuzimanja feed-a: ';
$lang['nothingfound'] = 'Traženi dokumetni nisu pronađeni.';
-$lang['mediaselect'] = 'Mediafile datoteke';
-$lang['fileupload'] = 'Mediafile postavljanje';
-$lang['uploadsucc'] = 'Postavljanje uspješno';
-$lang['uploadfail'] = 'Neuspješno postavljanje. Možda dozvole na poslužitelju nisu ispravne?';
-$lang['uploadwrong'] = 'Postavljanje nije dopušteno. Nastavak datoteke je zabranjen!';
+$lang['mediaselect'] = 'Datoteke';
+$lang['fileupload'] = 'Učitavanje datoteka';
+$lang['uploadsucc'] = 'Učitavanje uspješno';
+$lang['uploadfail'] = 'Neuspješno učitavanje. Možda dozvole na poslužitelju nisu ispravne?';
+$lang['uploadwrong'] = 'Učitavanje nije dopušteno. Nastavak datoteke je zabranjen!';
$lang['uploadexist'] = 'Datoteka već postoji.';
-$lang['uploadbadcontent'] = 'Postavljeni sadržaj ne odgovara ekstenziji %s datoteke.';
-$lang['uploadspam'] = 'Postavljanje je blokirano spam crnom listom.';
-$lang['uploadxss'] = 'Postavljanje je blokirano zbog mogućeg zlonamjernog sadržaja.';
-$lang['uploadsize'] = 'Postavljena datoteka je prevelika (max. %s)';
+$lang['uploadbadcontent'] = 'Učitani sadržaj ne odgovara ekstenziji %s datoteke.';
+$lang['uploadspam'] = 'Učitavanje je spriječeno od spam crne liste.';
+$lang['uploadxss'] = 'Učitavanje je spriječeno zbog mogućeg zlonamjernog sadržaja.';
+$lang['uploadsize'] = 'Učitana datoteka je prevelika (max. %s)';
$lang['deletesucc'] = 'Datoteka "%s" je obrisana.';
$lang['deletefail'] = '"%s" se ne može obrisati - provjerite dozvole na poslužitelju.';
$lang['mediainuse'] = 'Datoteka "%s" nije obrisana - još uvijek se koristi.';
@@ -166,10 +167,10 @@ $lang['namespaces'] = 'Imenski prostori';
$lang['mediafiles'] = 'Datoteke u';
$lang['accessdenied'] = 'Nemate potrebne dozvole za pregled ove stranice.';
$lang['mediausage'] = 'Koristi sljedeću sintaksu za referenciranje ove datoteke:';
-$lang['mediaview'] = 'Pregledaj originalnu datoteku';
+$lang['mediaview'] = 'Vidi izvornu datoteku';
$lang['mediaroot'] = 'root';
$lang['mediaupload'] = 'Postavi datoteku u odabrani imenski prostor. Podimenski prostori se stvaraju dodavanjem istih kao prefiks naziva datoteke u "Postavi kao" polju, tako da se odvoje dvotočkama.';
-$lang['mediaextchange'] = 'Ekstenzija datoteke promijenjena iz .%s u .%s!';
+$lang['mediaextchange'] = 'Nastavak datoteke promijenjen iz .%s u .%s!';
$lang['reference'] = 'Reference za';
$lang['ref_inuse'] = 'Datoteka se ne može obrisati jer se još uvijek koristi u sljedećim dokumentima:';
$lang['ref_hidden'] = 'Neke reference se nalaze na dokumentima koje nemate dozvolu čitati';
@@ -178,25 +179,25 @@ $lang['quickhits'] = 'Pronađeno po nazivima dokumenata';
$lang['toc'] = 'Sadržaj';
$lang['current'] = 'trenutno';
$lang['yours'] = 'Vaša inačica';
-$lang['diff'] = 'Prikaži razlike u odnosu na trenutnu inačicu';
-$lang['diff2'] = 'Pokaži razlike između odabranih inačica';
-$lang['difflink'] = 'Poveznica na ovaj prikaz usporedbe';
-$lang['diff_type'] = 'Razlike u prikazu:';
+$lang['diff'] = 'Prikaži razlike u odnosu na zadnje stanje';
+$lang['diff2'] = 'Pokaži razlike između odabranih izmjena';
+$lang['difflink'] = 'Poveznica na ovu usporedbu';
+$lang['diff_type'] = 'Vidi razlike:';
$lang['diff_inline'] = 'U istoj razini';
$lang['diff_side'] = 'Usporedo';
-$lang['diffprevrev'] = 'Prošla verzija';
-$lang['diffnextrev'] = 'Novija verzija';
-$lang['difflastrev'] = 'Zadnja verzija';
-$lang['diffbothprevrev'] = 'Prošle verzije na obje strane';
-$lang['diffbothnextrev'] = 'Novije verzije na obje strane';
+$lang['diffprevrev'] = 'Starija izmjena';
+$lang['diffnextrev'] = 'Novija izmjena';
+$lang['difflastrev'] = 'Zadnja izmjena';
+$lang['diffbothprevrev'] = 'Starije izmjene na obje strane';
+$lang['diffbothnextrev'] = 'Novije izmjene na obje strane';
$lang['line'] = 'Redak';
-$lang['breadcrumb'] = 'Putanja:';
+$lang['breadcrumb'] = 'Zadnje viđeno:';
$lang['youarehere'] = 'Vi ste ovdje:';
$lang['lastmod'] = 'Zadnja izmjena:';
$lang['by'] = 'od';
$lang['deleted'] = 'obrisano';
$lang['created'] = 'stvoreno';
-$lang['restored'] = 'vraćena prijašnja inačica (%s)';
+$lang['restored'] = 'vraćeno na prijašnju izmjenu (%s)';
$lang['external_edit'] = 'vanjsko uređivanje';
$lang['summary'] = 'Sažetak izmjena';
$lang['noflash'] = 'Za prikazivanje ovog sadržaja potreban je <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>';
@@ -211,33 +212,33 @@ $lang['mail_newpage'] = 'stranica dodana:';
$lang['mail_changed'] = 'stranica izmjenjena:';
$lang['mail_subscribe_list'] = 'stranice promijenjene u imenskom prostoru:';
$lang['mail_new_user'] = 'novi korisnik:';
-$lang['mail_upload'] = 'datoteka postavljena:';
+$lang['mail_upload'] = 'datoteka učitana:';
$lang['changes_type'] = 'Vidi promjene od';
$lang['pages_changes'] = 'Stranice';
-$lang['media_changes'] = 'Medijske datoteke';
+$lang['media_changes'] = 'Datoteke';
$lang['both_changes'] = 'Zajedno stranice i datoteke';
$lang['qb_bold'] = 'Podebljani tekst';
$lang['qb_italic'] = 'Ukošeni tekst';
$lang['qb_underl'] = 'Podcrtani tekst';
$lang['qb_code'] = 'Kod';
$lang['qb_strike'] = 'Precrtani tekst';
-$lang['qb_h1'] = 'Naslov - razina 1';
-$lang['qb_h2'] = 'Naslov - razina 2';
-$lang['qb_h3'] = 'Naslov - razina 3';
-$lang['qb_h4'] = 'Naslov - razina 4';
-$lang['qb_h5'] = 'Naslov - razina 5';
+$lang['qb_h1'] = 'Naslov 1. razine';
+$lang['qb_h2'] = 'Naslov 2. razine';
+$lang['qb_h3'] = 'Naslov 3. razine';
+$lang['qb_h4'] = 'Naslov 4. razine';
+$lang['qb_h5'] = 'Naslov 5. razine';
$lang['qb_h'] = 'Naslov';
$lang['qb_hs'] = 'Odaberite naslov';
$lang['qb_hplus'] = 'Naslov više razine';
$lang['qb_hminus'] = 'Naslov niže razine';
$lang['qb_hequal'] = 'Naslov iste razine';
-$lang['qb_link'] = 'Interni link';
-$lang['qb_extlink'] = 'Vanjski link';
+$lang['qb_link'] = 'Interna poveznica';
+$lang['qb_extlink'] = 'Vanjska poveznica';
$lang['qb_hr'] = 'Vodoravna crta';
-$lang['qb_ol'] = 'Pobrojana lista';
-$lang['qb_ul'] = 'Lista';
-$lang['qb_media'] = 'Dodaj slike i ostale datoteke';
-$lang['qb_sig'] = 'Potpis';
+$lang['qb_ol'] = 'Element brojane liste';
+$lang['qb_ul'] = 'Element obične liste';
+$lang['qb_media'] = 'Dodaj slike i ostale datoteke (prikaz u novom prozoru)';
+$lang['qb_sig'] = 'Ubaci potpis';
$lang['qb_smileys'] = 'Smiješkići';
$lang['qb_chars'] = 'Posebni znakovi';
$lang['upperns'] = 'Skoči u nadređeni imenski prostor';
@@ -269,19 +270,20 @@ $lang['subscr_m_new_header'] = 'Dodaj pretplatu';
$lang['subscr_m_current_header'] = 'Trenutne pretplate';
$lang['subscr_m_unsubscribe'] = 'Odjavi pretplatu';
$lang['subscr_m_subscribe'] = 'Pretplati se';
-$lang['subscr_m_receive'] = 'Primaj';
-$lang['subscr_style_every'] = 'email za svaku promjenu';
-$lang['subscr_style_digest'] = 'email s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)';
-$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnjeg primljenog email-a (svaka %.2f dana)';
+$lang['subscr_m_receive'] = 'Primi';
+$lang['subscr_style_every'] = 'e-pošta za svaku promjenu';
+$lang['subscr_style_digest'] = 'e-pošta s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)';
+$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnje primljene e-pošte (svaka %.2f dana)';
$lang['authtempfail'] = 'Autentifikacija korisnika je privremeno nedostupna. Molimo Vas da kontaktirate administratora.';
$lang['authpwdexpire'] = 'Vaša lozinka će isteći za %d dana, trebate ju promijeniti.';
$lang['i_chooselang'] = 'Izaberite vaš jezik';
-$lang['i_installer'] = 'DokuWiki instalacija';
+$lang['i_installer'] = 'DokuWiki postavljanje';
$lang['i_wikiname'] = 'Naziv Wikija';
$lang['i_enableacl'] = 'Omogući ACL (preporučeno)';
$lang['i_superuser'] = 'Superkorisnik';
$lang['i_problems'] = 'Instalacija je pronašla probleme koji su naznačeni ispod. Nije moguće nastaviti dok se ti problemi ne riješe.';
-$lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta ce raditi samo sa novim i nepromijenjenim instalacijama dokuWikija. Preporucujemo da ili re-ekstraktirate fajlove iz downloadovanog paketa ili konsultujete pune a href="http://dokuwiki.org/install">Instrukcije za instalaciju Dokuwikija</a>';
+$lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta raditi će samo sa novim i neizmijenjenim DokuWiki instalacijama.
+ Molimo ponovno prekopirajte datoteke iz preuzetoga paketa ili pogledajte detaljno <a href="http://dokuwiki.org/install">Uputstvo za postavljanje DokuWiki-a</a>';
$lang['i_funcna'] = 'PHP funkcija <code>%s</code> nije dostupna. Možda ju je vaš pružatelj hostinga onemogućio iz nekog razloga?';
$lang['i_phpver'] = 'Vaša PHP verzija <code>%s</code> je niža od potrebne <code>%s</code>. Trebate nadograditi vašu PHP instalaciju.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload mora biti onemogućena u php.ini da bi ste pokrenuli DokuWiki.';
@@ -321,15 +323,15 @@ $lang['media_list_thumbs'] = 'Ikone';
$lang['media_list_rows'] = 'Redovi';
$lang['media_sort_name'] = 'Naziv';
$lang['media_sort_date'] = 'Datum';
-$lang['media_namespaces'] = 'Odaberi namespace';
-$lang['media_files'] = 'Datoteka u %s';
+$lang['media_namespaces'] = 'Odaberi imenski prostor';
+$lang['media_files'] = 'Datoteke u %s';
$lang['media_upload'] = 'Učitaj u %s';
$lang['media_search'] = 'Potraži u %s';
$lang['media_view'] = '%s';
$lang['media_viewold'] = '%s na %s';
$lang['media_edit'] = 'Uredi %s';
$lang['media_history'] = 'Povijest %s';
-$lang['media_meta_edited'] = 'meta podatci uređeni';
+$lang['media_meta_edited'] = 'meta podaci uređeni';
$lang['media_perm_read'] = 'Nažalost, nemate prava za čitanje datoteka.';
$lang['media_perm_upload'] = 'Nažalost, nemate prava za učitavanje datoteka.';
$lang['media_update'] = 'Učitaj novu verziju';
@@ -338,3 +340,5 @@ $lang['currentns'] = 'Tekući imenički prostor';
$lang['searchresult'] = 'Rezultati pretraživanja';
$lang['plainhtml'] = 'Čisti HTML';
$lang['wikimarkup'] = 'Wiki kod';
+$lang['page_nonexist_rev'] = 'Stranica ne postoji na %s. Ona je naknadno napravljena na <a href="%s">%s</a>.';
+$lang['unable_to_parse_date'] = 'Ne mogu analizirati parametar "%s".';
diff --git a/inc/lang/hr/revisions.txt b/inc/lang/hr/revisions.txt
index d224a56f3..67d4cb89f 100644
--- a/inc/lang/hr/revisions.txt
+++ b/inc/lang/hr/revisions.txt
@@ -1,3 +1,3 @@
====== Stare verzije ======
-Slijedi spisak starih verzija za traženi dokument.
+Slijedi spisak starih verzija za traženi dokument. Da bi ste se vratili na neku od njih, odaberite ju, pritisnite Uređivanje i snimite ju.
diff --git a/inc/lang/hr/searchpage.txt b/inc/lang/hr/searchpage.txt
index 91d9f9c0a..90d2ffdf4 100644
--- a/inc/lang/hr/searchpage.txt
+++ b/inc/lang/hr/searchpage.txt
@@ -1 +1,5 @@
-====== Rezultati pretraživanja ======
+====== Pretraživanja ======
+
+Možete naći rezultat vaše pretrage u nastavku. @CREATEPAGEINFO@
+
+====== Rezultati ======
diff --git a/inc/lang/hr/showrev.txt b/inc/lang/hr/showrev.txt
index aba2c0db0..86c1a0295 100644
--- a/inc/lang/hr/showrev.txt
+++ b/inc/lang/hr/showrev.txt
@@ -1,2 +1,2 @@
-**Ovo je stara verzija dokumenta!**
+**Ovo je stara izmjena dokumenta!**
----
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index eb4b4601a..bdc78f68d 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -75,6 +75,7 @@ $lang['badpassconfirm'] = 'Hibás jelszó';
$lang['minoredit'] = 'Apróbb változások';
$lang['draftdate'] = 'Piszkozat elmentve:';
$lang['nosecedit'] = 'Időközben megváltozott az oldal, emiatt a szakasz nem friss. Töltsd újra az egész oldalt!';
+$lang['searchcreatepage'] = "Ha nem találtad meg amit kerestél, akkor létrehozhatsz egy új oldalt a keresésed alapján ''Az oldal szerkesztése'' gombbal.";
$lang['regmissing'] = 'Sajnáljuk, az összes mezőt ki kell töltened.';
$lang['reguexists'] = 'Sajnáljuk, ilyen azonosítójú felhasználónk már van.';
$lang['regsuccess'] = 'A felhasználói azonosítót létrehoztuk. A jelszót postáztuk.';
diff --git a/inc/lang/hu/searchpage.txt b/inc/lang/hu/searchpage.txt
index ffde87b66..7e186e5cb 100644
--- a/inc/lang/hu/searchpage.txt
+++ b/inc/lang/hu/searchpage.txt
@@ -1,5 +1,5 @@
====== Keresés ======
-A keresés eredményét lentebb láthatod. Ha nem találtad meg amit kerestél, akkor létrehozhatsz egy új oldalt a keresésed alapján ''Az oldal szerkesztése'' gombbal.
+A keresés eredményét lentebb láthatod. @CREATEPAGEINFO@
===== Eredmény(ek) ===== \ No newline at end of file
diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php
index cabbbab93..a533883b6 100644
--- a/inc/lang/ia/lang.php
+++ b/inc/lang/ia/lang.php
@@ -64,6 +64,7 @@ $lang['badlogin'] = 'Le nomine de usator o le contrasigno es incorr
$lang['minoredit'] = 'Modificationes minor';
$lang['draftdate'] = 'Version provisori automaticamente salveguardate le';
$lang['nosecedit'] = 'Le pagina ha essite modificate intertanto. Le informationes del section es ora obsolete, dunque le pagina complete ha essite cargate in su loco.';
+$lang['searchcreatepage'] = 'Si tu non ha trovate lo que tu cerca, tu pote crear o modificar le pagina nominate secundo tu consulta con le button appropriate.';
$lang['regmissing'] = 'Es necessari completar tote le campos.';
$lang['reguexists'] = 'Regrettabilemente, un usator con iste nomine ja existe.';
$lang['regsuccess'] = 'Le conto ha essite create e le contrasigno ha essite inviate per e-mail.';
diff --git a/inc/lang/ia/searchpage.txt b/inc/lang/ia/searchpage.txt
index c53683371..a8f7fce51 100644
--- a/inc/lang/ia/searchpage.txt
+++ b/inc/lang/ia/searchpage.txt
@@ -1,5 +1,5 @@
====== Recerca ======
-Le resultatos de tu recerca se trova hic infra. Si tu non ha trovate lo que tu cerca, tu pote crear o modificar le pagina nominate secundo tu consulta con le button appropriate.
+Le resultatos de tu recerca se trova hic infra. @CREATEPAGEINFO@
===== Resultatos ===== \ No newline at end of file
diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php
index ff77cf24d..dc4ca00e0 100644
--- a/inc/lang/id/lang.php
+++ b/inc/lang/id/lang.php
@@ -69,6 +69,7 @@ $lang['badlogin'] = 'Maaf, username atau password salah.';
$lang['badpassconfirm'] = 'Maaf, password salah';
$lang['minoredit'] = 'Perubahan Minor';
$lang['draftdate'] = 'Simpan draft secara otomatis';
+$lang['searchcreatepage'] = 'Jika Anda tidak menemukan apa yang diinginkan, Anda dapat membuat halaman baru, dengan nama sesuai "text pencarian" Anda. Gunakan tombol "Edit halaman ini".';
$lang['regmissing'] = 'Maaf, Anda harus mengisi semua field.';
$lang['reguexists'] = 'Maaf, user dengan user login ini telah ada.';
$lang['regsuccess'] = 'User telah didaftarkan dan password telah dikirim ke email Anda.';
diff --git a/inc/lang/id/searchpage.txt b/inc/lang/id/searchpage.txt
index c47bed7dc..b3fb56580 100644
--- a/inc/lang/id/searchpage.txt
+++ b/inc/lang/id/searchpage.txt
@@ -1,5 +1,5 @@
====== Pencarian ======
-Anda dapat menemukan hasil pencarian dibawah ini. Jika Anda tidak menemukan apa yang diinginkan, Anda dapat membuat halaman baru, dengan nama sesuai "text pencarian" Anda. Gunakan tombol "Edit halaman ini".
+Anda dapat menemukan hasil pencarian dibawah ini. @CREATEPAGEINFO@
===== Hasil Pencarian ===== \ No newline at end of file
diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php
index f59a7b948..c6b99d5b5 100644
--- a/inc/lang/it/lang.php
+++ b/inc/lang/it/lang.php
@@ -20,6 +20,7 @@
* @author Mirko <malisan.mirko@gmail.com>
* @author Francesco <francesco.cavalli@hotmail.com>
* @author Fabio <fabioslurp@yahoo.it>
+ * @author Torpedo <dgtorpedo@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -81,6 +82,7 @@ $lang['badpassconfirm'] = 'La password è errata';
$lang['minoredit'] = 'Modifiche minori';
$lang['draftdate'] = 'Bozza salvata in automatico il';
$lang['nosecedit'] = 'La pagina è stata modificata nel frattempo; è impossibile modificare solo la sezione scelta, quindi è stata caricata la pagina intera.';
+$lang['searchcreatepage'] = 'Se non hai trovato quello che cercavi, puoi creare una nuova pagina con questo titolo usando il pulsante \'\'Crea questa pagina\'\'.';
$lang['regmissing'] = 'Devi riempire tutti i campi.';
$lang['reguexists'] = 'Il nome utente inserito esiste già.';
$lang['regsuccess'] = 'L\'utente è stato creato. La password è stata spedita via email.';
@@ -151,6 +153,7 @@ $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?';
$lang['js']['restore_confirm'] = 'Vuoi davvero ripristinare questa versione?';
$lang['js']['media_diff'] = 'Guarda le differenze:';
$lang['js']['media_diff_both'] = 'Fianco a Fianco';
+$lang['js']['media_diff_opacity'] = 'Trasparire';
$lang['js']['media_diff_portions'] = 'rubare';
$lang['js']['media_select'] = 'Seleziona files..';
$lang['js']['media_upload_btn'] = 'Upload';
@@ -198,6 +201,8 @@ $lang['diff_side'] = 'Fianco a Fianco';
$lang['diffprevrev'] = 'Revisione precedente';
$lang['diffnextrev'] = 'Prossima revisione';
$lang['difflastrev'] = 'Ultima revisione';
+$lang['diffbothprevrev'] = 'Entrambe le parti precedenti la revisione';
+$lang['diffbothnextrev'] = 'Entrambe le parti successive la revisione';
$lang['line'] = 'Linea';
$lang['breadcrumb'] = 'Traccia:';
$lang['youarehere'] = 'Ti trovi qui:';
@@ -295,6 +300,7 @@ Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le
<a href="http://dokuwiki.org/install">istruzioni per l\'installazione di Dokuwiki</a>';
$lang['i_funcna'] = 'La funzione PHP <code>%s</code> non è disponibile. Forse è stata disabilitata dal tuo provider per qualche motivo?';
$lang['i_phpver'] = 'La versione di PHP <code>%s</code> è inferiore a quella richiesta <code>%s</code>. Devi aggiornare l\'installazione di PHP.';
+$lang['i_mbfuncoverload'] = 'mbstring.func_overload deve essere disabilitato in php.ini per eseguire DokuWiki.';
$lang['i_permfail'] = 'DokuWiki non può scrivere <code>%s</code>. E\' necessario correggere i permessi per questa directory!';
$lang['i_confexists'] = '<code>%s</code> esiste già';
$lang['i_writeerr'] = 'Impossibile creare <code>%s</code>. E\' necessario verificare i permessi della directory o del file oppure creare il file manualmente.';
@@ -347,3 +353,4 @@ $lang['media_restore'] = 'Ripristina questa versione';
$lang['currentns'] = 'Namespace corrente';
$lang['searchresult'] = 'Risultati della ricerca';
$lang['plainhtml'] = 'HTML';
+$lang['page_nonexist_rev'] = 'Pagina non esistente a %s. E\' stata creata successivamente a <a href="%s">%s</a>.';
diff --git a/inc/lang/it/searchpage.txt b/inc/lang/it/searchpage.txt
index 60a019c3e..6f269da01 100644
--- a/inc/lang/it/searchpage.txt
+++ b/inc/lang/it/searchpage.txt
@@ -1,5 +1,5 @@
====== Cerca ======
-Questi sono i risultati della ricerca. Se non hai trovato quello che cercavi, puoi creare una nuova pagina con questo titolo usando il pulsante ''Crea questa pagina''.
+Questi sono i risultati della ricerca. @CREATEPAGEINFO@
===== Risultati =====
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index 381863eb3..3a5f169e7 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -73,6 +73,7 @@ $lang['badpassconfirm'] = 'パスワードが間違っています。';
$lang['minoredit'] = '小変更';
$lang['draftdate'] = 'ドラフト保存日時:';
$lang['nosecedit'] = 'ページ内容が変更されていますがセクション情報が古いため、代わりにページ全体をロードしました。';
+$lang['searchcreatepage'] = 'もし、探しているものが見つからない場合、 検索キーワードにちなんだ名前の文書を作成もしくは編集を行ってください。';
$lang['regmissing'] = '全ての項目を入力してください。';
$lang['reguexists'] = 'このユーザー名は既に存在しています。';
$lang['regsuccess'] = '新しいユーザーが作成されました。パスワードは登録したメールアドレス宛てに送付されます。';
@@ -343,3 +344,5 @@ $lang['currentns'] = '現在の名前空間';
$lang['searchresult'] = '検索結果';
$lang['plainhtml'] = 'プレーンHTML';
$lang['wikimarkup'] = 'Wikiマークアップ';
+$lang['page_nonexist_rev'] = '指定ページ %s はありません。このリンク <a href="%s">%s</a> から作成できます。';
+$lang['unable_to_parse_date'] = 'パラメータ "%s" を処理できません。';
diff --git a/inc/lang/ja/searchpage.txt b/inc/lang/ja/searchpage.txt
index af312728b..80b0950c6 100644
--- a/inc/lang/ja/searchpage.txt
+++ b/inc/lang/ja/searchpage.txt
@@ -1,5 +1,5 @@
====== 検索 ======
-以下に検索結果を表示します。もし、探しているものが見つからない場合、 検索キーワードにちなんだ名前の文書を作成もしくは編集を行ってください。
+以下に検索結果を表示します。@CREATEPAGEINFO@
===== 結果 =====
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index ff5e66d9b..877c43de3 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -74,6 +74,7 @@ $lang['badpassconfirm'] = '죄송하지만 비밀번호가 잘못되었
$lang['minoredit'] = '사소한 바뀜';
$lang['draftdate'] = '초안 자동 저장 시간';
$lang['nosecedit'] = '한 동안 문서가 바뀌었으며, 문단 정보가 오래되어 문서 전체를 대신 열었습니다.';
+$lang['searchcreatepage'] = '만약 원하는 문서를 찾지 못했다면, \'\'문서 만들기\'\'나 \'\'문서 편집\'\'을 사용해 검색어와 같은 이름의 문서를 만들거나 편집할 수 있습니다.';
$lang['regmissing'] = '죄송하지만 모든 필드를 채워야 합니다.';
$lang['reguexists'] = '죄송하지만 같은 이름을 사용하는 사용자가 있습니다.';
$lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.';
@@ -136,7 +137,7 @@ $lang['js']['medialeft'] = '왼쪽으로 그림 배치';
$lang['js']['mediaright'] = '오른쪽으로 그림 배치';
$lang['js']['mediacenter'] = '가운데으로 그림 배치';
$lang['js']['medianoalign'] = '배치하지 않음';
-$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 마이크로소프트 인터넷 익스플로러에서만 동작합니다.\n그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.';
+$lang['js']['nosmblinks'] = 'Windows 공유 파일과의 연결은 Microsoft Internet Explorer에서만 동작합니다.\n그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.';
$lang['js']['linkwiz'] = '링크 마법사';
$lang['js']['linkto'] = '다음으로 연결:';
$lang['js']['del_confirm'] = '정말 선택된 항목을 삭제하겠습니까?';
@@ -280,11 +281,11 @@ $lang['subscr_style_list'] = '마지막 이메일 이후 바뀐 문서의
$lang['authtempfail'] = '사용자 인증을 일시적으로 사용할 수 없습니다. 만약 계속해서 문제가 발생한다면 위키 관리자에게 문의하시기 바랍니다.';
$lang['authpwdexpire'] = '비밀번호를 바꾼지 %d일이 지났으며, 비밀번호를 곧 바꿔야 합니다.';
$lang['i_chooselang'] = '사용할 언어를 선택하세요';
-$lang['i_installer'] = '도쿠위키 설치';
+$lang['i_installer'] = '도쿠위키 설치 관리자';
$lang['i_wikiname'] = '위키 이름';
$lang['i_enableacl'] = 'ACL 활성화 (권장)';
$lang['i_superuser'] = '슈퍼 사용자';
-$lang['i_problems'] = '설치하는 동안 아래와 같은 문제가 발생했습니다. 문제를 해결한 후 설치를 계속할 수 있습니다.';
+$lang['i_problems'] = '설치 관리자가 아래에 나와 있는 몇 가지 문제를 찾았습니다. 문제를 해결하지 전까지 설치를 계속할 수 없습니다.';
$lang['i_modified'] = '보안 상의 이유로 이 스크립트는 수정되지 않은 새 도쿠위키 설치에서만 동작됩니다.
다운로드한 압축 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/ko:install">도쿠위키 설치 과정</a>을 참고해서 설치하세요.';
$lang['i_funcna'] = '<code>%s</code> PHP 함수를 사용할 수 없습니다. 호스트 제공자가 어떤 이유에서인지 막아 놓았을지 모릅니다.';
@@ -295,8 +296,10 @@ $lang['i_confexists'] = '<code>%s</code>(은)는 이미 존재합니다
$lang['i_writeerr'] = '<code>%s</code>(을)를 만들 수 없습니다. 먼저 디렉터리/파일 권한을 확인하고 파일을 수동으로 만드세요.';
$lang['i_badhash'] = 'dokuwiki.php를 인식할 수 없거나 원본 파일이 아닙니다 (해시=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - 잘못되었거나 빈 값입니다';
-$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다. <a href="doku.php?id=wiki:welcome">새 도쿠위키</a>로 들어가세요.';
-$lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다. <a href="doku.php?id=wiki:welcome">새 도쿠위키</a>를 사용하기 전에 수동으로 문제를 해결해야 합니다.';
+$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다.
+<a href="doku.php?id=wiki:welcome">새 도쿠위키</a>로 들어가세요.';
+$lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다.
+<a href="doku.php?id=wiki:welcome">새 도쿠위키</a>를 사용하기 전에 수동으로 문제를 해결해야 합니다.';
$lang['i_policy'] = '초기 ACL 정책';
$lang['i_pol0'] = '열린 위키 (누구나 읽기, 쓰기, 올리기가 가능합니다)';
$lang['i_pol1'] = '공개 위키 (누구나 읽을 수 있지만, 등록된 사용자만 쓰기와 올리기가 가능합니다)';
@@ -343,3 +346,5 @@ $lang['currentns'] = '현재 이름공간';
$lang['searchresult'] = '검색 결과';
$lang['plainhtml'] = '일반 HTML';
$lang['wikimarkup'] = '위키 문법';
+$lang['page_nonexist_rev'] = '문서가 %s에 존재하지 않았습니다. 그 뒤로 <a href="%s">%s</a>에 만들어졌습니다.';
+$lang['unable_to_parse_date'] = '"%s" 변수에서 구문 분석할 수 없습니다.';
diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt
index 53faa04c6..6aa1c89af 100644
--- a/inc/lang/ko/searchpage.txt
+++ b/inc/lang/ko/searchpage.txt
@@ -1,5 +1,5 @@
====== 검색 ======
-아래에서 검색 결과를 찾을 수 있습니다. 만약 원하는 문서를 찾지 못했다면, ''문서 만들기''나 ''문서 편집''을 사용해 검색어와 같은 이름의 문서를 만들거나 편집할 수 있습니다.
+아래에서 검색 결과를 찾을 수 있습니다. @CREATEPAGEINFO@
-===== 결과 ===== \ No newline at end of file
+===== 결과 =====
diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php
index b1b733ec9..a3c91eee8 100644
--- a/inc/lang/ku/lang.php
+++ b/inc/lang/ku/lang.php
@@ -138,5 +138,6 @@ $lang['img_copyr'] = 'Copyright:';
$lang['img_format'] = 'Format:';
$lang['img_camera'] = 'Camera:';
$lang['img_keywords']= 'Keywords:';
+$lang['searchcreatepage'] = "Heke tiştek nehatibe dîtin, tu dikarî dest bi nivîsandina rûpelekê nû bikî. Ji bo vê, ''Vê rûpelê biguherîne'' bitikîne.";
//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/ku/searchpage.txt b/inc/lang/ku/searchpage.txt
index 6646228d5..f762b9873 100644
--- a/inc/lang/ku/searchpage.txt
+++ b/inc/lang/ku/searchpage.txt
@@ -1,5 +1,5 @@
====== Lêbigere ======
-Jêr encamên lêgerandina te tên nîşan dan. Heke tiştek nehatibe dîtin, tu dikarî dest bi nivîsandina rûpelekê nû bikî. Ji bo vê, ''Vê rûpelê biguherîne'' bitikîne.
+Jêr encamên lêgerandina te tên nîşan dan. @CREATEPAGEINFO@
===== Encam ===== \ No newline at end of file
diff --git a/inc/lang/la/searchpage.txt b/inc/lang/la/searchpage.txt
index 8e929110d..75fd7cd5b 100644
--- a/inc/lang/la/searchpage.txt
+++ b/inc/lang/la/searchpage.txt
@@ -1,5 +1,5 @@
====== Quaerere ======
-Responsiones in hac pagina uidere potes.
+Responsiones in hac pagina uidere potes. @CREATEPAGEINFO@
===== Responsiones ===== \ No newline at end of file
diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php
index a1b6ccf84..1090878e2 100644
--- a/inc/lang/lb/lang.php
+++ b/inc/lang/lb/lang.php
@@ -55,6 +55,7 @@ $lang['badlogin'] = 'Entschëllegt, de Benotzernumm oder d\'Passwue
$lang['minoredit'] = 'Kleng Ännerungen';
$lang['draftdate'] = 'Entworf automatesch gespäichert den';
$lang['nosecedit'] = 'D\'Säit gouf an Zwëschenzäit g\'ännert, Sektiounsinfo veralt. Ganz Säit gouf aplaz gelueden.';
+$lang['searchcreatepage'] = 'Wanns de net fënns wats de gesicht hues kanns de eng nei Säit mam Numm vun denger Sich uleeën.';
$lang['regmissing'] = 'Du muss all d\'Felder ausfëllen.';
$lang['reguexists'] = 'Et get schonn e Benotzer mat deem Numm.';
$lang['regsuccess'] = 'De Benotzer gouf erstallt an d\'Passwuert via Email geschéckt.';
diff --git a/inc/lang/lb/searchpage.txt b/inc/lang/lb/searchpage.txt
index 5e15a2c60..9f4e5475e 100644
--- a/inc/lang/lb/searchpage.txt
+++ b/inc/lang/lb/searchpage.txt
@@ -1,5 +1,5 @@
======Sich======
-Hei ënnendrënner sinn d'Resultater vun der Sich. Wanns de net fënns wats de gesicht hues kanns de eng nei Säit mam Numm vun denger Sich uleeën.
+Hei ënnendrënner sinn d'Resultater vun der Sich. @CREATEPAGEINFO@
=====Resultater===== \ No newline at end of file
diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php
index d6552d68c..d53a117f4 100644
--- a/inc/lang/lt/lang.php
+++ b/inc/lang/lt/lang.php
@@ -60,6 +60,7 @@ $lang['badlogin'] = 'Nurodėte blogą vartotojo vardą arba slapta
$lang['minoredit'] = 'Nedidelis pataisymas';
$lang['draftdate'] = 'Juodraštis automatiškai išsaugotas';
$lang['nosecedit'] = 'Puslapis buvo kažkieno pataisytas, teksto dalies informacija tapo pasenusi, todėl pakrautas visas puslapis.';
+$lang['searchcreatepage'] = 'Jeigu neradote to, ko ieškojote, galite sukurti naują puslapį šiuo pavadinimu paspausdami "Redaguoti šį puslapį".';
$lang['regmissing'] = 'Turite užpildyti visus laukus.';
$lang['reguexists'] = 'Vartotojas su pasirinktu prisijungimo vardu jau egzistuoja.';
$lang['regsuccess'] = 'Vartotojas sukurtas, slaptažodis išsiųstas el. paštu.';
diff --git a/inc/lang/lt/searchpage.txt b/inc/lang/lt/searchpage.txt
index a83a6a58a..f03f5f17b 100644
--- a/inc/lang/lt/searchpage.txt
+++ b/inc/lang/lt/searchpage.txt
@@ -1,5 +1,5 @@
====== Paieška ======
-Žemiau matote Jūsų atliktos paieškos rezultatus. Jeigu neradote to, ko ieškojote, galite sukurti naują puslapį šiuo pavadinimu paspausdami "Redaguoti šį puslapį".
+Žemiau matote Jūsų atliktos paieškos rezultatus. @CREATEPAGEINFO@
===== Rezultatai ===== \ No newline at end of file
diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php
index 15994afe6..ddc97fa89 100644
--- a/inc/lang/lv/lang.php
+++ b/inc/lang/lv/lang.php
@@ -65,6 +65,7 @@ $lang['badpassconfirm'] = 'Atvaino, aplama parole';
$lang['minoredit'] = 'Sīki labojumi';
$lang['draftdate'] = 'Melnraksts automātiski saglabāts';
$lang['nosecedit'] = 'Lapa pa šo laiku ir mainījusies, sekcijas informācija novecojusi. Ielādēta lapas pilnās versija.';
+$lang['searchcreatepage'] = 'Ja neatradi meklēto, nospiežot pogu "Labot lapu", vari izveidot jaunu lapu ar tevis meklētajiem atslēgvārdiem nosaukumā.';
$lang['regmissing'] = 'Atvaino, jāaizpilda visas ailes.';
$lang['reguexists'] = 'Atvaino, tāds lietotājs jau ir.';
$lang['regsuccess'] = 'Lietotājs izveidots. Parole nosūtīta pa pastu.';
diff --git a/inc/lang/lv/searchpage.txt b/inc/lang/lv/searchpage.txt
index 22eb55f04..a67f9f166 100644
--- a/inc/lang/lv/searchpage.txt
+++ b/inc/lang/lv/searchpage.txt
@@ -1,4 +1,5 @@
====== Meklēšana ======
-Te vari redzēt meklēšanas rezultātus. Ja neatradi meklēto, nospiežot pogu "Labot lapu", vari izveidot jaunu lapu ar tevis meklētajiem atslēgvārdiem nosaukumā.
+Te vari redzēt meklēšanas rezultātus. @CREATEPAGEINFO@
+
===== Atrasts =====
diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php
index 6239c01fe..b6e0cc6e0 100644
--- a/inc/lang/mg/lang.php
+++ b/inc/lang/mg/lang.php
@@ -117,5 +117,5 @@ $lang['qb_sig'] = 'Manisy sonia';
$lang['js']['del_confirm']= 'Hofafana ilay andalana?';
$lang['admin_register']= 'Ampio mpampiasa vaovao...';
-
+$lang['searchcreatepage'] = "Raha tsy nahita izay notadiavinao ianao, dia afaka mamorona pejy vaovao avy amin'ny teny nanaovanao fikarohana; Ampiasao ny bokotra ''Hanova ny pejy''.";
//Setup VIM: ex: et ts=2 :
diff --git a/inc/lang/mg/searchpage.txt b/inc/lang/mg/searchpage.txt
index 68c6271df..ef3ed8b19 100644
--- a/inc/lang/mg/searchpage.txt
+++ b/inc/lang/mg/searchpage.txt
@@ -2,6 +2,6 @@
Ireto ambany ireto ny valin'ny fikarohanao.
-Raha tsy nahita izay notadiavinao ianao, dia afaka mamorona pejy vaovao avy amin'ny teny nanaovanao fikarohana; Ampiasao ny bokotra ''Hanova ny pejy''.
+@CREATEPAGEINFO@
===== Vokatry ny fikarohana ===== \ No newline at end of file
diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php
index 72779dd10..7ebb14b93 100644
--- a/inc/lang/mr/lang.php
+++ b/inc/lang/mr/lang.php
@@ -68,6 +68,7 @@ $lang['badlogin'] = 'माफ़ करा, वापरकर्
$lang['minoredit'] = 'छोटे बदल';
$lang['draftdate'] = 'प्रत आपोआप सुरक्षित केल्याची तारीख';
$lang['nosecedit'] = 'मध्यंतरीच्या काळात हे पृष्ठ बदलले आहे.विभागाची माहिती जुनी झाली होती. त्याऐवजी सबंध पृष्ठ परत लोड केले आहे.';
+$lang['searchcreatepage'] = 'जर तुमची शोधत असलेली गोष्ट तुम्हाला सापडली नाही, तर योग्य बटण वापरून तुम्ही शोधत असलेल्या गोष्टीविषयी तुम्ही एखादे पान निर्माण किंवा संपादित करू शकता.';
$lang['regmissing'] = 'कृपया सर्व रकाने भरा.';
$lang['reguexists'] = 'या नावाने सदस्याची नोंदणी झालेली आहे, कृपया दुसरे सदस्य नाव निवडा.';
$lang['regsuccess'] = 'सदस्याची नोंदणी झाली आहे आणि परवलीचा शब्द इमेल केला आहे.';
diff --git a/inc/lang/mr/searchpage.txt b/inc/lang/mr/searchpage.txt
index 23e10b1d3..d41954b4a 100644
--- a/inc/lang/mr/searchpage.txt
+++ b/inc/lang/mr/searchpage.txt
@@ -1,5 +1,5 @@
====== शोध ======
-तुम्हाला खाली तुमच्या शोधाचे फलित दिसतील. जर तुमची शोधत असलेली गोष्ट तुम्हाला सापडली नाही, तर योग्य बटण वापरून तुम्ही शोधत असलेल्या गोष्टीविषयी तुम्ही एखादे पान निर्माण किंवा संपादित करू शकता.
+तुम्हाला खाली तुमच्या शोधाचे फलित दिसतील. @CREATEPAGEINFO@
====== फलित ====== \ No newline at end of file
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index ddf031242..d4efc89bd 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -58,6 +58,7 @@ $lang['badlogin'] = 'माफ गर्नुहोस् , प्
$lang['minoredit'] = 'सामान्य परिवर्तन';
$lang['draftdate'] = 'ड्राफ्ट स्वचालित रुपमा वचत भएको';
$lang['nosecedit'] = 'यो पृष्ठ यसै बखतमा परिवर्तन भयो, खण्ड जानकारी अध्यावधिक हुन सकेन र पूरै पृष्ठ लोड भयो । ';
+$lang['searchcreatepage'] = 'यदि तपाईले आफुले खोजेको पाउनुभएन भने, तपाईलेको उपयुक्त बटन प्रयोग गरी खोज सँग सम्बन्धित शिर्षकहरु भएका पृष्ठ सृजना या सम्पादन गर्न सक्नुहुन्छ ।';
$lang['regmissing'] = 'माफ गर्नुहोला , सबै ठाउमा भर्नुपर्नेछ ।';
$lang['reguexists'] = 'यो नामको प्रयोगकर्ता पहिले देखि रहेको छ।';
$lang['regsuccess'] = 'यो प्रयोगकर्ता बनाइएको छ र प्रवेशशव्द इमेलमा पठइएको छ।';
diff --git a/inc/lang/ne/searchpage.txt b/inc/lang/ne/searchpage.txt
index a8139f0ab..021306b4b 100644
--- a/inc/lang/ne/searchpage.txt
+++ b/inc/lang/ne/searchpage.txt
@@ -1,3 +1,5 @@
====== खोज ======
-तपाईले आफ्नो खोजको निम्न नतिजा पाउन सक्नुहुन्छ। यदि तपाईले आफुले खोजेको पाउनुभएन भने, तपाईलेको उपयुक्त बटन प्रयोग गरी खोज सँग सम्बन्धित शिर्षकहरु भएका पृष्ठ सृजना या सम्पादन गर्न सक्नुहुन्छ ।
+
+तपाईले आफ्नो खोजको निम्न नतिजा पाउन सक्नुहुन्छ। @CREATEPAGEINFO@
+
===== नतिजा ===== \ No newline at end of file
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index a9058720c..aa0087718 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -85,6 +85,7 @@ $lang['badpassconfirm'] = 'Sorry, het wachtwoord was onjuist';
$lang['minoredit'] = 'Kleine wijziging';
$lang['draftdate'] = 'Concept automatisch opgeslagen op';
$lang['nosecedit'] = 'De pagina is tussentijds veranderd, sectie-informatie was verouderd, volledige pagina geladen.';
+$lang['searchcreatepage'] = "Niks gevonden? Maak een nieuwe pagina met als naam je zoekopdracht. Klik hiervoor op ''Maak deze pagina aan''.";
$lang['regmissing'] = 'Vul alle velden in';
$lang['reguexists'] = 'Er bestaat al een gebruiker met deze loginnaam.';
$lang['regsuccess'] = 'De gebruiker is aangemaakt. Het wachtwoord is per e-mail verzonden.';
diff --git a/inc/lang/nl/searchpage.txt b/inc/lang/nl/searchpage.txt
index 3ace704c8..e03679b2b 100644
--- a/inc/lang/nl/searchpage.txt
+++ b/inc/lang/nl/searchpage.txt
@@ -1,5 +1,5 @@
====== Zoeken ======
-Hieronder zijn de resultaten van de zoekopdracht. Niks gevonden? Maak een nieuwe pagina met als naam je zoekopdracht. Klik hiervoor op ''Pagina aanpassen''.
+Hieronder zijn de resultaten van de zoekopdracht. @CREATEPAGEINFO@
===== Resultaten =====
diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php
index 6156fa34c..ecf10ff5b 100644
--- a/inc/lang/no/lang.php
+++ b/inc/lang/no/lang.php
@@ -21,6 +21,7 @@
* @author Thomas Juberg <Thomas.Juberg@Gmail.com>
* @author Boris <boris@newton-media.no>
* @author Christopher Schive <chschive@frisurf.no>
+ * @author Patrick <spill.p@hotmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -82,6 +83,7 @@ $lang['badpassconfirm'] = 'Beklager, passordet var feil';
$lang['minoredit'] = 'Mindre endringer';
$lang['draftdate'] = 'Kladd autolagret';
$lang['nosecedit'] = 'Siden ble endret i mellomtiden, seksjonsinfo har blitt foreldet - lastet full side istedet.';
+$lang['searchcreatepage'] = 'Hvis du ikke finner det du leter etter, så kan du skape en ny side med samme navn som ditt søk ved å klikke på \'\'**Lag denne siden**\'\'-knappen.';
$lang['regmissing'] = 'Vennligst fyll ut alle felt.';
$lang['reguexists'] = 'Det finnes allerede en konto med dette brukernavnet.';
$lang['regsuccess'] = 'Brukerkonto har blitt laget og passord har blitt sendt via e-post.';
@@ -115,7 +117,7 @@ $lang['searchmedia_in'] = 'Søk i %s';
$lang['txt_upload'] = 'Velg fil som skal lastes opp:';
$lang['txt_filename'] = 'Skriv inn wikinavn (alternativt):';
$lang['txt_overwrt'] = 'Overskriv eksisterende fil';
-$lang['maxuploadsize'] = 'Opplast maks % per fil.';
+$lang['maxuploadsize'] = 'Opplast maks %s per fil.';
$lang['lockedby'] = 'Låst av:';
$lang['lockexpire'] = 'Låsingen utløper:';
$lang['js']['willexpire'] = 'Din redigeringslås for dette dokumentet kommer snart til å utløpe.\nFor å unngå versjonskonflikter bør du forhåndsvise dokumentet ditt for å forlenge redigeringslåsen.';
@@ -355,3 +357,4 @@ $lang['currentns'] = 'gjeldende navnemellomrom';
$lang['searchresult'] = 'Søk i resultat';
$lang['plainhtml'] = 'Enkel HTML';
$lang['wikimarkup'] = 'wiki-format';
+$lang['page_nonexist_rev'] = 'Finnes ingen side på %s. Den er derfor laget på <a href="%s">%s</a>';
diff --git a/inc/lang/no/searchpage.txt b/inc/lang/no/searchpage.txt
index e94e7895b..2e7b0d887 100644
--- a/inc/lang/no/searchpage.txt
+++ b/inc/lang/no/searchpage.txt
@@ -1,5 +1,5 @@
====== Søk ======
-Du ser resultatet av dette søket nedenfor. Hvis du ikke finner det du leter etter, så kan du skape en ny side med samme navn som ditt søk ved å klikke på ''**Lag denne siden**''-knappen.
+Du ser resultatet av dette søket nedenfor. @CREATEPAGEINFO@
===== Resultat =====
diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php
index c6ff4983e..baf3c28a9 100644
--- a/inc/lang/pl/lang.php
+++ b/inc/lang/pl/lang.php
@@ -78,6 +78,7 @@ $lang['badpassconfirm'] = 'Niestety, hasło jest niepoprawne.';
$lang['minoredit'] = 'Mniejsze zmiany';
$lang['draftdate'] = 'Czas zachowania szkicu';
$lang['nosecedit'] = 'Strona została zmodyfikowana, sekcje zostały zmienione. Załadowano całą stronę.';
+$lang['searchcreatepage'] = 'Jeśli nie znaleziono szukanego hasła, możesz utworzyć nową stronę, której tytułem będzie poszukiwane hasło.';
$lang['regmissing'] = 'Wypełnij wszystkie pola.';
$lang['reguexists'] = 'Użytkownik o tej nazwie już istnieje.';
$lang['regsuccess'] = 'Utworzono użytkownika. Hasło zostało przesłane pocztą.';
diff --git a/inc/lang/pl/searchpage.txt b/inc/lang/pl/searchpage.txt
index 61b9ffbf9..442975fe1 100644
--- a/inc/lang/pl/searchpage.txt
+++ b/inc/lang/pl/searchpage.txt
@@ -1,5 +1,5 @@
====== Wyszukiwanie ======
-Wyniki wyszukiwania. Jeśli nie znaleziono szukanego hasła, możesz utworzyć nową stronę, której tytułem będzie poszukiwane hasło.
+Wyniki wyszukiwania. @CREATEPAGEINFO@
===== Wyniki =====
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index 31940f5be..be62af6fe 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -85,6 +85,7 @@ $lang['badpassconfirm'] = 'Desculpe, mas a senha está errada ';
$lang['minoredit'] = 'Alterações mínimas';
$lang['draftdate'] = 'O rascunho foi salvo automaticamente em';
$lang['nosecedit'] = 'A página foi modificada nesse intervalo de tempo. Como a informação da seção estava desatualizada, foi carregada a página inteira.';
+$lang['searchcreatepage'] = 'Se você não encontrou o que está procurando, pode criar ou editar a página com o nome que você especificou, usando o botão apropriado.';
$lang['regmissing'] = 'Desculpe, mas você precisa preencher todos os campos.';
$lang['reguexists'] = 'Desculpe, mas já existe um usuário com esse nome.';
$lang['regsuccess'] = 'O usuário foi criado e a senha enviada para seu e-mail.';
diff --git a/inc/lang/pt-br/searchpage.txt b/inc/lang/pt-br/searchpage.txt
index 2fba3afe9..636bfeb7a 100644
--- a/inc/lang/pt-br/searchpage.txt
+++ b/inc/lang/pt-br/searchpage.txt
@@ -1,5 +1,5 @@
====== Pesquisa ======
-Você pode encontrar os resultados da sua pesquisa abaixo. Se você não encontrou o que está procurando, pode criar ou editar a página com o nome que você especificou, usando o botão apropriado.
+Você pode encontrar os resultados da sua pesquisa abaixo. @CREATEPAGEINFO@
===== Resultados =====
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index ddc9b33ab..54f56f8e3 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'Infelizmente a palavra-passe não é a correct
$lang['minoredit'] = 'Alterações Menores';
$lang['draftdate'] = 'Rascunho automaticamente gravado em';
$lang['nosecedit'] = 'A página foi modificada entretanto. Como a informação da secção estava desactualizada, foi carregada a página inteira.';
+$lang['searchcreatepage'] = 'Se não encontrou o que procurava pode criar uma nova página com o nome da sua pesquisa, usando o botão apropriado.';
$lang['regmissing'] = 'Por favor, preencha todos os campos.';
$lang['reguexists'] = 'Este utilizador já está inscrito. Por favor escolha outro nome de utilizador.';
$lang['regsuccess'] = 'O utilizador foi criado e a senha foi enviada para o endereço de correio electrónico usado na inscrição.';
diff --git a/inc/lang/pt/searchpage.txt b/inc/lang/pt/searchpage.txt
index 2239330dd..563ce2834 100644
--- a/inc/lang/pt/searchpage.txt
+++ b/inc/lang/pt/searchpage.txt
@@ -1,5 +1,5 @@
====== Pesquisa ======
-Pode encontrar os resultados da sua pesquisa abaixo. Se não encontrou o que procurava pode criar uma nova página com o nome da sua pesquisa, usando o botão apropriado.
+Pode encontrar os resultados da sua pesquisa abaixo. @CREATEPAGEINFO@
===== Resultados =====
diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php
index cd7d4fcc3..e8d8c4af2 100644
--- a/inc/lang/ro/lang.php
+++ b/inc/lang/ro/lang.php
@@ -67,6 +67,7 @@ $lang['badlogin'] = 'Ne pare rău, utilizatorul și/sau parola au f
$lang['minoredit'] = 'Modificare minoră';
$lang['draftdate'] = 'Schiță salvată automat la';
$lang['nosecedit'] = 'Pagina s-a modificat între timp, secțiunea info a expirat, s-a încărcat pagina întreagă în loc.';
+$lang['searchcreatepage'] = "Dacă nu ai găsit ce ai căutat, poți crea o pagină nouă prin folosirea butonului ''Editează această pagină''.";
$lang['regmissing'] = 'Ne pare rău, trebuie să completezi toate cîmpurile.';
$lang['reguexists'] = 'Ne pare rău, un utilizator cu acest nume este deja autentificat.';
$lang['regsuccess'] = 'Utilizatorul a fost creat. Parola a fost trimisă prin e-mail.';
diff --git a/inc/lang/ro/searchpage.txt b/inc/lang/ro/searchpage.txt
index 53e66adf0..d4e3df2ee 100644
--- a/inc/lang/ro/searchpage.txt
+++ b/inc/lang/ro/searchpage.txt
@@ -1,5 +1,5 @@
====== Căutare ======
-Rezultatele căutării sunt afișate mai jos. Dacă nu ai găsit ce ai căutat, poți crea o pagină nouă prin folosirea butonului ''Editează această pagină''.
+Rezultatele căutării sunt afișate mai jos. @CREATEPAGEINFO@
===== Rezultate =====
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index e2f9b3d57..ffe513386 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -27,6 +27,8 @@
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
* @author Владимир <id37736@yandex.ru>
* @author Igor Degraf <igordegraf@gmail.com>
+ * @author Type-kun <workwork-1@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
$lang['encoding'] = ' utf-8';
$lang['direction'] = 'ltr';
@@ -73,7 +75,7 @@ $lang['btn_media'] = 'Управление медиафайлами'
$lang['btn_deleteuser'] = 'Удалить мой аккаунт';
$lang['btn_img_backto'] = 'Вернуться к %s';
$lang['btn_mediaManager'] = 'Просмотр в «управлении медиафайлами»';
-$lang['loggedinas'] = 'Зашли как:';
+$lang['loggedinas'] = 'Зашли как';
$lang['user'] = 'Логин';
$lang['pass'] = 'Пароль';
$lang['newpass'] = 'Новый пароль';
@@ -88,6 +90,7 @@ $lang['badpassconfirm'] = 'Простите, пароль неверны
$lang['minoredit'] = 'Небольшие изменения';
$lang['draftdate'] = 'Черновик сохранён';
$lang['nosecedit'] = 'За это время страница была изменена и информация о секции устарела. Загружена полная версия страницы.';
+$lang['searchcreatepage'] = 'Если вы не нашли то, что искали, вы можете создать новую страницу с именем, совпадающим с запросом. Чтобы сделать это, просто нажмите на кнопку «Создать страницу».';
$lang['regmissing'] = 'Извините, вам следует заполнить все поля.';
$lang['reguexists'] = 'Извините, пользователь с таким логином уже существует.';
$lang['regsuccess'] = 'Пользователь создан; пароль выслан на адрес электронной почты.';
@@ -187,7 +190,7 @@ $lang['mediausage'] = 'Для ссылки на этот файл и
$lang['mediaview'] = 'Посмотреть исходный файл';
$lang['mediaroot'] = 'корень';
$lang['mediaupload'] = 'Здесь можно загрузить файл в текущий каталог («пространство имён»). Чтобы создать подкаталоги, добавьте их к началу имени файла («Загрузить как»). Имена подкаталогов разделяются двоеточиями. ';
-$lang['mediaextchange'] = 'Расширение изменилось: с .%s на .%s!';
+$lang['mediaextchange'] = 'Расширение изменилось с .%s на .%s!';
$lang['reference'] = 'Ссылки для';
$lang['ref_inuse'] = 'Этот файл не может быть удалён, так как он используется на следующих страницах:';
$lang['ref_hidden'] = 'Некоторые ссылки находятся на страницах, на чтение которых у вас нет прав доступа';
@@ -196,15 +199,17 @@ $lang['quickhits'] = 'Соответствия в названиях
$lang['toc'] = 'Содержание';
$lang['current'] = 'текущий';
$lang['yours'] = 'Ваша версия';
-$lang['diff'] = 'показать отличия от текущей версии';
+$lang['diff'] = 'Показать отличия от текущей версии';
$lang['diff2'] = 'Показать различия между ревизиями ';
$lang['difflink'] = 'Ссылка на это сравнение';
$lang['diff_type'] = 'Посмотреть отличия';
$lang['diff_inline'] = 'встроенный';
$lang['diff_side'] = 'бок о бок';
$lang['diffprevrev'] = 'Предыдущая версия';
-$lang['diffnextrev'] = 'Следущая версия';
+$lang['diffnextrev'] = 'Следующая версия';
$lang['difflastrev'] = 'Последняя версия';
+$lang['diffbothprevrev'] = 'Предыдущая версия справа и слева';
+$lang['diffbothnextrev'] = 'Следующая версия справа и слева';
$lang['line'] = 'Строка';
$lang['breadcrumb'] = 'Вы посетили:';
$lang['youarehere'] = 'Вы находитесь здесь:';
@@ -212,7 +217,7 @@ $lang['lastmod'] = 'Последние изменения:';
$lang['by'] = ' —';
$lang['deleted'] = 'удалено';
$lang['created'] = 'создано';
-$lang['restored'] = 'старая ревизия восстановлена (%s)';
+$lang['restored'] = 'старая версия восстановлена (%s)';
$lang['external_edit'] = 'внешнее изменение';
$lang['summary'] = 'Сводка изменений';
$lang['noflash'] = 'Для просмотра этого содержимого требуется <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.';
@@ -287,8 +292,8 @@ $lang['subscr_m_unsubscribe'] = 'Отменить подписку';
$lang['subscr_m_subscribe'] = 'Подписаться';
$lang['subscr_m_receive'] = 'Получить';
$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
-$lang['subscr_style_digest'] = 'информационное электронное письмо со списком изменений для каждой страницы (каждые %.2f дней)';
-$lang['subscr_style_list'] = 'список изменённых страниц со времени последнего отправленного электронного письма (каждые %.2f дней)';
+$lang['subscr_style_digest'] = 'информационное электронное письмо со списком изменений для каждой страницы (каждые %.2f дн.)';
+$lang['subscr_style_list'] = 'список изменённых страниц со времени последнего отправленного электронного письма (каждые %.2f дн.)';
$lang['authtempfail'] = 'Аутентификация пользователей временно недоступна. Если проблема продолжается какое-то время, пожалуйста, сообщите об этом своему администратору вики.';
$lang['authpwdexpire'] = 'Действие вашего пароля истекает через %d дней. Вы должны изменить его как можно скорее';
$lang['i_chooselang'] = 'Выберите свой язык/Choose your language';
@@ -302,6 +307,7 @@ $lang['i_modified'] = 'Из соображений безопасно
<a href="http://www.dokuwiki.org/install">инструкции по установке «Докувики»</a>';
$lang['i_funcna'] = 'Функция PHP <code>%s</code> недоступна. Может быть, она по какой-то причине заблокирована вашим хостером?';
$lang['i_phpver'] = 'Ваша версия PHP (<code>%s</code>) ниже требуемой (<code>%s</code>). Вам необходимо обновить установленную версию PHP.';
+$lang['i_mbfuncoverload'] = 'Для запуска "Докувики" необходимо отключить параметр mbstring.func_overload в php.ini';
$lang['i_permfail'] = '<code>%s</code> недоступна для записи «Докувики». Вам необходимо исправить системные права доступа для этой директории!';
$lang['i_confexists'] = '<code>%s</code> уже существует';
$lang['i_writeerr'] = 'Не удалось создать <code>%s</code>. Вам необходимо проверить системные права доступа к файлу и директориям, и создать файл вручную. ';
@@ -311,7 +317,7 @@ $lang['i_success'] = 'Конфигурация прошла успе
<a href="doku.php?id=wiki:welcome">своей новой «Докувики»</a>.';
$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать <a href="doku.php?id=wiki:welcome">свою новую «Докувики»</a>.';
$lang['i_policy'] = 'Исходная политика прав доступа';
-$lang['i_pol0'] = 'Открытая вики (чтение, запись, закачка файлов для всех)';
+$lang['i_pol0'] = 'Открытая вики (чтение, запись, загрузка файлов для всех)';
$lang['i_pol1'] = 'Общедоступная вики (чтение для всех, запись и загрузка файлов для зарегистрированных пользователей)';
$lang['i_pol2'] = 'Закрытая вики (чтение, запись и загрузка файлов только для зарегистрированных пользователей)';
$lang['i_allowreg'] = 'Разрешить пользователям самостоятельно регистрироваться';
@@ -322,10 +328,10 @@ $lang['i_pop_field'] = 'Пожалуйста, помогите нам
$lang['i_pop_label'] = 'Отправлять раз в месяц анонимную пользовательскую информацию разработчикам «Докувики»';
$lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён <b>%s</b>. Вы можете также <a href="%s">просмотреть недавние изменения во всей вики</a>.';
$lang['years'] = '%d лет назад';
-$lang['months'] = '%d месяц(ев) назад';
+$lang['months'] = '%d месяц (-ев) назад';
$lang['weeks'] = '%d недель назад';
$lang['days'] = '%d дней назад';
-$lang['hours'] = '%d час(ов) назад';
+$lang['hours'] = '%d час (-ов) назад';
$lang['minutes'] = '%d минут назад';
$lang['seconds'] = '%d секунд назад';
$lang['wordblock'] = 'Ваши изменения не сохранены, поскольку они содержат блокируемые слова (спам).';
@@ -341,8 +347,8 @@ $lang['media_sort_name'] = 'Сортировка по имени';
$lang['media_sort_date'] = 'Сортировка по дате';
$lang['media_namespaces'] = 'Выберите каталог';
$lang['media_files'] = 'Файлы в %s';
-$lang['media_upload'] = 'Загрузка в пространство имён <strong>%s</strong>.';
-$lang['media_search'] = 'Поиск в пространстве имён <strong>%s</strong>.';
+$lang['media_upload'] = 'Загрузка в пространство имён %s';
+$lang['media_search'] = 'Поиск в пространстве имён %s';
$lang['media_view'] = '%s';
$lang['media_viewold'] = '%s в %s
';
@@ -357,3 +363,5 @@ $lang['currentns'] = 'Текущее пространство имё
$lang['searchresult'] = 'Результаты поиска';
$lang['plainhtml'] = 'Простой HTML';
$lang['wikimarkup'] = 'вики-разметка';
+$lang['page_nonexist_rev'] = 'Эта страница ещё не существовала %s. Она была создана <a href="%s">%s</a>.';
+$lang['unable_to_parse_date'] = 'Невозможно обработать параметр "%s".';
diff --git a/inc/lang/ru/mailtext.txt b/inc/lang/ru/mailtext.txt
index 953daddf2..929174910 100644
--- a/inc/lang/ru/mailtext.txt
+++ b/inc/lang/ru/mailtext.txt
@@ -13,5 +13,5 @@ IP-адрес: @IPADDRESS@
--
-Это письмо было сгенерировано «Докувики» по адресу
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@
diff --git a/inc/lang/ru/password.txt b/inc/lang/ru/password.txt
index fabdf2b68..360201bd9 100644
--- a/inc/lang/ru/password.txt
+++ b/inc/lang/ru/password.txt
@@ -6,5 +6,5 @@
Пароль: @PASSWORD@
--
-Это письмо было сгенерировано «Докувики» по адресу
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@
diff --git a/inc/lang/ru/pwconfirm.txt b/inc/lang/ru/pwconfirm.txt
index 954c75dfe..de31aa9a8 100644
--- a/inc/lang/ru/pwconfirm.txt
+++ b/inc/lang/ru/pwconfirm.txt
@@ -9,5 +9,5 @@
@CONFIRM@
--
-Это сообщение было сгенерировано «Докувики» по адресу
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@
diff --git a/inc/lang/ru/registermail.txt b/inc/lang/ru/registermail.txt
index 86ef11e8c..d55296558 100644
--- a/inc/lang/ru/registermail.txt
+++ b/inc/lang/ru/registermail.txt
@@ -10,5 +10,5 @@
Хост: @HOSTNAME@
--
-Это сообщение было сгенерировано «Докувики» по адресу
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@
diff --git a/inc/lang/ru/revisions.txt b/inc/lang/ru/revisions.txt
index 55072cd8a..40fbedf0e 100644
--- a/inc/lang/ru/revisions.txt
+++ b/inc/lang/ru/revisions.txt
@@ -1,3 +1,3 @@
====== История страницы ======
-Перед вами — история правок текущего документа. Чтобы вернуться к одной из предыдущих версий, выберите нужную, нажмите «Править страницу» и сохраните.
+Перед вами история правок текущего документа. Чтобы вернуться к одной из предыдущих версий, выберите нужную, нажмите «Править страницу» и сохраните.
diff --git a/inc/lang/ru/searchpage.txt b/inc/lang/ru/searchpage.txt
index 04feb21cd..d12a848c6 100644
--- a/inc/lang/ru/searchpage.txt
+++ b/inc/lang/ru/searchpage.txt
@@ -1,5 +1,5 @@
====== Поиск ======
-Перед вами результаты поиска. Если вы не нашли то, что искали, вы можете создать новую страницу с именем, совпадающим с запросом. Чтобы сделать это, просто нажмите на кнопку «Создать страницу».
+Перед вами результаты поиска. @CREATEPAGEINFO@
===== Результаты ===== \ No newline at end of file
diff --git a/inc/lang/ru/uploadmail.txt b/inc/lang/ru/uploadmail.txt
index 84103b45a..1cc5c6a5a 100644
--- a/inc/lang/ru/uploadmail.txt
+++ b/inc/lang/ru/uploadmail.txt
@@ -11,5 +11,5 @@
Пользователь: @USER@
--
-Это письмо было сгенерировано «Докувики» по адресу
+Это письмо создано «Докувики» с сайта
@DOKUWIKIURL@
diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php
index e501cb7fc..afbf79503 100644
--- a/inc/lang/sk/lang.php
+++ b/inc/lang/sk/lang.php
@@ -66,6 +66,7 @@ $lang['badpassconfirm'] = 'Ľutujem, heslo bolo nesprávne.';
$lang['minoredit'] = 'Menšie zmeny';
$lang['draftdate'] = 'Koncept automaticky uložený';
$lang['nosecedit'] = 'Stránka bola medzičasom zmenená, informácie o sekcii sú zastaralé a z tohto dôvodu bola nahraná celá stránka.';
+$lang['searchcreatepage'] = "Pokiaľ ste nenašli, čo hľadáte, skúste požadovanú stránku sami vytvoriť stlačením tlačidla ''Vytvoriť stránku''.";
$lang['regmissing'] = 'Musíte vyplniť všetky údaje.';
$lang['reguexists'] = 'Užívateľ s rovnakým menom je už zaregistrovaný.';
$lang['regsuccess'] = 'Užívateľský účet bol vytvorený a heslo zaslané emailom.';
diff --git a/inc/lang/sk/searchpage.txt b/inc/lang/sk/searchpage.txt
index 3fdf074b7..3684f1c6c 100644
--- a/inc/lang/sk/searchpage.txt
+++ b/inc/lang/sk/searchpage.txt
@@ -1,5 +1,5 @@
====== Vyhľadávanie ======
-Výsledky hľadania môžete vidieť nižšie. Pokiaľ ste nenašli, čo hľadáte, skúste požadovanú stránku sami vytvoriť stlačením tlačidla ''Vytvoriť stránku''.
+Výsledky hľadania môžete vidieť nižšie. @CREATEPAGEINFO@
===== Výsledky =====
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index f76dbb7d1..b649d08cb 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'Napaka! Geslo ni pravo.';
$lang['minoredit'] = 'Manjše spremembe';
$lang['draftdate'] = 'Samodejno shranjevanje osnutka je omogočeno';
$lang['nosecedit'] = 'Stran je bila v vmesnem času spremenjena. Podatki strani so bili zastareli, zato se je celotna vsebina naložila znova.';
+$lang['searchcreatepage'] = "V kolikor rezultati niso skladni z zahtevami iskanja, je mogoče ustvariti novo stran z nazivom vaše poizvedbe preko povezave ''Uredi stran''.";
$lang['regmissing'] = 'Izpolniti je treba vsa polja.';
$lang['reguexists'] = 'Uporabnik s tem imenom že obstaja.';
$lang['regsuccess'] = 'Uporabniški račun je uspešno ustvarjen. Geslo je bilo poslano na naveden elektronski naslov.';
diff --git a/inc/lang/sl/searchpage.txt b/inc/lang/sl/searchpage.txt
index 736a36182..6ccfa96a4 100644
--- a/inc/lang/sl/searchpage.txt
+++ b/inc/lang/sl/searchpage.txt
@@ -1,5 +1,5 @@
====== Iskanje ======
-Spodaj so izpisani rezultati iskanja. V kolikor rezultati niso skladni z zahtevami iskanja, je mogoče ustvariti novo stran z nazivom vaše poizvedbe preko povezave ''Uredi stran''.
+Spodaj so izpisani rezultati iskanja. @CREATEPAGEINFO@
===== Rezultati ===== \ No newline at end of file
diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php
index 49984097c..4c61b6a70 100644
--- a/inc/lang/sq/lang.php
+++ b/inc/lang/sq/lang.php
@@ -63,6 +63,7 @@ $lang['badlogin'] = 'Na vjen keq, emri ose fjalëkalimi është gab
$lang['minoredit'] = 'Ndryshime të Vogla';
$lang['draftdate'] = 'Skica u ruajt automatikisht në';
$lang['nosecedit'] = 'Faqja u ndryshua ndëwrkohë, informacioni i kwtij seksioni ishte i vjetër, u ngarkua faqja e tërë në vend të saj.';
+$lang['searchcreatepage'] = 'Nëse nuk e gjetët atë që po kërkonit, mund të krijoni ose redaktoni një faqe pas pyetjes suaj me butonin përkatës.';
$lang['regmissing'] = 'Na vjen keq, duhet të plotësoni të gjitha fushat.';
$lang['reguexists'] = 'Na vjen keq, ekziston një përdorues tjetër me të njëjtin emër.';
$lang['regsuccess'] = 'Përdoruesi u regjistrua dhe fjalëkalimi u dërgua me email.';
diff --git a/inc/lang/sq/searchpage.txt b/inc/lang/sq/searchpage.txt
index 2f34cabb9..b0d6d1f31 100644
--- a/inc/lang/sq/searchpage.txt
+++ b/inc/lang/sq/searchpage.txt
@@ -1,5 +1,5 @@
====== Kërko ======
-Mund të gjeni rezultatet e kërkimit tuaj më poshtë. Nëse nuk e gjetët atë që po kërkonit, mund të krijoni ose redaktoni një faqe pas pyetjes suaj me butonin përkatës.
+Mund të gjeni rezultatet e kërkimit tuaj më poshtë. @CREATEPAGEINFO@
===== Rezultate ===== \ No newline at end of file
diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php
index 22a500e76..37a36c82b 100644
--- a/inc/lang/sr/lang.php
+++ b/inc/lang/sr/lang.php
@@ -60,6 +60,7 @@ $lang['badlogin'] = 'Извините, није добро кори
$lang['minoredit'] = 'Мала измена';
$lang['draftdate'] = 'Нацрт је аутоматски сачуван';
$lang['nosecedit'] = 'Страна је у међувремену промењена, поглавље је застарело и поново се учитава цела страна.';
+$lang['searchcreatepage'] = "Ако нисте нашли то што сте тражили, можете да направите нову страницу названу по Вашем упиту користећи дугме ''Измени ову страницу''.";
$lang['regmissing'] = 'Извините, морате да попуните сва поља.';
$lang['reguexists'] = 'Извините, корисник са истим именом већ постоји.';
$lang['regsuccess'] = 'Корисник је направљен и лозинка је послата путем е-поште.';
diff --git a/inc/lang/sr/searchpage.txt b/inc/lang/sr/searchpage.txt
index 010966a7c..458c5b1fc 100644
--- a/inc/lang/sr/searchpage.txt
+++ b/inc/lang/sr/searchpage.txt
@@ -1,5 +1,5 @@
====== Претрага ======
-Испод можете да нађете резултате Ваше претраге. Ако нисте нашли то што сте тражили, можете да направите нову страницу названу по Вашем упиту користећи дугме ''Измени ову страницу''.
+Испод можете да нађете резултате Ваше претраге. @CREATEPAGEINFO@
===== Резултати =====
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 1f129c621..f22491db1 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -82,6 +82,7 @@ $lang['badpassconfirm'] = 'Ledsen, lösenordet var felaktigt';
$lang['minoredit'] = 'Små ändringar';
$lang['draftdate'] = 'Utkast automatiskt sparat';
$lang['nosecedit'] = 'Sidan ändrades medan du skrev, sektionsinformationen var inte uppdaterad. Laddar hela sidan istället.';
+$lang['searchcreatepage'] = 'Om du inte hittar det du letar efter, så kan du skapa eller redigera sidan med någon av knapparna.';
$lang['regmissing'] = 'Du måste fylla i alla fälten.';
$lang['reguexists'] = 'Det finns redan en användare med det användarnamnet.';
$lang['regsuccess'] = 'Användarkontot skapat, lösenordet har skickats via e-post.';
diff --git a/inc/lang/sv/searchpage.txt b/inc/lang/sv/searchpage.txt
index bcc88cd95..7b2d3bca3 100644
--- a/inc/lang/sv/searchpage.txt
+++ b/inc/lang/sv/searchpage.txt
@@ -1,5 +1,5 @@
====== Sök ======
-Nedan ser du resultatet av sökningen. Om du inte hittar det du letar efter, så kan du skapa eller redigera sidan med någon av knapparna.
+Nedan ser du resultatet av sökningen. @CREATEPAGEINFO@
===== Resultat =====
diff --git a/inc/lang/ta/lang.php b/inc/lang/ta/lang.php
index 4a1da3531..a5b89527a 100644
--- a/inc/lang/ta/lang.php
+++ b/inc/lang/ta/lang.php
@@ -10,7 +10,7 @@ $lang['btn_show'] = 'பக்கத்தை காண்பி ';
$lang['btn_create'] = 'இந்த பக்கத்தை உருவாக்கு ';
$lang['btn_search'] = 'தேடு';
$lang['btn_save'] = 'சேமி ';
-$lang['btn_revs'] = 'old திருத்தங்கள்';
+$lang['btn_revs'] = 'பழைய திருத்தங்கள்';
$lang['btn_recent'] = 'சமீபத்திய மாற்றங்கள்';
$lang['btn_upload'] = 'பதிவேற்று';
$lang['btn_cancel'] = 'ரத்து';
@@ -30,3 +30,8 @@ $lang['fullname'] = 'உண்மையான பெயர்';
$lang['email'] = 'மின்னஞ்சல்';
$lang['profile'] = 'பயன்படுத்துபவர் விவரம்';
$lang['minoredit'] = 'சிறிய மாற்றங்கள்';
+$lang['media_historytab'] = 'வரலாறு';
+$lang['media_list_rows'] = 'வரிசைகள் ';
+$lang['media_sort_name'] = 'பெயர் ';
+$lang['media_sort_date'] = 'தேதி ';
+$lang['media_namespaces'] = 'பெயர்வெளியை தேர்வுசெய் ';
diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php
index 0e9f1d3bb..113431276 100644
--- a/inc/lang/th/lang.php
+++ b/inc/lang/th/lang.php
@@ -68,6 +68,7 @@ $lang['badpassconfirm'] = 'พาสเวิร์ดไม่ถูก
$lang['minoredit'] = 'เป็นการแก้ไขเล็กน้อย';
$lang['draftdate'] = 'บันทึกฉบับร่างเมื่อ';
$lang['nosecedit'] = 'ในช่วงเวลาที่ผ่านมานี้เพจถูกแก้ไขไปแล้ว, เนื้อหาในเซคชั่นนี้ไม่ทันสมัย กรุณาโหลดเพจใหม่ทั้งหน้าแทน';
+$lang['searchcreatepage'] = 'ถ้าคุณไม่พบสิ่งที่คนมองหา คุณสามารถเลือกที่จะสร้าง หรือแก้ไขชื่อเพจหลังจากดูผลสืบค้นแล้วด้วยปุ่มที่เหมาะสม';
$lang['regmissing'] = 'ขออภัย คุณต้องกรอกให้ครบทุกช่อง';
$lang['reguexists'] = 'ชื่อบัญชีที่ใส่นั้นมีผู้อื่นได้ใช้แล้ว กรุณาเลือกชื่อผู้ใช้อื่น';
$lang['regsuccess'] = 'ผู้ใช้ถูกสร้างแล้ว และรหัสผ่านได้ถูกส่งไปทางอีเมลแล้ว';
diff --git a/inc/lang/th/searchpage.txt b/inc/lang/th/searchpage.txt
index d6399a9e9..263c656ab 100644
--- a/inc/lang/th/searchpage.txt
+++ b/inc/lang/th/searchpage.txt
@@ -1,4 +1,5 @@
====== สืบค้น ======
-คุณสามารถพบผลลัพธ์การสืบค้นของคุณด้านล่าง ถ้าคุณไม่พบสิ่งที่คนมองหา คุณสามารถเลือกที่จะสร้าง หรือแก้ไขชื่อเพจหลังจากดูผลสืบค้นแล้วด้วยปุ่มที่เหมาะสม
+
+คุณสามารถพบผลลัพธ์การสืบค้นของคุณด้านล่าง @CREATEPAGEINFO@
====== ผลลัพธ์ ====== \ No newline at end of file
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index 90a7ea7ba..1676256a5 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -74,6 +74,7 @@ $lang['badpassconfirm'] = 'Üzgünüz, parolanız yanlış';
$lang['minoredit'] = 'Küçük Değişiklikler';
$lang['draftdate'] = 'Taslak şu saatte otomatik kaydedildi:';
$lang['nosecedit'] = 'Sayfa yakın zamanda değiştirilmiştir, bölüm bilgisi eski kalmıştır. Bunun için bölüm yerine tüm sayfa yüklenmiştir.';
+$lang['searchcreatepage'] = "Aradığınız şeyi bulamadıysanız, ''Sayfayı değiştir'' tuşuna tıklayarak girdiğiniz sorgu adıyla yeni bir sayfa oluşturabilirsiniz .";
$lang['regmissing'] = 'Üzgünüz, tüm alanları doldurmalısınız.';
$lang['reguexists'] = 'Üzgünüz, bu isime sahip bir kullanıcı zaten mevcut.';
$lang['regsuccess'] = 'Kullanıcı oluşturuldu ve şifre e-posta adresine gönderildi.';
diff --git a/inc/lang/tr/searchpage.txt b/inc/lang/tr/searchpage.txt
index ae6d50c77..bdb3ddf17 100644
--- a/inc/lang/tr/searchpage.txt
+++ b/inc/lang/tr/searchpage.txt
@@ -1,5 +1,5 @@
====== Arama ======
-Aşağıda aramanın sonuçları listelenmiştir. Aradığınız şeyi bulamadıysanız, ''Sayfayı değiştir'' tuşuna tıklayarak girdiğiniz sorgu adıyla yeni bir sayfa oluşturabilirsiniz .
+Aşağıda aramanın sonuçları listelenmiştir. @CREATEPAGEINFO@
===== Sonuçlar =====
diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php
index 56f064c9f..a6b08c905 100644
--- a/inc/lang/uk/lang.php
+++ b/inc/lang/uk/lang.php
@@ -68,6 +68,7 @@ $lang['badpassconfirm'] = 'Вибачте, але пароль невір
$lang['minoredit'] = 'Незначні зміни';
$lang['draftdate'] = 'Чернетка збережена';
$lang['nosecedit'] = 'Сторінку змінено, дані розділу застарілі. Завантажено сторінку повністю.';
+$lang['searchcreatepage'] = 'Якщо ви не знайшли те, що ви шукали, ви можете створити або редагувати сторінку, що має таке ж ім’я, що і пошуковий запит за допомогою відповідної кнопки.';
$lang['regmissing'] = 'Необхідно заповнити всі поля.';
$lang['reguexists'] = 'Користувач з таким іменем вже існує.';
$lang['regsuccess'] = 'Користувача створено. Пароль відправлено на e-mail.';
diff --git a/inc/lang/uk/searchpage.txt b/inc/lang/uk/searchpage.txt
index 971c24814..3889a7618 100644
--- a/inc/lang/uk/searchpage.txt
+++ b/inc/lang/uk/searchpage.txt
@@ -1,5 +1,5 @@
====== Пошук ======
-Дивіться результати пошуку нижче. Якщо ви не знайшли те, що ви шукали, ви можете створити або редагувати сторінку, що має таке ж ім’я, що і пошуковий запит за допомогою відповідної кнопки.
+Дивіться результати пошуку нижче. @CREATEPAGEINFO@
===== Результати =====
diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php
index b2349d0b0..41a7d590f 100644
--- a/inc/lang/vi/lang.php
+++ b/inc/lang/vi/lang.php
@@ -59,6 +59,7 @@ $lang['badlogin'] = 'Username hoặc password không đúng.';
$lang['minoredit'] = 'Minor Changes';
$lang['draftdate'] = 'Bản nháp được tự động lưu lúc';
$lang['nosecedit'] = 'Các trang web đã được thay đổi trong khi chờ đợi, phần thông tin quá hạn đã được thay thế bằng trang đầy đủ.';
+$lang['searchcreatepage'] = "Nếu bạn không thấy được những gì bạn đang tìm, bạn có thể tạo một trang mới bằng cách bấm vào nút ''Biên soạn trang này'', khi đó bạn sẽ có 1 trang mới với tên trang chính là tuwfw khóa bạn đã tìm kiếm.";
$lang['regmissing'] = 'Bạn cần điền vào tất cả các trường';
$lang['reguexists'] = 'Bạn khác đã dùng username này rồi.';
$lang['regsuccess'] = 'Đã tạo username, và đã gởi password.';
diff --git a/inc/lang/vi/searchpage.txt b/inc/lang/vi/searchpage.txt
index 7ded7a808..c0c748545 100644
--- a/inc/lang/vi/searchpage.txt
+++ b/inc/lang/vi/searchpage.txt
@@ -1,5 +1,5 @@
====== Tìm ======
-Sau đây là kết quả mà bạn đã tìm. Nếu bạn không thấy được những gì bạn đang tìm, bạn có thể tạo một trang mới bằng cách bấm vào nút ''Biên soạn trang này'', khi đó bạn sẽ có 1 trang mới với tên trang chính là tuwfw khóa bạn đã tìm kiếm.
+Sau đây là kết quả mà bạn đã tìm. @CREATEPAGEINFO@
===== Kết quả =====
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index 953d866f8..c5e7da000 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -14,6 +14,8 @@
* @author tsangho <ou4222@gmail.com>
* @author Danny Lin <danny0838@gmail.com>
* @author Stan <talktostan@gmail.com>
+ * @author June-Hao Hou <junehao@gmail.com>
+ * @author lioujheyu <lioujheyu@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -75,6 +77,7 @@ $lang['badpassconfirm'] = '抱歉,這密碼是錯的';
$lang['minoredit'] = '小修改';
$lang['draftdate'] = '草稿已自動存檔於';
$lang['nosecedit'] = '在您編輯期間,其他使用者修改過本頁面。區段資料已逾時,因此系統載入了全頁,以取代之。';
+$lang['searchcreatepage'] = '若沒找到您想要的,可按下按鈕建立或編輯和查詢關鍵字同名的頁面。';
$lang['regmissing'] = '很抱歉,所有欄位都要填寫。';
$lang['reguexists'] = '很抱歉,有人已使用了這個帳號。';
$lang['regsuccess'] = '使用者帳號已建立,密碼已寄發至該電郵。';
@@ -303,6 +306,7 @@ $lang['i_policy'] = '初步的 ACL 政策';
$lang['i_pol0'] = '開放的 wiki (任何人可讀取、寫入、上傳)';
$lang['i_pol1'] = '公開的 wiki (任何人可讀取,註冊使用者可寫入與上傳)';
$lang['i_pol2'] = '封閉的 wiki (只有註冊使用者可讀取、寫入、上傳)';
+$lang['i_allowreg'] = '允許使用者自行註冊';
$lang['i_retry'] = '重試';
$lang['i_license'] = '請選擇您想要的內容發佈授權方式:';
$lang['i_license_none'] = '不要顯示任何關於授權方式的訊息';
diff --git a/inc/lang/zh-tw/searchpage.txt b/inc/lang/zh-tw/searchpage.txt
index e0f04c433..96680019d 100644
--- a/inc/lang/zh-tw/searchpage.txt
+++ b/inc/lang/zh-tw/searchpage.txt
@@ -1,5 +1,5 @@
====== 搜尋精靈 ======
-提示:您可以在下面找到您的搜尋結果。若沒找到您想要的,可按下按鈕建立或編輯和查詢關鍵字同名的頁面。
+提示:您可以在下面找到您的搜尋結果。@CREATEPAGEINFO@
===== 搜尋結果 =====
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index c8a76b66b..d960eb799 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -23,6 +23,7 @@
* @author Cupen <Cupenoruler@foxmail.com>
* @author xiqingongzi <Xiqingongzi@Gmail.com>
* @author qinghao <qingxianhao@gmail.com>
+ * @author Yuwei Sun <yuwei@hrz.tu-chemnitz.de>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -84,6 +85,7 @@ $lang['badpassconfirm'] = '对不起,密码错误';
$lang['minoredit'] = '细微修改';
$lang['draftdate'] = '草稿自动保存于';
$lang['nosecedit'] = '在您编辑期间本页刚被他人修改过,局部信息已过期,故载入全页。';
+$lang['searchcreatepage'] = '如果没有找到您想要的东西,您可以使用相应的按钮来创建或编辑该页面。';
$lang['regmissing'] = '对不起,您必须填写所有的字段。';
$lang['reguexists'] = '对不起,该用户名已经存在。';
$lang['regsuccess'] = '新用户已建立,密码将通过电子邮件发送给您。';
@@ -302,6 +304,7 @@ $lang['i_modified'] = '由于安全上的考虑,该脚本只能用
<a href="http://dokuwiki.org/install">Dokuwiki 安装指南</a>';
$lang['i_funcna'] = 'PHP 功能 <code>%s</code> 无法使用。也许您的服务器提供商因为某些原因禁用了它。';
$lang['i_phpver'] = '您的 PHP 版本 <code>%s</code> 低于最低要求的 <code>%s</code>。您需要升级您的 PHP 版本。';
+$lang['i_mbfuncoverload'] = '为了运行DocuWiki,您必须在php.ini中禁用mbstring.func_overload。';
$lang['i_permfail'] = 'DokuWiki 无法写入 <code>%s</code>。您需要修改该路径的权限设定!';
$lang['i_confexists'] = '<code>%s</code> 已经存在';
$lang['i_writeerr'] = '无法创建 <code>%s</code>。您需要检查该路径/文件的权限设定并手动创建该文件。';
diff --git a/inc/lang/zh/searchpage.txt b/inc/lang/zh/searchpage.txt
index 8222e242c..be7ae7909 100644
--- a/inc/lang/zh/searchpage.txt
+++ b/inc/lang/zh/searchpage.txt
@@ -1,5 +1,5 @@
====== 搜索 ======
-下面将显示您的搜索结果。如果没有找到您想要的东西,您可以使用相应的按钮来创建或编辑该页面。
+下面将显示您的搜索结果。@CREATEPAGEINFO@
===== 搜索结果 ===== \ No newline at end of file
diff --git a/inc/mail.php b/inc/mail.php
index 9994ac63e..9f1b1f3d6 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -27,7 +27,7 @@ if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n");
* Check if a given mail address is valid
*/
if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-");
-if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)');
+if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,63})');
/**
* Prepare mailfrom replacement patterns
diff --git a/inc/media.php b/inc/media.php
index 9022858e1..09bfc99ac 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -16,6 +16,9 @@ if(!defined('NL')) define('NL',"\n");
* their CSS tags except pagenames won't be links.
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
+ *
+ * @param array $data
+ * @param string $id
*/
function media_filesinuse($data,$id){
global $lang;
@@ -41,6 +44,11 @@ function media_filesinuse($data,$id){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $id media id
+ * @param int $auth permission level
+ * @param array $data
+ * @return false|string
*/
function media_metasave($id,$auth,$data){
if($auth < AUTH_UPLOAD) return false;
@@ -86,6 +94,7 @@ function media_metasave($id,$auth,$data){
* check if a media is external source
*
* @author Gerrit Uitslag <klapinklapin@gmail.com>
+ *
* @param string $id the media ID or URL
* @return bool
*/
@@ -98,6 +107,7 @@ function media_isexternal($id){
* Check if a media item is public (eg, external URL or readable by @ALL)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $id the media ID or URL
* @return bool
*/
@@ -113,6 +123,10 @@ function media_ispublic($id){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $id media id
+ * @param int $auth permission level
+ * @return bool
*/
function media_metaform($id,$auth){
global $lang;
@@ -175,6 +189,9 @@ function media_metaform($id,$auth){
* Convenience function to check if a media file is still in use
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id media id
+ * @return array|bool
*/
function media_inuse($id) {
global $conf;
@@ -202,6 +219,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
* If configured, checks for media references before deletion
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $id media id
* @param int $auth no longer used
* @return int One of: 0,
@@ -219,6 +237,7 @@ function media_delete($id,$auth){
$file = mediaFN($id);
// trigger an event - MEDIA_DELETE_FILE
+ $data = array();
$data['id'] = $id;
$data['name'] = utf8_basename($file);
$data['path'] = $file;
@@ -253,9 +272,9 @@ function media_delete($id,$auth){
/**
* Handle file uploads via XMLHttpRequest
*
- * @param string $ns target namespace
- * @param int $auth current auth check result
- * @return mixed false on error, id of the new file on success
+ * @param string $ns target namespace
+ * @param int $auth current auth check result
+ * @return false|string false on error, id of the new file on success
*/
function media_upload_xhr($ns,$auth){
if(!checkSecurityToken()) return false;
@@ -298,10 +317,11 @@ function media_upload_xhr($ns,$auth){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
- * @param string $ns target namespace
- * @param int $auth current auth check result
- * @param bool|array $file $_FILES member, $_FILES['upload'] if false
- * @return mixed false on error, id of the new file on success
+ *
+ * @param string $ns target namespace
+ * @param int $auth current auth check result
+ * @param bool|array $file $_FILES member, $_FILES['upload'] if false
+ * @return false|string false on error, id of the new file on success
*/
function media_upload($ns,$auth,$file=false){
if(!checkSecurityToken()) return false;
@@ -345,6 +365,7 @@ function media_upload($ns,$auth,$file=false){
* Using copy, makes sure any setgid bits on the media directory are honored
*
* @see move_uploaded_file()
+ *
* @param string $from
* @param string $to
* @return bool
@@ -362,13 +383,21 @@ function copy_uploaded_file($from, $to){
* (The triggered event is preventable.)
*
* Event data:
- * $data[0] fn_tmp: the temporary file name (read from $_FILES)
- * $data[1] fn: the file name of the uploaded file
- * $data[2] id: the future directory id of the uploaded file
- * $data[3] imime: the mimetype of the uploaded file
+ * $data[0] fn_tmp: the temporary file name (read from $_FILES)
+ * $data[1] fn: the file name of the uploaded file
+ * $data[2] id: the future directory id of the uploaded file
+ * $data[3] imime: the mimetype of the uploaded file
* $data[4] overwrite: if an existing file is going to be overwritten
+ * $data[5] move: name of function that performs move/copy/..
*
* @triggers MEDIA_UPLOAD_FINISH
+ *
+ * @param array $file
+ * @param string $id media id
+ * @param bool $ow overwrite?
+ * @param int $auth permission level
+ * @param string $move name of functions that performs move/copy/..
+ * @return false|array|string
*/
function media_save($file, $id, $ow, $auth, $move) {
if($auth < AUTH_UPLOAD) {
@@ -418,6 +447,7 @@ function media_save($file, $id, $ow, $auth, $move) {
}
// prepare event data
+ $data = array();
$data[0] = $file['name'];
$data[1] = $fn;
$data[2] = $id;
@@ -430,8 +460,12 @@ function media_save($file, $id, $ow, $auth, $move) {
}
/**
- * Callback adapter for media_upload_finish()
+ * Callback adapter for media_upload_finish() triggered by MEDIA_UPLOAD_FINISH
+ *
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param array $data event data
+ * @return false|array|string
*/
function _media_upload_action($data) {
// fixme do further sanity tests of given data?
@@ -448,6 +482,14 @@ function _media_upload_action($data) {
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Klier <chi@chimeric.de>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $fn_tmp
+ * @param string $fn
+ * @param string $id media id
+ * @param string $imime mime type
+ * @param bool $overwrite overwrite existing?
+ * @param string $move function name
+ * @return array|string
*/
function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'move_uploaded_file') {
global $conf;
@@ -491,6 +533,7 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov
* directory
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
* @param string $id
* @return int - revision date
*/
@@ -534,6 +577,10 @@ function media_saveOldRevision($id){
* @author Andreas Gohr <andi@splitbrain.org>
* @link http://www.splitbrain.org/blog/2007-02/12-internet_explorer_facilitates_cross_site_scripting
* @fixme check all 26 magic IE filetypes here?
+ *
+ * @param string $file path to file
+ * @param string $mime mimetype
+ * @return int
*/
function media_contentcheck($file,$mime){
global $conf;
@@ -543,14 +590,14 @@ function media_contentcheck($file,$mime){
$bytes = fread($fh, 256);
fclose($fh);
if(preg_match('/<(script|a|img|html|body|iframe)[\s>]/i',$bytes)){
- return -3;
+ return -3; //XSS: possibly malicious content
}
}
}
if(substr($mime,0,6) == 'image/'){
$info = @getimagesize($file);
if($mime == 'image/gif' && $info[2] != 1){
- return -1;
+ return -1; // uploaded content did not match the file extension
}elseif($mime == 'image/jpeg' && $info[2] != 2){
return -1;
}elseif($mime == 'image/png' && $info[2] != 3){
@@ -561,7 +608,7 @@ function media_contentcheck($file,$mime){
global $TEXT;
$TEXT = io_readFile($file);
if(checkwordblock()){
- return -2;
+ return -2; //blocked by the spam blacklist
}
}
return 0;
@@ -571,6 +618,12 @@ function media_contentcheck($file,$mime){
* Send a notify mail on uploads
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id media id
+ * @param string $file path to file
+ * @param string $mime mime type
+ * @param bool|int $old_rev revision timestamp or false
+ * @return bool
*/
function media_notify($id,$file,$mime,$old_rev=false){
global $conf;
@@ -582,6 +635,12 @@ function media_notify($id,$file,$mime,$old_rev=false){
/**
* List all files in a given Media namespace
+ *
+ * @param string $ns namespace
+ * @param null|int $auth permission level
+ * @param string $jump id
+ * @param bool $fullscreenview
+ * @param bool|string $sort sorting order, false skips sorting
*/
function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=false){
global $conf;
@@ -724,6 +783,7 @@ function media_tab_files_options(){
* Returns type of sorting for the list of files in media manager
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
* @return string - sort type
*/
function _media_get_sort_type() {
@@ -734,6 +794,7 @@ function _media_get_sort_type() {
* Returns type of listing for the list of files in media manager
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
* @return string - list type
*/
function _media_get_list_type() {
@@ -765,6 +826,10 @@ function _media_get_display_param($param, $values) {
* Prints tab that displays a list of all files
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $ns
+ * @param null|int $auth permission level
+ * @param string $jump item id
*/
function media_tab_files($ns,$auth=null,$jump='') {
global $lang;
@@ -781,6 +846,10 @@ function media_tab_files($ns,$auth=null,$jump='') {
* Prints tab that displays uploading form
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $ns
+ * @param null|int $auth permission level
+ * @param string $jump item id
*/
function media_tab_upload($ns,$auth=null,$jump='') {
global $lang;
@@ -798,6 +867,9 @@ function media_tab_upload($ns,$auth=null,$jump='') {
* Prints tab that displays search form
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $ns
+ * @param null|int $auth permission level
*/
function media_tab_search($ns,$auth=null) {
global $INPUT;
@@ -817,8 +889,13 @@ function media_tab_search($ns,$auth=null) {
* Prints tab that displays mediafile details
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image media id
+ * @param string $ns
+ * @param null|int $auth permission level
+ * @param string|int $rev revision timestamp or empty string
*/
-function media_tab_view($image, $ns, $auth=null, $rev=false) {
+function media_tab_view($image, $ns, $auth=null, $rev='') {
global $lang;
if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
@@ -837,6 +914,10 @@ function media_tab_view($image, $ns, $auth=null, $rev=false) {
* Prints tab that displays form for editing mediafile metadata
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image media id
+ * @param string $ns
+ * @param null|int $auth permission level
*/
function media_tab_edit($image, $ns, $auth=null) {
if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*");
@@ -851,6 +932,10 @@ function media_tab_edit($image, $ns, $auth=null) {
* Prints tab that displays mediafile revisions
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image media id
+ * @param string $ns
+ * @param null|int $auth permission level
*/
function media_tab_history($image, $ns, $auth=null) {
global $lang;
@@ -874,13 +959,14 @@ function media_tab_history($image, $ns, $auth=null) {
/**
* Prints mediafile details
*
- * @param string $image media id
- * @param $auth
- * @param int|bool $rev
- * @param JpegMeta|bool $meta
+ * @param string $image media id
+ * @param int $auth permission level
+ * @param int|string $rev revision timestamp or empty string
+ * @param JpegMeta|bool $meta
+ *
* @author Kate Arzamastseva <pshns@ukr.net>
*/
-function media_preview($image, $auth, $rev=false, $meta=false) {
+function media_preview($image, $auth, $rev='', $meta=false) {
$size = media_image_preview_size($image, $rev, $meta);
@@ -912,8 +998,12 @@ function media_preview($image, $auth, $rev=false, $meta=false) {
* Prints mediafile action buttons
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image media id
+ * @param int $auth permission level
+ * @param string|int $rev revision timestamp, or empty string
*/
-function media_preview_buttons($image, $auth, $rev=false) {
+function media_preview_buttons($image, $auth, $rev='') {
global $lang, $conf;
echo '<ul class="actions">'.NL;
@@ -961,11 +1051,11 @@ function media_preview_buttons($image, $auth, $rev=false) {
* Returns image width and height for mediamanager preview panel
*
* @author Kate Arzamastseva <pshns@ukr.net>
- * @param string $image
- * @param int $rev
- * @param JpegMeta $meta
- * @param int $size
- * @return array
+ * @param string $image
+ * @param int|string $rev
+ * @param JpegMeta|bool $meta
+ * @param int $size
+ * @return array|false
*/
function media_image_preview_size($image, $rev, $meta, $size = 500) {
if (!preg_match("/\.(jpe?g|gif|png)$/", $image) || !file_exists(mediaFN($image, $rev))) return false;
@@ -986,9 +1076,10 @@ function media_image_preview_size($image, $rev, $meta, $size = 500) {
* Returns the requested EXIF/IPTC tag from the image meta
*
* @author Kate Arzamastseva <pshns@ukr.net>
- * @param array $tags
+ *
+ * @param array $tags array with tags, first existing is returned
* @param JpegMeta $meta
- * @param string $alt
+ * @param string $alt alternative value
* @return string
*/
function media_getTag($tags,$meta,$alt=''){
@@ -1002,8 +1093,9 @@ function media_getTag($tags,$meta,$alt=''){
* Returns mediafile tags
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
* @param JpegMeta $meta
- * @return array
+ * @return array list of tags of the mediafile
*/
function media_file_tags($meta) {
// load the field descriptions
@@ -1032,8 +1124,13 @@ function media_file_tags($meta) {
* Prints mediafile tags
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image image id
+ * @param int $auth permission level
+ * @param string|int $rev revision timestamp, or empty string
+ * @param bool|JpegMeta $meta image object, or create one if false
*/
-function media_details($image, $auth, $rev=false, $meta=false) {
+function media_details($image, $auth, $rev='', $meta=false) {
global $lang;
if (!$meta) $meta = new JpegMeta(mediaFN($image, $rev));
@@ -1056,6 +1153,12 @@ function media_details($image, $auth, $rev=false, $meta=false) {
* Shows difference between two revisions of file
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image image id
+ * @param string $ns
+ * @param int $auth permission level
+ * @param bool $fromajax
+ * @return false|null|string
*/
function media_diff($image, $ns, $auth, $fromajax = false) {
global $conf;
@@ -1105,6 +1208,7 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
}
// prepare event data
+ $data = array();
$data[0] = $image;
$data[1] = $l_rev;
$data[2] = $r_rev;
@@ -1114,14 +1218,13 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
// trigger event
return trigger_event('MEDIA_DIFF', $data, '_media_file_diff', true);
-
}
/**
* Callback for media file diff
*
- * @param $data
- * @return bool|void
+ * @param array $data event data
+ * @return false|null
*/
function _media_file_diff($data) {
if(is_array($data) && count($data)===6) {
@@ -1135,6 +1238,13 @@ function _media_file_diff($data) {
* Shows difference between two revisions of image
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $image
+ * @param string|int $l_rev revision timestamp, or empty string
+ * @param string|int $r_rev revision timestamp, or empty string
+ * @param string $ns
+ * @param int $auth permission level
+ * @param bool $fromajax
*/
function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){
global $lang;
@@ -1255,11 +1365,12 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){
* and slider
*
* @author Kate Arzamastseva <pshns@ukr.net>
- * @param string $image
- * @param int $l_rev
- * @param int $r_rev
- * @param array $l_size
- * @param array $r_size
+ *
+ * @param string $image image id
+ * @param int $l_rev revision timestamp, or empty string
+ * @param int $r_rev revision timestamp, or empty string
+ * @param array $l_size array with width and height
+ * @param array $r_size array with width and height
* @param string $type
*/
function media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $type) {
@@ -1292,10 +1403,11 @@ function media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $type) {
/**
* Restores an old revision of a media file
*
- * @param string $image
- * @param int $rev
- * @param int $auth
+ * @param string $image media id
+ * @param int $rev revision timestamp or empty string
+ * @param int $auth
* @return string - file's id
+ *
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_restore($image, $rev, $auth){
@@ -1325,19 +1437,24 @@ function media_restore($image, $rev, $auth){
* @author Andreas Gohr <gohr@cosmocode.de>
* @author Kate Arzamastseva <pshns@ukr.net>
* @triggers MEDIA_SEARCH
+ *
+ * @param string $query
+ * @param string $ns
+ * @param null|int $auth
+ * @param bool $fullscreen
+ * @param string $sort
*/
function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural'){
global $conf;
global $lang;
$ns = cleanID($ns);
-
+ $evdata = array(
+ 'ns' => $ns,
+ 'data' => array(),
+ 'query' => $query
+ );
if ($query) {
- $evdata = array(
- 'ns' => $ns,
- 'data' => array(),
- 'query' => $query
- );
$evt = new Doku_Event('MEDIA_SEARCH', $evdata);
if ($evt->advise_before()) {
$dir = utf8_encodeFN(str_replace(':','/',$evdata['ns']));
@@ -1375,10 +1492,14 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural
/**
* Formats and prints one file in the list
+ *
+ * @param array $item
+ * @param int $auth permission level
+ * @param string $jump item id
+ * @param bool $display_namespace
*/
function media_printfile($item,$auth,$jump,$display_namespace=false){
global $lang;
- global $conf;
// Prepare zebra coloring
// I always wanted to use this variable name :-D
@@ -1452,9 +1573,9 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){
/**
* Display a media icon
*
- * @param $filename
- * @param string $size the size subfolder, if not specified 16x16 is used
- * @return string
+ * @param string $filename media id
+ * @param string $size the size subfolder, if not specified 16x16 is used
+ * @return string html
*/
function media_printicon($filename, $size=''){
list($ext) = mimetype(mediaFN($filename),false);
@@ -1472,6 +1593,11 @@ function media_printicon($filename, $size=''){
* Formats and prints one file in the list in the thumbnails view
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param array $item
+ * @param int $auth permission level
+ * @param bool|string $jump item id
+ * @param bool $display_namespace
*/
function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false){
@@ -1519,6 +1645,9 @@ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false
/**
* Prints a thumbnail and metainfo
+ *
+ * @param array $item
+ * @param bool $fullscreen
*/
function media_printimgdetail($item, $fullscreen=false){
// prepare thumbnail
@@ -1582,15 +1711,15 @@ function media_printimgdetail($item, $fullscreen=false){
}
/**
- * Build link based on the current, adding/rewriting
- * parameters
+ * Build link based on the current, adding/rewriting parameters
*
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
* @param array|bool $params
- * @param string $amp - separator
- * @param bool $abs
- * @param bool $params_array
- * @return string|array - link
+ * @param string $amp separator
+ * @param bool $abs absolute url?
+ * @param bool $params_array return the parmeters array?
+ * @return string|array - link or link parameters
*/
function media_managerURL($params=false, $amp='&amp;', $abs=false, $params_array=false) {
global $ID;
@@ -1621,6 +1750,10 @@ function media_managerURL($params=false, $amp='&amp;', $abs=false, $params_array
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $ns
+ * @param int $auth permission level
+ * @param bool $fullscreen
*/
function media_uploadform($ns, $auth, $fullscreen = false){
global $lang;
@@ -1708,6 +1841,10 @@ function media_getuploadsize(){
*
* @author Tobias Sarnowski <sarnowski@cosmocode.de>
* @author Kate Arzamastseva <pshns@ukr.net>
+ *
+ * @param string $ns
+ * @param string $query
+ * @param bool $fullscreen
*/
function media_searchform($ns,$query='',$fullscreen=false){
global $lang;
@@ -1735,6 +1872,8 @@ function media_searchform($ns,$query='',$fullscreen=false){
* Build a tree outline of available media namespaces
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ns
*/
function media_nstree($ns){
global $conf;
@@ -1783,6 +1922,9 @@ function media_nstree($ns){
* Prints a media namespace tree item
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function media_nstree_item($item){
global $INPUT;
@@ -1806,6 +1948,9 @@ function media_nstree_item($item){
* Prints a media namespace tree item opener
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $item
+ * @return string html
*/
function media_nstree_li($item){
$class='media level'.$item['level'];
@@ -1827,6 +1972,12 @@ function media_nstree_li($item){
* Resizes the given image to the given size
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename, path to file
+ * @param string $ext extension
+ * @param int $w desired width
+ * @param int $h desired height
+ * @return string path to resized or original size if failed
*/
function media_resize_image($file, $ext, $w, $h=0){
global $conf;
@@ -1847,9 +1998,10 @@ function media_resize_image($file, $ext, $w, $h=0){
$local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext);
$mtime = @filemtime($local); // 0 if not exists
- if( $mtime > filemtime($file) ||
- media_resize_imageIM($ext,$file,$info[0],$info[1],$local,$w,$h) ||
- media_resize_imageGD($ext,$file,$info[0],$info[1],$local,$w,$h) ){
+ if($mtime > filemtime($file) ||
+ media_resize_imageIM($ext, $file, $info[0], $info[1], $local, $w, $h) ||
+ media_resize_imageGD($ext, $file, $info[0], $info[1], $local, $w, $h)
+ ) {
if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']);
return $local;
}
@@ -1865,6 +2017,12 @@ function media_resize_image($file, $ext, $w, $h=0){
* image because most pics are more interesting in that area (rule of thirds)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename, path to file
+ * @param string $ext extension
+ * @param int $w desired width
+ * @param int $h desired height
+ * @return string path to resized or original size if failed
*/
function media_crop_image($file, $ext, $w, $h=0){
global $conf;
@@ -1929,7 +2087,7 @@ function media_crop_image($file, $ext, $w, $h=0){
* @param string $id id of the image
* @param int $w resize/crop width
* @param int $h resize/crop height
- * @return string
+ * @return string token or empty string if no token required
*/
function media_get_token($id,$w,$h){
// token is only required for modified images
@@ -1952,6 +2110,11 @@ function media_get_token($id,$w,$h){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Pavel Vitis <Pavel.Vitis@seznam.cz>
+ *
+ * @param string $url
+ * @param string $ext extension
+ * @param int $cache cachetime in seconds
+ * @return false|string path to cached file
*/
function media_get_from_URL($url,$ext,$cache){
global $conf;
@@ -1964,12 +2127,12 @@ function media_get_from_URL($url,$ext,$cache){
$mtime = @filemtime($local); // 0 if not exists
//decide if download needed:
- if( ($mtime == 0) || // cache does not exist
- ($cache != -1 && $mtime < time()-$cache) // 'recache' and cache has expired
- ){
- if(media_image_download($url,$local)){
+ if(($mtime == 0) || // cache does not exist
+ ($cache != -1 && $mtime < time() - $cache) // 'recache' and cache has expired
+ ) {
+ if(media_image_download($url, $local)) {
return $local;
- }else{
+ } else {
return false;
}
}
@@ -1985,6 +2148,10 @@ function media_get_from_URL($url,$ext,$cache){
* Download image files
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $url
+ * @param string $file path to file in which to put the downloaded content
+ * @return bool
*/
function media_image_download($url,$file){
global $conf;
@@ -2020,6 +2187,15 @@ function media_image_download($url,$file){
*
* @author Pavel Vitis <Pavel.Vitis@seznam.cz>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ext extension
+ * @param string $from filename path to file
+ * @param int $from_w original width
+ * @param int $from_h original height
+ * @param string $to path to resized file
+ * @param int $to_w desired width
+ * @param int $to_h desired height
+ * @return bool
*/
function media_resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){
global $conf;
@@ -2044,6 +2220,17 @@ function media_resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){
* crop images using external ImageMagick convert program
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $ext extension
+ * @param string $from filename path to file
+ * @param int $from_w original width
+ * @param int $from_h original height
+ * @param string $to path to resized file
+ * @param int $to_w desired width
+ * @param int $to_h desired height
+ * @param int $ofs_x offset of crop centre
+ * @param int $ofs_y offset of crop centre
+ * @return bool
*/
function media_crop_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x,$ofs_y){
global $conf;
@@ -2069,6 +2256,17 @@ function media_crop_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x,$o
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Sebastian Wienecke <s_wienecke@web.de>
+ *
+ * @param string $ext extension
+ * @param string $from filename path to file
+ * @param int $from_w original width
+ * @param int $from_h original height
+ * @param string $to path to resized file
+ * @param int $to_w desired width
+ * @param int $to_h desired height
+ * @param int $ofs_x offset of crop centre
+ * @param int $ofs_y offset of crop centre
+ * @return bool
*/
function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=0,$ofs_y=0){
global $conf;
@@ -2081,6 +2279,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
}
// create an image of the given filetype
+ $image = false;
if ($ext == 'jpg' || $ext == 'jpeg'){
if(!function_exists("imagecreatefromjpeg")) return false;
$image = @imagecreatefromjpeg($from);
@@ -2094,6 +2293,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
}
if(!$image) return false;
+ $newimg = false;
if(($conf['gdlib']>1) && function_exists("imagecreatetruecolor") && $ext != 'gif'){
$newimg = @imagecreatetruecolor ($to_w, $to_h);
}
@@ -2169,23 +2369,23 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=
* Return other media files with the same base name
* but different extensions.
*
- * @param string $src - ID of media file
- * @param array $exts - alternative extensions to find other files for
- * @return array - mime type => file ID
+ * @param string $src - ID of media file
+ * @param string[] $exts - alternative extensions to find other files for
+ * @return array - array(mime type => file ID)
*
* @author Anika Henke <anika@selfthinker.org>
*/
function media_alternativefiles($src, $exts){
$files = array();
- list($srcExt, $srcMime) = mimetype($src);
+ list($srcExt, /* $srcMime */) = mimetype($src);
$filebase = substr($src, 0, -1 * (strlen($srcExt)+1));
foreach($exts as $ext) {
$fileid = $filebase.'.'.$ext;
$file = mediaFN($fileid);
if(file_exists($file)) {
- list($fileExt, $fileMime) = mimetype($file);
+ list(/* $fileExt */, $fileMime) = mimetype($file);
$files[$fileMime] = $fileid;
}
}
@@ -2196,7 +2396,7 @@ function media_alternativefiles($src, $exts){
* Check if video/audio is supported to be embedded.
*
* @param string $mime - mimetype of media file
- * @param string $type - type of media files to check ('video', 'audio', or none)
+ * @param string $type - type of media files to check ('video', 'audio', or null for all)
* @return boolean
*
* @author Anika Henke <anika@selfthinker.org>
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 5f62926e4..2fbcbfd1f 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -20,7 +20,7 @@
*
* @param string $param the $_REQUEST variable name, default 'id'
* @param bool $clean if true, ID is cleaned
- * @return mixed|string
+ * @return string
*/
function getID($param='id',$clean=true){
/** @var Input $INPUT */
@@ -97,6 +97,7 @@ function getID($param='id',$clean=true){
* converted to unaccented ones
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $raw_id The pageid to clean
* @param boolean $ascii Force ASCII
* @return string cleaned id
@@ -152,7 +153,7 @@ function cleanID($raw_id,$ascii=false){
* @author Andreas Gohr <andi@splitbrain.org>
*
* @param string $id
- * @return string|bool the namespace part or false if the given ID has no namespace (root)
+ * @return string|false the namespace part or false if the given ID has no namespace (root)
*/
function getNS($id){
$pos = strrpos((string)$id,':');
@@ -255,7 +256,13 @@ function sectionID($title,&$check) {
* @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well)
* @return bool exists?
*/
-function page_exists($id,$rev='',$clean=true) {
+function page_exists($id,$rev='',$clean=true, $date_at=false) {
+ if($rev !== '' && $date_at) {
+ $pagelog = new PageChangeLog($id);
+ $pagelog_rev = $pagelog->getLastRevisionAt($rev);
+ if($pagelog_rev !== false)
+ $rev = $pagelog_rev;
+ }
return @file_exists(wikiFN($id,$rev,$clean));
}
@@ -265,7 +272,7 @@ function page_exists($id,$rev='',$clean=true) {
* The filename is URL encoded to protect Unicode chars
*
* @param $raw_id string id of wikipage
- * @param $rev string page revision, empty string for current
+ * @param $rev int|string page revision, empty string for current
* @param $clean bool flag indicating that $raw_id should be cleaned. Only set to false
* when $id is guaranteed to have been cleaned already.
* @return string full path
@@ -435,7 +442,7 @@ function localeFN($id,$ext='txt'){
* @param string $ns namespace which is context of id
* @param string $id relative id
* @param bool $clean flag indicating that id should be cleaned
- * @return mixed|string
+ * @return string
*/
function resolve_id($ns,$id,$clean=true){
global $conf;
@@ -486,9 +493,17 @@ function resolve_id($ns,$id,$clean=true){
* @param string &$page (reference) relative media id, updated to resolved id
* @param bool &$exists (reference) updated with existance of media
*/
-function resolve_mediaid($ns,&$page,&$exists){
+function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){
$page = resolve_id($ns,$page);
- $file = mediaFN($page);
+ if($rev !== '' && $date_at){
+ $medialog = new MediaChangeLog($page);
+ $medialog_rev = $medialog->getLastRevisionAt($rev);
+ if($medialog_rev !== false) {
+ $rev = $medialog_rev;
+ }
+ }
+
+ $file = mediaFN($page,$rev);
$exists = @file_exists($file);
}
@@ -501,7 +516,7 @@ function resolve_mediaid($ns,&$page,&$exists){
* @param string &$page (reference) relative page id, updated to resolved id
* @param bool &$exists (reference) updated with existance of media
*/
-function resolve_pageid($ns,&$page,&$exists){
+function resolve_pageid($ns,&$page,&$exists,$rev='',$date_at=false ){
global $conf;
global $ID;
$exists = false;
@@ -521,20 +536,26 @@ function resolve_pageid($ns,&$page,&$exists){
$page = resolve_id($ns,$page,false); // resolve but don't clean, yet
// get filename (calls clean itself)
- $file = wikiFN($page);
+ if($rev !== '' && $date_at) {
+ $pagelog = new PageChangeLog($page);
+ $pagelog_rev = $pagelog->getLastRevisionAt($rev);
+ if($pagelog_rev !== false)//something found
+ $rev = $pagelog_rev;
+ }
+ $file = wikiFN($page,$rev);
// if ends with colon or slash we have a namespace link
if(in_array(substr($page,-1), array(':', ';')) ||
($conf['useslash'] && substr($page,-1) == '/')){
- if(page_exists($page.$conf['start'])){
+ if(page_exists($page.$conf['start'],$rev,true,$date_at)){
// start page inside namespace
$page = $page.$conf['start'];
$exists = true;
- }elseif(page_exists($page.noNS(cleanID($page)))){
+ }elseif(page_exists($page.noNS(cleanID($page)),$rev,true,$date_at)){
// page named like the NS inside the NS
$page = $page.noNS(cleanID($page));
$exists = true;
- }elseif(page_exists($page)){
+ }elseif(page_exists($page,$rev,true,$date_at)){
// page like namespace exists
$page = $page;
$exists = true;
@@ -551,7 +572,7 @@ function resolve_pageid($ns,&$page,&$exists){
}else{
$try = $page.'s';
}
- if(page_exists($try)){
+ if(page_exists($try,$rev,true,$date_at)){
$page = $try;
$exists = true;
}
@@ -718,6 +739,7 @@ function utf8_decodeFN($file){
* Used for sidebars, but can be used other stuff as well
*
* @todo add event hook
+ *
* @param string $page the pagename you're looking for
* @return string|false the full page id of the found page, false if any
*/
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index a1040d12e..d96a01a60 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -71,6 +71,7 @@ class Doku_Handler {
*/
function plugin($match, $state, $pos, $pluginname){
$data = array($match);
+ /** @var DokuWiki_Syntax_Plugin $plugin */
$plugin = plugin_load('syntax',$pluginname);
if($plugin != null){
$data = $plugin->handle($match, $state, $pos, $this);
@@ -711,6 +712,9 @@ class Doku_Handler_CallWriter {
var $Handler;
+ /**
+ * @param Doku_Handler $Handler
+ */
function Doku_Handler_CallWriter(& $Handler) {
$this->Handler = & $Handler;
}
@@ -747,7 +751,7 @@ class Doku_Handler_Nest {
/**
* constructor
*
- * @param object $CallWriter the renderers current call writer
+ * @param Doku_Handler_CallWriter $CallWriter the renderers current call writer
* @param string $close closing instruction name, this is required to properly terminate the
* syntax mode if the document ends without a closing pattern
*/
@@ -805,6 +809,8 @@ class Doku_Handler_List {
var $listCalls = array();
var $listStack = array();
+ const NODE = 1;
+
function Doku_Handler_List(& $CallWriter) {
$this->CallWriter = & $CallWriter;
}
@@ -856,7 +862,8 @@ class Doku_Handler_List {
$depth = $this->interpretSyntax($call[1][0], $listType);
$this->initialDepth = $depth;
- $this->listStack[] = array($listType, $depth);
+ // array(list type, current depth, index of current listitem_open)
+ $this->listStack[] = array($listType, $depth, 1);
$this->listCalls[] = array('list'.$listType.'_open',array(),$call[2]);
$this->listCalls[] = array('listitem_open',array(1),$call[2]);
@@ -881,6 +888,7 @@ class Doku_Handler_List {
function listOpen($call) {
$depth = $this->interpretSyntax($call[1][0], $listType);
$end = end($this->listStack);
+ $key = key($this->listStack);
// Not allowed to be shallower than initialDepth
if ( $depth < $this->initialDepth ) {
@@ -897,6 +905,9 @@ class Doku_Handler_List {
$this->listCalls[] = array('listitem_open',array($depth-1),$call[2]);
$this->listCalls[] = array('listcontent_open',array(),$call[2]);
+ // new list item, update list stack's index into current listitem_open
+ $this->listStack[$key][2] = count($this->listCalls) - 2;
+
// Switched list type...
} else {
@@ -908,7 +919,7 @@ class Doku_Handler_List {
$this->listCalls[] = array('listcontent_open',array(),$call[2]);
array_pop($this->listStack);
- $this->listStack[] = array($listType, $depth);
+ $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2);
}
//------------------------------------------------------------------------
@@ -920,7 +931,10 @@ class Doku_Handler_List {
$this->listCalls[] = array('listitem_open', array($depth-1), $call[2]);
$this->listCalls[] = array('listcontent_open',array(),$call[2]);
- $this->listStack[] = array($listType, $depth);
+ // set the node/leaf state of this item's parent listitem_open to NODE
+ $this->listCalls[$this->listStack[$key][2]][1][1] = self::NODE;
+
+ $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2);
//------------------------------------------------------------------------
// Getting shallower ( $depth < $end[1] )
@@ -934,6 +948,7 @@ class Doku_Handler_List {
while (1) {
$end = end($this->listStack);
+ $key = key($this->listStack);
if ( $end[1] <= $depth ) {
@@ -946,6 +961,9 @@ class Doku_Handler_List {
$this->listCalls[] = array('listitem_open',array($depth-1),$call[2]);
$this->listCalls[] = array('listcontent_open',array(),$call[2]);
+ // new list item, update list stack's index into current listitem_open
+ $this->listStack[$key][2] = count($this->listCalls) - 2;
+
} else {
// Switching list type...
$this->listCalls[] = array('list'.$end[0].'_close', array(), $call[2]);
@@ -954,7 +972,7 @@ class Doku_Handler_List {
$this->listCalls[] = array('listcontent_open',array(),$call[2]);
array_pop($this->listStack);
- $this->listStack[] = array($listType, $depth);
+ $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2);
}
break;
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php
index 2e84eca7c..b46a5f505 100644
--- a/inc/parser/lexer.php
+++ b/inc/parser/lexer.php
@@ -56,12 +56,12 @@ class Doku_LexerParallelRegex {
/**
* Adds a pattern with an optional label.
*
- * @param mixed $pattern Perl style regex. Must be UTF-8
+ * @param mixed $pattern Perl style regex. Must be UTF-8
* encoded. If its a string, the (, )
* lose their meaning unless they
* form part of a lookahead or
* lookbehind assertation.
- * @param string $label Label of regex to be returned
+ * @param bool|string $label Label of regex to be returned
* on a match. Label must be ASCII
* @access public
*/
@@ -151,7 +151,8 @@ class Doku_LexerParallelRegex {
* "or" operator. Caches the regex.
* Will automatically escape (, ) and / tokens.
*
- * @param array $patterns List of patterns in order.
+ * @internal array $_patterns List of patterns in order.
+ * @return null|string
* @access private
*/
function _getCompoundedRegex() {
@@ -297,6 +298,7 @@ class Doku_Lexer {
*/
function Doku_Lexer(&$parser, $start = "accept", $case = false) {
$this->_case = $case;
+ /** @var Doku_LexerParallelRegex[] _regexes */
$this->_regexes = array();
$this->_parser = &$parser;
$this->_mode = new Doku_LexerStateStack($start);
@@ -425,11 +427,13 @@ class Doku_Lexer {
* Sends the matched token and any leading unmatched
* text to the parser changing the lexer to a new
* mode if one is listed.
- * @param string $unmatched Unmatched leading portion.
- * @param string $matched Actual token match.
- * @param string $mode Mode after match. A boolean
+ * @param string $unmatched Unmatched leading portion.
+ * @param string $matched Actual token match.
+ * @param bool|string $mode Mode after match. A boolean
* false mode causes no change.
- * @param int $pos Current byte index location in raw doc
+ * @param int $initialPos
+ * @param int $matchPos
+ * Current byte index location in raw doc
* thats being parsed
* @return boolean False if there was any error
* from the parser.
@@ -498,11 +502,12 @@ class Doku_Lexer {
* Calls the parser method named after the current
* mode. Empty content will be ignored. The lexer
* has a parser handler for each mode in the lexer.
- * @param string $content Text parsed.
- * @param boolean $is_match Token is recognised rather
+ * @param string $content Text parsed.
+ * @param boolean $is_match Token is recognised rather
* than unparsed data.
- * @param int $pos Current byte index location in raw doc
+ * @param int $pos Current byte index location in raw doc
* thats being parsed
+ * @return bool
* @access private
*/
function _invokeParser($content, $is_match, $pos) {
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 25bf3fe3d..ac8fd2130 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -165,7 +165,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
if(!isset($this->meta['title'])) $this->meta['title'] = $text;
// add the header to the TOC
- $hid = $this->_headerToLink($text, 'true');
+ $hid = $this->_headerToLink($text, true);
$this->toc_additem($hid, $text, $level);
// add to summary
@@ -251,8 +251,9 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* Open a list item
*
* @param int $level the nesting level
+ * @param bool $node true when a node; false when a leaf
*/
- function listitem_open($level) {
+ function listitem_open($level,$node=false) {
$this->cdata(str_repeat(DOKU_TAB, $level).'* ');
}
@@ -421,8 +422,8 @@ class Doku_Renderer_metadata extends Doku_Renderer {
/**
* keep track of internal links in $this->meta['relation']['references']
*
- * @param string $id page ID to link to. eg. 'wiki:syntax'
- * @param string|array $name name for the link, array for media file
+ * @param string $id page ID to link to. eg. 'wiki:syntax'
+ * @param string|array|null $name name for the link, array for media file
*/
function internallink($id, $name = null) {
global $ID;
@@ -458,8 +459,8 @@ class Doku_Renderer_metadata extends Doku_Renderer {
/**
* Render an external link
*
- * @param string $url full URL with scheme
- * @param string|array $name name for the link, array for media file
+ * @param string $url full URL with scheme
+ * @param string|array|null $name name for the link, array for media file
*/
function externallink($url, $name = null) {
if(is_array($name)) {
@@ -628,9 +629,9 @@ class Doku_Renderer_metadata extends Doku_Renderer {
* Construct a title and handle images in titles
*
* @author Harry Fuecks <hfuecks@gmail.com>
- * @param string|array $title either string title or media array
- * @param string $default default title if nothing else is found
- * @param null|string $id linked page id (used to extract title from first heading)
+ * @param string|array|null $title either string title or media array
+ * @param string $default default title if nothing else is found
+ * @param null|string $id linked page id (used to extract title from first heading)
* @return string title text
*/
function _getLinkTitle($title, $default, $id = null) {
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 09294539e..e1d28267a 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -190,7 +190,7 @@ class Doku_Renderer extends DokuWiki_Plugin {
/**
* Render plain text data
*
- * @param $text
+ * @param string $text
*/
function cdata($text) {
}
@@ -343,8 +343,9 @@ class Doku_Renderer extends DokuWiki_Plugin {
* Open a list item
*
* @param int $level the nesting level
+ * @param bool $node true when a node; false when a leaf
*/
- function listitem_open($level) {
+ function listitem_open($level,$node=false) {
}
/**
@@ -759,6 +760,9 @@ class Doku_Renderer extends DokuWiki_Plugin {
* casing and special chars
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $name
+ * @return string
*/
function _simpleTitle($name) {
global $conf;
@@ -778,6 +782,11 @@ class Doku_Renderer extends DokuWiki_Plugin {
/**
* Resolve an interwikilink
+ *
+ * @param string $shortcut identifier for the interwiki link
+ * @param string $reference fragment that refers the content
+ * @param null|bool $exists reference which returns if an internal page exists
+ * @return string interwikilink
*/
function _resolveInterWiki(&$shortcut, $reference, &$exists = null) {
//get interwiki URL
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 5c0353688..f1703111e 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -28,6 +28,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/** @var array A stack of section edit data */
protected $sectionedits = array();
+ var $date_at = ''; // link pages and media against this revision
/** @var int last section edit id, used by startSectionEdit */
protected $lastsecid = 0;
@@ -58,10 +59,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
* Register a new edit section range
*
- * @param $type string The section type identifier
- * @param $title string The section title
- * @param $start int The byte position for the edit start
- * @return string A marker class for the starting HTML element
+ * @param string $type The section type identifier
+ * @param string $title The section title
+ * @param int $start The byte position for the edit start
+ * @return string A marker class for the starting HTML element
+ *
* @author Adrian Lang <lang@cosmocode.de>
*/
public function startSectionEdit($start, $type, $title = null) {
@@ -72,8 +74,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
* Finish an edit section range
*
- * @param $end int The byte position for the edit end; null for the rest of
- * the page
+ * @param int $end The byte position for the edit end; null for the rest of the page
+ *
* @author Adrian Lang <lang@cosmocode.de>
*/
public function finishSectionEdit($end = null) {
@@ -455,9 +457,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Open a list item
*
* @param int $level the nesting level
+ * @param bool $node true when a node; false when a leaf
*/
- function listitem_open($level) {
- $this->doc .= '<li class="level'.$level.'">';
+ function listitem_open($level, $node=false) {
+ $branching = $node ? ' node' : '';
+ $this->doc .= '<li class="level'.$level.$branching.'">';
}
/**
@@ -818,8 +822,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$default = $this->_simpleTitle($id);
// now first resolve and clean up the $id
- resolve_pageid(getNS($ID), $id, $exists);
+ resolve_pageid(getNS($ID), $id, $exists, $this->date_at, true);
+ $link = array();
$name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype);
if(!$isImage) {
if($exists) {
@@ -846,11 +851,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['pre'] = '<span class="curid">';
$link['suf'] = '</span>';
}
- $link['more'] = '';
- $link['class'] = $class;
- $link['url'] = wl($id, $params);
- $link['name'] = $name;
- $link['title'] = $id;
+ $link['more'] = '';
+ $link['class'] = $class;
+ if($this->date_at) {
+ $params['at'] = $this->date_at;
+ }
+ $link['url'] = wl($id, $params);
+ $link['name'] = $name;
+ $link['title'] = $id;
//add search string
if($search) {
($conf['userewrite']) ? $link['url'] .= '?' : $link['url'] .= '&amp;';
@@ -904,6 +912,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
//prepare for formating
+ $link = array();
$link['target'] = $conf['target']['extern'];
$link['style'] = '';
$link['pre'] = '';
@@ -981,6 +990,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $conf;
//simple setup
+ $link = array();
$link['target'] = $conf['target']['windows'];
$link['pre'] = '';
$link['suf'] = '';
@@ -995,6 +1005,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$link['title'] = $this->_xmlEntities($url);
$url = str_replace('\\', '/', $url);
+ $url = ltrim($url,'/');
$url = 'file:///'.$url;
$link['url'] = $url;
@@ -1062,7 +1073,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$height = null, $cache = null, $linking = null, $return = false) {
global $ID;
list($src, $hash) = explode('#', $src, 2);
- resolve_mediaid(getNS($ID), $src, $exists);
+ resolve_mediaid(getNS($ID), $src, $exists, $this->date_at, true);
$noLink = false;
$render = ($linking == 'linkonly') ? false : true;
@@ -1070,7 +1081,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
list($ext, $mime) = mimetype($src, false);
if(substr($mime, 0, 5) == 'image' && $render) {
- $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), ($linking == 'direct'));
+ $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache, 'rev'=>$this->_getLastMediaRevisionAt($src)), ($linking == 'direct'));
} elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render) {
// don't link movies
$noLink = true;
@@ -1078,7 +1089,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// add file icons
$class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext);
$link['class'] .= ' mediafile mf_'.$class;
- $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), true);
+ $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache , 'rev'=>$this->_getLastMediaRevisionAt($src)), true);
if($exists) $link['title'] .= ' ('.filesize_h(filesize(mediaFN($src))).')';
}
@@ -1109,9 +1120,10 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @param int $height height of media in pixel
* @param string $cache cache|recache|nocache
* @param string $linking linkonly|detail|nolink
+ * @param bool $return return HTML instead of adding to $doc
*/
function externalmedia($src, $title = null, $align = null, $width = null,
- $height = null, $cache = null, $linking = null) {
+ $height = null, $cache = null, $linking = null, $return = false) {
list($src, $hash) = explode('#', $src, 2);
$noLink = false;
$render = ($linking == 'linkonly') ? false : true;
@@ -1135,8 +1147,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if($hash) $link['url'] .= '#'.$hash;
//output formatted
- if($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
- else $this->doc .= $this->_formatLink($link);
+ if($return) {
+ if($linking == 'nolink' || $noLink) return $link['name'];
+ else return $this->_formatLink($link);
+ } else {
+ if($linking == 'nolink' || $noLink) $this->doc .= $link['name'];
+ else $this->doc .= $this->_formatLink($link);
+ }
}
/**
@@ -1430,7 +1447,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
return $title;
}
//add image tag
- $ret .= '<img src="'.ml($src, array('w' => $width, 'h' => $height, 'cache' => $cache)).'"';
+ $ret .= '<img src="'.ml($src, array('w' => $width, 'h' => $height, 'cache' => $cache, 'rev'=>$this->_getLastMediaRevisionAt($src))).'"';
$ret .= ' class="media'.$align.'"';
if($title) {
@@ -1565,7 +1582,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Returns HTML code for images used in link titles
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param string $img
+ * @param array $img
* @return string HTML img tag or similar
*/
function _imageTitle($img) {
@@ -1575,7 +1592,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// see internalmedia() and externalmedia()
list($img['src']) = explode('#', $img['src'], 2);
if($img['type'] == 'internalmedia') {
- resolve_mediaid(getNS($ID), $img['src'], $exists);
+ resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);
}
return $this->_media(
@@ -1638,13 +1655,22 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if(!$atts['width']) $atts['width'] = 320;
if(!$atts['height']) $atts['height'] = 240;
- // prepare alternative formats
- $extensions = array('webm', 'ogv', 'mp4');
- $alternatives = media_alternativefiles($src, $extensions);
- $poster = media_alternativefiles($src, array('jpg', 'png'), true);
- $posterUrl = '';
- if(!empty($poster)) {
- $posterUrl = ml(reset($poster), '', true, '&');
+ $posterUrl = '';
+ $files = array();
+ $isExternal = media_isexternal($src);
+
+ if ($isExternal) {
+ // take direct source for external files
+ list(/*ext*/, $srcMime) = mimetype($src);
+ $files[$srcMime] = $src;
+ } else {
+ // prepare alternative formats
+ $extensions = array('webm', 'ogv', 'mp4');
+ $files = media_alternativefiles($src, $extensions);
+ $poster = media_alternativefiles($src, array('jpg', 'png'));
+ if(!empty($poster)) {
+ $posterUrl = ml(reset($poster), '', true, '&');
+ }
}
$out = '';
@@ -1655,13 +1681,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$fallback = '';
// output source for each alternative video format
- foreach($alternatives as $mime => $file) {
- $url = ml($file, '', true, '&');
+ foreach($files as $mime => $file) {
+ if ($isExternal) {
+ $url = $file;
+ $linkType = 'externalmedia';
+ } else {
+ $url = ml($file, '', true, '&');
+ $linkType = 'internalmedia';
+ }
$title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file)));
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
+ $fallback .= $this->$linkType($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
}
// finish
@@ -1679,11 +1711,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @param array $atts - additional attributes for the <audio> tag
* @return string
*/
- function _audio($src, $atts = null) {
+ function _audio($src, $atts = array()) {
+ $files = array();
+ $isExternal = media_isexternal($src);
- // prepare alternative formats
- $extensions = array('ogg', 'mp3', 'wav');
- $alternatives = media_alternativefiles($src, $extensions);
+ if ($isExternal) {
+ // take direct source for external files
+ list(/*ext*/, $srcMime) = mimetype($src);
+ $files[$srcMime] = $src;
+ } else {
+ // prepare alternative formats
+ $extensions = array('ogg', 'mp3', 'wav');
+ $files = media_alternativefiles($src, $extensions);
+ }
$out = '';
// open audio tag
@@ -1691,13 +1731,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$fallback = '';
// output source for each alternative audio format
- foreach($alternatives as $mime => $file) {
- $url = ml($file, '', true, '&');
+ foreach($files as $mime => $file) {
+ if ($isExternal) {
+ $url = $file;
+ $linkType = 'externalmedia';
+ } else {
+ $url = ml($file, '', true, '&');
+ $linkType = 'internalmedia';
+ }
$title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file)));
$out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL;
// alternative content (just a link to the file)
- $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
+ $fallback .= $this->$linkType($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true);
}
// finish
@@ -1705,6 +1751,21 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$out .= '</audio>'.NL;
return $out;
}
+
+ /**
+ * _getLastMediaRevisionAt is a helperfunction to internalmedia() and _media()
+ * which returns an existing media revision less or equal to rev or date_at
+ *
+ * @author lisps
+ * @param string $media_id
+ * @access protected
+ * @return string revision ('' for current)
+ */
+ function _getLastMediaRevisionAt($media_id){
+ if(!$this->date_at || media_isexternal($media_id)) return '';
+ $pagelog = new MediaChangeLog($media_id);
+ return $pagelog->getLastRevisionAt($this->date_at);
+ }
#endregion
}
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 9c2a0b570..3ef8138a7 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -55,8 +55,13 @@ define('METADATA_RENDER_UNLIMITED', 4);
* wasn't found
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @param string|int $rev revision timestamp or empty string
+ * @param bool $excuse
+ * @return null|string
*/
-function p_wiki_xhtml($id, $rev='', $excuse=true){
+function p_wiki_xhtml($id, $rev='', $excuse=true,$date_at=''){
$file = wikiFN($id,$rev);
$ret = '';
@@ -65,9 +70,9 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){
$keep = $ID;
$ID = $id;
- if($rev){
+ if($rev || $date_at){
if(@file_exists($file)){
- $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info); //no caching on old revisions
+ $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info,$date_at); //no caching on old revisions
}elseif($excuse){
$ret = p_locale_xhtml('norev');
}
@@ -89,6 +94,9 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){
* Returns the specified local text in parsed format
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @return null|string
*/
function p_locale_xhtml($id){
//fetch parsed locale
@@ -101,6 +109,11 @@ function p_locale_xhtml($id){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $file filename, path to file
+ * @param string $format
+ * @param string $id page id
+ * @return null|string
*/
function p_cached_output($file, $format='xhtml', $id='') {
global $conf;
@@ -129,6 +142,11 @@ function p_cached_output($file, $format='xhtml', $id='') {
* Uses and creates a serialized cache file
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename, path to file
+ * @param bool $cacheonly
+ * @param string $id page id
+ * @return array|null
*/
function p_cached_instructions($file,$cacheonly=false,$id='') {
static $run = null;
@@ -157,7 +175,8 @@ function p_cached_instructions($file,$cacheonly=false,$id='') {
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
- * @param string $text raw wiki syntax text
+ *
+ * @param string $text raw wiki syntax text
* @return array a list of instruction arrays
*/
function p_get_instructions($text){
@@ -185,9 +204,9 @@ function p_get_instructions($text){
/**
* returns the metadata of a page
*
- * @param string $id The id of the page the metadata should be returned from
- * @param string $key The key of the metdata value that shall be read (by default everything) - separate hierarchies by " " like "date created"
- * @param int $render If the page should be rendererd - possible values:
+ * @param string $id The id of the page the metadata should be returned from
+ * @param string $key The key of the metdata value that shall be read (by default everything) - separate hierarchies by " " like "date created"
+ * @param int $render If the page should be rendererd - possible values:
* METADATA_DONT_RENDER, METADATA_RENDER_USING_SIMPLE_CACHE, METADATA_RENDER_USING_CACHE
* METADATA_RENDER_UNLIMITED (also combined with the previous two options),
* default: METADATA_RENDER_USING_CACHE
@@ -360,6 +379,9 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){
* used on page deletion
*
* @author Michael Klier <chi@chimeric.de>
+ *
+ * @param string $id page id
+ * @return bool success / fail
*/
function p_purge_metadata($id) {
$meta = p_read_metadata($id);
@@ -423,6 +445,10 @@ function p_save_metadata($id, $meta) {
* renders the metadata of a page
*
* @author Esther Brunner <esther@kaffeehaus.ch>
+ *
+ * @param string $id page id
+ * @param array $orig the original metadata
+ * @return array|null array('current'=> array,'persistent'=> array);
*/
function p_render_metadata($id, $orig){
// make sure the correct ID is in global ID
@@ -477,6 +503,8 @@ function p_render_metadata($id, $orig){
* returns all available parser syntax modes in correct order
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array[] with for each plugin the array('sort' => sortnumber, 'mode' => mode string, 'obj' => plugin object)
*/
function p_get_parsermodes(){
global $conf;
@@ -569,6 +597,10 @@ function p_get_parsermodes(){
* Callback function for usort
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $a
+ * @param array $b
+ * @return int $a is lower/equal/higher than $b
*/
function p_sort_modes($a, $b){
if($a['sort'] == $b['sort']) return 0;
@@ -582,15 +614,25 @@ function p_sort_modes($a, $b){
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $mode
+ * @param array|null|false $instructions
+ * @param array $info returns render info like enabled toc and cache
+ * @return null|string rendered output
*/
-function p_render($mode,$instructions,&$info){
+function p_render($mode,$instructions,&$info,$date_at=''){
if(is_null($instructions)) return '';
+ if($instructions === false) return '';
$Renderer = p_get_renderer($mode);
if (is_null($Renderer)) return null;
$Renderer->reset();
+ if($date_at) {
+ $Renderer->date_at = $date_at;
+ }
+
$Renderer->smileys = getSmileys();
$Renderer->entities = getEntities();
$Renderer->acronyms = getAcronyms();
@@ -617,7 +659,7 @@ function p_render($mode,$instructions,&$info){
* Figure out the correct renderer class to use for $mode,
* instantiate and return it
*
- * @param $mode string Mode of the renderer to get
+ * @param string $mode Mode of the renderer to get
* @return null|Doku_Renderer The renderer
*
* @author Christopher Smith <chris@jalakai.co.uk>
@@ -636,6 +678,7 @@ function p_get_renderer($mode) {
}
// not bundled, see if its an enabled renderer plugin & when $mode is 'xhtml', the renderer can supply that format.
+ /** @var Doku_Renderer $Renderer */
$Renderer = $plugin_controller->load('renderer',$rname);
if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode != 'xhtml' || $mode == $Renderer->getFormat())) {
return $Renderer;
@@ -673,8 +716,8 @@ function p_get_renderer($mode) {
* METADATA_RENDER_USING_SIMPLE_CACHE,
* METADATA_RENDER_USING_CACHE,
* METADATA_RENDER_UNLIMITED
- *
* @return string|null The first heading
+ *
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michael Hamann <michael@content-space.de>
*/
@@ -688,8 +731,8 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){
* @param string $code source code to be highlighted
* @param string $language language to provide highlighting
* @param string $wrapper html element to wrap the returned highlighted text
- *
* @return string xhtml code
+ *
* @author Christopher Smith <chris@jalakai.co.uk>
* @author Andreas Gohr <andi@splitbrain.org>
*/
diff --git a/inc/plugin.php b/inc/plugin.php
index fbfc0325f..9d9b2044c 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -30,7 +30,7 @@ class DokuWiki_Plugin {
* desc - Short description of the plugin (Text only)
* url - Website with more information on the plugin (eg. syntax description)
*/
- function getInfo() {
+ public function getInfo(){
$parts = explode('_', get_class($this));
$info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt';
if(@file_exists($info)) return confToHash($info);
@@ -48,16 +48,27 @@ class DokuWiki_Plugin {
// plugin introspection methods
// extract from class name, format = <plugin type>_plugin_<name>[_<component name>]
- function getPluginType() {
+ /**
+ * @return string plugin type
+ */
+ public function getPluginType() {
list($t) = explode('_', get_class($this), 2);
return $t;
}
- function getPluginName() {
- list($t, $p, $n) = explode('_', get_class($this), 4);
+
+ /**
+ * @return string plugin name
+ */
+ public function getPluginName() {
+ list(/* $t */, /* $p */, $n) = explode('_', get_class($this), 4);
return $n;
}
- function getPluginComponent() {
- list($t, $p, $n, $c) = explode('_', get_class($this), 4);
+
+ /**
+ * @return string component name
+ */
+ public function getPluginComponent() {
+ list(/* $t */, /* $p */, /* $n */, $c) = explode('_', get_class($this), 4);
return (isset($c)?$c:'');
}
@@ -71,7 +82,7 @@ class DokuWiki_Plugin {
* @param string $id id of the string to be retrieved
* @return string string in appropriate language or english if not available
*/
- function getLang($id) {
+ public function getLang($id) {
if (!$this->localised) $this->setupLocale();
return (isset($this->lang[$id]) ? $this->lang[$id] : '');
@@ -86,16 +97,18 @@ class DokuWiki_Plugin {
* @param string $id id of language dependent wiki page
* @return string parsed contents of the wiki page in xhtml format
*/
- function locale_xhtml($id) {
+ public function locale_xhtml($id) {
return p_cached_output($this->localFN($id));
}
/**
- * localFN($id)
- * prepends appropriate path for a language dependent filename
+ * Prepends appropriate path for a language dependent filename
* plugin equivalent of localFN()
+ *
+ * @param string $id id of localization file
+ * @return string wiki text
*/
- function localFN($id) {
+ public function localFN($id) {
global $conf;
$plugin = $this->getPluginName();
$file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt';
@@ -110,21 +123,33 @@ class DokuWiki_Plugin {
}
/**
- * setupLocale()
- * reads all the plugins language dependent strings into $this->lang
- * this function is automatically called by getLang()
+ * Reads all the plugins language dependent strings into $this->lang
+ * this function is automatically called by getLang()
*/
function setupLocale() {
- if ($this->localised) return;
+ if($this->localised) return;
- global $conf; // definitely don't invoke "global $lang"
- $path = DOKU_PLUGIN.$this->getPluginName().'/lang/';
+ global $conf, $config_cascade; // definitely don't invoke "global $lang"
+ $path = DOKU_PLUGIN . $this->getPluginName() . '/lang/';
$lang = array();
// don't include once, in case several plugin components require the same language file
- @include($path.'en/lang.php');
- if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');
+ @include($path . 'en/lang.php');
+ foreach($config_cascade['lang']['plugin'] as $config_file) {
+ if(@file_exists($config_file . $this->getPluginName() . '/en/lang.php')) {
+ include($config_file . $this->getPluginName() . '/en/lang.php');
+ }
+ }
+
+ if($conf['lang'] != 'en') {
+ @include($path . $conf['lang'] . '/lang.php');
+ foreach($config_cascade['lang']['plugin'] as $config_file) {
+ if(@file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) {
+ include($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php');
+ }
+ }
+ }
$this->lang = $lang;
$this->localised = true;
@@ -140,7 +165,7 @@ class DokuWiki_Plugin {
* @param mixed $notset what to return if the setting is not available
* @return mixed
*/
- function getConf($setting, $notset=false){
+ public function getConf($setting, $notset=false){
if (!$this->configloaded){ $this->loadConfig(); }
@@ -177,7 +202,7 @@ class DokuWiki_Plugin {
*
* @return array setting => value
*/
- function readDefaultSettings() {
+ protected function readDefaultSettings() {
$path = DOKU_PLUGIN.$this->getPluginName().'/conf/';
$conf = array();
@@ -196,10 +221,9 @@ class DokuWiki_Plugin {
*
* @param string $name name of plugin to load
* @param bool $msg if a message should be displayed in case the plugin is not available
- *
- * @return object helper plugin object
+ * @return DokuWiki_Plugin|null helper plugin object
*/
- function loadHelper($name, $msg = true){
+ public function loadHelper($name, $msg = true){
$obj = plugin_load('helper',$name);
if (is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.",-1);
return $obj;
@@ -211,8 +235,14 @@ class DokuWiki_Plugin {
/**
* email
* standardised function to generate an email link according to obfuscation settings
+ *
+ * @param string $email
+ * @param string $name
+ * @param string $class
+ * @param string $more
+ * @return string html
*/
- function email($email, $name='', $class='', $more='') {
+ public function email($email, $name='', $class='', $more='') {
if (!$email) return $name;
$email = obfuscate($email);
if (!$name) $name = $email;
@@ -223,8 +253,15 @@ class DokuWiki_Plugin {
/**
* external_link
* standardised function to generate an external link according to conf settings
+ *
+ * @param string $link
+ * @param string $title
+ * @param string $class
+ * @param string $target
+ * @param string $more
+ * @return string
*/
- function external_link($link, $title='', $class='', $target='', $more='') {
+ public function external_link($link, $title='', $class='', $target='', $more='') {
global $conf;
$link = htmlentities($link);
@@ -247,11 +284,12 @@ class DokuWiki_Plugin {
* Instead use render_text()
*
* @deprecated 2014-01-22
- * @param $name
- * @param $arguments
+ *
+ * @param string $name
+ * @param array $arguments
* @return null|string
*/
- function __call($name, $arguments) {
+ public function __call($name, $arguments) {
if($name == 'render'){
dbg_deprecated('render_text()');
if(!isset($arguments[1])) $arguments[1] = 'xhtml';
@@ -265,11 +303,11 @@ class DokuWiki_Plugin {
* output text string through the parser, allows dokuwiki markup to be used
* very ineffecient for small pieces of data - try not to use
*
- * @param string $text wiki markup to parse
+ * @param string $text wiki markup to parse
* @param string $format output format
* @return null|string
*/
- function render_text($text, $format='xhtml') {
+ public function render_text($text, $format='xhtml') {
return p_render($format, p_get_instructions($text),$info);
}
@@ -278,7 +316,7 @@ class DokuWiki_Plugin {
*
* @return bool false if the plugin has to be instantiated
*/
- function isSingleton() {
+ public function isSingleton() {
return true;
}
}
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index d80cd4c9e..dfd4d0a29 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -66,14 +66,14 @@ class Doku_Plugin_Controller {
* @param $name string name of the plugin to load
* @param $new bool true to return a new instance of the plugin, false to use an already loaded instance
* @param $disabled bool true to load even disabled plugins
- * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|null the plugin object or null on failure
+ * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|DokuWiki_Auth_Plugin|DokuWiki_Admin_Plugin|DokuWiki_Action_Plugin|DokuWiki_Remote_Plugin|null the plugin object or null on failure
*/
public function load($type,$name,$new=false,$disabled=false){
//we keep all loaded plugins available in global scope for reuse
global $DOKU_PLUGINS;
- list($plugin,$component) = $this->_splitName($name);
+ list($plugin, /* $component */) = $this->_splitName($name);
// check if disabled
if(!$disabled && $this->isdisabled($plugin)){
@@ -114,7 +114,7 @@ class Doku_Plugin_Controller {
* Whether plugin is disabled
*
* @param string $plugin name of plugin
- * @return bool; true disabled, false enabled
+ * @return bool true disabled, false enabled
*/
public function isdisabled($plugin) {
return empty($this->tmp_plugins[$plugin]);
@@ -124,7 +124,7 @@ class Doku_Plugin_Controller {
* Disable the plugin
*
* @param string $plugin name of plugin
- * @return bool; true saving succeed, false saving failed
+ * @return bool true saving succeed, false saving failed
*/
public function disable($plugin) {
if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false;
@@ -136,7 +136,7 @@ class Doku_Plugin_Controller {
* Enable the plugin
*
* @param string $plugin name of plugin
- * @return bool; true saving succeed, false saving failed
+ * @return bool true saving succeed, false saving failed
*/
public function enable($plugin) {
if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false;
@@ -178,8 +178,10 @@ class Doku_Plugin_Controller {
// to keep everything simple we just skip the plugin completely
continue;
} elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) {
- // treat this as a default disabled plugin(over-rideable by the plugin manager)
- // deprecated 2011-09-10 (usage of disabled files)
+ /**
+ * treat this as a default disabled plugin(over-rideable by the plugin manager)
+ * @deprecated 2011-09-10 (usage of disabled files)
+ */
if (empty($this->plugin_cascade['local'][$plugin])) {
$all_plugins[$plugin] = 0;
} else {
@@ -227,7 +229,7 @@ class Doku_Plugin_Controller {
* @param bool $forceSave;
* false to save only when config changed
* true to always save
- * @return bool; true saving succeed, false saving failed
+ * @return bool true saving succeed, false saving failed
*/
protected function saveList($forceSave = false) {
global $conf;
@@ -300,12 +302,9 @@ class Doku_Plugin_Controller {
/**
* Returns a list of available plugin components of given type
*
- * @param string $type, plugin_type name;
- * the type of plugin to return,
- * @param bool $enabled;
- * true to return enabled plugins,
- * false to return disabled plugins
- *
+ * @param string $type plugin_type name; the type of plugin to return,
+ * @param bool $enabled true to return enabled plugins,
+ * false to return disabled plugins
* @return array of plugin components of requested type
*/
protected function _getListByType($type, $enabled) {
diff --git a/inc/pluginutils.php b/inc/pluginutils.php
index 911c4e5c0..4d591869d 100644
--- a/inc/pluginutils.php
+++ b/inc/pluginutils.php
@@ -49,7 +49,7 @@ function plugin_load($type,$name,$new=false,$disabled=false) {
* Whether plugin is disabled
*
* @param string $plugin name of plugin
- * @return bool; true disabled, false enabled
+ * @return bool true disabled, false enabled
*/
function plugin_isdisabled($plugin) {
/** @var $plugin_controller Doku_Plugin_Controller */
@@ -61,7 +61,7 @@ function plugin_isdisabled($plugin) {
* Enable the plugin
*
* @param string $plugin name of plugin
- * @return bool; true saving succeed, false saving failed
+ * @return bool true saving succeed, false saving failed
*/
function plugin_enable($plugin) {
/** @var $plugin_controller Doku_Plugin_Controller */
@@ -73,7 +73,7 @@ function plugin_enable($plugin) {
* Disable the plugin
*
* @param string $plugin name of plugin
- * @return bool; true saving succeed, false saving failed
+ * @return bool true saving succeed, false saving failed
*/
function plugin_disable($plugin) {
/** @var $plugin_controller Doku_Plugin_Controller */
diff --git a/inc/remote.php b/inc/remote.php
index e27aa74f8..861353a19 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -60,6 +60,9 @@ class RemoteAPI {
private $dateTransformation;
private $fileTransformation;
+ /**
+ * constructor
+ */
public function __construct() {
$this->dateTransformation = array($this, 'dummyTransformation');
$this->fileTransformation = array($this, 'dummyTransformation');
@@ -75,7 +78,7 @@ class RemoteAPI {
}
/**
- * call a method via remote api.
+ * Call a method via remote api.
*
* @param string $method name of the method to call.
* @param array $args arguments to pass to the given method
@@ -85,7 +88,7 @@ class RemoteAPI {
if ($args === null) {
$args = array();
}
- list($type, $pluginName, $call) = explode('.', $method, 3);
+ list($type, $pluginName, /* $call */) = explode('.', $method, 3);
if ($type === 'plugin') {
return $this->callPlugin($pluginName, $method, $args);
}
@@ -95,11 +98,25 @@ class RemoteAPI {
return $this->callCustomCallPlugin($method, $args);
}
+ /**
+ * Check existance of core methods
+ *
+ * @param string $name name of the method
+ * @return bool if method exists
+ */
private function coreMethodExist($name) {
$coreMethods = $this->getCoreMethods();
return array_key_exists($name, $coreMethods);
}
+ /**
+ * Try to call custom methods provided by plugins
+ *
+ * @param string $method name of method
+ * @param array $args
+ * @return mixed
+ * @throws RemoteException if method not exists
+ */
private function callCustomCallPlugin($method, $args) {
$customCalls = $this->getCustomCallPlugins();
if (!array_key_exists($method, $customCalls)) {
@@ -109,6 +126,12 @@ class RemoteAPI {
return $this->callPlugin($customCall[0], $customCall[1], $args);
}
+ /**
+ * Returns plugin calls that are registered via RPC_CALL_ADD action
+ *
+ * @return array with pairs of custom plugin calls
+ * @triggers RPC_CALL_ADD
+ */
private function getCustomCallPlugins() {
if ($this->pluginCustomCalls === null) {
$data = array();
@@ -118,6 +141,15 @@ class RemoteAPI {
return $this->pluginCustomCalls;
}
+ /**
+ * Call a plugin method
+ *
+ * @param string $pluginName
+ * @param string $method method name
+ * @param array $args
+ * @return mixed return of custom method
+ * @throws RemoteException
+ */
private function callPlugin($pluginName, $method, $args) {
$plugin = plugin_load('remote', $pluginName);
$methods = $this->getPluginMethods();
@@ -129,6 +161,14 @@ class RemoteAPI {
return call_user_func_array(array($plugin, $name), $args);
}
+ /**
+ * Call a core method
+ *
+ * @param string $method name of method
+ * @param array $args
+ * @return mixed
+ * @throws RemoteException if method not exist
+ */
private function callCoreMethod($method, $args) {
$coreMethods = $this->getCoreMethods();
$this->checkAccess($coreMethods[$method]);
@@ -139,6 +179,11 @@ class RemoteAPI {
return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args);
}
+ /**
+ * Check if access should be checked
+ *
+ * @param array $methodMeta data about the method
+ */
private function checkAccess($methodMeta) {
if (!isset($methodMeta['public'])) {
$this->forceAccess();
@@ -149,12 +194,26 @@ class RemoteAPI {
}
}
- private function checkArgumentLength($method, $args) {
- if (count($method['args']) < count($args)) {
+ /**
+ * Check the number of parameters
+ *
+ * @param array $methodMeta data about the method
+ * @param array $args
+ * @throws RemoteException if wrong parameter count
+ */
+ private function checkArgumentLength($methodMeta, $args) {
+ if (count($methodMeta['args']) < count($args)) {
throw new RemoteException('Method does not exist - wrong parameter count.', -32603);
}
}
+ /**
+ * Determine the name of the real method
+ *
+ * @param array $methodMeta list of data of the methods
+ * @param string $method name of method
+ * @return string
+ */
private function getMethodName($methodMeta, $method) {
if (isset($methodMeta[$method]['name'])) {
return $methodMeta[$method]['name'];
@@ -164,6 +223,8 @@ class RemoteAPI {
}
/**
+ * Perform access check for current user
+ *
* @return bool true if the current user has access to remote api.
*/
public function hasAccess() {
@@ -186,8 +247,10 @@ class RemoteAPI {
}
/**
- * @throws RemoteException On denied access.
+ * Requests access
+ *
* @return void
+ * @throws RemoteException On denied access.
*/
public function forceAccess() {
if (!$this->hasAccess()) {
@@ -196,7 +259,10 @@ class RemoteAPI {
}
/**
+ * Collects all the methods of the enabled Remote Plugins
+ *
* @return array all plugin methods.
+ * @throws RemoteException if not implemented
*/
public function getPluginMethods() {
if ($this->pluginMethods === null) {
@@ -204,6 +270,7 @@ class RemoteAPI {
$plugins = plugin_list('remote');
foreach ($plugins as $pluginName) {
+ /** @var DokuWiki_Remote_Plugin $plugin */
$plugin = plugin_load('remote', $pluginName);
if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) {
throw new RemoteException("Plugin $pluginName does not implement DokuWiki_Remote_Plugin");
@@ -219,6 +286,8 @@ class RemoteAPI {
}
/**
+ * Collects all the core methods
+ *
* @param RemoteAPICore $apiCore this parameter is used for testing. Here you can pass a non-default RemoteAPICore
* instance. (for mocking)
* @return array all core methods.
@@ -234,22 +303,50 @@ class RemoteAPI {
return $this->coreMethods->__getRemoteInfo();
}
+ /**
+ * Transform file to xml
+ *
+ * @param mixed $data
+ * @return mixed
+ */
public function toFile($data) {
return call_user_func($this->fileTransformation, $data);
}
+ /**
+ * Transform date to xml
+ *
+ * @param mixed $data
+ * @return mixed
+ */
public function toDate($data) {
return call_user_func($this->dateTransformation, $data);
}
+ /**
+ * A simple transformation
+ *
+ * @param mixed $data
+ * @return mixed
+ */
public function dummyTransformation($data) {
return $data;
}
+ /**
+ * Set the transformer function
+ *
+ * @param callback $dateTransformation
+ */
public function setDateTransformation($dateTransformation) {
$this->dateTransformation = $dateTransformation;
}
+ /**
+ * Set the transformer function
+ *
+ * @param callback $fileTransformation
+ */
public function setFileTransformation($fileTransformation) {
$this->fileTransformation = $fileTransformation;
}
diff --git a/inc/search.php b/inc/search.php
index 5489dc2c0..935969d3f 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -134,6 +134,11 @@ function search_namespaces(&$data,$base,$file,$type,$lvl,$opts){
/**
* List all mediafiles in a namespace
+ * $opts['depth'] recursion level, 0 for all
+ * $opts['showmsg'] shows message if invalid media id is used
+ * $opts['skipacl'] skip acl checking
+ * $opts['pattern'] check given pattern
+ * $opts['hash'] add hashes to result list
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -258,6 +263,7 @@ function search_allpages(&$data,$base,$file,$type,$lvl,$opts){
//only search txt files
if(substr($file,-4) != '.txt') return true;
+ $item = array();
$item['id'] = pathID($file);
if(!$opts['skipacl'] && auth_quickaclcheck($item['id']) < AUTH_READ){
return false;
diff --git a/inc/subscription.php b/inc/subscription.php
index aab6de926..58376f2ec 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -444,17 +444,17 @@ class Subscription {
* Send the diff for some media change
*
* @fixme this should embed thumbnails of images in HTML version
+ *
* @param string $subscriber_mail The target mail address
* @param string $template Mail template ('uploadmail', ...)
* @param string $id Media file for which the notification is
* @param int|bool $rev Old revision if any
- * @return bool true if successfully sent
*/
public function send_media_diff($subscriber_mail, $template, $id, $rev = false) {
global $conf;
$file = mediaFN($id);
- list($mime, $ext) = mimetype($id);
+ list($mime, /* $ext */) = mimetype($id);
$trep = array(
'MIME' => $mime,
@@ -515,7 +515,7 @@ class Subscription {
* @author Adrian Lang <lang@cosmocode.de>
*
* @param string $subscriber_mail The target mail address
- * @param array $id The ID
+ * @param string $id The ID
* @param int $lastupdate Time of the last notification
* @return bool
*/
@@ -619,6 +619,7 @@ class Subscription {
/**
* Get a valid message id for a certain $id and revision (or the current revision)
+ *
* @param string $id The id of the page (or media file) the message id should be for
* @param string $rev The revision of the page, set to the current revision of the page $id if not set
* @return string
diff --git a/inc/template.php b/inc/template.php
index 7f3c68534..3bccb0bd8 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -68,6 +68,7 @@ function tpl_basedir($tpl='') {
* handled by this function. ACL stuff is not done here either.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @triggers TPL_ACT_RENDER
* @triggers TPL_CONTENT_DISPLAY
* @param bool $prependTOC should the TOC be displayed here?
@@ -170,8 +171,9 @@ function tpl_content_core() {
break;
default:
$evt = new Doku_Event('TPL_ACT_UNKNOWN', $ACT);
- if($evt->advise_before())
+ if($evt->advise_before()) {
msg("Failed to handle command: ".hsc($ACT), -1);
+ }
$evt->advise_after();
unset($evt);
return false;
@@ -186,6 +188,7 @@ function tpl_content_core() {
* a false argument
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param bool $return Should the TOC be returned instead to be printed?
* @return string
*/
@@ -204,7 +207,7 @@ function tpl_toc($return = false) {
$toc = $TOC;
} elseif(($ACT == 'show' || substr($ACT, 0, 6) == 'export') && !$REV && $INFO['exists']) {
// get TOC from metadata, render if neccessary
- $meta = p_get_metadata($ID, false, METADATA_RENDER_USING_CACHE);
+ $meta = p_get_metadata($ID, '', METADATA_RENDER_USING_CACHE);
if(isset($meta['internal']['toc'])) {
$tocok = $meta['internal']['toc'];
} else {
@@ -243,6 +246,8 @@ function tpl_toc($return = false) {
* Handle the admin page contents
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return bool
*/
function tpl_admin() {
global $INFO;
@@ -277,6 +282,7 @@ function tpl_admin() {
* This has to go into the head section of your template.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @triggers TPL_METAHEADER_OUTPUT
* @param bool $alt Should feeds and alternative format links be added?
* @return bool
@@ -426,10 +432,12 @@ function tpl_metaheaders($alt = true) {
* instances. Attributes are given as key value pairs. Values will be HTML
* encoded automatically so they should be provided as is in the $data array.
*
- * For tags having a body attribute specify the the body data in the special
+ * For tags having a body attribute specify the body data in the special
* attribute '_data'. This field will NOT BE ESCAPED automatically.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $data
*/
function _tpl_metaheaders_action($data) {
foreach($data as $tag => $inst) {
@@ -456,6 +464,12 @@ function _tpl_metaheaders_action($data) {
* Just builds a link.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $url
+ * @param string $name
+ * @param string $more
+ * @param bool $return if true return the link html, otherwise print
+ * @return bool|string html of the link, or true if printed
*/
function tpl_link($url, $name, $more = '', $return = false) {
$out = '<a href="'.$url.'" ';
@@ -472,6 +486,10 @@ function tpl_link($url, $name, $more = '', $return = false) {
* Wrapper around html_wikilink
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @param string|null $name the name of the link
+ * @return bool true
*/
function tpl_pagelink($id, $name = null) {
print '<bdi>'.html_wikilink($id, $name).'</bdi>';
@@ -485,6 +503,9 @@ function tpl_pagelink($id, $name = null) {
* returns false if none is available
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $id page id
+ * @return false|string
*/
function tpl_getparent($id) {
$parent = getNS($id).':';
@@ -503,6 +524,10 @@ function tpl_getparent($id) {
*
* @author Adrian Lang <mail@adrianlang.de>
* @see tpl_get_action
+ *
+ * @param string $type
+ * @param bool $return
+ * @return bool|string html, or false if no data, true if printed
*/
function tpl_button($type, $return = false) {
$data = tpl_get_action($type);
@@ -534,6 +559,13 @@ function tpl_button($type, $return = false) {
*
* @author Adrian Lang <mail@adrianlang.de>
* @see tpl_get_action
+ *
+ * @param string $type action command
+ * @param string $pre prefix of link
+ * @param string $suf suffix of link
+ * @param string $inner innerHML of link
+ * @param bool $return if true it returns html, otherwise prints
+ * @return bool|string html or false if no data, true if printed
*/
function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = false) {
global $lang;
@@ -571,7 +603,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals
$linktarget, $pre.(($inner) ? $inner : $caption).$suf,
'class="action '.$type.'" '.
$akey.$rel.
- 'title="'.hsc($caption).$addTitle.'"', 1
+ 'title="'.hsc($caption).$addTitle.'"', true
);
}
if($return) return $out;
@@ -599,6 +631,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals
* @author Andreas Gohr <andi@splitbrain.org>
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
* @author Adrian Lang <mail@adrianlang.de>
+ *
* @param string $type
* @return array|bool|string
*/
@@ -747,7 +780,6 @@ function tpl_get_action($type) {
break;
default:
return '[unknown %s type]';
- break;
}
return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement');
}
@@ -756,21 +788,22 @@ function tpl_get_action($type) {
* Wrapper around tpl_button() and tpl_actionlink()
*
* @author Anika Henke <anika@selfthinker.org>
- * @param
- * @param bool $link link or form button?
- * @param bool $wrapper HTML element wrapper
- * @param bool $return return or print
- * @param string $pre prefix for links
- * @param string $suf suffix for links
- * @param string $inner inner HTML for links
+ *
+ * @param string $type action command
+ * @param bool $link link or form button?
+ * @param string|bool $wrapper HTML element wrapper
+ * @param bool $return return or print
+ * @param string $pre prefix for links
+ * @param string $suf suffix for links
+ * @param string $inner inner HTML for links
* @return bool|string
*/
function tpl_action($type, $link = false, $wrapper = false, $return = false, $pre = '', $suf = '', $inner = '') {
$out = '';
if($link) {
- $out .= tpl_actionlink($type, $pre, $suf, $inner, 1);
+ $out .= tpl_actionlink($type, $pre, $suf, $inner, true);
} else {
- $out .= tpl_button($type, 1);
+ $out .= tpl_button($type, true);
}
if($out && $wrapper) $out = "<$wrapper>$out</$wrapper>";
@@ -790,6 +823,7 @@ function tpl_action($type, $link = false, $wrapper = false, $return = false, $pr
* autocompletion feature (MSIE and Firefox)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param bool $ajax
* @param bool $autocomplete
* @return bool
@@ -818,6 +852,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) {
* Print the breadcrumbs trace
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $sep Separator between entries
* @return bool
*/
@@ -859,6 +894,7 @@ function tpl_breadcrumbs($sep = '•') {
* @author Sean Coates <sean@caedmon.net>
* @author <fredrik@averpil.com>
* @todo May behave strangely in RTL languages
+ *
* @param string $sep Separator between entries
* @return bool
*/
@@ -909,6 +945,7 @@ function tpl_youarehere($sep = ' » ') {
* Could be enhanced with a profile link in future?
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @return bool
*/
function tpl_userinfo() {
@@ -927,6 +964,7 @@ function tpl_userinfo() {
* Print some info about the current page
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param bool $ret return content instead of printing it
* @return bool|string
*/
@@ -990,6 +1028,7 @@ function tpl_pageinfo($ret = false) {
* the given ID is used.
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $id page id
* @param bool $ret return content instead of printing
* @return bool|string
@@ -1027,9 +1066,10 @@ function tpl_pagetitle($id = null, $ret = false) {
* Only allowed in: detail.php
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param array $tags tags to try
- * @param string $alt alternative output if no data was found
- * @param null $src the image src, uses global $SRC if not given
+ *
+ * @param array|string $tags tag or array of tags to try
+ * @param string $alt alternative output if no data was found
+ * @param null|string $src the image src, uses global $SRC if not given
* @return string
*/
function tpl_img_getTag($tags, $alt = '', $src = null) {
@@ -1117,12 +1157,13 @@ function tpl_get_img_meta() {
* @param $maxheight int - maximal height of the image
* @param $link bool - link to the orginal size?
* @param $params array - additional image attributes
- * @return mixed Result of TPL_IMG_DISPLAY
+ * @return bool Result of TPL_IMG_DISPLAY
*/
function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) {
global $IMG;
/** @var Input $INPUT */
global $INPUT;
+ global $REV;
$w = tpl_img_getTag('File.Width');
$h = tpl_img_getTag('File.Height');
@@ -1147,8 +1188,8 @@ function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) {
}
//prepare URLs
- $url = ml($IMG, array('cache'=> $INPUT->str('cache')), true, '&');
- $src = ml($IMG, array('cache'=> $INPUT->str('cache'), 'w'=> $w, 'h'=> $h), true, '&');
+ $url = ml($IMG, array('cache'=> $INPUT->str('cache'),'rev'=>$REV), true, '&');
+ $src = ml($IMG, array('cache'=> $INPUT->str('cache'),'rev'=>$REV, 'w'=> $w, 'h'=> $h), true, '&');
//prepare attributes
$alt = tpl_img_getTag('Simple.Title');
@@ -1269,21 +1310,37 @@ function tpl_loadConfig() {
* tpl_getLang($id)
*
* use this function to access template language variables
+ *
+ * @param string $id key of language string
+ * @return string
*/
function tpl_getLang($id) {
static $lang = array();
if(count($lang) === 0) {
- $path = tpl_incdir().'lang/';
+ global $conf, $config_cascade; // definitely don't invoke "global $lang"
+
+ $path = tpl_incdir() . 'lang/';
$lang = array();
- global $conf; // definitely don't invoke "global $lang"
// don't include once
- @include($path.'en/lang.php');
- if($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');
- }
+ @include($path . 'en/lang.php');
+ foreach($config_cascade['lang']['template'] as $config_file) {
+ if(@file_exists($config_file . $conf['template'] . '/en/lang.php')) {
+ include($config_file . $conf['template'] . '/en/lang.php');
+ }
+ }
+ if($conf['lang'] != 'en') {
+ @include($path . $conf['lang'] . '/lang.php');
+ foreach($config_cascade['lang']['template'] as $config_file) {
+ if(@file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) {
+ include($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php');
+ }
+ }
+ }
+ }
return $lang[$id];
}
@@ -1300,11 +1357,14 @@ function tpl_locale_xhtml($id) {
/**
* Prepends appropriate path for a language dependent filename
+ *
+ * @param string $id id of localized text
+ * @return string wiki text
*/
function tpl_localeFN($id) {
$path = tpl_incdir().'lang/';
global $conf;
- $file = DOKU_CONF.'/template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt';
+ $file = DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt';
if (!@file_exists($file)){
$file = $path.$conf['lang'].'/'.$id.'.txt';
if(!@file_exists($file)){
@@ -1326,6 +1386,8 @@ function tpl_localeFN($id) {
*
* @triggers MEDIAMANAGER_CONTENT_OUTPUT
* @param bool $fromajax - set true when calling this function via ajax
+ * @param string $sort
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tpl_mediaContent($fromajax = false, $sort='natural') {
@@ -1500,6 +1562,9 @@ function tpl_mediaTree() {
* Note: this will not use any pretty URLs
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $empty empty option label
+ * @param string $button submit button label
*/
function tpl_actiondropdown($empty = '', $button = '&gt;') {
global $ID;
@@ -1613,6 +1678,11 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap =
*
* This function is useful to populate sidebars or similar features in a
* template
+ *
+ * @param string $pageid
+ * @param bool $print
+ * @param bool $propagate
+ * @return bool|null|string
*/
function tpl_include_page($pageid, $print = true, $propagate = false) {
if (!$pageid) return false;
@@ -1721,10 +1791,11 @@ function tpl_flush() {
* If a given location starts with a colon it is assumed to be a media
* file, otherwise it is assumed to be relative to the current template
*
- * @param array $search locations to look at
- * @param bool $abs if to use absolute URL
- * @param array &$imginfo filled with getimagesize()
+ * @param string[] $search locations to look at
+ * @param bool $abs if to use absolute URL
+ * @param array &$imginfo filled with getimagesize()
* @return string
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tpl_getMediaFile($search, $abs = false, &$imginfo = null) {
@@ -1775,6 +1846,8 @@ function tpl_getMediaFile($search, $abs = false, &$imginfo = null) {
*
* @author Anika Henke <anika@selfthinker.org>
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file
*/
function tpl_includeFile($file) {
global $config_cascade;
@@ -1800,6 +1873,7 @@ function tpl_includeFile($file) {
* Returns <link> tag for various icon types (favicon|mobile|generic)
*
* @author Anika Henke <anika@selfthinker.org>
+ *
* @param array $types - list of icon types to display (favicon|mobile|generic)
* @return string
*/
@@ -1875,6 +1949,8 @@ function tpl_media() {
* Return useful layout classes
*
* @author Anika Henke <anika@selfthinker.org>
+ *
+ * @return string
*/
function tpl_classes() {
global $ACT, $conf, $ID, $INFO;
diff --git a/inc/utf8.php b/inc/utf8.php
index c944667f7..f86217686 100644
--- a/inc/utf8.php
+++ b/inc/utf8.php
@@ -43,6 +43,9 @@ if(!function_exists('utf8_isASCII')){
* Checks if a string contains 7bit ASCII only
*
* @author Andreas Haerter <andreas.haerter@dev.mail-node.com>
+ *
+ * @param string $str
+ * @return bool
*/
function utf8_isASCII($str){
return (preg_match('/(?:[^\x00-\x7F])/', $str) !== 1);
@@ -56,6 +59,9 @@ if(!function_exists('utf8_strip')){
* Returns a pure ASCII7 string
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $str
+ * @return string
*/
function utf8_strip($str){
$ascii = '';
@@ -75,6 +81,9 @@ if(!function_exists('utf8_check')){
*
* @author <bmorel@ssi.fr>
* @link http://www.php.net/manual/en/function.utf8-encode.php
+ *
+ * @param string $Str
+ * @return bool
*/
function utf8_check($Str) {
$len = strlen($Str);
@@ -105,6 +114,7 @@ if(!function_exists('utf8_basename')){
*
* @see basename()
* @link https://bugs.php.net/bug.php?id=37738
+ *
* @param string $path A path
* @param string $suffix If the name component ends in suffix this will also be cut off
* @return string
@@ -134,6 +144,9 @@ if(!function_exists('utf8_strlen')){
* @author <chernyshevsky at hotmail dot com>
* @see strlen()
* @see utf8_decode()
+ *
+ * @param string $string
+ * @return int
*/
function utf8_strlen($string){
return strlen(utf8_decode($string));
@@ -148,10 +161,11 @@ if(!function_exists('utf8_substr')){
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @author Chris Smith <chris@jalakai.co.uk>
+ *
* @param string $str
* @param int $offset number of UTF-8 characters offset (from left)
* @param int $length (optional) length in UTF-8 characters from offset
- * @return mixed string or false if failure
+ * @return string
*/
function utf8_substr($str, $offset, $length = null) {
if(UTF8_MBSTRING){
@@ -250,6 +264,14 @@ if(!function_exists('utf8_substr_replace')){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see substr_replace()
+ *
+ * @param string $string input string
+ * @param string $replacement the replacement
+ * @param int $start the replacing will begin at the start'th offset into string.
+ * @param int $length If given and is positive, it represents the length of the portion of string which is
+ * to be replaced. If length is zero then this function will have the effect of inserting
+ * replacement into string at the given start offset.
+ * @return string
*/
function utf8_substr_replace($string, $replacement, $start , $length=0 ){
$ret = '';
@@ -266,6 +288,7 @@ if(!function_exists('utf8_ltrim')){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see ltrim()
+ *
* @param string $str
* @param string $charlist
* @return string
@@ -286,6 +309,7 @@ if(!function_exists('utf8_rtrim')){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see rtrim()
+ *
* @param string $str
* @param string $charlist
* @return string
@@ -306,6 +330,7 @@ if(!function_exists('utf8_trim')){
*
* @author Andreas Gohr <andi@splitbrain.org>
* @see trim()
+ *
* @param string $str
* @param string $charlist
* @return string
@@ -326,6 +351,9 @@ if(!function_exists('utf8_strtolower')){
* @author Leo Feyer <leo@typolight.org>
* @see strtolower()
* @see utf8_strtoupper()
+ *
+ * @param string $string
+ * @return string
*/
function utf8_strtolower($string){
if(UTF8_MBSTRING) return mb_strtolower($string,'utf-8');
@@ -344,6 +372,9 @@ if(!function_exists('utf8_strtoupper')){
* @author Leo Feyer <leo@typolight.org>
* @see strtoupper()
* @see utf8_strtoupper()
+ *
+ * @param string $string
+ * @return string
*/
function utf8_strtoupper($string){
if(UTF8_MBSTRING) return mb_strtoupper($string,'utf-8');
@@ -359,7 +390,8 @@ if(!function_exists('utf8_ucfirst')){
* Make a string's first character uppercase
*
* @author Harry Fuecks
- * @param string
+ *
+ * @param string $str
* @return string with first character as upper case (if applicable)
*/
function utf8_ucfirst($str){
@@ -381,9 +413,10 @@ if(!function_exists('utf8_ucwords')){
* Uppercase the first character of each word in a string
*
* @author Harry Fuecks
- * @param string
- * @return string with first char of each word uppercase
* @see http://www.php.net/ucwords
+ *
+ * @param string $str
+ * @return string with first char of each word uppercase
*/
function utf8_ucwords($str) {
// Note: [\x0c\x09\x0b\x0a\x0d\x20] matches;
@@ -399,10 +432,11 @@ if(!function_exists('utf8_ucwords')){
* You don't need to call this yourself
*
* @author Harry Fuecks
- * @param array $matches matches corresponding to a single word
- * @return string with first char of the word in uppercase
* @see utf8_ucwords
* @see utf8_strtoupper
+ *
+ * @param array $matches matches corresponding to a single word
+ * @return string with first char of the word in uppercase
*/
function utf8_ucwords_callback($matches) {
$leadingws = $matches[2];
@@ -420,6 +454,10 @@ if(!function_exists('utf8_deaccent')){
* letters. Default is to deaccent both cases ($case = 0)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string
+ * @param int $case
+ * @return string
*/
function utf8_deaccent($string,$case=0){
if($case <= 0){
@@ -439,6 +477,9 @@ if(!function_exists('utf8_romanize')){
* Romanize a non-latin string
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string
+ * @return string
*/
function utf8_romanize($string){
if(utf8_isASCII($string)) return $string; //nothing to do
@@ -456,6 +497,7 @@ if(!function_exists('utf8_stripspecials')){
* stripped chars (they are not included in $UTF8_SPECIAL_CHARS)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $string The UTF8 string to strip of special chars
* @param string $repl Replace special with this string
* @param string $additional Additional chars to strip (used in regexp char class)
@@ -480,9 +522,10 @@ if(!function_exists('utf8_strpos')){
*
* @author Leo Feyer <leo@typolight.org>
* @see strpos()
- * @param string
- * @param string
- * @param integer
+ *
+ * @param string $haystack
+ * @param string $needle
+ * @param integer $offset
* @return integer
*/
function utf8_strpos($haystack, $needle, $offset=0){
@@ -512,6 +555,9 @@ if(!function_exists('utf8_tohtml')){
* @author Tom N Harris <tnharris@whoopdedo.org>
* @author <vpribish at shopping dot com>
* @link http://www.php.net/manual/en/function.utf8-decode.php
+ *
+ * @param string $str
+ * @return string
*/
function utf8_tohtml ($str) {
$ret = '';
@@ -542,6 +588,7 @@ if(!function_exists('utf8_unhtml')){
* what it should be -> "&#38;&amp#38;"
*
* @author Tom N Harris <tnharris@whoopdedo.org>
+ *
* @param string $str UTF-8 encoded string
* @param boolean $entities Flag controlling decoding of named entities.
* @return string UTF-8 encoded string with numeric (and named) entities replaced.
@@ -564,7 +611,7 @@ if(!function_exists('utf8_decode_numeric')){
* Decodes numeric HTML entities to their correct UTF-8 characters
*
* @param $ent string A numeric entity
- * @return string
+ * @return string|false
*/
function utf8_decode_numeric($ent) {
switch ($ent[2]) {
@@ -597,10 +644,10 @@ if(!class_exists('utf8_entity_decoder')){
}
/**
- * Wrapper aorund unicode_to_utf8()
+ * Wrapper around unicode_to_utf8()
*
- * @param $c string
- * @return mixed
+ * @param string $c
+ * @return string|false
*/
function makeutf8($c) {
return unicode_to_utf8(array(ord($c)));
@@ -609,8 +656,8 @@ if(!class_exists('utf8_entity_decoder')){
/**
* Decodes any HTML entity to it's correct UTF-8 char equivalent
*
- * @param $ent string An entity
- * @return string
+ * @param string $ent An entity
+ * @return string|false
*/
function decode($ent) {
if ($ent[1] == '#') {
@@ -640,12 +687,13 @@ if(!function_exists('utf8_to_unicode')){
*
* @author <hsivonen@iki.fi>
* @author Harry Fuecks <hfuecks@gmail.com>
- * @param string $str UTF-8 encoded string
- * @param boolean $strict Check for invalid sequences?
- * @return mixed array of unicode code points or false if UTF-8 invalid
* @see unicode_to_utf8
* @link http://hsivonen.iki.fi/php-utf8/
* @link http://sourceforge.net/projects/phputf8/
+ *
+ * @param string $str UTF-8 encoded string
+ * @param boolean $strict Check for invalid sequences?
+ * @return mixed array of unicode code points or false if UTF-8 invalid
*/
function utf8_to_unicode($str,$strict=false) {
$mState = 0; // cached expected number of octets after the current octet
@@ -815,7 +863,8 @@ if(!function_exists('unicode_to_utf8')){
*
* @param array $arr of unicode code points representing a string
* @param boolean $strict Check for invalid sequences?
- * @return mixed UTF-8 string or false if array contains invalid code points
+ * @return string|false UTF-8 string or false if array contains invalid code points
+ *
* @author <hsivonen@iki.fi>
* @author Harry Fuecks <hfuecks@gmail.com>
* @see utf8_to_unicode
@@ -896,6 +945,10 @@ if(!function_exists('utf8_to_utf16be')){
* UTF-8 to UTF-16BE conversion.
*
* Maybe really UCS-2 without mb_string due to utf8_to_unicode limits
+ *
+ * @param string $str
+ * @param bool $bom
+ * @return string
*/
function utf8_to_utf16be(&$str, $bom = false) {
$out = $bom ? "\xFE\xFF" : '';
@@ -914,6 +967,9 @@ if(!function_exists('utf16be_to_utf8')){
* UTF-8 to UTF-16BE conversion.
*
* Maybe really UCS-2 without mb_string due to utf8_to_unicode limits
+ *
+ * @param string $str
+ * @return false|string
*/
function utf16be_to_utf8(&$str) {
$uni = unpack('n*',$str);
@@ -933,6 +989,7 @@ if(!function_exists('utf8_bad_replace')){
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @see http://www.w3.org/International/questions/qa-forms-utf-8
+ *
* @param string $str to search
* @param string $replace to replace bad bytes with (defaults to '?') - use ASCII
* @return string
@@ -967,8 +1024,8 @@ if(!function_exists('utf8_correctIdx')){
/**
* adjust a byte index into a utf8 string to a utf8 character boundary
*
- * @param $str string utf8 character string
- * @param $i int byte index into $str
+ * @param string $str utf8 character string
+ * @param int $i byte index into $str
* @param $next bool direction to search for boundary,
* false = up (current character)
* true = down (next character)
diff --git a/install.php b/install.php
index 767dd332f..d031cb3d9 100644
--- a/install.php
+++ b/install.php
@@ -58,7 +58,6 @@ $dokuwiki_hash = array(
'2013-05-10' => '7b62b75245f57f122d3e0f8ed7989623',
'2013-12-08' => '263c76af309fbf083867c18a34ff5214',
'2014-05-05' => '263c76af309fbf083867c18a34ff5214',
- 'devel' => 'b3ddc3f793eac8c135176e535054c00a',
);
@@ -160,6 +159,8 @@ header('Content-Type: text/html; charset=utf-8');
/**
* Print the input form
+ *
+ * @param array $d submitted entry 'd' of request data
*/
function print_form($d){
global $lang;
@@ -265,6 +266,9 @@ function print_retry() {
* Check validity of data
*
* @author Andreas Gohr
+ *
+ * @param array $d
+ * @return bool ok?
*/
function check_data(&$d){
static $form_default = array(
@@ -334,6 +338,9 @@ function check_data(&$d){
* Writes the data to the config files
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param array $d
+ * @return bool
*/
function store_data($d){
global $LC;
@@ -438,6 +445,10 @@ EOT;
* Write the given content to a file
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param string $filename
+ * @param string $data
+ * @return bool
*/
function fileWrite($filename, $data) {
global $error;
@@ -460,6 +471,8 @@ function fileWrite($filename, $data) {
* unmodified main config file
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @return bool
*/
function check_configs(){
global $error;
@@ -498,6 +511,8 @@ function check_configs(){
* Check other installation dir/file permission requirements
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @return bool
*/
function check_permissions(){
global $error;
@@ -533,14 +548,16 @@ function check_permissions(){
* Check the availability of functions used in DokuWiki and the PHP version
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return bool
*/
function check_functions(){
global $error;
global $lang;
$ok = true;
- if(version_compare(phpversion(),'5.2.0','<')){
- $error[] = sprintf($lang['i_phpver'],phpversion(),'5.2.0');
+ if(version_compare(phpversion(),'5.3.3','<')){
+ $error[] = sprintf($lang['i_phpver'],phpversion(),'5.3.3');
$ok = false;
}
@@ -626,6 +643,8 @@ function print_errors(){
* remove magic quotes recursivly
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $array
*/
function remove_magic_quotes(&$array) {
foreach (array_keys($array) as $key) {
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 902996062..9f828feaa 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -53,7 +53,7 @@ function css_out(){
// if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility
if (isset($config_cascade['userstyle']['default'])) {
- $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default'];
+ $config_cascade['userstyle']['screen'] = array($config_cascade['userstyle']['default']);
}
// cache influencers
@@ -83,8 +83,10 @@ function css_out(){
$files[$mediatype] = array_merge($files[$mediatype], $styleini['stylesheets'][$mediatype]);
}
// load user styles
- if(isset($config_cascade['userstyle'][$mediatype])){
- $files[$mediatype][$config_cascade['userstyle'][$mediatype]] = DOKU_BASE;
+ if(!empty($config_cascade['userstyle'][$mediatype])) {
+ foreach($config_cascade['userstyle'][$mediatype] as $userstyle) {
+ $files[$mediatype][$userstyle] = DOKU_BASE;
+ }
}
$cache_files = array_merge($cache_files, array_keys($files[$mediatype]));
@@ -163,12 +165,15 @@ function css_out(){
* most of this function is error handling to show a nice useful error when
* LESS compilation fails
*
- * @param $css
+ * @param string $css
* @return string
*/
function css_parseless($css) {
+ global $conf;
+
$less = new lessc();
$less->importDir[] = DOKU_INC;
+ $less->setPreserveComments(!$conf['compress']);
if (defined('DOKU_UNITTEST')){
$less->importDir[] = TMP_DIR;
@@ -223,6 +228,10 @@ function css_parseless($css) {
* (sans the surrounding __ and with a ini_ prefix)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $css
+ * @param array $replacements array(placeholder => value)
+ * @return string
*/
function css_applystyle($css, $replacements) {
// we convert ini replacements to LESS variable names
@@ -251,6 +260,7 @@ function css_applystyle($css, $replacements) {
* the stylesheet modes
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
* @param string $tpl the used template
* @return array with keys 'stylesheets' and 'replacements'
*/
@@ -321,6 +331,10 @@ function css_styleini($tpl) {
* Amend paths used in replacement relative urls, refer FS#2879
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
+ * @param array $replacements with key-value pairs
+ * @param string $location
+ * @return array
*/
function css_fixreplacementurls($replacements, $location) {
foreach($replacements as $key => $value) {
@@ -404,6 +418,10 @@ function css_filetypes(){
/**
* Loads a given file and fixes relative URLs with the
* given location prefix
+ *
+ * @param string $file file system path
+ * @param string $location
+ * @return string
*/
function css_loadfile($file,$location=''){
$css_file = new DokuCssFile($file);
@@ -419,7 +437,7 @@ class DokuCssFile {
protected $filepath; // file system path to the CSS/Less file
protected $location; // base url location of the CSS/Less file
- private $relative_path = null;
+ protected $relative_path = null;
public function __construct($file) {
$this->filepath = $file;
@@ -452,7 +470,7 @@ class DokuCssFile {
*
* @return string relative file system path
*/
- private function getRelativePath(){
+ protected function getRelativePath(){
if (is_null($this->relative_path)) {
$basedir = array(DOKU_INC);
@@ -502,6 +520,9 @@ class DokuCssFile {
* Convert local image URLs to data URLs if the filesize is small
*
* Callback for preg_replace_callback
+ *
+ * @param array $match
+ * @return string
*/
function css_datauri($match){
global $conf;
@@ -529,9 +550,11 @@ function css_datauri($match){
* Returns a list of possible Plugin Styles (no existance check here)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $mediatype
+ * @return array
*/
function css_pluginstyles($mediatype='screen'){
- global $lang;
$list = array();
$plugins = plugin_list();
foreach ($plugins as $p){
@@ -550,6 +573,9 @@ function css_pluginstyles($mediatype='screen'){
* Very simple CSS optimizer
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $css
+ * @return string
*/
function css_compress($css){
//strip comments through a callback
@@ -586,6 +612,9 @@ function css_compress($css){
* Keeps short comments (< 5 chars) to maintain typical browser hacks
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param array $matches
+ * @return string
*/
function css_comment_cb($matches){
if(strlen($matches[2]) > 4) return '';
@@ -597,7 +626,7 @@ function css_comment_cb($matches){
*
* Strips one line comments but makes sure it will not destroy url() constructs with slashes
*
- * @param $matches
+ * @param array $matches
* @return string
*/
function css_onelinecomment_cb($matches) {
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index cd3f362ad..cc29d5b87 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -5,6 +5,7 @@ require_once(DOKU_INC.'inc/init.php');
$IMG = getID('media');
$ID = cleanID($INPUT->str('id'));
+$REV = $INPUT->int('rev');
// this makes some general info available as well as the info about the
// "parent" page
@@ -35,7 +36,7 @@ $ERROR = false;
$AUTH = auth_quickaclcheck($IMG);
if($AUTH >= AUTH_READ){
// check if image exists
- $SRC = mediaFN($IMG);
+ $SRC = mediaFN($IMG,$REV);
if(!@file_exists($SRC)){
//doesn't exist!
http_status(404);
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 3ab117736..89c4b7cd0 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -51,8 +51,9 @@ exit;
/**
* Trims the recent changes cache (or imports the old changelog) as needed.
*
- * @param media_changes If the media changelog shall be trimmed instead of
- * the page changelog
+ * @param bool $media_changes If the media changelog shall be trimmed instead of
+ * the page changelog
+ * @return bool
*
* @author Ben Coburn <btcoburn@silicodon.net>
*/
@@ -83,7 +84,7 @@ function runTrimRecentChanges($media_changes = false) {
io_saveFile($fn.'_tmp', ''); // presave tmp as 2nd lock
$trim_time = time() - $conf['recent_days']*86400;
$out_lines = array();
-
+ $old_lines = array();
for ($i=0; $i<count($lines); $i++) {
$log = parseChangelogLine($lines[$i]);
if ($log === false) continue; // discard junk
diff --git a/lib/exe/js.php b/lib/exe/js.php
index bec12ef7a..793104e81 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -72,8 +72,10 @@ function js_out(){
// add possible plugin scripts and userscript
$files = array_merge($files,js_pluginscripts());
- if(isset($config_cascade['userscript']['default'])){
- $files[] = $config_cascade['userscript']['default'];
+ if(!empty($config_cascade['userscript']['default'])) {
+ foreach($config_cascade['userscript']['default'] as $userscript) {
+ $files[] = $userscript;
+ }
}
$cache_files = array_merge($files, getConfigFiles('main'));
@@ -154,6 +156,8 @@ function js_out(){
* Load the given file, handle include calls and print it
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $file filename path to file
*/
function js_load($file){
if(!@file_exists($file)) return;
@@ -189,6 +193,8 @@ function js_load($file){
* Returns a list of possible Plugin Scripts (no existance check here)
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @return array
*/
function js_pluginscripts(){
$list = array();
@@ -206,6 +212,8 @@ function js_pluginscripts(){
* - Nothing is returned for plugins without an entry for $lang['js']
*
* @author Gabriel Birke <birke@d-scribe.de>
+ *
+ * @return array
*/
function js_pluginstrings() {
global $conf;
@@ -231,6 +239,8 @@ function js_pluginstrings() {
*
* - $lang['js'] must be an array.
* - Nothing is returned for template without an entry for $lang['js']
+ *
+ * @return array
*/
function js_templatestrings() {
global $conf;
@@ -252,6 +262,9 @@ function js_templatestrings() {
* as newline
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $string
+ * @return string
*/
function js_escape($string){
return str_replace('\\\\n','\\n',addslashes($string));
@@ -261,6 +274,8 @@ function js_escape($string){
* Adds the given JavaScript code to the window.onload() event
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $func
*/
function js_runonstart($func){
echo "jQuery(function(){ $func; });".NL;
@@ -275,6 +290,9 @@ function js_runonstart($func){
* @author Nick Galbreath <nickg@modp.com>
* @author Andreas Gohr <andi@splitbrain.org>
* @link http://code.google.com/p/jsstrip/
+ *
+ * @param string $s
+ * @return string
*/
function js_compress($s){
$s = ltrim($s); // strip all initial whitespace
@@ -289,7 +307,11 @@ function js_compress($s){
// items that don't need spaces next to them
$chars = "^&|!+\-*\/%=\?:;,{}()<>% \t\n\r'\"[]";
- $regex_starters = array("(", "=", "[", "," , ":", "!");
+ // items which need a space if the sign before and after whitespace is equal.
+ // E.g. '+ ++' may not be compressed to '+++' --> syntax error.
+ $ops = "+-";
+
+ $regex_starters = array("(", "=", "[", "," , ":", "!", "&", "|");
$whitespaces_chars = array(" ", "\t", "\n", "\r", "\0", "\x0B");
@@ -389,19 +411,27 @@ function js_compress($s){
// whitespaces
if( $ch == ' ' || $ch == "\r" || $ch == "\n" || $ch == "\t" ){
- // leading spaces
- if($i+1 < $slen && (strpos($chars,$s[$i+1]) !== false)){
- $i = $i + 1;
- continue;
- }
- // trailing spaces
- // if this ch is space AND the last char processed
- // is special, then skip the space
$lch = substr($result,-1);
- if($lch && (strpos($chars,$lch) !== false)){
- $i = $i + 1;
- continue;
+
+ // Only consider deleting whitespace if the signs before and after
+ // are not equal and are not an operator which may not follow itself.
+ if ((!$lch || $s[$i+1] == ' ')
+ || $lch != $s[$i+1]
+ || strpos($ops,$s[$i+1]) === false) {
+ // leading spaces
+ if($i+1 < $slen && (strpos($chars,$s[$i+1]) !== false)){
+ $i = $i + 1;
+ continue;
+ }
+ // trailing spaces
+ // if this ch is space AND the last char processed
+ // is special, then skip the space
+ if($lch && (strpos($chars,$lch) !== false)){
+ $i = $i + 1;
+ continue;
+ }
}
+
// else after all of this convert the "whitespace" to
// a single space. It will get appended below
$ch = ' ';
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index c09daa17c..61a68281f 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -23,6 +23,11 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
$this->IXR_Server();
}
+ /**
+ * @param string $methodname
+ * @param array $args
+ * @return IXR_Error|mixed
+ */
function call($methodname, $args){
try {
$result = $this->remote->call($methodname, $args);
@@ -40,10 +45,18 @@ class dokuwiki_xmlrpc_server extends IXR_Server {
}
}
+ /**
+ * @param string|int $data iso date(yyyy[-]mm[-]dd[ hh:mm[:ss]]) or timestamp
+ * @return IXR_Date
+ */
function toDate($data) {
return new IXR_Date($data);
}
+ /**
+ * @param string $data
+ * @return IXR_Base64
+ */
function toFile($data) {
return new IXR_Base64($data);
}
diff --git a/lib/images/smileys/index.php b/lib/images/smileys/index.php
index 9a2905b33..4167eda5b 100644
--- a/lib/images/smileys/index.php
+++ b/lib/images/smileys/index.php
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
- <title>simleys</title>
+ <title>smileys</title>
<style type="text/css">
body {
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index ebb097a04..814bbfe9c 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -762,6 +762,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
*/
function _html_select(){
$inlist = false;
+ $usel = '';
+ $gsel = '';
if($this->who &&
!in_array($this->who,$this->usersgroups) &&
@@ -770,11 +772,9 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
if($this->who{0} == '@'){
$gsel = ' selected="selected"';
}else{
- $usel = ' selected="selected"';
+ $usel = ' selected="selected"';
}
}else{
- $usel = '';
- $gsel = '';
$inlist = true;
}
diff --git a/lib/plugins/acl/lang/cs/help.txt b/lib/plugins/acl/lang/cs/help.txt
index 1dbc88ad0..1b6fa1eac 100644
--- a/lib/plugins/acl/lang/cs/help.txt
+++ b/lib/plugins/acl/lang/cs/help.txt
@@ -1,11 +1,8 @@
=== Nápověda: ===
-Na této stránce můžete přidávat a odebírat oprávnění na jmenné prostory a stránky Vaší wiki.
+Na této stránce můžete přidávat a odebírat oprávnění pro jmenné prostory a stránky svojí wiki.
+* Levý panel zobrazuje všechny dostupné jmenné prostory a stránky.
+* Formulář výše umožňuje vidět a modifikovat oprávnění vybraného uživatele nebo skupiny.
+* V tabulce uvedené níže jsou zobrazeny všechna aktuální pravidla pro řízení přístupu (oprávnění). Zde můžete rychle odebírat a měnit více položek (oprávnění) najednou.
-Levý panel zobrazuje všechny dostupné jmenné prostory a stránky.
-
-Formulář výše umožňuje vidět a modifikovat oprávnění vybraného uživatele nebo skupiny.
-
-V tabulce uvedené níže jsou zobrazeny všechny aktuální pravidla pro řízení přístupu (oprávnění). Zde můžete rychle odebírat a měnit více položek (oprávnění) najednou.
-
-Pro detailnější nápovědu si přečtěte stránku [[doku>acl|oficiální dokumentaci ACL]], která Vám může pomoci plně pochopit princip, jak řízení přístupu na DokuWiki funguje.
+Pro detailnější nápovědu si přečtěte stránku [[doku>acl|oficiální dokumentace ACL]], která Vám může pomoci plně pochopit princip, na kterém řízení přístupu na DokuWiki funguje.
diff --git a/lib/plugins/acl/lang/eu/lang.php b/lib/plugins/acl/lang/eu/lang.php
index f051523d9..bb6ab964a 100644
--- a/lib/plugins/acl/lang/eu/lang.php
+++ b/lib/plugins/acl/lang/eu/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Basque language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
*/
diff --git a/lib/plugins/acl/lang/fr/help.txt b/lib/plugins/acl/lang/fr/help.txt
index 081978488..9fc2af665 100644
--- a/lib/plugins/acl/lang/fr/help.txt
+++ b/lib/plugins/acl/lang/fr/help.txt
@@ -6,6 +6,6 @@ Le panneau de gauche liste toutes les catégories et les pages disponibles.
Le formulaire ci-dessus permet d'afficher et de modifier les autorisations d'un utilisateur ou d'un groupe sélectionné.
-Dans le tableau ci-dessous, toutes les listes de contrôle d'accès (ACL) actuelles sont affichées. Vous pouvez l'utiliser pour supprimer ou modifier rapidement plusieurs contrôles d'accès.
+Le tableau ci-dessous présente toutes les listes de contrôle d'accès (ACL) actuelles. Vous pouvez l'utiliser pour supprimer ou modifier rapidement plusieurs contrôles d'accès.
La lecture de [[doku>fr:acl|la documentation officielle des contrôles d'accès]] pourra vous permettre de mieux comprendre le fonctionnement du contrôle d'accès dans DokuWiki.
diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php
index 6d5201cf6..b10c544ee 100644
--- a/lib/plugins/acl/remote.php
+++ b/lib/plugins/acl/remote.php
@@ -1,7 +1,16 @@
<?php
+/**
+ * Class remote_plugin_acl
+ */
class remote_plugin_acl extends DokuWiki_Remote_Plugin {
- function _getMethods() {
+
+ /**
+ * Returns details about the remote plugin methods
+ *
+ * @return array
+ */
+ public function _getMethods() {
return array(
'addAcl' => array(
'args' => array('string','string','int'),
@@ -17,12 +26,29 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin {
);
}
- function addAcl($scope, $user, $level){
+ /**
+ * Add a new entry to ACL config
+ *
+ * @param string $scope
+ * @param string $user
+ * @param int $level see also inc/auth.php
+ * @return bool
+ */
+ public function addAcl($scope, $user, $level){
+ /** @var admin_plugin_acl $apa */
$apa = plugin_load('admin', 'acl');
return $apa->_acl_add($scope, $user, $level);
}
- function delAcl($scope, $user){
+ /**
+ * Remove an entry from ACL config
+ *
+ * @param string $scope
+ * @param string $user
+ * @return bool
+ */
+ public function delAcl($scope, $user){
+ /** @var admin_plugin_acl $apa */
$apa = plugin_load('admin', 'acl');
return $apa->_acl_del($scope, $user);
}
diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php
index 9a1fb9fdc..39dece453 100644
--- a/lib/plugins/admin.php
+++ b/lib/plugins/admin.php
@@ -14,7 +14,14 @@ if(!defined('DOKU_INC')) die();
*/
class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {
- function getMenuText($language) {
+ /**
+ * Return the text that is displayed at the main admin menu
+ * (Default localized language string 'menu' is returned, override this function for setting another name)
+ *
+ * @param string $language language code
+ * @return string menu string
+ */
+ public function getMenuText($language) {
$menutext = $this->getLang('menu');
if (!$menutext) {
$info = $this->getInfo();
@@ -23,23 +30,48 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {
return $menutext;
}
- function getMenuSort() {
+ /**
+ * Determine position in list in admin window
+ * Lower values are sorted up
+ *
+ * @return int
+ */
+ public function getMenuSort() {
return 1000;
}
- function handle() {
+ /**
+ * Carry out required processing
+ */
+ public function handle() {
trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
}
- function html() {
+ /**
+ * Output html of the admin page
+ */
+ public function html() {
trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING);
}
- function forAdminOnly() {
+ /**
+ * Return true for access only by admins (config:superuser) or false if managers are allowed as well
+ *
+ * @return bool
+ */
+ public function forAdminOnly() {
return true;
}
- function getTOC(){
+ /**
+ * Return array with ToC items. Items can be created with the html_mktocitem()
+ *
+ * @see html_mktocitem()
+ * @see tpl_toc()
+ *
+ * @return array
+ */
+ public function getTOC(){
return array();
}
}
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php
index b04735639..4799b3a38 100644
--- a/lib/plugins/auth.php
+++ b/lib/plugins/auth.php
@@ -116,7 +116,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
* @author Gabriel Birke <birke@d-scribe.de>
* @param string $type Modification type ('create', 'modify', 'delete')
* @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type
- * @return mixed Result from the modification function or false if an event handler has canceled the action
+ * @return bool|null|int Result from the modification function or false if an event handler has canceled the action
*/
public function triggerUserMod($type, $params) {
$validTypes = array(
@@ -124,12 +124,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
'modify' => 'modifyUser',
'delete' => 'deleteUsers'
);
- if(empty($validTypes[$type]))
+ if(empty($validTypes[$type])) {
return false;
+ }
+
+ $result = false;
$eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null);
$evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata);
if($evt->advise_before(true)) {
- $result = call_user_func_array(array($this, $validTypes[$type]), $params);
+ $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']);
$evt->data['modification_result'] = $result;
}
$evt->advise_after();
@@ -229,14 +232,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
* at least these fields:
*
* name string full name of the user
- * mail string email addres of the user
+ * mail string email address of the user
* grps array list of groups the user is in
*
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $user the user name
- * @return array containing user data or false
+ * @param bool $requireGroups whether or not the returned data must include groups
+ * @return false|array containing user data or false
*/
- public function getUserData($user) {
+ public function getUserData($user, $requireGroups=true) {
if(!$this->cando['external']) msg("no valid authorisation system in use", -1);
return false;
}
diff --git a/lib/plugins/authad/adLDAP/adLDAP.php b/lib/plugins/authad/adLDAP/adLDAP.php
index c1f92abe2..5563e4fe9 100644
--- a/lib/plugins/authad/adLDAP/adLDAP.php
+++ b/lib/plugins/authad/adLDAP/adLDAP.php
@@ -947,5 +947,3 @@ class adLDAP {
* }
*/
class adLDAPException extends Exception {}
-
-?> \ No newline at end of file
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index 0860e5756..88b56046c 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -177,9 +177,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
*
* @author James Van Lommel <james@nosq.com>
* @param string $user
+ * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin
* @return array
*/
- public function getUserData($user) {
+ public function getUserData($user, $requireGroups=true) {
global $conf;
global $lang;
global $ID;
@@ -202,6 +203,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
//general user info
+ $info = array();
$info['name'] = $result[0]['displayname'][0];
$info['mail'] = $result[0]['mail'][0];
$info['uid'] = $result[0]['samaccountname'][0];
@@ -327,6 +329,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* Bulk retrieval of user data
*
* @author Dominik Eckelmann <dokuwiki@cosmocode.de>
+ *
* @param int $start index of first user to be returned
* @param int $limit max number of users to be returned
* @param array $filter array of field/pattern pairs, null for no filter
@@ -445,7 +448,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
/**
* Get the domain part from a user
*
- * @param $user
+ * @param string $user
* @return string
*/
public function _userDomain($user) {
@@ -456,7 +459,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
/**
* Get the user part from a user
*
- * @param $user
+ * @param string $user
* @return string
*/
public function _userName($user) {
@@ -542,6 +545,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* The patterns are set up with $this->_constructPattern()
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
* @param string $user
* @param array $info
* @return bool
@@ -563,6 +567,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* Create a pattern for $this->_filter()
*
* @author Chris Smith <chris@jalakai.co.uk>
+ *
* @param array $filter
*/
protected function _constructPattern($filter) {
diff --git a/lib/plugins/authad/lang/ar/lang.php b/lib/plugins/authad/lang/ar/lang.php
new file mode 100644
index 000000000..e0ba7681a
--- /dev/null
+++ b/lib/plugins/authad/lang/ar/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohamed Belhsine <b.mohamed897@gmail.com>
+ */
+$lang['domain'] = 'مجال تسجيل الدخول';
diff --git a/lib/plugins/authad/lang/cs/lang.php b/lib/plugins/authad/lang/cs/lang.php
new file mode 100644
index 000000000..8119d208a
--- /dev/null
+++ b/lib/plugins/authad/lang/cs/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['domain'] = 'Přihlašovací doména';
diff --git a/lib/plugins/authad/lang/fa/settings.php b/lib/plugins/authad/lang/fa/settings.php
new file mode 100644
index 000000000..161479afb
--- /dev/null
+++ b/lib/plugins/authad/lang/fa/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Omid Hezaveh <hezpublic@gmail.com>
+ */
+$lang['admin_password'] = 'رمز کاربر بالایی ';
+$lang['use_ssl'] = 'از اس‌اس‌ال استفاده می‌کنید؟ در این صورت تی‌ال‌اس را در پایین فعال نکنید. ';
+$lang['use_tls'] = 'از تی‌ال‌اس استفاده می‌کنید؟ در این صورت اس‌اس‌ال را در بالا فعال نکنید. ';
diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php
new file mode 100644
index 000000000..a1c9c7e8a
--- /dev/null
+++ b/lib/plugins/authad/lang/no/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Patrick <spill.p@hotmail.com>
+ */
+$lang['domain'] = 'Loggpå-domene';
diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php
index bab5ce67d..f309ead50 100644
--- a/lib/plugins/authad/lang/no/settings.php
+++ b/lib/plugins/authad/lang/no/settings.php
@@ -4,6 +4,8 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Christopher Schive <chschive@frisurf.no>
+ * @author Patrick <spill.p@hotmail.com>
*/
+$lang['account_suffix'] = 'Ditt konto-suffiks F. Eks. <code>@my.domain.org</code>';
$lang['admin_password'] = 'Passordet til brukeren over.';
$lang['expirywarn'] = 'Antall dager på forhånd brukeren varsles om at passordet utgår. 0 for å deaktivere.';
diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php
index c9c6d9f88..99c916b44 100644
--- a/lib/plugins/authad/lang/ru/settings.php
+++ b/lib/plugins/authad/lang/ru/settings.php
@@ -8,11 +8,20 @@
* @author Artur <ncuxxx@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
* @author Владимир <id37736@yandex.ru>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author Type-kun <workwork-1@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
-$lang['account_suffix'] = 'Суффикс вашего аккаунта типа <code>@my.domain.org</code>';
+$lang['account_suffix'] = 'Суффикс вашего аккаунта. Например, <code>@my.domain.org</code>';
+$lang['base_dn'] = 'Ваш базовый DN. Например: <code>DC=my,DC=domain,DC=org</code>';
$lang['domain_controllers'] = 'Список DNS-серверов, разделенных запятой. Например:<code>srv1.domain.org,srv2.domain.org</code>';
+$lang['admin_username'] = 'Привилегированный пользователь Active Directory с доступом ко всем остальным пользовательским данным. Необязательно, однако необходимо для определённых действий вроде отправки почтовой подписки.';
$lang['admin_password'] = 'Пароль для указанного пользователя.';
$lang['sso'] = 'Использовать SSO (Single-Sign-On) через Kerberos или NTLM?';
+$lang['sso_charset'] = 'Кодировка, в которой веб-сервер передаёт имя пользователя Kerberos или NTLM. Для UTF-8 или latin-1 остаётся пустым. Требует расширение iconv.';
+$lang['real_primarygroup'] = 'Должна ли использоваться настоящая первичная группа вместо "Domain Users" (медленнее)';
$lang['use_ssl'] = 'Использовать SSL? Если да, то не включайте TLS.';
$lang['use_tls'] = 'Использовать TLS? Если да, то не включайте SSL.';
$lang['debug'] = 'Выводить дополнительную информацию при ошибках?';
+$lang['expirywarn'] = 'За сколько дней нужно предупреждать пользователя о необходимости изменить пароль. 0 - отключить.';
+$lang['additional'] = 'Дополнительные AD атрибуты, разделённые запятой, для выборки из данных пользователя. Используется некоторыми плагинами.';
diff --git a/lib/plugins/authad/lang/zh-tw/lang.php b/lib/plugins/authad/lang/zh-tw/lang.php
new file mode 100644
index 000000000..6ad0947a2
--- /dev/null
+++ b/lib/plugins/authad/lang/zh-tw/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author June-Hao Hou <junehao@gmail.com>
+ */
+$lang['domain'] = '登入網域';
diff --git a/lib/plugins/authad/lang/zh-tw/settings.php b/lib/plugins/authad/lang/zh-tw/settings.php
index bd5d9413a..42cd8c96b 100644
--- a/lib/plugins/authad/lang/zh-tw/settings.php
+++ b/lib/plugins/authad/lang/zh-tw/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author syaoranhinata@gmail.com
+ * @author June-Hao Hou <junehao@gmail.com>
*/
$lang['account_suffix'] = '您的帳號後綴。如: <code>@my.domain.org</code>';
$lang['base_dn'] = '您的基本識別名。如: <code>DC=my,DC=domain,DC=org</code>';
@@ -11,6 +12,7 @@ $lang['domain_controllers'] = '以逗號分隔的域名控制器列表。如
$lang['admin_username'] = 'Active Directory 的特權使用者,可以查看所有使用者的數據。(非必要,但對發送訂閱郵件等活動來說,這是必須的。)';
$lang['admin_password'] = '上述使用者的密碼。';
$lang['sso'] = '是否使用 Kerberos 或 NTLM 的單一登入系統 (Single-Sign-On)?';
+$lang['sso_charset'] = '你的網站伺服器傳遞 Kerberos 或 NTML 帳號名稱所用的語系編碼。空白表示 UTF-8 或 latin-1。此設定需要用到 iconv 套件。';
$lang['real_primarygroup'] = '是否視作真正的主要群組,而不是假設為網域使用者 (比較慢)';
$lang['use_ssl'] = '使用 SSL 連接嗎?如果要使用,請不要啟用下方的 TLS。';
$lang['use_tls'] = '使用 TLS 連接嗎?如果要使用,請不要啟用上方的 SSL。';
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index 0d5e130ea..fd4729331 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -103,7 +103,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
return true;
} else {
// See if we can find the user
- $info = $this->getUserData($user, true);
+ $info = $this->_getUserData($user, true);
if(empty($info['dn'])) {
return false;
} else {
@@ -146,10 +146,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @author Steffen Schoch <schoch@dsb.net>
*
* @param string $user
+ * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin
+ * @return array containing user data or false
+ */
+ public function getUserData($user, $requireGroups=true) {
+ return $this->_getUserData($user);
+ }
+
+ /**
+ * @param string $user
* @param bool $inbind authldap specific, true if in bind phase
* @return array containing user data or false
*/
- public function getUserData($user, $inbind = false) {
+ protected function _getUserData($user, $inbind = false) {
global $conf;
if(!$this->_openLDAP()) return false;
@@ -172,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
+ $info = array();
$info['user'] = $user;
$info['server'] = $this->getConf('server');
@@ -555,15 +565,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* Wraps around ldap_search, ldap_list or ldap_read depending on $scope
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param resource $link_identifier
- * @param string $base_dn
- * @param string $filter
- * @param string $scope can be 'base', 'one' or 'sub'
- * @param null $attributes
- * @param int $attrsonly
- * @param int $sizelimit
- * @param int $timelimit
- * @param int $deref
+ * @param resource $link_identifier
+ * @param string $base_dn
+ * @param string $filter
+ * @param string $scope can be 'base', 'one' or 'sub'
+ * @param null|array $attributes
+ * @param int $attrsonly
+ * @param int $sizelimit
* @return resource
*/
protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,
diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php
new file mode 100644
index 000000000..49d485afd
--- /dev/null
+++ b/lib/plugins/authldap/lang/fa/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohammad Sadegh <msdn2013@gmail.com>
+ * @author Omid Hezaveh <hezpublic@gmail.com>
+ */
+$lang['starttls'] = 'از تی‌ال‌اس (TLS) استفاده می‌کنید؟';
+$lang['bindpw'] = 'رمزعبور کاربر بالا';
diff --git a/lib/plugins/authldap/lang/hr/settings.php b/lib/plugins/authldap/lang/hr/settings.php
index 44caeacc8..cb8df7218 100644
--- a/lib/plugins/authldap/lang/hr/settings.php
+++ b/lib/plugins/authldap/lang/hr/settings.php
@@ -21,3 +21,7 @@ $lang['userscope'] = 'Ograniči područje za pretragu korisnika';
$lang['groupscope'] = 'Ograniči područje za pretragu grupa';
$lang['groupkey'] = 'Članstvo grupa iz svih atributa korisnika (umjesto standardnih AD grupa) npr. grupa iz odjela ili telefonskog broja';
$lang['debug'] = 'Prikaži dodatne informacije u slučaju greške';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php
index 6bedb2991..61671ed46 100644
--- a/lib/plugins/authldap/lang/no/settings.php
+++ b/lib/plugins/authldap/lang/no/settings.php
@@ -4,6 +4,8 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Christopher Schive <chschive@frisurf.no>
+ * @author Patrick <spill.p@hotmail.com>
*/
$lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.';
$lang['starttls'] = 'Bruke TLS-forbindelser?';
+$lang['bindpw'] = 'Passord til brukeren over';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
index 5677e06a3..534990648 100644
--- a/lib/plugins/authldap/lang/ru/settings.php
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -8,10 +8,20 @@
* @author Erli Moen <evseev.jr@gmail.com>
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
* @author Владимир <id37736@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
+$lang['server'] = 'Ваш LDAP сервер. Либо имя хоста (<code>localhost</code>), либо полный URL (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'Порт LDAP сервера, если выше не был указан полный URL';
+$lang['usertree'] = 'Где искать аккаунты пользователей. Например: <code>ou=People, dc=server, dc=tld</code>';
+$lang['grouptree'] = 'Где искать группы пользователей. Например: <code>ou=Group, dc=server, dc=tld</code>';
+$lang['userfilter'] = 'LDAP фильтр для поиска аккаунтов пользователей. Например: <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'LDAP фильтр для поиска групп. Например: <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'Версия протокола. Возможно вам нужно указать <code>3</code>';
$lang['starttls'] = 'Использовать TLS подключения?';
$lang['deref'] = 'Как расшифровывать псевдонимы?';
$lang['bindpw'] = 'Пароль для указанного пользователя.';
+$lang['userscope'] = 'Ограничить область поиска при поиске пользователей';
+$lang['groupscope'] = 'Ограничить область поиска при поиске групп';
$lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php
index 1e6e6a4a9..0d423b6c9 100644
--- a/lib/plugins/authmysql/auth.php
+++ b/lib/plugins/authmysql/auth.php
@@ -21,6 +21,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
/** @var int database subrevision */
protected $dbsub = 0;
+ /** @var array cache to avoid re-reading user info data */
+ protected $cacheUserInfo = array();
+
/**
* Constructor
*
@@ -112,7 +115,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* Check if the given config strings are set
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
- * @param array $keys
+ *
+ * @param string[] $keys
* @param bool $wop is this a check for a write operation?
* @return bool
*/
@@ -157,10 +161,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$result = $this->_queryDB($sql);
if($result !== false && count($result) == 1) {
- if($this->getConf('forwardClearPass') == 1)
+ if($this->getConf('forwardClearPass') == 1) {
$rc = true;
- else
+ } else {
$rc = auth_verifyPassword($pass, $result[0]['pass']);
+ }
}
$this->_closeDB();
}
@@ -174,16 +179,23 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
* @param string $user user login to get data for
+ * @param bool $requireGroups when true, group membership information should be included in the returned array;
+ * when false, it maybe included, but is not required by the caller
* @return array|bool
*/
- public function getUserData($user) {
+ public function getUserData($user, $requireGroups=true) {
+ if($this->_cacheExists($user, $requireGroups)) {
+ return $this->cacheUserInfo[$user];
+ }
+
if($this->_openDB()) {
$this->_lockTables("READ");
- $info = $this->_getUserInfo($user);
+ $info = $this->_getUserInfo($user, $requireGroups);
$this->_unlockTables();
$this->_closeDB();
- } else
+ } else {
$info = false;
+ }
return $info;
}
@@ -209,12 +221,14 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
global $conf;
if($this->_openDB()) {
- if(($info = $this->_getUserInfo($user)) !== false)
+ if(($info = $this->_getUserInfo($user)) !== false) {
return false; // user already exists
+ }
// set defaultgroup if no groups were given
- if($grps == null)
+ if($grps == null) {
$grps = array($conf['defaultgroup']);
+ }
$this->_lockTables("WRITE");
$pwd = $this->getConf('forwardClearPass') ? $pwd : auth_cryptPassword($pwd);
@@ -234,17 +248,17 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* The dataset update will be rejected if the user name should be changed
* to an already existing one.
*
- * The password must be provides unencrypted. Pasword cryption is done
+ * The password must be provided unencrypted. Pasword encryption is done
* automatically if configured.
*
- * If one or more groups could't be updated, an error would be set. In
+ * If one or more groups can't be updated, an error will be set. In
* this case the dataset might already be changed and we can't rollback
- * the changes. Transactions would be really usefull here.
+ * the changes. Transactions would be really useful here.
*
* modifyUser() may be called without SQL statements defined that are
* needed to change group membership (for example if only the user profile
- * should be modified). In this case we asure that we don't touch groups
- * even $changes['grps'] is set by mistake.
+ * should be modified). In this case we assure that we don't touch groups
+ * even when $changes['grps'] is set by mistake.
*
* @author Chris Smith <chris@jalakai.co.uk>
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
@@ -256,27 +270,30 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
public function modifyUser($user, $changes) {
$rc = false;
- if(!is_array($changes) || !count($changes))
+ if(!is_array($changes) || !count($changes)) {
return true; // nothing to change
+ }
if($this->_openDB()) {
$this->_lockTables("WRITE");
- if(($uid = $this->_getUserID($user))) {
- $rc = $this->_updateUserInfo($changes, $uid);
+ $rc = $this->_updateUserInfo($user, $changes);
- if($rc && isset($changes['grps']) && $this->cando['modGroups']) {
- $groups = $this->_getGroups($user);
- $grpadd = array_diff($changes['grps'], $groups);
- $grpdel = array_diff($groups, $changes['grps']);
+ if($rc && isset($changes['grps']) && $this->cando['modGroups']) {
+ $groups = $this->_getGroups($user);
+ $grpadd = array_diff($changes['grps'], $groups);
+ $grpdel = array_diff($groups, $changes['grps']);
- foreach($grpadd as $group)
- if(($this->_addUserToGroup($user, $group, 1)) == false)
- $rc = false;
+ foreach($grpadd as $group) {
+ if(($this->_addUserToGroup($user, $group, true)) == false) {
+ $rc = false;
+ }
+ }
- foreach($grpdel as $group)
- if(($this->_delUserFromGroup($user, $group)) == false)
- $rc = false;
+ foreach($grpdel as $group) {
+ if(($this->_delUserFromGroup($user, $group)) == false) {
+ $rc = false;
+ }
}
}
@@ -304,8 +321,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
if(is_array($users) && count($users)) {
$this->_lockTables("WRITE");
foreach($users as $user) {
- if($this->_delUser($user))
+ if($this->_delUser($user)) {
$count++;
+ }
}
$this->_unlockTables();
}
@@ -349,7 +367,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
*
* @param int $first index of first user to be returned
* @param int $limit max number of users to be returned
- * @param array|string $filter array of field/pattern pairs
+ * @param array $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {
@@ -367,9 +385,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$result = $this->_queryDB($sql);
if(!empty($result)) {
- foreach($result as $user)
- if(($info = $this->_getUserInfo($user['user'])))
+ foreach($result as $user) {
+ if(($info = $this->_getUserInfo($user['user']))) {
$out[$user['user']] = $info;
+ }
+ }
}
$this->_unlockTables();
@@ -466,7 +486,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$sql = str_replace('%{user}', $this->_escape($user), $sql);
$sql = str_replace('%{gid}', $this->_escape($gid), $sql);
$sql = str_replace('%{group}', $this->_escape($group), $sql);
- if($this->_modifyDB($sql) !== false) return true;
+ if($this->_modifyDB($sql) !== false) {
+ $this->_flushUserInfoCache($user);
+ return true;
+ }
if($newgroup) { // remove previously created group on error
$sql = str_replace('%{gid}', $this->_escape($gid), $this->getConf('delGroup'));
@@ -501,6 +524,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$sql = str_replace('%{gid}', $this->_escape($gid), $sql);
$sql = str_replace('%{group}', $this->_escape($group), $sql);
$rc = $this->_modifyDB($sql) == 0 ? true : false;
+
+ if ($rc) {
+ $this->_flushUserInfoCache($user);
+ }
}
}
return $rc;
@@ -526,8 +553,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$result = $this->_queryDB($sql);
if($result !== false && count($result)) {
- foreach($result as $row)
+ foreach($result as $row) {
$groups[] = $row['group'];
+ }
}
return $groups;
}
@@ -585,11 +613,12 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
if($uid) {
foreach($grps as $group) {
- $gid = $this->_addUserToGroup($user, $group, 1);
+ $gid = $this->_addUserToGroup($user, $group, true);
if($gid === false) break;
}
if($gid !== false){
+ $this->_flushUserInfoCache($user);
return true;
} else {
/* remove the new user and all group relations if a group can't
@@ -614,7 +643,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
- * @param string $user user whose id is desired
+ * @param string $user username of the user to be deleted
* @return bool
*/
protected function _delUser($user) {
@@ -626,6 +655,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$sql = str_replace('%{uid}', $this->_escape($uid), $this->getConf('delUser'));
$sql = str_replace('%{user}', $this->_escape($user), $sql);
$this->_modifyDB($sql);
+ $this->_flushUserInfoCache($user);
return true;
}
}
@@ -633,23 +663,100 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
}
/**
- * getUserInfo
+ * Flush cached user information
+ *
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ *
+ * @param string $user username of the user whose data is to be removed from the cache
+ * if null, empty the whole cache
+ */
+ protected function _flushUserInfoCache($user=null) {
+ if (is_null($user)) {
+ $this->cacheUserInfo = array();
+ } else {
+ unset($this->cacheUserInfo[$user]);
+ }
+ }
+
+ /**
+ * Quick lookup to see if a user's information has been cached
+ *
+ * This test does not need a database connection or read lock
*
- * Gets the data for a specific user The database connection
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ *
+ * @param string $user username to be looked up in the cache
+ * @param bool $requireGroups true, if cached info should include group memberships
+ *
+ * @return bool existence of required user information in the cache
+ */
+ protected function _cacheExists($user, $requireGroups=true) {
+ if (isset($this->cacheUserInfo[$user])) {
+ if (!is_array($this->cacheUserInfo[$user])) {
+ return true; // user doesn't exist
+ }
+
+ if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Get a user's information
+ *
+ * The database connection must already be established for this function to work.
+ *
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ *
+ * @param string $user username of the user whose information is being reterieved
+ * @param bool $requireGroups true if group memberships should be included
+ * @param bool $useCache true if ok to return cached data & to cache returned data
+ *
+ * @return mixed false|array false if the user doesn't exist
+ * array containing user information if user does exist
+ */
+ protected function _getUserInfo($user, $requireGroups=true, $useCache=true) {
+ $info = null;
+
+ if ($useCache && isset($this->cacheUserInfo[$user])) {
+ $info = $this->cacheUserInfo[$user];
+ }
+
+ if (is_null($info)) {
+ $info = $this->_retrieveUserInfo($user);
+ }
+
+ if (($requireGroups == true) && $info && !isset($info['grps'])) {
+ $info['grps'] = $this->_getGroups($user);
+ }
+
+ if ($useCache) {
+ $this->cacheUserInfo[$user] = $info;
+ }
+
+ return $info;
+ }
+
+ /**
+ * retrieveUserInfo
+ *
+ * Gets the data for a specific user. The database connection
* must already be established for this function to work.
* Otherwise it will return 'false'.
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
* @param string $user user's nick to get data for
- * @return bool|array false on error, user info on success
+ * @return false|array false on error, user info on success
*/
- protected function _getUserInfo($user) {
+ protected function _retrieveUserInfo($user) {
$sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo'));
$result = $this->_queryDB($sql);
if($result !== false && count($result)) {
$info = $result[0];
- $info['grps'] = $this->_getGroups($user);
return $info;
}
return false;
@@ -666,20 +773,25 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* The database connection has already to be established for this
* function to work. Otherwise it will return 'false'.
*
- * The password will be crypted if necessary.
+ * The password will be encrypted if necessary.
*
+ * @param string $user user's nick being updated
* @param array $changes array of items to change as pairs of item and value
- * @param mixed $uid user id of dataset to change, must be unique in DB
* @return bool true on success or false on error
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*/
- protected function _updateUserInfo($changes, $uid) {
+ protected function _updateUserInfo($user, $changes) {
$sql = $this->getConf('updateUser')." ";
$cnt = 0;
$err = 0;
if($this->dbcon) {
+ $uid = $this->_getUserID($user);
+ if ($uid === false) {
+ return false;
+ }
+
foreach($changes as $item => $value) {
if($item == 'user') {
if(($this->_getUserID($changes['user']))) {
@@ -707,6 +819,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
$sql .= " ".str_replace('%{uid}', $uid, $this->getConf('UpdateTarget'));
if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp.
$this->_modifyDB($sql);
+ $this->_flushUserInfoCache($user);
}
return true;
}
@@ -724,7 +837,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
* @param string $group group name which id is desired
- * @return mixed group id
+ * @return false|string group id
*/
protected function _getGroupID($group) {
if($this->dbcon) {
@@ -797,7 +910,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
* @param string $query SQL string that contains the query
- * @return array with the result table
+ * @return array|false with the result table
*/
protected function _queryDB($query) {
if($this->getConf('debug') >= 2) {
@@ -888,6 +1001,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* abrogated.
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
+ *
+ * @return bool
*/
protected function _unlockTables() {
if($this->dbcon) {
diff --git a/lib/plugins/authmysql/lang/cs/settings.php b/lib/plugins/authmysql/lang/cs/settings.php
index 350c3236b..09146a451 100644
--- a/lib/plugins/authmysql/lang/cs/settings.php
+++ b/lib/plugins/authmysql/lang/cs/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author mkucera66@seznam.cz
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['server'] = 'Váš server MySQL';
$lang['user'] = 'Uživatelské jméno pro MySQL';
@@ -19,7 +20,7 @@ $lang['getGroups'] = 'Příkaz SQL pro získání uživatelovy skupi
$lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů';
$lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména';
$lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména';
-$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres emailů';
+$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů';
$lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách';
$lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů';
$lang['addUser'] = 'Příkaz SQL pro přidání nového uživatele';
@@ -32,7 +33,7 @@ $lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživ
$lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu';
$lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele';
$lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele';
-$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele';
+$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele';
$lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele';
$lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci';
$lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině';
diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php
index 1e38cb6b4..ed21201fb 100644
--- a/lib/plugins/authmysql/lang/da/settings.php
+++ b/lib/plugins/authmysql/lang/da/settings.php
@@ -2,7 +2,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
+ *
* @author Jens Hyllegaard <jens.hyllegaard@gmail.com>
* @author soer9648 <soer9648@eucl.dk>
*/
@@ -11,6 +11,7 @@ $lang['user'] = 'MySQL brugernavn';
$lang['password'] = 'Kodeord til ovenstående bruger';
$lang['database'] = 'Database der skal benyttes';
$lang['charset'] = 'Tegnsæt benyttet i database';
+$lang['debug'] = 'Vis yderligere debug output';
$lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord';
$lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation';
$lang['getUsers'] = 'SQL-sætning til at liste alle brugere';
@@ -21,7 +22,6 @@ $lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe';
$lang['delUser'] = 'SQL-sætning til at slette en bruger';
$lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper';
$lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil';
-$lang['debug'] = 'Vis yderligere debug output';
$lang['debug_o_0'] = 'ingen';
$lang['debug_o_1'] = 'kun ved fejl';
$lang['debug_o_2'] = 'alle SQL forespørgsler';
diff --git a/lib/plugins/authmysql/lang/fa/settings.php b/lib/plugins/authmysql/lang/fa/settings.php
new file mode 100644
index 000000000..68ad5ce83
--- /dev/null
+++ b/lib/plugins/authmysql/lang/fa/settings.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
+ */
+$lang['server'] = 'سرور MySQL';
+$lang['user'] = 'نام کاربری MySQL';
+$lang['database'] = 'پایگاه داده مورد استفاده';
diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php
new file mode 100644
index 000000000..32517957b
--- /dev/null
+++ b/lib/plugins/authmysql/lang/fi/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jussi Takala <jussi.takala@live.fi>
+ */
+$lang['server'] = 'Sinun MySQL-serveri';
+$lang['user'] = 'MySQL-käyttäjänimi';
+$lang['password'] = 'Salasana yläolevalle käyttäjälle';
+$lang['charset'] = 'Käytetty merkistö tietokannassa';
diff --git a/lib/plugins/authmysql/lang/hr/settings.php b/lib/plugins/authmysql/lang/hr/settings.php
index 0ef389f46..af9966999 100644
--- a/lib/plugins/authmysql/lang/hr/settings.php
+++ b/lib/plugins/authmysql/lang/hr/settings.php
@@ -19,7 +19,7 @@ $lang['getGroups'] = 'SQL izraz za dohvaćanje članstva u grupama';
$lang['getUsers'] = 'SQL izraz za ispis svih korisnika';
$lang['FilterLogin'] = 'SQL izraz za izdvajanje korisnika po korisničkom imenu';
$lang['FilterName'] = 'SQL izraz za izdvajanje korisnika po punom imenu';
-$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po email adresi';
+$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po adresi e-pošte';
$lang['FilterGroup'] = 'SQL izraz za izdvajanje korisnika po članstvu u grupama';
$lang['SortOrder'] = 'SQL izraz za sortiranje korisnika';
$lang['addUser'] = 'SQL izraz za dodavanje novih korisnika';
diff --git a/lib/plugins/authmysql/lang/no/settings.php b/lib/plugins/authmysql/lang/no/settings.php
new file mode 100644
index 000000000..45ab09819
--- /dev/null
+++ b/lib/plugins/authmysql/lang/no/settings.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Patrick <spill.p@hotmail.com>
+ */
+$lang['server'] = 'Din MySQL-server';
+$lang['user'] = 'Ditt MySQL-brukernavn';
+$lang['password'] = 'Passord til brukeren';
+$lang['database'] = 'Database som skal brukes';
+$lang['debug_o_0'] = 'ingen';
+$lang['debug_o_1'] = 'bare ved feil';
+$lang['debug_o_2'] = 'alle SQL-forespørsler';
diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php
index e51b39858..4cb280aae 100644
--- a/lib/plugins/authpgsql/auth.php
+++ b/lib/plugins/authpgsql/auth.php
@@ -104,7 +104,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
- * @param array $keys
+ * @param string[] $keys
* @param bool $wop
* @return bool
*/
@@ -159,9 +159,11 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
if($first) $sql .= " OFFSET $first";
$result = $this->_queryDB($sql);
- foreach($result as $user)
- if(($info = $this->_getUserInfo($user['user'])))
+ foreach($result as $user) {
+ if(($info = $this->_getUserInfo($user['user']))) {
$out[$user['user']] = $info;
+ }
+ }
$this->_unlockTables();
$this->_closeDB();
@@ -212,7 +214,10 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
$sql = str_replace('%{user}', addslashes($user), $sql);
$sql = str_replace('%{gid}', addslashes($gid), $sql);
$sql = str_replace('%{group}', addslashes($group), $sql);
- if($this->_modifyDB($sql) !== false) return true;
+ if($this->_modifyDB($sql) !== false) {
+ $this->_flushUserInfoCache($user);
+ return true;
+ }
if($newgroup) { // remove previously created group on error
$sql = str_replace('%{gid}', addslashes($gid), $this->conf['delGroup']);
@@ -262,11 +267,12 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
if($uid) {
foreach($grps as $group) {
- $gid = $this->_addUserToGroup($user, $group, 1);
+ $gid = $this->_addUserToGroup($user, $group, true);
if($gid === false) break;
}
if($gid !== false){
+ $this->_flushUserInfoCache($user);
return true;
} else {
/* remove the new user and all group relations if a group can't
@@ -336,7 +342,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
*
* @param string $query SQL string that contains the query
- * @return array the result table
+ * @return array|false the result table
*/
protected function _queryDB($query) {
$resultarray = array();
@@ -359,6 +365,9 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
* MySQL one because it does NOT return the last insertID
*
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $query
+ * @return bool
*/
protected function _modifyDB($query) {
if($this->dbcon) {
@@ -392,6 +401,8 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
* Commit a transaction
*
* @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
+ *
+ * @return bool
*/
protected function _unlockTables() {
if($this->dbcon) {
diff --git a/lib/plugins/authpgsql/lang/cs/settings.php b/lib/plugins/authpgsql/lang/cs/settings.php
index aec7eecf1..ad135e241 100644
--- a/lib/plugins/authpgsql/lang/cs/settings.php
+++ b/lib/plugins/authpgsql/lang/cs/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author mkucera66@seznam.cz
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['server'] = 'Váš server PostgreSQL';
$lang['port'] = 'Port vašeho serveru PostgreSQL';
@@ -18,7 +19,7 @@ $lang['getGroups'] = 'Příkaz SQL pro získání členství uživat
$lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů';
$lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména';
$lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména';
-$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres emailů';
+$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů';
$lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách';
$lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů';
$lang['addUser'] = 'Příkaz SQL pro řazení uživatelů';
@@ -31,7 +32,7 @@ $lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživ
$lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu';
$lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele';
$lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele';
-$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele';
+$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele';
$lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele';
$lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci';
$lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině';
diff --git a/lib/plugins/authpgsql/lang/fa/settings.php b/lib/plugins/authpgsql/lang/fa/settings.php
new file mode 100644
index 000000000..813493967
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/fa/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
+ */
+$lang['database'] = 'پایگاه داده مورد استفاده';
diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php
index baf40a468..e8a40dcb2 100644
--- a/lib/plugins/authpgsql/lang/it/settings.php
+++ b/lib/plugins/authpgsql/lang/it/settings.php
@@ -4,8 +4,10 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Francesco <francesco.cavalli@hotmail.com>
+ * @author Torpedo <dgtorpedo@gmail.com>
*/
$lang['server'] = 'Il tuo server PostgreSQL ';
$lang['port'] = 'La porta del tuo server PostgreSQL ';
$lang['user'] = 'Lo username PostgreSQL';
$lang['database'] = 'Database da usare';
+$lang['getUsers'] = 'Dichiarazione SQL per elencare tutti gli utenti';
diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php
index 65cbce8df..416ea0ec9 100644
--- a/lib/plugins/authpgsql/lang/ru/settings.php
+++ b/lib/plugins/authpgsql/lang/ru/settings.php
@@ -6,11 +6,12 @@
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
$lang['server'] = 'Ваш PostgreSQL-сервер';
$lang['port'] = 'Порт вашего PostgreSQL-сервера';
$lang['user'] = 'Имя пользователя PostgreSQL';
-$lang['password'] = 'Пароль для указанного пользователя.';
+$lang['password'] = 'Пароль для указанного пользователя';
$lang['database'] = 'Имя базы данных';
$lang['debug'] = 'Отображать дополнительную отладочную информацию';
$lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля';
@@ -30,5 +31,8 @@ $lang['getUserID'] = 'Выражение SQL, обеспечиваю
$lang['delUser'] = 'Выражение SQL, осуществляющее удаление пользователя';
$lang['delUserRefs'] = 'Выражение SQL, осуществляющее удаление пользователя из всех группы';
$lang['updateUser'] = 'Выражение SQL, осуществляющее обновление профиля пользователя';
+$lang['UpdateLogin'] = 'Измените условие для обновления логина';
+$lang['UpdatePass'] = 'Измените условие для обновления пароля';
+$lang['UpdateEmail'] = 'Измените условие для обновления email';
$lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы';
$lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы';
diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php
index cd5294157..9df96389a 100644
--- a/lib/plugins/authplain/_test/escaping.test.php
+++ b/lib/plugins/authplain/_test/escaping.test.php
@@ -12,13 +12,14 @@
* @group plugins
*/
class helper_plugin_authplain_escaping_test extends DokuWikiTest {
-
- protected $pluginsEnabled = array('authplain');
+
+ protected $pluginsEnabled = array('authplainharness');
+ /** @var auth_plugin_authplain|auth_plugin_authplainharness */
protected $auth;
-
+
protected function reloadUsers() {
/* auth caches data loaded from file, but recreated object forces reload */
- $this->auth = new auth_plugin_authplain();
+ $this->auth = new auth_plugin_authplainharness();
}
function setUp() {
@@ -76,7 +77,44 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest {
$this->assertEquals($saved['name'], $user['name']);
$this->assertTrue($this->auth->checkPass("testuser", $user['pass']));
}
+
+ // really only required for developers to ensure this plugin will
+ // work with systems running on PCRE 6.6 and lower.
+ public function testLineSplit(){
+ $this->auth->setPregsplit_safe(false);
+
+ $names = array(
+ 'plain',
+ 'ut-fठ8',
+ 'colon:',
+ 'backslash\\',
+ 'alltogether\\ठ:'
+ );
+ $userpass = 'user:password_hash:';
+ $other_user_data = ':email@address:group1,group2';
+
+ foreach ($names as $testname) {
+ $escaped = str_replace(array('\\',':'),array('\\\\','\\:'),$testname); // escape : & \
+ $test_line = $userpass.$escaped.$other_user_data;
+ $result = $this->auth->splitUserData($test_line);
+
+ $this->assertEquals($escaped, $result[2]);
+ }
+ }
}
-?> \ No newline at end of file
+class auth_plugin_authplainharness extends auth_plugin_authplain {
+
+ public function setPregsplit_safe($bool) {
+ $this->_pregsplit_safe = $bool;
+ }
+
+ public function getPregsplit_safe(){
+ return $this->_pregsplit_safe;
+ }
+
+ public function splitUserData($line){
+ return $this->_splitUserData($line);
+ }
+}
diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php
index e53f56667..fd2d0b249 100644
--- a/lib/plugins/authplain/auth.php
+++ b/lib/plugins/authplain/auth.php
@@ -17,6 +17,9 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
/** @var array filter pattern */
protected $_pattern = array();
+ /** @var bool safe version of preg_split */
+ protected $_pregsplit_safe = false;
+
/**
* Constructor
*
@@ -44,6 +47,8 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
$this->cando['getUsers'] = true;
$this->cando['getUserCount'] = true;
}
+
+ $this->_pregsplit_safe = version_compare(PCRE_VERSION,'6.7','>=');
}
/**
@@ -76,9 +81,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $user
- * @return array|bool
+ * @param bool $requireGroups (optional) ignored by this plugin, grps info always supplied
+ * @return array|false
*/
- public function getUserData($user) {
+ public function getUserData($user, $requireGroups=true) {
if($this->users === null) $this->_loadUserData();
return isset($this->users[$user]) ? $this->users[$user] : false;
}
@@ -328,7 +334,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
if(empty($line)) continue;
/* NB: preg_split can be deprecated/replaced with str_getcsv once dokuwiki is min php 5.3 */
- $row = preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \:
+ $row = $this->_splitUserData($line);
$row = str_replace('\\:', ':', $row);
$row = str_replace('\\\\', '\\', $row);
@@ -341,6 +347,33 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin {
}
}
+ protected function _splitUserData($line){
+ // due to a bug in PCRE 6.6, preg_split will fail with the regex we use here
+ // refer github issues 877 & 885
+ if ($this->_pregsplit_safe){
+ return preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \:
+ }
+
+ $row = array();
+ $piece = '';
+ $len = strlen($line);
+ for($i=0; $i<$len; $i++){
+ if ($line[$i]=='\\'){
+ $piece .= $line[$i];
+ $i++;
+ if ($i>=$len) break;
+ } else if ($line[$i]==':'){
+ $row[] = $piece;
+ $piece = '';
+ continue;
+ }
+ $piece .= $line[$i];
+ }
+ $row[] = $piece;
+
+ return $row;
+ }
+
/**
* return true if $user + $info match $filter criteria, false otherwise
*
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 835d27775..9202a221b 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -32,6 +32,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
var $_session_started = false;
var $_localised_prompts = false;
+ /**
+ * @return int
+ */
function getMenuSort() { return 100; }
/**
@@ -40,14 +43,20 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
function handle() {
global $ID, $INPUT;
- if (!$this->_restore_session()) return $this->_close_session();
- if ($INPUT->int('save') != 1) return $this->_close_session();
- if (!checkSecurityToken()) return $this->_close_session();
+ if(!$this->_restore_session() || $INPUT->int('save') != 1 || !checkSecurityToken()) {
+ $this->_close_session();
+ return;
+ }
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
+ if(is_null($this->_config)) {
+ $this->_config = new configuration($this->_file);
+ }
// don't go any further if the configuration is locked
- if ($this->_config->_locked) return $this->_close_session();
+ if($this->_config->locked) {
+ $this->_close_session();
+ return;
+ }
$this->_input = $INPUT->arr('config');
@@ -104,6 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
formSecurityToken();
$this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
+ /** @var setting[] $undefined_settings */
$undefined_settings = array();
$in_fieldset = false;
$first_plugin_fieldset = true;
@@ -162,7 +172,17 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
// show undefined settings list
if ($allow_debug && !empty($undefined_settings)) {
- function _setting_natural_comparison($a, $b) { return strnatcmp($a->_key, $b->_key); }
+ /**
+ * Callback for sorting settings
+ *
+ * @param setting $a
+ * @param setting $b
+ * @return int if $a is lower/equal/higher than $b
+ */
+ function _setting_natural_comparison($a, $b) {
+ return strnatcmp($a->_key, $b->_key);
+ }
+
usort($undefined_settings, '_setting_natural_comparison');
$this->_print_h1('undefined_settings', $this->getLang('_header_undefined'));
ptln('<fieldset>');
@@ -235,6 +255,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
if ($this->_session_started) session_write_close();
}
+ /**
+ * @param bool $prompts
+ */
function setupLocale($prompts=false) {
parent::setupLocale();
@@ -245,6 +268,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
}
+ /**
+ * @return bool
+ */
function _setup_localised_plugin_prompts() {
global $conf;
@@ -299,6 +325,8 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
* Generates a two-level table of contents for the config plugin.
*
* @author Ben Coburn <btcoburn@silicodon.net>
+ *
+ * @return array
*/
function getTOC() {
if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
@@ -328,6 +356,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
$t[] = html_mktocitem('configuration_manager', $this->getLang('_configuration_manager'), 1);
$t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1);
+ /** @var setting $setting */
foreach($toc['conf'] as $setting) {
$name = $setting->prompt($this);
$t[] = html_mktocitem($setting->_key, $name, 2);
@@ -352,6 +381,10 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
return $t;
}
+ /**
+ * @param string $id
+ * @param string $text
+ */
function _print_h1($id, $text) {
ptln('<h1 id="'.$id.'">'.$text.'</h1>');
}
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 8dae23110..590631dae 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -10,7 +10,9 @@
if(!defined('CM_KEYMARKER')) define('CM_KEYMARKER','____');
if (!class_exists('configuration')) {
-
+ /**
+ * Class configuration
+ */
class configuration {
var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname'])
@@ -151,6 +153,8 @@ if (!class_exists('configuration')) {
/**
* Update last modified time stamp of the config file
+ *
+ * @return bool
*/
public function touch_settings(){
if ($this->locked) return false;
@@ -285,6 +289,10 @@ if (!class_exists('configuration')) {
/**
* not used ... conf's contents are an array!
* reduce any multidimensional settings to one dimension using CM_KEYMARKER
+ *
+ * @param $conf
+ * @param string $prefix
+ * @return array
*/
protected function _flatten($conf,$prefix='') {
@@ -403,6 +411,9 @@ if (!class_exists('configuration')) {
}
if (!class_exists('setting')) {
+ /**
+ * Class setting
+ */
class setting {
var $_key = '';
@@ -452,7 +463,7 @@ if (!class_exists('setting')) {
* - if changed value passes error check, set $this->_local to the new value
*
* @param mixed $input the new value
- * @return boolean true if changed, false otherwise (incl. on error)
+ * @return boolean true if changed, false otherwise (also on error)
*/
public function update($input) {
if (is_null($input)) return false;
@@ -476,10 +487,9 @@ if (!class_exists('setting')) {
*
* @param DokuWiki_Plugin $plugin object of config plugin
* @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
- * @return array(string $label_html, string $input_html)
+ * @return array with content array(string $label_html, string $input_html)
*/
public function html(&$plugin, $echo=false) {
- $value = '';
$disable = '';
if ($this->is_protected()) {
@@ -503,6 +513,10 @@ if (!class_exists('setting')) {
/**
* Generate string to save setting value to file according to $fmt
+ *
+ * @param string $var name of variable
+ * @param string $fmt save format
+ * @return string
*/
public function out($var, $fmt='php') {
@@ -556,7 +570,7 @@ if (!class_exists('setting')) {
/**
* Returns caution
*
- * @return bool|string caution string, otherwise false for invalid caution
+ * @return false|string caution string, otherwise false for invalid caution
*/
public function caution() {
if (!empty($this->_caution)) {
@@ -603,12 +617,15 @@ if (!class_exists('setting')) {
if (!class_exists('setting_array')) {
+ /**
+ * Class setting_array
+ */
class setting_array extends setting {
/**
* Create an array from a string
*
- * @param $string
+ * @param string $string
* @return array
*/
protected function _from_string($string){
@@ -622,7 +639,7 @@ if (!class_exists('setting_array')) {
/**
* Create a string from an array
*
- * @param $array
+ * @param array $array
* @return string
*/
protected function _from_array($array){
@@ -657,13 +674,23 @@ if (!class_exists('setting_array')) {
return true;
}
+ /**
+ * Escaping
+ *
+ * @param string $string
+ * @return string
+ */
protected function _escape($string) {
$tr = array("\\" => '\\\\', "'" => '\\\'');
return "'".strtr( cleanText($string), $tr)."'";
}
/**
- * generate string to save setting value to file according to $fmt
+ * Generate string to save setting value to file according to $fmt
+ *
+ * @param string $var name of variable
+ * @param string $fmt save format
+ * @return string
*/
function out($var, $fmt='php') {
@@ -680,8 +707,14 @@ if (!class_exists('setting_array')) {
return $out;
}
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
- $value = '';
$disable = '';
if ($this->is_protected()) {
@@ -706,9 +739,18 @@ if (!class_exists('setting_array')) {
}
if (!class_exists('setting_string')) {
+ /**
+ * Class setting_string
+ */
class setting_string extends setting {
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
- $value = '';
$disable = '';
if ($this->is_protected()) {
@@ -733,10 +775,21 @@ if (!class_exists('setting_string')) {
}
if (!class_exists('setting_password')) {
+ /**
+ * Class setting_password
+ */
class setting_password extends setting_string {
var $_code = 'plain'; // mechanism to be used to obscure passwords
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if ($this->is_protected()) return false;
if (!$input) return false;
@@ -751,9 +804,15 @@ if (!class_exists('setting_password')) {
return true;
}
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
- $value = '';
$disable = $this->is_protected() ? 'disabled="disabled"' : '';
$key = htmlspecialchars($this->_key);
@@ -766,7 +825,9 @@ if (!class_exists('setting_password')) {
}
if (!class_exists('setting_email')) {
-
+ /**
+ * Class setting_email
+ */
class setting_email extends setting_string {
var $_multiple = false;
var $_placeholders = false;
@@ -775,6 +836,7 @@ if (!class_exists('setting_email')) {
* update setting with user provided value $input
* if value fails error check, save it
*
+ * @param mixed $input
* @return boolean true if changed, false otherwise (incl. on error)
*/
function update($input) {
@@ -829,7 +891,17 @@ if (!class_exists('setting_email')) {
* @deprecated 2013-02-16
*/
if (!class_exists('setting_richemail')) {
+ /**
+ * Class setting_richemail
+ */
class setting_richemail extends setting_email {
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
$this->_placeholders = true;
return parent::update($input);
@@ -839,6 +911,9 @@ if (!class_exists('setting_richemail')) {
if (!class_exists('setting_numeric')) {
+ /**
+ * Class setting_numeric
+ */
class setting_numeric extends setting_string {
// This allows for many PHP syntax errors...
// var $_pattern = '/^[-+\/*0-9 ]*$/';
@@ -847,6 +922,14 @@ if (!class_exists('setting_numeric')) {
var $_min = null;
var $_max = null;
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
$local = $this->_local;
$valid = parent::update($input);
@@ -863,6 +946,13 @@ if (!class_exists('setting_numeric')) {
return $valid;
}
+ /**
+ * Generate string to save setting value to file according to $fmt
+ *
+ * @param string $var name of variable
+ * @param string $fmt save format
+ * @return string
+ */
function out($var, $fmt='php') {
if ($this->is_protected()) return '';
@@ -881,6 +971,9 @@ if (!class_exists('setting_numeric')) {
}
if (!class_exists('setting_numericopt')) {
+ /**
+ * Class setting_numericopt
+ */
class setting_numericopt extends setting_numeric {
// just allow an empty config
var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/';
@@ -888,10 +981,18 @@ if (!class_exists('setting_numericopt')) {
}
if (!class_exists('setting_onoff')) {
+ /**
+ * Class setting_onoff
+ */
class setting_onoff extends setting_numeric {
-
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo = false) {
- $value = '';
$disable = '';
if ($this->is_protected()) {
@@ -909,6 +1010,14 @@ if (!class_exists('setting_onoff')) {
return array($label,$input);
}
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if ($this->is_protected()) return false;
@@ -923,11 +1032,21 @@ if (!class_exists('setting_onoff')) {
}
if (!class_exists('setting_multichoice')) {
+ /**
+ * Class setting_multichoice
+ */
class setting_multichoice extends setting_string {
var $_choices = array();
+ var $lang; //some custom language strings are stored in setting
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo = false) {
- $value = '';
$disable = '';
$nochoice = '';
@@ -970,6 +1089,14 @@ if (!class_exists('setting_multichoice')) {
return array($label,$input);
}
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if (is_null($input)) return false;
if ($this->is_protected()) return false;
@@ -987,10 +1114,20 @@ if (!class_exists('setting_multichoice')) {
if (!class_exists('setting_dirchoice')) {
+ /**
+ * Class setting_dirchoice
+ */
class setting_dirchoice extends setting_multichoice {
var $_dir = '';
+ /**
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
+ */
function initialize($default,$local,$protected) {
// populate $this->_choices with a list of directories
@@ -1016,12 +1153,18 @@ if (!class_exists('setting_dirchoice')) {
if (!class_exists('setting_hidden')) {
+ /**
+ * Class setting_hidden
+ */
class setting_hidden extends setting {
// Used to explicitly ignore a setting in the configuration manager.
}
}
if (!class_exists('setting_fieldset')) {
+ /**
+ * Class setting_fieldset
+ */
class setting_fieldset extends setting {
// A do-nothing class used to detect the 'fieldset' type.
// Used to start a new settings "display-group".
@@ -1029,6 +1172,9 @@ if (!class_exists('setting_fieldset')) {
}
if (!class_exists('setting_undefined')) {
+ /**
+ * Class setting_undefined
+ */
class setting_undefined extends setting_hidden {
// A do-nothing class used to detect settings with no metadata entry.
// Used internaly to hide undefined settings, and generate the undefined settings list.
@@ -1036,6 +1182,9 @@ if (!class_exists('setting_undefined')) {
}
if (!class_exists('setting_no_class')) {
+ /**
+ * Class setting_no_class
+ */
class setting_no_class extends setting_undefined {
// A do-nothing class used to detect settings with a missing setting class.
// Used internaly to hide undefined settings, and generate the undefined settings list.
@@ -1043,6 +1192,9 @@ if (!class_exists('setting_no_class')) {
}
if (!class_exists('setting_no_default')) {
+ /**
+ * Class setting_no_default
+ */
class setting_no_default extends setting_undefined {
// A do-nothing class used to detect settings with no default value.
// Used internaly to hide undefined settings, and generate the undefined settings list.
@@ -1050,11 +1202,22 @@ if (!class_exists('setting_no_default')) {
}
if (!class_exists('setting_multicheckbox')) {
+ /**
+ * Class setting_multicheckbox
+ */
class setting_multicheckbox extends setting_string {
var $_choices = array();
var $_combine = array();
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if ($this->is_protected()) return false;
@@ -1075,9 +1238,15 @@ if (!class_exists('setting_multicheckbox')) {
return true;
}
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
- $value = '';
$disable = '';
if ($this->is_protected()) {
@@ -1125,7 +1294,7 @@ if (!class_exists('setting_multicheckbox')) {
// handle any remaining values
$other = join(',',$value);
- $class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
+ $class = ((count($default) == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
" selectiondefault" : "";
$input .= '<div class="other'.$class.'">'."\n";
@@ -1139,6 +1308,9 @@ if (!class_exists('setting_multicheckbox')) {
/**
* convert comma separated list to an array and combine any complimentary values
+ *
+ * @param string $str
+ * @return array
*/
function _str2array($str) {
$array = explode(',',$str);
@@ -1162,6 +1334,9 @@ if (!class_exists('setting_multicheckbox')) {
/**
* convert array of values + other back to a comma separated list, incl. splitting any combined values
+ *
+ * @param array $input
+ * @return string
*/
function _array2str($input) {
@@ -1190,6 +1365,9 @@ if (!class_exists('setting_multicheckbox')) {
}
if (!class_exists('setting_regex')){
+ /**
+ * Class setting_regex
+ */
class setting_regex extends setting_string {
var $_delimiter = '/'; // regex delimiter to be used in testing input
@@ -1213,7 +1391,7 @@ if (!class_exists('setting_regex')){
// see if the regex compiles and runs (we don't check for effectiveness)
$regex = $this->_delimiter . $input . $this->_delimiter . $this->_pregflags;
$lastError = error_get_last();
- $ok = @preg_match($regex,'testdata');
+ @preg_match($regex,'testdata');
if (preg_last_error() != PREG_NO_ERROR || error_get_last() != $lastError) {
$this->_input = $input;
$this->_error = true;
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index 83de802a3..232a8177f 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -6,8 +6,15 @@
*/
if (!class_exists('setting_sepchar')) {
+ /**
+ * Class setting_sepchar
+ */
class setting_sepchar extends setting_multichoice {
+ /**
+ * @param string $key
+ * @param array|null $param array with metadata of setting
+ */
function setting_sepchar($key,$param=null) {
$str = '_-.';
for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
@@ -19,8 +26,19 @@ if (!class_exists('setting_sepchar')) {
}
if (!class_exists('setting_savedir')) {
+ /**
+ * Class setting_savedir
+ */
class setting_savedir extends setting_string {
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if ($this->is_protected()) return false;
@@ -40,9 +58,20 @@ if (!class_exists('setting_savedir')) {
}
if (!class_exists('setting_authtype')) {
+ /**
+ * Class setting_authtype
+ */
class setting_authtype extends setting_multichoice {
+ /**
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
+ */
function initialize($default,$local,$protected) {
+ /** @var $plugin_controller Doku_Plugin_Controller */
global $plugin_controller;
// retrieve auth types provided by plugins
@@ -53,7 +82,16 @@ if (!class_exists('setting_authtype')) {
parent::initialize($default,$local,$protected);
}
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
+ /** @var $plugin_controller Doku_Plugin_Controller */
global $plugin_controller;
// is an update possible/requested?
@@ -92,8 +130,19 @@ if (!class_exists('setting_authtype')) {
}
if (!class_exists('setting_im_convert')) {
+ /**
+ * Class setting_im_convert
+ */
class setting_im_convert extends setting_string {
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (also on error)
+ */
function update($input) {
if ($this->is_protected()) return false;
@@ -115,14 +164,24 @@ if (!class_exists('setting_im_convert')) {
}
if (!class_exists('setting_disableactions')) {
+ /**
+ * Class setting_disableactions
+ */
class setting_disableactions extends setting_multicheckbox {
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
global $lang;
// make some language adjustments (there must be a better way)
// transfer some DokuWiki language strings to the plugin
- if (!$plugin->localised) $this->setupLocale();
+ if (!$plugin->localised) $plugin->setupLocale();
$plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs'];
foreach ($this->_choices as $choice)
@@ -134,10 +193,20 @@ if (!class_exists('setting_disableactions')) {
}
if (!class_exists('setting_compression')) {
+ /**
+ * Class setting_compression
+ */
class setting_compression extends setting_multichoice {
var $_choices = array('0'); // 0 = no compression, always supported
+ /**
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
+ */
function initialize($default,$local,$protected) {
// populate _choices with the compression methods supported by this php installation
@@ -150,16 +219,26 @@ if (!class_exists('setting_compression')) {
}
if (!class_exists('setting_license')) {
+ /**
+ * Class setting_license
+ */
class setting_license extends setting_multichoice {
var $_choices = array(''); // none choosen
+ /**
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
+ */
function initialize($default,$local,$protected) {
global $license;
foreach($license as $key => $data){
$this->_choices[] = $key;
- $this->lang[$this->_key.'_o_'.$key] = $data['name'];
+ $this->lang[$this->_key.'_o_'.$key] = $data['name']; // stored in setting
}
parent::initialize($default,$local,$protected);
@@ -169,9 +248,20 @@ if (!class_exists('setting_license')) {
if (!class_exists('setting_renderer')) {
+ /**
+ * Class setting_renderer
+ */
class setting_renderer extends setting_multichoice {
var $_prompts = array();
-
+ var $_format = null;
+
+ /**
+ * Receives current values for the setting $key
+ *
+ * @param mixed $default default setting value
+ * @param mixed $local local setting value
+ * @param mixed $protected protected setting value
+ */
function initialize($default,$local,$protected) {
$format = $this->_format;
@@ -188,11 +278,18 @@ if (!class_exists('setting_renderer')) {
parent::initialize($default,$local,$protected);
}
+ /**
+ * Build html for label and input of setting
+ *
+ * @param DokuWiki_Plugin $plugin object of config plugin
+ * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting
+ * @return array with content array(string $label_html, string $input_html)
+ */
function html(&$plugin, $echo=false) {
// make some language adjustments (there must be a better way)
// transfer some plugin names to the config plugin
- if (!$plugin->localised) $this->setupLocale();
+ if (!$plugin->localised) $plugin->setupLocale();
foreach ($this->_choices as $choice) {
if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) {
diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php
index 99c74848b..71257cf43 100644
--- a/lib/plugins/extension/admin.php
+++ b/lib/plugins/extension/admin.php
@@ -54,6 +54,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin {
msg($this->getLang('repo_error').' [<a href="'.$url.'">'.$this->getLang('repo_retry').'</a>]', -1);
}
+ if(!in_array('ssl', stream_get_transports())) {
+ msg($this->getLang('nossl'), -1);
+ }
+
/* @var helper_plugin_extension_extension $extension */
$extension = $this->loadHelper('extension_extension');
@@ -75,10 +79,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin {
case 'uninstall':
$extension->setExtension($extname);
$status = $extension->uninstall();
- if($status !== true) {
- msg($status, -1);
- } else {
+ if($status) {
msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1);
+ } else {
+ msg(sprintf($this->getLang('msg_delete_failed'), hsc($extension->getDisplayName())), -1);
}
break;
case 'enable';
diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php
index 2aca0e218..dfa624907 100644
--- a/lib/plugins/extension/helper/extension.php
+++ b/lib/plugins/extension/helper/extension.php
@@ -799,7 +799,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
*
* The directory is registered for cleanup when the class is destroyed
*
- * @return bool|string
+ * @return false|string
*/
protected function mkTmpDir(){
$dir = io_mktmpdir();
@@ -1079,7 +1079,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
*
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $file The file to analyze
- * @return string|bool false if the file can't be read, otherwise an "extension"
+ * @return string|false false if the file can't be read, otherwise an "extension"
*/
private function guess_archive($file) {
$fh = fopen($file, 'rb');
@@ -1095,6 +1095,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
/**
* Copy with recursive sub-directory support
+ *
+ * @param string $src filename path to file
+ * @param string $dst filename path to file
+ * @return bool|int|string
*/
private function dircopy($src, $dst) {
global $conf;
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index 47edca8c1..872cccc8c 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -333,7 +333,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
* Shortens the URL for display
*
* @param string $url
- *
* @return string HTML link
*/
function shortlink($url){
@@ -387,7 +386,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
$return .= '<dd>';
$return .= hsc($extension->getInstalledVersion());
$return .= '</dd>';
- } else {
+ }
+ if (!$extension->isBundled()) {
$return .= '<dt>'.$this->getLang('install_date').'</dt>';
$return .= '<dd>';
$return .= ($extension->getUpdateDate() ? hsc($extension->getUpdateDate()) : $this->getLang('unknown'));
@@ -401,13 +401,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
$return .= '</dd>';
}
- if($extension->getInstallDate()) {
- $return .= '<dt>'.$this->getLang('installed').'</dt>';
- $return .= '<dd>';
- $return .= hsc($extension->getInstallDate());
- $return .= '</dd>';
- }
-
$return .= '<dt>'.$this->getLang('provides').'</dt>';
$return .= '<dd><bdi>';
$return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default);
@@ -467,6 +460,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
* @return string The HTML code
*/
function make_actions(helper_plugin_extension_extension $extension) {
+ global $conf;
$return = '';
$errors = '';
@@ -498,6 +492,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
$errors .= '<p class="permerror">'.$this->getLang('git').'</p>';
}
+ if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['auth'] != $extension->getID()) {
+ $errors .= '<p class="permerror">'.$this->getLang('auth').'</p>';
+ }
+
}else{
if (($canmod = $extension->canModify()) === true) {
if ($extension->getDownloadURL()) {
diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php
index 6ffe89eb7..5dc2707cf 100644
--- a/lib/plugins/extension/helper/repository.php
+++ b/lib/plugins/extension/helper/repository.php
@@ -32,7 +32,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
$request_needed = false;
foreach ($list as $name) {
$cache = new cache('##extension_manager##'.$name, '.repo');
- $result = null;
+
if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) {
$this->loaded_extensions[$name] = true;
$request_data['ext'][] = $name;
@@ -64,7 +64,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
public function hasAccess() {
if ($this->has_access === null) {
$cache = new cache('##extension_manager###hasAccess', '.repo');
- $result = null;
+
if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) {
$httpclient = new DokuHTTPClient();
$httpclient->timeout = 5;
@@ -91,7 +91,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
*/
public function getData($name) {
$cache = new cache('##extension_manager##'.$name, '.repo');
- $result = null;
+
if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) {
$this->loaded_extensions[$name] = true;
$httpclient = new DokuHTTPClient();
diff --git a/lib/plugins/extension/lang/cs/intro_install.txt b/lib/plugins/extension/lang/cs/intro_install.txt
new file mode 100644
index 000000000..b274959b9
--- /dev/null
+++ b/lib/plugins/extension/lang/cs/intro_install.txt
@@ -0,0 +1 @@
+Zde můžete ručně instalovat zásuvné moduly a šablony vzhledu, buď nahráním, nebo zadáním přímé URL pro stažení. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/cs/intro_templates.txt b/lib/plugins/extension/lang/cs/intro_templates.txt
new file mode 100644
index 000000000..45abe952c
--- /dev/null
+++ b/lib/plugins/extension/lang/cs/intro_templates.txt
@@ -0,0 +1 @@
+Toto jsou šablony, které jsou momentálně nainstalovány v této DokuWiki. Aktuálně používanu šablonu lze vybrat ve [[?do=admin&page=config|Správci rozšíření]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php
new file mode 100644
index 000000000..dc38afd52
--- /dev/null
+++ b/lib/plugins/extension/lang/cs/lang.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Viktor Zavadil <vzavadil@newps.cz>
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
+ */
+$lang['menu'] = 'Manager rozšíření';
+$lang['tab_plugins'] = 'Instalované moduly';
+$lang['tab_templates'] = 'Instalované šablony';
+$lang['tab_search'] = 'Vyhledej a instaluj';
+$lang['tab_install'] = 'Ruční instalování';
+$lang['notimplemented'] = 'Tato vychytávka není dosud implementována';
+$lang['notinstalled'] = 'Toto rozšíření není instalováno';
+$lang['alreadyenabled'] = 'Toto rozšíření je již povoleno';
+$lang['alreadydisabled'] = 'Toto rozšíření je již vypnuto';
+$lang['pluginlistsaveerror'] = 'Došlo k chybě při ukládání seznamu zásuvných modulů';
+$lang['unknownauthor'] = 'Neznámý autor';
+$lang['unknownversion'] = 'Neznámá verze';
+$lang['btn_info'] = 'Zobrazit více informací';
+$lang['btn_update'] = 'Aktualizovat';
+$lang['btn_uninstall'] = 'Odinstalovat';
+$lang['btn_enable'] = 'Povolit';
+$lang['btn_disable'] = 'Zakázat';
+$lang['btn_install'] = 'Instalovat';
+$lang['btn_reinstall'] = 'Přeinstalovat';
+$lang['js']['reallydel'] = 'Opravdu odinstalovat toto rozšíření?';
+$lang['search_for'] = 'Hledat rozšíření:';
+$lang['search'] = 'Hledat';
+$lang['extensionby'] = '<strong>%s</strong> od %s';
+$lang['screenshot'] = 'Screenshot %s';
+$lang['popularity'] = 'Popularita: %s%%';
+$lang['homepage_link'] = 'Dokumenty';
+$lang['bugs_features'] = 'Chyby';
+$lang['tags'] = 'Štítky:';
+$lang['author_hint'] = 'Vyhledat rozšíření podle tohoto autora';
+$lang['installed'] = 'Nainstalováno:';
+$lang['downloadurl'] = 'URL stahování:';
+$lang['repository'] = 'Repozitář:';
+$lang['unknown'] = '<em>neznámý</em>';
+$lang['installed_version'] = 'Nainstalovaná verze:';
+$lang['install_date'] = 'Poslední aktualizace';
+$lang['available_version'] = 'Dostupná verze:';
+$lang['compatible'] = 'Kompatibilní s:';
+$lang['depends'] = 'Závisí na:';
+$lang['similar'] = 'Podobný jako:';
+$lang['conflicts'] = 'Koliduje s:';
+$lang['donate'] = 'Líbí se ti to?';
+$lang['donate_action'] = 'Kup autorovi kávu!';
+$lang['repo_retry'] = 'Opakovat';
+$lang['provides'] = 'Poskytuje:';
+$lang['status'] = 'Stav:';
+$lang['status_installed'] = 'instalovaný';
+$lang['status_not_installed'] = 'nenainstalovaný';
+$lang['status_protected'] = 'chráněný';
+$lang['status_enabled'] = 'povolený';
+$lang['status_disabled'] = 'zakázaný';
+$lang['status_unmodifiable'] = 'neměnný';
+$lang['status_plugin'] = 'zásuvný modul';
+$lang['status_template'] = 'šablona';
+$lang['status_bundled'] = 'svázaný';
+$lang['msg_enabled'] = 'Zásuvný modul %s povolen';
+$lang['msg_disabled'] = 'Zásuvný modul %s zakázán';
+$lang['msg_delete_success'] = 'Rozšíření odinstalováno';
+$lang['msg_delete_failed'] = 'Odinstalování rozšíření %s selhalo';
+$lang['msg_template_install_success'] = 'Šablona %s úspěšně nainstalována';
+$lang['msg_template_update_success'] = 'Šablona %s úspěšně aktualizována';
+$lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšně nainstalován.';
+$lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšně aktualizován.';
+$lang['msg_upload_failed'] = 'Nahrávání souboru selhalo';
+$lang['missing_dependency'] = '<strong>Chybějící nebo zakázaná závislost:</strong> %s';
+$lang['security_issue'] = '<strong>Bezpečnostní problém:</strong> %s';
+$lang['security_warning'] = '<strong>Bezpečnostní varování:</strong> %s';
+$lang['update_available'] = '<strong>Aktualizace:</strong> Je dostupná nová verze %s.';
+$lang['wrong_folder'] = '<strong>Zásuvný modul nesprávně nainstalován:</strong> Přejmenujte adresář modulu "%s" na "%s".';
+$lang['url_change'] = '<strong>URL se změnila:</strong> URL pro stahování se změnila od poslední aktualizace. Před další aktualizací tohoto rozšíření ověřte správnost nové URL.<br />Nová: %s<br />Stará: %s';
+$lang['error_badurl'] = 'Adresy URL by měly začínat s http nebo https';
+$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář pro přijetí stahování';
+$lang['error_download'] = 'Nelze stáhnout soubor: %s';
+$lang['error_decompress'] = 'Selhalo rozbalení staženého souboru. Toto je nejspíš důsledek poškození souboru při přenosu, zkuste soubor stáhnout znovu; případně nemusel být rozpoznán formát sbaleného souboru a bude třeba přistoupit k ruční instalaci. ';
+$lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozšíření, je třeba stáhnout a instalovat ručně';
+$lang['error_copy'] = 'Došlo k chybě kopírování souborů při pokusu nainstalovat soubory do adresáře <em>%s</em>: může být plný disk nebo špatně nastavena přístupová práva. Tato chyba mohla zapříčinit pouze částečnou instalaci zásuvného modulu a uvést wiki do nestabilního stavu.';
+$lang['noperms'] = 'Nelze zapisovat do adresáře pro rozšíření';
+$lang['notplperms'] = 'Nelze zapisovat do odkládacího adresáře';
+$lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly';
+$lang['git'] = 'Toto rozšíření bylo nainstalováno přes git. Touto cestou ho nejspíš tady aktualizovat nechcete.';
+$lang['auth'] = 'Tento ověřovací zásuvný modul není povolen v nastavení, zvažte jeho deaktivaci.';
+$lang['install_url'] = 'Nainstalovat z URL:';
+$lang['install_upload'] = 'Nahrát rozšíření:';
+$lang['repo_error'] = 'Nelze kontaktovat repozitář se zásuvnými moduly. Ujistěte se, že váš server může kontaktovat www.dokuwiki.org a zkontrolujte nastavení proxy.';
+$lang['nossl'] = 'Použité PHP pravděpodobně nepodporuje SSL. Stažení mnoha DokuWiki rozšíření nebude fungovat.';
diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php
new file mode 100644
index 000000000..c341bc5f9
--- /dev/null
+++ b/lib/plugins/extension/lang/da/lang.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Søren Birk <soer9648@eucl.dk>
+ */
+$lang['update_available'] = '<strong>Opdatering:</strong> Ny version %s er tilgængelig.';
+$lang['wrong_folder'] = '<strong>Plugin ikke installeret korrekt:</strong> Omdøb plugin-mappe "%s" til "%s".';
+$lang['url_change'] = '<strong>URL ændret:</strong> Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.<br />Ny: %s<br />Gammel: %s';
+$lang['error_badurl'] = 'URL\'er skal starte med http eller https';
+$lang['error_dircreate'] = 'Ikke i stand til at oprette midlertidig mappe til modtagelse af download';
+$lang['error_download'] = 'Ikke i stand til at downloade filen: %s';
+$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dårlig download, hvor du i så fald bør du prøve igen; eller komprimeringsformatet kan være ukendt, hvor du i så fald bliver nød til at downloade og installere manuelt.';
+$lang['error_findfolder'] = 'Ikke i stand til at identificere udvidelsesmappe - du bliver nød til at downloade og installere manuelt.';
+$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen <em>%s</em>: disken kan være fuld, eller mangel på fil-tilladelser. Dette kan have resulteret i et delvist installeret plugin, og efterladt din wiki-installation ustabil.';
+$lang['noperms'] = 'Udvidelsesmappe er ikke skrivbar';
+$lang['notplperms'] = 'Skabelonmappe er ikke skrivbar';
+$lang['nopluginperms'] = 'Pluginmappe er ikke skrivbar';
+$lang['git'] = 'Udvidelsen blev installeret via git - du vil muligvis ikke opdatere herfra.';
+$lang['auth'] = 'Auth-plugin er ikke aktiveret i konfigurationen - overvej at deaktivere den.';
+$lang['install_url'] = 'Installér fra URL:';
+$lang['install_upload'] = 'Upload Udvidelse:';
+$lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.';
diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php
index 72c9b9e2d..f545b6da3 100644
--- a/lib/plugins/extension/lang/en/lang.php
+++ b/lib/plugins/extension/lang/en/lang.php
@@ -69,7 +69,8 @@ $lang['status_bundled'] = 'bundled';
$lang['msg_enabled'] = 'Plugin %s enabled';
$lang['msg_disabled'] = 'Plugin %s disabled';
-$lang['msg_delete_success'] = 'Extension uninstalled';
+$lang['msg_delete_success'] = 'Extension %s uninstalled';
+$lang['msg_delete_failed'] = 'Uninstalling Extension %s failed';
$lang['msg_template_install_success'] = 'Template %s installed successfully';
$lang['msg_template_update_success'] = 'Template %s updated successfully';
$lang['msg_plugin_install_success'] = 'Plugin %s installed successfully';
@@ -94,8 +95,10 @@ $lang['noperms'] = 'Extension directory is not writable';
$lang['notplperms'] = 'Template directory is not writable';
$lang['nopluginperms'] = 'Plugin directory is not writable';
$lang['git'] = 'This extension was installed via git, you may not want to update it here.';
+$lang['auth'] = 'This auth plugin is not enabled in configuration, consider disabling it.';
$lang['install_url'] = 'Install from URL:';
$lang['install_upload'] = 'Upload Extension:';
-$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; \ No newline at end of file
+$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.';
+$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fa/lang.php b/lib/plugins/extension/lang/fa/lang.php
new file mode 100644
index 000000000..95c3e9652
--- /dev/null
+++ b/lib/plugins/extension/lang/fa/lang.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
+ */
+$lang['menu'] = 'مدیریت افزونه ها';
+$lang['tab_plugins'] = 'پلاگین های نصب شده';
+$lang['tab_templates'] = 'قالب های نصب شده';
+$lang['tab_search'] = 'جستجو و نصب';
+$lang['tab_install'] = 'نصب دستی';
+$lang['notinstalled'] = 'این افزونه نصب نشده است';
+$lang['alreadyenabled'] = 'این افزونه فعال شده است';
+$lang['alreadydisabled'] = 'این افزونه غیرفعال شده است';
+$lang['unknownversion'] = 'نسخه ناشناخته';
+$lang['btn_info'] = 'نمایش اطلاعات بیشتر';
+$lang['btn_update'] = 'به روز رسانی';
+$lang['btn_enable'] = 'فعال';
+$lang['btn_disable'] = 'غیرفعال';
+$lang['btn_install'] = 'نصب';
+$lang['btn_reinstall'] = 'نصب مجدد';
+$lang['search_for'] = 'جستجوی افزونه:';
+$lang['search'] = 'جستجو';
+$lang['tags'] = 'برچسب ها:';
+$lang['installed_version'] = 'نسخه نصب شده:';
+$lang['available_version'] = 'نسخه در دسترس:';
+$lang['repo_retry'] = 'دوباره';
+$lang['status'] = 'وضعیت';
+$lang['status_installed'] = 'نصب شده';
+$lang['status_not_installed'] = 'نصب نشده';
+$lang['status_enabled'] = 'فعال';
+$lang['status_disabled'] = 'غیرفعال';
+$lang['status_plugin'] = 'پلاگین';
+$lang['status_template'] = 'قالب';
+$lang['noperms'] = 'پوشه افزونه ها قابل نوشتن نیست';
+$lang['notplperms'] = 'پوشه قالب ها قابل نوشتن نیست';
+$lang['nopluginperms'] = 'پوشه پلاگین ها قابل نوشتن نیست';
+$lang['install_url'] = 'نصب از آدرس:';
+$lang['install_upload'] = 'بارگذاری افزونه:';
diff --git a/lib/plugins/extension/lang/fi/lang.php b/lib/plugins/extension/lang/fi/lang.php
new file mode 100644
index 000000000..a154f2563
--- /dev/null
+++ b/lib/plugins/extension/lang/fi/lang.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jussi Takala <jussi.takala@live.fi>
+ */
+$lang['tab_plugins'] = 'Asennetut liitännäiset';
+$lang['tab_search'] = 'Etsi ja asenna';
+$lang['tab_install'] = 'Manuaalinen asennus';
+$lang['notimplemented'] = 'Tätä ominaisuutta ei ole vielä toteutettu';
+$lang['notinstalled'] = 'Tätä laajennusta ei ole asennettu';
+$lang['alreadyenabled'] = 'Tämä laajennus on jo käytössä';
+$lang['alreadydisabled'] = 'Tämä laajennus on jo otettu pois käytöstä';
+$lang['pluginlistsaveerror'] = 'Tapahtui virhe tallentaessa liitännäislistaa';
+$lang['unknownauthor'] = 'Tuntematon tekijä';
+$lang['unknownversion'] = 'Tuntematon versio';
+$lang['btn_info'] = 'Näytä lisää tietoa';
+$lang['btn_update'] = 'Päivitä';
+$lang['btn_enable'] = 'Ota käyttöön';
+$lang['btn_disable'] = 'Poista käytöstä';
+$lang['btn_install'] = 'Asenna';
+$lang['btn_reinstall'] = 'Uudelleenasenna';
+$lang['js']['reallydel'] = 'Haluatko varmasti poistaa tämän laajennuksen?';
+$lang['search_for'] = 'Etsi laajennusta:';
+$lang['search'] = 'Etsi';
+$lang['downloadurl'] = 'Lataa URL-osoite';
+$lang['installed_version'] = 'Asennettu versio';
+$lang['install_date'] = 'Sinun viimeinen päivitys:';
+$lang['available_version'] = 'Saatavissa oleva versio:';
+$lang['status_installed'] = 'asennettu';
+$lang['status_protected'] = 'suojattu';
+$lang['status_enabled'] = 'otettu käyttöön';
+$lang['status_disabled'] = 'otettu pois käytöstä';
+$lang['status_plugin'] = 'liitännäinen';
+$lang['install_url'] = 'Asenna URL-osoitteesta:';
+$lang['install_upload'] = 'Ladattu laajennus:';
diff --git a/lib/plugins/extension/lang/hr/lang.php b/lib/plugins/extension/lang/hr/lang.php
index 890681301..f43defcb1 100644
--- a/lib/plugins/extension/lang/hr/lang.php
+++ b/lib/plugins/extension/lang/hr/lang.php
@@ -6,24 +6,24 @@
* @author Davor Turkalj <turki.bsc@gmail.com>
*/
$lang['menu'] = 'Upravitelj dodataka';
-$lang['tab_plugins'] = 'Instalirani dodatci';
-$lang['tab_templates'] = 'Instalirani predlošci';
-$lang['tab_search'] = 'Potraži i instaliraj';
-$lang['tab_install'] = 'Ručno instaliranje';
+$lang['tab_plugins'] = 'Ugrađeni dodatci';
+$lang['tab_templates'] = 'Ugrađeni predlošci';
+$lang['tab_search'] = 'Potraži i ugradi';
+$lang['tab_install'] = 'Ručna ugradnja';
$lang['notimplemented'] = 'Ova mogućnost još nije napravljena';
-$lang['notinstalled'] = 'Dodatak nije instaliran';
+$lang['notinstalled'] = 'Dodatak nije ugrađen';
$lang['alreadyenabled'] = 'Ovaj dodatak je već omogućen';
$lang['alreadydisabled'] = 'Ovaj dodatak je već onemogućen';
$lang['pluginlistsaveerror'] = 'Dogodila se greška pri snimanju liste dodataka';
$lang['unknownauthor'] = 'Nepoznat autor';
$lang['unknownversion'] = 'Nepoznata inačica';
$lang['btn_info'] = 'Prikaži više informacija';
-$lang['btn_update'] = 'Ažuriraj';
+$lang['btn_update'] = 'Dogradi';
$lang['btn_uninstall'] = 'Ukloni';
$lang['btn_enable'] = 'Omogući';
$lang['btn_disable'] = 'Onemogući';
-$lang['btn_install'] = 'Postavi';
-$lang['btn_reinstall'] = 'Ponovno postavi';
+$lang['btn_install'] = 'Ugradi';
+$lang['btn_reinstall'] = 'Ponovno ugradi';
$lang['js']['reallydel'] = 'Zaista ukloniti ovo proširenje?';
$lang['search_for'] = 'Pretraži proširenja';
$lang['search'] = 'Pretraži';
@@ -34,9 +34,55 @@ $lang['homepage_link'] = 'Upute';
$lang['bugs_features'] = 'Greške';
$lang['tags'] = 'Oznake:';
$lang['author_hint'] = 'Potraži dodatke od ovog autora';
-$lang['installed'] = 'Postavljeno:';
+$lang['installed'] = 'Ugrađeno:';
$lang['downloadurl'] = 'URL adresa preuzimanja:';
$lang['repository'] = 'Repozitorij:';
$lang['unknown'] = '<em>nepoznat</em>';
-$lang['installed_version'] = 'Postavljena inačica:';
+$lang['installed_version'] = 'Ugrađena inačica:';
$lang['install_date'] = 'Vaše zadnje osvježavanje:';
+$lang['available_version'] = 'Dostupna inačica';
+$lang['compatible'] = 'Kompatibilan s:';
+$lang['depends'] = 'Zavisi o:';
+$lang['similar'] = 'Sličan s:';
+$lang['conflicts'] = 'U sukobu s:';
+$lang['donate'] = 'Poput ovog?';
+$lang['donate_action'] = 'Kupite autoru kavu!';
+$lang['repo_retry'] = 'Ponovi';
+$lang['provides'] = 'Osigurava:';
+$lang['status'] = 'Status:';
+$lang['status_installed'] = 'ugrađen';
+$lang['status_not_installed'] = 'nije ugrađen';
+$lang['status_protected'] = 'zaštićen';
+$lang['status_enabled'] = 'omogućen';
+$lang['status_disabled'] = 'onemogućen';
+$lang['status_unmodifiable'] = 'neizmjenjiv';
+$lang['status_plugin'] = 'dodatak';
+$lang['status_template'] = 'predložak';
+$lang['status_bundled'] = 'ugrađen';
+$lang['msg_enabled'] = 'Dodatak %s omogućen';
+$lang['msg_disabled'] = 'Dodatak %s onemogućen';
+$lang['msg_delete_success'] = 'Proširenje uklonjeno';
+$lang['msg_template_install_success'] = 'Predložak %s uspješno ugrađen';
+$lang['msg_template_update_success'] = 'Predložak %s uspješno nadograđen';
+$lang['msg_plugin_install_success'] = 'Dodatak %s uspješno ugrađen';
+$lang['msg_plugin_update_success'] = 'Dodatak %s uspješno nadograđen';
+$lang['msg_upload_failed'] = 'Učitavanje datoteke nije uspjelo';
+$lang['missing_dependency'] = '<strong>Nedostaje ili onemogućena zavisnost:</strong> %s';
+$lang['security_issue'] = '<strong>Sigurnosno pitanje:</strong> %s';
+$lang['security_warning'] = '<strong>Sigurnosno upozorenje:</strong> %s';
+$lang['update_available'] = '<strong>Nadogranja:</strong> Nova inačica %s je dostupna.';
+$lang['wrong_folder'] = '<strong>Dodatak neispravno ugrađen:</strong> Preimenujte mapu dodatka iz "%s" u "%s".';
+$lang['url_change'] = '<strong>URL izmijenjen:</strong> Adresa za preuzimanje je promijenjena od zadnjeg preuzimanja. Provjerite da li je novu URL valjan prije nadogradnje proširenja.<br />Novi: %s<br />Stari: %s';
+$lang['error_badurl'] = 'URL adrese trebaju započinjati sa http ili https';
+$lang['error_dircreate'] = 'Ne mogu napraviti privremenu mapu za prihvat preuzimanja';
+$lang['error_download'] = 'Ne mogu preuzeti datoteku: %s';
+$lang['error_decompress'] = 'Ne mogu raspakirati preuzetu datoteku. To može biti rezultati lošeg preuzimanja i tada treba pokušati ponovo; ili format sažimanja je nepoznat i u tom slučaju treba datoteku ručno preuzeti i ugraditi.';
+$lang['error_findfolder'] = 'Ne mogu odrediti mapu proširenja, trebate ga ručno preuzeti i ugraditi';
+$lang['error_copy'] = 'Dogodila se greška pri kopiranju dok je pokušavanja ugradnja datoteka u mapu <em>%s</em>: disk može biti pun ili dozvole pristupa nisu dobre. Ovo može rezultirati djelomično ugrađenim dodatkom i može učiniti Vaš wiki nestabilnim';
+$lang['noperms'] = 'Nije moguće pisati u mapu proširanja';
+$lang['notplperms'] = 'Nije moguće pisati u mapu predloška';
+$lang['nopluginperms'] = 'Nije moguće pisati u mapu dodatka';
+$lang['git'] = 'Proširenje je ugrađeno preko Git-a, možda ga ne želite nadograđivati ovdje.';
+$lang['install_url'] = 'Ugradi s URL-a:';
+$lang['install_upload'] = 'Učitaj proširenje:';
+$lang['repo_error'] = 'Repozitorij dodataka nije dostupan. Budite sigurni da server može pristupiti www.dokuwiki.org i provjerite proxy postavke.';
diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php
index 7dff6c5b2..1aa658e0f 100644
--- a/lib/plugins/extension/lang/it/lang.php
+++ b/lib/plugins/extension/lang/it/lang.php
@@ -5,11 +5,18 @@
*
* @author Francesco <francesco.cavalli@hotmail.com>
* @author Fabio <fabioslurp@yahoo.it>
+ * @author Torpedo <dgtorpedo@gmail.com>
*/
+$lang['unknownauthor'] = 'Autore sconosciuto';
+$lang['unknownversion'] = 'Revisione sconosciuta';
+$lang['btn_info'] = 'Mostra maggiori informazioni';
+$lang['btn_update'] = 'Aggiorna';
+$lang['btn_uninstall'] = 'Disinstalla';
$lang['btn_enable'] = 'Abilita';
$lang['btn_disable'] = 'Disabilita';
$lang['btn_install'] = 'Installa';
$lang['btn_reinstall'] = 'Reinstalla';
+$lang['js']['reallydel'] = 'Sicuro di disinstallare questa estensione?';
$lang['search'] = 'Cerca';
$lang['homepage_link'] = 'Documenti';
$lang['bugs_features'] = 'Bug';
@@ -18,13 +25,18 @@ $lang['author_hint'] = 'Cerca estensioni per questo autore';
$lang['installed'] = 'Installato:';
$lang['downloadurl'] = 'URL download:';
$lang['repository'] = 'Repository';
+$lang['unknown'] = '<em>sconosciuto</em>';
$lang['installed_version'] = 'Versione installata';
$lang['install_date'] = 'Il tuo ultimo aggiornamento:';
$lang['available_version'] = 'Versione disponibile:';
$lang['compatible'] = 'Compatibile con:';
+$lang['depends'] = 'Dipende da:';
$lang['similar'] = 'Simile a:';
+$lang['conflicts'] = 'Conflitto con:';
$lang['donate'] = 'Simile a questo?';
+$lang['donate_action'] = 'Paga un caffè all\'autore!';
$lang['repo_retry'] = 'Riprova';
+$lang['provides'] = 'Fornisce:';
$lang['status'] = 'Status:';
$lang['status_installed'] = 'installato';
$lang['status_not_installed'] = 'non installato';
@@ -34,6 +46,15 @@ $lang['status_disabled'] = 'disabilitato';
$lang['status_unmodifiable'] = 'inmodificabile';
$lang['status_plugin'] = 'plugin';
$lang['status_template'] = 'modello';
+$lang['msg_enabled'] = 'Plugin %s abilitato';
+$lang['msg_disabled'] = 'Plugin %s disabilitato';
+$lang['msg_delete_success'] = 'Estensione %s disinstallata';
+$lang['msg_plugin_install_success'] = 'Plugin %s installato con successo';
+$lang['msg_plugin_update_success'] = 'Plugin %s aggiornato con successo';
+$lang['msg_upload_failed'] = 'Caricamento del file fallito';
+$lang['missing_dependency'] = '<strong>Dipendenza mancante o disabilitata: </strong> %s';
+$lang['update_available'] = '<strong>Aggiornamento:</strong> Nuova versione %s disponibile.';
+$lang['wrong_folder'] = '<strong>Plugin non installato correttamente:</strong> rinomina la directory del plugin "%s" in "%s".';
$lang['error_badurl'] = 'URLs deve iniziare con http o https';
$lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download';
$lang['error_download'] = 'Impossibile scaricare il file: %s';
diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php
index dec46d629..ce6ed2b97 100644
--- a/lib/plugins/extension/lang/ja/lang.php
+++ b/lib/plugins/extension/lang/ja/lang.php
@@ -5,6 +5,7 @@
*
* @author Hideaki SAWADA <chuno@live.jp>
* @author PzF_X <jp_minecraft@yahoo.co.jp>
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
*/
$lang['menu'] = '拡張機能管理';
$lang['tab_plugins'] = 'インストール済プラグイン';
@@ -62,7 +63,8 @@ $lang['status_template'] = 'テンプレート';
$lang['status_bundled'] = '同梱';
$lang['msg_enabled'] = '%s プラグインを有効化しました。';
$lang['msg_disabled'] = '%s プラグインを無効化しました。';
-$lang['msg_delete_success'] = '拡張機能をアンインストールしました。';
+$lang['msg_delete_success'] = '拡張機能 %s をアンインストールしました。';
+$lang['msg_delete_failed'] = '拡張機能 %s のアンインストールに失敗しました。';
$lang['msg_template_install_success'] = '%s テンプレートをインストールできました。';
$lang['msg_template_update_success'] = '%s テンプレートを更新できました。';
$lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。';
@@ -84,6 +86,8 @@ $lang['noperms'] = '拡張機能ディレクトリが書き込み
$lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。';
$lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。';
$lang['git'] = 'この拡張機能は Git 経由でインストールされており、ここで更新すべきでないかもしれません。';
+$lang['auth'] = 'この認証プラグインは設定管理画面で無効化されています。';
$lang['install_url'] = 'URL からインストール:';
$lang['install_upload'] = '拡張機能をアップロード:';
$lang['repo_error'] = 'プラグインのリポジトリに接続できません。サーバーが www.dokuwiki.org に接続できることやプロキシの設定を確認して下さい。';
+$lang['nossl'] = 'PHP機能がSSLをサポートしていないため、拡張機能のダウンロードが正常に動作しません。';
diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php
index 53c9b4481..5dc5d8269 100644
--- a/lib/plugins/extension/lang/ko/lang.php
+++ b/lib/plugins/extension/lang/ko/lang.php
@@ -62,7 +62,8 @@ $lang['status_template'] = '템플릿';
$lang['status_bundled'] = '포함';
$lang['msg_enabled'] = '%s 플러그인이 활성화되었습니다';
$lang['msg_disabled'] = '%s 플러그인이 비활성화되었습니다';
-$lang['msg_delete_success'] = '확장 기능이 제거되었습니다';
+$lang['msg_delete_success'] = '%s 확장 기능이 제거되었습니다';
+$lang['msg_delete_failed'] = '%s 확장 기능 제거에 실패했습니다';
$lang['msg_template_install_success'] = '%s 템플릿을 성공적으로 설치했습니다';
$lang['msg_template_update_success'] = '%s 템플릿을 성공적으로 업데이트했습니다';
$lang['msg_plugin_install_success'] = '%s 플러그인을 성공적으로 설치했습니다';
@@ -79,11 +80,13 @@ $lang['error_dircreate'] = '다운로드를 받을 임시 폴더를 만들
$lang['error_download'] = '파일을 다운로드할 수 없습니다: %s';
$lang['error_decompress'] = '다운로드한 파일의 압축을 풀 수 없습니다. 이는 아마도 잘못된 다운로드의 결과로, 이럴 경우 다시 시도해야 합니다; 또는 압축 형식을 알 수 없으며, 이럴 경우 수동으로 다운로드하고 설치해야 합니다.';
$lang['error_findfolder'] = '확장 기능 디렉터리를 식별할 수 없습니다, 수동으로 다운로드하고 설치해야 합니다';
-$lang['error_copy'] = '<em>%s</em> 디렉터리에 파일을 설치하는 동안 파일 복사 오류가 발생했습니다: 디스크가 꽉 찼거나 파일 접근 권한이 잘못되었을 수도 있습니다. 플러그인 설치가 부분적으로 되었거나 불안정하게 위키 설치가 되었을 수 있습니다.';
+$lang['error_copy'] = '<em>%s</em> 디렉터리에 파일을 설치하는 동안 파일 복사 오류가 발생했습니다: 디스크가 꽉 찼거나 파일 접근 권한이 잘못되었을 수도 있습니다. 플러그인이 부분적으로 설치되어 위키가 불안정할지도 모릅니다';
$lang['noperms'] = '확장 기능 디렉터리에 쓸 수 없습니다';
$lang['notplperms'] = '임시 디렉터리에 쓸 수 없습니다';
$lang['nopluginperms'] = '플러그인 디렉터리에 쓸 수 없습니다';
-$lang['git'] = '이 확장 기능은 git을 통해 설치되었으며, 여기에서 업데이트할 수 없을 수 있습니다.';
+$lang['git'] = '이 확장 기능은 git를 통해 설치되었으며, 여기에서 업데이트할 수 없을 수 있습니다.';
+$lang['auth'] = '이 인증 플러그인은 환경 설정에서 활성화할 수 없습니다, 그것을 비활성화하는 것을 고려하세요.';
$lang['install_url'] = 'URL에서 설치:';
$lang['install_upload'] = '확장 기능 올리기:';
$lang['repo_error'] = '플러그인 저장소에 연결할 수 없습니다. 서버가 www.dokuwiki.org에 연결할 수 있는지 확인하고 프록시 설정을 확인하세요.';
+$lang['nossl'] = 'PHP가 SSL 지원을 하지 않는 것으로 보입니다. 많은 도쿠위키 확장 기능의 다운로드가 작동하지 않을 것입니다.';
diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php
index a54924e93..f75f78121 100644
--- a/lib/plugins/extension/lang/nl/lang.php
+++ b/lib/plugins/extension/lang/nl/lang.php
@@ -63,7 +63,7 @@ $lang['status_template'] = 'template';
$lang['status_bundled'] = 'Gebundeld';
$lang['msg_enabled'] = 'Plugin %s ingeschakeld';
$lang['msg_disabled'] = 'Plugin %s uitgeschakeld';
-$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd';
+$lang['msg_delete_success'] = 'Uitbreiding %s gedeinstalleerd';
$lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd';
$lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet';
$lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd';
diff --git a/lib/plugins/extension/lang/ru/intro_install.txt b/lib/plugins/extension/lang/ru/intro_install.txt
new file mode 100644
index 000000000..7b8ac661b
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/intro_install.txt
@@ -0,0 +1 @@
+Здесь вы можете самостоятельно установить плагины и шаблоны, загрузив их или предоставив прямой URL для скачивания. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ru/intro_plugins.txt b/lib/plugins/extension/lang/ru/intro_plugins.txt
new file mode 100644
index 000000000..7262516db
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/intro_plugins.txt
@@ -0,0 +1 @@
+Плагины, установленные в вашей DokuWiki. Здесь вы можете их включить или выключить, или даже полностью удалить. Также здесь показываются обновления плагинов, обязательно прочтите документацию плагина перед обновлением. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ru/intro_search.txt b/lib/plugins/extension/lang/ru/intro_search.txt
new file mode 100644
index 000000000..a8486eab6
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/intro_search.txt
@@ -0,0 +1 @@
+Эта вкладка дает вам доступ ко всем имеющимся сторонним плагинам и шаблонам для DokuWiki. Имейте в виду, что установка стороннего кода может представлять **угрозу безопасности**, возможно вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ru/intro_templates.txt b/lib/plugins/extension/lang/ru/intro_templates.txt
new file mode 100644
index 000000000..2d0b74256
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/intro_templates.txt
@@ -0,0 +1 @@
+Это шаблоны, установленные в вашей DokuWiki. Вы можете выбрать шаблон, который нужно использовать в [[?do=admin&page=config|Менеджере Конфигурации]] \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php
index fa1625f28..64db39b78 100644
--- a/lib/plugins/extension/lang/ru/lang.php
+++ b/lib/plugins/extension/lang/ru/lang.php
@@ -5,13 +5,19 @@
*
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
* @author Igor Degraf <igordegraf@gmail.com>
+ * @author Type-kun <workwork-1@yandex.ru>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
$lang['menu'] = 'Управление дополнениями';
$lang['tab_plugins'] = 'Установленные плагины';
$lang['tab_templates'] = 'Установленные шаблоны';
$lang['tab_search'] = 'Поиск и установка';
$lang['tab_install'] = 'Ручная установка';
+$lang['notimplemented'] = 'Эта возможность ещё не реализована';
$lang['notinstalled'] = 'Это дополнение не установлено';
+$lang['alreadyenabled'] = 'Это расширение уже включено';
+$lang['alreadydisabled'] = 'Это расширение уже выключено';
+$lang['pluginlistsaveerror'] = 'Ошибка при сохранении списка плагинов';
$lang['unknownauthor'] = 'Автор неизвестен';
$lang['unknownversion'] = 'Версия неизвестна';
$lang['btn_info'] = 'Отобразить доп. информацию';
@@ -25,8 +31,10 @@ $lang['js']['reallydel'] = 'Действительно удалить эт
$lang['search_for'] = 'Поиск дополнения:';
$lang['search'] = 'Найти';
$lang['extensionby'] = '<strong>%s</strong> — %s';
-$lang['popularity'] = 'Попоулярность: %s%%';
-$lang['bugs_features'] = 'Ошибки';
+$lang['screenshot'] = 'Скриншот: %s';
+$lang['popularity'] = 'Популярность: %s%%';
+$lang['homepage_link'] = 'Описание';
+$lang['bugs_features'] = 'Баг-трекер';
$lang['tags'] = 'Метки:';
$lang['author_hint'] = 'Найти дополнения этого автора';
$lang['installed'] = 'Установлено:';
@@ -43,26 +51,42 @@ $lang['conflicts'] = 'Конфликтует с:';
$lang['donate'] = 'Нравится?';
$lang['donate_action'] = 'Купить автору кофе!';
$lang['repo_retry'] = 'Повторить';
+$lang['provides'] = 'Предоставляет:';
+$lang['status'] = 'Статус:';
$lang['status_installed'] = 'установлено';
$lang['status_not_installed'] = 'не установлено';
$lang['status_protected'] = 'защищено';
-$lang['status_enabled'] = 'включен';
+$lang['status_enabled'] = 'включён';
$lang['status_disabled'] = 'отключено';
$lang['status_unmodifiable'] = 'неизменяемо';
$lang['status_plugin'] = 'плагин';
$lang['status_template'] = 'шаблон';
$lang['status_bundled'] = 'в комплекте';
-$lang['msg_enabled'] = 'Плагин %s включен';
-$lang['msg_disabled'] = 'Плагин %s отключен';
+$lang['msg_enabled'] = 'Плагин %s включён';
+$lang['msg_disabled'] = 'Плагин %s отключён';
$lang['msg_delete_success'] = 'Дополнение удалено';
+$lang['msg_delete_failed'] = 'Не удалось удалить расширение %s';
$lang['msg_template_install_success'] = 'Шаблон %s успешно установлен';
$lang['msg_template_update_success'] = 'Шаблон %s успешно обновлён';
$lang['msg_plugin_install_success'] = 'Плагин %s успешно установлен';
$lang['msg_plugin_update_success'] = 'Плагин %s успешно обновлён';
-$lang['noperms'] = 'Папка для расширений не доступна на запись';
-$lang['notplperms'] = 'Папка для шаблонов не доступна на запись';
-$lang['nopluginperms'] = 'Папка плагинов не доступна на запись';
-$lang['git'] = 'Это расширение было установлено через git, Вы не можете обновить его тут.';
+$lang['msg_upload_failed'] = 'Не удалось загрузить файл';
+$lang['missing_dependency'] = '<strong>Отсутствует или отключена зависимость:</strong> %s';
+$lang['security_issue'] = '<strong>Проблема безопасности:</strong> %s';
+$lang['security_warning'] = '<strong>Предупреждение безопасности:</strong> %s';
+$lang['update_available'] = '<strong>Обновление:</strong> доступна новая версия %s.';
+$lang['wrong_folder'] = '<strong>Плагин установлен неправильно:</strong> Переименуйте директорию "%s" в "%s".';
+$lang['url_change'] = '<strong>Ссылка изменилась:</strong> Ссылка для загрузки изменилась с прошлого раза. Проверьте новую ссылку прежде чем обновлять расширение.<br />Новая: %s<br />Старая: %s';
+$lang['error_badurl'] = 'Ссылки должны начинаться с http или https';
+$lang['error_dircreate'] = 'Не удалось создать временную директорию для загрузки';
+$lang['error_download'] = 'Не удалось загрузить файл: %s';
+$lang['error_decompress'] = 'Не удалось распаковать загруженный файл. Возможно, файл был повреждён при загрузке - тогда нужно попробовать ещё раз. Либо неизвестен формат архива - тогда загрузку и установку надо произвести вручную.';
+$lang['error_findfolder'] = 'Не удалось определить директорию для расширения, загрузку и установку надо произвести вручную.';
+$lang['error_copy'] = 'Возникла ошибка копирования файлов в директорию <em>%s</em>: возможно, диск переполнен, или неверно выставлены права доступа. Это могло привести к неполной установке плагина и нарушить работу вашей вики.';
+$lang['noperms'] = 'Папка для расширений недоступна для записи';
+$lang['notplperms'] = 'Папка для шаблонов недоступна для записи';
+$lang['nopluginperms'] = 'Папка плагинов недоступна для записи';
+$lang['git'] = 'Это расширение было установлено через git. Вы не можете обновить его тут.';
$lang['install_url'] = 'Установить с адреса URL:';
$lang['install_upload'] = 'Скачать расширение:';
-$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org и также проверьте настройки соединения прокси.';
+$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения с Интернетом.';
diff --git a/lib/plugins/extension/lang/zh-tw/intro_install.txt b/lib/plugins/extension/lang/zh-tw/intro_install.txt
new file mode 100644
index 000000000..3ba93f5f8
--- /dev/null
+++ b/lib/plugins/extension/lang/zh-tw/intro_install.txt
@@ -0,0 +1 @@
+在此你可以透過檔案上傳或提供下載網址的方式,進行手動安裝外掛與版型風格。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh-tw/intro_plugins.txt b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt
new file mode 100644
index 000000000..b5b77a267
--- /dev/null
+++ b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt
@@ -0,0 +1 @@
+已經有一些外掛套件被安裝在你的DokuWiki之中。你可以在這裡啟用、禁用,甚至是完全移除它們。如外掛可更新也同時會顯示在這裡,請確保在更新前先閱讀過該套件之文件。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh-tw/lang.php b/lib/plugins/extension/lang/zh-tw/lang.php
index 304aed5ee..79657ffeb 100644
--- a/lib/plugins/extension/lang/zh-tw/lang.php
+++ b/lib/plugins/extension/lang/zh-tw/lang.php
@@ -4,8 +4,77 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Stan <talktostan@gmail.com>
+ * @author June-Hao Hou <junehao@gmail.com>
+ * @author lioujheyu <lioujheyu@gmail.com>
*/
+$lang['menu'] = '延伸功能管理';
+$lang['tab_plugins'] = '已安裝外掛';
$lang['tab_templates'] = '已安裝裝模版
';
$lang['tab_search'] = '搜尋與安裝';
+$lang['tab_install'] = '手動安裝';
+$lang['notimplemented'] = '此功能尚未完成';
+$lang['notinstalled'] = '此延伸功能尚未安裝';
+$lang['alreadyenabled'] = '此延伸功能已經安裝';
+$lang['alreadydisabled'] = '此延伸功能停用';
+$lang['unknownauthor'] = '作者未知';
+$lang['unknownversion'] = '版本未知';
+$lang['btn_info'] = '顯示更多訊息';
$lang['btn_update'] = '更新';
+$lang['btn_uninstall'] = '移除安裝';
+$lang['btn_enable'] = '啟用';
+$lang['btn_disable'] = '停用';
+$lang['btn_install'] = '安裝';
+$lang['btn_reinstall'] = '重新安裝';
+$lang['js']['reallydel'] = '確定要移除此延伸功能?';
+$lang['search_for'] = '搜尋延伸功能:';
+$lang['search'] = '搜尋';
+$lang['homepage_link'] = '文件';
+$lang['tags'] = '標籤:';
+$lang['author_hint'] = '搜尋相同作者的延伸功能';
+$lang['installed'] = '已安裝:';
+$lang['downloadurl'] = '下載網址:';
+$lang['unknown'] = '<em>未知</em>';
+$lang['installed_version'] = '已安裝版本:';
+$lang['install_date'] = '你最後一次更新: ';
+$lang['available_version'] = '可用版本:';
+$lang['compatible'] = '相容於:';
+$lang['depends'] = '依賴於: ';
+$lang['similar'] = '類似於: ';
+$lang['conflicts'] = '相衝突於: ';
+$lang['donate'] = '像這樣?';
+$lang['donate_action'] = '請作者一杯咖啡!';
+$lang['repo_retry'] = '再試一次';
+$lang['status'] = '狀態:';
+$lang['status_installed'] = '已安裝';
+$lang['status_not_installed'] = '未安裝';
+$lang['status_protected'] = '已保護';
+$lang['status_enabled'] = '作用中';
+$lang['status_disabled'] = '停用中';
+$lang['status_unmodifiable'] = '不可更動';
+$lang['status_plugin'] = '外掛';
+$lang['status_template'] = '模板';
+$lang['status_bundled'] = '已綑綁內附';
+$lang['msg_enabled'] = '外掛 %s 已啟用';
+$lang['msg_disabled'] = '外掛 %s 已禁用';
+$lang['msg_delete_success'] = '附加元件已移除';
+$lang['msg_template_install_success'] = '模板 %s 以成功安裝';
+$lang['msg_template_update_success'] = '模板 %s 以成功更新';
+$lang['msg_plugin_install_success'] = '外掛 %s 以成功安裝';
+$lang['msg_plugin_update_success'] = '外掛 %s 以成功更新';
+$lang['msg_upload_failed'] = '上傳檔案失敗';
+$lang['missing_dependency'] = '<strong>遺失或禁用相依性套件:</strong> %s';
+$lang['security_issue'] = '<strong>安全性問題:</strong> %s';
+$lang['security_warning'] = '<strong>安全問題警告:</strong> %s';
+$lang['update_available'] = '<strong>更新:</strong> 已可取得 %s 的新版本';
+$lang['wrong_folder'] = '<strong>外掛安裝不正確:</strong> 將外掛資料夾從 "%s" 更名至 "%s"。';
+$lang['url_change'] = '<strong>網址已變更:</strong> 自從上次下載後下載網址已變更。在更新延伸功能前請先檢查新網址是否可用。<br />新: %s<br />舊: %s';
+$lang['error_download'] = '無法下載檔案:%s';
+$lang['error_decompress'] = '無法解壓縮檔案。這可能是下載品質不佳所致,在這個情況下你應該再試一次;也有可能是因為無法辨識的壓縮格式,在這個情況下你應該自行下載並手動安裝';
+$lang['error_findfolder'] = '無法辨認延伸功能資料夾,你必須自行下載並手動安裝';
+$lang['noperms'] = '延伸功能資料夾無法寫入';
+$lang['notplperms'] = '版型資料夾無法寫入';
+$lang['nopluginperms'] = '外掛資料夾無法寫入';
+$lang['git'] = '此延伸功能是透過git安裝的,最好不要用上傳方式。';
+$lang['install_url'] = '透過網址安裝:';
+$lang['install_upload'] = '上傳延伸功能:';
diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php
index 9265f44d5..773256faf 100644
--- a/lib/plugins/info/syntax.php
+++ b/lib/plugins/info/syntax.php
@@ -44,9 +44,14 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
$this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info');
}
-
/**
* Handle the match
+ *
+ * @param string $match The text matched by the patterns
+ * @param int $state The lexer state for the match
+ * @param int $pos The character position of the matched text
+ * @param Doku_Handler $handler The Doku_Handler object
+ * @return array Return an array with all data you want to use in render
*/
function handle($match, $state, $pos, Doku_Handler $handler){
$match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end
@@ -55,6 +60,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Create output
+ *
+ * @param string $format string output format being rendered
+ * @param Doku_Renderer $renderer the current renderer object
+ * @param array $data data created by handler()
+ * @return boolean rendered correctly?
*/
function render($format, Doku_Renderer $renderer, $data) {
if($format == 'xhtml'){
@@ -103,8 +113,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
* list all installed plugins
*
* uses some of the original renderer methods
+ *
+ * @param string $type
+ * @param Doku_Renderer_xhtml $renderer
*/
- function _plugins_xhtml($type, Doku_Renderer &$renderer){
+ function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){
global $lang;
$renderer->doc .= '<ul>';
@@ -114,7 +127,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
// remove subparts
foreach($plugins as $p){
if (!$po = plugin_load($type,$p)) continue;
- list($name,$part) = explode('_',$p,2);
+ list($name,/* $part */) = explode('_',$p,2);
$plginfo[$name] = $po->getInfo();
}
@@ -141,8 +154,10 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
* list all installed plugins
*
* uses some of the original renderer methods
+ *
+ * @param Doku_Renderer_xhtml $renderer
*/
- function _helpermethods_xhtml(Doku_Renderer &$renderer){
+ function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){
$plugins = plugin_list('helper');
foreach($plugins as $p){
if (!$po = plugin_load('helper',$p)) continue;
@@ -189,6 +204,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* lists all known syntax types and their registered modes
+ *
+ * @return string
*/
function _syntaxtypes_xhtml(){
global $PARSER_MODES;
@@ -211,6 +228,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* lists all known syntax modes and their sorting value
+ *
+ * @return string
*/
function _syntaxmodes_xhtml(){
$modes = p_get_parsermodes();
@@ -249,13 +268,18 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Adds a TOC item
+ *
+ * @param string $text
+ * @param int $level
+ * @param Doku_Renderer_xhtml $renderer
+ * @return string
*/
- function _addToTOC($text, $level, Doku_Renderer &$renderer){
+ protected function _addToTOC($text, $level, Doku_Renderer_xhtml $renderer){
global $conf;
+ $hid = '';
if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){
- /** @var $renderer Doku_Renderer_xhtml */
- $hid = $renderer->_headerToLink($text, 'true');
+ $hid = $renderer->_headerToLink($text, true);
$renderer->toc[] = array(
'hid' => $hid,
'title' => $text,
diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
index eacde06d0..b4fb33b90 100644
--- a/lib/plugins/popularity/helper.php
+++ b/lib/plugins/popularity/helper.php
@@ -74,6 +74,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
/**
* Check if autosubmit is enabled
+ *
* @return boolean TRUE if we should send data once a month, FALSE otherwise
*/
function isAutoSubmitEnabled(){
@@ -82,6 +83,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
/**
* Send the data, to the submit url
+ *
* @param string $data The popularity data
* @return string An empty string if everything worked fine, a string describing the error otherwise
*/
@@ -97,6 +99,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
/**
* Compute the last time the data was sent. If it has never been sent, we return 0.
+ *
+ * @return int
*/
function lastSentTime(){
$manualSubmission = @filemtime($this->popularityLastSubmitFile);
@@ -107,6 +111,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
/**
* Gather all information
+ *
* @return string The popularity data as a string
*/
function gatherAsString(){
@@ -124,6 +129,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
/**
* Gather all information
+ *
* @return array The popularity data as an array
*/
function _gather(){
@@ -288,17 +294,24 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
*
* @author <gilthans dot NO dot SPAM at gmail dot com>
* @link http://de3.php.net/manual/en/ini.core.php#79564
+ *
+ * @param string $v
+ * @return int|string
*/
function _to_byte($v){
$l = substr($v, -1);
$ret = substr($v, 0, -1);
switch(strtoupper($l)){
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'P':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'T':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'G':
$ret *= 1024;
+ /** @noinspection PhpMissingBreakStatementInspection */
case 'M':
$ret *= 1024;
case 'K':
diff --git a/lib/plugins/popularity/lang/eu/lang.php b/lib/plugins/popularity/lang/eu/lang.php
index b52ccaee1..b5b80357c 100644
--- a/lib/plugins/popularity/lang/eu/lang.php
+++ b/lib/plugins/popularity/lang/eu/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Basque language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
*/
diff --git a/lib/plugins/popularity/lang/hr/intro.txt b/lib/plugins/popularity/lang/hr/intro.txt
new file mode 100644
index 000000000..c7c3eba61
--- /dev/null
+++ b/lib/plugins/popularity/lang/hr/intro.txt
@@ -0,0 +1,7 @@
+====== Povratna informacija o popularnosti ======
+
+Ovaj [[doku>popularity|alat]] prikupla anonimne podatke o Vašem wiki i omogućava Vam da ih pošaljete DokuWiki razvojnom timu. To im pomaže da bolje razumiju kako korisnici koriste DokuWiki i osigurava kvalitetnije odluke o budućem razvoju u skladu s stvarnim korištenjem.
+
+Pozivamo Vas da ponavljate ovaj korak s vremena na vrijeme kako bi razvojni tim bio obaviješten o razvoju Vašeg wiki-a. Vaši novi podaci biti će identificirani putem anonimne oznake.
+
+Prikupljeni podatci sadrže informacije kako što je DokuWiki inačica, broj i veličina vaših stranica i datoteka, ugrađeni dodatci i PHP-u koji se koristi. Sirovi podatci koji će biti poslani su prikazani niže. Molim koristite gumb "Pošalji podatke" da bi ste poslali ove informacije.
diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php
new file mode 100644
index 000000000..a8ea70728
--- /dev/null
+++ b/lib/plugins/popularity/lang/hr/lang.php
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['name'] = 'Povratna informacija o popularnosti (može proteći neko vrijeme dok se učita)';
+$lang['submit'] = 'Pošalji podatke';
+$lang['autosubmit'] = 'Šalji podatke automatski jednom mjesečno';
+$lang['submissionFailed'] = 'Podatci ne mogu biti poslani zbog slijedeće greške:';
+$lang['submitDirectly'] = 'Podatke možete poslati ručno potvrđivanjem forme u nastavku.';
+$lang['autosubmitError'] = 'Zadnje automatsko slanje nije uspješno zbog slijedeće greške:';
+$lang['lastSent'] = 'Podatci su poslani';
diff --git a/lib/plugins/popularity/lang/hr/submitted.txt b/lib/plugins/popularity/lang/hr/submitted.txt
new file mode 100644
index 000000000..8c841b3df
--- /dev/null
+++ b/lib/plugins/popularity/lang/hr/submitted.txt
@@ -0,0 +1,3 @@
+====== Povratna informacija o popularnosti ======
+
+Podatci su uspješno poslani. \ No newline at end of file
diff --git a/lib/plugins/revert/lang/ar/lang.php b/lib/plugins/revert/lang/ar/lang.php
index 71f411c52..6262cc674 100644
--- a/lib/plugins/revert/lang/ar/lang.php
+++ b/lib/plugins/revert/lang/ar/lang.php
@@ -8,6 +8,7 @@
* @author uahello@gmail.com
* @author Ahmad Abd-Elghany <tolpa1@gmail.com>
* @author alhajr <alhajr300@gmail.com>
+ * @author Mohamed Belhsine <b.mohamed897@gmail.com>
*/
$lang['menu'] = 'مدير الاسترجاع';
$lang['filter'] = 'ابحث في الصفحات المتأذاة';
diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php
index e1b47bb8d..619a9d929 100644
--- a/lib/plugins/revert/lang/cs/lang.php
+++ b/lib/plugins/revert/lang/cs/lang.php
@@ -17,6 +17,8 @@
* @author Gerrit Uitslag <klapinklapin@gmail.com>
* @author Petr Klíma <qaxi@seznam.cz>
* @author Radovan Buroň <radovan@buron.cz>
+ * @author Viktor Zavadil <vzavadil@newps.cz>
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['menu'] = 'Obnova zaspamovaných stránek';
$lang['filter'] = 'Hledat zaspamované stránky';
diff --git a/lib/plugins/revert/lang/eu/lang.php b/lib/plugins/revert/lang/eu/lang.php
index d3532c070..40be3e382 100644
--- a/lib/plugins/revert/lang/eu/lang.php
+++ b/lib/plugins/revert/lang/eu/lang.php
@@ -1,9 +1,11 @@
<?php
+
/**
- * Basque language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
+ * @author Yadav Gowda <yadav.gowda@gmail.com>
*/
$lang['menu'] = 'Berrezartze Kudeatzailea';
$lang['filter'] = 'Bilatu spam duten orriak';
diff --git a/lib/plugins/revert/lang/hr/intro.txt b/lib/plugins/revert/lang/hr/intro.txt
new file mode 100644
index 000000000..5d7a52dfb
--- /dev/null
+++ b/lib/plugins/revert/lang/hr/intro.txt
@@ -0,0 +1,3 @@
+====== Pomoćnik za povrat ======
+
+Pomaže vam pri povratku u slučaju spam napada. Da bi ste našli listu stranica koje su onečišćene spam-om unesite tekst za potragu (npr. spam URL), te potvrdite da su nađene stranice zaista spam i vratite na prethodno stanje. \ No newline at end of file
diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php
new file mode 100644
index 000000000..594136902
--- /dev/null
+++ b/lib/plugins/revert/lang/hr/lang.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['menu'] = 'Pomoćnik za povrat stanja';
+$lang['filter'] = 'Potraži spam stranice';
+$lang['revert'] = 'Povrati odabrane stranice';
+$lang['reverted'] = '%s vraćena na izdanje %s';
+$lang['removed'] = '%s uklonjen';
+$lang['revstart'] = 'Proces povratka započeo. To može potrajati. Ako se dogodi istek vremena prije završetka, trebate povrat stranica vršiti u manjim grupama.';
+$lang['revstop'] = 'Proces povratka uspješno završio.';
+$lang['note1'] = 'Obavijest: ova pretraga razlikuje velika/mala slova';
+$lang['note2'] = 'Obavijest: stranica će biti vraćena na zadnje stanje koje ne sadrži traženi spam termin <i>%s</i>.';
diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php
index 5666100e9..df4b271b1 100644
--- a/lib/plugins/revert/lang/ko/lang.php
+++ b/lib/plugins/revert/lang/ko/lang.php
@@ -18,4 +18,4 @@ $lang['removed'] = '%s 제거됨';
$lang['revstart'] = '되돌리기 작업을 시작합니다. 오랜 시간이 걸릴 수 있습니다. 완료되기 전에 스크립트 시간 초과가 발생한다면 더 작은 작업으로 나누어서 되돌리시기 바랍니다.';
$lang['revstop'] = '되돌리기 작업이 성공적으로 끝났습니다.';
$lang['note1'] = '참고: 대소문자를 구별해 찾습니다';
-$lang['note2'] = '참고: 문서는 <i>%s</i> 스팸 단어를 포함하지 않은 최신 판으로 되돌립니다. ';
+$lang['note2'] = '참고: 문서는 <i>%s</i> 스팸 단어를 포함하지 않은 최신 판으로 되돌립니다.';
diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php
index 6806dcd93..76da8ca9c 100644
--- a/lib/plugins/revert/lang/no/lang.php
+++ b/lib/plugins/revert/lang/no/lang.php
@@ -19,6 +19,7 @@
* @author Thomas Juberg <Thomas.Juberg@Gmail.com>
* @author Boris <boris@newton-media.no>
* @author Christopher Schive <chschive@frisurf.no>
+ * @author Patrick <spill.p@hotmail.com>
*/
$lang['menu'] = 'Tilbakestillingsbehandler';
$lang['filter'] = 'Søk etter søppelmeldinger';
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 4a301f927..9e2913d78 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -52,6 +52,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* 'stack' - Special case. Plugin wraps other paragraphs.
*
* @see Doku_Handler_Block
+ *
* @return string
*/
function getPType(){
@@ -70,7 +71,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* @param int $state The lexer state for the match
* @param int $pos The character position of the matched text
* @param Doku_Handler $handler The Doku_Handler object
- * @return array Return an array with all data you want to use in render
+ * @return bool|array Return an array with all data you want to use in render, false don't add an instruction
*/
function handle($match, $state, $pos, Doku_Handler $handler){
trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
@@ -94,10 +95,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* The contents of the $data array depends on what the handler() function above
* created
*
- * @param $format string output format being rendered
- * @param $renderer Doku_Renderer the current renderer object
- * @param $data array data created by handler()
- * @return boolean rendered correctly?
+ * @param string $format output format being rendered
+ * @param Doku_Renderer $renderer the current renderer object
+ * @param array $data data created by handler()
+ * @return boolean rendered correctly? (however, returned value is not used at the moment)
*/
function render($format, Doku_Renderer $renderer, $data) {
trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING);
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index b67d91b36..86562f1dd 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -58,9 +58,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
}
- /**
- * Return prompt for admin menu
- */
+ /**
+ * Return prompt for admin menu
+ *
+ * @param string $language
+ * @return string
+ */
public function getMenuText($language) {
if (!is_null($this->_auth))
@@ -71,6 +74,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
/**
* return sort order for position in admin menu
+ *
+ * @return int
*/
public function getMenuSort() {
return 2;
@@ -78,6 +83,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
/**
* Handle user request
+ *
+ * @return bool
*/
public function handle() {
global $INPUT;
@@ -128,6 +135,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
/**
* Output appropriate html
+ *
+ * @return bool
*/
public function html() {
global $ID;
@@ -738,6 +747,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
global $auth;
global $INPUT;
+ $user = array();
$user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid');
$user[1] = $INPUT->str('userpass');
$user[2] = $INPUT->str('username');
@@ -764,7 +774,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_filter = array();
if ($op == 'new') {
- list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false);
+ list($user,/* $pass */,$name,$mail,$grps) = $this->_retrieveUser(false);
if (!empty($user)) $this->_filter['user'] = $user;
if (!empty($name)) $this->_filter['name'] = $name;
@@ -816,6 +826,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$disabled = 'disabled="disabled"';
+ $buttons = array();
$buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : '';
if ($this->_user_total == -1) {
@@ -937,8 +948,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
* Returns cleaned user data
*
* @param array $candidate raw values of line from input file
- * @param $error
- * @return array|bool cleaned data or false
+ * @param string $error
+ * @return array|false cleaned data or false
*/
protected function _cleanImportUser($candidate, & $error){
global $INPUT;
@@ -951,7 +962,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$INPUT->set('usergroups', $candidate[4]);
$cleaned = $this->_retrieveUser();
- list($user,$pass,$name,$mail,$grps) = $cleaned;
+ list($user,/* $pass */,$name,$mail,/* $grps */) = $cleaned;
if (empty($user)) {
$error = $this->lang['import_error_baduserid'];
return false;
@@ -1021,6 +1032,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
/**
* wrapper for is_uploaded_file to facilitate overriding by test suite
+ *
+ * @param string $file filename
+ * @return bool
*/
protected function _isUploadedFile($file) {
return is_uploaded_file($file);
@@ -1031,6 +1045,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
*
* @deprecated remove when dokuwiki php requirement increases to 5.3+
* also associated unit test & mock access method
+ *
+ * @param string $csv string to parse
+ * @return array
*/
protected function _getcsv($csv) {
return function_exists('str_getcsv') ? str_getcsv($csv) : $this->str_getcsv($csv);
@@ -1041,6 +1058,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
* loosely based on www.php.net/str_getcsv#88311
*
* @deprecated remove when dokuwiki php requirement increases to 5.3+
+ *
+ * @param string $str string to parse
+ * @return array
*/
protected function str_getcsv($str) {
$fp = fopen("php://temp/maxmemory:1048576", 'r+'); // 1MiB
diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php
index bbb560679..6130fccd8 100644
--- a/lib/plugins/usermanager/lang/cs/lang.php
+++ b/lib/plugins/usermanager/lang/cs/lang.php
@@ -15,6 +15,7 @@
* @author Jakub A. Těšínský (j@kub.cz)
* @author mkucera66@seznam.cz
* @author Zbyněk Křivka <krivka@fit.vutbr.cz>
+ * @author Jaroslav Lichtblau <jlichtblau@seznam.cz>
*/
$lang['menu'] = 'Správa uživatelů';
$lang['noauth'] = '(autentizace uživatelů není k dispozici)';
@@ -55,20 +56,23 @@ $lang['next'] = 'další';
$lang['last'] = 'poslední';
$lang['edit_usermissing'] = 'Vybraný uživatel nebyl nalezen, zadané uživatelského mohlo být smazáno nebo změněno.';
$lang['user_notify'] = 'Upozornit uživatele';
-$lang['note_notify'] = 'Maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.';
+$lang['note_notify'] = 'E-maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.';
$lang['note_group'] = 'Noví uživatelé budou přidáváni do této výchozí skupiny (%s), pokud pro ně není uvedena žádná skupina.';
$lang['note_pass'] = 'Heslo bude automaticky vygenerováno, pokud je pole ponecháno prázdné a je zapnuto upozornění uživatele.';
$lang['add_ok'] = 'Uživatel úspěšně vytvořen';
$lang['add_fail'] = 'Vytvoření uživatele selhalo';
-$lang['notify_ok'] = 'Odeslán mail s upozorněním';
-$lang['notify_fail'] = 'Mail s upozorněním nebylo možno odeslat';
+$lang['notify_ok'] = 'Odeslán e-mail s upozorněním';
+$lang['notify_fail'] = 'E-mail s upozorněním nebylo možno odeslat';
+$lang['import_userlistcsv'] = 'Seznam uživatelů (CSV):';
+$lang['import_header'] = 'Poslední selhání importu';
$lang['import_success_count'] = 'Import uživatelů: nalezeno %d uživatelů, %d úspěšně importováno.';
$lang['import_failure_count'] = 'Import uživatelů: %d selhalo. Seznam chybných je níže.';
$lang['import_error_fields'] = 'Nedostatek položek, nalezena/y %d, požadovány 4.';
$lang['import_error_baduserid'] = 'Chybí User-id';
$lang['import_error_badname'] = 'Špatné jméno';
-$lang['import_error_badmail'] = 'Špatná emailová adresa';
+$lang['import_error_badmail'] = 'Špatná e-mailová adresa';
$lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán nebo je prázdný.';
$lang['import_error_readfail'] = 'Import selhal. Nelze číst nahraný soubor.';
$lang['import_error_create'] = 'Nelze vytvořit uživatele';
-$lang['import_notify_fail'] = 'Importovanému uživateli %s s emailem %s nemohlo být zasláno upozornění.';
+$lang['import_notify_fail'] = 'Importovanému uživateli %s s e-mailem %s nemohlo být zasláno upozornění.';
+$lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CVS';
diff --git a/lib/plugins/usermanager/lang/da/import.txt b/lib/plugins/usermanager/lang/da/import.txt
new file mode 100644
index 000000000..8ff1946b8
--- /dev/null
+++ b/lib/plugins/usermanager/lang/da/import.txt
@@ -0,0 +1,9 @@
+===== Samling af Brugere Import =====
+
+Kræver en CSV-fil med brugere på mindst fire kolonner.
+Kolonnerne skal indeholde, i denne orden: bruger-id, fulde navn, email-adresse og grupper.
+CSV-felterne skal separeres af kommaer (,) og strengafgrænser med anførelsestegn (%%""%%). Backslash (\) kan benyttes som "escape character".
+For et eksempel på en brugbar fil, kan du prøve "Eksportér Brugere"-funktionen her over.
+Overlappende bruger-id'er bliver ignoreret.
+
+En adgangskode vil blive genereret og sendt til hver succesfuldt importeret bruger. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php
index 47d7efea2..795024f89 100644
--- a/lib/plugins/usermanager/lang/da/lang.php
+++ b/lib/plugins/usermanager/lang/da/lang.php
@@ -13,6 +13,7 @@
* @author Michael Pedersen subben@gmail.com
* @author Mikael Lyngvig <mikael@lyngvig.org>
* @author soer9648 <soer9648@eucl.dk>
+ * @author Søren Birk <soer9648@eucl.dk>
*/
$lang['menu'] = 'Brugerstyring';
$lang['noauth'] = '(Brugervalidering er ikke tilgængelig)';
@@ -72,3 +73,4 @@ $lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades e
$lang['import_error_readfail'] = 'Import Fejlet. Ikke muligt at læse uploadede fil.';
$lang['import_error_create'] = 'Ikke muligt at oprette brugeren';
$lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med emailen %s.';
+$lang['import_downloadfailures'] = 'Download Fejl som CSV til rettelser';
diff --git a/lib/plugins/usermanager/lang/eu/lang.php b/lib/plugins/usermanager/lang/eu/lang.php
index 5d3a01fc7..1fbe13739 100644
--- a/lib/plugins/usermanager/lang/eu/lang.php
+++ b/lib/plugins/usermanager/lang/eu/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Basque language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Inko Illarramendi <inko.i.a@gmail.com>
* @author Zigor Astarbe <astarbe@gmail.com>
*/
diff --git a/lib/plugins/usermanager/lang/fa/lang.php b/lib/plugins/usermanager/lang/fa/lang.php
index 68db206b9..bb2505a27 100644
--- a/lib/plugins/usermanager/lang/fa/lang.php
+++ b/lib/plugins/usermanager/lang/fa/lang.php
@@ -11,6 +11,7 @@
* @author Milad DZand <M.DastanZand@gmail.com>
* @author AmirH Hassaneini <mytechmix@gmail.com>
* @author Hamid <zarrabi@sharif.edu>
+ * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com>
*/
$lang['menu'] = 'مدیریت کاربر';
$lang['noauth'] = '(معتبرسازی کاربر ممکن نیست)';
@@ -33,6 +34,8 @@ $lang['search'] = 'جستجو';
$lang['search_prompt'] = 'انجام جستجو';
$lang['clear'] = 'بازنویسی فیلترهای جستجو';
$lang['filter'] = 'فیلتر';
+$lang['import'] = 'ورود کاربران جدید';
+$lang['error'] = 'متن خطا';
$lang['summary'] = 'نمایش کاربر %1$d-%2$d از %3$d. در کل %4$d کاربر.';
$lang['nonefound'] = 'هیچ کاربری یافت نشد. در کل %d کاربر.';
$lang['delete_ok'] = '%d کاربر حذف شد';
diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php
index de243133a..dba67fb61 100644
--- a/lib/plugins/usermanager/lang/fi/lang.php
+++ b/lib/plugins/usermanager/lang/fi/lang.php
@@ -7,6 +7,7 @@
* @author Otto Vainio <otto@valjakko.net>
* @author Teemu Mattila <ghcsystems@gmail.com>
* @author Sami Olmari <sami@olmari.fi>
+ * @author Jussi Takala <jussi.takala@live.fi>
*/
$lang['menu'] = 'Käyttäjähallinta';
$lang['noauth'] = '(autentikointi ei ole käytössä)';
@@ -29,6 +30,9 @@ $lang['search'] = 'Hae';
$lang['search_prompt'] = 'Tee haku';
$lang['clear'] = 'Tyhjennä hakusuodatin';
$lang['filter'] = 'Suodatin';
+$lang['import'] = 'Tuo uusia käyttäjiä';
+$lang['line'] = 'Rivi nro.';
+$lang['error'] = 'Vikailmoitus';
$lang['summary'] = 'Näytetään käyttäjät %1$d-%2$d / %3$d löytynyttä. %4$d käyttäjää yhteensä.';
$lang['nonefound'] = 'Ei löytynyt käyttäjiä. %d käyttäjää yhteensä.';
$lang['delete_ok'] = '%d käyttäjää poistettu';
@@ -49,3 +53,9 @@ $lang['add_ok'] = 'Käyttäjä lisätty onnistuneesti';
$lang['add_fail'] = 'Käyttäjän lisäys epäonnistui';
$lang['notify_ok'] = 'Ilmoitus sähköpostilla lähetetty';
$lang['notify_fail'] = 'Ilmoitusta sähköpostilla ei voitu lähettää';
+$lang['import_error_baduserid'] = 'Käyttäjätunnus puuttuu';
+$lang['import_error_badname'] = 'Epäkelpo nimi';
+$lang['import_error_badmail'] = 'Epäkelpo sähköpostiosoite';
+$lang['import_error_upload'] = 'Tuonti epäonnistui. CSV-tiedostoa ei voitu ladata tai se on tyhjä.';
+$lang['import_error_readfail'] = 'Tuonti epäonnistui. Ladattua tiedostoa ei voida lukea.';
+$lang['import_error_create'] = 'Käyttäjää ei voida luoda.';
diff --git a/lib/plugins/usermanager/lang/hr/add.txt b/lib/plugins/usermanager/lang/hr/add.txt
new file mode 100644
index 000000000..f7c866495
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/add.txt
@@ -0,0 +1 @@
+===== Dodaj korisnika =====
diff --git a/lib/plugins/usermanager/lang/hr/delete.txt b/lib/plugins/usermanager/lang/hr/delete.txt
new file mode 100644
index 000000000..072185fc1
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/delete.txt
@@ -0,0 +1 @@
+===== Ukloni korisnika =====
diff --git a/lib/plugins/usermanager/lang/hr/edit.txt b/lib/plugins/usermanager/lang/hr/edit.txt
new file mode 100644
index 000000000..752fd81f3
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/edit.txt
@@ -0,0 +1 @@
+===== Uredi korisnika =====
diff --git a/lib/plugins/usermanager/lang/hr/import.txt b/lib/plugins/usermanager/lang/hr/import.txt
new file mode 100644
index 000000000..85ea92723
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/import.txt
@@ -0,0 +1,9 @@
+===== Masovni unos korisnika =====
+
+Zahtjeva CSV datoteku popisa korisnika s minimalno četiri kolone.
+Kolone moraju sadržavati redom: korisničko ime, puno ime, adresu e-pošte i grupe.
+Polja trebaju biti odvojena zarezom (,) a znakovni nizovi s dvostrukim navodnicima (%%""%%). Obrnuta kosa crta (\) koristi se za specijalne kodove (escaping).
+Koristite "Izvoz korisnika" funkciju da bi ste dobili primjer odgovarajuće datoteke.
+Duplikati korisničkih imena biti će ignorirani.
+
+Uspješno kreiranim korisnicima lozinka će biti generirana i poslana e-poštom. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/hr/intro.txt b/lib/plugins/usermanager/lang/hr/intro.txt
new file mode 100644
index 000000000..0f156579b
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/intro.txt
@@ -0,0 +1 @@
+====== Upravitelj korisnicima ====== \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php
new file mode 100644
index 000000000..a71afb60a
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/lang.php
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['menu'] = 'Upravitelj korisnicima';
+$lang['noauth'] = '(korisnička prijava nije dostupna)';
+$lang['nosupport'] = '(upravljanje korisnikom nije podržano)';
+$lang['badauth'] = 'pogrešan mehanizam prijave';
+$lang['user_id'] = 'Korisnik';
+$lang['user_pass'] = 'Lozinka';
+$lang['user_name'] = 'Stvarno ime';
+$lang['user_mail'] = 'E-pošta';
+$lang['user_groups'] = 'Grupe';
+$lang['field'] = 'Polje';
+$lang['value'] = 'Vrijednost';
+$lang['add'] = 'Dodaj';
+$lang['delete'] = 'Obriši';
+$lang['delete_selected'] = 'Obriši odabrano';
+$lang['edit'] = 'Uredi';
+$lang['edit_prompt'] = 'Uredi ovog korisnika';
+$lang['modify'] = 'Snimi promjene';
+$lang['search'] = 'Potraži';
+$lang['search_prompt'] = 'Izvedi potragu';
+$lang['clear'] = 'Obriši filtar potrage';
+$lang['filter'] = 'Filtar';
+$lang['export_all'] = 'Izvezi sve korisnike (CSV)';
+$lang['export_filtered'] = 'Izvezi filtriranu listu korisnika (CSV)';
+$lang['import'] = 'Unos novih korisnika';
+$lang['line'] = 'Linija br.';
+$lang['error'] = 'Poruka o grešci';
+$lang['summary'] = 'Prikaz korisnika %1$d-%2$d od %3$d nađenih. Ukupno %4$d korisnika.';
+$lang['nonefound'] = 'Nema korisnika koji odgovaraju filtru.Ukupno %d korisnika.';
+$lang['delete_ok'] = '%d korisnika obrisano';
+$lang['delete_fail'] = '%d neuspjelih brisanja.';
+$lang['update_ok'] = 'Korisnik uspješno izmijenjen';
+$lang['update_fail'] = 'Neuspjela izmjena korisnika';
+$lang['update_exists'] = 'Promjena korisničkog imena neuspješna, traženo ime (%s) već postoji (ostale izmjene biti će primijenjene).';
+$lang['start'] = 'početni';
+$lang['prev'] = 'prethodni';
+$lang['next'] = 'slijedeći';
+$lang['last'] = 'zadnji';
+$lang['edit_usermissing'] = 'Odabrani korisnik nije nađen, traženo korisničko ime vjerojatno je obrisano i promijenjeno negdje drugdje.';
+$lang['user_notify'] = 'Obavijesti korisnika';
+$lang['note_notify'] = 'Obavijest korisniku biti će poslana samo ako je upisana nova lozinka.';
+$lang['note_group'] = 'Novi korisnik biti će dodijeljen u podrazumijevanu grupu (%s) ako grupa nije specificirana.';
+$lang['note_pass'] = 'Lozinka će biti generirana ako se polje ostavi prazno i obavješćivanje korisnika je omogućeno.';
+$lang['add_ok'] = 'Korisnik uspješno dodan';
+$lang['add_fail'] = 'Neuspješno dodavanje korisnika';
+$lang['notify_ok'] = 'Poslana obavijest korisniku';
+$lang['notify_fail'] = 'Obavijest korisniku ne može biti poslana';
+$lang['import_userlistcsv'] = 'Datoteka s popisom korisnika (CSV):';
+$lang['import_header'] = 'Zadnje greške pri uvozu';
+$lang['import_success_count'] = 'Uvoz korisnika: %d korisnika nađeno, %d uspješno uvezeno';
+$lang['import_failure_count'] = 'Uvoz korisnika: %d neuspješno. Greške su navedene niže.';
+$lang['import_error_fields'] = 'Nedovoljan broj polja, nađeno %d, potrebno 4.';
+$lang['import_error_baduserid'] = 'Nedostaje korisničko ime';
+$lang['import_error_badname'] = 'Krivo ime';
+$lang['import_error_badmail'] = 'Kriva adresa e-pošte';
+$lang['import_error_upload'] = 'Uvoz neuspješan. CSV datoteka ne može biti učitana ili je prazna.';
+$lang['import_error_readfail'] = 'Uvoz neuspješan. Ne mogu pročitati učitanu datoteku.';
+$lang['import_error_create'] = 'Ne mogu kreirati korisnika';
+$lang['import_notify_fail'] = 'Obavijest uvezenom korisniku %s nije moguće poslati na adresu e-pošte %s.';
+$lang['import_downloadfailures'] = 'Preuzmi greške kao CSV za ispravak';
diff --git a/lib/plugins/usermanager/lang/hr/list.txt b/lib/plugins/usermanager/lang/hr/list.txt
new file mode 100644
index 000000000..50b1d2513
--- /dev/null
+++ b/lib/plugins/usermanager/lang/hr/list.txt
@@ -0,0 +1 @@
+===== Lista korisnika ===== \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php
index 70e3d94f0..bc76470e8 100644
--- a/lib/plugins/usermanager/lang/ko/lang.php
+++ b/lib/plugins/usermanager/lang/ko/lang.php
@@ -13,7 +13,7 @@
* @author Garam <rowain8@gmail.com>
*/
$lang['menu'] = '사용자 관리자';
-$lang['noauth'] = '(사용자 인증이 불가능합니다)';
+$lang['noauth'] = '(사용자 인증을 사용할 수 없습니다)';
$lang['nosupport'] = '(사용자 관리가 지원되지 않습니다)';
$lang['badauth'] = '인증 메커니즘이 잘못되었습니다';
$lang['user_id'] = '사용자';
@@ -35,10 +35,10 @@ $lang['clear'] = '검색 필터 재설정';
$lang['filter'] = '필터';
$lang['export_all'] = '모든 사용자 목록 내보내기 (CSV)';
$lang['export_filtered'] = '필터된 사용자 목록 내보내기 (CSV)';
-$lang['import'] = '새 사용자 목록 가져오기';
+$lang['import'] = '새 사용자 가져오기';
$lang['line'] = '줄 번호';
$lang['error'] = '오류 메시지';
-$lang['summary'] = '찾은 사용자 %3$d 중 %1$d-%2$d을(를) 봅니다. 전체 사용자는 %4$d명입니다.';
+$lang['summary'] = '찾은 사용자 %3$d명 중 %1$d-%2$d을(를) 봅니다. 전체 사용자는 %4$d명입니다.';
$lang['nonefound'] = '찾은 사용자가 없습니다. 전체 사용자는 %d명입니다.';
$lang['delete_ok'] = '사용자 %d명이 삭제되었습니다';
$lang['delete_fail'] = '사용자 %d명을 삭제하는 데 실패했습니다.';
@@ -68,6 +68,6 @@ $lang['import_error_badname'] = '잘못된 이름';
$lang['import_error_badmail'] = '잘못된 이메일 주소';
$lang['import_error_upload'] = '가져오기를 실패했습니다. csv 파일을 올릴 수 없거나 비어 있습니다.';
$lang['import_error_readfail'] = '가져오기를 실패했습니다. 올린 파일을 읽을 수 없습니다.';
-$lang['import_error_create'] = '사용자를 만들 수 없습니다.';
+$lang['import_error_create'] = '사용자를 만들 수 없습니다';
$lang['import_notify_fail'] = '알림 메시지를 가져온 %s (이메일: %s) 사용자에게 보낼 수 없습니다.';
$lang['import_downloadfailures'] = '교정을 위한 CSV로 다운로드 실패';
diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt
index f2049dd0c..c92e47b4c 100644
--- a/lib/plugins/usermanager/lang/ru/import.txt
+++ b/lib/plugins/usermanager/lang/ru/import.txt
@@ -3,7 +3,6 @@
Потребуется список пользователей в файле формата CSV, состоящий из 4 столбцов.
Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы.
Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш используется как прерывание.
-В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей».
-Повторяющиеся идентификаторы user-id будут игнорироваться.
+В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». Повторяющиеся идентификаторы user-id будут игнорироваться.
Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php
index 8bbfa639c..0914d7b49 100644
--- a/lib/plugins/usermanager/lang/ru/lang.php
+++ b/lib/plugins/usermanager/lang/ru/lang.php
@@ -21,6 +21,7 @@
* @author Pavel <ivanovtsk@mail.ru>
* @author Aleksandr Selivanov <alexgearbox@yandex.ru>
* @author Igor Degraf <igordegraf@gmail.com>
+ * @author Vitaly Filatenko <kot@hacktest.net>
*/
$lang['menu'] = 'Управление пользователями';
$lang['noauth'] = '(авторизация пользователей недоступна)';
@@ -68,6 +69,8 @@ $lang['add_ok'] = 'Пользователь успешно доб
$lang['add_fail'] = 'Не удалось добавить пользователя';
$lang['notify_ok'] = 'Письмо с уведомлением отправлено';
$lang['notify_fail'] = 'Не удалось отправить письмо с уведомлением';
+$lang['import_userlistcsv'] = 'Файл со списком пользователей (CSV):';
+$lang['import_header'] = 'Последний импорт - список ошибок';
$lang['import_success_count'] = 'Импорт пользователей: %d пользователей найдено, %d импортировано успешно.';
$lang['import_failure_count'] = 'Импорт пользователей: %d не удалось. Список ошибок прочтите ниже.';
$lang['import_error_fields'] = 'Не все поля заполнены. Найдено %d, а нужно 4.';
@@ -78,4 +81,4 @@ $lang['import_error_upload'] = 'Импорт не удался. CSV-файл
$lang['import_error_readfail'] = 'Импорт не удался. Невозможно прочесть загруженный файл.';
$lang['import_error_create'] = 'Невозможно создать пользователя';
$lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по электронной почте %s.';
-$lang['import_downloadfailures'] = 'Скачать Ошибки в формате CSV для исправления';
+$lang['import_downloadfailures'] = 'Скачать ошибки в формате CSV для исправления';
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index 6b46add07..fb61f6e48 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -56,6 +56,8 @@ var dw_behaviour = {
jQuery(document).on('click','#page__revisions input[type=checkbox]',
dw_behaviour.revisionBoxHandler
);
+
+ jQuery('.bounce').effect('bounce', {times:10}, 2000 );
},
/**
@@ -64,7 +66,14 @@ var dw_behaviour = {
scrollToMarker: function(){
var $obj = jQuery('#scroll__here');
if($obj.length) {
- $obj[0].scrollIntoView();
+ if($obj.offset().top != 0) {
+ jQuery('html, body').animate({
+ scrollTop: $obj.offset().top - 100
+ }, 500);
+ } else {
+ // hidden object have no offset but can still be scrolled into view
+ $obj[0].scrollIntoView();
+ }
}
},
@@ -77,13 +86,11 @@ var dw_behaviour = {
/**
* Remove all search highlighting when clicking on a highlighted term
- *
- * @FIXME would be nice to have it fade out
*/
removeHighlightOnClick: function(){
jQuery('span.search_hit').click(
function(e){
- jQuery(e.target).removeClass('search_hit');
+ jQuery(e.target).removeClass('search_hit', 1000);
}
);
},
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index 8fe2c88a2..d4f9c39d1 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -49,7 +49,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
if($ERROR):
echo '<h1>'.$ERROR.'</h1>';
else: ?>
-
+ <?php if($REV) echo p_locale_xhtml('showrev');?>
<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
<?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
@@ -82,8 +82,8 @@ header('X-UA-Compatible: IE=edge,chrome=1');
$data = array(
'view' => 'detail',
'items' => array(
- 'mediaManager' => tpl_action('mediaManager', 1, 'li', 1, '<span>', '</span>'),
- 'img_backto' => tpl_action('img_backto', 1, 'li', 1, '<span>', '</span>'),
+ 'mediaManager' => tpl_action('mediaManager', true, 'li', true, '<span>', '</span>'),
+ 'img_backto' => tpl_action('img_backto', true, 'li', true, '<span>', '</span>'),
)
);
diff --git a/lib/tpl/dokuwiki/images/pagetools-build.php b/lib/tpl/dokuwiki/images/pagetools-build.php
index 1b7262ad5..3cf35b2ea 100644
--- a/lib/tpl/dokuwiki/images/pagetools-build.php
+++ b/lib/tpl/dokuwiki/images/pagetools-build.php
@@ -92,7 +92,7 @@ function hex2rgb($hex) {
/**
* Scale (darken/lighten) a given image
*
- * @param ressource $img The truetype GD image to work on
+ * @param resource $img The truetype GD image to work on
* @param float $scale Scale the colors by this value ( <1 darkens, >1 lightens)
*/
function imagecolorscale(&$img, $scale){
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 44fef81eb..10c0bf91e 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -41,7 +41,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<div class="content">
<?php tpl_flush() ?>
<?php tpl_includeFile('sidebarheader.html') ?>
- <?php tpl_include_page($conf['sidebar'], 1, 1) ?>
+ <?php tpl_include_page($conf['sidebar'], true, true) ?>
<?php tpl_includeFile('sidebarfooter.html') ?>
</div>
</div></div><!-- /aside -->
@@ -77,12 +77,12 @@ $showSidebar = $hasSidebar && ($ACT=='show');
$data = array(
'view' => 'main',
'items' => array(
- 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'),
- 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'),
- 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'),
- 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'),
- 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'),
- 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>')
+ 'edit' => tpl_action('edit', true, 'li', true, '<span>', '</span>'),
+ 'revert' => tpl_action('revert', true, 'li', true, '<span>', '</span>'),
+ 'revisions' => tpl_action('revisions', true, 'li', true, '<span>', '</span>'),
+ 'backlink' => tpl_action('backlink', true, 'li', true, '<span>', '</span>'),
+ 'subscribe' => tpl_action('subscribe', true, 'li', true, '<span>', '</span>'),
+ 'top' => tpl_action('top', true, 'li', true, '<span>', '</span>')
)
);
diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php
index a2bfd4346..7d9c88347 100644
--- a/lib/tpl/dokuwiki/tpl_header.php
+++ b/lib/tpl/dokuwiki/tpl_header.php
@@ -46,10 +46,10 @@ if (!defined('DOKU_INC')) die();
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
- tpl_action('admin', 1, 'li');
- tpl_action('profile', 1, 'li');
- tpl_action('register', 1, 'li');
- tpl_action('login', 1, 'li');
+ tpl_action('admin', true, 'li');
+ tpl_action('profile', true, 'li');
+ tpl_action('register', true, 'li');
+ tpl_action('login', true, 'li');
?>
</ul>
</div>
@@ -64,9 +64,9 @@ if (!defined('DOKU_INC')) die();
</div>
<ul>
<?php
- tpl_action('recent', 1, 'li');
- tpl_action('media', 1, 'li');
- tpl_action('index', 1, 'li');
+ tpl_action('recent', true, 'li');
+ tpl_action('media', true, 'li');
+ tpl_action('index', true, 'li');
?>
</ul>
</div>