summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rw-r--r--.travis.yml2
-rw-r--r--README2
-rw-r--r--_test/core/DokuWikiTest.php3
-rw-r--r--_test/core/TestRequest.php9
-rw-r--r--_test/tests/inc/common_pageinfo.test.php8
-rw-r--r--_test/tests/inc/httpclient_http.test.php153
-rw-r--r--_test/tests/inc/httpclient_http_proxy.test.php5
-rw-r--r--_test/tests/inc/httpclient_https_proxy.test.php15
-rw-r--r--_test/tests/inc/httpclient_mock.php46
-rw-r--r--_test/tests/inc/mailer.test.php5
-rw-r--r--_test/tests/inc/parserutils_get_renderer.test.php83
-rw-r--r--_test/tests/inc/utf8_strtolower.test.php23
-rw-r--r--_test/tests/test/basic.test.php16
-rwxr-xr-xbin/gittool.php340
-rw-r--r--data/pages/wiki/dokuwiki.txt6
-rw-r--r--data/pages/wiki/syntax.txt29
-rw-r--r--feed.php19
-rw-r--r--inc/EmailAddressValidator.php20
-rw-r--r--inc/HTTPClient.php33
-rw-r--r--inc/Input.class.php18
-rw-r--r--inc/JpegMeta.php3
-rw-r--r--inc/Mailer.class.php29
-rw-r--r--inc/Sitemapper.php4
-rw-r--r--inc/actions.php31
-rw-r--r--inc/auth.php78
-rw-r--r--inc/cache.php100
-rw-r--r--inc/changelog.php8
-rw-r--r--inc/cliopts.php23
-rw-r--r--inc/common.php129
-rw-r--r--inc/confutils.php3
-rw-r--r--inc/events.php92
-rw-r--r--inc/feedcreator.class.php99
-rw-r--r--inc/fetch.functions.php2
-rw-r--r--inc/form.php22
-rw-r--r--inc/fulltext.php30
-rw-r--r--inc/html.php23
-rw-r--r--inc/httputils.php16
-rw-r--r--inc/indexer.php21
-rw-r--r--inc/infoutils.php23
-rw-r--r--inc/init.php38
-rw-r--r--inc/io.php2
-rw-r--r--inc/lang/bn/lang.php41
-rw-r--r--inc/lang/de/lang.php2
-rw-r--r--inc/lang/en/lang.php2
-rw-r--r--inc/lang/eo/admin.txt2
-rw-r--r--inc/lang/eo/adminplugins.txt2
-rw-r--r--inc/lang/eo/diff.txt2
-rw-r--r--inc/lang/eo/draft.txt2
-rw-r--r--inc/lang/eo/edit.txt2
-rw-r--r--inc/lang/eo/editrev.txt2
-rw-r--r--inc/lang/eo/lang.php11
-rw-r--r--inc/lang/es/lang.php1
-rw-r--r--inc/lang/et/adminplugins.txt1
-rw-r--r--inc/lang/et/lang.php113
-rw-r--r--inc/lang/et/resetpwd.txt3
-rw-r--r--inc/lang/et/subscr_digest.txt21
-rw-r--r--inc/lang/et/subscr_form.txt3
-rw-r--r--inc/lang/et/subscr_list.txt19
-rw-r--r--inc/lang/et/subscr_single.txt23
-rw-r--r--inc/lang/et/uploadmail.txt16
-rw-r--r--inc/lang/fr/denied.txt2
-rw-r--r--inc/lang/fr/lang.php9
-rw-r--r--inc/lang/hu-formal/admin.txt3
-rw-r--r--inc/lang/hu-formal/adminplugins.txt1
-rw-r--r--inc/lang/hu-formal/backlinks.txt3
-rw-r--r--inc/lang/hu-formal/conflict.txt5
-rw-r--r--inc/lang/hu-formal/denied.txt3
-rw-r--r--inc/lang/hu-formal/diff.txt3
-rw-r--r--inc/lang/hu-formal/draft.txt5
-rw-r--r--inc/lang/hu-formal/edit.txt1
-rw-r--r--inc/lang/hu-formal/editrev.txt2
-rw-r--r--inc/lang/hu-formal/index.txt3
-rw-r--r--inc/lang/hu-formal/lang.php27
-rw-r--r--inc/lang/hu/lang.php2
-rw-r--r--inc/lang/nl/lang.php1
-rw-r--r--inc/lang/ru/lang.php2
-rw-r--r--inc/lang/sl/lang.php3
-rw-r--r--inc/lang/sl/resetpwd.txt1
-rw-r--r--inc/lang/zh/lang.php2
-rw-r--r--inc/load.php6
-rw-r--r--inc/mail.php9
-rw-r--r--inc/media.php42
-rw-r--r--inc/pageutils.php29
-rw-r--r--inc/parser/code.php1
-rw-r--r--inc/parser/metadata.php4
-rw-r--r--inc/parser/renderer.php6
-rw-r--r--inc/parser/xhtml.php62
-rw-r--r--inc/parser/xhtmlsummary.php1
-rw-r--r--inc/parserutils.php54
-rw-r--r--inc/pluginutils.php2
-rw-r--r--inc/remote.php5
-rw-r--r--inc/search.php29
-rw-r--r--inc/subscription.php22
-rw-r--r--inc/template.php45
-rw-r--r--inc/toolbar.php6
-rw-r--r--lib/exe/ajax.php58
-rw-r--r--lib/exe/css.php1
-rw-r--r--lib/exe/fetch.php2
-rw-r--r--lib/exe/js.php6
-rw-r--r--lib/exe/mediamanager.php4
-rw-r--r--lib/plugins/acl/admin.php12
-rw-r--r--lib/plugins/acl/lang/et/lang.php7
-rw-r--r--lib/plugins/auth.php4
-rw-r--r--lib/plugins/authad/action.php91
-rw-r--r--lib/plugins/authad/auth.php31
-rw-r--r--lib/plugins/authad/lang/de/lang.php8
-rw-r--r--lib/plugins/authad/lang/en/lang.php10
-rw-r--r--lib/plugins/authad/lang/es/lang.php8
-rw-r--r--lib/plugins/authad/lang/es/settings.php2
-rw-r--r--lib/plugins/authad/lang/hu/settings.php6
-rw-r--r--lib/plugins/authad/lang/ko/lang.php10
-rw-r--r--lib/plugins/authad/lang/sl/settings.php8
-rw-r--r--lib/plugins/authad/plugin.info.txt2
-rw-r--r--lib/plugins/authldap/auth.php19
-rw-r--r--lib/plugins/authldap/lang/hu/settings.php7
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php5
-rw-r--r--lib/plugins/authldap/lang/sl/settings.php8
-rw-r--r--lib/plugins/authmysql/auth.php9
-rw-r--r--lib/plugins/authmysql/lang/hu/settings.php4
-rw-r--r--lib/plugins/authpgsql/auth.php6
-rw-r--r--lib/plugins/authpgsql/lang/ru/settings.php2
-rw-r--r--lib/plugins/authpgsql/lang/sl/settings.php9
-rw-r--r--lib/plugins/extension/action.php39
-rw-r--r--lib/plugins/extension/helper/list.php13
-rw-r--r--lib/plugins/extension/helper/repository.php10
-rw-r--r--lib/plugins/extension/lang/de/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/de/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/de/lang.php83
-rw-r--r--lib/plugins/extension/lang/eo/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/eo/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/eo/lang.php87
-rw-r--r--lib/plugins/extension/lang/fr/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/fr/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/fr/lang.php87
-rw-r--r--lib/plugins/extension/lang/ja/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/ja/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/ja/lang.php54
-rw-r--r--lib/plugins/extension/lang/nl/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_plugins.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/nl/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/nl/lang.php87
-rw-r--r--lib/plugins/extension/lang/ru/lang.php31
-rw-r--r--lib/plugins/extension/lang/sk/lang.php58
-rw-r--r--lib/plugins/extension/lang/zh/intro_install.txt1
-rw-r--r--lib/plugins/extension/lang/zh/intro_search.txt1
-rw-r--r--lib/plugins/extension/lang/zh/intro_templates.txt1
-rw-r--r--lib/plugins/extension/lang/zh/lang.php50
-rw-r--r--lib/plugins/extension/script.js50
-rw-r--r--lib/plugins/info/syntax.php4
-rw-r--r--lib/plugins/plugin/lang/cs/admin_plugin.txt3
-rw-r--r--lib/plugins/plugin/lang/cs/lang.php66
-rw-r--r--lib/plugins/plugin/lang/el/admin_plugin.txt5
-rw-r--r--lib/plugins/plugin/lang/el/lang.php58
-rw-r--r--lib/plugins/plugin/lang/fr/admin_plugin.txt4
-rw-r--r--lib/plugins/plugin/lang/fr/lang.php69
-rw-r--r--lib/plugins/plugin/lang/id/lang.php32
-rw-r--r--lib/plugins/plugin/lang/pl/admin_plugin.txt5
-rw-r--r--lib/plugins/plugin/lang/pl/lang.php63
-rw-r--r--lib/plugins/plugin/lang/sk/admin_plugin.txt4
-rw-r--r--lib/plugins/plugin/lang/sk/lang.php55
-rw-r--r--lib/plugins/plugin/lang/tr/admin_plugin.txt3
-rw-r--r--lib/plugins/plugin/lang/tr/lang.php55
-rw-r--r--lib/plugins/syntax.php8
-rw-r--r--lib/plugins/usermanager/admin.php79
-rw-r--r--lib/plugins/usermanager/lang/en/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/et/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/sl/lang.php8
-rw-r--r--lib/scripts/behaviour.js2
-rw-r--r--lib/scripts/edit.js5
-rw-r--r--lib/scripts/qsearch.js308
-rw-r--r--lib/scripts/toolbar.js6
-rw-r--r--lib/styles/geshi.less127
-rw-r--r--lib/styles/screen.css24
-rw-r--r--lib/tpl/dokuwiki/css/content.less22
-rw-r--r--lib/tpl/dokuwiki/css/design.less79
-rw-r--r--lib/tpl/dokuwiki/css/mobile.less21
-rw-r--r--lib/tpl/dokuwiki/main.php2
187 files changed, 3167 insertions, 1257 deletions
diff --git a/.gitignore b/.gitignore
index 64816ba38..bb39ba7cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
/conf/lang/*
/conf/plugin_lang/*
/conf/plugins.local.*
+/conf/tpl/*
.htaccess
*.swp
*.bak
@@ -26,25 +27,23 @@
/data/media_attic/*
/data/meta/*
/data/pages/*
+/data/tmp/*
!/data/pages/wiki/dokuwiki.txt
!/data/pages/wiki/syntax.txt
!/data/pages/wiki/welcome.txt
-/data/tmp/*
/lib/tpl/*
-!/lib/tpl/default
!/lib/tpl/dokuwiki
!/lib/tpl/index.php
/lib/plugins/*
+!/lib/plugins/acl
!/lib/plugins/authad
!/lib/plugins/authldap
!/lib/plugins/authmysql
!/lib/plugins/authpgsql
!/lib/plugins/authplain
-!/lib/plugins/acl
!/lib/plugins/config
!/lib/plugins/extension
!/lib/plugins/info
-!/lib/plugins/plugin
!/lib/plugins/popularity
!/lib/plugins/revert
!/lib/plugins/safefnrecode
@@ -52,5 +51,8 @@
!/lib/plugins/usermanager
!/lib/plugins/action.php
!/lib/plugins/admin.php
+!/lib/plugins/auth.php
!/lib/plugins/index.html
+!/lib/plugins/remote.php
!/lib/plugins/syntax.php
+lib/images/*/local/*
diff --git a/.travis.yml b/.travis.yml
index 79eea48b7..93867162c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,4 +9,4 @@ notifications:
- "chat.freenode.net#dokuwiki"
on_success: change
on_failure: change
-script: cd _test && phpunit --stderr
+script: cd _test && phpunit --verbose --stderr
diff --git a/README b/README
index 3b7cb8a9c..35de49ab1 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ at http://www.dokuwiki.org/
For Installation Instructions see
http://www.dokuwiki.org/install
-DokuWiki - 2004-2013 (c) Andreas Gohr <andi@splitbrain.org>
+DokuWiki - 2004-2014 (c) Andreas Gohr <andi@splitbrain.org>
and the DokuWiki Community
See COPYING and file headers for license info
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php
index 91eb5293b..f4521256a 100644
--- a/_test/core/DokuWikiTest.php
+++ b/_test/core/DokuWikiTest.php
@@ -115,5 +115,8 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
// reload language
$local = $conf['lang'];
trigger_event('INIT_LANG_LOAD', $local, 'init_lang', true);
+
+ global $INPUT;
+ $INPUT = new Input();
}
}
diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php
index 0a54910ed..060e37d28 100644
--- a/_test/core/TestRequest.php
+++ b/_test/core/TestRequest.php
@@ -44,13 +44,18 @@ class TestRequest {
* @return TestResponse the resulting output of the request
*/
public function execute($uri='/doku.php') {
+ global $INPUT;
+ global $ID;
+ global $INFO;
+
// save old environment
$server = $_SERVER;
$session = $_SESSION;
$get = $_GET;
$post = $_POST;
$request = $_REQUEST;
-
+ $input = $INPUT;
+
// prepare the right URI
$this->setUri($uri);
@@ -74,6 +79,7 @@ class TestRequest {
// now execute dokuwiki and grep the output
header_remove();
ob_start('ob_start_callback');
+ $INPUT = new Input();
include(DOKU_INC.$this->script);
ob_end_flush();
@@ -89,6 +95,7 @@ class TestRequest {
$_GET = $get;
$_POST = $post;
$_REQUEST = $request;
+ $INPUT = $input;
return $response;
}
diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php
index 0a1ea0a8f..2b230d9ce 100644
--- a/_test/tests/inc/common_pageinfo.test.php
+++ b/_test/tests/inc/common_pageinfo.test.php
@@ -38,6 +38,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['writable'] = true;
$info['editable'] = true;
$info['lastmod'] = false;
+ $info['currentrev'] = false;
$info['meta'] = array();
$info['ip'] = null;
$info['user'] = null;
@@ -77,6 +78,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$this->assertEquals($info, pageinfo());
@@ -101,6 +103,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['rev'] = '';
@@ -131,6 +134,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['namespace'] = 'wiki';
$info['meta'] = p_get_metadata($ID);
$info['rev'] = $REV;
+ $info['currentrev'] = $rev;
$info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz');
$this->assertEquals($info, pageinfo());
@@ -153,6 +157,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['namespace'] = 'wiki';
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
$info['filepath'] = $filename;
@@ -197,6 +202,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID); // need $INFO set correctly for addLogEntry()
global $INFO;
@@ -226,6 +232,7 @@ class common_pageinfo_test extends DokuWikiTest {
touch($filename,$now);
$info['lastmod'] = $now;
+ $info['currentrev'] = $now;
$info['meta']['last_change'] = false;
$info['ip'] = null;
$info['user'] = null;
@@ -251,6 +258,7 @@ class common_pageinfo_test extends DokuWikiTest {
$info['filepath'] = $filename;
$info['exists'] = true;
$info['lastmod'] = $rev;
+ $info['currentrev'] = $rev;
$info['meta'] = p_get_metadata($ID);
// setup a draft, make it more recent than the current page
diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php
index 43dd4478f..3446e1184 100644
--- a/_test/tests/inc/httpclient_http.test.php
+++ b/_test/tests/inc/httpclient_http.test.php
@@ -1,15 +1,22 @@
<?php
+require_once (__DIR__ . '/httpclient_mock.php');
+
class httpclient_http_test extends DokuWikiTest {
protected $server = 'http://httpbin.org';
+
/**
* @group internet
*/
function test_simpleget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/get?foo=bar');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('args',$resp);
@@ -20,9 +27,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_dget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->dget($this->server.'/get',array('foo'=>'bar'));
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('args',$resp);
@@ -33,9 +44,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_gzip(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/gzip');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('gzipped',$resp);
@@ -46,9 +61,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_simplepost(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->post($this->server.'/post',array('foo'=>'bar'));
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('form',$resp);
@@ -59,9 +78,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_redirect(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/redirect/3');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('url',$resp);
@@ -72,9 +95,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_relredirect(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/relative-redirect/3');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('url',$resp);
@@ -85,9 +112,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_redirectfail(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/redirect/5');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals('Maximum number of redirects exceeded',$http->error);
}
@@ -95,11 +126,19 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_cookies(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->get($this->server.'/cookies/set/foo/bar');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
$this->assertEquals(array('foo' => 'bar'), $http->cookies);
$data = $http->get($this->server.'/cookies');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('cookies',$resp);
@@ -110,9 +149,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_teapot(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/status/418');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(418,$http->status);
}
@@ -120,18 +163,26 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_maxbody(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->max_bodysize = 250;
// this should abort completely
$data = $http->get($this->server.'/stream/30');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
// this should read just the needed bytes
$http->max_bodysize_abort = false;
$http->keep_alive = false;
$data = $http->get($this->server.'/stream/30');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
/* should read no more than max_bodysize+1 */
$this->assertLessThanOrEqual(251,strlen($data));
}
@@ -140,24 +191,36 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_maxbodyok(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->max_bodysize = 500*1024;
$data = $http->get($this->server.'/stream/5');
- $this->assertTrue($data !== false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
$http->max_bodysize_abort = false;
$data = $http->get($this->server.'/stream/5');
- $this->assertTrue($data !== false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
}
/**
* @group internet
*/
function test_basicauth(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->user = 'user';
$http->pass = 'pass';
$data = $http->get($this->server.'/basic-auth/user/pass');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertEquals(array('authenticated'=>true,'user'=>'user'), $resp);
@@ -167,11 +230,15 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_basicauthfail(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->user = 'user';
$http->pass = 'invalid';
$data = $http->get($this->server.'/basic-auth/user/pass');
- $this->assertTrue($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(401,$http->status);
}
@@ -179,10 +246,10 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_timeout(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$http->timeout = 5;
$data = $http->get($this->server.'/delay/10');
- $this->assertTrue($data === false, 'HTTP response');
+ $this->assertTrue($data === false, 'HTTP response '.$http->error);
$this->assertEquals(-100,$http->status);
}
@@ -190,9 +257,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_headers(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get($this->server.'/response-headers?baz=&foo=bar');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$resp = json_decode($data, true);
$this->assertTrue(is_array($resp), 'JSON response');
$this->assertArrayHasKey('baz',$http->resp_headers);
@@ -204,9 +275,13 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_chunked(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get('http://whoopdedo.org/cgi-bin/chunked/2550');
- $this->assertFalse($data === false, 'HTTP response');
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertFalse($data === false, 'HTTP response '.$http->error);
$this->assertEquals(2550,strlen($data));
}
@@ -216,13 +291,17 @@ class httpclient_http_test extends DokuWikiTest {
* @group internet
*/
function test_wikimatrix(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
$data = $http->get('http://www.wikimatrix.org/cfeed/dokuwiki/-/-');
- $this->assertTrue($data !== false, $http->error);
+ if($http->noconnection()) {
+ $this->markTestSkipped('connection timed out');
+ return;
+ }
+ $this->assertTrue($data !== false, 'HTTP response '.$http->error);
}
function test_postencode(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
// check simple data
diff --git a/_test/tests/inc/httpclient_http_proxy.test.php b/_test/tests/inc/httpclient_http_proxy.test.php
index 4aa039fcc..c44dc7ed7 100644
--- a/_test/tests/inc/httpclient_http_proxy.test.php
+++ b/_test/tests/inc/httpclient_http_proxy.test.php
@@ -1,5 +1,7 @@
<?php
+require_once (__DIR__ . '/httpclient_mock.php');
+
class httpclient_http_proxy_test extends DokuWikiTest {
protected $url = 'http://test.dokuwiki.org/README';
@@ -7,7 +9,7 @@ class httpclient_http_proxy_test extends DokuWikiTest {
* @group internet
*/
function test_simpleget(){
- $http = new HTTPClient();
+ $http = new HTTPMockClient();
// proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org>
$http->proxy_host = 'proxy.andrwe.org';
$http->proxy_port = 8080;
@@ -16,5 +18,4 @@ class httpclient_http_proxy_test extends DokuWikiTest {
$this->assertFalse($data === false, 'HTTP response '.$http->error);
$this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content');
}
-
} \ No newline at end of file
diff --git a/_test/tests/inc/httpclient_https_proxy.test.php b/_test/tests/inc/httpclient_https_proxy.test.php
index aca3b3be2..9402e91af 100644
--- a/_test/tests/inc/httpclient_https_proxy.test.php
+++ b/_test/tests/inc/httpclient_https_proxy.test.php
@@ -12,4 +12,19 @@ class httpclient_https_proxy_test extends httpclient_http_proxy_test {
}
parent::setUp();
}
+
+ /**
+ * @group internet
+ */
+ function test_connectfail(){
+ $http = new HTTPMockClient();
+ // proxy provided by Andrwe Lord Weber <dokuwiki@andrwe.org>
+ $http->proxy_host = 'proxy.andrwe.org';
+ $http->proxy_port = 8080;
+
+ // the proxy accepts connections to dokuwiki.org only - the connect call should fail
+ $data = $http->get('https://www.google.com');
+ $this->assertFalse($data);
+ $this->assertEquals(-150, $http->status);
+ }
} \ No newline at end of file
diff --git a/_test/tests/inc/httpclient_mock.php b/_test/tests/inc/httpclient_mock.php
new file mode 100644
index 000000000..038045c8b
--- /dev/null
+++ b/_test/tests/inc/httpclient_mock.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Class HTTPMockClient
+ *
+ * Does not really mock the client, it still does real connections but will retry failed connections
+ * to work around shaky connectivity.
+ */
+class HTTPMockClient extends HTTPClient {
+ protected $tries;
+
+ /**
+ * Sets shorter timeout
+ */
+ function __construct() {
+ parent::__construct();
+ $this->timeout = 8; // slightly faster timeouts
+ }
+
+ /**
+ * Returns true if the connection timed out
+ *
+ * @return bool
+ */
+ function noconnection() {
+ return ($this->tries === 0);
+ }
+
+ /**
+ * Retries sending the request multiple times
+ *
+ * @param string $url
+ * @param string $data
+ * @param string $method
+ * @return bool
+ */
+ function sendRequest($url, $data = '', $method = 'GET') {
+ $this->tries = 2; // configures the number of retries
+ $return = false;
+ while($this->tries) {
+ $return = parent::sendRequest($url, $data, $method);
+ if($this->status != -100) break;
+ $this->tries--;
+ }
+ return $return;
+ }
+} \ No newline at end of file
diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php
index 4541d9906..50d282864 100644
--- a/_test/tests/inc/mailer.test.php
+++ b/_test/tests/inc/mailer.test.php
@@ -191,7 +191,10 @@ class mailer_test extends DokuWikiTest {
// ask message lint if it is okay
$html = new HTTPClient();
$results = $html->post('http://tools.ietf.org/tools/msglint/msglint', array('msg'=>$msg));
- $this->assertTrue($results !== false);
+ if($results === false) {
+ $this->markTestSkipped('no response from validator');
+ return;
+ }
// parse the result lines
$lines = explode("\n", $results);
diff --git a/_test/tests/inc/parserutils_get_renderer.test.php b/_test/tests/inc/parserutils_get_renderer.test.php
new file mode 100644
index 000000000..69aeb3b19
--- /dev/null
+++ b/_test/tests/inc/parserutils_get_renderer.test.php
@@ -0,0 +1,83 @@
+<?php
+
+class parserutils_get_renderer_test extends DokuWikiTest {
+
+ private $plugin_controller;
+
+ // test default behaviour / usual settings
+ function test_p_get_renderer_normal() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'xhtml';
+
+ $this->assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ }
+
+ // test get a renderer plugin
+ function test_p_get_renderer_plugin() {
+ global $conf;
+ global $plugin_controller;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'get_renderer_test';
+ $this->plugin_controller = $plugin_controller;
+ $plugin_controller = $this;
+
+ $this->assertInstanceOf('renderer_plugin_test', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ $plugin_controller = $this->plugin_controller;
+ }
+
+ // test fallback succeeds
+ function test_p_get_renderer_fallback() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_xhtml'] = 'badvalue';
+
+ $this->assertInstanceOf('Doku_Renderer_xhtml', p_get_renderer('xhtml'));
+
+ $conf = $old_conf;
+ }
+
+ // test fallback fails
+ /**
+ * @expectedException PHPUnit_Framework_Error
+ * @expectedExceptionCode E_USER_WARNING
+ */
+ function test_p_get_renderer_fallback_fail() {
+ global $conf;
+
+ $old_conf = $conf;
+ $conf['renderer_junk'] = 'badvalue';
+
+ $this->assertNull(p_get_renderer('junk'));
+
+ $conf = $old_conf;
+ }
+
+ // wrapper function for the fake plugin controller, return $this for the fake syntax of this test
+ function load($type,$name,$new=false,$disabled=false){
+ if ($name == 'get_renderer_test') {
+ return new renderer_plugin_test();
+ } else {
+ return $this->plugin_controller->load($type, $name, $new, $disabled);
+ }
+ }
+ }
+
+require_once DOKU_INC . 'inc/parser/xhtml.php';
+
+class renderer_plugin_test extends Doku_Renderer_xhtml {
+
+ function canRender($format) {
+ return ($format=='xhtml');
+ }
+
+}
+
+// vim:ts=4:sw=4:et:
diff --git a/_test/tests/inc/utf8_strtolower.test.php b/_test/tests/inc/utf8_strtolower.test.php
new file mode 100644
index 000000000..85f5b270b
--- /dev/null
+++ b/_test/tests/inc/utf8_strtolower.test.php
@@ -0,0 +1,23 @@
+<?php
+// use no mbstring help here
+if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1);
+
+class utf8_strtolower_test extends DokuWikiTest {
+
+ function test_givens(){
+ $data = array(
+ 'Αρχιτεκτονική Μελέτη' => 'αρχιτεκτονική μελέτη', // FS#2173
+ );
+
+ foreach($data as $input => $expected) {
+ $this->assertEquals($expected, utf8_strtolower($input));
+ }
+
+ // just make sure our data was correct
+ if(function_exists('mb_strtolower')) {
+ foreach($data as $input => $expected) {
+ $this->assertEquals($expected, mb_strtolower($input, 'utf-8'));
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php
index 86acef935..0639f0c5a 100644
--- a/_test/tests/test/basic.test.php
+++ b/_test/tests/test/basic.test.php
@@ -33,7 +33,7 @@ class InttestsBasicTest extends DokuWikiTest {
$response = $request->execute();
$this->assertTrue(
- strpos($response->getContent(), 'DokuWiki') >= 0,
+ strpos($response->getContent(), 'DokuWiki') !== false,
'DokuWiki was not a word in the output'
);
}
@@ -60,7 +60,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('wiki:dokuwiki', $request->getPost('id'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testPostGet() {
@@ -84,7 +84,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('wiki:dokuwiki', $request->getGet('id'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testGet() {
@@ -116,7 +116,7 @@ class InttestsBasicTest extends DokuWikiTest {
$this->assertEquals('bar', $request->getGet('test'));
// output check
- $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0);
+ $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') !== false);
}
function testScripts() {
@@ -168,5 +168,13 @@ class InttestsBasicTest extends DokuWikiTest {
$response = new TestResponse('',array_slice($this->some_headers,0,-2)); // slice off the last two headers to leave no status header
$this->assertNull($response->getStatusCode());
}
+
+ function testINPUT() {
+ $request = new TestRequest();
+ $response = $request->get(array('id' => 'mailinglist'), '/doku.php');
+
+ // output check
+ $this->assertTrue(strpos($response->getContent(), 'Netiquette') !== false);
+ }
}
diff --git a/bin/gittool.php b/bin/gittool.php
new file mode 100755
index 000000000..f9f68ac94
--- /dev/null
+++ b/bin/gittool.php
@@ -0,0 +1,340 @@
+#!/usr/bin/php
+<?php
+
+if('cli' != php_sapi_name()) die();
+ini_set('memory_limit', '128M');
+if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/');
+define('NOSESSION', 1);
+require_once(DOKU_INC.'inc/init.php');
+
+$GitToolCLI = new GitToolCLI();
+
+array_shift($argv);
+$command = array_shift($argv);
+
+switch($command) {
+ case '':
+ case 'help':
+ $GitToolCLI->cmd_help();
+ break;
+ case 'clone':
+ $GitToolCLI->cmd_clone($argv);
+ break;
+ case 'install':
+ $GitToolCLI->cmd_install($argv);
+ break;
+ case 'repo':
+ case 'repos':
+ $GitToolCLI->cmd_repos();
+ break;
+ default:
+ $GitToolCLI->cmd_git($command, $argv);
+}
+
+/**
+ * Easily manage DokuWiki git repositories
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+class GitToolCLI {
+ private $color = true;
+
+ public function cmd_help() {
+ echo <<<EOF
+Usage: gittool.php <command> [parameters]
+
+Manage git repositories for DokuWiki and its plugins and templates.
+
+EXAMPLE
+
+$> ./bin/gittool.php clone gallery template:ach
+$> ./bin/gittool.php repos
+$> ./bin/gittool.php origin -v
+
+COMMANDS
+
+help
+ This help screen
+
+clone <extensions>
+ Tries to install a known plugin or template (prefix with template:) via
+ git. Uses the DokuWiki.org plugin repository to find the proper git
+ repository. Multiple extensions can be given as parameters
+
+install <extensions>
+ The same as clone, but when no git source repository can be found, the
+ extension is installed via download
+
+repos
+ Lists all git repositories found in this DokuWiki installation
+
+<any>
+ Any unknown commands are assumed to be arguments to git and will be
+ executed in all repositories found within this DokuWiki installation
+
+EOF;
+ }
+
+ /**
+ * Tries to install the given extensions using git clone
+ *
+ * @param $extensions
+ */
+ public function cmd_clone($extensions) {
+ $errors = array();
+ $succeeded = array();
+
+ foreach($extensions as $ext) {
+ $repo = $this->getSourceRepo($ext);
+
+ if(!$repo) {
+ $this->msg_error("could not find a repository for $ext");
+ $errors[] = $ext;
+ } else {
+ if($this->cloneExtension($ext, $repo)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ }
+ }
+
+ echo "\n";
+ if($succeeded) $this->msg_success('successfully cloned the following extensions: '.join(', ', $succeeded));
+ if($errors) $this->msg_error('failed to clone the following extensions: '.join(', ', $errors));
+ }
+
+ /**
+ * Tries to install the given extensions using git clone with fallback to install
+ *
+ * @param $extensions
+ */
+ public function cmd_install($extensions) {
+ $errors = array();
+ $succeeded = array();
+
+ foreach($extensions as $ext) {
+ $repo = $this->getSourceRepo($ext);
+
+ if(!$repo) {
+ $this->msg_info("could not find a repository for $ext");
+ if($this->downloadExtension($ext)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ } else {
+ if($this->cloneExtension($ext, $repo)) {
+ $succeeded[] = $ext;
+ } else {
+ $errors[] = $ext;
+ }
+ }
+ }
+
+ echo "\n";
+ if($succeeded) $this->msg_success('successfully installed the following extensions: '.join(', ', $succeeded));
+ if($errors) $this->msg_error('failed to install the following extensions: '.join(', ', $errors));
+ }
+
+ /**
+ * Executes the given git command in every repository
+ *
+ * @param $cmd
+ * @param $arg
+ */
+ public function cmd_git($cmd, $arg) {
+ $repos = $this->findRepos();
+
+ $shell = array_merge(array('git', $cmd), $arg);
+ $shell = array_map('escapeshellarg', $shell);
+ $shell = join(' ', $shell);
+
+ foreach($repos as $repo) {
+ if(!@chdir($repo)) {
+ $this->msg_error("Could not change into $repo");
+ continue;
+ }
+
+ echo "\n";
+ $this->msg_info("executing $shell in $repo");
+ $ret = 0;
+ system($shell, $ret);
+
+ if($ret == 0) {
+ $this->msg_success("git succeeded in $repo");
+ } else {
+ $this->msg_error("git failed in $repo");
+ }
+ }
+ }
+
+ /**
+ * Simply lists the repositories
+ */
+ public function cmd_repos() {
+ $repos = $this->findRepos();
+ foreach($repos as $repo) {
+ echo "$repo\n";
+ }
+ }
+
+ /**
+ * Install extension from the given download URL
+ *
+ * @param string $ext
+ * @return bool
+ */
+ 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();
+ if(!$url) {
+ $this->msg_error("no download URL for $ext");
+ return false;
+ }
+
+ $ok = false;
+ try {
+ $this->msg_info("installing $ext via download from $url");
+ $ok = $plugin->installFromURL($url);
+ } catch(Exception $e) {
+ $this->msg_error($e->getMessage());
+ }
+
+ if($ok) {
+ $this->msg_success("installed $ext via download");
+ return true;
+ } else {
+ $this->msg_success("failed to install $ext via download");
+ return false;
+ }
+ }
+
+ /**
+ * Clones the extension from the given repository
+ *
+ * @param string $ext
+ * @param string $repo
+ * @return bool
+ */
+ private function cloneExtension($ext, $repo) {
+ if(substr($ext, 0, 9) == 'template:') {
+ $target = fullpath(tpl_incdir().'../'.substr($ext, 9));
+ } else {
+ $target = DOKU_PLUGIN.$ext;
+ }
+
+ $this->msg_info("cloning $ext from $repo to $target");
+ $ret = 0;
+ system("git clone $repo $target", $ret);
+ if($ret === 0) {
+ $this->msg_success("cloning of $ext succeeded");
+ return true;
+ } else {
+ $this->msg_error("cloning of $ext failed");
+ return false;
+ }
+ }
+
+ /**
+ * Returns all git repositories in this DokuWiki install
+ *
+ * Looks in root, template and plugin directories only.
+ *
+ * @return array
+ */
+ private function findRepos() {
+ $this->msg_info('Looking for .git directories');
+ $data = array_merge(
+ glob(DOKU_INC.'.git', GLOB_ONLYDIR),
+ glob(DOKU_PLUGIN.'*/.git', GLOB_ONLYDIR),
+ glob(fullpath(tpl_incdir().'../').'/*/.git', GLOB_ONLYDIR)
+ );
+
+ if(!$data) {
+ $this->msg_error('Found no .git directories');
+ } else {
+ $this->msg_success('Found '.count($data).' .git directories');
+ }
+ $data = array_map('fullpath', array_map('dirname', $data));
+ return $data;
+ }
+
+ /**
+ * Returns the repository for the given extension
+ *
+ * @param $extension
+ * @return bool|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();
+ if(!$repourl) return false;
+
+ // match github repos
+ if(preg_match('/github\.com\/([^\/]+)\/([^\/]+)/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ return 'https://github.com/'.$user.'/'.$repo.'.git';
+ }
+
+ // match gitorious repos
+ if(preg_match('/gitorious.org\/([^\/]+)\/([^\/]+)?/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ if(!$repo) $repo = $user;
+
+ return 'https://git.gitorious.org/'.$user.'/'.$repo.'.git';
+ }
+
+ // match bitbucket repos - most people seem to use mercurial there though
+ if(preg_match('/bitbucket\.org\/([^\/]+)\/([^\/]+)/i', $repourl, $m)) {
+ $user = $m[1];
+ $repo = $m[2];
+ return 'https://bitbucket.org/'.$user.'/'.$repo.'.git';
+ }
+
+ return false;
+ }
+
+ /**
+ * Print an error message
+ *
+ * @param $string
+ */
+ private function msg_error($string) {
+ if($this->color) echo "\033[31m"; // red
+ echo "E: $string\n";
+ if($this->color) echo "\033[37m"; // reset
+ }
+
+ /**
+ * Print a success message
+ *
+ * @param $string
+ */
+ private function msg_success($string) {
+ if($this->color) echo "\033[32m"; // green
+ echo "S: $string\n";
+ if($this->color) echo "\033[37m"; // reset
+ }
+
+ /**
+ * Print an info message
+ *
+ * @param $string
+ */
+ private function msg_info($string) {
+ if($this->color) echo "\033[36m"; // cyan
+ echo "I: $string\n";
+ if($this->color) echo "\033[37m"; // reset
+ }
+} \ No newline at end of file
diff --git a/data/pages/wiki/dokuwiki.txt b/data/pages/wiki/dokuwiki.txt
index 808aea68a..0e08fdcd3 100644
--- a/data/pages/wiki/dokuwiki.txt
+++ b/data/pages/wiki/dokuwiki.txt
@@ -6,7 +6,7 @@ Read the [[doku>manual|DokuWiki Manual]] to unleash the full power of DokuWiki.
===== Download =====
-DokuWiki is available at http://www.splitbrain.org/go/dokuwiki
+DokuWiki is available at http://download.dokuwiki.org/
===== Read More =====
@@ -24,7 +24,7 @@ All documentation and additional information besides the [[syntax|syntax descrip
**Installing DokuWiki**
* [[doku>requirements|System Requirements]]
- * [[http://www.splitbrain.org/go/dokuwiki|Download DokuWiki]] :!:
+ * [[http://download.dokuwiki.org/|Download DokuWiki]] :!:
* [[doku>changes|Change Log]]
* [[doku>Install|How to install or upgrade]] :!:
* [[doku>config|Configuration]]
@@ -50,7 +50,7 @@ All documentation and additional information besides the [[syntax|syntax descrip
* [[doku>mailinglist|Join the mailing list]]
* [[http://forum.dokuwiki.org|Check out the user forum]]
* [[doku>irc|Talk to other users in the IRC channel]]
- * [[http://bugs.splitbrain.org/index.php?project=1|Submit bugs and feature wishes]]
+ * [[https://github.com/splitbrain/dokuwiki/issues|Submit bugs and feature wishes]]
* [[http://www.wikimatrix.org/forum/viewforum.php?id=10|Share your experiences in the WikiMatrix forum]]
* [[doku>thanks|Some humble thanks]]
diff --git a/data/pages/wiki/syntax.txt b/data/pages/wiki/syntax.txt
index 02b49dc3d..86ad815e4 100644
--- a/data/pages/wiki/syntax.txt
+++ b/data/pages/wiki/syntax.txt
@@ -121,9 +121,9 @@ By using four or more dashes, you can make a horizontal line:
----
-===== Images and Other Files =====
+===== Media Files =====
-You can include external and internal [[doku>images]] with curly brackets. Optionally you can specify the size of them.
+You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.
Real size: {{wiki:dokuwiki-128.png}}
@@ -157,10 +157,31 @@ Of course, you can add a title (displayed as a tooltip by most browsers), too.
{{ wiki:dokuwiki-128.png |This is the caption}}
-If you specify a filename (external or internal) that is not an image (''gif, jpeg, png''), then it will be displayed as a link instead.
-
For linking an image to another page see [[#Image Links]] above.
+==== Supported Media Formats ====
+
+DokuWiki can embed the following media formats directly.
+
+| Image | ''gif'', ''jpg'', ''png'' |
+| Video | ''webm'', ''ogv'', ''mp4'' |
+| Audio | ''ogg'', ''mp3'', ''wav'' |
+| Flash | ''swf'' |
+
+If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
+
+==== Fallback Formats ====
+
+Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility.
+
+For example consider this embedded mp4 video:
+
+ {{video.mp4|A funny video}}
+
+When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser.
+
+Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work.
+
===== Lists =====
Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a ''*'' for unordered lists or a ''-'' for ordered ones.
diff --git a/feed.php b/feed.php
index bdce666d2..f97f98028 100644
--- a/feed.php
+++ b/feed.php
@@ -20,8 +20,7 @@ $opt = rss_parseOptions();
// the feed is dynamic - we need a cache for each combo
// (but most people just use the default feed so it's still effective)
-$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed');
-$key = join('', array_values($opt)).$_SERVER['REMOTE_USER'];
+$key = join('', array_values($opt)).'$'.$_SERVER['REMOTE_USER'].'$'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'];
$cache = new cache($key, '.feed');
// prepare cache depends
@@ -182,7 +181,7 @@ function rss_parseOptions() {
function rss_buildItems(&$rss, &$data, $opt) {
global $conf;
global $lang;
- /* @var auth_basic $auth */
+ /* @var DokuWiki_Auth_Plugin $auth */
global $auth;
$eventData = array(
@@ -299,12 +298,12 @@ function rss_buildItems(&$rss, &$data, $opt) {
$src_l = '';
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) {
- $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
- $src_r = ml($id, $more);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src_r = ml($id, $more, true, '&amp;', true);
}
if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) {
$more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1];
- $src_l = ml($id, $more);
+ $src_l = ml($id, $more, true, '&amp;', true);
}
$content = '';
if($src_r) {
@@ -347,8 +346,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'html':
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
- $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
- $src = ml($id, $more);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
@@ -378,8 +377,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
default:
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
- $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id));
- $src = ml($id, $more);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
diff --git a/inc/EmailAddressValidator.php b/inc/EmailAddressValidator.php
index bb4ef0ca9..fd6f3275b 100644
--- a/inc/EmailAddressValidator.php
+++ b/inc/EmailAddressValidator.php
@@ -15,8 +15,8 @@ class EmailAddressValidator {
/**
* Check email address validity
- * @param strEmailAddress Email address to be checked
- * @return True if email is valid, false if not
+ * @param string $strEmailAddress Email address to be checked
+ * @return bool True if email is valid, false if not
*/
public function check_email_address($strEmailAddress) {
@@ -82,8 +82,8 @@ class EmailAddressValidator {
/**
* Checks email section before "@" symbol for validity
- * @param strLocalPortion Text to be checked
- * @return True if local portion is valid, false if not
+ * @param string $strLocalPortion Text to be checked
+ * @return bool True if local portion is valid, false if not
*/
protected function check_local_portion($strLocalPortion) {
// Local portion can only be from 1 to 64 characters, inclusive.
@@ -113,8 +113,8 @@ class EmailAddressValidator {
/**
* Checks email section after "@" symbol for validity
- * @param strDomainPortion Text to be checked
- * @return True if domain portion is valid, false if not
+ * @param string $strDomainPortion Text to be checked
+ * @return bool True if domain portion is valid, false if not
*/
protected function check_domain_portion($strDomainPortion) {
// Total domain can only be from 1 to 255 characters, inclusive
@@ -172,10 +172,10 @@ class EmailAddressValidator {
/**
* Check given text length is between defined bounds
- * @param strText Text to be checked
- * @param intMinimum Minimum acceptable length
- * @param intMaximum Maximum acceptable length
- * @return True if string is within bounds (inclusive), false if not
+ * @param string $strText Text to be checked
+ * @param int $intMinimum Minimum acceptable length
+ * @param int $intMaximum Maximum acceptable length
+ * @return bool True if string is within bounds (inclusive), false if not
*/
protected function check_text_length($strText, $intMinimum, $intMaximum) {
// Minimum and maximum are both inclusive
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 96954fb47..53f3c9a78 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -254,7 +254,13 @@ class HTTPClient {
}
// add SSL stream prefix if needed - needs SSL support in PHP
- if($port == 443 || $this->proxy_ssl) $server = 'ssl://'.$server;
+ if($port == 443 || $this->proxy_ssl) {
+ if(!in_array('ssl', stream_get_transports())) {
+ $this->status = -200;
+ $this->error = 'This PHP version does not support SSL - cannot connect to server';
+ }
+ $server = 'ssl://'.$server;
+ }
// prepare headers
$headers = $this->headers;
@@ -304,11 +310,18 @@ class HTTPClient {
}
// try establish a CONNECT tunnel for SSL
- if($this->_ssltunnel($socket, $request_url)){
- // no keep alive for tunnels
- $this->keep_alive = false;
- // tunnel is authed already
- if(isset($headers['Proxy-Authentication'])) unset($headers['Proxy-Authentication']);
+ try {
+ if($this->_ssltunnel($socket, $request_url)){
+ // no keep alive for tunnels
+ $this->keep_alive = false;
+ // tunnel is authed already
+ if(isset($headers['Proxy-Authentication'])) unset($headers['Proxy-Authentication']);
+ }
+ } catch (HTTPClientException $e) {
+ $this->status = $e->getCode();
+ $this->error = $e->getMessage();
+ fclose($socket);
+ return false;
}
// keep alive?
@@ -363,7 +376,7 @@ class HTTPClient {
// get Status
if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m))
- throw new HTTPClientException('Server returned bad answer');
+ throw new HTTPClientException('Server returned bad answer '.$r_headers);
$this->status = $m[2];
@@ -526,6 +539,7 @@ class HTTPClient {
*
* @param resource &$socket
* @param string &$requesturl
+ * @throws HTTPClientException when a tunnel is needed but could not be established
* @return bool true if a tunnel was established
*/
function _ssltunnel(&$socket, &$requesturl){
@@ -538,7 +552,7 @@ class HTTPClient {
$request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL;
$request .= "Host: {$requestinfo['host']}".HTTP_NL;
if($this->proxy_user) {
- 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL;
+ $request .= 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL;
}
$request .= HTTP_NL;
@@ -559,7 +573,8 @@ class HTTPClient {
return true;
}
}
- return false;
+
+ throw new HTTPClientException('Failed to establish secure proxy connection', -150);
}
/**
diff --git a/inc/Input.class.php b/inc/Input.class.php
index 7434d2b2c..de8bf5b97 100644
--- a/inc/Input.class.php
+++ b/inc/Input.class.php
@@ -15,6 +15,8 @@ class Input {
public $post;
/** @var GetInput Access $_GET parameters */
public $get;
+ /** @var ServerInput Access $_SERVER parameters */
+ public $server;
protected $access;
@@ -25,6 +27,7 @@ class Input {
$this->access = &$_REQUEST;
$this->post = new PostInput();
$this->get = new GetInput();
+ $this->server = new ServerInput();
}
/**
@@ -260,3 +263,18 @@ class GetInput extends Input {
$_REQUEST[$name] = $value;
}
}
+
+/**
+ * Internal class used for $_SERVER access in Input class
+ */
+class ServerInput extends Input {
+ protected $access;
+
+ /**
+ * Initialize the $access array, remove subclass members
+ */
+ function __construct() {
+ $this->access = &$_SERVER;
+ }
+
+}
diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php
index cb1772736..a35ec3ed0 100644
--- a/inc/JpegMeta.php
+++ b/inc/JpegMeta.php
@@ -2929,7 +2929,8 @@ class JpegMeta {
$length = strlen($data) - $pos;
}
- return substr($data, $pos, $length);
+ $rv = substr($data, $pos, $length);
+ return $rv;
}
/*************************************************************/
diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php
index 2ac2c1d60..e90b45f99 100644
--- a/inc/Mailer.class.php
+++ b/inc/Mailer.class.php
@@ -39,6 +39,8 @@ class Mailer {
*/
public function __construct() {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
$server = parse_url(DOKU_URL, PHP_URL_HOST);
if(strpos($server,'.') === false) $server = $server.'.localhost';
@@ -53,7 +55,7 @@ class Mailer {
// add some default headers for mailfiltering FS#2247
$this->setHeader('X-Mailer', 'DokuWiki');
- $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']);
+ $this->setHeader('X-DokuWiki-User', $INPUT->server->str('REMOTE_USER'));
$this->setHeader('X-DokuWiki-Title', $conf['title']);
$this->setHeader('X-DokuWiki-Server', $server);
$this->setHeader('X-Auto-Response-Suppress', 'OOF');
@@ -181,6 +183,9 @@ class Mailer {
public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) {
global $INFO;
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
$htmlrep = (array)$htmlrep;
$textrep = (array)$textrep;
@@ -218,24 +223,24 @@ class Mailer {
$cip = gethostsbyaddrs($ip);
$trep = array(
'DATE' => dformat(),
- 'BROWSER' => $_SERVER['HTTP_USER_AGENT'],
+ 'BROWSER' => $INPUT->server->str('HTTP_USER_AGENT'),
'IPADDRESS' => $ip,
'HOSTNAME' => $cip,
'TITLE' => $conf['title'],
'DOKUWIKIURL' => DOKU_URL,
- 'USER' => $_SERVER['REMOTE_USER'],
+ 'USER' => $INPUT->server->str('REMOTE_USER'),
'NAME' => $INFO['userinfo']['name'],
'MAIL' => $INFO['userinfo']['mail'],
);
$trep = array_merge($trep, (array)$textrep);
$hrep = array(
'DATE' => '<i>'.hsc(dformat()).'</i>',
- 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']),
+ 'BROWSER' => hsc($INPUT->server->str('HTTP_USER_AGENT')),
'IPADDRESS' => '<code>'.hsc($ip).'</code>',
'HOSTNAME' => '<code>'.hsc($cip).'</code>',
'TITLE' => hsc($conf['title']),
'DOKUWIKIURL' => '<a href="'.DOKU_URL.'">'.DOKU_URL.'</a>',
- 'USER' => hsc($_SERVER['REMOTE_USER']),
+ 'USER' => hsc($INPUT->server->str('REMOTE_USER')),
'NAME' => hsc($INFO['userinfo']['name']),
'MAIL' => '<a href="mailto:"'.hsc($INFO['userinfo']['mail']).'">'.
hsc($INFO['userinfo']['mail']).'</a>',
@@ -277,7 +282,7 @@ class Mailer {
/**
* Add the To: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function to($address) {
@@ -287,7 +292,7 @@ class Mailer {
/**
* Add the Cc: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function cc($address) {
@@ -297,7 +302,7 @@ class Mailer {
/**
* Add the Bcc: recipients
*
- * @see setAddress
+ * @see cleanAddress
* @param string|array $address Multiple adresses separated by commas or as array
*/
public function bcc($address) {
@@ -310,7 +315,7 @@ class Mailer {
* This is set to $conf['mailfrom'] when not specified so you shouldn't need
* to call this function
*
- * @see setAddress
+ * @see cleanAddress
* @param string $address from address
*/
public function from($address) {
@@ -333,9 +338,9 @@ class Mailer {
* for headers. Addresses may not contain Non-ASCII data!
*
* Example:
- * setAddress("föö <foo@bar.com>, me@somewhere.com","TBcc");
+ * cc("föö <foo@bar.com>, me@somewhere.com","TBcc");
*
- * @param string|array $address Multiple adresses separated by commas or as array
+ * @param string|array $addresses Multiple adresses separated by commas or as array
* @return bool|string the prepared header (can contain multiple lines)
*/
public function cleanAddress($addresses) {
@@ -522,7 +527,7 @@ class Mailer {
// clean up addresses
if(empty($this->headers['From'])) $this->from($conf['mailfrom']);
- $addrs = array('To', 'From', 'Cc', 'Bcc');
+ $addrs = array('To', 'From', 'Cc', 'Bcc', 'Reply-To', 'Sender');
foreach($addrs as $addr) {
if(isset($this->headers[$addr])) {
$this->headers[$addr] = $this->cleanAddress($this->headers[$addr]);
diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php
index bf89a311c..6332746a6 100644
--- a/inc/Sitemapper.php
+++ b/inc/Sitemapper.php
@@ -131,9 +131,9 @@ class Sitemapper {
$encoded_sitemap_url = urlencode(wl('', array('do' => 'sitemap'), true, '&'));
$ping_urls = array(
- 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap='.$encoded_sitemap_url,
- 'yahoo' => 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=dokuwiki&url='.$encoded_sitemap_url,
+ 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap='.$encoded_sitemap_url,
'microsoft' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='.$encoded_sitemap_url,
+ 'yandex' => 'http://blogs.yandex.ru/pings/?status=success&url='.$encoded_sitemap_url
);
$data = array('ping_urls' => $ping_urls,
diff --git a/inc/actions.php b/inc/actions.php
index 50cbe369f..ef09a0dc7 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -20,6 +20,7 @@ function act_dispatch(){
global $ID;
global $INFO;
global $QUERY;
+ /* @var Input $INPUT */
global $INPUT;
global $lang;
global $conf;
@@ -94,7 +95,7 @@ function act_dispatch(){
// user profile changes
if (in_array($ACT, array('profile','profile_delete'))) {
- if(!$_SERVER['REMOTE_USER']) {
+ if(!$INPUT->server->str('REMOTE_USER')) {
$ACT = 'login';
} else {
switch ($ACT) {
@@ -190,7 +191,7 @@ function act_dispatch(){
unset($evt);
// when action 'show', the intial not 'show' and POST, do a redirect
- if($ACT == 'show' && $preact != 'show' && strtolower($_SERVER['REQUEST_METHOD']) == 'post'){
+ if($ACT == 'show' && $preact != 'show' && strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post'){
act_redirect($ID,$preact);
}
@@ -414,6 +415,8 @@ function act_revert($act){
global $ID;
global $REV;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
// FIXME $INFO['writable'] currently refers to the attic version
// global $INFO;
// if (!$INFO['writable']) {
@@ -445,7 +448,7 @@ function act_revert($act){
session_write_close();
// when done, show current page
- $_SERVER['REQUEST_METHOD'] = 'post'; //should force a redirect
+ $INPUT->server->set('REQUEST_METHOD','post'); //should force a redirect
$REV = '';
return 'show';
}
@@ -493,17 +496,20 @@ function act_redirect_execute($opts){
function act_auth($act){
global $ID;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
//already logged in?
- if(isset($_SERVER['REMOTE_USER']) && $act=='login'){
+ if($INPUT->server->has('REMOTE_USER') && $act=='login'){
return 'show';
}
//handle logout
if($act=='logout'){
$lockedby = checklock($ID); //page still locked?
- if($lockedby == $_SERVER['REMOTE_USER'])
+ if($lockedby == $INPUT->server->str('REMOTE_USER')){
unlock($ID); //try to unlock
+ }
// do the logout stuff
auth_logoff();
@@ -697,7 +703,7 @@ function act_sitemap($act) {
// Send file
//use x-sendfile header to pass the delivery to compatible webservers
- if (http_sendfile($sitemap)) exit;
+ http_sendfile($sitemap);
readfile($sitemap);
exit;
@@ -719,10 +725,11 @@ function act_subscription($act){
global $lang;
global $INFO;
global $ID;
+ /* @var Input $INPUT */
global $INPUT;
// subcriptions work for logged in users only
- if(!$_SERVER['REMOTE_USER']) return 'show';
+ if(!$INPUT->server->str('REMOTE_USER')) return 'show';
// get and preprocess data.
$params = array();
@@ -733,7 +740,7 @@ function act_subscription($act){
}
// any action given? if not just return and show the subscription page
- if(!$params['action'] || !checkSecurityToken()) return $act;
+ if(empty($params['action']) || !checkSecurityToken()) return $act;
// Handle POST data, may throw exception.
trigger_event('ACTION_HANDLE_SUBSCRIBE', $params, 'subscription_handle_post');
@@ -745,9 +752,9 @@ function act_subscription($act){
// Perform action.
$sub = new Subscription();
if($action == 'unsubscribe'){
- $ok = $sub->remove($target, $_SERVER['REMOTE_USER'], $style);
+ $ok = $sub->remove($target, $INPUT->server->str('REMOTE_USER'), $style);
}else{
- $ok = $sub->add($target, $_SERVER['REMOTE_USER'], $style);
+ $ok = $sub->add($target, $INPUT->server->str('REMOTE_USER'), $style);
}
if($ok) {
@@ -776,6 +783,8 @@ function act_subscription($act){
function subscription_handle_post(&$params) {
global $INFO;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
// Get and validate parameters.
if (!isset($params['target'])) {
@@ -806,7 +815,7 @@ function subscription_handle_post(&$params) {
}
if ($is === false) {
throw new Exception(sprintf($lang['subscr_not_subscribed'],
- $_SERVER['REMOTE_USER'],
+ $INPUT->server->str('REMOTE_USER'),
prettyprint_id($target)));
}
// subscription_set deletes a subscription if style = null.
diff --git a/inc/auth.php b/inc/auth.php
index 6000ea6d7..2bdc3eb00 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -131,6 +131,8 @@ function auth_setup() {
function auth_loadACL() {
global $config_cascade;
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
if(!is_readable($config_cascade['acl']['default'])) return array();
@@ -145,10 +147,10 @@ function auth_loadACL() {
// substitute user wildcard first (its 1:1)
if(strstr($line, '%USER%')){
// if user is not logged in, this ACL line is meaningless - skip it
- if (!isset($_SERVER['REMOTE_USER'])) continue;
+ if (!$INPUT->server->has('REMOTE_USER')) continue;
- $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id);
- $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest);
+ $id = str_replace('%USER%',cleanID($INPUT->server->str('REMOTE_USER')),$id);
+ $rest = str_replace('%USER%',auth_nameencode($INPUT->server->str('REMOTE_USER')),$rest);
}
// substitute group wildcard (its 1:m)
@@ -217,6 +219,8 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
global $lang;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
$sticky ? $sticky = true : $sticky = false; //sanity check
@@ -226,7 +230,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
//usual login
if($auth->checkPass($user, $pass)) {
// make logininfo globally available
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER', $user);
$secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session
auth_setCookie($user, auth_encrypt($pass, $secret), $sticky);
return true;
@@ -253,7 +257,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) {
) {
// he has session, cookie and browser right - let him in
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER', $user);
$USERINFO = $session['info']; //FIXME move all references to session
return true;
}
@@ -288,7 +292,10 @@ function auth_validateToken($token) {
}
// still here? trust the session data
global $USERINFO;
- $_SERVER['REMOTE_USER'] = $_SESSION[DOKU_COOKIE]['auth']['user'];
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ $INPUT->server->set('REMOTE_USER',$_SESSION[DOKU_COOKIE]['auth']['user']);
$USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info'];
return true;
}
@@ -321,11 +328,14 @@ function auth_createToken() {
* @return string a MD5 sum of various browser headers
*/
function auth_browseruid() {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$ip = clientIP(true);
$uid = '';
- $uid .= $_SERVER['HTTP_USER_AGENT'];
- $uid .= $_SERVER['HTTP_ACCEPT_ENCODING'];
- $uid .= $_SERVER['HTTP_ACCEPT_CHARSET'];
+ $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);
return md5($uid);
@@ -511,6 +521,8 @@ function auth_logoff($keepbc = false) {
global $USERINFO;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
// make sure the session is writable (it usually is)
@session_start();
@@ -523,16 +535,11 @@ function auth_logoff($keepbc = false) {
unset($_SESSION[DOKU_COOKIE]['auth']['info']);
if(!$keepbc && isset($_SESSION[DOKU_COOKIE]['bc']))
unset($_SESSION[DOKU_COOKIE]['bc']);
- if(isset($_SERVER['REMOTE_USER']))
- unset($_SERVER['REMOTE_USER']);
+ $INPUT->server->remove('REMOTE_USER');
$USERINFO = null; //FIXME
$cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
- if(version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
- } else {
- setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
- }
+ setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
if($auth) $auth->logOff();
}
@@ -557,13 +564,16 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false) {
global $USERINFO;
/* @var DokuWiki_Auth_Plugin $auth */
global $auth;
+ /* @var Input $INPUT */
+ global $INPUT;
+
if(!$auth) return false;
if(is_null($user)) {
- if(!isset($_SERVER['REMOTE_USER'])) {
+ if(!$INPUT->server->has('REMOTE_USER')) {
return false;
} else {
- $user = $_SERVER['REMOTE_USER'];
+ $user = $INPUT->server->str('REMOTE_USER');
}
}
if(is_null($groups)) {
@@ -655,9 +665,11 @@ function auth_isMember($memberlist, $user, array $groups) {
function auth_quickaclcheck($id) {
global $conf;
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
# if no ACL is used always return upload rights
if(!$conf['useacl']) return AUTH_UPLOAD;
- return auth_aclcheck($id, $_SERVER['REMOTE_USER'], $USERINFO['grps']);
+ return auth_aclcheck($id, $INPUT->server->str('REMOTE_USER'), $USERINFO['grps']);
}
/**
@@ -845,6 +857,12 @@ function auth_nameencode($name, $skip_group = false) {
return $cache[$name][$skip_group];
}
+/**
+ * callback encodes the matches
+ *
+ * @param array $matches first complete match, next matching subpatterms
+ * @return string
+ */
function auth_nameencode_callback($matches) {
return '%'.dechex(ord(substr($matches[1],-1)));
}
@@ -1056,18 +1074,18 @@ function updateprofile() {
}
if($conf['profileconfirm']) {
- if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) {
+ if(!$auth->checkPass($INPUT->server->str('REMOTE_USER'), $INPUT->post->str('oldpass'))) {
msg($lang['badpassconfirm'], -1);
return false;
}
}
- if($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) {
+ if($result = $auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), $changes))) {
// update cookie and session with the changed data
if($changes['pass']) {
list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
$pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
- auth_setCookie($_SERVER['REMOTE_USER'], $pass, (bool) $sticky);
+ auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
}
return true;
}
@@ -1075,6 +1093,11 @@ function updateprofile() {
return false;
}
+/**
+ * Delete the current logged-in user
+ *
+ * @return bool true on success, false on any error
+ */
function auth_deleteprofile(){
global $conf;
global $lang;
@@ -1098,13 +1121,13 @@ function auth_deleteprofile(){
}
if($conf['profileconfirm']) {
- if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) {
+ if(!$auth->checkPass($INPUT->server->str('REMOTE_USER'), $INPUT->post->str('oldpass'))) {
msg($lang['badpassconfirm'], -1);
return false;
}
}
- $deleted[] = $_SERVER['REMOTE_USER'];
+ $deleted[] = $INPUT->server->str('REMOTE_USER');
if($auth->triggerUserMod('delete', array($deleted))) {
// force and immediate logout including removing the sticky cookie
auth_logoff();
@@ -1308,11 +1331,8 @@ function auth_setCookie($user, $pass, $sticky) {
$cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass);
$cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
$time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year
- if(version_compare(PHP_VERSION, '5.2.0', '>')) {
- setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
- } else {
- setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()));
- }
+ setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true);
+
// set session
$_SESSION[DOKU_COOKIE]['auth']['user'] = $user;
$_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass);
diff --git a/inc/cache.php b/inc/cache.php
index 5eac94934..5f54a34a9 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -8,16 +8,24 @@
if(!defined('DOKU_INC')) die('meh.');
+/**
+ * Generic handling of caching
+ */
class cache {
- var $key = ''; // primary identifier for this item
- var $ext = ''; // file ext for cache data, secondary identifier for this item
- var $cache = ''; // cache file name
- var $depends = array(); // array containing cache dependency information,
+ public $key = ''; // primary identifier for this item
+ public $ext = ''; // file ext for cache data, secondary identifier for this item
+ public $cache = ''; // cache file name
+ public $depends = array(); // array containing cache dependency information,
// used by _useCache to determine cache validity
var $_event = ''; // event to be triggered during useCache
+ var $_time;
- function cache($key,$ext) {
+ /**
+ * @param string $key primary identifier
+ * @param string $ext file extension
+ */
+ public function cache($key,$ext) {
$this->key = $key;
$this->ext = $ext;
$this->cache = getCacheName($key,$ext);
@@ -36,7 +44,7 @@ class cache {
*
* @return bool true if cache can be used, false otherwise
*/
- function useCache($depends=array()) {
+ public function useCache($depends=array()) {
$this->depends = $depends;
$this->_addDependencies();
@@ -59,7 +67,7 @@ class cache {
*
* @return bool see useCache()
*/
- function _useCache() {
+ protected function _useCache() {
if (!empty($this->depends['purge'])) return false; // purge requested?
if (!($this->_time = @filemtime($this->cache))) return false; // cache exists?
@@ -83,7 +91,7 @@ class cache {
* it should not remove any existing dependencies and
* it should only overwrite a dependency when the new value is more stringent than the old
*/
- function _addDependencies() {
+ protected function _addDependencies() {
global $INPUT;
if ($INPUT->has('purge')) $this->depends['purge'] = true; // purge requested
}
@@ -94,7 +102,7 @@ class cache {
* @param bool $clean true to clean line endings, false to leave line endings alone
* @return string cache contents
*/
- function retrieveCache($clean=true) {
+ public function retrieveCache($clean=true) {
return io_readFile($this->cache, $clean);
}
@@ -104,14 +112,14 @@ class cache {
* @param string $data the data to be cached
* @return bool true on success, false otherwise
*/
- function storeCache($data) {
+ public function storeCache($data) {
return io_savefile($this->cache, $data);
}
/**
* remove any cached data associated with this cache instance
*/
- function removeCache() {
+ public function removeCache() {
@unlink($this->cache);
}
@@ -122,7 +130,7 @@ class cache {
* @param bool $success result of this cache use attempt
* @return bool pass-thru $success value
*/
- function _stats($success) {
+ protected function _stats($success) {
global $conf;
static $stats = null;
static $file;
@@ -157,14 +165,23 @@ class cache {
}
}
+/**
+ * Parser caching
+ */
class cache_parser extends cache {
- var $file = ''; // source file for cache
- var $mode = ''; // input mode (represents the processing the input file will undergo)
+ public $file = ''; // source file for cache
+ public $mode = ''; // input mode (represents the processing the input file will undergo)
var $_event = 'PARSER_CACHE_USE';
- function cache_parser($id, $file, $mode) {
+ /**
+ *
+ * @param string $id page id
+ * @param string $file source file for cache
+ * @param string $mode input mode
+ */
+ public function cache_parser($id, $file, $mode) {
if ($id) $this->page = $id;
$this->file = $file;
$this->mode = $mode;
@@ -172,24 +189,29 @@ class cache_parser extends cache {
parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
}
- function _useCache() {
+ /**
+ * method contains cache use decision logic
+ *
+ * @return bool see useCache()
+ */
+ protected function _useCache() {
if (!@file_exists($this->file)) return false; // source exists?
return parent::_useCache();
}
- function _addDependencies() {
- global $conf, $config_cascade;
+ protected function _addDependencies() {
+ global $conf;
$this->depends['age'] = isset($this->depends['age']) ?
min($this->depends['age'],$conf['cachetime']) : $conf['cachetime'];
// parser cache file dependencies ...
- $files = array($this->file, // ... source
+ $files = array($this->file, // ... source
DOKU_INC.'inc/parser/parser.php', // ... parser
DOKU_INC.'inc/parser/handler.php', // ... handler
);
- $files = array_merge($files, getConfigFiles('main')); // ... wiki settings
+ $files = array_merge($files, getConfigFiles('main')); // ... wiki settings
$this->depends['files'] = !empty($this->depends['files']) ? array_merge($files, $this->depends['files']) : $files;
parent::_addDependencies();
@@ -197,8 +219,17 @@ class cache_parser extends cache {
}
+/**
+ * Caching of data of renderer
+ */
class cache_renderer extends cache_parser {
- function _useCache() {
+
+ /**
+ * method contains cache use decision logic
+ *
+ * @return bool see useCache()
+ */
+ protected function _useCache() {
global $conf;
if (!parent::_useCache()) return false;
@@ -231,7 +262,7 @@ class cache_renderer extends cache_parser {
return true;
}
- function _addDependencies() {
+ protected function _addDependencies() {
// renderer cache file dependencies ...
$files = array(
@@ -253,18 +284,37 @@ class cache_renderer extends cache_parser {
}
}
+/**
+ * Caching of parser instructions
+ */
class cache_instructions extends cache_parser {
- function cache_instructions($id, $file) {
+ /**
+ * @param string $id page id
+ * @param string $file source file for cache
+ */
+ public function cache_instructions($id, $file) {
parent::cache_parser($id, $file, 'i');
}
- function retrieveCache($clean=true) {
+ /**
+ * retrieve the cached data
+ *
+ * @param bool $clean true to clean line endings, false to leave line endings alone
+ * @return string cache contents
+ */
+ public function retrieveCache($clean=true) {
$contents = io_readFile($this->cache, false);
return !empty($contents) ? unserialize($contents) : array();
}
- function storeCache($instructions) {
+ /**
+ * cache $instructions
+ *
+ * @param string $instructions the instruction to be cached
+ * @return bool true on success, false otherwise
+ */
+ public function storeCache($instructions) {
return io_savefile($this->cache,serialize($instructions));
}
}
diff --git a/inc/changelog.php b/inc/changelog.php
index 6ff1e0eca..cd46b1ec0 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -52,6 +52,8 @@ function parseChangelogLine($line) {
*/
function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extra='', $flags=null){
global $conf, $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
// check for special flags as keys
if (!is_array($flags)) { $flags = array(); }
@@ -65,7 +67,7 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
if(!$date) $date = time(); //use current time if none supplied
$remote = (!$flagExternalEdit)?clientIP(true):'127.0.0.1';
- $user = (!$flagExternalEdit)?$_SERVER['REMOTE_USER']:'';
+ $user = (!$flagExternalEdit)?$INPUT->server->str('REMOTE_USER'):'';
$strip = array("\t", "\n");
$logline = array(
@@ -117,12 +119,14 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr
*/
function addMediaLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extra='', $flags=null){
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
$id = cleanid($id);
if(!$date) $date = time(); //use current time if none supplied
$remote = clientIP(true);
- $user = $_SERVER['REMOTE_USER'];
+ $user = $INPUT->server->str('REMOTE_USER');
$strip = array("\t", "\n");
$logline = array(
diff --git a/inc/cliopts.php b/inc/cliopts.php
index 9cea686a2..3eac72e5b 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -74,9 +74,9 @@ class Doku_Cli_Opts {
/**
* <?php ?>
* @see http://www.sitepoint.com/article/php-command-line-1/3
- * @param string executing file name - this MUST be passed the __FILE__ constant
- * @param string short options
- * @param array (optional) long options
+ * @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
*/
function & getOptions($bin_file, $short_options, $long_options = null) {
@@ -233,12 +233,12 @@ class Doku_Cli_Opts {
* Parse short option
*
* @param string $arg Argument
- * @param string[] $short_options Available short options
+ * @param string $short_options Available short options
* @param string[][] &$opts
* @param string[] &$args
*
* @access private
- * @return void
+ * @return void|Doku_Cli_Opts_Error
*/
function _parseShortOption($arg, $short_options, &$opts, &$args) {
$len = strlen($arg);
@@ -324,7 +324,7 @@ class Doku_Cli_Opts {
* @param string[] &$args
*
* @access private
- * @return void|PEAR_Error
+ * @return void|Doku_Cli_Opts_Error
*/
function _parseLongOption($arg, $long_options, &$opts, &$args) {
@list($opt, $opt_arg) = explode('=', $arg, 2);
@@ -402,7 +402,7 @@ class Doku_Cli_Opts {
* Will take care on register_globals and register_argc_argv ini directives
*
* @access public
- * @return mixed the $argv PHP array or PEAR error if not registered
+ * @return array|Doku_Cli_Opts_Error the $argv PHP array or PEAR error if not registered
*/
function readPHPArgv() {
global $argv;
@@ -421,10 +421,19 @@ class Doku_Cli_Opts {
return $argv;
}
+ /**
+ * @param $code
+ * @param $msg
+ * @return Doku_Cli_Opts_Error
+ */
function raiseError($code, $msg) {
return new Doku_Cli_Opts_Error($code, $msg);
}
+ /**
+ * @param $obj
+ * @return bool
+ */
function isError($obj) {
return is_a($obj, 'Doku_Cli_Opts_Error');
}
diff --git a/inc/common.php b/inc/common.php
index 4a5ead6b8..143ad8923 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -56,15 +56,18 @@ function stripctl($string) {
* @return string
*/
function getSecurityToken() {
- return PassHash::hmac('md5', session_id().$_SERVER['REMOTE_USER'], auth_cookiesalt());
+ /** @var Input $INPUT */
+ global $INPUT;
+ return PassHash::hmac('md5', session_id().$INPUT->server->str('REMOTE_USER'), auth_cookiesalt());
}
/**
* Check the secret CSRF token
*/
function checkSecurityToken($token = null) {
+ /** @var Input $INPUT */
global $INPUT;
- if(empty($_SERVER['REMOTE_USER'])) return true; // no logged in user, no need for a check
+ if(!$INPUT->server->str('REMOTE_USER')) return true; // no logged in user, no need for a check
if(is_null($token)) $token = $INPUT->str('sectok');
if(getSecurityToken() != $token) {
@@ -93,14 +96,16 @@ function formSecurityToken($print = true) {
*/
function basicinfo($id, $htmlClient=true){
global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
// set info about manager/admin status.
$info['isadmin'] = false;
$info['ismanager'] = false;
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
$info['userinfo'] = $USERINFO;
$info['perm'] = auth_quickaclcheck($id);
- $info['client'] = $_SERVER['REMOTE_USER'];
+ $info['client'] = $INPUT->server->str('REMOTE_USER');
if($info['perm'] == AUTH_ADMIN) {
$info['isadmin'] = true;
@@ -111,7 +116,7 @@ function basicinfo($id, $htmlClient=true){
// if some outside auth were used only REMOTE_USER is set
if(!$info['userinfo']['name']) {
- $info['userinfo']['name'] = $_SERVER['REMOTE_USER'];
+ $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
}
} else {
@@ -140,6 +145,8 @@ function pageinfo() {
global $REV;
global $RANGE;
global $lang;
+ /* @var Input $INPUT */
+ global $INPUT;
$info = basicinfo($ID);
@@ -148,19 +155,20 @@ function pageinfo() {
$info['id'] = $ID;
$info['rev'] = $REV;
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
$sub = new Subscription();
$info['subscribed'] = $sub->user_subscription();
} else {
$info['subscribed'] = false;
}
- $info['locked'] = checklock($ID);
- $info['filepath'] = fullpath(wikiFN($ID));
- $info['exists'] = @file_exists($info['filepath']);
+ $info['locked'] = checklock($ID);
+ $info['filepath'] = fullpath(wikiFN($ID));
+ $info['exists'] = @file_exists($info['filepath']);
+ $info['currentrev'] = @filemtime($info['filepath']);
if($REV) {
//check if current revision was meant
- if($info['exists'] && (@filemtime($info['filepath']) == $REV)) {
+ if($info['exists'] && ($info['currentrev'] == $REV)) {
$REV = '';
} elseif($RANGE) {
//section editing does not work with old revisions!
@@ -190,7 +198,7 @@ function pageinfo() {
if($REV) {
$revinfo = getRevisionInfo($ID, $REV, 1024);
} else {
- if(is_array($info['meta']['last_change'])) {
+ if(!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {
$revinfo = $info['meta']['last_change'];
} else {
$revinfo = getRevisionInfo($ID, $info['lastmod'], 1024);
@@ -355,11 +363,14 @@ function breadcrumbs() {
*/
function idfilter($id, $ue = true) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
if($conf['useslash'] && $conf['userewrite']) {
$id = strtr($id, ':', '/');
} elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
$conf['userewrite'] &&
- strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') === false
+ strpos($INPUT->server->str('SERVER_SOFTWARE'), 'Microsoft-IIS') === false
) {
$id = strtr($id, ':', ';');
}
@@ -587,6 +598,8 @@ function checkwordblock($text = '') {
global $SUM;
global $conf;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
if(!$conf['usewordblock']) return false;
@@ -619,9 +632,9 @@ function checkwordblock($text = '') {
if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) {
// prepare event data
$data['matches'] = $matches;
- $data['userinfo']['ip'] = $_SERVER['REMOTE_ADDR'];
- if($_SERVER['REMOTE_USER']) {
- $data['userinfo']['user'] = $_SERVER['REMOTE_USER'];
+ $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
+ if($INPUT->server->str('REMOTE_USER')) {
+ $data['userinfo']['user'] = $INPUT->server->str('REMOTE_USER');
$data['userinfo']['name'] = $INFO['userinfo']['name'];
$data['userinfo']['mail'] = $INFO['userinfo']['mail'];
}
@@ -647,12 +660,17 @@ function checkwordblock($text = '') {
* @return string
*/
function clientIP($single = false) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$ip = array();
- $ip[] = $_SERVER['REMOTE_ADDR'];
- if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
- $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_FORWARDED_FOR'])));
- if(!empty($_SERVER['HTTP_X_REAL_IP']))
- $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_REAL_IP'])));
+ $ip[] = $INPUT->server->str('REMOTE_ADDR');
+ if($INPUT->server->str('HTTP_X_FORWARDED_FOR')) {
+ $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_FORWARDED_FOR'))));
+ }
+ if($INPUT->server->str('HTTP_X_REAL_IP')) {
+ $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_REAL_IP'))));
+ }
// some IPv4/v6 regexps borrowed from Feyd
// see: http://forums.devnetwork.net/viewtopic.php?f=38&t=53479
@@ -711,16 +729,18 @@ function clientIP($single = false) {
* @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code
*/
function clientismobile() {
+ /* @var Input $INPUT */
+ global $INPUT;
- if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) return true;
+ if($INPUT->server->has('HTTP_X_WAP_PROFILE')) return true;
- if(preg_match('/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'])) return true;
+ if(preg_match('/wap\.|\.wap/i', $INPUT->server->str('HTTP_ACCEPT'))) return true;
- if(!isset($_SERVER['HTTP_USER_AGENT'])) return false;
+ if(!$INPUT->server->has('HTTP_USER_AGENT')) return false;
$uamatches = 'midp|j2me|avantg|docomo|novarra|palmos|palmsource|240x320|opwv|chtml|pda|windows ce|mmp\/|blackberry|mib\/|symbian|wireless|nokia|hand|mobi|phone|cdm|up\.b|audio|SIE\-|SEC\-|samsung|HTC|mot\-|mitsu|sagem|sony|alcatel|lg|erics|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|\d\d\di|moto';
- if(preg_match("/$uamatches/i", $_SERVER['HTTP_USER_AGENT'])) return true;
+ if(preg_match("/$uamatches/i", $INPUT->server->str('HTTP_USER_AGENT'))) return true;
return false;
}
@@ -760,6 +780,9 @@ function gethostsbyaddrs($ips) {
*/
function checklock($id) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
$lock = wikiLockFN($id);
//no lockfile
@@ -772,8 +795,8 @@ function checklock($id) {
}
//my own lock
- list($ip, $session) = explode("\n", io_readFile($lock));
- if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) {
+ @list($ip, $session) = explode("\n", io_readFile($lock));
+ if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) {
return false;
}
@@ -787,14 +810,16 @@ function checklock($id) {
*/
function lock($id) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
if($conf['locktime'] == 0) {
return;
}
$lock = wikiLockFN($id);
- if($_SERVER['REMOTE_USER']) {
- io_saveFile($lock, $_SERVER['REMOTE_USER']);
+ if($INPUT->server->str('REMOTE_USER')) {
+ io_saveFile($lock, $INPUT->server->str('REMOTE_USER'));
} else {
io_saveFile($lock, clientIP()."\n".session_id());
}
@@ -808,10 +833,13 @@ function lock($id) {
* @return bool true if a lock was removed
*/
function unlock($id) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
$lock = wikiLockFN($id);
if(@file_exists($lock)) {
- list($ip, $session) = explode("\n", io_readFile($lock));
- if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) {
+ @list($ip, $session) = explode("\n", io_readFile($lock));
+ if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) {
@unlink($lock);
return true;
}
@@ -937,6 +965,8 @@ function parsePageTemplate(&$data) {
global $USERINFO;
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
// replace placeholders
$file = noNS($id);
@@ -968,7 +998,7 @@ function parsePageTemplate(&$data) {
utf8_ucfirst($page),
utf8_ucwords($page),
utf8_strtoupper($page),
- $_SERVER['REMOTE_USER'],
+ $INPUT->server->str('REMOTE_USER'),
$USERINFO['name'],
$USERINFO['mail'],
$conf['dformat'],
@@ -1049,6 +1079,9 @@ function saveWikiText($id, $text, $summary, $minor = false) {
global $conf;
global $lang;
global $REV;
+ /* @var Input $INPUT */
+ global $INPUT;
+
// ignore if no changes were made
if($text == rawWiki($id, '')) {
return;
@@ -1111,7 +1144,7 @@ function saveWikiText($id, $text, $summary, $minor = false) {
$type = DOKU_CHANGE_TYPE_CREATE;
} else if($wasRemoved) {
$type = DOKU_CHANGE_TYPE_DELETE;
- } else if($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) {
+ } else if($minor && $conf['useacl'] && $INPUT->server->str('REMOTE_USER')) {
$type = DOKU_CHANGE_TYPE_MINOR_EDIT;
} //minor edits only for logged in users
@@ -1140,7 +1173,6 @@ function saveWikiText($id, $text, $summary, $minor = false) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function saveOldRevision($id) {
- global $conf;
$oldf = wikiFN($id);
if(!@file_exists($oldf)) return '';
$date = filemtime($oldf);
@@ -1164,6 +1196,8 @@ function saveOldRevision($id) {
*/
function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) {
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
// decide if there is something to do, eg. whom to mail
if($who == 'admin') {
@@ -1172,7 +1206,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$to = $conf['notify'];
} elseif($who == 'subscribers') {
if(!actionOK('subscribe')) return false; //subscribers enabled?
- if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
+ if($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
$data = array('id' => $id, 'addresslist' => '', 'self' => false);
trigger_event(
'COMMON_NOTIFY_ADDRESSLIST', $data,
@@ -1197,10 +1231,13 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
* @author Todd Augsburger <todd@rollerorgans.com>
*/
function getGoogleQuery() {
- if(!isset($_SERVER['HTTP_REFERER'])) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ if(!$INPUT->server->has('HTTP_REFERER')) {
return '';
}
- $url = parse_url($_SERVER['HTTP_REFERER']);
+ $url = parse_url($INPUT->server->str('HTTP_REFERER'));
// only handle common SEs
if(!preg_match('/(google|bing|yahoo|ask|duckduckgo|babylon|aol|yandex)/',$url['host'])) return '';
@@ -1230,8 +1267,9 @@ 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>
* @author Aidan Lister <aidan@php.net>
* @version 1.0.0
@@ -1362,12 +1400,16 @@ function php_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':
@@ -1603,6 +1645,9 @@ function is_mem_available($mem, $bytes = 1048576) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function send_redirect($url) {
+ /* @var Input $INPUT */
+ global $INPUT;
+
//are there any undisplayed messages? keep them in session for display
global $MSG;
if(isset($MSG) && count($MSG) && !defined('NOSESSION')) {
@@ -1616,7 +1661,7 @@ function send_redirect($url) {
// work around IE bug
// http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/
- list($url, $hash) = explode('#', $url);
+ @list($url, $hash) = explode('#', $url);
if($hash) {
if(strpos($url, '?')) {
$url = $url.'&#'.$hash;
@@ -1626,9 +1671,9 @@ function send_redirect($url) {
}
// check if running on IIS < 6 with CGI-PHP
- if(isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) &&
- (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) &&
- (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) &&
+ if($INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
+ (strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) &&
+ (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($INPUT->server->str('SERVER_SOFTWARE')), $matches)) &&
$matches[1] < 6
) {
header('Refresh: 0;url='.$url);
diff --git a/inc/confutils.php b/inc/confutils.php
index 0ac003b72..31371d41f 100644
--- a/inc/confutils.php
+++ b/inc/confutils.php
@@ -237,13 +237,14 @@ function getConfigFiles($type) {
* check if the given action was disabled in config
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $action
* @returns boolean true if enabled, false if disabled
*/
function actionOK($action){
static $disabled = null;
if(is_null($disabled) || defined('SIMPLE_TEST')){
global $conf;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
// prepare disabled actions array and handle legacy options
diff --git a/inc/events.php b/inc/events.php
index f7b1a7a16..7f9824f60 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -8,15 +8,18 @@
if(!defined('DOKU_INC')) die('meh.');
+/**
+ * The event
+ */
class Doku_Event {
// public properties
- var $name = ''; // READONLY event name, objects must register against this name to see the event
- var $data = null; // READWRITE data relevant to the event, no standardised format (YET!)
- var $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise
+ public $name = ''; // READONLY event name, objects must register against this name to see the event
+ public $data = null; // READWRITE data relevant to the event, no standardised format (YET!)
+ public $result = null; // READWRITE the results of the event action, only relevant in "_AFTER" advise
// event handlers may modify this if they are preventing the default action
// to provide the after event handlers with event results
- var $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action
+ public $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action
// private properties, event handlers can effect these through the provided methods
var $_default = true; // whether or not to carry out the default action associated with the event
@@ -33,6 +36,13 @@ class Doku_Event {
}
/**
+ * @return string
+ */
+ function __toString() {
+ return $this->name;
+ }
+
+ /**
* advise functions
*
* advise all registered handlers of this event
@@ -47,7 +57,8 @@ class Doku_Event {
* $evt->advise_after();
* unset($evt);
*
- * @return results of processing the event, usually $this->_default
+ * @param bool $enablePreventDefault
+ * @return bool results of processing the event, usually $this->_default
*/
function advise_before($enablePreventDefault=true) {
global $EVENT_HANDLER;
@@ -73,7 +84,9 @@ class Doku_Event {
* $this->_default, all of which may have been modified by the event handlers.
* - advise all registered (<event>_AFTER) handlers that the event has taken place
*
- * @return $event->results
+ * @param null|callable $action
+ * @param bool $enablePrevent
+ * @return mixed $event->results
* the value set by any <event>_before or <event> handlers if the default action is prevented
* or the results of the default action (as modified by <event>_after handlers)
* or NULL no action took place and no handler modified the value
@@ -112,12 +125,15 @@ class Doku_Event {
function preventDefault() { $this->_default = false; }
}
+/**
+ * Controls the registration and execution of all events,
+ */
class Doku_Event_Handler {
// public properties: none
// private properties
- var $_hooks = array(); // array of events and their registered handlers
+ protected $_hooks = array(); // array of events and their registered handlers
/**
* event_handler
@@ -128,6 +144,7 @@ class Doku_Event_Handler {
function Doku_Event_Handler() {
// load action plugins
+ /** @var DokuWiki_Action_Plugin $plugin */
$plugin = null;
$pluginlist = plugin_list('action');
@@ -143,34 +160,47 @@ 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 $obj (obj) object in whose scope method is to be executed,
+ * @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,
* if NULL, method is assumed to be a globally available function
- * @param $method (function) event handler function
- * @param $param (mixed) data passed to the event handler
+ * @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)
*/
- function register_hook($event, $advise, $obj, $method, $param=null) {
- $this->_hooks[$event.'_'.$advise][] = array($obj, $method, $param);
+ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) {
+ $seq = (int)$seq;
+ $doSort = !isset($this->_hooks[$event.'_'.$advise][$seq]);
+ $this->_hooks[$event.'_'.$advise][$seq][] = array($obj, $method, $param);
+
+ if ($doSort) {
+ ksort($this->_hooks[$event.'_'.$advise]);
+ }
}
- function process_event(&$event,$advise='') {
+ /**
+ * process the before/after event
+ *
+ * @param Doku_Event $event
+ * @param string $advise BEFORE or AFTER
+ */
+ function process_event($event,$advise='') {
$evt_name = $event->name . ($advise ? '_'.$advise : '_BEFORE');
if (!empty($this->_hooks[$evt_name])) {
- foreach ($this->_hooks[$evt_name] as $hook) {
- // list($obj, $method, $param) = $hook;
- $obj =& $hook[0];
- $method = $hook[1];
- $param = $hook[2];
-
- if (is_null($obj)) {
- $method($event, $param);
- } else {
- $obj->$method($event, $param);
- }
+ foreach ($this->_hooks[$evt_name] as $sequenced_hooks) {
+ foreach ($sequenced_hooks as $hook) {
+ list($obj, $method, $param) = $hook;
- if (!$event->_continue) break;
+ if (is_null($obj)) {
+ $method($event, $param);
+ } else {
+ $obj->$method($event, $param);
+ }
+
+ if (!$event->_continue) return;
+ }
}
}
}
@@ -181,12 +211,12 @@ 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 $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
*
- * @return (mixed) the event results value after all event processing is complete
+ * @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
*/
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
index 670a1bc29..b90da5724 100644
--- a/inc/feedcreator.class.php
+++ b/inc/feedcreator.class.php
@@ -185,6 +185,8 @@ class HtmlDescribable {
*/
var $descriptionTruncSize;
+ var $description;
+
/**
* Returns a formatted description field, depending on descriptionHtmlSyndicated and
* $descriptionTruncSize properties
@@ -222,7 +224,7 @@ class FeedHtmlField {
/**
* Creates a new instance of FeedHtmlField.
- * @param $string: if given, sets the rawFieldContent property
+ * @param string $parFieldContent: if given, sets the rawFieldContent property
*/
function FeedHtmlField($parFieldContent) {
if ($parFieldContent) {
@@ -267,8 +269,14 @@ class FeedHtmlField {
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class UniversalFeedCreator extends FeedCreator {
+ /** @var FeedCreator */
var $_feed;
+ /**
+ * Sets format
+ *
+ * @param string $format
+ */
function _setFormat($format) {
switch (strtoupper($format)) {
@@ -344,7 +352,7 @@ class UniversalFeedCreator extends FeedCreator {
* Creates a syndication feed based on the items previously added.
*
* @see FeedCreator::addItem()
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS"
* @return string the contents of the feed.
*/
@@ -358,10 +366,10 @@ class UniversalFeedCreator extends FeedCreator {
* header may be sent to redirect the use to the newly created file.
* @since 1.4
*
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"
- * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
+ * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param boolean $displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
*/
function saveFeed($format="RSS0.91", $filename="", $displayContents=true) {
$this->_setFormat($format);
@@ -376,10 +384,10 @@ class UniversalFeedCreator extends FeedCreator {
* before anything else, especially before you do the time consuming task to build the feed
* (web fetching, for example).
*
- * @param string format format the feed should comply to. Valid values are:
+ * @param string $format format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ * @param string $filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param int $timeout optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
*/
function useCached($format="RSS0.91", $filename="", $timeout=3600) {
$this->_setFormat($format);
@@ -390,7 +398,7 @@ class UniversalFeedCreator extends FeedCreator {
/**
* Outputs feed to the browser - needed for on-the-fly feed generation (like it is done in WordPress, etc.)
*
- * @param format string format the feed should comply to. Valid values are:
+ * @param $format string format the feed should comply to. Valid values are:
* "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
*/
function outputFeed($format='RSS0.91') {
@@ -422,7 +430,13 @@ class FeedCreator extends HtmlDescribable {
/**
* Optional attributes of a feed.
*/
- var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+ var $syndicationURL, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+ /**
+ * Optional attribute of a feed
+ *
+ * @var FeedImage
+ */
+ var $image = null;
/**
* The url of the external xsl stylesheet used to format the naked rss feed.
@@ -430,13 +444,18 @@ class FeedCreator extends HtmlDescribable {
*/
var $xslStyleSheet = "";
+ /**
+ * Style sheet for rss feed
+ */
+ var $cssStyleSheet = "";
+
/**
* @access private
+ * @var FeedItem[]
*/
var $items = Array();
-
/**
* This feed's MIME content type.
* @since 1.4
@@ -466,7 +485,7 @@ class FeedCreator extends HtmlDescribable {
/**
* Adds an FeedItem to the feed.
*
- * @param object FeedItem $item The FeedItem to add to the feed.
+ * @param FeedItem $item The FeedItem to add to the feed.
* @access public
*/
function addItem($item) {
@@ -482,8 +501,8 @@ class FeedCreator extends HtmlDescribable {
* If the string is already shorter than $length, it is returned unchanged.
*
* @static
- * @param string string A string to be truncated.
- * @param int length the maximum length the string should be truncated to
+ * @param string $string A string to be truncated.
+ * @param int $length the maximum length the string should be truncated to
* @return string the truncated string
*/
function iTrunc($string, $length) {
@@ -527,8 +546,8 @@ class FeedCreator extends HtmlDescribable {
/**
* Creates a string containing all additional elements specified in
* $additionalElements.
- * @param elements array an associative array containing key => value pairs
- * @param indentString string a string that will be inserted before every generated line
+ * @param $elements array an associative array containing key => value pairs
+ * @param $indentString string a string that will be inserted before every generated line
* @return string the XML tags corresponding to $additionalElements
*/
function _createAdditionalElements($elements, $indentString="") {
@@ -541,6 +560,9 @@ class FeedCreator extends HtmlDescribable {
return $ae;
}
+ /**
+ * Create elements for stylesheets
+ */
function _createStylesheetReferences() {
$xml = "";
if ($this->cssStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n";
@@ -610,8 +632,8 @@ class FeedCreator extends HtmlDescribable {
* before anything else, especially before you do the time consuming task to build the feed
* (web fetching, for example).
* @since 1.4
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
+ * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param $timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
*/
function useCached($filename="", $timeout=3600) {
$this->_timeout = $timeout;
@@ -629,8 +651,8 @@ class FeedCreator extends HtmlDescribable {
* header may be sent to redirect the user to the newly created file.
* @since 1.4
*
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
+ * @param $filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
+ * @param $displayContents boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
*/
function saveFeed($filename="", $displayContents=true) {
if ($filename=="") {
@@ -667,6 +689,7 @@ class FeedCreator extends HtmlDescribable {
* Usually, you won't need to use this.
*/
class FeedDate {
+ /** @var int */
var $unix;
/**
@@ -726,7 +749,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as an RFC 822 date.
*
- * @return a date in RFC 822 format
+ * @return string a date in RFC 822 format
*/
function rfc822() {
//return gmdate("r",$this->unix);
@@ -738,7 +761,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as an ISO 8601 date.
*
- * @return a date in ISO 8601 (RFC 3339) format
+ * @return string a date in ISO 8601 (RFC 3339) format
*/
function iso8601() {
$date = gmdate("Y-m-d\TH:i:sO",$this->unix);
@@ -751,7 +774,7 @@ class FeedDate {
/**
* Gets the date stored in this FeedDate as unix time stamp.
*
- * @return a date as a unix time stamp
+ * @return int a date as a unix time stamp
*/
function unix() {
return $this->unix;
@@ -777,7 +800,7 @@ class RSSCreator10 extends FeedCreator {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
if ($this->cssStyleSheet=="") {
- $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
+ $this->cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
}
$feed.= $this->_createStylesheetReferences();
$feed.= "<rdf:RDF\n";
@@ -1032,12 +1055,16 @@ class PIECreator01 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createStylesheetReferences();
$feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
$feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
- $this->truncSize = 500;
+ $this->descriptionTruncSize = 500;
$feed.= " <subtitle>".$this->getDescription()."</subtitle>\n";
$feed.= " <link>".$this->link."</link>\n";
$icnt = count($this->items);
@@ -1091,6 +1118,10 @@ class AtomCreator10 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1174,6 +1205,10 @@ class AtomCreator03 extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1281,6 +1316,7 @@ class MBOXCreator extends FeedCreator {
*/
function createFeed() {
$icnt = count($this->items);
+ $feed = "";
for ($i=0; $i<$icnt; $i++) {
if ($this->items[$i]->author!="") {
$from = $this->items[$i]->author;
@@ -1331,6 +1367,10 @@ class OPMLCreator extends FeedCreator {
$this->encoding = "utf-8";
}
+ /**
+ * Build content
+ * @return string
+ */
function createFeed() {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
@@ -1441,6 +1481,7 @@ class HTMLCreator extends FeedCreator {
}
//set an openInNewWindow_token_to be inserted or not
+ $targetInsert = "";
if ($this->openInNewWindow) {
$targetInsert = " target='_blank'";
}
@@ -1568,6 +1609,14 @@ class JSCreator extends HTMLCreator {
* @author Andreas Gohr <andi@splitbrain.org>
*/
class DokuWikiFeedCreator extends UniversalFeedCreator{
+
+ /**
+ * Build content
+ *
+ * @param string $format
+ * @param string $encoding
+ * @return string
+ */
function createFeed($format = "RSS0.91",$encoding='iso-8859-15') {
$this->_setFormat($format);
$this->_feed->encoding = $encoding;
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index 3eacaa2fe..c61c54503 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -77,7 +77,7 @@ function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null) {
}
//use x-sendfile header to pass the delivery to compatible webservers
- if(http_sendfile($file)) exit;
+ http_sendfile($file);
// send file contents
$fp = @fopen($file, "rb");
diff --git a/inc/form.php b/inc/form.php
index a4cd2e682..610f50200 100644
--- a/inc/form.php
+++ b/inc/form.php
@@ -47,15 +47,11 @@ class Doku_Form {
* with up to four parameters is deprecated, instead the first parameter
* should be an array with parameters.
*
- * @param mixed $params Parameters for the HTML form element; Using the
- * deprecated calling convention this is the ID
- * attribute of the form
- * @param string $action (optional, deprecated) submit URL, defaults to
- * current page
- * @param string $method (optional, deprecated) 'POST' or 'GET', default
- * is POST
- * @param string $enctype (optional, deprecated) Encoding type of the
- * data
+ * @param mixed $params Parameters for the HTML form element; Using the deprecated
+ * calling convention this is the ID attribute of the 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) {
@@ -176,7 +172,7 @@ class Doku_Form {
* Gets the position of the first of a type of element.
*
* @param string $type Element type to look for.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByType($type) {
@@ -193,7 +189,7 @@ class Doku_Form {
* Gets the position of the element with an ID attribute.
*
* @param string $id ID of the element to find.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementById($id) {
@@ -211,7 +207,7 @@ class Doku_Form {
*
* @param string $name Attribute name.
* @param string $value Attribute value.
- * @return array pseudo-element if found, false otherwise
+ * @return int position of element if found, otherwise false
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function findElementByAttribute($name, $value) {
@@ -230,7 +226,7 @@ class Doku_Form {
* first (underflow) or last (overflow) element.
*
* @param int $pos 0-based index
- * @return arrayreference pseudo-element
+ * @return array reference pseudo-element
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function &getElementAt($pos) {
diff --git a/inc/fulltext.php b/inc/fulltext.php
index bd8e6b866..dd918f214 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -72,8 +72,20 @@ function _ft_pageSearch(&$data) {
$pages = end($stack);
$pages_matched = array();
foreach(array_keys($pages) as $id){
- $text = utf8_strtolower(rawWiki($id));
- if (strpos($text, $phrase) !== false) {
+ $evdata = array(
+ 'id' => $id,
+ 'phrase' => $phrase,
+ 'text' => rawWiki($id)
+ );
+ $evt = new Doku_Event('FULLTEXT_PHRASE_MATCH',$evdata);
+ if ($evt->advise_before() && $evt->result !== true) {
+ $text = utf8_strtolower($evdata['text']);
+ if (strpos($text, $phrase) !== false) {
+ $evt->result = true;
+ }
+ }
+ $evt->advise_after();
+ if ($evt->result === true) {
$pages_matched[$id] = 0; // phrase: always 0 hit
}
}
@@ -333,7 +345,7 @@ function ft_snippet($id,$highlight){
$pre = min($pre,100-$post);
} else if ($post>50) {
$post = min($post, 100-$pre);
- } else {
+ } else if ($offset == 0) {
// both are less than 50, means the context is the whole string
// make it so and break out of this loop - there is no need for the
// complex snippet calculations
@@ -354,12 +366,12 @@ function ft_snippet($id,$highlight){
}
// set $offset for next match attempt
- // substract strlen to avoid splitting a potential search success,
- // this is an approximation as the search pattern may match strings
- // of varying length and it will fail if the context snippet
- // boundary breaks a matching string longer than the current match
- $utf8_offset = $utf8_idx + $post;
- $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$post));
+ // continue matching after the current match
+ // if the current match is not the longest possible match starting at the current offset
+ // this prevents further matching of this snippet but for possible matches of length
+ // smaller than match length + context (at least 50 characters) this match is part of the context
+ $utf8_offset = $utf8_idx + $utf8_len;
+ $offset = $idx + strlen(utf8_substr($text,$utf8_idx,$utf8_len));
$offset = utf8_correctIdx($text,$offset);
}
diff --git a/inc/html.php b/inc/html.php
index 5941a9af2..41f26e5cd 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -691,7 +691,7 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeOpenTag('div', array('class' => 'li')));
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$form->addElement(media_printicon($recent['id']));
} else {
$icon = DOKU_BASE.'lib/images/fileicons/file.png';
@@ -705,7 +705,7 @@ function html_recent($first=0, $show_changes='both'){
$diff = false;
$href = '';
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id'])));
if ($diff) {
$href = media_managerURL(array('tab_details' => 'history',
@@ -715,7 +715,7 @@ function html_recent($first=0, $show_changes='both'){
$href = wl($recent['id'],"do=diff", false, '&');
}
- if ($recent['media'] && !$diff) {
+ if (!empty($recent['media']) && !$diff) {
$form->addElement('<img src="'.DOKU_BASE.'lib/images/blank.gif" width="15" height="11" alt="" />');
} else {
$form->addElement(form_makeOpenTag('a', array('class' => 'diff_link', 'href' => $href)));
@@ -729,7 +729,7 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement(form_makeCloseTag('a'));
}
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$href = media_managerURL(array('tab_details' => 'history',
'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
} else {
@@ -745,7 +745,7 @@ function html_recent($first=0, $show_changes='both'){
)));
$form->addElement(form_makeCloseTag('a'));
- if ($recent['media']) {
+ if (!empty($recent['media'])) {
$href = media_managerURL(array('tab_details' => 'view', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&');
$class = (file_exists(mediaFN($recent['id']))) ? 'wikilink1' : $class = 'wikilink2';
$form->addElement(form_makeOpenTag('a', array('class' => $class, 'href' => $href)));
@@ -1189,7 +1189,7 @@ function html_diff($text='',$intro=true,$type=null){
$diffurl = wl($ID, array(
'do' => 'diff',
'rev2[0]' => $l_rev,
- 'rev2[1]' => $r_rev,
+ 'rev2[1]' => $r_rev ? $r_rev : $INFO['currentrev'], // link to exactly this view FS#2835
'difftype' => $type,
));
ptln('<p><a class="wikilink1" href="'.$diffurl.'">'.$lang['difflink'].'</a></p>');
@@ -1634,6 +1634,17 @@ function html_debug(){
print_r($inis);
print '</pre>';
+ if (function_exists('apache_get_version')) {
+ $apache['version'] = apache_get_version();
+
+ if (function_exists('apache_get_modules')) {
+ $apache['modules'] = apache_get_modules();
+ }
+ print '<b>Apache</b><pre>';
+ print_r($apache);
+ print '</pre>';
+ }
+
print '</body></html>';
}
diff --git a/inc/httputils.php b/inc/httputils.php
index ca60ed509..efeb2a56c 100644
--- a/inc/httputils.php
+++ b/inc/httputils.php
@@ -64,12 +64,13 @@ function http_conditionalRequest($timestamp){
* Let the webserver send the given file via x-sendfile method
*
* @author Chris Smith <chris@jalakai.co.uk>
- * @returns void or exits with previously header() commands executed
+ * @param string $file absolute path of file to send
+ * @returns void or exits with previous header() commands executed
*/
function http_sendfile($file) {
global $conf;
- //use x-sendfile header to pass the delivery to compatible webservers
+ //use x-sendfile header to pass the delivery to compatible web servers
if($conf['xsendfile'] == 1){
header("X-LIGHTTPD-send-file: $file");
ob_end_clean();
@@ -79,12 +80,12 @@ function http_sendfile($file) {
ob_end_clean();
exit;
}elseif($conf['xsendfile'] == 3){
+ // FS#2388 nginx just needs the relative path.
+ $file = DOKU_REL.substr($file, strlen(fullpath(DOKU_INC)) + 1);
header("X-Accel-Redirect: $file");
ob_end_clean();
exit;
}
-
- return false;
}
/**
@@ -92,7 +93,7 @@ function http_sendfile($file) {
*
* This function exits the running script
*
- * @param ressource $fh - file handle for an already open file
+ * @param resource $fh - file handle for an already open file
* @param int $size - size of the whole file
* @param int $mime - MIME type of the file
*
@@ -204,7 +205,7 @@ 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 scrpt is terminated.
+ * and the script is terminated.
*/
function http_cached($cache, $cache_ok) {
global $conf;
@@ -223,7 +224,8 @@ function http_cached($cache, $cache_ok) {
header('Content-Encoding: gzip');
readfile($cache.".gz");
} else {
- if (!http_sendfile($cache)) readfile($cache);
+ http_sendfile($cache);
+ readfile($cache);
}
exit;
}
diff --git a/inc/indexer.php b/inc/indexer.php
index 07f29b542..a167db47f 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -270,8 +270,9 @@ class Doku_Indexer {
// Special handling for titles so the index file is simpler
if (array_key_exists('title', $key)) {
$value = $key['title'];
- if (is_array($value))
+ if (is_array($value)) {
$value = $value[0];
+ }
$this->saveIndexKey('title', '', $pid, $value);
unset($key['title']);
}
@@ -299,20 +300,24 @@ class Doku_Indexer {
if ($val !== "") {
$id = array_search($val, $metawords, true);
if ($id === false) {
+ // didn't find $val, so we'll add it to the end of metawords and create a placeholder in metaidx
$id = count($metawords);
$metawords[$id] = $val;
+ $metaidx[$id] = '';
$addwords = true;
}
// test if value is already in the index
- if (isset($val_idx[$id]) && $val_idx[$id] <= 0)
+ if (isset($val_idx[$id]) && $val_idx[$id] <= 0){
$val_idx[$id] = 0;
- else // else add it
+ } else { // else add it
$val_idx[$id] = 1;
+ }
}
}
- if ($addwords)
+ if ($addwords) {
$this->saveIndex($metaname.'_w', '', $metawords);
+ }
$vals_changed = false;
foreach ($val_idx as $id => $action) {
if ($action == -1) {
@@ -1214,14 +1219,16 @@ class Doku_Indexer {
*/
protected function updateTuple($line, $id, $count) {
$newLine = $line;
- if ($newLine !== '')
+ if ($newLine !== ''){
$newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine);
+ }
$newLine = trim($newLine, ':');
if ($count) {
- if (strlen($newLine) > 0)
+ if (strlen($newLine) > 0) {
return "$id*$count:".$newLine;
- else
+ } else {
return "$id*$count".$newLine;
+ }
}
return $newLine;
}
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 7358955a0..0992040d9 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -102,15 +102,21 @@ function getVersion(){
function check(){
global $conf;
global $INFO;
+ /* @var Input $INPUT */
+ global $INPUT;
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);
- }else{
- msg('PHP version '.phpversion(),1);
+ if(version_compare(phpversion(),'5.2.0','<')){
+ msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
+ }else{
+ msg('PHP version '.phpversion(),1);
+ }
+ } else {
+ if(version_compare(phpversion(),'5.2.0','<')){
+ msg('Your PHP version is too old',-1);
+ }
}
$mem = (int) php_to_byte(ini_get('memory_limit'));
@@ -200,7 +206,7 @@ function check(){
}
if($INFO['userinfo']['name']){
- msg('You are currently logged in as '.$_SERVER['REMOTE_USER'].' ('.$INFO['userinfo']['name'].')',0);
+ msg('You are currently logged in as '.$INPUT->server->str('REMOTE_USER').' ('.$INFO['userinfo']['name'].')',0);
msg('You are part of the groups '.join($INFO['userinfo']['grps'],', '),0);
}else{
msg('You are currently not logged in',0);
@@ -357,6 +363,9 @@ function dbg($msg,$hidden=false){
*/
function dbglog($msg,$header=''){
global $conf;
+ /* @var Input $INPUT */
+ global $INPUT;
+
// The debug log isn't automatically cleaned thus only write it when
// debugging has been enabled by the user.
if($conf['allowdebug'] !== 1) return;
@@ -369,7 +378,7 @@ function dbglog($msg,$header=''){
$file = $conf['cachedir'].'/debug.log';
$fh = fopen($file,'a');
if($fh){
- fwrite($fh,date('H:i:s ').$_SERVER['REMOTE_ADDR'].': '.$msg."\n");
+ fwrite($fh,date('H:i:s ').$INPUT->server->str('REMOTE_ADDR').': '.$msg."\n");
fclose($fh);
}
}
diff --git a/inc/init.php b/inc/init.php
index a937b934d..4ff239787 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -140,18 +140,21 @@ if ($conf['gzip_output'] &&
}
// init session
-if (!headers_sent() && !defined('NOSESSION')){
- session_name("DokuWiki");
- $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
- if (version_compare(PHP_VERSION, '5.2.0', '>')) {
- session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()),true);
- }else{
- session_set_cookie_params(0,$cookieDir,'',($conf['securecookie'] && is_ssl()));
+if(!headers_sent() && !defined('NOSESSION')) {
+ if(!defined('DOKU_SESSION_NAME')) define ('DOKU_SESSION_NAME', "DokuWiki");
+ if(!defined('DOKU_SESSION_LIFETIME')) define ('DOKU_SESSION_LIFETIME', 0);
+ if(!defined('DOKU_SESSION_PATH')) {
+ $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'];
+ define ('DOKU_SESSION_PATH', $cookieDir);
}
+ if(!defined('DOKU_SESSION_DOMAIN')) define ('DOKU_SESSION_DOMAIN', '');
+
+ session_name(DOKU_SESSION_NAME);
+ session_set_cookie_params(DOKU_SESSION_LIFETIME, DOKU_SESSION_PATH, DOKU_SESSION_DOMAIN, ($conf['securecookie'] && is_ssl()), true);
session_start();
// load left over messages
- if(isset($_SESSION[DOKU_COOKIE]['msg'])){
+ if(isset($_SESSION[DOKU_COOKIE]['msg'])) {
$MSG = $_SESSION[DOKU_COOKIE]['msg'];
unset($_SESSION[DOKU_COOKIE]['msg']);
}
@@ -173,7 +176,7 @@ if(function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime(0);
$_REQUEST = array_merge($_GET,$_POST);
// we don't want a purge URL to be digged
-if(isset($_REQUEST['purge']) && $_SERVER['HTTP_REFERER']) unset($_REQUEST['purge']);
+if(isset($_REQUEST['purge']) && !empty($_SERVER['HTTP_REFERER'])) unset($_REQUEST['purge']);
// disable gzip if not available
if($conf['compression'] == 'bz2' && !function_exists('bzopen')){
@@ -183,11 +186,6 @@ if($conf['compression'] == 'gz' && !function_exists('gzopen')){
$conf['compression'] = 0;
}
-// fix dateformat for upgraders
-if(strpos($conf['dformat'],'%') === false){
- $conf['dformat'] = '%Y/%m/%d %H:%M';
-}
-
// precalculate file creation modes
init_creationmodes();
@@ -404,6 +402,10 @@ function remove_magic_quotes(&$array) {
* Returns the full absolute URL to the directory where
* DokuWiki is installed in (includes a trailing slash)
*
+ * !! Can not access $_SERVER values through $INPUT
+ * !! here as this function is called before $INPUT is
+ * !! initialized.
+ *
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getBaseURL($abs=null){
@@ -443,12 +445,12 @@ function getBaseURL($abs=null){
//split hostheader into host and port
if(isset($_SERVER['HTTP_HOST'])){
$parsed_host = parse_url('http://'.$_SERVER['HTTP_HOST']);
- $host = $parsed_host['host'];
- $port = $parsed_host['port'];
+ $host = isset($parsed_host['host']) ? $parsed_host['host'] : null;
+ $port = isset($parsed_host['port']) ? $parsed_host['port'] : null;
}elseif(isset($_SERVER['SERVER_NAME'])){
$parsed_host = parse_url('http://'.$_SERVER['SERVER_NAME']);
- $host = $parsed_host['host'];
- $port = $parsed_host['port'];
+ $host = isset($parsed_host['host']) ? $parsed_host['host'] : null;
+ $port = isset($parsed_host['port']) ? $parsed_host['port'] : null;
}else{
$host = php_uname('n');
$port = '';
diff --git a/inc/io.php b/inc/io.php
index c5225a2e0..27a34b045 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -367,8 +367,6 @@ function io_createNamespace($id, $ns_type='pages') {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function io_makeFileDir($file){
- global $conf;
-
$dir = dirname($file);
if(!@is_dir($dir)){
io_mkdir_p($dir) || msg("Creating directory $dir failed",-1);
diff --git a/inc/lang/bn/lang.php b/inc/lang/bn/lang.php
index 5d9ee59a0..230f3ef80 100644
--- a/inc/lang/bn/lang.php
+++ b/inc/lang/bn/lang.php
@@ -5,6 +5,7 @@
*
* @author Foysol <ragebot1125@gmail.com>
* @author ninetailz <ninetailz1125@gmail.com>
+ * @author Khan M. B. Asad <muhammad2017@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'itr';
@@ -117,3 +118,43 @@ $lang['js']['mediadisplayimg'] = 'ছবিটি দেখান';
$lang['js']['mediadisplaylnk'] = 'শুধুমাত্র লিঙ্ক দেখান';
$lang['js']['mediasmall'] = 'ক্ষুদ্র সংস্করণ';
$lang['js']['mediamedium'] = 'মাধ্যম সংস্করণ';
+$lang['js']['medialarge'] = 'বড় সংস্করণ';
+$lang['js']['mediaoriginal'] = 'আসল সংস্করণ';
+$lang['js']['medialnk'] = 'বিস্তারিত পৃষ্ঠায় লিংক';
+$lang['js']['mediadirect'] = 'মূল সরাসরি লিঙ্ক';
+$lang['js']['medianolnk'] = 'কোনো লিঙ্ক নাই';
+$lang['js']['medianolink'] = 'ইমেজ লিঙ্ক কোরো না';
+$lang['js']['medialeft'] = 'বাম দিকে ইমেজ সারিবদ্ধ কর';
+$lang['js']['mediaright'] = 'ডান দিকে ইমেজ সারিবদ্ধ কর';
+$lang['js']['mediacenter'] = 'মাঝখানে ইমেজ সারিবদ্ধ কর';
+$lang['js']['medianoalign'] = 'কোনো সারিবদ্ধ করা প্রয়োজন নেই';
+$lang['js']['nosmblinks'] = 'উইন্ডোস শেয়ার এর সাথে সংযোগ সাধন কেবল মাইক্রোসফ্ট ইন্টারনেট এক্সপ্লোরারেই সম্ভব।\nতবে আপনি লিংকটি কপি পেস্ট করতেই পারেন।';
+$lang['js']['linkwiz'] = 'লিংক উইজার্ড';
+$lang['js']['linkto'] = 'সংযোগের লক্ষ্য:';
+$lang['js']['del_confirm'] = 'নির্বাচিত আইটেম(গুলো) আসলেই মুছে ফেলতে চান?';
+$lang['js']['restore_confirm'] = 'এই সংস্করণ সত্যিই পূর্বাবস্থায় ফিরিয়ে আনতে চান?';
+$lang['js']['media_diff'] = 'পার্থক্যগুলো দেখুন:';
+$lang['js']['media_diff_both'] = 'পাশাপাশি';
+$lang['js']['media_diff_opacity'] = 'শাইন-থ্রু';
+$lang['js']['media_diff_portions'] = 'ঝেঁটিয়ে বিদায়';
+$lang['js']['media_select'] = 'ফাইল নির্বাচন...';
+$lang['js']['media_upload_btn'] = 'আপলোড';
+$lang['js']['media_done_btn'] = 'সাধিত';
+$lang['js']['media_drop'] = 'আপলোডের জন্য এখানে ফাইল ফেলুন';
+$lang['js']['media_cancel'] = 'অপসারণ';
+$lang['js']['media_overwrt'] = 'বর্তমান ফাইল ওভাররাইট করুন';
+$lang['rssfailed'] = 'ফিডটি জোগাড় করতে গিয়ে একটি ত্রুটি ঘটেছে:';
+$lang['nothingfound'] = 'কিছু পাওয়া যায়নি।';
+$lang['mediaselect'] = 'মিডিয়া ফাইল';
+$lang['fileupload'] = 'মিডিয়া ফাইল আপলোড';
+$lang['uploadsucc'] = 'আপলোড সফল';
+$lang['uploadfail'] = 'আপলোড ব্যর্থ। অনুমতি জনিত ত্রুটি কী?';
+$lang['uploadwrong'] = 'আপলোড প্রত্যাখ্যাত। এই ফাইল এক্সটেনশন অননুমোদিত।';
+$lang['uploadexist'] = 'ফাইল ইতিমধ্যেই বিরাজমান। কিছু করা হয়নি।';
+$lang['uploadbadcontent'] = 'আপলোডকৃত সামগ্রী %s ফাইল এক্সটেনশন এর সাথে মিলেনি।';
+$lang['uploadspam'] = 'স্প্যাম ব্ল্যাকলিস্ট আপলোড আটকে দিয়েছে।';
+$lang['uploadxss'] = 'সামগ্রীটি ক্ষতিকর ভেবে আপলোড আটকে দেয়া হয়েছে।';
+$lang['uploadsize'] = 'আপলোডকৃত ফাইলটি বেশি বড়ো। (সর্বোচ্চ %s)';
+$lang['deletesucc'] = '"%s" ফাইলটি মুছে ফেলা হয়েছে।';
+$lang['deletefail'] = '"%s" ডিলিট করা যায়নি - অনুমতি আছে কি না দেখুন।';
+$lang['mediainuse'] = '"%s" ফাইলটি মোছা হয়নি - এটি এখনো ব্যবহৃত হচ্ছে।';
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index 9df1035f7..1840f2a6c 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -23,6 +23,7 @@
* @author Pierre Corell <info@joomla-praxis.de>
* @author Mateng Schimmerlos <mateng@firemail.de>
* @author Benedikt Fey <spam@lifeisgoooood.de>
+ * @author Joerg <scooter22@gmx.de>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -345,3 +346,4 @@ $lang['media_restore'] = 'Diese Version wiederherstellen';
$lang['currentns'] = 'Aktueller Namensraum';
$lang['searchresult'] = 'Suchergebnisse';
$lang['plainhtml'] = 'HTML Klartext';
+$lang['wikimarkup'] = 'Wiki Markup';
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 17a75803f..cbdef8661 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -224,7 +224,7 @@ $lang['both_changes'] = 'Both pages and media files';
$lang['qb_bold'] = 'Bold Text';
$lang['qb_italic'] = 'Italic Text';
$lang['qb_underl'] = 'Underlined Text';
-$lang['qb_code'] = 'Code Text';
+$lang['qb_code'] = 'Monospaced Text';
$lang['qb_strike'] = 'Strike-through Text';
$lang['qb_h1'] = 'Level 1 Headline';
$lang['qb_h2'] = 'Level 2 Headline';
diff --git a/inc/lang/eo/admin.txt b/inc/lang/eo/admin.txt
index 4b0cf7909..4b3cf0c2a 100644
--- a/inc/lang/eo/admin.txt
+++ b/inc/lang/eo/admin.txt
@@ -1,3 +1,3 @@
====== Administrado ======
-Sube vi povas trovi liston de administraj taskoj disponeblaj en DokuWiki.
+Sube vi trovas liston de administraj taskoj haveblaj en DokuWiki.
diff --git a/inc/lang/eo/adminplugins.txt b/inc/lang/eo/adminplugins.txt
index 769a8c538..bb7e7829b 100644
--- a/inc/lang/eo/adminplugins.txt
+++ b/inc/lang/eo/adminplugins.txt
@@ -1 +1 @@
-===== Eksteraj kromaĵoj ===== \ No newline at end of file
+===== Aldonaj kromaĵoj ===== \ No newline at end of file
diff --git a/inc/lang/eo/diff.txt b/inc/lang/eo/diff.txt
index 5829a7db1..3c9db61c8 100644
--- a/inc/lang/eo/diff.txt
+++ b/inc/lang/eo/diff.txt
@@ -1,4 +1,4 @@
====== Diferencoj ======
-Ĉi tie vi povas vidi diferencojn inter la aktuala versio kaj la elektita revizio de la paĝo.
+Tio montras diferencojn inter du versioj de la paĝo.
diff --git a/inc/lang/eo/draft.txt b/inc/lang/eo/draft.txt
index 32ddc83f6..57526f3b5 100644
--- a/inc/lang/eo/draft.txt
+++ b/inc/lang/eo/draft.txt
@@ -1,5 +1,5 @@
====== Skiza dosiero troviĝis ======
-Via lasta sekcio de redakto en tiu ĉi paĝo ne korekte kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sekcio.
+Via lasta redaktosesio en tiu ĉi paĝo ne ĝuste kompletiĝis. DokuWiki aŭtomate konservis skizon dum vi laboris, kiun vi nun povas uzi por daŭrigi vian redaktadon. Sube vi povas vidi la datumaron, kiu konserviĝis el via lasta sesio.
Bonvolu decidi ĉu vi volas //restarigi// vian perditan redakton, //forigi// la aŭtomate konservitan skizon aŭ //rezigni// pri la redakta procezo.
diff --git a/inc/lang/eo/edit.txt b/inc/lang/eo/edit.txt
index 29b3382c5..ccc8a613d 100644
--- a/inc/lang/eo/edit.txt
+++ b/inc/lang/eo/edit.txt
@@ -1 +1 @@
-Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] por kompreni kiel vi povas krei paĝojn. Bonvolu redakti nur se vi planas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[wiki:playground|ludejo]].
+Redaktu paĝon kaj poste premu butonon titolitan '"Konservi'". Bonvolu tralegi la [[wiki:syntax|vikian sintakson]] pri la formatigo. Bonvolu redakti **nur**, se vi povas **plibonigi** la enhavon de la paĝo. Se vi volas nur testi ion, bonvolu uzi specialan paĝon: [[playground:playground|sablokesto]].
diff --git a/inc/lang/eo/editrev.txt b/inc/lang/eo/editrev.txt
index 1640baa91..2e1406b0f 100644
--- a/inc/lang/eo/editrev.txt
+++ b/inc/lang/eo/editrev.txt
@@ -1,2 +1,2 @@
-**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun la sama enhavo.
+**Vi laboras kun malnova revizio de la dokumento!** Se vi konservos ĝin, kreiĝos nova kuranta versio kun tiu enhavo.
----
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index a543b2571..97231bdce 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -37,13 +37,13 @@ $lang['btn_secedit'] = 'Redakti';
$lang['btn_login'] = 'Ensaluti';
$lang['btn_logout'] = 'Elsaluti';
$lang['btn_admin'] = 'Administri';
-$lang['btn_update'] = 'Ĝisdatigi';
+$lang['btn_update'] = 'Aktualigi';
$lang['btn_delete'] = 'Forigi';
$lang['btn_back'] = 'Retroiri';
$lang['btn_backlink'] = 'Retroligoj';
$lang['btn_backtomedia'] = 'Retroiri al elekto de dosiero';
$lang['btn_subscribe'] = 'Aliĝi al paĝaj modifoj';
-$lang['btn_profile'] = 'Ĝisdatigi profilon';
+$lang['btn_profile'] = 'Aktualigi profilon';
$lang['btn_reset'] = 'Rekomenci';
$lang['btn_resendpwd'] = 'Sendi novan pasvorton';
$lang['btn_draft'] = 'Redakti skizon';
@@ -53,7 +53,7 @@ $lang['btn_revert'] = 'Restarigi';
$lang['btn_register'] = 'Registriĝi';
$lang['btn_apply'] = 'Apliki';
$lang['btn_media'] = 'Medio-administrilo';
-$lang['btn_deleteuser'] = 'Forigi mian aliĝon';
+$lang['btn_deleteuser'] = 'Forigi mian konton';
$lang['loggedinas'] = 'Ensalutinta kiel';
$lang['user'] = 'Uzant-nomo';
$lang['pass'] = 'Pasvorto';
@@ -81,7 +81,7 @@ $lang['reghere'] = 'Se vi ne havas konton, vi povas akiri ĝin';
$lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profiloj.';
$lang['profnochange'] = 'Neniu ŝanĝo, nenio farinda.';
$lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata.';
-$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.';
+$lang['profchanged'] = 'La profilo de la uzanto sukcese aktualiĝis.';
$lang['profnodelete'] = 'Tiu ĉi vikio ne subtenas forigo de uzantoj';
$lang['profdeleteuser'] = 'Forigi aliĝon';
$lang['profdeleted'] = 'Via uzant-aliĝo estis forigata de tiu ĉi vikio';
@@ -104,7 +104,7 @@ $lang['txt_filename'] = 'Alŝuti kiel (laŭvole)';
$lang['txt_overwrt'] = 'Anstataŭigi ekzistantan dosieron';
$lang['maxuploadsize'] = 'Alŝuto maks. %s po dosiero.';
$lang['lockedby'] = 'Nune ŝlosita de';
-$lang['lockexpire'] = 'Ŝlosado ĉesos en';
+$lang['lockexpire'] = 'Ŝlosado ĉesos je';
$lang['js']['willexpire'] = 'Vi povos redakti ĉi tiun paĝon post unu minuto.\nSe vi volas nuligi tempokontrolon de la ŝlosado, premu la butonon "Antaŭrigardi".';
$lang['js']['notsavedyet'] = 'Ne konservitaj modifoj perdiĝos.
Ĉu vi certe volas daŭrigi la procezon?';
@@ -293,6 +293,7 @@ $lang['i_policy'] = 'Komenca ACL-a agordo';
$lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)';
$lang['i_pol1'] = 'Publika Vikio (legi povas ĉiuj, skribi kaj alŝuti povas registritaj uzantoj)';
$lang['i_pol2'] = 'Ferma Vikio (legi, skribi, alŝuti nur povas registritaj uzantoj)';
+$lang['i_allowreg'] = 'Permesi al uzantoj registri sin mem';
$lang['i_retry'] = 'Reprovi';
$lang['i_license'] = 'Bonvolu elekti la permesilon, sub kiun vi volas meti vian enhavon:';
$lang['i_license_none'] = 'Ne montri licencinformojn';
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index 216093f6c..b9f81dd82 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -31,6 +31,7 @@
* @author r0sk <r0sk10@gmail.com>
* @author monica <may.dorado@gmail.com>
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
diff --git a/inc/lang/et/adminplugins.txt b/inc/lang/et/adminplugins.txt
new file mode 100644
index 000000000..ee3ffb0a7
--- /dev/null
+++ b/inc/lang/et/adminplugins.txt
@@ -0,0 +1 @@
+===== Täiendavad laiendused ===== \ No newline at end of file
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index cc736db4d..fdfae2d9d 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -1,13 +1,15 @@
<?php
+
/**
- * Estonian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Oliver S6ro <seem.iges@mail.ee>
* @author Aari Juhanson <aari@vmg.vil.ee>
* @author Kaiko Kaur <kaiko@kultuur.edu.ee>
* @author kristian.kankainen@kuu.la
* @author Rivo Zängov <eraser@eraser.ee>
+ * @author Janar Leas <janarleas@gmail.com>
+ * @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,11 +45,15 @@ $lang['btn_backtomedia'] = 'Tagasi faili valikusse';
$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)';
$lang['btn_profile'] = 'Minu info';
$lang['btn_reset'] = 'Taasta';
+$lang['btn_resendpwd'] = 'Sea uus salasõna';
$lang['btn_draft'] = 'Toimeta mustandit';
$lang['btn_recover'] = 'Taata mustand';
$lang['btn_draftdel'] = 'Kustuta mustand';
$lang['btn_revert'] = 'Taasta';
$lang['btn_register'] = 'Registreeri uus kasutaja';
+$lang['btn_apply'] = 'Kinnita';
+$lang['btn_media'] = 'Meedia haldur';
+$lang['btn_deleteuser'] = 'Eemalda minu konto';
$lang['loggedinas'] = 'Logis sisse kui';
$lang['user'] = 'Kasutaja';
$lang['pass'] = 'Parool';
@@ -59,8 +65,10 @@ $lang['fullname'] = 'Täielik nimi';
$lang['email'] = 'E-post';
$lang['profile'] = 'Kasutaja info';
$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.';
+$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['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.';
@@ -76,21 +84,30 @@ $lang['profna'] = 'Viki ei toeta profiili muudatusi';
$lang['profnochange'] = 'Muutused puuduvad.';
$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.';
$lang['profchanged'] = 'Kasutaja info edukalt muudetud';
+$lang['profnodelete'] = 'See wiki ei toeta kasutajate kustutamist';
+$lang['profdeleteuser'] = 'Kustuta konto';
+$lang['profdeleted'] = 'Sinu kasutajakonto on sellest wikist kustutatud';
+$lang['profconfdelete'] = 'Soovin sellest wikist oma konnto eemaldada. <br/> See tegevus on taastamatu.';
+$lang['profconfdeletemissing'] = 'Kinnituse valikkast märkimata.';
$lang['pwdforget'] = 'Unustasid parooli? Tee uus';
$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.';
+$lang['resendpwd'] = 'Sea uus salasõna';
$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.';
$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.';
$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.';
$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.';
$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.';
+$lang['license'] = 'Kus pole öeldud teisiti, kehtib selle wiki sisule järgmine leping:';
+$lang['licenseok'] = 'Teadmiseks: Toimetades seda lehte, nõustud avaldama oma sisu järgmise lepingu alusel:';
$lang['searchmedia'] = 'Otsi failinime:';
$lang['searchmedia_in'] = 'Otsi %s';
$lang['txt_upload'] = 'Vali fail, mida üles laadida';
$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)';
$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle';
+$lang['maxuploadsize'] = 'Üleslaadimiseks lubatu enim %s faili kohta.';
$lang['lockedby'] = 'Praegu on selle lukustanud';
$lang['lockexpire'] = 'Lukustus aegub';
-$lang['js']['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.';
+$lang['js']['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.';
$lang['js']['notsavedyet'] = 'Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad.
Kas Sa ikka tahad edasi liikuda?';
$lang['js']['searchmedia'] = 'Otsi faile';
@@ -122,6 +139,17 @@ Siiski võid kopeerida ja asetada lingi.';
$lang['js']['linkwiz'] = 'Lingi nõustaja';
$lang['js']['linkto'] = 'Lingi:';
$lang['js']['del_confirm'] = 'Kas kustutame selle kirje?';
+$lang['js']['restore_confirm'] = 'Tõesti taastad selle järgu?';
+$lang['js']['media_diff'] = 'Vaatle erisusi:';
+$lang['js']['media_diff_both'] = 'Kõrvuti';
+$lang['js']['media_diff_opacity'] = 'Kuma läbi';
+$lang['js']['media_diff_portions'] = 'Puhasta';
+$lang['js']['media_select'] = 'Vali failid…';
+$lang['js']['media_upload_btn'] = 'Lae üles';
+$lang['js']['media_done_btn'] = 'Valmis';
+$lang['js']['media_drop'] = 'Üleslaadimiseks viska failid siia';
+$lang['js']['media_cancel'] = 'eemalda';
+$lang['js']['media_overwrt'] = 'Asenda olemasolevad failid';
$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: ';
$lang['nothingfound'] = 'Oops, aga mitte muhvigi ei leitud.';
$lang['mediaselect'] = 'Hunnik faile';
@@ -131,6 +159,8 @@ $lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa sel
$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida';
$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.';
$lang['uploadbadcontent'] = 'Üles laaditu ei sobinud %s faililaiendiga.';
+$lang['uploadspam'] = 'Üleslaadimine tõrjuti rämpssisu vältija poolt.';
+$lang['uploadxss'] = 'Üleslaadimine tõrjuti kahtlase sisu võimaluse tõttu';
$lang['uploadsize'] = 'Üles laaditud fail on liiga suur (maksimaalne suurus on %s).';
$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.';
$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).';
@@ -155,6 +185,7 @@ $lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga';
$lang['diff2'] = 'Näita valitud versioonide erinevusi';
$lang['difflink'] = 'Lõlita võrdlemise vaatele';
$lang['diff_type'] = 'Vaata erinevusi:';
+$lang['diff_inline'] = 'Jooksvalt';
$lang['diff_side'] = 'Kõrvuti';
$lang['line'] = 'Rida';
$lang['breadcrumb'] = 'Käidud rada';
@@ -166,9 +197,22 @@ $lang['created'] = 'tekitatud';
$lang['restored'] = 'vana versioon taastatud (%s)';
$lang['external_edit'] = 'väline muutmine';
$lang['summary'] = 'kokkuvõte muudatustest';
+$lang['noflash'] = 'Sele sisu vaatamisesks on vajalik <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Laiendus</a>.';
+$lang['tools'] = 'Tööriistad';
+$lang['user_tools'] = 'Kasutaja tarvikud';
+$lang['site_tools'] = 'Lehe tööriistad';
+$lang['page_tools'] = 'Lehekülje tarvikud';
+$lang['skip_to_content'] = 'mine sisule';
+$lang['sidebar'] = 'Külgriba';
$lang['mail_newpage'] = 'leht lisatud:';
$lang['mail_changed'] = 'leht muudetud';
+$lang['mail_subscribe_list'] = 'muutunud lehed nimeruumis:';
$lang['mail_new_user'] = 'Uus kasutaja:';
+$lang['mail_upload'] = 'üles laetud fail:';
+$lang['changes_type'] = 'Näita mmutuseid';
+$lang['pages_changes'] = 'Leheküljed';
+$lang['media_changes'] = 'Meedia failid';
+$lang['both_changes'] = 'Mõlemid, leheküljed ja meedia failid';
$lang['qb_bold'] = 'Rasvane kiri';
$lang['qb_italic'] = 'Kaldkiri';
$lang['qb_underl'] = 'Alajoonega kiri';
@@ -193,6 +237,7 @@ $lang['qb_media'] = 'Lisa pilte ja muid faile';
$lang['qb_sig'] = 'Lisa allkiri!';
$lang['qb_smileys'] = 'Emotikonid';
$lang['qb_chars'] = 'Erisümbolid';
+$lang['upperns'] = 'mine ülemisse nimeruumi';
$lang['admin_register'] = 'Lisa kasutaja';
$lang['metaedit'] = 'Muuda lisainfot';
$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.';
@@ -208,7 +253,26 @@ $lang['img_copyr'] = 'Autoriõigused';
$lang['img_format'] = 'Formaat';
$lang['img_camera'] = 'Kaamera';
$lang['img_keywords'] = 'Võtmesõnad';
+$lang['img_width'] = 'Laius';
+$lang['img_height'] = 'Kõrgus';
+$lang['img_manager'] = 'Näita meediahalduris';
+$lang['subscr_style_every'] = 'igast toimetamisest teavitab ekiri';
+$lang['subscr_style_digest'] = 'kokkuvõte ekirjaga toimetamistest igal leheküljel (iga %.2f päeva järel)';
+$lang['subscr_style_list'] = 'Peale viimast ekirja (iga %.2f päeva järel) toimetaud lehekülgede loend.';
+$lang['subscr_subscribe_success'] = '%s lisati %s tellijaks';
+$lang['subscr_subscribe_error'] = 'Viga %s lisamisel %s tellijaks';
+$lang['subscr_subscribe_noaddress'] = 'Sinu kasutajaga pole seotud ühtegi aadressi, seega ei saa sind tellijaks lisada';
+$lang['subscr_unsubscribe_success'] = '%s eemaldati %s tellijatest';
+$lang['subscr_unsubscribe_error'] = 'Viga %s eemaldamisel %s tellijatest';
+$lang['subscr_already_subscribed'] = '%s on juba %s tellija';
+$lang['subscr_not_subscribed'] = '%s pole %s tellija';
+$lang['subscr_m_not_subscribed'] = 'Sina pole hetkel selle lehekülje ega nimeruumi tellija.';
+$lang['subscr_m_new_header'] = 'Lisa tellimus';
+$lang['subscr_m_current_header'] = 'Hetkel tellitud';
+$lang['subscr_m_unsubscribe'] = 'Eemalda tellimus';
+$lang['subscr_m_subscribe'] = 'Telli';
$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.';
+$lang['authpwdexpire'] = 'Sinu salasõna aegub %päeva pärast, võiksid seda peatselt muuta.';
$lang['i_chooselang'] = 'Vali keel';
$lang['i_installer'] = 'DokuWiki paigaldaja';
$lang['i_wikiname'] = 'Wiki nimi';
@@ -218,9 +282,11 @@ $lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool
$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal.
Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka <a href="http://dokuwiki.org/install">Dokuwiki installeerimis juhendit</a>';
$lang['i_funcna'] = 'PHP funktsiooni <code>%s</code> ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?';
+$lang['i_phpver'] = 'Sinu PHP versioon <code>%s</code> on vanem nõutavast <code>%s</code>. Pead oma paigaldatud PHP-d uuendama.';
$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili <code>%s</code>. Kontrolli serveris failide õigused üle.';
$lang['i_confexists'] = '<code>%s</code> on juba olemas';
$lang['i_writeerr'] = 'Faili <code>%s</code> ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.';
+$lang['i_badhash'] = 'Tundmatu või muutunud dokuwiki.php (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - lubamatu või tühi väärtus';
$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma <a href="doku.php?id=wiki:welcome">uue DokuWiki</a> täitmist.';
$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne <a href="doku.php?id=wiki:welcome">uue DokuWiki</a> täitma asumist.';
@@ -228,4 +294,45 @@ $lang['i_policy'] = 'Wiki õiguste algne poliitika';
$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)';
$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)';
$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)';
+$lang['i_allowreg'] = 'Luba kasutajail endid ise arvele võtta';
$lang['i_retry'] = 'Proovi uuesti';
+$lang['i_license'] = 'Vali leping, mille alusel wiki sisu avaldatakse:';
+$lang['i_license_none'] = 'Ära näita mingit lepingu teavet';
+$lang['i_pop_field'] = 'Aitake meil täiendada DokuWiki kasutuskogemsut:';
+$lang['i_pop_label'] = 'Kord kuus, saada DokuWiki arendajatele anonüümseid kasutus andmeid.';
+$lang['recent_global'] = 'Uurid hetkel nimeruumi <b>%s</b> muudatusi. Võid uurida ka <a href="%s">kogu selle wiki</a> muudatusi.';
+$lang['years'] = '%d aasta eest';
+$lang['months'] = '%d kuu eest';
+$lang['weeks'] = '%d nädala eest';
+$lang['days'] = '%d päeva eest';
+$lang['hours'] = '%d tunni eest';
+$lang['minutes'] = '%d minuti eest';
+$lang['seconds'] = '%d sekundi eest';
+$lang['wordblock'] = 'Sinu toimetus jäeti muutmata tõrjutud teksti tõttu (rämpspost?).';
+$lang['media_uploadtab'] = 'Lae-↑ ';
+$lang['media_searchtab'] = 'Otsi';
+$lang['media_file'] = 'Fail';
+$lang['media_viewtab'] = 'Vaata';
+$lang['media_edittab'] = 'Toimeta';
+$lang['media_historytab'] = 'Ajalugu';
+$lang['media_list_thumbs'] = 'Pisipildid';
+$lang['media_list_rows'] = 'Ridu';
+$lang['media_sort_name'] = 'Nimi';
+$lang['media_sort_date'] = 'Kuupäev';
+$lang['media_namespaces'] = 'Vali nimeruum';
+$lang['media_files'] = 'Failid %s-is';
+$lang['media_upload'] = 'Lae %s-ssi';
+$lang['media_search'] = 'Leia %s-st';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s asub %s-s';
+$lang['media_edit'] = 'Muuda %s-i';
+$lang['media_history'] = '%s ajalugu';
+$lang['media_meta_edited'] = 'toimetati päiseteavet';
+$lang['media_perm_read'] = 'Sul pole piisavaid õigusi failide vaatamiseks';
+$lang['media_perm_upload'] = 'Sul pole piisavaid õigusi failide üleslaadimiseks';
+$lang['media_update'] = 'Lea üles uus järk';
+$lang['media_restore'] = 'Ennista sellele järgule';
+$lang['currentns'] = 'Hetkel nimeruumis';
+$lang['searchresult'] = 'Otsingu tulemus';
+$lang['plainhtml'] = 'Liht-HTML';
+$lang['wikimarkup'] = 'Wiki märgistus';
diff --git a/inc/lang/et/resetpwd.txt b/inc/lang/et/resetpwd.txt
new file mode 100644
index 000000000..3a802986f
--- /dev/null
+++ b/inc/lang/et/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Sea uus salasõna ======
+
+Sisesta oma selle wiki kasutajale uus salasõna \ No newline at end of file
diff --git a/inc/lang/et/subscr_digest.txt b/inc/lang/et/subscr_digest.txt
new file mode 100644
index 000000000..7446fd9f4
--- /dev/null
+++ b/inc/lang/et/subscr_digest.txt
@@ -0,0 +1,21 @@
+Tere!
+
+Wiki-s @TITLE@ toimetati lehekülge @PAGE@.
+
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/subscr_form.txt b/inc/lang/et/subscr_form.txt
new file mode 100644
index 000000000..45d911f72
--- /dev/null
+++ b/inc/lang/et/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Tellimuste haldus ======
+
+See lehekülg lubab sul hallata oma tellimusi antud leheküljele ja nimeruumi. \ No newline at end of file
diff --git a/inc/lang/et/subscr_list.txt b/inc/lang/et/subscr_list.txt
new file mode 100644
index 000000000..0629651b7
--- /dev/null
+++ b/inc/lang/et/subscr_list.txt
@@ -0,0 +1,19 @@
+Tere!
+
+Wiki-s @TITLE@ toimetati nimeruumi @PAGE@.
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/subscr_single.txt b/inc/lang/et/subscr_single.txt
new file mode 100644
index 000000000..149c95ad1
--- /dev/null
+++ b/inc/lang/et/subscr_single.txt
@@ -0,0 +1,23 @@
+Tere!
+
+Wikis @TITLE@ toimetati lehekülge @PAGE@.
+Muudatustest lähemalt:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Kuupäev : @DATE@
+Kasutaja : @USER@
+Kokkuvõte: @SUMMARY@
+Endine: @OLDPAGE@
+Uus: @NEWPAGE@
+
+Lehekülje teavituste katkestamiseks, sisene wiki-sse aadressil @DOKUWIKIURL@
+ja mine:
+@SUBSCRIBE@
+ning loobu lehekülje ja/või nimeruumi muudatuste teavitustest.
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/et/uploadmail.txt b/inc/lang/et/uploadmail.txt
new file mode 100644
index 000000000..2d3a6aa7e
--- /dev/null
+++ b/inc/lang/et/uploadmail.txt
@@ -0,0 +1,16 @@
+Sinu DokuWiki-sse lisati fail.
+Lähemalt:
+
+ Fail : @MEDIA@
+ Endine : @OLD@
+ Kuupäev : @DATE@
+ Veebilehitseja : @BROWSER@
+ IP-aadress : @IPADDRESS@
+ Hostinimi : @HOSTNAME@
+ Suurus : @SIZE@
+ MIME liik : @MIME@
+ Kasutaja : @ USER@
+
+--
+Selle e-kirja lõi DokuWiki aadressilt
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt
index 20d4d6755..56c59a7c2 100644
--- a/inc/lang/fr/denied.txt
+++ b/inc/lang/fr/denied.txt
@@ -1,3 +1,3 @@
====== Autorisation refusée ======
-Désolé, vous n'avez pas les droits pour continuer. Peut-être avez-vous oublié de vous identifier ?
+Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande. Peut-être avez-vous oublié de vous identifier ?
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index 49f617323..32e3055f7 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -29,6 +29,7 @@
* @author Bruno Veilleux <bruno.vey@gmail.com>
* @author Emmanuel <seedfloyd@gmail.com>
* @author Jérôme Brandt <jeromebrandt@gmail.com>
+ * @author Wild <wild.dagger@free.fr>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -51,10 +52,10 @@ $lang['btn_revs'] = 'Anciennes révisions';
$lang['btn_recent'] = 'Derniers changements';
$lang['btn_upload'] = 'Envoyer';
$lang['btn_cancel'] = 'Annuler';
-$lang['btn_index'] = 'Index';
+$lang['btn_index'] = 'Plan du site';
$lang['btn_secedit'] = 'Modifier';
-$lang['btn_login'] = 'Connexion';
-$lang['btn_logout'] = 'Déconnexion';
+$lang['btn_login'] = 'S\'identifier';
+$lang['btn_logout'] = 'Se déconnecter';
$lang['btn_admin'] = 'Administrer';
$lang['btn_update'] = 'Mettre à jour';
$lang['btn_delete'] = 'Effacer';
@@ -69,7 +70,7 @@ $lang['btn_draft'] = 'Modifier le brouillon';
$lang['btn_recover'] = 'Récupérer le brouillon';
$lang['btn_draftdel'] = 'Effacer le brouillon';
$lang['btn_revert'] = 'Restaurer';
-$lang['btn_register'] = 'S\'enregistrer';
+$lang['btn_register'] = 'Créer un compte';
$lang['btn_apply'] = 'Appliquer';
$lang['btn_media'] = 'Gestionnaire de médias';
$lang['btn_deleteuser'] = 'Supprimer mon compte';
diff --git a/inc/lang/hu-formal/admin.txt b/inc/lang/hu-formal/admin.txt
new file mode 100644
index 000000000..b661bfb17
--- /dev/null
+++ b/inc/lang/hu-formal/admin.txt
@@ -0,0 +1,3 @@
+===== Beállítások =====
+
+Alább találja a DokuWiki-ben elérhető beállítási lehetőségek listáját. \ No newline at end of file
diff --git a/inc/lang/hu-formal/adminplugins.txt b/inc/lang/hu-formal/adminplugins.txt
new file mode 100644
index 000000000..b077521fb
--- /dev/null
+++ b/inc/lang/hu-formal/adminplugins.txt
@@ -0,0 +1 @@
+===== További bővítmények ===== \ No newline at end of file
diff --git a/inc/lang/hu-formal/backlinks.txt b/inc/lang/hu-formal/backlinks.txt
new file mode 100644
index 000000000..437eb2e25
--- /dev/null
+++ b/inc/lang/hu-formal/backlinks.txt
@@ -0,0 +1,3 @@
+====== Hivatkozások ======
+
+Mindazon oldalak listája, amelyek az aktuális oldalra hivatkoznak. \ No newline at end of file
diff --git a/inc/lang/hu-formal/conflict.txt b/inc/lang/hu-formal/conflict.txt
new file mode 100644
index 000000000..6718d67e6
--- /dev/null
+++ b/inc/lang/hu-formal/conflict.txt
@@ -0,0 +1,5 @@
+====== Újabb változat érhető el ======
+
+Az Ön által szerkesztett oldalnak már egy újabb változata érhető el. Ez akkor fordulhat elő, ha egy másik felhasználó módosította a dokumtemot, mialatt Ön is szerkesztette azt.
+
+Vizsgálja meg az alább látható eltéréseket, majd döntse el, melyik változatot tartja meg. Ha a "Mentés" gombot választja, az Ön verziója mentődik el. Kattintson a "Mégsem" gombra a jelenlegi változat megtartásához. \ No newline at end of file
diff --git a/inc/lang/hu-formal/denied.txt b/inc/lang/hu-formal/denied.txt
new file mode 100644
index 000000000..97abd632a
--- /dev/null
+++ b/inc/lang/hu-formal/denied.txt
@@ -0,0 +1,3 @@
+====== Hozzáférés megtadadva ======
+
+Sajnáljuk, de nincs joga a folytatáshoz. Talán elfelejtett bejelentkezni? \ No newline at end of file
diff --git a/inc/lang/hu-formal/diff.txt b/inc/lang/hu-formal/diff.txt
new file mode 100644
index 000000000..f922a504a
--- /dev/null
+++ b/inc/lang/hu-formal/diff.txt
@@ -0,0 +1,3 @@
+====== Eltérések ======
+
+Az oldal két változata közötti különbségek az alábbiak. \ No newline at end of file
diff --git a/inc/lang/hu-formal/draft.txt b/inc/lang/hu-formal/draft.txt
new file mode 100644
index 000000000..9233eacad
--- /dev/null
+++ b/inc/lang/hu-formal/draft.txt
@@ -0,0 +1,5 @@
+===== Piszkozatot találtam =====
+
+Az Ön ezen az oldalon végzett utolsó szerkesztési művelete helytelenül fejeződött be. A DokuWiki automatikusan elmentett egy piszkozatot az Ön munkája során. Alább láthatók az utolsó munkafázis mentett adatai.
+
+Kérjük, döntse el, hogy //helyreállítja-e// a befejezetlen módosításokat, vagy //törli// az automatikusan mentett piszkozatot, vagy //megszakítja// a szerkesztési folyamatot. \ No newline at end of file
diff --git a/inc/lang/hu-formal/edit.txt b/inc/lang/hu-formal/edit.txt
new file mode 100644
index 000000000..08f648ba6
--- /dev/null
+++ b/inc/lang/hu-formal/edit.txt
@@ -0,0 +1 @@
+Módosítsa az oldalt, majd kattintson a "Mentés" gombra. A wiki-szintaxishoz nézze meg a [[wiki:syntax|szintaxis]] oldalt. Kérjük, csak akkor módosítsa az oldalt, ha **tökéletesíteni**, **javítani** tudja. Amennyiben szeretne kipróbálni ezt-azt, a [[playground:playground|játszótéren]] megtanulhatja az első lépéseket. \ No newline at end of file
diff --git a/inc/lang/hu-formal/editrev.txt b/inc/lang/hu-formal/editrev.txt
new file mode 100644
index 000000000..2eca33c7a
--- /dev/null
+++ b/inc/lang/hu-formal/editrev.txt
@@ -0,0 +1,2 @@
+**A dokumentum egy korábbi változatát töltötte be!** Ha az oldalt elmenti, akkor egy új változat jön létre belőle.
+---- \ No newline at end of file
diff --git a/inc/lang/hu-formal/index.txt b/inc/lang/hu-formal/index.txt
new file mode 100644
index 000000000..0f2b18fd2
--- /dev/null
+++ b/inc/lang/hu-formal/index.txt
@@ -0,0 +1,3 @@
+====== Oldaltérkép (tartalom) ======
+
+Az összes elérhető oldal [[doku>namespaces|névterek]] szerint rendezett oldaltérképe. \ No newline at end of file
diff --git a/inc/lang/hu-formal/lang.php b/inc/lang/hu-formal/lang.php
new file mode 100644
index 000000000..a98bdc0d3
--- /dev/null
+++ b/inc/lang/hu-formal/lang.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marina Vladi <deldadam@gmail.com>
+ */
+$lang['encoding'] = 'utf-8';
+$lang['direction'] = 'ltr';
+$lang['doublequoteopening'] = '„';
+$lang['doublequoteclosing'] = '”';
+$lang['singlequoteopening'] = '‚';
+$lang['singlequoteclosing'] = '’';
+$lang['apostrophe'] = '’';
+$lang['btn_edit'] = 'Oldal módosítása';
+$lang['btn_source'] = 'Forrás megtekintése';
+$lang['btn_show'] = 'Oldal megtekintése';
+$lang['btn_create'] = 'Oldal létrehozása';
+$lang['btn_search'] = 'Keresés';
+$lang['btn_save'] = 'Mentés';
+$lang['btn_preview'] = 'Előnézet';
+$lang['btn_top'] = 'Oldal tetejére';
+$lang['btn_newer'] = '<< újabb';
+$lang['btn_older'] = 'régebbi >>';
+$lang['btn_revs'] = 'Korábbi változatok';
+$lang['btn_recent'] = 'Legújabb változások';
+$lang['btn_upload'] = 'Feltöltés';
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index 5113e1cc8..a0aef9447 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -337,4 +337,4 @@ $lang['media_restore'] = 'Ezen verzió visszaállítása';
$lang['currentns'] = 'Aktuális névtér';
$lang['searchresult'] = 'Keresés eredménye';
$lang['plainhtml'] = 'Sima HTML';
-$lang['wikimarkup'] = 'Wiki-jelölő nyelv';
+$lang['wikimarkup'] = 'Wiki-jelölőnyelv';
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index e5e3e3c76..e22aa9fff 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -22,6 +22,7 @@
* @author Klap-in <klapinklapin@gmail.com>
* @author Remon <no@email.local>
* @author gicalle <gicalle@hotmail.com>
+ * @author Rene <wllywlnt@yahoo.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 208d647a8..3515d02ce 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -24,6 +24,7 @@
* @author Pavel <ivanovtsk@mail.ru>
* @author Artur <ncuxxx@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
*/
$lang['encoding'] = ' utf-8';
$lang['direction'] = 'ltr';
@@ -350,3 +351,4 @@ $lang['media_restore'] = 'Восстановить эту версию';
$lang['currentns'] = 'Текущее пространство имен';
$lang['searchresult'] = 'Результаты поиска';
$lang['plainhtml'] = 'Чистый HTML';
+$lang['wikimarkup'] = 'вики-разметка';
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index 371b6659d..c9a47927d 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -9,6 +9,7 @@
* @author Gregor Skumavc (grega.skumavc@gmail.com)
* @author Matej Urbančič (mateju@svn.gnome.org)
* @author Matej Urbančič <mateju@svn.gnome.org>
+ * @author matej <mateju@svn.gnome.org>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -265,6 +266,7 @@ $lang['subscr_style_every'] = 'elektronsko sporočilo ob vsaki spremembi';
$lang['subscr_style_digest'] = 'strnjeno elektronsko sporočilo sprememb za vsako stran (vsakih %.2f dni)';
$lang['subscr_style_list'] = 'seznam spremenjenih strani od zadnjega elektronskega sporočila (vsakih %.2f dni)';
$lang['authtempfail'] = 'Potrditev uporabnika je trenutno nedostopna. Stopite v stik s skrbnikom sistema wiki.';
+$lang['authpwdexpire'] = 'Geslo bo poteklo v %d dneh. Priporočljivo ga je zamenjati.';
$lang['i_chooselang'] = 'Izberite jezik';
$lang['i_installer'] = 'DokuWiki namestitev';
$lang['i_wikiname'] = 'Ime Wiki spletišča';
@@ -324,3 +326,4 @@ $lang['media_restore'] = 'Obnovi to različico';
$lang['currentns'] = 'Trenutni imenski prostor';
$lang['searchresult'] = 'Rezultati iskanja';
$lang['plainhtml'] = 'Zapis HTML';
+$lang['wikimarkup'] = 'Oblikovni jezik Wiki';
diff --git a/inc/lang/sl/resetpwd.txt b/inc/lang/sl/resetpwd.txt
new file mode 100644
index 000000000..c2a81ab9a
--- /dev/null
+++ b/inc/lang/sl/resetpwd.txt
@@ -0,0 +1 @@
+====== Nastavitev novega gesla ======<br><br>Vnesite novo geslo za račun Wiki. \ No newline at end of file
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 004997d6e..8777c65a5 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -20,6 +20,8 @@
* @author Yangyu Huang <yangyu.huang@gmail.com>
* @author anjianshi <anjianshi@gmail.com>
* @author oott123 <ip.192.168.1.1@qq.com>
+ * @author Cupen <Cupenoruler@foxmail.com>
+ * @author xiqingongzi <Xiqingongzi@Gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
diff --git a/inc/load.php b/inc/load.php
index 497dd6921..f1deffe19 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -96,6 +96,12 @@ function load_autoload($name){
'DokuWiki_Remote_Plugin' => DOKU_PLUGIN.'remote.php',
'DokuWiki_Auth_Plugin' => DOKU_PLUGIN.'auth.php',
+ 'Doku_Renderer' => DOKU_INC.'inc/parser/renderer.php',
+ 'Doku_Renderer_xhtml' => DOKU_INC.'inc/parser/xhtml.php',
+ 'Doku_Renderer_code' => DOKU_INC.'inc/parser/code.php',
+ 'Doku_Renderer_xhtmlsummary' => DOKU_INC.'inc/parser/xhtmlsummary.php',
+ 'Doku_Renderer_metadata' => DOKU_INC.'inc/parser/metadata.php',
+
);
if(isset($classes[$name])){
diff --git a/inc/mail.php b/inc/mail.php
index 0b60c0a5b..9994ac63e 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -40,6 +40,8 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['
function mail_setup(){
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
// auto constructed address
$host = @parse_url(DOKU_URL,PHP_URL_HOST);
@@ -53,11 +55,8 @@ function mail_setup(){
$replace['@MAIL@'] = $noreply;
}
- if(!empty($_SERVER['REMOTE_USER'])){
- $replace['@USER@'] = $_SERVER['REMOTE_USER'];
- }else{
- $replace['@USER@'] = 'noreply';
- }
+ // use 'noreply' if no user
+ $replace['@USER@'] = $INPUT->server->str('REMOTE_USER', 'noreply', true);
if(!empty($USERINFO['name'])){
$replace['@NAME@'] = $USERINFO['name'];
diff --git a/inc/media.php b/inc/media.php
index 960b96e65..dc76521c6 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -284,7 +284,7 @@ function media_upload_xhr($ns,$auth){
'copy'
);
unlink($path);
- if ($tmp) dir_delete($tmp);
+ if ($tmp) io_rmdir($tmp, true);
if (is_array($res)) {
msg($res[0], $res[1]);
return false;
@@ -704,7 +704,7 @@ function media_tab_files_options(){
if ($checked == $option) {
$attrs['checked'] = 'checked';
}
- $form->addElement(form_makeRadioField($group, $option,
+ $form->addElement(form_makeRadioField($group . '_dwmedia', $option,
$lang['media_' . $group . '_' . $option],
$content[0] . '__' . $option,
$option, $attrs));
@@ -728,10 +728,23 @@ function _media_get_sort_type() {
return _media_get_display_param('sort', array('default' => 'name', 'date'));
}
+/**
+ * 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() {
return _media_get_display_param('list', array('default' => 'thumbs', 'rows'));
}
+/**
+ * Get display parameters
+ *
+ * @param string $param name of parameter
+ * @param array $values allowed values, where default value has index key 'default'
+ * @return string the parameter value
+ */
function _media_get_display_param($param, $values) {
global $INPUT;
if (in_array($INPUT->str($param), $values)) {
@@ -859,6 +872,10 @@ 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
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_preview($image, $auth, $rev=false, $meta=false) {
@@ -1001,7 +1018,7 @@ function media_file_tags($meta) {
foreach($fields as $key => $tag){
$t = array();
if (!empty($tag[0])) $t = array($tag[0]);
- if(is_array($tag[3])) $t = array_merge($t,$tag[3]);
+ if(isset($tag[3]) && is_array($tag[3])) $t = array_merge($t,$tag[3]);
$value = media_getTag($t, $meta);
$tags[] = array('tag' => $tag, 'value' => $value);
}
@@ -1039,7 +1056,6 @@ function media_details($image, $auth, $rev=false, $meta=false) {
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function media_diff($image, $ns, $auth, $fromajax = false) {
- global $lang;
global $conf;
global $INPUT;
@@ -1098,9 +1114,15 @@ function media_diff($image, $ns, $auth, $fromajax = false) {
}
+/**
+ * Callback for media file diff
+ *
+ * @param $data
+ * @return bool|void
+ */
function _media_file_diff($data) {
if(is_array($data) && count($data)===6) {
- return media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]);
+ media_file_diff($data[0], $data[1], $data[2], $data[3], $data[4], $data[5]);
} else {
return false;
}
@@ -1559,7 +1581,7 @@ function media_printimgdetail($item, $fullscreen=false){
* @param string $amp - separator
* @param bool $abs
* @param bool $params_array
- * @return string - link
+ * @return string|array - link
*/
function media_managerURL($params=false, $amp='&amp;', $abs=false, $params_array=false) {
global $ID;
@@ -1757,7 +1779,7 @@ function media_nstree_item($item){
global $INPUT;
$pos = strrpos($item['id'], ':');
$label = substr($item['id'], $pos > 0 ? $pos + 1 : 0);
- if(!$item['label']) $item['label'] = $label;
+ if(empty($item['label'])) $item['label'] = $label;
$ret = '';
if (!($INPUT->str('do') == 'media'))
@@ -1819,7 +1841,7 @@ function media_resize_image($file, $ext, $w, $h=0){
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($conf['fperm']) chmod($local, $conf['fperm']);
+ if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']);
return $local;
}
//still here? resizing failed
@@ -1880,7 +1902,7 @@ function media_crop_image($file, $ext, $w, $h=0){
if( $mtime > @filemtime($file) ||
media_crop_imageIM($ext,$file,$info[0],$info[1],$local,$cw,$ch,$cx,$cy) ||
media_resize_imageGD($ext,$file,$cw,$ch,$local,$cw,$ch,$cx,$cy) ){
- if($conf['fperm']) chmod($local, $conf['fperm']);
+ if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']);
return media_resize_image($local,$ext, $w, $h);
}
@@ -2164,7 +2186,7 @@ function media_alternativefiles($src, $exts){
/**
* Check if video/audio is supported to be embedded.
*
- * @param string $src - mimetype of media file
+ * @param string $mime - mimetype of media file
* @param string $type - type of media files to check ('video', 'audio', or none)
* @return boolean
*
diff --git a/inc/pageutils.php b/inc/pageutils.php
index c8d3cf4bb..8474c5697 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -19,6 +19,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
function getID($param='id',$clean=true){
+ /** @var Input $INPUT */
global $INPUT;
global $conf;
global $ACT;
@@ -27,7 +28,7 @@ function getID($param='id',$clean=true){
//construct page id from request URI
if(empty($id) && $conf['userewrite'] == 2){
- $request = $_SERVER['REQUEST_URI'];
+ $request = $INPUT->server->str('REQUEST_URI');
$script = '';
//get the script URL
@@ -36,15 +37,15 @@ function getID($param='id',$clean=true){
if($param != 'id') {
$relpath = 'lib/exe/';
}
- $script = $conf['basedir'].$relpath.utf8_basename($_SERVER['SCRIPT_FILENAME']);
-
- }elseif($_SERVER['PATH_INFO']){
- $request = $_SERVER['PATH_INFO'];
- }elseif($_SERVER['SCRIPT_NAME']){
- $script = $_SERVER['SCRIPT_NAME'];
- }elseif($_SERVER['DOCUMENT_ROOT'] && $_SERVER['SCRIPT_FILENAME']){
- $script = preg_replace ('/^'.preg_quote($_SERVER['DOCUMENT_ROOT'],'/').'/','',
- $_SERVER['SCRIPT_FILENAME']);
+ $script = $conf['basedir'].$relpath.utf8_basename($INPUT->server->str('SCRIPT_FILENAME'));
+
+ }elseif($INPUT->server->str('PATH_INFO')){
+ $request = $INPUT->server->str('PATH_INFO');
+ }elseif($INPUT->server->str('SCRIPT_NAME')){
+ $script = $INPUT->server->str('SCRIPT_NAME');
+ }elseif($INPUT->server->str('DOCUMENT_ROOT') && $INPUT->server->str('SCRIPT_FILENAME')){
+ $script = preg_replace ('/^'.preg_quote($INPUT->server->str('DOCUMENT_ROOT'),'/').'/','',
+ $INPUT->server->str('SCRIPT_FILENAME'));
$script = '/'.$script;
}
@@ -94,6 +95,7 @@ function getID($param='id',$clean=true){
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $raw_id The pageid to clean
* @param boolean $ascii Force ASCII
+ * @return string cleaned id
*/
function cleanID($raw_id,$ascii=false){
global $conf;
@@ -244,6 +246,7 @@ function page_exists($id,$rev='',$clean=true) {
* @param $rev 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
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
@@ -361,6 +364,7 @@ function mediaFN($id, $rev=''){
*
* @param string $id The id of the local file
* @param string $ext The file extension (usually txt)
+ * @return string full filepath to localized file
* @author Andreas Gohr <andi@splitbrain.org>
*/
function localeFN($id,$ext='txt'){
@@ -543,6 +547,11 @@ function isHiddenPage($id){
return $data['hidden'];
}
+/**
+ * callback checks if page is hidden
+ *
+ * @param array $data event data see isHiddenPage()
+ */
function _isHiddenPage(&$data) {
global $conf;
global $ACT;
diff --git a/inc/parser/code.php b/inc/parser/code.php
index 0b8e3ee02..d77ffd1aa 100644
--- a/inc/parser/code.php
+++ b/inc/parser/code.php
@@ -5,7 +5,6 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/parser/renderer.php';
class Doku_Renderer_code extends Doku_Renderer {
var $_codeblock=0;
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 8ba159d62..82a268fd6 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -16,8 +16,6 @@ if ( !defined('DOKU_TAB') ) {
define ('DOKU_TAB',"\t");
}
-require_once DOKU_INC . 'inc/parser/renderer.php';
-
/**
* The Renderer
*/
@@ -301,7 +299,7 @@ class Doku_Renderer_metadata extends Doku_Renderer {
// first resolve and clean up the $id
resolve_pageid(getNS($ID), $id, $exists);
- list($page, $hash) = explode('#', $id, 2);
+ @list($page, $hash) = explode('#', $id, 2);
// set metadata
$this->meta['relation']['references'][$page] = $exists;
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 01a1fbfec..0c3c56c56 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -6,8 +6,6 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/plugin.php';
-require_once DOKU_INC . 'inc/pluginutils.php';
/**
* An empty renderer, produces no output
@@ -277,7 +275,7 @@ class Doku_Renderer extends DokuWiki_Plugin {
global $conf;
//if there is a hash we use the ancor name only
- list($name, $hash) = explode('#', $name, 2);
+ @list($name, $hash) = explode('#', $name, 2);
if($hash) return $hash;
if($conf['useslash']) {
@@ -303,7 +301,7 @@ class Doku_Renderer extends DokuWiki_Plugin {
}
//split into hash and url part
- list($reference, $hash) = explode('#', $reference, 2);
+ @list($reference, $hash) = explode('#', $reference, 2);
//replace placeholder
if(preg_match('#\{(URL|NAME|SCHEME|HOST|PORT|PATH|QUERY)\}#', $url)) {
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 53a4dbcad..e3f9a4187 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -17,9 +17,6 @@ if ( !defined('DOKU_TAB') ) {
define ('DOKU_TAB',"\t");
}
-require_once DOKU_INC . 'inc/parser/renderer.php';
-require_once DOKU_INC . 'inc/html.php';
-
/**
* The Renderer
*/
@@ -562,6 +559,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* $search,$returnonly & $linktype are not for the renderer but are used
* elsewhere - no need to implement them in other renderers
*
+ * @param string $id pageid
+ * @param string|null $name link name
+ * @param string|null $search adds search url param
+ * @param bool $returnonly whether to return html or write to doc attribute
+ * @param string $linktype type to set use of headings
+ * @return void|string writes to doc attribute or returns html depends on $returnonly
* @author Andreas Gohr <andi@splitbrain.org>
*/
function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') {
@@ -603,7 +606,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
//keep hash anchor
- list($id,$hash) = explode('#',$id,2);
+ @list($id,$hash) = explode('#',$id,2);
if(!empty($hash)) $hash = $this->_headerToLink($hash);
//prepare for formating
@@ -1105,48 +1108,30 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$ret .= ' />';
- }elseif(media_supportedav($mime, 'video')){
+ }elseif(media_supportedav($mime, 'video') || media_supportedav($mime, 'audio')){
// first get the $title
- if (!is_null($title)) {
- $title = $this->_xmlEntities($title);
- }
- if (!$title) {
- // just show the sourcename
- $title = $this->_xmlEntities(utf8_basename(noNS($src)));
- }
+ $title = !is_null($title) ? $this->_xmlEntities($title) : false;
if (!$render) {
- // if the video is not supposed to be rendered
- // return the title of the video
- return $title;
+ // if the file is not supposed to be rendered
+ // return the title of the file (just the sourcename if there is no title)
+ return $title ? $title : $this->_xmlEntities(utf8_basename(noNS($src)));
}
$att = array();
$att['class'] = "media$align";
-
- //add video(s)
- $ret .= $this->_video($src, $width, $height, $att);
-
- }elseif(media_supportedav($mime, 'audio')){
- // first get the $title
- if (!is_null($title)) {
- $title = $this->_xmlEntities($title);
+ if ($title) {
+ $att['title'] = $title;
}
- if (!$title) {
- // just show the sourcename
- $title = $this->_xmlEntities(utf8_basename(noNS($src)));
+
+ if (media_supportedav($mime, 'video')) {
+ //add video
+ $ret .= $this->_video($src, $width, $height, $att);
}
- if (!$render) {
- // if the video is not supposed to be rendered
- // return the title of the video
- return $title;
+ if (media_supportedav($mime, 'audio')) {
+ //add audio
+ $ret .= $this->_audio($src, $att);
}
- $att = array();
- $att['class'] = "media$align";
-
- //add audio
- $ret .= $this->_audio($src, $att);
-
}elseif($mime == 'application/x-shockwave-flash'){
if (!$render) {
// if the flash is not supposed to be rendered
@@ -1291,7 +1276,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @return string
*/
function _video($src,$width,$height,$atts=null){
-
// prepare width and height
if(is_null($atts)) $atts = array();
$atts['width'] = (int) $width;
@@ -1318,7 +1302,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// output source for each alternative video format
foreach($alternatives as $mime => $file) {
$url = ml($file,array('cache'=>$cache),true,'&');
- $title = $this->_xmlEntities(utf8_basename(noNS($file)));
+ $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)
@@ -1354,7 +1338,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// output source for each alternative audio format
foreach($alternatives as $mime => $file) {
$url = ml($file,array('cache'=>$cache),true,'&');
- $title = $this->_xmlEntities(utf8_basename(noNS($file)));
+ $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)
diff --git a/inc/parser/xhtmlsummary.php b/inc/parser/xhtmlsummary.php
index 95f86cbef..867b71f6a 100644
--- a/inc/parser/xhtmlsummary.php
+++ b/inc/parser/xhtmlsummary.php
@@ -1,6 +1,5 @@
<?php
if(!defined('DOKU_INC')) die('meh.');
-require_once DOKU_INC . 'inc/parser/xhtml.php';
/**
* The summary XHTML form selects either up to the first two paragraphs
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 4df273f11..06bd6dbb8 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -430,8 +430,9 @@ function p_render_metadata($id, $orig){
global $ID, $METADATA_RENDERERS;
// avoid recursive rendering processes for the same id
- if (isset($METADATA_RENDERERS[$id]))
+ if (isset($METADATA_RENDERERS[$id])) {
return $orig;
+ }
// store the original metadata in the global $METADATA_RENDERERS so p_set_metadata can use it
$METADATA_RENDERERS[$id] =& $orig;
@@ -444,8 +445,6 @@ function p_render_metadata($id, $orig){
$evt = new Doku_Event('PARSER_METADATA_RENDER', $orig);
if ($evt->advise_before()) {
- require_once DOKU_INC."inc/parser/metadata.php";
-
// get instructions
$instructions = p_cached_instructions(wikiFN($id),false,$id);
if(is_null($instructions)){
@@ -588,7 +587,7 @@ function p_sort_modes($a, $b){
function p_render($mode,$instructions,&$info){
if(is_null($instructions)) return '';
- $Renderer =& p_get_renderer($mode);
+ $Renderer = p_get_renderer($mode);
if (is_null($Renderer)) return null;
$Renderer->reset();
@@ -616,43 +615,54 @@ 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
* @return null|Doku_Renderer The renderer
+ *
+ * @author Christopher Smith <chris@jalakai.co.uk>
*/
-function & p_get_renderer($mode) {
+function p_get_renderer($mode) {
/** @var Doku_Plugin_Controller $plugin_controller */
global $conf, $plugin_controller;
$rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode;
$rclass = "Doku_Renderer_$rname";
+ // if requested earlier or a bundled renderer
if( class_exists($rclass) ) {
$Renderer = new $rclass();
return $Renderer;
}
- // try default renderer first:
- $file = DOKU_INC."inc/parser/$rname.php";
- if(@file_exists($file)){
- require_once $file;
+ // not bundled, see if its an enabled plugin for rendering $mode
+ $Renderer = $plugin_controller->load('renderer',$rname);
+ if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode == $Renderer->getFormat())) {
+ return $Renderer;
+ }
- if ( !class_exists($rclass) ) {
- trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);
- msg("Renderer '$rname' for $mode not valid",-1);
- return null;
+ // there is a configuration error!
+ // not bundled, not a valid enabled plugin, use $mode to try to fallback to a bundled renderer
+ $rclass = "Doku_Renderer_$mode";
+ if ( class_exists($rclass) ) {
+ // viewers should see renderered output, so restrict the warning to admins only
+ $msg = "No renderer '$rname' found for mode '$mode', check your plugins";
+ if ($mode == 'xhtml') {
+ $msg .= " and the 'renderer_xhtml' config setting";
}
- $Renderer = new $rclass();
- }else{
- // Maybe a plugin/component is available?
- $Renderer = $plugin_controller->load('renderer',$rname);
+ $msg .= ".<br/>Attempting to fallback to the bundled renderer.";
+ msg($msg,-1,'','',MSG_ADMINS_ONLY);
- if(!isset($Renderer) || is_null($Renderer)){
- msg("No renderer '$rname' found for mode '$mode'",-1);
- return null;
- }
+ $Renderer = new $rclass;
+ $Renderer->nocache(); // fallback only (and may include admin alerts), don't cache
+ return $Renderer;
}
- return $Renderer;
+ // fallback failed, alert the world
+ trigger_error("Unable to resolve render class $rclass",E_USER_WARNING);
+ msg("No renderer '$rname' found for mode '$mode'",-1);
+ return null;
}
/**
diff --git a/inc/pluginutils.php b/inc/pluginutils.php
index 894bbefb6..911c4e5c0 100644
--- a/inc/pluginutils.php
+++ b/inc/pluginutils.php
@@ -37,7 +37,7 @@ function plugin_list($type='',$all=false) {
* @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|null the plugin object or null on failure
*/
function plugin_load($type,$name,$new=false,$disabled=false) {
/** @var $plugin_controller Doku_Plugin_Controller */
diff --git a/inc/remote.php b/inc/remote.php
index 2ef28afd2..e27aa74f8 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -169,6 +169,9 @@ class RemoteAPI {
public function hasAccess() {
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
+
if (!$conf['remote']) {
return false;
}
@@ -179,7 +182,7 @@ class RemoteAPI {
return true;
}
- return auth_isMember($conf['remoteuser'], $_SERVER['REMOTE_USER'], (array) $USERINFO['grps']);
+ return auth_isMember($conf['remoteuser'], $INPUT->server->str('REMOTE_USER'), (array) $USERINFO['grps']);
}
/**
diff --git a/inc/search.php b/inc/search.php
index c2d31b959..be4710237 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -141,7 +141,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
//we do nothing with directories
if($type == 'd') {
- if(!$opts['depth']) return true; // recurse forever
+ if(empty($opts['depth'])) return true; // recurse forever
$depth = substr_count($file,'/');
if($depth >= $opts['depth']) return false; // depth reached
return true;
@@ -157,12 +157,12 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
//check ACL for namespace (we have no ACL for mediafiles)
$info['perm'] = auth_quickaclcheck(getNS($info['id']).':*');
- if(!$opts['skipacl'] && $info['perm'] < AUTH_READ){
+ if(empty($opts['skipacl']) && $info['perm'] < AUTH_READ){
return false;
}
//check pattern filter
- if($opts['pattern'] && !@preg_match($opts['pattern'], $info['id'])){
+ if(!empty($opts['pattern']) && !@preg_match($opts['pattern'], $info['id'])){
return false;
}
@@ -176,7 +176,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){
}else{
$info['isimg'] = false;
}
- if($opts['hash']){
+ if(!empty($opts['hash'])){
$info['hash'] = md5(io_readFile(mediaFN($info['id']),false));
}
@@ -351,17 +351,18 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
// get ID and check if it is a valid one
- $item['id'] = pathID($file,($type == 'd' || $opts['keeptxt']));
+ $item['id'] = pathID($file,($type == 'd' || !empty($opts['keeptxt'])));
if($item['id'] != cleanID($item['id'])){
- if($opts['showmsg'])
+ if(!empty($opts['showmsg'])){
msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1);
+ }
return false; // skip non-valid files
}
$item['ns'] = getNS($item['id']);
if($type == 'd') {
// decide if to recursion into this directory is wanted
- if(!$opts['depth']){
+ if(empty($opts['depth'])){
$return = true; // recurse forever
}else{
$depth = substr_count($file,'/');
@@ -371,8 +372,12 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$return = true;
}
}
- if($return && !preg_match('/'.$opts['recmatch'].'/',$file)){
- $return = false; // doesn't match
+
+ if ($return) {
+ $match = empty($opts['recmatch']) || preg_match('/'.$opts['recmatch'].'/',$file);
+ if (!$match) {
+ return false; // doesn't match
+ }
}
}
@@ -407,7 +412,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
$item['level'] = $lvl;
$item['open'] = $return;
- if($opts['meta']){
+ if(!empty($opts['meta'])){
$item['file'] = utf8_basename($file);
$item['size'] = filesize($base.'/'.$file);
$item['mtime'] = filemtime($base.'/'.$file);
@@ -417,8 +422,8 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){
}
if($type == 'f'){
- if($opts['hash']) $item['hash'] = md5(io_readFile($base.'/'.$file,false));
- if($opts['firsthead']) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER);
+ if(!empty($opts['hash'])) $item['hash'] = md5(io_readFile($base.'/'.$file,false));
+ if(!empty($opts['firsthead'])) $item['title'] = p_get_first_heading($item['id'],METADATA_DONT_RENDER);
}
// finally add the item
diff --git a/inc/subscription.php b/inc/subscription.php
index ddf2f39e6..adf1b821c 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -256,8 +256,10 @@ class Subscription {
if(!$this->isenabled()) return false;
global $ID;
+ /** @var Input $INPUT */
+ global $INPUT;
if(!$id) $id = $ID;
- if(!$user) $user = $_SERVER['REMOTE_USER'];
+ if(!$user) $user = $INPUT->server->str('REMOTE_USER');
$subs = $this->subscribers($id, $user);
if(!count($subs)) return false;
@@ -288,17 +290,19 @@ class Subscription {
public function send_bulk($page) {
if(!$this->isenabled()) return 0;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
global $conf;
global $USERINFO;
+ /** @var Input $INPUT */
+ global $INPUT;
$count = 0;
$subscriptions = $this->subscribers($page, null, array('digest', 'list'));
// remember current user info
$olduinfo = $USERINFO;
- $olduser = $_SERVER['REMOTE_USER'];
+ $olduser = $INPUT->server->str('REMOTE_USER');
foreach($subscriptions as $target => $users) {
if(!$this->lock($target)) continue;
@@ -315,7 +319,7 @@ class Subscription {
// Work as the user to make sure ACLs apply correctly
$USERINFO = $auth->getUserData($user);
- $_SERVER['REMOTE_USER'] = $user;
+ $INPUT->server->set('REMOTE_USER',$user);
if($USERINFO === false) continue;
if(!$USERINFO['mail']) continue;
@@ -334,7 +338,7 @@ class Subscription {
foreach($changes as $rev) {
$n = 0;
while(!is_null($rev) && $rev['date'] >= $lastupdate &&
- ($_SERVER['REMOTE_USER'] === $rev['user'] ||
+ ($INPUT->server->str('REMOTE_USER') === $rev['user'] ||
$rev['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT)) {
$rev = getRevisions($rev['id'], $n++, 1);
$rev = (count($rev) > 0) ? $rev[0] : null;
@@ -369,7 +373,7 @@ class Subscription {
// restore current user info
$USERINFO = $olduinfo;
- $_SERVER['REMOTE_USER'] = $olduser;
+ $INPUT->server->set('REMOTE_USER',$olduser);
return $count;
}
@@ -651,9 +655,11 @@ class Subscription {
public function notifyaddresses(&$data) {
if(!$this->isenabled()) return;
- /** @var auth_basic $auth */
+ /** @var DokuWiki_Auth_Plugin $auth */
global $auth;
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
$id = $data['id'];
$self = $data['self'];
@@ -667,7 +673,7 @@ class Subscription {
$userinfo = $auth->getUserData($user);
if($userinfo === false) continue;
if(!$userinfo['mail']) continue;
- if(!$self && $user == $_SERVER['REMOTE_USER']) continue; //skip our own changes
+ if(!$self && $user == $INPUT->server->str('REMOTE_USER')) continue; //skip our own changes
$level = auth_aclcheck($id, $user, $userinfo['grps']);
if($level >= AUTH_READ) {
diff --git a/inc/template.php b/inc/template.php
index ba7279636..5a3bdea6a 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -210,7 +210,7 @@ function tpl_toc($return = false) {
} else {
$tocok = true;
}
- $toc = $meta['description']['tableofcontents'];
+ $toc = isset($meta['description']['tableofcontents']) ? $meta['description']['tableofcontents'] : null;
if(!$tocok || !is_array($toc) || !$conf['tocminheads'] || count($toc) < $conf['tocminheads']) {
$toc = array();
}
@@ -291,6 +291,8 @@ function tpl_metaheaders($alt = true) {
global $lang;
global $conf;
global $updateVersion;
+ /** @var Input $INPUT */
+ global $INPUT;
// prepare the head array
$head = array();
@@ -401,7 +403,7 @@ function tpl_metaheaders($alt = true) {
// make $INFO and other vars available to JavaScripts
$json = new JSON();
$script = "var NS='".$INFO['namespace']."';";
- if($conf['useacl'] && !empty($_SERVER['REMOTE_USER'])) {
+ if($conf['useacl'] && $INPUT->server->str('REMOTE_USER')) {
$script .= "var SIG='".toolbar_signature()."';";
}
$script .= 'var JSINFO = '.$json->encode($JSINFO).';';
@@ -603,6 +605,8 @@ function tpl_get_action($type) {
global $REV;
global $ACT;
global $conf;
+ /** @var Input $INPUT */
+ global $INPUT;
// check disabled actions and fix the badly named ones
if($type == 'history') $type = 'revisions';
@@ -637,7 +641,7 @@ function tpl_get_action($type) {
$accesskey = 'v';
}
} else {
- $params = array();
+ $params = array('do' => '');
$type = 'show';
$accesskey = 'v';
}
@@ -658,7 +662,7 @@ function tpl_get_action($type) {
break;
case 'top':
$accesskey = 't';
- $params = array();
+ $params = array('do' => '');
$id = '#dokuwiki__top';
break;
case 'back':
@@ -667,12 +671,12 @@ function tpl_get_action($type) {
return false;
}
$id = $parent;
- $params = array();
+ $params = array('do' => '');
$accesskey = 'b';
break;
case 'login':
$params['sectok'] = getSecurityToken();
- if(isset($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->has('REMOTE_USER')) {
if(!actionOK('logout')) {
return false;
}
@@ -681,12 +685,12 @@ function tpl_get_action($type) {
}
break;
case 'register':
- if(!empty($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
case 'resendpwd':
- if(!empty($_SERVER['REMOTE_USER'])) {
+ if($INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
@@ -703,14 +707,14 @@ function tpl_get_action($type) {
$params['sectok'] = getSecurityToken();
break;
case 'subscribe':
- if(!$_SERVER['REMOTE_USER']) {
+ if(!$INPUT->server->str('REMOTE_USER')) {
return false;
}
break;
case 'backlink':
break;
case 'profile':
- if(!isset($_SERVER['REMOTE_USER'])) {
+ if(!$INPUT->server->has('REMOTE_USER')) {
return false;
}
break;
@@ -885,7 +889,10 @@ function tpl_youarehere($sep = ' » ') {
*/
function tpl_userinfo() {
global $lang;
- if(isset($_SERVER['REMOTE_USER'])) {
+ /** @var Input $INPUT */
+ global $INPUT;
+
+ if($INPUT->server->str('REMOTE_USER')) {
print $lang['loggedinas'].': '.userinfo();
return true;
}
@@ -1029,6 +1036,7 @@ function tpl_img_getTag($tags, $alt = '', $src = null) {
*/
function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) {
global $IMG;
+ /** @var Input $INPUT */
global $INPUT;
$w = tpl_img_getTag('File.Width');
$h = tpl_img_getTag('File.Height');
@@ -1241,6 +1249,7 @@ function tpl_mediaContent($fromajax = false, $sort='natural') {
global $INUSE;
global $NS;
global $JUMPTO;
+ /** @var Input $INPUT */
global $INPUT;
$do = $INPUT->extract('do')->str('do');
@@ -1290,6 +1299,7 @@ function tpl_mediaFileList() {
global $NS;
global $JUMPTO;
global $lang;
+ /** @var Input $INPUT */
global $INPUT;
$opened_tab = $INPUT->str('tab_files');
@@ -1330,7 +1340,9 @@ function tpl_mediaFileList() {
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function tpl_mediaFileDetails($image, $rev) {
- global $AUTH, $NS, $conf, $DEL, $lang, $INPUT;
+ global $AUTH, $NS, $conf, $DEL, $lang;
+ /** @var Input $INPUT */
+ global $INPUT;
$removed = (!file_exists(mediaFN($image)) && file_exists(mediaMetaFN($image, '.changes')) && $conf['mediarevisions']);
if(!$image || (!file_exists(mediaFN($image)) && !$removed) || $DEL) return;
@@ -1408,12 +1420,14 @@ function tpl_actiondropdown($empty = '', $button = '&gt;') {
global $ID;
global $REV;
global $lang;
+ /** @var Input $INPUT */
+ global $INPUT;
echo '<form action="'.script().'" method="get" accept-charset="utf-8">';
echo '<div class="no">';
echo '<input type="hidden" name="id" value="'.$ID.'" />';
if($REV) echo '<input type="hidden" name="rev" value="'.$REV.'" />';
- if (!empty($_SERVER['REMOTE_USER'])) {
+ if ($INPUT->server->str('REMOTE_USER')) {
echo '<input type="hidden" name="sectok" value="'.getSecurityToken().'" />';
}
@@ -1779,11 +1793,14 @@ function tpl_media() {
*/
function tpl_classes() {
global $ACT, $conf, $ID, $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
+
$classes = array(
'dokuwiki',
'mode_'.$ACT,
'tpl_'.$conf['template'],
- !empty($_SERVER['REMOTE_USER']) ? 'loggedIn' : '',
+ $INPUT->server->bool('REMOTE_USER') ? 'loggedIn' : '',
$INFO['exists'] ? '' : 'notFound',
($ID == $conf['start']) ? 'home' : '',
);
diff --git a/inc/toolbar.php b/inc/toolbar.php
index b588d4477..7cc29e866 100644
--- a/inc/toolbar.php
+++ b/inc/toolbar.php
@@ -56,7 +56,7 @@ function toolbar_JSdefines($varname){
'type' => 'format',
'title' => $lang['qb_code'],
'icon' => 'mono.png',
- 'key' => 'c',
+ 'key' => 'm',
'open' => "''",
'close' => "''",
'block' => false
@@ -241,10 +241,12 @@ function toolbar_JSdefines($varname){
function toolbar_signature(){
global $conf;
global $INFO;
+ /** @var Input $INPUT */
+ global $INPUT;
$sig = $conf['signature'];
$sig = dformat(null,$sig);
- $sig = str_replace('@USER@',$_SERVER['REMOTE_USER'],$sig);
+ $sig = str_replace('@USER@',$INPUT->server->str('REMOTE_USER'),$sig);
$sig = str_replace('@NAME@',$INFO['userinfo']['name'],$sig);
$sig = str_replace('@MAIL@',$INFO['userinfo']['mail'],$sig);
$sig = str_replace('@DATE@',dformat(),$sig);
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 6e2011cd9..1000094bc 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -41,7 +41,6 @@ if(function_exists($callfn)){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function ajax_qsearch(){
- global $conf;
global $lang;
global $INPUT;
@@ -89,15 +88,12 @@ function ajax_qsearch(){
* @author Mike Frysinger <vapier@gentoo.org>
*/
function ajax_suggestions() {
- global $conf;
- global $lang;
global $INPUT;
$query = cleanID($INPUT->post->str('q'));
if(empty($query)) $query = cleanID($INPUT->get->str('q'));
if(empty($query)) return;
- $data = array();
$data = ft_pageLookup($query);
if(!count($data)) return;
$data = array_keys($data);
@@ -214,7 +210,6 @@ function ajax_medians(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function ajax_medialist(){
- global $conf;
global $NS;
global $INPUT;
@@ -234,13 +229,15 @@ function ajax_medialist(){
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function ajax_mediadetails(){
- global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf, $INPUT;
+ global $IMG, $JUMPTO, $REV, $fullscreen, $INPUT;
$fullscreen = true;
require_once(DOKU_INC.'lib/exe/mediamanager.php');
+ $image = '';
if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
if (isset($IMG)) $image = $IMG;
if (isset($JUMPTO)) $image = $JUMPTO;
+ $rev = false;
if (isset($REV) && !$JUMPTO) $rev = $REV;
html_msgarea();
@@ -255,6 +252,7 @@ function ajax_mediadiff(){
global $NS;
global $INPUT;
+ $image = '';
if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
$NS = $INPUT->post->str('ns');
$auth = auth_quickaclcheck("$NS:*");
@@ -264,6 +262,7 @@ function ajax_mediadiff(){
function ajax_mediaupload(){
global $NS, $MSG, $INPUT;
+ $id = '';
if ($_FILES['qqfile']['tmp_name']) {
$id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']);
} elseif ($INPUT->get->has('qqfile')) {
@@ -280,44 +279,33 @@ function ajax_mediaupload(){
if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']);
+ $res = false;
if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']);
if ($INPUT->get->has('qqfile')) $res = media_upload_xhr($NS, $AUTH);
- if ($res) $result = array('success' => true,
- 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS.':'.$id), '&'),
- 'id' => $NS.':'.$id, 'ns' => $NS);
-
- if (!$result) {
+ if($res) {
+ $result = array(
+ 'success' => true,
+ 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS . ':' . $id), '&'),
+ 'id' => $NS . ':' . $id,
+ 'ns' => $NS
+ );
+ } else {
$error = '';
- if (isset($MSG)) {
- foreach($MSG as $msg) $error .= $msg['msg'];
+ if(isset($MSG)) {
+ foreach($MSG as $msg) {
+ $error .= $msg['msg'];
+ }
}
- $result = array('error' => $msg['msg'], 'ns' => $NS);
+ $result = array(
+ 'error' => $error,
+ 'ns' => $NS
+ );
}
$json = new JSON;
echo htmlspecialchars($json->encode($result), ENT_NOQUOTES);
}
-function dir_delete($path) {
- if (!is_string($path) || $path == "") return false;
-
- if (is_dir($path) && !is_link($path)) {
- if (!$dh = @opendir($path)) return false;
-
- while ($f = readdir($dh)) {
- if ($f == '..' || $f == '.') continue;
- dir_delete("$path/$f");
- }
-
- closedir($dh);
- return @rmdir($path);
- } else {
- return @unlink($path);
- }
-
- return false;
-}
-
/**
* Return sub index for index view
*
@@ -359,13 +347,11 @@ function ajax_linkwiz(){
$id = cleanID($id);
$nsd = utf8_encodeFN(str_replace(':','/',$ns));
- $idd = utf8_encodeFN(str_replace(':','/',$id));
$data = array();
if($q && !$ns){
// use index to lookup matching pages
- $pages = array();
$pages = ft_pageLookup($id,true);
// result contains matches in pages and namespaces
diff --git a/lib/exe/css.php b/lib/exe/css.php
index f273b7ee4..cab7384b2 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -70,6 +70,7 @@ function css_out(){
$files[$mediatype] = array();
// load core styles
$files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/';
+
// load jQuery-UI theme
if ($mediatype == 'screen') {
$files[$mediatype][DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/';
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php
index 5f82ad0e0..933367e35 100644
--- a/lib/exe/fetch.php
+++ b/lib/exe/fetch.php
@@ -79,7 +79,7 @@ if (defined('SIMPLE_TEST')) {
//handle image resizing/cropping
if((substr($MIME, 0, 5) == 'image') && ($WIDTH || $HEIGHT)) {
- if($HEIGHT && $WDITH) {
+ if($HEIGHT && $WIDTH) {
$data['file'] = $FILE = media_crop_image($data['file'], $EXT, $WIDTH, $HEIGHT);
} else {
$data['file'] = $FILE = media_resize_image($data['file'], $EXT, $WIDTH, $HEIGHT);
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 04413b409..8f16f4a96 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -220,6 +220,12 @@ function js_pluginstrings() {
return $pluginstrings;
}
+/**
+ * Return an two-dimensional array with strings from the language file of current active template.
+ *
+ * - $lang['js'] must be an array.
+ * - Nothing is returned for template without an entry for $lang['js']
+ */
function js_templatestrings() {
global $conf;
$templatestrings = array();
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index d94a24c74..7044232ce 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -57,7 +57,7 @@
}
// give info on PHP caught upload errors
- if($_FILES['upload']['error']){
+ if(!empty($_FILES['upload']['error'])){
switch($_FILES['upload']['error']){
case 1:
case 2:
@@ -71,7 +71,7 @@
}
// handle upload
- if($_FILES['upload']['tmp_name']){
+ if(!empty($_FILES['upload']['tmp_name'])){
$JUMPTO = media_upload($NS,$AUTH);
if($JUMPTO) $NS = getNS($JUMPTO);
}
diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php
index 6c7c28ff6..de38aedd5 100644
--- a/lib/plugins/acl/admin.php
+++ b/lib/plugins/acl/admin.php
@@ -268,7 +268,10 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
usort($data,array($this,'_tree_sort'));
$count = count($data);
if($count>0) for($i=1; $i<$count; $i++){
- if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) unset($data[$i]);
+ if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) {
+ unset($data[$i]);
+ $i++; // duplicate found, next $i can't be a duplicate, so skip forward one
+ }
}
return $data;
}
@@ -488,7 +491,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
function _html_list_acl($item){
$ret = '';
// what to display
- if($item['label']){
+ if(!empty($item['label'])){
$base = $item['label'];
}else{
$base = ':'.$item['id'];
@@ -496,8 +499,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin {
}
// highlight?
- if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id']))
+ if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) {
$cl = ' cur';
+ } else {
+ $cl = '';
+ }
// namespace or page?
if($item['type']=='d'){
diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php
index bc4c73a16..84e21d1f8 100644
--- a/lib/plugins/acl/lang/et/lang.php
+++ b/lib/plugins/acl/lang/et/lang.php
@@ -1,13 +1,14 @@
<?php
+
/**
- * Estonian language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Oliver S6ro <seem.iges@mail.ee>
* @author Aari Juhanson <aari@vmg.vil.ee>
* @author Kaiko Kaur <kaiko@kultuur.edu.ee>
* @author kristian.kankainen@kuu.la
* @author Rivo Zängov <eraser@eraser.ee>
+ * @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine';
$lang['acl_group'] = 'Grupp';
@@ -16,6 +17,8 @@ $lang['acl_perms'] = 'Lubatud';
$lang['page'] = 'leht';
$lang['namespace'] = 'alajaotus';
$lang['btn_select'] = 'Vali';
+$lang['p_choose_id'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks leheküljele <b class="aclpage">%s</b> sätestatud volitusi.';
+$lang['p_choose_ns'] = 'Sisesta ülal-olevasse vormi <b>kasutaja või rühm</b> nägemaks nimeruumile <b class="aclpage">%s</b> sätestatud volitusi.';
$lang['who'] = 'Kasutaja/Grupp';
$lang['perm'] = 'Õigused';
$lang['acl_perm0'] = 'Pole';
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php
index dc66d6380..b04735639 100644
--- a/lib/plugins/auth.php
+++ b/lib/plugins/auth.php
@@ -316,11 +316,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
*
* @author Chris Smith <chris@jalakai.co.uk>
* @param int $start index of first user to be returned
- * @param int $limit max number of users to be returned
+ * @param int $limit max number of users to be returned, 0 for unlimited
* @param array $filter array of field/pattern pairs, null for no filter
* @return array list of userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($start = 0, $limit = -1, $filter = null) {
+ public function retrieveUsers($start = 0, $limit = 0, $filter = null) {
msg("authorisation method does not support mass retrieval of user data", -1);
return array();
}
diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php
new file mode 100644
index 000000000..97be9897e
--- /dev/null
+++ b/lib/plugins/authad/action.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * DokuWiki Plugin addomain (Action Component)
+ *
+ * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+
+// must be run within Dokuwiki
+if(!defined('DOKU_INC')) die();
+
+/**
+ * Class action_plugin_addomain
+ */
+class action_plugin_authad extends DokuWiki_Action_Plugin {
+
+ /**
+ * Registers a callback function for a given event
+ */
+ public function register(Doku_Event_Handler &$controller) {
+
+ $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handle_auth_login_check');
+ $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_html_loginform_output');
+
+ }
+
+ /**
+ * Adds the selected domain as user postfix when attempting a login
+ *
+ * @param Doku_Event $event
+ * @param array $param
+ */
+ public function handle_auth_login_check(Doku_Event &$event, $param) {
+ global $INPUT;
+
+ /** @var auth_plugin_authad $auth */
+ global $auth;
+ if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
+
+ if($INPUT->str('dom')) {
+ $usr = $auth->cleanUser($event->data['user']);
+ $dom = $auth->_userDomain($usr);
+ if(!$dom) {
+ $usr = "$usr@".$INPUT->str('dom');
+ }
+ $INPUT->post->set('u', $usr);
+ $event->data['user'] = $usr;
+ }
+ }
+
+ /**
+ * Shows a domain selection in the login form when more than one domain is configured
+ *
+ * @param Doku_Event $event
+ * @param array $param
+ */
+ public function handle_html_loginform_output(Doku_Event &$event, $param) {
+ global $INPUT;
+ /** @var auth_plugin_authad $auth */
+ global $auth;
+ if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used
+ $domains = $auth->_getConfiguredDomains();
+ if(count($domains) <= 1) return; // no choice at all
+
+ /** @var Doku_Form $form */
+ $form =& $event->data;
+
+ // any default?
+ $dom = '';
+ if($INPUT->has('u')) {
+ $usr = $auth->cleanUser($INPUT->str('u'));
+ $dom = $auth->_userDomain($usr);
+
+ // update user field value
+ if($dom) {
+ $usr = $auth->_userName($usr);
+ $pos = $form->findElementByAttribute('name', 'u');
+ $ele =& $form->getElementAt($pos);
+ $ele['value'] = $usr;
+ }
+ }
+
+ // add select box
+ $element = form_makeListboxField('dom', $domains, $dom, $this->getLang('domain'), '', 'block');
+ $pos = $form->findElementByAttribute('name', 'p');
+ $form->insertElement($pos + 1, $element);
+ }
+
+}
+
+// vim:ts=4:sw=4:et: \ No newline at end of file
diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php
index e1d758fb8..0860e5756 100644
--- a/lib/plugins/authad/auth.php
+++ b/lib/plugins/authad/auth.php
@@ -332,11 +332,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
+ public function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
$adldap = $this->_adldap(null);
if(!$adldap) return false;
- if($this->users === null) {
+ if(!$this->users) {
//get info for given user
$result = $adldap->user()->all();
if (!$result) return array();
@@ -357,7 +357,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
- if(($limit >= 0) && (++$count >= $limit)) break;
+ if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
@@ -512,6 +512,31 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
/**
+ * Returns a list of configured domains
+ *
+ * The default domain has an empty string as key
+ *
+ * @return array associative array(key => domain)
+ */
+ public function _getConfiguredDomains() {
+ $domains = array();
+ if(empty($this->conf['account_suffix'])) return $domains; // not configured yet
+
+ // add default domain, using the name from account suffix
+ $domains[''] = ltrim($this->conf['account_suffix'], '@');
+
+ // find additional domains
+ foreach($this->conf as $key => $val) {
+ if(is_array($val) && isset($val['account_suffix'])) {
+ $domains[$key] = ltrim($val['account_suffix'], '@');
+ }
+ }
+ ksort($domains);
+
+ return $domains;
+ }
+
+ /**
* Check provided user and userinfo for matching patterns
*
* The patterns are set up with $this->_constructPattern()
diff --git a/lib/plugins/authad/lang/de/lang.php b/lib/plugins/authad/lang/de/lang.php
new file mode 100644
index 000000000..eea511d1b
--- /dev/null
+++ b/lib/plugins/authad/lang/de/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+$lang['domain'] = 'Anmelde-Domäne';
diff --git a/lib/plugins/authad/lang/en/lang.php b/lib/plugins/authad/lang/en/lang.php
new file mode 100644
index 000000000..e2967d662
--- /dev/null
+++ b/lib/plugins/authad/lang/en/lang.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * English language file for addomain plugin
+ *
+ * @author Andreas Gohr <gohr@cosmocode.de>
+ */
+
+$lang['domain'] = 'Logon Domain';
+
+//Setup VIM: ex: et ts=4 :
diff --git a/lib/plugins/authad/lang/es/lang.php b/lib/plugins/authad/lang/es/lang.php
new file mode 100644
index 000000000..c5b242cba
--- /dev/null
+++ b/lib/plugins/authad/lang/es/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
+ */
+$lang['domain'] = 'Dominio de inicio';
diff --git a/lib/plugins/authad/lang/es/settings.php b/lib/plugins/authad/lang/es/settings.php
index 98b78056b..9dbd44be8 100644
--- a/lib/plugins/authad/lang/es/settings.php
+++ b/lib/plugins/authad/lang/es/settings.php
@@ -5,6 +5,7 @@
*
* @author monica <may.dorado@gmail.com>
* @author Antonio Bueno <atnbueno@gmail.com>
+ * @author Juan De La Cruz <juann.dlc@gmail.com>
*/
$lang['account_suffix'] = 'Su cuenta, sufijo. Ejem. <code> @ my.domain.org </ code>';
$lang['base_dn'] = 'Su base DN. Ejem. <code>DC=my,DC=dominio,DC=org</code>';
@@ -13,3 +14,4 @@ $lang['admin_username'] = 'Un usuario con privilegios de Active Directory
$lang['admin_password'] = 'La contraseña del usuario anterior.';
$lang['sso'] = 'En caso de inicio de sesión usará ¿Kerberos o NTLM?';
$lang['sso_charset'] = 'La codificación con que tu servidor web pasará el nombre de usuario Kerberos o NTLM. Si es UTF-8 o latin-1 dejar en blanco. Requiere la extensión iconv.';
+$lang['debug'] = 'Mostrar información adicional de depuración sobre los errores?';
diff --git a/lib/plugins/authad/lang/hu/settings.php b/lib/plugins/authad/lang/hu/settings.php
index 05acbdc2d..be0592d68 100644
--- a/lib/plugins/authad/lang/hu/settings.php
+++ b/lib/plugins/authad/lang/hu/settings.php
@@ -11,11 +11,11 @@ $lang['base_dn'] = 'Bázis DN, pl. <code>DC=my,DC=domain,DC=org</c
$lang['domain_controllers'] = 'Tartománykezelők listája vesszővel elválasztva, pl. <code>srv1.domain.org,srv2.domain.org</code>.';
$lang['admin_username'] = 'Privilegizált AD felhasználó, aki az összes feéhasználó adatait elérheti. Elhagyható, de bizonyos funkciókhoz, például a feliratkozási e-mailek kiküldéséhez szükséges.';
$lang['admin_password'] = 'Ehhez tartozó jelszó.';
-$lang['sso'] = 'Single-Sign-On Kerberos-szal vagy NTML használata?';
+$lang['sso'] = 'Kerberos egyszeri bejelentkezés vagy NTLM használata?';
$lang['sso_charset'] = 'A webkiszolgáló karakterkészlete megfelel a Kerberos- és NTLM-felhasználóneveknek. Üres UTF-8 és Latin-1-hez. Szükséges az iconv bővítmény.';
$lang['real_primarygroup'] = 'A valódi elsődleges csoport feloldása a "Tartományfelhasználók" csoport használata helyett? (lassabb)';
$lang['use_ssl'] = 'SSL használata? Ha használjuk, tiltsuk le a TLS-t!';
$lang['use_tls'] = 'TLS használata? Ha használjuk, tiltsuk le az SSL-t!';
-$lang['debug'] = 'Debug-üzenetek megjelenítése?';
+$lang['debug'] = 'További hibakeresési üzenetek megjelenítése hiba esetén';
$lang['expirywarn'] = 'Felhasználók értesítése ennyi nappal a jelszavuk lejárata előtt. 0 a funkció kikapcsolásához.';
-$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréshez. Néhány plugin használhatja.';
+$lang['additional'] = 'Vesszővel elválasztott lista a további AD attribútumok lekéréséhez. Néhány bővítmény használhatja.';
diff --git a/lib/plugins/authad/lang/ko/lang.php b/lib/plugins/authad/lang/ko/lang.php
new file mode 100644
index 000000000..1aa436708
--- /dev/null
+++ b/lib/plugins/authad/lang/ko/lang.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Korean language file for addomain plugin
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+
+$lang['domain'] = '로그온 도메인';
+
+//Setup VIM: ex: et ts=4 :
diff --git a/lib/plugins/authad/lang/sl/settings.php b/lib/plugins/authad/lang/sl/settings.php
new file mode 100644
index 000000000..bae467d6d
--- /dev/null
+++ b/lib/plugins/authad/lang/sl/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author matej <mateju@svn.gnome.org>
+ */
+$lang['debug'] = 'Ali naj bodo prikazane dodatne podrobnosti napak?';
diff --git a/lib/plugins/authad/plugin.info.txt b/lib/plugins/authad/plugin.info.txt
index 3af1ddfbe..8774fcf3c 100644
--- a/lib/plugins/authad/plugin.info.txt
+++ b/lib/plugins/authad/plugin.info.txt
@@ -1,7 +1,7 @@
base authad
author Andreas Gohr
email andi@splitbrain.org
-date 2013-04-25
+date 2014-02-14
name Active Directory Auth Plugin
desc Provides user authentication against a Microsoft Active Directory
url http://www.dokuwiki.org/plugin:authad
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index 31e2c5135..6c3637e15 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -143,6 +143,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @author Dan Allen <dan.j.allen@gmail.com>
* @author <evaldas.auryla@pheur.org>
* @author Stephane Chazelas <stephane.chazelas@emerson.com>
+ * @author Steffen Schoch <schoch@dsb.net>
*
* @param string $user
* @param bool $inbind authldap specific, true if in bind phase
@@ -240,9 +241,17 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
ldap_free_result($sr);
if(is_array($result)) foreach($result as $grp) {
- if(!empty($grp[$this->getConf('groupkey')][0])) {
- $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__);
- $info['grps'][] = $grp[$this->getConf('groupkey')][0];
+ if(!empty($grp[$this->getConf('groupkey')])) {
+ $group = $grp[$this->getConf('groupkey')];
+ if(is_array($group)){
+ $group = $group[0];
+ } else {
+ $this->_debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__);
+ }
+ if($group === '') continue;
+
+ $this->_debug('LDAP usergroup: '.htmlspecialchars($group), 0, __LINE__, __FILE__);
+ $info['grps'][] = $group;
}
}
}
@@ -272,7 +281,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array of userinfo (refer getUserData for internal userinfo details)
*/
- function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
+ function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
if(!$this->_openLDAP()) return false;
if(is_null($this->users)) {
@@ -307,7 +316,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
- if(($limit >= 0) && (++$count >= $limit)) break;
+ if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
diff --git a/lib/plugins/authldap/lang/hu/settings.php b/lib/plugins/authldap/lang/hu/settings.php
index 041f82755..1e6608dab 100644
--- a/lib/plugins/authldap/lang/hu/settings.php
+++ b/lib/plugins/authldap/lang/hu/settings.php
@@ -4,9 +4,10 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Marton Sebok <sebokmarton@gmail.com>
+ * @author Marina Vladi <deldadam@gmail.com>
*/
-$lang['server'] = 'LDAP-szerver. Hosztnév (<code>localhost</code>) vagy abszolút URL portszámmal (<code>ldap://server.tld:389</code>)';
-$lang['port'] = 'LDAP-szerver port, ha nem URL lett megadva';
+$lang['server'] = 'LDAP-szerver. Kiszolgálónév (<code>localhost</code>) vagy teljes URL-cím (<code>ldap://server.tld:389</code>)';
+$lang['port'] = 'LDAP-kiszolgáló portja, ha URL-cím nem lett megadva';
$lang['usertree'] = 'Hol találom a felhasználókat? Pl. <code>ou=People, dc=server, dc=tld</code>';
$lang['grouptree'] = 'Hol találom a csoportokat? Pl. <code>ou=Group, dc=server, dc=tld</code>';
$lang['userfilter'] = 'LDAP szűrő a felhasználók kereséséhez, pl. <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
@@ -20,7 +21,7 @@ $lang['bindpw'] = 'Ehhez tartozó jelszó.';
$lang['userscope'] = 'A keresési tartomány korlátozása erre a felhasználókra való keresésnél';
$lang['groupscope'] = 'A keresési tartomány korlátozása erre a csoportokra való keresésnél';
$lang['groupkey'] = 'Csoport meghatározása a következő attribútumból (az alapértelmezett AD csoporttagság helyett), pl. a szervezeti egység vagy a telefonszám';
-$lang['debug'] = 'Debug-üzenetek megjelenítése?';
+$lang['debug'] = 'Továbi hibakeresési információk megjelenítése hiba esetén';
$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
index 2b93e0fd4..04a3ee784 100644
--- a/lib/plugins/authldap/lang/ru/settings.php
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -6,6 +6,11 @@
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
* @author Erli Moen <evseev.jr@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
*/
$lang['deref'] = 'Как расшифровывать псевдонимы?';
$lang['bindpw'] = 'Пароль для указанного пользователя.';
+$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/sl/settings.php b/lib/plugins/authldap/lang/sl/settings.php
new file mode 100644
index 000000000..f180226fc
--- /dev/null
+++ b/lib/plugins/authldap/lang/sl/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author matej <mateju@svn.gnome.org>
+ */
+$lang['starttls'] = 'Ali naj se uporabijo povezave TLS?';
diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php
index 036644a67..1e6e6a4a9 100644
--- a/lib/plugins/authmysql/auth.php
+++ b/lib/plugins/authmysql/auth.php
@@ -352,13 +352,18 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @param array|string $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($first = 0, $limit = 10, $filter = array()) {
+ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {
$out = array();
if($this->_openDB()) {
$this->_lockTables("READ");
$sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter);
- $sql .= " ".$this->getConf('SortOrder')." LIMIT $first, $limit";
+ $sql .= " ".$this->getConf('SortOrder');
+ if($limit) {
+ $sql .= " LIMIT $first, $limit";
+ } elseif($first) {
+ $sql .= " LIMIT $first";
+ }
$result = $this->_queryDB($sql);
if(!empty($result)) {
diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php
index 5936203fa..cf7b26bb9 100644
--- a/lib/plugins/authmysql/lang/hu/settings.php
+++ b/lib/plugins/authmysql/lang/hu/settings.php
@@ -6,8 +6,8 @@
* @author Marton Sebok <sebokmarton@gmail.com>
* @author Marina Vladi <deldadam@gmail.com>
*/
-$lang['server'] = 'MySQL-szerver';
-$lang['user'] = 'MySQL felhasználónév';
+$lang['server'] = 'MySQL-kiszolgáló';
+$lang['user'] = 'MySQL-felhasználónév';
$lang['password'] = 'Fenti felhasználó jelszava';
$lang['database'] = 'Adatbázis';
$lang['charset'] = 'Az adatbázisban használt karakterkészlet';
diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php
index 3f8ff3249..e51b39858 100644
--- a/lib/plugins/authpgsql/auth.php
+++ b/lib/plugins/authpgsql/auth.php
@@ -148,13 +148,15 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
* @param array $filter array of field/pattern pairs
* @return array userinfo (refer getUserData for internal userinfo details)
*/
- public function retrieveUsers($first = 0, $limit = 10, $filter = array()) {
+ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) {
$out = array();
if($this->_openDB()) {
$this->_lockTables("READ");
$sql = $this->_createSQLFilter($this->conf['getUsers'], $filter);
- $sql .= " ".$this->conf['SortOrder']." LIMIT $limit OFFSET $first";
+ $sql .= " ".$this->conf['SortOrder'];
+ if($limit) $sql .= " LIMIT $limit";
+ if($first) $sql .= " OFFSET $first";
$result = $this->_queryDB($sql);
foreach($result as $user)
diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php
index 48dd2a87c..65cbce8df 100644
--- a/lib/plugins/authpgsql/lang/ru/settings.php
+++ b/lib/plugins/authpgsql/lang/ru/settings.php
@@ -5,12 +5,14 @@
*
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
* @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
*/
$lang['server'] = 'Ваш PostgreSQL-сервер';
$lang['port'] = 'Порт вашего PostgreSQL-сервера';
$lang['user'] = 'Имя пользователя PostgreSQL';
$lang['password'] = 'Пароль для указанного пользователя.';
$lang['database'] = 'Имя базы данных';
+$lang['debug'] = 'Отображать дополнительную отладочную информацию';
$lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля';
$lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе';
$lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах';
diff --git a/lib/plugins/authpgsql/lang/sl/settings.php b/lib/plugins/authpgsql/lang/sl/settings.php
index 4c369abc0..08d3cbca3 100644
--- a/lib/plugins/authpgsql/lang/sl/settings.php
+++ b/lib/plugins/authpgsql/lang/sl/settings.php
@@ -4,5 +4,14 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Matej Urbančič <mateju@svn.gnome.org>
+ * @author matej <mateju@svn.gnome.org>
*/
$lang['database'] = 'Podatkovna zbirka za uporabo';
+$lang['addUserGroup'] = 'Ukaz SQL za dodajanje uporabnika v obstoječo skupino';
+$lang['delGroup'] = 'Ukaz SQL za odstranitev skupine';
+$lang['getUserID'] = 'Ukaz SQL za pridobitev osnovnega ključa uporabnika';
+$lang['delUser'] = 'Ukaz SQL za izbris uporabnika';
+$lang['delUserRefs'] = 'Ukaz SQL za odstranitev uporabnika iz vseh skupin';
+$lang['updateUser'] = 'Ukaz SQL za posodobitev profila uporabnika';
+$lang['delUserGroup'] = 'Ukaz SQL za odstranitev uporabnika iz podane skupine';
+$lang['getGroupID'] = 'Ukaz SQL za pridobitev osnovnega ključa podane skupine';
diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php
index 3f2ccaace..9e48f134b 100644
--- a/lib/plugins/extension/action.php
+++ b/lib/plugins/extension/action.php
@@ -28,25 +28,23 @@ class action_plugin_extension extends DokuWiki_Action_Plugin {
* @param Doku_Event $event
* @param $param
*/
- public function info(Doku_Event &$event, $param){
+ public function info(Doku_Event &$event, $param) {
global $USERINFO;
global $INPUT;
-
if($event->data != 'plugin_extension') return;
$event->preventDefault();
$event->stopPropagation();
- if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])){
+ if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])) {
http_status(403);
echo 'Forbidden';
exit;
}
- header('Content-Type: text/html; charset=utf-8');
-
$ext = $INPUT->str('ext');
if(!$ext) {
+ http_status(400);
echo 'no extension given';
return;
}
@@ -55,11 +53,32 @@ class action_plugin_extension extends DokuWiki_Action_Plugin {
$extension = plugin_load('helper', 'extension_extension');
$extension->setExtension($ext);
- /** @var helper_plugin_extension_list $list */
- $list = plugin_load('helper', 'extension_list');
-
-
- echo $list->make_info($extension);
+ $act = $INPUT->str('act');
+ switch($act) {
+ case 'enable':
+ case 'disable':
+ $json = new JSON();
+ $extension->$act(); //enables/disables
+
+ $reverse = ($act == 'disable') ? 'enable' : 'disable';
+
+ $return = array(
+ 'state' => $act.'d', // isn't English wonderful? :-)
+ 'reverse' => $reverse,
+ 'label' => $extension->getLang('btn_'.$reverse)
+ );
+
+ header('Content-Type: application/json');
+ echo $json->encode($return);
+ break;
+
+ case 'info':
+ default:
+ /** @var helper_plugin_extension_list $list */
+ $list = plugin_load('helper', 'extension_list');
+ header('Content-Type: text/html; charset=utf-8');
+ echo $list->make_info($extension);
+ }
}
}
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index 01a5c516a..47edca8c1 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -188,10 +188,17 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
* @return string The HTML code
*/
function make_screenshot(helper_plugin_extension_extension $extension) {
- if($extension->getScreenshotURL()) {
+ $screen = $extension->getScreenshotURL();
+ $thumb = $extension->getThumbnailURL();
+
+ if($screen) {
+ // use protocol independent URLs for images coming from us #595
+ $screen = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $screen);
+ $thumb = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $thumb);
+
$title = sprintf($this->getLang('screenshot'), hsc($extension->getDisplayName()));
- $img = '<a href="'.hsc($extension->getScreenshotURL()).'" target="_blank" class="extension_screenshot">'.
- '<img alt="'.$title.'" width="120" height="70" src="'.hsc($extension->getThumbnailURL()).'" />'.
+ $img = '<a href="'.hsc($screen).'" target="_blank" class="extension_screenshot">'.
+ '<img alt="'.$title.'" width="120" height="70" src="'.hsc($thumb).'" />'.
'</a>';
} elseif($extension->isTemplate()) {
$img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/template.png" />';
diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php
index 1f603a866..6ffe89eb7 100644
--- a/lib/plugins/extension/helper/repository.php
+++ b/lib/plugins/extension/helper/repository.php
@@ -31,7 +31,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
$request_data = array('fmt' => 'php');
$request_needed = false;
foreach ($list as $name) {
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $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;
@@ -46,7 +46,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
if ($data !== false) {
$extensions = unserialize($data);
foreach ($extensions as $extension) {
- $cache = new cache('##extension_manager##'.$extension['plugin'], 'repo');
+ $cache = new cache('##extension_manager##'.$extension['plugin'], '.repo');
$cache->storeCache(serialize($extension));
}
} else {
@@ -63,7 +63,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
*/
public function hasAccess() {
if ($this->has_access === null) {
- $cache = new cache('##extension_manager###hasAccess', 'repo');
+ $cache = new cache('##extension_manager###hasAccess', '.repo');
$result = null;
if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) {
$httpclient = new DokuHTTPClient();
@@ -90,7 +90,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
* @return array The data or null if nothing was found (possibly no repository access)
*/
public function getData($name) {
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $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;
@@ -130,7 +130,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin {
// store cache info for each extension
foreach($result as $ext){
$name = $ext['plugin'];
- $cache = new cache('##extension_manager##'.$name, 'repo');
+ $cache = new cache('##extension_manager##'.$name, '.repo');
$cache->storeCache(serialize($ext));
$ids[] = $name;
}
diff --git a/lib/plugins/extension/lang/de/intro_install.txt b/lib/plugins/extension/lang/de/intro_install.txt
new file mode 100644
index 000000000..4ecebe959
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_install.txt
@@ -0,0 +1 @@
+Hier können Sie Plugins und Templates von Hand installieren indem Sie sie hochladen oder eine Download-URL angeben. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt
new file mode 100644
index 000000000..1a1521050
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_plugins.txt
@@ -0,0 +1 @@
+Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt
new file mode 100644
index 000000000..7df8de185
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_search.txt
@@ -0,0 +1 @@
+Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken sie das jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/intro_templates.txt b/lib/plugins/extension/lang/de/intro_templates.txt
new file mode 100644
index 000000000..d71ce6237
--- /dev/null
+++ b/lib/plugins/extension/lang/de/intro_templates.txt
@@ -0,0 +1 @@
+Dies sind die in Ihrem Dokuwiki installierten Templates. Sie können das gewünschte Template im [[?do=admin&page=config|Konfigurations Manager]] aktivieren. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php
new file mode 100644
index 000000000..f2333cc25
--- /dev/null
+++ b/lib/plugins/extension/lang/de/lang.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author H. Richard <wanderer379@t-online.de>
+ * @author Joerg <scooter22@gmx.de>
+ */
+$lang['menu'] = 'Erweiterungen verwalten';
+$lang['tab_plugins'] = 'Installierte Plugins';
+$lang['tab_templates'] = 'Installierte Templates';
+$lang['tab_search'] = 'Suchen und Installieren';
+$lang['tab_install'] = 'Händisch installieren';
+$lang['notimplemented'] = 'Dieses Fähigkeit/Eigenschaft wurde noch nicht implementiert';
+$lang['notinstalled'] = 'Diese Erweiterung ist nicht installiert';
+$lang['alreadyenabled'] = 'Diese Erweiterung ist bereits aktiviert';
+$lang['alreadydisabled'] = 'Diese Erweiterung ist bereits deaktiviert';
+$lang['pluginlistsaveerror'] = 'Es gab einen Fehler beim Speichern der Plugin-Liste';
+$lang['unknownauthor'] = 'Unbekannter Autor';
+$lang['unknownversion'] = 'Unbekannte Version';
+$lang['btn_info'] = 'Zeige weitere Info';
+$lang['btn_update'] = 'Update';
+$lang['btn_uninstall'] = 'Deinstallation';
+$lang['btn_enable'] = 'Aktivieren';
+$lang['btn_disable'] = 'Deaktivieren';
+$lang['btn_install'] = 'Installieren';
+$lang['btn_reinstall'] = 'Neu installieren';
+$lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?';
+$lang['search_for'] = 'Erweiterung suchen:';
+$lang['search'] = 'Suchen';
+$lang['extensionby'] = '<strong>%s</strong> von %s';
+$lang['screenshot'] = 'Bildschirmfoto von %s';
+$lang['popularity'] = 'Popularität: %s%%';
+$lang['homepage_link'] = 'Doku';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Schlagworte';
+$lang['author_hint'] = 'Suche weitere Erweiterungen dieses Autors';
+$lang['installed'] = 'Installiert:';
+$lang['downloadurl'] = 'URL zum Herunterladen';
+$lang['repository'] = 'Quelle:';
+$lang['unknown'] = '<em>unbekannt</em>';
+$lang['installed_version'] = 'Installierte Version';
+$lang['install_date'] = 'Ihr letztes Update:';
+$lang['available_version'] = 'Verfügbare Version: ';
+$lang['compatible'] = 'Kompatibel mit:';
+$lang['depends'] = 'Benötigt:';
+$lang['similar'] = 'Ist ähnlich zu:';
+$lang['conflicts'] = 'Nicht kompatibel mit:';
+$lang['donate'] = 'Nützlich?';
+$lang['donate_action'] = 'Spendieren Sie dem Autor einen Kaffee!';
+$lang['repo_retry'] = 'Neu versuchen';
+$lang['provides'] = 'Enthält';
+$lang['status'] = 'Status';
+$lang['status_installed'] = 'installiert';
+$lang['status_not_installed'] = 'nicht installiert';
+$lang['status_protected'] = 'geschützt';
+$lang['status_enabled'] = 'aktiviert';
+$lang['status_disabled'] = 'deaktiviert';
+$lang['status_unmodifiable'] = 'unveränderlich';
+$lang['status_plugin'] = 'Plugin';
+$lang['status_template'] = 'Template';
+$lang['status_bundled'] = 'gebündelt';
+$lang['msg_enabled'] = 'Plugin %s ist aktiviert';
+$lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert';
+$lang['msg_delete_success'] = 'Erweiterung wurde entfernt';
+$lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert';
+$lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich ';
+$lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert';
+$lang['msg_plugin_update_success'] = 'Das Update des Plugins %s war erfolgreich';
+$lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei';
+$lang['missing_dependency'] = '<strong>fehlende oder deaktivierte Abhängigkeit:<strong>%s';
+$lang['error_badurl'] = 'URLs sollten mit http oder https beginnen';
+$lang['error_dircreate'] = 'Temporären Ordner konnte nicht erstellt werden, um Download zu empfangen';
+$lang['error_download'] = 'Download der Datei: %s nicht möglich.';
+$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall sollten Sie versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem ​​Fall müssen Sie die Datei selber herunterladen und manuell installieren.';
+$lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, laden und installieren sie die Datei manuell.';
+$lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität Ihre Wiki-Installation.';
+$lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt';
+$lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt';
+$lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt';
+$lang['git'] = 'Diese Erweiterung wurde über git installiert, daher kann diese nicht hier aktualisiert werden.';
+$lang['install_url'] = 'Von Webadresse (URL) installieren';
+$lang['install_upload'] = 'Erweiterung hochladen:';
diff --git a/lib/plugins/extension/lang/eo/intro_install.txt b/lib/plugins/extension/lang/eo/intro_install.txt
new file mode 100644
index 000000000..d9c63da1d
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_install.txt
@@ -0,0 +1 @@
+Tie vi povas permane instali kromaĵojn kaj ŝablonojn tra alŝuto aŭ indiko de URL por rekta elŝuto. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_plugins.txt b/lib/plugins/extension/lang/eo/intro_plugins.txt
new file mode 100644
index 000000000..cc7ae6628
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_plugins.txt
@@ -0,0 +1 @@
+Jenaj kromaĵoj momente estas instalitaj en via DokuWiki. Vi povas ebligi, malebligi aŭ eĉ tute malinstali ilin tie. Ankaŭ montriĝos aktualigoj de kromaĵoj -- certiĝu, ke vi legis la dokumentadon de la kromaĵo antaŭ aktualigo. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_search.txt b/lib/plugins/extension/lang/eo/intro_search.txt
new file mode 100644
index 000000000..5d194948c
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_search.txt
@@ -0,0 +1 @@
+Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj kromaĵoj kaj ŝablonoj por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/intro_templates.txt b/lib/plugins/extension/lang/eo/intro_templates.txt
new file mode 100644
index 000000000..6dc0ef671
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/intro_templates.txt
@@ -0,0 +1 @@
+Jenaj ŝablonoj momente instaliĝis en via DokuWiki. Elektu la ŝablonon por uzi en la [[?do=admin&page=config|Opcia administrilo]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php
new file mode 100644
index 000000000..6ce840be8
--- /dev/null
+++ b/lib/plugins/extension/lang/eo/lang.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['menu'] = 'Aldonaĵa administrado';
+$lang['tab_plugins'] = 'Instalitaj kromaĵoj';
+$lang['tab_templates'] = 'Instalitaj ŝablonoj';
+$lang['tab_search'] = 'Serĉi kaj instali';
+$lang['tab_install'] = 'Permana instalado';
+$lang['notimplemented'] = 'Tiu funkcio ankoraŭ ne realiĝis';
+$lang['notinstalled'] = 'Tiu aldonaĵo ne estas instalita';
+$lang['alreadyenabled'] = 'Tiu aldonaĵo jam ebliĝis';
+$lang['alreadydisabled'] = 'Tiu aldonaĵo jam malebliĝis';
+$lang['pluginlistsaveerror'] = 'Okazis eraro dum la kromaĵlisto konserviĝis';
+$lang['unknownauthor'] = 'Nekonata aŭtoro';
+$lang['unknownversion'] = 'Nekonata versio';
+$lang['btn_info'] = 'Montri pliajn informojn';
+$lang['btn_update'] = 'Aktualigi';
+$lang['btn_uninstall'] = 'Malinstali';
+$lang['btn_enable'] = 'Ebligi';
+$lang['btn_disable'] = 'Malebligi';
+$lang['btn_install'] = 'Instali';
+$lang['btn_reinstall'] = 'Re-instali';
+$lang['js']['reallydel'] = 'Ĉu vere malinstali la aldonaĵon?';
+$lang['search_for'] = 'Serĉi la aldonaĵon:';
+$lang['search'] = 'Serĉi';
+$lang['extensionby'] = '<strong>%s</strong> fare de %s';
+$lang['screenshot'] = 'Ekrankopio de %s';
+$lang['popularity'] = 'Populareco: %s%%';
+$lang['homepage_link'] = 'Dokumentoj';
+$lang['bugs_features'] = 'Cimoj';
+$lang['tags'] = 'Etikedoj:';
+$lang['author_hint'] = 'Serĉi aldonaĵojn laŭ tiu aŭtoro:';
+$lang['installed'] = 'Instalitaj:';
+$lang['downloadurl'] = 'URL por elŝuti:';
+$lang['repository'] = 'Kodbranĉo:';
+$lang['unknown'] = '<em>nekonata</em>';
+$lang['installed_version'] = 'Instalita versio:';
+$lang['install_date'] = 'Via lasta aktualigo:';
+$lang['available_version'] = 'Havebla versio:';
+$lang['compatible'] = 'Kompatibla kun:';
+$lang['depends'] = 'Dependas de:';
+$lang['similar'] = 'Simila al:';
+$lang['conflicts'] = 'Konfliktas kun:';
+$lang['donate'] = 'Ĉu vi ŝatas tion?';
+$lang['donate_action'] = 'Aĉetu kafon al la aŭtoro!';
+$lang['repo_retry'] = 'Reprovi';
+$lang['provides'] = 'Provizas per:';
+$lang['status'] = 'Statuso:';
+$lang['status_installed'] = 'instalita';
+$lang['status_not_installed'] = 'ne instalita';
+$lang['status_protected'] = 'protektita';
+$lang['status_enabled'] = 'ebligita';
+$lang['status_disabled'] = 'malebligita';
+$lang['status_unmodifiable'] = 'neŝanĝebla';
+$lang['status_plugin'] = 'kromaĵo';
+$lang['status_template'] = 'ŝablono';
+$lang['status_bundled'] = 'kunliverita';
+$lang['msg_enabled'] = 'Kromaĵo %s ebligita';
+$lang['msg_disabled'] = 'Kromaĵo %s malebligita';
+$lang['msg_delete_success'] = 'Aldonaĵo malinstaliĝis';
+$lang['msg_template_install_success'] = 'Ŝablono %s sukcese instaliĝis';
+$lang['msg_template_update_success'] = 'Ŝablono %s sukcese aktualiĝis';
+$lang['msg_plugin_install_success'] = 'Kromaĵo %s sukcese instaliĝis';
+$lang['msg_plugin_update_success'] = 'Kromaĵo %s sukcese aktualiĝis';
+$lang['msg_upload_failed'] = 'Ne eblis alŝuti la dosieron';
+$lang['missing_dependency'] = '<strong>Mankanta aŭ malebligita dependeco:</strong> %s';
+$lang['security_issue'] = '<strong>Sekureca problemo:</strong> %s';
+$lang['security_warning'] = '<strong>Sekureca averto:</strong> %s';
+$lang['update_available'] = '<strong>Aktualigo:</strong> Nova versio %s haveblas.';
+$lang['wrong_folder'] = '<strong>Kromaĵo instalita malĝuste:</strong> Renomu la kromaĵdosierujon "%s" al "%s".';
+$lang['url_change'] = '<strong>URL ŝanĝita:</strong> La elŝuta URL ŝanĝiĝis ekde la lasta elŝuto. Kontrolu, ĉu la nova URL validas antaŭ aktualigi aldonaĵon.<br />Nova: %s<br />Malnova: %s';
+$lang['error_badurl'] = 'URLoj komenciĝu per http aŭ https';
+$lang['error_dircreate'] = 'Ne eblis krei portempan dosierujon por akcepti la elŝuton';
+$lang['error_download'] = 'Ne eblis elŝuti la dosieron: %s';
+$lang['error_decompress'] = 'Ne eblis malpaki la elŝutitan dosieron. Kialo povus esti fuŝa elŝuto, kaj vi reprovu; aŭ la pakiga formato estas nekonata, kaj vi devas elŝuti kaj instali permane.';
+$lang['error_findfolder'] = 'Ne eblis rekoni la aldonaĵ-dosierujon, vi devas elŝuti kaj instali permane';
+$lang['error_copy'] = 'Okazis kopiad-eraro dum la provo instali dosierojn por la dosierujo <em>%s</em>: la disko povus esti plena aŭ la alirpermesoj por dosieroj malĝustaj. Rezulto eble estas nur parte instalita kromaĵo, kiu malstabiligas vian vikion';
+$lang['noperms'] = 'La aldonaĵ-dosierujo ne estas skribebla';
+$lang['notplperms'] = 'La ŝablon-dosierujo ne estas skribebla';
+$lang['nopluginperms'] = 'La kromaĵ-dosierujo ne estas skribebla';
+$lang['git'] = 'Tiu aldonaĵo estis instalita pere de git, eble vi ne aktualigu ĝin ĉi tie.';
+$lang['install_url'] = 'Instali de URL:';
+$lang['install_upload'] = 'Alŝuti aldonaĵon:';
diff --git a/lib/plugins/extension/lang/fr/intro_install.txt b/lib/plugins/extension/lang/fr/intro_install.txt
new file mode 100644
index 000000000..6f68a2606
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_install.txt
@@ -0,0 +1 @@
+Ici, vous pouvez installer des extensions, greffons et modèles. Soit en les téléversant, soit en indiquant un URL de téléchargement. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_plugins.txt b/lib/plugins/extension/lang/fr/intro_plugins.txt
new file mode 100644
index 000000000..a40b863d2
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_plugins.txt
@@ -0,0 +1 @@
+Voilà la liste des extensions actuellement installées. À partir d'ici, vous pouvez les activer, les désactiver ou même les désinstaller complètement. Cette page affiche également les mises à jour. Assurez vous de lire la documentation avant de faire la mise à jour. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_search.txt b/lib/plugins/extension/lang/fr/intro_search.txt
new file mode 100644
index 000000000..418e35972
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_search.txt
@@ -0,0 +1 @@
+Cet onglet vous donne accès à toutes les extensions de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/intro_templates.txt b/lib/plugins/extension/lang/fr/intro_templates.txt
new file mode 100644
index 000000000..fefdb5538
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/intro_templates.txt
@@ -0,0 +1 @@
+Voici la liste des modèles actuellement installés. Le [[?do=admin&page=config|gestionnaire de configuration]] vous permet de choisir le modèle à utiliser. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php
new file mode 100644
index 000000000..c2dae0fc9
--- /dev/null
+++ b/lib/plugins/extension/lang/fr/lang.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ */
+$lang['menu'] = 'Gestionnaire d\'extension';
+$lang['tab_plugins'] = 'Greffons installés';
+$lang['tab_templates'] = 'Modèles installés';
+$lang['tab_search'] = 'Rechercher et installer';
+$lang['tab_install'] = 'Installation manuelle';
+$lang['notimplemented'] = 'Cette fonctionnalité n\'est pas encore installée';
+$lang['notinstalled'] = 'Cette extension n\'est pas installée';
+$lang['alreadyenabled'] = 'Cette extension a déjà été installée';
+$lang['alreadydisabled'] = 'Cette extension a déjà été désactivée';
+$lang['pluginlistsaveerror'] = 'Une erreur s\'est produite lors de l\'enregistrement de la liste des greffons.';
+$lang['unknownauthor'] = 'Auteur inconnu';
+$lang['unknownversion'] = 'Version inconnue';
+$lang['btn_info'] = 'Montrer plus d\'informations';
+$lang['btn_update'] = 'Mettre à jour';
+$lang['btn_uninstall'] = 'Désinstaller';
+$lang['btn_enable'] = 'Activer';
+$lang['btn_disable'] = 'Désactiver';
+$lang['btn_install'] = 'Installer';
+$lang['btn_reinstall'] = 'Réinstaller';
+$lang['js']['reallydel'] = 'Vraiment désinstaller cette extension';
+$lang['search_for'] = 'Rechercher l\'extension :';
+$lang['search'] = 'Chercher';
+$lang['extensionby'] = '<strong>%s</strong> de %s';
+$lang['screenshot'] = 'Aperçu de %s';
+$lang['popularity'] = 'Popularité : %s%%';
+$lang['homepage_link'] = 'Documents';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Étiquettes :';
+$lang['author_hint'] = 'Chercher les extensions de cet auteur';
+$lang['installed'] = 'Installés :';
+$lang['downloadurl'] = 'URL de téléchargement :';
+$lang['repository'] = 'Entrepôt : ';
+$lang['unknown'] = '<em>inconnu</em>';
+$lang['installed_version'] = 'Version installée :';
+$lang['install_date'] = 'Votre dernière mise à jour :';
+$lang['available_version'] = 'Version disponible :';
+$lang['compatible'] = 'Compatible avec :';
+$lang['depends'] = 'Dépend de :';
+$lang['similar'] = 'Similaire à :';
+$lang['conflicts'] = 'En conflit avec :';
+$lang['donate'] = 'Vous aimez ?';
+$lang['donate_action'] = 'Payer un café à l\'auteur !';
+$lang['repo_retry'] = 'Réessayer';
+$lang['provides'] = 'Fournit :';
+$lang['status'] = 'État :';
+$lang['status_installed'] = 'installé';
+$lang['status_not_installed'] = 'non installé';
+$lang['status_protected'] = 'protégé';
+$lang['status_enabled'] = 'activé';
+$lang['status_disabled'] = 'désactivé';
+$lang['status_unmodifiable'] = 'non modifiable';
+$lang['status_plugin'] = 'greffon';
+$lang['status_template'] = 'modèle';
+$lang['status_bundled'] = 'fourni';
+$lang['msg_enabled'] = 'Greffon %s activé';
+$lang['msg_disabled'] = 'Greffon %s désactivé';
+$lang['msg_delete_success'] = 'Extension désinstallée';
+$lang['msg_template_install_success'] = 'Modèle %s installée avec succès';
+$lang['msg_template_update_success'] = 'Modèle %s mis à jour avec succès';
+$lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès';
+$lang['msg_plugin_update_success'] = 'Greffon %s mis à jour avec succès';
+$lang['msg_upload_failed'] = 'Téléversement échoué';
+$lang['missing_dependency'] = '<strong>Dépendance absente ou désactivée :</strong> %s';
+$lang['security_issue'] = '<strong>Problème de sécurité :</strong> %s';
+$lang['security_warning'] = '<strong>Avertissement deSécurité :</strong> %s';
+$lang['update_available'] = '<strong>Mise à jour :</strong> La version %s est disponible.';
+$lang['wrong_folder'] = '<strong>Greffon installé incorrectement :</strong> Renomer le dossier du greffon "%s" en "%s".';
+$lang['url_change'] = '<strong>URL modifié :</strong> L\'URL de téléchargement a changé depuis le dernier téléchargement. Vérifiez si l\'URL est valide avant de mettre à jour l\'extension.<br />Nouvel URL : %s<br />Ancien : %s';
+$lang['error_badurl'] = 'Les URL doivent commencer par http ou https';
+$lang['error_dircreate'] = 'Impossible de créer le dossier temporaire pour le téléchargement.';
+$lang['error_download'] = 'Impossible de télécharger le fichier : %s';
+$lang['error_decompress'] = 'Impossible de décompresser le fichier téléchargé. C\'est peut être le résultat d\'une erreur de téléchargement, auquel cas vous devriez réessayer. Le format de compression est peut-être inconnu. Dans ce cas il vous faudra procéder à une installation manuelle.';
+$lang['error_findfolder'] = 'Impossible d\'idnetifier le dossier de l\'extension. vous devez procéder à une installation manuelle.';
+$lang['error_copy'] = 'Une erreur de copie de fichier s\'est produite lors de l\'installation des fichiers dans le dossier <em>%s</em>. Il se peut que le disque soit plein, ou que les permissions d\'accès aux fichiers soient incorrectes. Il est possible que le greffon soit partiellement installé et que cela laisse votre installation de DoluWiki instable.';
+$lang['noperms'] = 'Impossible d\'écrire dans le dossier des extensions.';
+$lang['notplperms'] = 'Impossible d\'écrire dans le dossier des modèles.';
+$lang['nopluginperms'] = 'Impossible d\'écrire dans le dossier des greffons.';
+$lang['git'] = 'Cette extension a été installé via git, vous voudrez peut-être ne pas la mettre à jour ici.';
+$lang['install_url'] = 'Installez depuis l\'URL :';
+$lang['install_upload'] = 'Téléversez l\'extension :';
diff --git a/lib/plugins/extension/lang/ja/intro_install.txt b/lib/plugins/extension/lang/ja/intro_install.txt
new file mode 100644
index 000000000..889ed6879
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_install.txt
@@ -0,0 +1 @@
+ここでは、アップロードするかダウンロードURLを指定して、手動でプラグインやテンプレートをインストールできます。
diff --git a/lib/plugins/extension/lang/ja/intro_plugins.txt b/lib/plugins/extension/lang/ja/intro_plugins.txt
new file mode 100644
index 000000000..9bfc68431
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_plugins.txt
@@ -0,0 +1 @@
+このDokuWikiに現在インストールされているプラグインです。ここでは、これらプラグインを有効化、無効化、アンインストールすることができます。同様にプラグインのアップデートも表示されます。アップデート前に、プラグインのマニュアルをお読みください。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/intro_search.txt b/lib/plugins/extension/lang/ja/intro_search.txt
new file mode 100644
index 000000000..66d977b1b
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_search.txt
@@ -0,0 +1 @@
+このタブでは、DokuWiki用の利用可能なすべてのサードパーティのプラグインとテンプレートにアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください、最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/intro_templates.txt b/lib/plugins/extension/lang/ja/intro_templates.txt
new file mode 100644
index 000000000..f97694aaa
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/intro_templates.txt
@@ -0,0 +1 @@
+このDokuWikiに現在インストールされているテンプレートです。[[?do=admin&page=config|設定管理]]で使用するテンプレートを選択できます。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php
new file mode 100644
index 000000000..0401d7630
--- /dev/null
+++ b/lib/plugins/extension/lang/ja/lang.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Hideaki SAWADA <chuno@live.jp>
+ */
+$lang['menu'] = '拡張機能管理';
+$lang['tab_plugins'] = 'インストール済プラグイン';
+$lang['tab_templates'] = 'インストール済テンプレート';
+$lang['tab_install'] = '手動インストール';
+$lang['notimplemented'] = 'この機能は未実装です。';
+$lang['notinstalled'] = 'この拡張機能はインストールされていません。';
+$lang['alreadyenabled'] = 'この拡張機能は有効です。';
+$lang['alreadydisabled'] = 'この拡張機能は無効です。';
+$lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラーが発生しました。';
+$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['downloadurl'] = 'ダウンロード URL:';
+$lang['repository'] = 'リポジトリ:';
+$lang['depends'] = '依存:';
+$lang['similar'] = '類似:';
+$lang['status_installed'] = 'インストール済';
+$lang['status_not_installed'] = '未インストール';
+$lang['status_enabled'] = '有効';
+$lang['status_disabled'] = '無効';
+$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['security_issue'] = '<strong>セキュリティ問題:</strong> %s';
+$lang['security_warning'] = '<strong>セキュリティ警告:</strong> %s';
+$lang['update_available'] = '<strong>アップデート:</strong>%sの新バージョンが利用可能です。 ';
+$lang['error_badurl'] = 'URLはhttpかhttpsで始まる必要があります。';
+$lang['error_dircreate'] = 'ダウンロード用の一時フォルダが作成できません。';
+$lang['error_download'] = 'ファイルをダウンロードできません:%s';
+$lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。';
+$lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。';
+$lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。';
diff --git a/lib/plugins/extension/lang/nl/intro_install.txt b/lib/plugins/extension/lang/nl/intro_install.txt
new file mode 100644
index 000000000..6a0b41055
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_install.txt
@@ -0,0 +1 @@
+Hier kunt u handmatig plugins en templates installeren door deze te uploaden of door een directe download URL op te geven. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_plugins.txt b/lib/plugins/extension/lang/nl/intro_plugins.txt
new file mode 100644
index 000000000..0077aca30
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_plugins.txt
@@ -0,0 +1 @@
+Dit zijn de momenteel in uw Dokuwiki geïnstalleerde plugins. U kunt deze hier aan of uitschakelen danwel geheel deïnstalleren. Plugin updates zijn hier ook opgenomen, lees de pluin documentatie voordat u update. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt
new file mode 100644
index 000000000..8fc3900ad
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_search.txt
@@ -0,0 +1 @@
+Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening meel dat indien u Plugins van derden installeerd deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/intro_templates.txt b/lib/plugins/extension/lang/nl/intro_templates.txt
new file mode 100644
index 000000000..5ef23dadf
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/intro_templates.txt
@@ -0,0 +1 @@
+Deze templates zijn thans in DokuWiki geïnstalleerd. U kent een template selecteren middels [[?do=admin&page=config|Configuration Manager]] . \ No newline at end of file
diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php
new file mode 100644
index 000000000..783168c2e
--- /dev/null
+++ b/lib/plugins/extension/lang/nl/lang.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Rene <wllywlnt@yahoo.com>
+ */
+$lang['menu'] = 'Extension Manager (Uitbreidings Beheerder)';
+$lang['tab_plugins'] = 'Geïnstalleerde Plugins';
+$lang['tab_templates'] = 'Geïnstalleerde Templates';
+$lang['tab_search'] = 'Zoek en installeer';
+$lang['tab_install'] = 'Handmatige installatie';
+$lang['notimplemented'] = 'Deze toepassing is nog niet geïnstalleerd';
+$lang['notinstalled'] = 'Deze uitbreiding is nog niet geïnstalleerd';
+$lang['alreadyenabled'] = 'Deze uitbreiding is reeds ingeschakeld';
+$lang['alreadydisabled'] = 'Deze uitbreiding is reeds uitgeschakeld';
+$lang['pluginlistsaveerror'] = 'Fout bij het opslaan van de plugin lijst';
+$lang['unknownauthor'] = 'Onbekende auteur';
+$lang['unknownversion'] = 'Onbekende versie';
+$lang['btn_info'] = 'Toon meer informatie';
+$lang['btn_update'] = 'Update';
+$lang['btn_uninstall'] = 'Deinstalleer';
+$lang['btn_enable'] = 'Schakel aan';
+$lang['btn_disable'] = 'Schakel uit';
+$lang['btn_install'] = 'Installeer';
+$lang['btn_reinstall'] = 'Her-installeer';
+$lang['js']['reallydel'] = 'Wilt u deze uitbreiding deinstalleren ?';
+$lang['search_for'] = 'Zoek Uitbreiding:';
+$lang['search'] = 'Zoek';
+$lang['extensionby'] = '<strong>%s</strong> by %s';
+$lang['screenshot'] = 'Schermafdruk bij %s';
+$lang['popularity'] = 'Populariteit:%s%%';
+$lang['homepage_link'] = 'Dokumenten';
+$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd';
+$lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd';
+$lang['msg_template_update_success'] = 'Template %s werd succesvol ge-update';
+$lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd';
+$lang['msg_plugin_update_success'] = 'Plugin %s werd succesvol ge-update';
+$lang['msg_upload_failed'] = 'Uploaden van het bestand is mislukt';
+$lang['missing_dependency'] = '<strong>niet aanwezige of uitgeschakelde afhankelijkheid</strong> %s';
+$lang['security_issue'] = '<strong>Veiligheids kwestie:</strong> %s';
+$lang['security_warning'] = '<strong>Veiligheids Waarschuwing</strong> %s';
+$lang['update_available'] = '<strong>Update:</strong> Nieuwe versie %s is beschikbaar.';
+$lang['wrong_folder'] = '<strong>Plugin onjuist geïnstalleerd:</strong> Hernoem de plugin directory van "%s" naar"%s"';
+$lang['url_change'] = '<strong>URL gewijzigd:</strong> Download URL is gewijzigd sinds de laatste download. Controleer of de nieuwe URL juist is voordat u de uitbreiding update. <br />Nieuw:%s<Br /> Vorig: %s';
+$lang['error_badurl'] = 'URLs moeten beginnen met http of https';
+$lang['error_dircreate'] = 'De tijdelijke map kon niet worden gemaakt om de download te ontvangen';
+$lang['error_download'] = 'Het is niet mogelijk het bestand te downloaden: %s';
+$lang['error_decompress'] = 'Onmogelijk om het gedownloade bestand uit te pakken. Dit is wellicht het gevolg van een onvolledige/onjuiste download, in welk geval u het nog eens moet proberen; of het compressie formaat is onbekend in welk geval u het bestand handmatig moet downloaden en installeren.';
+$lang['error_findfolder'] = 'Onmogelijk om de uitbreidings directory te vinden, u moet het zelf downloaden en installeren';
+$lang['error_copy'] = 'Er was een bestand kopieer fout tijdens het installeren van bestanden in directory <em>%s</em>: de schijf kan vol zijn of de bestand toegangs rechten kunnen onjuist zijn. Dit kan tot gevolg hebben dat de plugin slechts gedeeltelijk werd geïnstalleerd waardoor uw wiki installatie onstabiel is ';
+$lang['noperms'] = 'Uitbreidings directory is niet schrijfbaar';
+$lang['notplperms'] = 'Template directory is niet schrijfbaar';
+$lang['nopluginperms'] = 'Plugin directory is niet schrijfbaar';
+$lang['git'] = 'De uitbreiding werd geïnstalleerd via git, u wilt deze hier wellicht niet aanpassen.';
+$lang['install_url'] = 'Installeer vanaf URL:';
+$lang['install_upload'] = 'Upload Uitbreiding:';
+$lang['bugs_features'] = 'Bugs';
+$lang['tags'] = 'Tags:';
+$lang['author_hint'] = 'Zoek uitbreidingen van deze auteur:';
+$lang['installed'] = 'Geinstalleerd:';
+$lang['downloadurl'] = 'Download URL:';
+$lang['repository'] = 'Repository ( centrale opslag)';
+$lang['unknown'] = '<em>onbekend</em>';
+$lang['installed_version'] = 'Geïnstalleerde versie';
+$lang['install_date'] = 'Uw laatste update :';
+$lang['available_version'] = 'Beschikbare versie:';
+$lang['compatible'] = 'Compatible met :';
+$lang['depends'] = 'Afhankelijk van :';
+$lang['similar'] = 'Soortgelijk :';
+$lang['conflicts'] = 'Conflicteerd met :';
+$lang['donate'] = 'Vindt u dit leuk ?';
+$lang['donate_action'] = 'Koop een kop koffie voor de auteur!';
+$lang['repo_retry'] = 'Herhaal';
+$lang['provides'] = 'Zorgt voor:';
+$lang['status'] = 'Status:';
+$lang['status_installed'] = 'Geïnstalleerd';
+$lang['status_not_installed'] = 'niet geïnstalleerd ';
+$lang['status_protected'] = 'beschermd';
+$lang['status_enabled'] = 'ingeschakeld';
+$lang['status_disabled'] = 'uitgeschakeld';
+$lang['status_unmodifiable'] = 'Niet wijzigbaar';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'template';
+$lang['status_bundled'] = 'Gebundeld';
+$lang['msg_enabled'] = 'Plugin %s ingeschakeld';
+$lang['msg_disabled'] = 'Plugin %s uitgeschakeld';
diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php
new file mode 100644
index 000000000..0a6df12be
--- /dev/null
+++ b/lib/plugins/extension/lang/ru/lang.php
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['menu'] = 'Управление дополнениями';
+$lang['tab_plugins'] = 'Установленные плагины';
+$lang['tab_templates'] = 'Установленные шаблоны';
+$lang['tab_search'] = 'Поиск и установка';
+$lang['tab_install'] = 'Ручная установка';
+$lang['notinstalled'] = 'Это дополнение не установлено';
+$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['extensionby'] = '<strong>%s</strong> — %s';
+$lang['popularity'] = 'Попоулярность: %s%%';
+$lang['bugs_features'] = 'Ошибки';
+$lang['tags'] = 'Метки:';
+$lang['repository'] = 'Репозиторий:';
+$lang['unknown'] = '<em>неизвестно</em>';
diff --git a/lib/plugins/extension/lang/sk/lang.php b/lib/plugins/extension/lang/sk/lang.php
new file mode 100644
index 000000000..d00c2e32b
--- /dev/null
+++ b/lib/plugins/extension/lang/sk/lang.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Martin Michalek <michalek.dev@gmail.com>
+ */
+$lang['tab_plugins'] = 'Inštalované pluginy';
+$lang['tab_templates'] = 'Inštalované šablóny';
+$lang['tab_search'] = 'Hľadanie e inštalácia';
+$lang['tab_install'] = 'Manuálna inštalácia';
+$lang['notimplemented'] = 'Táto vlastnosť ešte nebola implementovaná';
+$lang['unknownauthor'] = 'Neznámy autor';
+$lang['unknownversion'] = 'Neznáma verzia';
+$lang['btn_info'] = 'Viac informácií';
+$lang['btn_update'] = 'Aktualizácia';
+$lang['btn_uninstall'] = 'Odinštalovanie';
+$lang['btn_enable'] = 'Povolenie';
+$lang['btn_disable'] = 'Zablokovanie';
+$lang['btn_install'] = 'Inštalácia';
+$lang['btn_reinstall'] = 'Re-Inštalácia';
+$lang['search'] = 'Vyhľadávanie';
+$lang['extensionby'] = '<strong>%s</strong> od %s';
+$lang['screenshot'] = 'Obrázok od %s';
+$lang['popularity'] = 'Popularita: %s%%';
+$lang['homepage_link'] = 'Dokumentácia';
+$lang['bugs_features'] = 'Chyby:';
+$lang['tags'] = 'Kľúčové slová:';
+$lang['unknown'] = '<em>neznámy</em>';
+$lang['installed_version'] = 'Inštalovaná verzia:';
+$lang['install_date'] = 'Posledná aktualizácia:';
+$lang['available_version'] = 'Dostupné verzie:';
+$lang['compatible'] = 'Kompaktibilita:';
+$lang['similar'] = 'Podobné:';
+$lang['conflicts'] = 'V konflikte:';
+$lang['status_installed'] = 'inštalovaný';
+$lang['status_not_installed'] = 'neinštalovaný';
+$lang['status_protected'] = 'chránený';
+$lang['status_enabled'] = 'povolený';
+$lang['status_disabled'] = 'nepovolený';
+$lang['status_plugin'] = 'plugin';
+$lang['status_template'] = 'šablóna';
+$lang['msg_enabled'] = 'Plugin %s povolený';
+$lang['msg_disabled'] = 'Plugin %s nepovolený';
+$lang['msg_template_install_success'] = 'Šablóna %s úspešne nainštalovaná';
+$lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná';
+$lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný';
+$lang['msg_plugin_update_success'] = 'Plugin %s úspešne aktualizovaný';
+$lang['msg_upload_failed'] = 'Nahrávanie súboru zlyhalo';
+$lang['update_available'] = '<strong>Aktualizácia:</strong> Nová verzia %s.';
+$lang['wrong_folder'] = '<strong>Plugin nesprávne nainštalovaný:</strong> Premenujte adresár s pluginom "%s" na "%s".';
+$lang['error_badurl'] = 'URL by mali mať na začiatku http alebo https';
+$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru';
+$lang['error_download'] = 'Nie je možné stiahnuť súbor: %s';
+$lang['error_decompress'] = 'Nie je možné dekomprimovať stiahnutý súbor. Môže to byť dôvodom chyby sťahovania (v tom prípade to skúste znova) alebo neznámym kompresným formátom (v tom prípade musíte stiahnuť a inštalovať manuálne).';
+$lang['error_copy'] = 'Chyba kopírovania pri inštalácii do adresára <em>%s</em>: disk môže byť plný alebo nemáte potrebné prístupové oprávnenie. Dôsledkom može byť čiastočne inštalovaný plugin a nestabilná wiki inštalácia.';
+$lang['nopluginperms'] = 'Adresár s pluginom nie je zapisovateľný.';
+$lang['install_url'] = 'Inštalácia z URL:';
diff --git a/lib/plugins/extension/lang/zh/intro_install.txt b/lib/plugins/extension/lang/zh/intro_install.txt
new file mode 100644
index 000000000..640839319
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_install.txt
@@ -0,0 +1 @@
+你可以通过上传或直接提供下载链接来安装插件和模板。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/intro_search.txt b/lib/plugins/extension/lang/zh/intro_search.txt
new file mode 100644
index 000000000..0059075c0
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_search.txt
@@ -0,0 +1 @@
+这个标签会为你展示所有DokuWiki的第三方插件和模板。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/intro_templates.txt b/lib/plugins/extension/lang/zh/intro_templates.txt
new file mode 100644
index 000000000..20575d381
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/intro_templates.txt
@@ -0,0 +1 @@
+DokuWiki当前所使用的模板已经安装了,你可以在[[?do=admin&page=config|配置管理器]]里选择你要的模板。 \ No newline at end of file
diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php
new file mode 100644
index 000000000..b9db01540
--- /dev/null
+++ b/lib/plugins/extension/lang/zh/lang.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Cupen <Cupenoruler@foxmail.com>
+ * @author xiqingongzi <Xiqingongzi@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['pluginlistsaveerror'] = '保存插件列表时碰到个错误';
+$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['extensionby'] = '<strong>%s</strong> by %s';
+$lang['screenshot'] = '%s 的截图';
+$lang['popularity'] = '人气: %s%%';
+$lang['homepage_link'] = '文档';
+$lang['bugs_features'] = '错误';
+$lang['tags'] = '标签:';
+$lang['author_hint'] = '搜索这个作者的插件';
+$lang['installed'] = '已安装的:';
+$lang['downloadurl'] = '下载地址:';
+$lang['repository'] = '版本库:';
+$lang['unknown'] = '<em>未知的</em>';
+$lang['installed_version'] = '已安装版本:';
+$lang['install_date'] = '您的最后一次升级:';
+$lang['donate'] = '喜欢?';
+$lang['donate_action'] = '捐给作者一杯咖啡钱!';
+$lang['repo_retry'] = '重试';
+$lang['status'] = '现状:';
+$lang['status_installed'] = '已安装的';
+$lang['status_plugin'] = '插件';
+$lang['status_template'] = '模板';
diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js
index bd3c97758..fab88162d 100644
--- a/lib/plugins/extension/script.js
+++ b/lib/plugins/extension/script.js
@@ -1,9 +1,11 @@
jQuery(function(){
+ var $extmgr = jQuery('#extension__manager');
+
/**
* Confirm uninstalling
*/
- jQuery('#extension__manager input.uninstall').click(function(e){
+ $extmgr.find('input.uninstall').click(function(e){
if(!window.confirm(LANG.plugins.extension.reallydel)){
e.preventDefault();
return false;
@@ -15,7 +17,7 @@ jQuery(function(){
* very simple lightbox
* @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/
*/
- jQuery('#extension__manager a.extension_screenshot').click(function(e) {
+ $extmgr.find('a.extension_screenshot').click(function(e) {
e.preventDefault();
//Get clicked link href
@@ -42,9 +44,48 @@ jQuery(function(){
});
/**
+ * Enable/Disable extension via AJAX
+ */
+ $extmgr.find('input.disable, input.enable').click(function (e) {
+ e.preventDefault();
+ var $btn = jQuery(this);
+
+ // get current state
+ var extension = $btn.attr('name').split('[')[2];
+ extension = extension.substr(0, extension.length - 1);
+ var act = ($btn.hasClass('disable')) ? 'disable' : 'enable';
+
+ // disable while we wait
+ $btn.attr('disabled', 'disabled');
+ $btn.css('cursor', 'wait');
+
+ // execute
+ jQuery.get(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'plugin_extension',
+ ext: extension,
+ act: act
+ },
+ function (data) {
+ $btn.css('cursor', '')
+ .removeAttr('disabled')
+ .removeClass('disable')
+ .removeClass('enable')
+ .val(data.label)
+ .addClass(data.reverse)
+ .parents('li')
+ .removeClass('disabled')
+ .removeClass('enabled')
+ .addClass(data.state);
+ }
+ );
+ });
+
+ /**
* AJAX detail infos
*/
- jQuery('#extension__manager a.info').click(function(e){
+ $extmgr.find('a.info').click(function(e){
e.preventDefault();
var $link = jQuery(this);
@@ -60,7 +101,8 @@ jQuery(function(){
DOKU_BASE + 'lib/exe/ajax.php',
{
call: 'plugin_extension',
- ext: $link.data('extid')
+ ext: $link.data('extid'),
+ act: 'info'
},
function(data){
$link.parent().append(data);
diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php
index f8c6eb484..9265f44d5 100644
--- a/lib/plugins/info/syntax.php
+++ b/lib/plugins/info/syntax.php
@@ -48,7 +48,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Handle the match
*/
- function handle($match, $state, $pos, Doku_Handler &$handler){
+ function handle($match, $state, $pos, Doku_Handler $handler){
$match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end
return array(strtolower($match));
}
@@ -56,7 +56,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Create output
*/
- function render($format, Doku_Renderer &$renderer, $data) {
+ function render($format, Doku_Renderer $renderer, $data) {
if($format == 'xhtml'){
/** @var Doku_Renderer_xhtml $renderer */
//handle various info stuff
diff --git a/lib/plugins/plugin/lang/cs/admin_plugin.txt b/lib/plugins/plugin/lang/cs/admin_plugin.txt
deleted file mode 100644
index 6ebf1e78f..000000000
--- a/lib/plugins/plugin/lang/cs/admin_plugin.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-====== Správa pluginů ======
-
-Na této stránce lze spravovat pluginy DokuWiki [[doku>plugins|plugins]]. Aby bylo možné stahovat a instalovat pluginy, musí mít webový server přístup pro zápis do adresáře //plugin//.
diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php
deleted file mode 100644
index 8917f8ef6..000000000
--- a/lib/plugins/plugin/lang/cs/lang.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Tomas Valenta <t.valenta@sh.cvut.cz>
- * @author Zbynek Krivka <zbynek.krivka@seznam.cz>
- * @author Bohumir Zamecnik <bohumir@zamecnik.org>
- * @author tomas@valenta.cz
- * @author Marek Sacha <sachamar@fel.cvut.cz>
- * @author Lefty <lefty@multihost.cz>
- * @author Vojta Beran <xmamut@email.cz>
- * @author zbynek.krivka@seznam.cz
- * @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
- * @author Jakub A. Těšínský (j@kub.cz)
- * @author mkucera66@seznam.cz
- * @author Zbyněk Křivka <krivka@fit.vutbr.cz>
- * @author Gerrit Uitslag <klapinklapin@gmail.com>
- * @author Petr Klíma <qaxi@seznam.cz>
- */
-$lang['menu'] = 'Správa pluginů';
-$lang['download'] = 'Stáhnout a instalovat plugin';
-$lang['manage'] = 'Seznam instalovaných pluginů';
-$lang['btn_info'] = 'info';
-$lang['btn_update'] = 'aktualizovat';
-$lang['btn_delete'] = 'smazat';
-$lang['btn_settings'] = 'nastavení';
-$lang['btn_download'] = 'Stáhnout';
-$lang['btn_enable'] = 'Uložit';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Instalován:';
-$lang['lastupdate'] = 'Poslední aktualizace:';
-$lang['source'] = 'Zdroj:';
-$lang['unknown'] = 'neznámý';
-$lang['updating'] = 'Aktualizuji ...';
-$lang['updated'] = 'Modul %s úspěšně aktualizován';
-$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány';
-$lang['update_none'] = 'Žádné aktualizace nenalezeny.';
-$lang['deleting'] = 'Probíhá mazání ...';
-$lang['deleted'] = 'Plugin %s smazán.';
-$lang['downloading'] = 'Stahuji ...';
-$lang['downloaded'] = 'Plugin %s nainstalován';
-$lang['downloads'] = 'Následující pluginy byly úspěšně instalovány:';
-$lang['download_none'] = 'Žádné pluginy nebyly nenalezeny, nebo se vyskytla nějaká chyba při
-stahování a instalaci.';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Součásti';
-$lang['noinfo'] = 'Plugin nevrátil žádné informace. Může být poškozen nebo špatný.';
-$lang['name'] = 'Jméno:';
-$lang['date'] = 'Datum:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Popis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
-$lang['error'] = 'Nastala neznámá chyba.';
-$lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s';
-$lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru';
-$lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat';
-$lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.';
-$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu <em>%s</em>. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.';
-$lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu <em>%s</em>. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.';
-$lang['enabled'] = 'Plugin %s aktivován.';
-$lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.';
-$lang['disabled'] = 'Plugin %s deaktivován.';
-$lang['notdisabled'] = 'Plugin %s nelze deaktivovat, zkontrolujte práva k souborům.';
-$lang['packageinstalled'] = 'Balíček pluginů (%d plugin(ů): %s) úspěšně nainstalován.';
diff --git a/lib/plugins/plugin/lang/el/admin_plugin.txt b/lib/plugins/plugin/lang/el/admin_plugin.txt
deleted file mode 100644
index 8b292935d..000000000
--- a/lib/plugins/plugin/lang/el/admin_plugin.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-====== Διαχείριση Επεκτάσεων ======
-
-Σε αυτή την σελίδα μπορείτε να διαχειριστείτε τις [[doku>plugins|επεκτάσεις]] του Dokuwiki σας. Για να μπορέσετε να εγκαταστήσετε νέες επεκτάσεις, ο αντίστοιχος φάκελος συστήματος θα πρέπει να είναι εγγράψιμος από τον χρήστη κάτω από τον οποίο εκτελείται η εφαρμογή του εξυπηρετητή σας.
-
-
diff --git a/lib/plugins/plugin/lang/el/lang.php b/lib/plugins/plugin/lang/el/lang.php
deleted file mode 100644
index f50e26c46..000000000
--- a/lib/plugins/plugin/lang/el/lang.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Christopher Smith <chris@jalakai.co.uk>
- * @author Thanos Massias <tm@thriasio.gr>
- * @author Αθανάσιος Νταής <homunculus@wana.gr>
- * @author Konstantinos Koryllos <koryllos@gmail.com>
- * @author George Petsagourakis <petsagouris@gmail.com>
- * @author Petros Vidalis <pvidalis@gmail.com>
- * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com
- */
-$lang['menu'] = 'Διαχείριση Επεκτάσεων';
-$lang['download'] = 'Κατεβάστε και εγκαταστήστε μια νέα επέκταση (plugin)';
-$lang['manage'] = 'Εγκατεστημένες επεκτάσεις';
-$lang['btn_info'] = 'πληροφορίες';
-$lang['btn_update'] = 'ενημέρωση';
-$lang['btn_delete'] = 'διαγραφή';
-$lang['btn_settings'] = 'ρυθμίσεις';
-$lang['btn_download'] = 'Μεταφόρτωση';
-$lang['btn_enable'] = 'Αποθήκευση';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Εγκατεστημένη:';
-$lang['lastupdate'] = 'Τελευταία ενημέρωση:';
-$lang['source'] = 'Προέλευση:';
-$lang['unknown'] = 'άγνωστο';
-$lang['updating'] = 'Σε διαδικασία ενημέρωσης ...';
-$lang['updated'] = 'Η επέκταση %s ενημερώθηκε με επιτυχία';
-$lang['updates'] = 'Οι παρακάτω επεκτάσεις ενημερώθηκαν με επιτυχία:';
-$lang['update_none'] = 'Δεν βρέθηκαν ενημερώσεις.';
-$lang['deleting'] = 'Σε διαδικασία διαγραφής ...';
-$lang['deleted'] = 'Η επέκταση %s διαγράφηκε.';
-$lang['downloading'] = 'Σε διαδικασία μεταφόρτωσης ...';
-$lang['downloaded'] = 'Η επέκταση %s εγκαταστάθηκε με επιτυχία';
-$lang['downloads'] = 'Οι παρακάτω επεκτάσεις εγκαταστάθηκαν με επιτυχία:';
-$lang['download_none'] = 'Δεν βρέθηκαν επεκτάσεις ή εμφανίστηκε κάποιο πρόβλημα κατά την σχετική διαδικασία.';
-$lang['plugin'] = 'Επέκταση:';
-$lang['components'] = 'Συστατικά';
-$lang['noinfo'] = 'Αυτή η επέκταση δεν επέστρεψε κάποια πληροφορία - η επέκταση μπορεί να μην λειτουργεί κανονικά.';
-$lang['name'] = 'Όνομα:';
-$lang['date'] = 'Ημερομηνία:';
-$lang['type'] = 'Τύπος:';
-$lang['desc'] = 'Περιγραφή:';
-$lang['author'] = 'Συγγραφέας:';
-$lang['www'] = 'Διεύθυνση στο διαδίκτυο:';
-$lang['error'] = 'Εμφανίστηκε άγνωστο σφάλμα.';
-$lang['error_download'] = 'Δεν είναι δυνατή η μεταφόρτωση του αρχείου: %s';
-$lang['error_badurl'] = 'Το URL είναι μάλλον λανθασμένο - είναι αδύνατον να εξαχθεί το όνομα αρχείου από αυτό το URL';
-$lang['error_dircreate'] = 'Δεν είναι δυνατή η δημιουργία ενός προσωρινού φακέλου αποθήκευσης των μεταφορτώσεων';
-$lang['error_decompress'] = 'Δεν είναι δυνατή η αποσυμπίεση των μεταφορτώσεων. Αυτό μπορεί να οφείλεται σε μερική λήψη των μεταφορτώσεων, οπότε θα πρέπει να επαναλάβετε την διαδικασία ή το σύστημά σας δεν μπορεί να διαχειριστεί το συγκεκριμένο είδος συμπίεσης, οπότε θα πρέπει να εγκαταστήσετε την επέκταση χειροκίνητα.';
-$lang['error_copy'] = 'Εμφανίστηκε ένα σφάλμα αντιγραφής αρχείων κατά την διάρκεια εγκατάστασης της επέκτασης <em>%s</em>: ο δίσκος μπορεί να είναι γεμάτος ή να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης. Αυτό το γεγονός μπορεί να οδήγησε σε μερική εγκατάσταση της επέκτασης και άρα η DokuWiki εγκατάστασή σας να εμφανίσει προβλήματα σταθερότητας.';
-$lang['error_delete'] = 'Εμφανίστηκε ένα σφάλμα κατά την διαδικασία διαγραφής της επέκτασης <em>%s</em>. Η πιθανότερη αιτία είναι να μην είναι σωστά ρυθμισμένα τα δικαιώματα πρόσβασης.';
-$lang['enabled'] = 'Η επέκταση %s ενεργοποιήθηκε.';
-$lang['notenabled'] = 'Η επέκταση %s δεν μπορεί να ενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
-$lang['disabled'] = 'Η επέκταση %s απενεργοποιήθηκε.';
-$lang['notdisabled'] = 'Η επέκταση %s δεν μπορεί να απενεργοποιηθεί. Ελέγξτε τα δικαιώματα πρόσβασης.';
-$lang['packageinstalled'] = 'Το πακέτο της επέκτασης (%d επέκταση(εις): %s) εγκαστήθηκε επιτυχημένα.';
diff --git a/lib/plugins/plugin/lang/fr/admin_plugin.txt b/lib/plugins/plugin/lang/fr/admin_plugin.txt
deleted file mode 100644
index b7beba25a..000000000
--- a/lib/plugins/plugin/lang/fr/admin_plugin.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-====== Gestion des extensions ======
-
-Cette page vous permet de gérer tout ce qui a trait aux [[doku>fr:plugins|extensions]] de DokuWiki. Pour pouvoir télécharger et installer un module, le répertoire « ''plugin'' » doit être accessible en écriture pour le serveur web.
-
diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php
deleted file mode 100644
index 0592f3c7d..000000000
--- a/lib/plugins/plugin/lang/fr/lang.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Guy Brand <gb@unistra.fr>
- * @author Delassaux Julien <julien@delassaux.fr>
- * @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca>
- * @author stephane.gully@gmail.com
- * @author Guillaume Turri <guillaume.turri@gmail.com>
- * @author Erik Pedersen <erik.pedersen@shaw.ca>
- * @author olivier duperray <duperray.olivier@laposte.net>
- * @author Vincent Feltz <psycho@feltzv.fr>
- * @author Philippe Bajoit <philippe.bajoit@gmail.com>
- * @author Florian Gaub <floriang@floriang.net>
- * @author Samuel Dorsaz samuel.dorsaz@novelion.net
- * @author Johan Guilbaud <guilbaud.johan@gmail.com>
- * @author schplurtz@laposte.net
- * @author skimpax@gmail.com
- * @author Yannick Aure <yannick.aure@gmail.com>
- * @author Olivier DUVAL <zorky00@gmail.com>
- * @author Anael Mobilia <contrib@anael.eu>
- * @author Bruno Veilleux <bruno.vey@gmail.com>
- */
-$lang['menu'] = 'Gestion des extensions';
-$lang['download'] = 'Télécharger et installer une nouvelle extension';
-$lang['manage'] = 'Extensions installées';
-$lang['btn_info'] = 'Info';
-$lang['btn_update'] = 'Mettre à jour';
-$lang['btn_delete'] = 'Supprimer';
-$lang['btn_settings'] = 'Paramètres';
-$lang['btn_download'] = 'Télécharger';
-$lang['btn_enable'] = 'Enregistrer';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Installé :';
-$lang['lastupdate'] = 'Dernière mise à jour :';
-$lang['source'] = 'Source :';
-$lang['unknown'] = 'inconnu';
-$lang['updating'] = 'Mise à jour…';
-$lang['updated'] = 'Extension %s mise à jour avec succès';
-$lang['updates'] = 'Les extensions suivantes ont été mises à jour avec succès';
-$lang['update_none'] = 'Aucune mise à jour n\'a été trouvée.';
-$lang['deleting'] = 'Suppression…';
-$lang['deleted'] = 'Extension %s supprimée.';
-$lang['downloading'] = 'Téléchargement…';
-$lang['downloaded'] = 'Extension %s installée avec succès';
-$lang['downloads'] = 'Les extensions suivantes ont été installées avec succès :';
-$lang['download_none'] = 'Aucune extension n\'a été trouvée, ou un problème inconnu est survenu durant le téléchargement et l\'installation.';
-$lang['plugin'] = 'Extension :';
-$lang['components'] = 'Composants';
-$lang['noinfo'] = 'Cette extension n\'a transmis aucune information, elle pourrait être invalide.';
-$lang['name'] = 'Nom :';
-$lang['date'] = 'Date :';
-$lang['type'] = 'Type :';
-$lang['desc'] = 'Description :';
-$lang['author'] = 'Auteur :';
-$lang['www'] = 'Site web :';
-$lang['error'] = 'Une erreur inconnue est survenue.';
-$lang['error_download'] = 'Impossible de télécharger le fichier de l\'extension : %s';
-$lang['error_badurl'] = 'URL suspecte : impossible de déterminer le nom du fichier à partir de l\'URL';
-$lang['error_dircreate'] = 'Impossible de créer le répertoire temporaire pour effectuer le téléchargement';
-$lang['error_decompress'] = 'Le gestionnaire d\'extensions a été incapable de décompresser le fichier téléchargé. Ceci peut être le résultat d\'un mauvais téléchargement, auquel cas vous devriez réessayer ; ou bien le format de compression est inconnu, auquel cas vous devez télécharger et installer l\'extension manuellement.';
-$lang['error_copy'] = 'Une erreur de copie est survenue lors de l\'installation des fichiers de l\'extension <em>%s</em> : le disque est peut-être plein ou les autorisations d\'accès sont incorrects. Il a pu en résulter une installation partielle de l\'extension et laisser votre installation du wiki instable.';
-$lang['error_delete'] = 'Une erreur est survenue lors de la suppression de l\'extension <em>%s</em>. La raison la plus probable est l\'insuffisance des autorisations sur les fichiers ou les répertoires.';
-$lang['enabled'] = 'Extension %s activée.';
-$lang['notenabled'] = 'L\'extension %s n\'a pas pu être activée, vérifiez les autorisations des fichiers.';
-$lang['disabled'] = 'Extension %s désactivée.';
-$lang['notdisabled'] = 'L\'extension %s n\'a pas pu être désactivée, vérifiez les autorisations des fichiers.';
-$lang['packageinstalled'] = 'Ensemble d\'extensions (%d extension(s): %s) installé avec succès.';
diff --git a/lib/plugins/plugin/lang/id/lang.php b/lib/plugins/plugin/lang/id/lang.php
deleted file mode 100644
index 2653b075e..000000000
--- a/lib/plugins/plugin/lang/id/lang.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Irwan Butar Butar <irwansah.putra@gmail.com>
- * @author Yustinus Waruwu <juswaruwu@gmail.com>
- */
-$lang['btn_info'] = 'Info';
-$lang['btn_update'] = 'Baharui';
-$lang['btn_delete'] = 'Hapus';
-$lang['btn_settings'] = 'Pengaturan';
-$lang['btn_download'] = 'Unduh';
-$lang['btn_enable'] = 'Simpan';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Instal';
-$lang['lastupdate'] = 'Pembaharuan terakhir:';
-$lang['source'] = 'Sumber:';
-$lang['unknown'] = 'Tidak kenal';
-$lang['updating'] = 'Terbaharui ...';
-$lang['update_none'] = 'Tidak ditemukan pembaharuan';
-$lang['deleting'] = 'Terhapus ...';
-$lang['deleted'] = 'Hapus Plugin %s.';
-$lang['downloading'] = 'Unduh ...';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Komponen';
-$lang['name'] = 'Nama:';
-$lang['date'] = 'Tanggal:';
-$lang['type'] = 'Tipe:';
-$lang['desc'] = 'Penjelasan:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
diff --git a/lib/plugins/plugin/lang/pl/admin_plugin.txt b/lib/plugins/plugin/lang/pl/admin_plugin.txt
deleted file mode 100644
index f01048198..000000000
--- a/lib/plugins/plugin/lang/pl/admin_plugin.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-====== Menadżer wtyczek ======
-
-Na tej stronie możesz zarządzać wszystkim co jest związane z [[doku>plugins|wtyczkami]] Dokuwiki. Aby móc ściągnąć i zainstalować wtyczkę, serwer WWW musi mieć prawo do zapisu w katalogu ''plugins''.
-
-
diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php
deleted file mode 100644
index eae91f33e..000000000
--- a/lib/plugins/plugin/lang/pl/lang.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Michał Tkacz <mehow@autocom.pl>
- * @author Grzegorz Żur <grzegorz.zur@gmail.com>
- * @author Mariusz Kujawski <marinespl@gmail.com>
- * @author Maciej Kurczewski <pipijajko@gmail.com>
- * @author Sławomir Boczek <slawkens@gmail.com>
- * @author sleshek@wp.pl
- * @author Leszek Stachowski <shazarre@gmail.com>
- * @author maros <dobrimaros@yahoo.pl>
- * @author Grzegorz Widła <dzesdzes@gmail.com>
- * @author Łukasz Chmaj <teachmeter@gmail.com>
- * @author Begina Felicysym <begina.felicysym@wp.eu>
- * @author Aoi Karasu <aoikarasu@gmail.com>
- */
-$lang['menu'] = 'Menadżer wtyczek';
-$lang['download'] = 'Ściągnij i zainstaluj nową wtyczkę';
-$lang['manage'] = 'Zainstalowane Wtyczki';
-$lang['btn_info'] = 'Informacje';
-$lang['btn_update'] = 'Aktualizuj';
-$lang['btn_delete'] = 'Usuń';
-$lang['btn_settings'] = 'Ustawienia';
-$lang['btn_download'] = 'Pobierz';
-$lang['btn_enable'] = 'Zapisz';
-$lang['url'] = 'Adres URL';
-$lang['installed'] = 'Instalacja:';
-$lang['lastupdate'] = 'Ostatnio zaktualizowana:';
-$lang['source'] = 'Źródło:';
-$lang['unknown'] = 'nieznane';
-$lang['updating'] = 'Aktualizuję...';
-$lang['updated'] = 'Aktualizacja wtyczki %s pomyślnie ściągnięta';
-$lang['updates'] = 'Aktualizacje następujących wtyczek zostały pomyślnie ściągnięte';
-$lang['update_none'] = 'Nie znaleziono aktualizacji.';
-$lang['deleting'] = 'Usuwam...';
-$lang['deleted'] = 'Wtyczka %s usunięta.';
-$lang['downloading'] = 'Pobieram...';
-$lang['downloaded'] = 'Wtyczka %s pomyślnie zainstalowana';
-$lang['downloads'] = 'Następujące wtyczki zostały pomyślnie zainstalowane:';
-$lang['download_none'] = 'Nie znaleziono wtyczek lub wystąpił nieznany problem podczas ściągania i instalacji.';
-$lang['plugin'] = 'Wtyczka:';
-$lang['components'] = 'Składniki';
-$lang['noinfo'] = 'Ta wtyczka nie zwróciła żadnych informacji, może być niepoprawna.';
-$lang['name'] = 'Nazwa:';
-$lang['date'] = 'Data:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Opis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'WWW:';
-$lang['error'] = 'Wystąpił nieznany błąd.';
-$lang['error_download'] = 'Nie powiodło się ściągnięcie pliku wtyczki: %s';
-$lang['error_badurl'] = 'Prawdopodobnie zły url - nie da się ustalić nazwy pliku na podstawie urla';
-$lang['error_dircreate'] = 'Nie powiodło się stworzenie tymczasowego katalogu na pobrane pliki';
-$lang['error_decompress'] = 'Menadżer wtyczek nie był w stanie rozpakować ściągniętego pliku. Może to być spowodowane przez nieudany transfer (w takim przypadku powinieneś spróbować ponownie) lub nieznany format kompresji (w takim przypadku będziesz musiał ściągnąć i zainstalować wtyczkę ręcznie).';
-$lang['error_copy'] = 'Wystąpił błąd podczas kopiowania pliku w trakcie instalacji wtyczki %s: być może dysk jest pełny lub prawa dostępu są niepoprawne. Efektem może być częściowo zainstalowana wtyczka co może spowodować niestabilność Twojej instalacji wiki.';
-$lang['error_delete'] = 'Wystąpił błąd przy próbie usunięcia wtyczki <em>%s</em>. Prawdopodobną przyczyną są niewystarczające uprawnienia do katalogu.';
-$lang['enabled'] = 'Wtyczka %s włączona.';
-$lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.';
-$lang['disabled'] = 'Wtyczka %s wyłączona.';
-$lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.';
-$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.';
diff --git a/lib/plugins/plugin/lang/sk/admin_plugin.txt b/lib/plugins/plugin/lang/sk/admin_plugin.txt
deleted file mode 100644
index ad3ae7f58..000000000
--- a/lib/plugins/plugin/lang/sk/admin_plugin.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-====== Správa pluginov ======
-
-Na tejto stránke je možné spravovať [[doku>plugins|pluginy]] Dokuwiki. Aby bolo možné sťahovať a inštalovať pluginy, musí mať webový server prístup pre zápis do adresára //plugin//.
-
diff --git a/lib/plugins/plugin/lang/sk/lang.php b/lib/plugins/plugin/lang/sk/lang.php
deleted file mode 100644
index 35c07cf80..000000000
--- a/lib/plugins/plugin/lang/sk/lang.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Ondrej Végh <ov@vsieti.sk>
- * @author Michal Mesko <michal.mesko@gmail.com>
- * @author exusik@gmail.com
- * @author Martin Michalek <michalek.dev@gmail.com>
- */
-$lang['menu'] = 'Správa pluginov';
-$lang['download'] = 'Stiahnuť a nainštalovať plugin';
-$lang['manage'] = 'Nainštalované pluginy';
-$lang['btn_info'] = 'info';
-$lang['btn_update'] = 'aktualizovať';
-$lang['btn_delete'] = 'zmazať';
-$lang['btn_settings'] = 'nastavenia';
-$lang['btn_download'] = 'Stiahnuť';
-$lang['btn_enable'] = 'Uložiť';
-$lang['url'] = 'URL';
-$lang['installed'] = 'Nainštalovaný:';
-$lang['lastupdate'] = 'Aktualizovaný:';
-$lang['source'] = 'Zdroj:';
-$lang['unknown'] = 'neznámy';
-$lang['updating'] = 'Aktualizuje sa ...';
-$lang['updated'] = 'Plugin %s bol úspešne aktualizovaný';
-$lang['updates'] = 'Nasledujúce pluginy bol úspešne aktualizované:';
-$lang['update_none'] = 'Neboli nájdené žiadne aktualizácie.';
-$lang['deleting'] = 'Vymazáva sa ...';
-$lang['deleted'] = 'Plugin %s bol zmazaný.';
-$lang['downloading'] = 'Sťahuje sa ...';
-$lang['downloaded'] = 'Plugin %s bol úspešne stiahnutý';
-$lang['downloads'] = 'Nasledujúce pluginy bol úspešne stiahnuté:';
-$lang['download_none'] = 'Neboli nájdené žiadne pluginy alebo nastal neznámy problém počas sťahovania a inštalácie pluginov.';
-$lang['plugin'] = 'Plugin:';
-$lang['components'] = 'Súčasti';
-$lang['noinfo'] = 'Tento plugin neobsahuje žiadne informácie, je možné, že je chybný.';
-$lang['name'] = 'názov:';
-$lang['date'] = 'Dátum:';
-$lang['type'] = 'Typ:';
-$lang['desc'] = 'Popis:';
-$lang['author'] = 'Autor:';
-$lang['www'] = 'Web:';
-$lang['error'] = 'Nastala neznáma chyba.';
-$lang['error_download'] = 'Nie je možné stiahnuť súbor pluginu: %s';
-$lang['error_badurl'] = 'Pravdepodobne zlá url adresa - nie je možné z nej určiť meno súboru';
-$lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru';
-$lang['error_decompress'] = 'Správca pluginov nedokáže dekomprimovať stiahnutý súbor. Môže to byť dôsledok zlého stiahnutia, v tom prípade to skúste znovu, alebo môže ísť o neznámy formát súboru, v tom prípade musíte stiahnuť a nainštalovať plugin manuálne.';
-$lang['error_copy'] = 'Nastala chyba kopírovania súboru počas pokusu inštalovať súbory pluginu<em>%s</em>: disk môže byť plný alebo prístupové práva k súboru môžu byť nesprávne. Toto môže mať za následok čiastočne nainštalovanie pluginu a nestabilitu vašej DokuWiki.';
-$lang['error_delete'] = 'Nastala chyba počas pokusu o zmazanie pluginu <em>%s</em>. Najpravdepodobnejším dôvodom môžu byť nedostatočné prístupové práva pre súbor alebo adresár';
-$lang['enabled'] = 'Plugin %s aktivovaný.';
-$lang['notenabled'] = 'Plugin %s nemôže byť aktivovaný, skontrolujte prístupové práva.';
-$lang['disabled'] = 'Plugin %s deaktivovaný.';
-$lang['notdisabled'] = 'Plugin %s nemôže byť deaktivovaný, skontrolujte prístupové práva.';
-$lang['packageinstalled'] = 'Plugin package (%d plugin(s): %s) úspešne inštalovaný.';
diff --git a/lib/plugins/plugin/lang/tr/admin_plugin.txt b/lib/plugins/plugin/lang/tr/admin_plugin.txt
deleted file mode 100644
index 956d701f6..000000000
--- a/lib/plugins/plugin/lang/tr/admin_plugin.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-====== Eklenti Yönetimi ======
-
-Bu sayfada DokuWiki [[doku>plugins|eklentileri]] ile ilgili herşeyi düzenleyebilirsiniz. Eklenti kurup indirmek için, eklenti dizininin yazılabilir olması gerekmektedir.
diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php
deleted file mode 100644
index a4feea8cd..000000000
--- a/lib/plugins/plugin/lang/tr/lang.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Aydın Coşkuner <aydinweb@gmail.com>
- * @author Cihan Kahveci <kahvecicihan@gmail.com>
- * @author Yavuz Selim <yavuzselim@gmail.com>
- * @author Caleb Maclennan <caleb@alerque.com>
- * @author farukerdemoncel@gmail.com
- */
-$lang['menu'] = 'Eklenti Yönetimi';
-$lang['download'] = 'Yeni bir eklenti indirip kur';
-$lang['manage'] = 'Kurulmuş Eklentiler';
-$lang['btn_info'] = 'bilgi';
-$lang['btn_update'] = 'güncelle';
-$lang['btn_delete'] = 'sil';
-$lang['btn_settings'] = 'Ayarlar';
-$lang['btn_download'] = 'İndir';
-$lang['btn_enable'] = 'Kaydet';
-$lang['url'] = 'Web Adresi';
-$lang['installed'] = 'Kuruldu:';
-$lang['lastupdate'] = 'Son güncelleştirme:';
-$lang['source'] = 'Kaynak:';
-$lang['unknown'] = 'bilinmiyor';
-$lang['updating'] = 'Güncelleştiriyor ...';
-$lang['updated'] = '%s eklentisi başarıyla güncellendi';
-$lang['updates'] = 'Şu eklentiler başarıyla güncellendi';
-$lang['update_none'] = 'Yeni bir güncelleme bulunamadı.';
-$lang['deleting'] = 'Siliniyor ...';
-$lang['deleted'] = '%s eklentisi silindi.';
-$lang['downloading'] = 'İndiriyor ...';
-$lang['downloaded'] = '%s eklentisi başarıyla kuruldu';
-$lang['downloads'] = 'Şu eklentiler başarıyla kuruldu:';
-$lang['download_none'] = 'Eklenti bulunamadı veya indirirken/kurarken bilinmeyen bir hata oluştu.';
-$lang['plugin'] = 'Eklenti:';
-$lang['components'] = 'Parçalar';
-$lang['noinfo'] = 'Bu eklentinin bilgileri alınamadı, geçerli bir eklenti olmayabilir.';
-$lang['name'] = 'Ad:';
-$lang['date'] = 'Tarih:';
-$lang['type'] = 'Tür:';
-$lang['desc'] = 'Açıklama:';
-$lang['author'] = 'Yazar:';
-$lang['www'] = 'Web Adresi:';
-$lang['error'] = 'Bilinmeyen bir hata oluştu.';
-$lang['error_download'] = 'Şu eklenti indirilemedi: %s';
-$lang['error_badurl'] = 'Yanlış adres olabilir - verilen adresten dosya adı alınamadı';
-$lang['error_dircreate'] = 'İndirmek için geçici klasör oluşturulamadı';
-$lang['error_decompress'] = 'Eklenti yöneticisi indirilen sıkıştırılmış dosyayı açamadı. Bu yanlış indirmeden kaynaklanabilir (bu durumda tekrar denemelisiniz). Ya da indirilen dosyanın sıkıştırma biçimi bilinmemektedir (bu durumda eklentiyi indirerek kendiniz kurmalısınız).';
-$lang['error_copy'] = '<em>%s</em> eklentisi dosyalarını kurmaya çalışırken kopyalama hatası ortaya çıktı. Sürücü dolu olabilir veya yazma yetkisi bulunmuyor olabilir. Bunun sebebi tam kurulmamış bir eklentinin wiki kurulumunu bozması olabilir.';
-$lang['error_delete'] = '<em>%s</em> eklentisini silerken bir hata oluştu. Bu hata yetersiz dosya/klasör erişim yetkisinden kaynaklanabilir.';
-$lang['enabled'] = '%s eklentisi etkinleştirildi.';
-$lang['notenabled'] = '%s eklentisi etkinleştirilemedi, dosya yetkilerini kontrol edin.';
-$lang['disabled'] = '%s eklentisi devre dışı bırakıldı.';
-$lang['notdisabled'] = '%s eklentisi devre dışı bırakılamadı, dosya yetkilerini kontrol edin.';
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 7ab9c30e1..42a4903ec 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -63,10 +63,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* @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 Reference to the Doku_Handler object
+ * @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){
+ function handle($match, $state, $pos, Doku_Handler $handler){
trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
}
@@ -89,11 +89,11 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin {
* created
*
* @param $format string output format being rendered
- * @param $renderer Doku_Renderer reference to the current renderer object
+ * @param $renderer Doku_Renderer the current renderer object
* @param $data array data created by handler()
* @return boolean rendered correctly?
*/
- function render($format, Doku_Renderer &$renderer, $data) {
+ 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 156037f09..b67d91b36 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -53,7 +53,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
// attempt to retrieve any import failures from the session
- if ($_SESSION['import_failures']){
+ if (!empty($_SESSION['import_failures'])){
$this->_import_failures = $_SESSION['import_failures'];
}
}
@@ -277,6 +277,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) {
global $conf;
global $ID;
+ global $lang;
$name = $mail = $groups = '';
$notes = array();
@@ -299,6 +300,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), $indent+6);
$this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), $indent+6);
+ $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"], "", $this->_auth->canDo("modPass"), $indent+6);
$this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), $indent+6);
$this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), $indent+6);
$this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
@@ -358,7 +360,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$class = $cando ? '' : ' class="disabled"';
echo str_pad('',$indent);
- if($name == 'userpass'){
+ if($name == 'userpass' || $name == 'userpass2'){
$fieldtype = 'password';
$autocomp = 'autocomplete="off"';
}elseif($name == 'usermail'){
@@ -475,7 +477,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (!checkSecurityToken()) return false;
if (!$this->_auth->canDo('addUser')) return false;
- list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser();
+ list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->_retrieveUser();
if (empty($user)) return false;
if ($this->_auth->canDo('modPass')){
@@ -486,6 +488,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
msg($this->lang['add_fail'], -1);
return false;
}
+ } else {
+ if (!$this->_verifyPassword($pass,$passconfirm)) {
+ return false;
+ }
}
} else {
if (!empty($pass)){
@@ -606,7 +612,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$oldinfo = $this->_auth->getUserData($olduser);
// get new user data subject to change
- list($newuser,$newpass,$newname,$newmail,$newgrps) = $this->_retrieveUser();
+ list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->_retrieveUser();
if (empty($newuser)) return false;
$changes = array();
@@ -625,27 +631,37 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$changes['user'] = $newuser;
}
}
-
- // generate password if left empty and notification is on
- if($INPUT->has('usernotify') && empty($newpass)){
- $newpass = auth_pwgen($olduser);
+ if ($this->_auth->canDo('modPass')) {
+ if ($newpass || $passconfirm) {
+ if ($this->_verifyPassword($newpass,$passconfirm)) {
+ $changes['pass'] = $newpass;
+ } else {
+ return false;
+ }
+ } else {
+ // no new password supplied, check if we need to generate one (or it stays unchanged)
+ if ($INPUT->has('usernotify')) {
+ $changes['pass'] = auth_pwgen($olduser);
+ }
+ }
}
- if (!empty($newpass) && $this->_auth->canDo('modPass'))
- $changes['pass'] = $newpass;
- if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name'])
- $changes['name'] = $newname;
- if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail'])
- $changes['mail'] = $newmail;
- if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps'])
- $changes['grps'] = $newgrps;
+ if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) {
+ $changes['name'] = $newname;
+ }
+ if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) {
+ $changes['mail'] = $newmail;
+ }
+ if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) {
+ $changes['grps'] = $newgrps;
+ }
if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) {
msg($this->lang['update_ok'],1);
- if ($INPUT->has('usernotify') && $newpass) {
+ if ($INPUT->has('usernotify') && !empty($changes['pass'])) {
$notify = empty($changes['user']) ? $olduser : $newuser;
- $this->_notifyUser($notify,$newpass);
+ $this->_notifyUser($notify,$changes['pass']);
}
// invalidate all sessions
@@ -686,6 +702,32 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
/**
+ * Verify password meets minimum requirements
+ * :TODO: extend to support password strength
+ *
+ * @param string $password candidate string for new password
+ * @param string $confirm repeated password for confirmation
+ * @return bool true if meets requirements, false otherwise
+ */
+ protected function _verifyPassword($password, $confirm) {
+ global $lang;
+
+ if (empty($password) && empty($confirm)) {
+ return false;
+ }
+
+ if ($password !== $confirm) {
+ msg($lang['regbadpass'], -1);
+ return false;
+ }
+
+ // :TODO: test password for required strength
+
+ // if we make it this far the password is good
+ return true;
+ }
+
+ /**
* Retrieve & clean user data from the form
*
* @param bool $clean whether the cleanUser method of the authentication backend is applied
@@ -701,6 +743,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$user[2] = $INPUT->str('username');
$user[3] = $INPUT->str('usermail');
$user[4] = explode(',',$INPUT->str('usergroups'));
+ $user[5] = $INPUT->str('userpass2'); // repeated password for confirmation
$user[4] = array_map('trim',$user[4]);
if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]);
diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php
index f87c77afb..b55ecc998 100644
--- a/lib/plugins/usermanager/lang/en/lang.php
+++ b/lib/plugins/usermanager/lang/en/lang.php
@@ -76,4 +76,3 @@ $lang['import_error_create'] = 'Unable to create the user';
$lang['import_notify_fail'] = 'Notification message could not be sent for imported user, %s with email %s.';
$lang['import_downloadfailures'] = 'Download Failures as CSV for correction';
-
diff --git a/lib/plugins/usermanager/lang/et/lang.php b/lib/plugins/usermanager/lang/et/lang.php
index 2161df918..93b28a6b8 100644
--- a/lib/plugins/usermanager/lang/et/lang.php
+++ b/lib/plugins/usermanager/lang/et/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Estonian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author kristian.kankainen@kuu.la
* @author Rivo Zängov <eraser@eraser.ee>
*/
diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php
index dc2de375e..a10488e75 100644
--- a/lib/plugins/usermanager/lang/sl/lang.php
+++ b/lib/plugins/usermanager/lang/sl/lang.php
@@ -8,6 +8,7 @@
* @author Gregor Skumavc (grega.skumavc@gmail.com)
* @author Matej Urbančič (mateju@svn.gnome.org)
* @author Matej Urbančič <mateju@svn.gnome.org>
+ * @author matej <mateju@svn.gnome.org>
*/
$lang['menu'] = 'Upravljanje uporabnikov';
$lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)';
@@ -30,6 +31,8 @@ $lang['search'] = 'Iskanje';
$lang['search_prompt'] = 'Poišči';
$lang['clear'] = 'Počisti filter iskanja';
$lang['filter'] = 'Filter';
+$lang['export_all'] = 'Izvozi seznam vseh uporabnikov (CSV)';
+$lang['export_filtered'] = 'Izvozi filtriran seznam uporabnikov (CSV)';
$lang['import'] = 'Uvozi nove uporabnike';
$lang['line'] = 'Številka vrstice';
$lang['error'] = 'Sporočilo napake';
@@ -53,6 +56,10 @@ $lang['add_ok'] = 'Uporabnik je uspešno dodan';
$lang['add_fail'] = 'Dodajanje uporabnika je spodletelo';
$lang['notify_ok'] = 'Obvestilno sporočilo je poslano.';
$lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.';
+$lang['import_userlistcsv'] = 'Datoteka seznama uporabnikov (CSV)';
+$lang['import_header'] = 'Zadnji uvoz podatkov – napake';
+$lang['import_success_count'] = 'Uvoz uporabnikov: %d najdenih, %d uspešno uvoženih.';
+$lang['import_failure_count'] = 'Uvoz uporabnikov: %d spodletelih. Napake so izpisane spodaj.';
$lang['import_error_fields'] = 'Neustrezno število polj; najdenih je %d, zahtevana pa so 4.';
$lang['import_error_baduserid'] = 'Manjka ID uporabnika';
$lang['import_error_badname'] = 'Napačno navedeno ime';
@@ -61,3 +68,4 @@ $lang['import_error_upload'] = 'Uvoz je spodletel. Datoteke CSV ni mogoče nal
$lang['import_error_readfail'] = 'Uvoz je spodletel. Ni mogoče prebrati vsebine datoteke.';
$lang['import_error_create'] = 'Ni mogoče ustvariti računa uporabnika';
$lang['import_notify_fail'] = 'Obvestilnega sporočila za uvoženega uporabnika %s z elektronskim naslovom %s ni mogoče poslati.';
+$lang['import_downloadfailures'] = 'Prejmi podatke o napakah v datoteki CSV';
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index 85ddf503e..6b46add07 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -109,7 +109,7 @@ var dw_behaviour = {
* @author Michael Klier <chi@chimeric.de>
*/
checkWindowsShares: function() {
- if(!LANG.nosmblinks || typeof(document.all) !== 'undefined') {
+ if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE)/)) {
// No warning requested or none necessary
return;
}
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 56c185db7..c07b8f975 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -134,7 +134,10 @@ function pickerInsert(text,edid){
*/
function addBtnActionSignature($btn, props, edid) {
if(typeof SIG != 'undefined' && SIG != ''){
- $btn.bind('click', bind(insertAtCarret,edid,SIG));
+ $btn.bind('click', function (e) {
+ insertAtCarret(edid,SIG);
+ e.preventDefault();
+ });
return edid;
}
return '';
diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js
index e5cc73b49..95c632e45 100644
--- a/lib/scripts/qsearch.js
+++ b/lib/scripts/qsearch.js
@@ -6,165 +6,193 @@
* @author Adrian Lang <lang@cosmocode.de>
* @author Michal Rezler <m.rezler@centrum.cz>
*/
+jQuery.fn.dw_qsearch = function (overrides) {
-var dw_qsearch = {
-
- $inObj: null,
- $outObj: null,
- timer: null,
- curRequest: null,
-
- /**
- * initialize the quick search
- *
- * Attaches the event handlers
- *
- * @param input element (jQuery selector/DOM obj)
- * @param output element (jQuery selector/DOM obj)
- */
- init: function (input, output) {
- var do_qsearch;
-
- dw_qsearch.$inObj = jQuery(input);
- dw_qsearch.$outObj = jQuery(output);
-
- // objects found?
- if (dw_qsearch.$inObj.length === 0 ||
- dw_qsearch.$outObj.length === 0) {
- return;
- }
+ var dw_qsearch = {
- // attach eventhandler to search field
- do_qsearch = function () {
- // abort any previous request
- if (dw_qsearch.curRequest != null) {
- dw_qsearch.curRequest.abort();
- }
- var value = dw_qsearch.$inObj.val();
- if (value === '') {
- dw_qsearch.clear_results();
+ output: '#qsearch__out',
+
+ $inObj: this,
+ $outObj: null,
+ timer: null,
+ curRequest: null,
+
+ /**
+ * initialize the quick search
+ *
+ * Attaches the event handlers
+ *
+ */
+ init: function () {
+ var do_qsearch;
+
+ dw_qsearch.$outObj = jQuery(dw_qsearch.output);
+
+ // objects found?
+ if (dw_qsearch.$inObj.length === 0 ||
+ dw_qsearch.$outObj.length === 0) {
return;
}
- dw_qsearch.curRequest = jQuery.post(
- DOKU_BASE + 'lib/exe/ajax.php',
- {
- call: 'qsearch',
- q: encodeURI(value)
- },
- dw_qsearch.onCompletion,
- 'html'
- );
- };
- dw_qsearch.$inObj.keyup(
- function() {
- if(dw_qsearch.timer){
- window.clearTimeout(dw_qsearch.timer);
- dw_qsearch.timer = null;
+ // attach eventhandler to search field
+ do_qsearch = function () {
+ // abort any previous request
+ if (dw_qsearch.curRequest != null) {
+ dw_qsearch.curRequest.abort();
}
- dw_qsearch.timer = window.setTimeout(do_qsearch, 500);
- }
- );
-
- // attach eventhandler to output field
- dw_qsearch.$outObj.click(dw_qsearch.clear_results);
- },
-
- /**
- * Empty and hide the output div
- */
- clear_results: function(){
- dw_qsearch.$outObj.hide();
- dw_qsearch.$outObj.text('');
- },
-
- /**
- * Callback. Reformat and display the results.
- *
- * Namespaces are shortened here to keep the results from overflowing
- * or wrapping
- *
- * @param data The result HTML
- */
- onCompletion: function(data) {
- var max, $links, too_big;
-
- dw_qsearch.curRequest = null;
-
- if (data === '') {
- dw_qsearch.clear_results();
- return;
- }
-
- dw_qsearch.$outObj
- .html(data)
- .show()
- .css('white-space', 'nowrap');
-
- // disable overflow during shortening
- dw_qsearch.$outObj.find('li').css('overflow', 'visible');
-
- $links = dw_qsearch.$outObj.find('a');
- max = dw_qsearch.$outObj[0].clientWidth; // maximum width allowed (but take away paddings below)
- if(document.documentElement.dir === 'rtl'){
- max -= parseInt(dw_qsearch.$outObj.css('padding-left'));
- too_big = function (l) { return l.offsetLeft < 0; };
- }else{
- max -= parseInt(dw_qsearch.$outObj.css('padding-right'));
- too_big = function (l) { return l.offsetWidth + l.offsetLeft > max; };
- }
-
- $links.each(function () {
- var start, length, replace, nsL, nsR, eli, runaway;
+ var value = dw_qsearch.getSearchterm();
+ if (value === '') {
+ dw_qsearch.clear_results();
+ return;
+ }
+ dw_qsearch.curRequest = jQuery.post(
+ DOKU_BASE + 'lib/exe/ajax.php',
+ {
+ call: 'qsearch',
+ q: encodeURI(value)
+ },
+ dw_qsearch.onCompletion,
+ 'html'
+ );
+ };
+
+ dw_qsearch.$inObj.keyup(
+ function () {
+ if (dw_qsearch.timer) {
+ window.clearTimeout(dw_qsearch.timer);
+ dw_qsearch.timer = null;
+ }
+ dw_qsearch.timer = window.setTimeout(do_qsearch, 500);
+ }
+ );
- if (!too_big(this)) {
+ // attach eventhandler to output field
+ dw_qsearch.$outObj.click(dw_qsearch.clear_results);
+ },
+
+ /**
+ * Read search term from input
+ */
+ getSearchterm: function() {
+ return dw_qsearch.$inObj.val();
+ },
+
+ /**
+ * Empty and hide the output div
+ */
+ clear_results: function () {
+ dw_qsearch.$outObj.hide();
+ dw_qsearch.$outObj.text('');
+ },
+
+ /**
+ * Callback. Reformat and display the results.
+ *
+ * Namespaces are shortened here to keep the results from overflowing
+ * or wrapping
+ *
+ * @param data The result HTML
+ */
+ onCompletion: function (data) {
+ var max, $links, too_big;
+
+ dw_qsearch.curRequest = null;
+
+ if (data === '') {
+ dw_qsearch.clear_results();
return;
}
- // make IE's innerText available to W3C conform browsers
- if(this.textContent){
- this.__defineGetter__('innerText', function(){ return this.textContent });
- this.__defineSetter__('innerText', function(val){ this.textContent = val });
+ dw_qsearch.$outObj
+ .html(data)
+ .show()
+ .css('white-space', 'nowrap');
+
+ // disable overflow during shortening
+ dw_qsearch.$outObj.find('li').css('overflow', 'visible');
+
+ $links = dw_qsearch.$outObj.find('a');
+ max = dw_qsearch.$outObj[0].clientWidth; // maximum width allowed (but take away paddings below)
+ if (document.documentElement.dir === 'rtl') {
+ max -= parseInt(dw_qsearch.$outObj.css('padding-left'));
+ too_big = function (l) {
+ return l.offsetLeft < 0;
+ };
+ } else {
+ max -= parseInt(dw_qsearch.$outObj.css('padding-right'));
+ too_big = function (l) {
+ return l.offsetWidth + l.offsetLeft > max;
+ };
}
- nsL = this.innerText.indexOf('(');
- nsR = this.innerText.indexOf(')');
- eli = 0;
- runaway = 0;
-
- while((nsR - nsL > 3) && too_big(this) && runaway++ < 500) {
- if(eli !== 0){
- // elipsis already inserted
- if( (eli - nsL) > (nsR - eli) ){
- // cut left
- start = eli - 2;
- length = 2;
- }else{
- // cut right
- start = eli + 1;
- length = 1;
- }
- replace = '';
- }else{
- // replace middle with ellipsis
- start = Math.floor( nsL + ((nsR-nsL)/2) );
- length = 1;
- replace = '…';
+ $links.each(function () {
+ var start, length, replace, nsL, nsR, eli, runaway;
+
+ if (!too_big(this)) {
+ return;
+ }
+
+ // make IE's innerText available to W3C conform browsers
+ if (this.textContent) {
+ this.__defineGetter__('innerText', function () {
+ return this.textContent
+ });
+ this.__defineSetter__('innerText', function (val) {
+ this.textContent = val
+ });
}
- this.innerText = substr_replace(this.innerText,
- replace, start, length);
- eli = this.innerText.indexOf('…');
nsL = this.innerText.indexOf('(');
nsR = this.innerText.indexOf(')');
- }
- });
+ eli = 0;
+ runaway = 0;
+
+ while ((nsR - nsL > 3) && too_big(this) && runaway++ < 500) {
+ if (eli !== 0) {
+ // elipsis already inserted
+ if ((eli - nsL) > (nsR - eli)) {
+ // cut left
+ start = eli - 2;
+ length = 2;
+ } else {
+ // cut right
+ start = eli + 1;
+ length = 1;
+ }
+ replace = '';
+ } else {
+ // replace middle with ellipsis
+ start = Math.floor(nsL + ((nsR - nsL) / 2));
+ length = 1;
+ replace = '…';
+ }
+ this.innerText = substr_replace(this.innerText,
+ replace, start, length);
- // reenable overflow
- dw_qsearch.$outObj.find('li').css('overflow', 'hidden').css('text-overflow','ellipsis');
+ eli = this.innerText.indexOf('…');
+ nsL = this.innerText.indexOf('(');
+ nsR = this.innerText.indexOf(')');
+ }
+ });
+
+ // reenable overflow
+ dw_qsearch.$outObj.find('li').css('overflow', 'hidden').css('text-overflow', 'ellipsis');
+ }
+
+
+ };
+
+ jQuery.extend(dw_qsearch, overrides);
+
+ if (!overrides.deferInit) {
+ dw_qsearch.init();
}
+
+ return dw_qsearch;
};
jQuery(function () {
- dw_qsearch.init('#qsearch__in','#qsearch__out');
+ jQuery('#qsearch__in').dw_qsearch({
+ output: '#qsearch__out'
+ });
});
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 09c374bc4..1bb02b406 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -199,8 +199,9 @@ function addBtnActionPicker($btn, props, edid) {
jQuery(picker).attr('aria-hidden', 'true');
$btn.click(
- function() {
+ function(e) {
pickerToggle(pickerid,$btn);
+ e.preventDefault();
return '';
}
);
@@ -219,9 +220,10 @@ function addBtnActionPicker($btn, props, edid) {
*/
function addBtnActionLinkwiz($btn, props, edid) {
dw_linkwiz.init(jQuery('#'+edid));
- jQuery($btn).click(function(){
+ jQuery($btn).click(function(e){
dw_linkwiz.val = props;
dw_linkwiz.toggle();
+ e.preventDefault();
return '';
});
return 'link__wiz';
diff --git a/lib/styles/geshi.less b/lib/styles/geshi.less
new file mode 100644
index 000000000..2c7ac6a57
--- /dev/null
+++ b/lib/styles/geshi.less
@@ -0,0 +1,127 @@
+/**
+ * GeSHi syntax highlighting styles
+ *
+ * Generated with https://www.dokuwiki.org/tips:geshi_style_builder
+ * Cleaned up with http://cleancss.com/
+ * Manulally LESSified
+ */
+.code {
+ .co0 {
+ color: #666666;
+ font-style: italic;
+ }
+
+ .co4 {
+ color: #cc0000;
+ font-style: italic;
+ }
+
+ .es5 {
+ color: #006699;
+ font-weight: bold;
+ }
+
+ .es6 {
+ color: #009933;
+ font-weight: bold;
+ }
+
+ .kw2 {
+ color: #000000;
+ font-weight: bold;
+ }
+
+ .kw5 {
+ color: #008000;
+ }
+
+ .kw6 {
+ color: #f08;
+ font-weight: bold;
+ }
+
+ .me0 {
+ color: #004000;
+ }
+
+ .nu0 {
+ color: #cc66cc;
+ }
+
+ .re0 {
+ color: #0000ff;
+ }
+
+ .re3 {
+ color: #ff3333;
+ font-weight: bold;
+ }
+
+ .re4 {
+ color: #009999;
+ }
+
+ .re5 {
+ color: #660033;
+ }
+
+ .sc-2 {
+ color: #404040;
+ }
+
+ .sy3 {
+ color: #000040;
+ }
+
+ .br0, .sy0 {
+ color: #66cc66;
+ }
+
+ .co1, .coMULTI, .sc-1 {
+ color: #808080;
+ font-style: italic;
+ }
+
+ .co2, .sy1 {
+ color: #339933;
+ }
+
+ .co3, .sy4 {
+ color: #008080;
+ }
+
+ .es0, .es1, .esHARD {
+ color: #000099;
+ font-weight: bold;
+ }
+
+ .es2, .es3, .es4 {
+ color: #660099;
+ font-weight: bold;
+ }
+
+ .kw1, .kw8 {
+ color: #b1b100;
+ }
+
+ .kw10, .kw11, .kw12, .kw9 {
+ color: #003399;
+ font-weight: bold;
+ }
+
+ .kw13, .kw14, .kw15, .kw16, .me1, .me2 {
+ color: #006600;
+ }
+
+ .kw3, .kw7, .sy2 {
+ color: #000066;
+ }
+
+ .kw4, .re2 {
+ color: #993333;
+ }
+
+ .re1, .st0, .st_h {
+ color: #ff0000;
+ }
+} \ No newline at end of file
diff --git a/lib/styles/screen.css b/lib/styles/screen.css
index 2d84f65eb..bbc1e86be 100644
--- a/lib/styles/screen.css
+++ b/lib/styles/screen.css
@@ -93,26 +93,4 @@ div.notify {
right: -99999em !important;
}
-/* syntax highlighting code */
-.code .br0 { color: #66cc66; }
-.code .co0 { color: #808080; font-style: italic; }
-.code .co1 { color: #808080; font-style: italic; }
-.code .co2 { color: #808080; font-style: italic; }
-.code .co3 { color: #808080; }
-.code .coMULTI { color: #808080; font-style: italic; }
-.code .es0 { color: #000099; font-weight: bold; }
-.code .kw1 { color: #b1b100; }
-.code .kw2 { color: #000000; font-weight: bold; }
-.code .kw3 { color: #000066; }
-.code .kw4 { color: #993333; }
-.code .kw5 { color: #0000ff; }
-.code .me1 { color: #006600; }
-.code .me2 { color: #006600; }
-.code .nu0 { color: #cc66cc; }
-.code .re0 { color: #0000ff; }
-.code .re1 { color: #0000ff; }
-.code .re2 { color: #0000ff; }
-.code .re3 { color: #ff3333; font-weight:bold; }
-.code .re4 { color: #009999; }
-.code .st0 { color: #ff0000; }
-.code .sy0 { color: #66cc66; }
+@import "geshi.less";
diff --git a/lib/tpl/dokuwiki/css/content.less b/lib/tpl/dokuwiki/css/content.less
index a5ffbf2be..a2e343a33 100644
--- a/lib/tpl/dokuwiki/css/content.less
+++ b/lib/tpl/dokuwiki/css/content.less
@@ -67,19 +67,19 @@
/*____________ lists ____________*/
-#dokuwiki__content ul li,
-#dokuwiki__aside ul li {
- color: @ini_text_alt;
-}
+.dokuwiki .page,
+.dokuwiki .aside {
+ ul li {
+ color: @ini_text_alt;
+ }
-#dokuwiki__content ol li,
-#dokuwiki__aside ol li {
- color: @ini_text_neu;
-}
+ ol li {
+ color: @ini_text_neu;
+ }
-#dokuwiki__content li .li,
-#dokuwiki__aside li .li {
- color: @ini_text;
+ li .li {
+ color: @ini_text;
+ }
}
/*____________ tables ____________*/
diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less
index 235f6d6bc..60a66f069 100644
--- a/lib/tpl/dokuwiki/css/design.less
+++ b/lib/tpl/dokuwiki/css/design.less
@@ -192,50 +192,50 @@
text-align: right;
form.search {
- display: block;
font-size: 0.875em;
- position: relative;
+ }
+}
- input.edit {
- width: 18em;
- padding: .35em 22px .35em .1em;
- }
+[dir=rtl] #dokuwiki__sitetools {
+ text-align: left;
+}
- input.button {
- background: transparent url(images/search.png) no-repeat 0 0;
- border-width: 0;
- width: 19px;
- height: 14px;
- text-indent: -99999px;
- margin-left: -20px;
- box-shadow: none;
- padding: 0;
- }
+form.search {
+ display: block;
+ position: relative;
+ margin-bottom: 0.5em;
+
+ input.edit {
+ width: 18em;
+ padding: .35em 22px .35em .1em;
}
- ul {
- margin-top: 0.5em;
+ input.button {
+ background: transparent url(images/search.png) no-repeat 0 0;
+ border-width: 0;
+ width: 19px;
+ height: 14px;
+ text-indent: -99999px;
+ margin-left: -20px;
+ box-shadow: none;
+ padding: 0;
}
}
-[dir=rtl] #dokuwiki__sitetools {
- text-align: left;
-
- form.search {
- input.edit {
- padding: .35em .1em .35em 22px;
- }
+[dir=rtl] form.search {
+ input.edit {
+ padding: .35em .1em .35em 22px;
+ }
- input.button {
- background-position: 5px 0;
- margin-left: 0;
- margin-right: -20px;
- position: relative;
- }
+ input.button {
+ background-position: 5px 0;
+ margin-left: 0;
+ margin-right: -20px;
+ position: relative;
}
}
-#IE7 #dokuwiki__sitetools form.search {
+#IE7 form.search {
min-height: 1px;
z-index: 21;
}
@@ -279,13 +279,10 @@
/* sidebar
********************************************************************/
-#dokuwiki__aside {
-
- > .pad {
- font-size: 0.875em;
- overflow: hidden;
- word-wrap: break-word;
- }
+.dokuwiki .aside {
+ font-size: 0.875em;
+ overflow: hidden;
+ word-wrap: break-word;
/* make sidebar more condensed */
@@ -341,8 +338,8 @@
}
}
-[dir=rtl] #dokuwiki__aside ul,
-[dir=rtl] #dokuwiki__aside ol {
+[dir=rtl] .dokuwiki .aside ul,
+[dir=rtl] .dokuwiki .aside ol {
padding-right: .5em;
}
diff --git a/lib/tpl/dokuwiki/css/mobile.less b/lib/tpl/dokuwiki/css/mobile.less
index 0fbd0e8fe..75ae5dbe4 100644
--- a/lib/tpl/dokuwiki/css/mobile.less
+++ b/lib/tpl/dokuwiki/css/mobile.less
@@ -105,6 +105,15 @@
overflow: auto;
}
+/* push pagetools closer to content */
+#dokuwiki__pagetools {
+ top: 0;
+}
+.showSidebar #dokuwiki__pagetools {
+ top: 3.5em;
+}
+
+
/* _edit */
.dokuwiki div.section_highlight {
margin: 0 -1em;
@@ -299,5 +308,17 @@ body {
}
+} /* /@media */
+
+
+/* for screen heights smaller than the pagetools permit
+********************************************************************/
+@media only screen and (max-height: 400px) {
+// 400px is only roughly the required value, this may be wrong under non-standard circumstances
+
+#dokuwiki__pagetools div.tools {
+ position: static;
+}
+
} /* /@media */
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 3bc46406a..44fef81eb 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -36,7 +36,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
<?php if($showSidebar): ?>
<!-- ********** ASIDE ********** -->
- <div id="dokuwiki__aside"><div class="pad include group">
+ <div id="dokuwiki__aside"><div class="pad aside include group">
<h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
<div class="content">
<?php tpl_flush() ?>