diff --git a/.travis.yml b/.travis.yml index 9c3193d19d149ad11cb108f207fd80ebf676d187..0bef94048a76ee509d9827ccec573e8979ae1f0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,13 @@ php: - "5.5" - "5.4" - "5.3" -# PHP 5.6 is not yet released, allow failures -matrix: - allow_failures: - - php: "5.6" notifications: irc: channels: - "chat.freenode.net#dokuwiki" on_success: change on_failure: change -script: cd _test && phpunit --verbose --stderr +install: + - wget https://phar.phpunit.de/phpunit-4.3.5.phar -O _test/phpunit + - chmod 755 _test/phpunit +script: cd _test && ./phpunit --verbose --stderr diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 060e37d284dadf07ed046c4178ad027c75355806..dad2060e5cafb7f05e4db672774462a1030fd862 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -45,8 +45,6 @@ class TestRequest { */ public function execute($uri='/doku.php') { global $INPUT; - global $ID; - global $INFO; // save old environment $server = $_SERVER; diff --git a/_test/data/media/wiki/kind_zu_katze.ogv b/_test/data/media/wiki/kind_zu_katze.ogv new file mode 100644 index 0000000000000000000000000000000000000000..1ad3732dc6b786a910aaaa0bdb68e0b7efa460c5 Binary files /dev/null and b/_test/data/media/wiki/kind_zu_katze.ogv differ diff --git a/_test/data/media/wiki/kind_zu_katze.png b/_test/data/media/wiki/kind_zu_katze.png new file mode 100644 index 0000000000000000000000000000000000000000..a5c151e3faba898ad17894334061b9644fdd2e69 Binary files /dev/null and b/_test/data/media/wiki/kind_zu_katze.png differ diff --git a/_test/data/media/wiki/kind_zu_katze.webm b/_test/data/media/wiki/kind_zu_katze.webm new file mode 100644 index 0000000000000000000000000000000000000000..2973ff833f21a1f3bf50900f1fc6b76dfbefe841 Binary files /dev/null and b/_test/data/media/wiki/kind_zu_katze.webm differ diff --git a/_test/tests/inc/changelog_getlastrevisionat.test.php b/_test/tests/inc/changelog_getlastrevisionat.test.php new file mode 100644 index 0000000000000000000000000000000000000000..84b185ce85658329375dd33599d6d888368530e9 --- /dev/null +++ b/_test/tests/inc/changelog_getlastrevisionat.test.php @@ -0,0 +1,127 @@ +<?php + +/** + * Tests for requesting revisioninfo of a revision of a page with getRevisionInfo() + * + * This class uses the files: + * - data/pages/mailinglist.txt + * - data/meta/mailinglist.changes + */ +class changelog_getlastrevisionat_test extends DokuWikiTest { + + private $pageid = 'mailinglist'; + + function setup() { + parent::setup(); + global $cache_revinfo; + $cache =& $cache_revinfo; + if(isset($cache['nonexist'])) { + unset($cache['nonexist']); + } + if(isset($cache['mailinglist'])) { + unset($cache['mailinglist']); + } + } + + + /** + * no nonexist.changes meta file available + */ + function test_changemetadatanotexists() { + $rev = 1362525899; + $id = 'nonexist'; + $revsexpected = false; + + $pagelog = new PageChangeLog($id, $chunk_size = 8192); + $revs = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revsexpected, $revs); + } + + /** + * start at exact current revision of mailinglist page + * + */ + function test_startatexactcurrentrev() { + $rev = 1385051947; + $revsexpected = ''; + + //set a known timestamp + touch(wikiFN($this->pageid), $rev); + + $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192); + $revs = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revsexpected, $revs); + + } + + /** + * test a future revision + * + */ + function test_futurerev() { + $rev = 1385051947; + $revsexpected = ''; + + //set a known timestamp + touch(wikiFN($this->pageid), $rev); + + $rev +=1; + + $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192); + $revs = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revsexpected, $revs); + + } + + /** + * start at exact last revision of mailinglist page + * + */ + function test_exactlastrev() { + $rev = 1360110636; + $revsexpected = 1360110636; + + $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192); + $revs = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revsexpected, $revs); + } + + + /** + * Request not existing revision + * + */ + function test_olderrev() { + $rev = 1; + $revexpected = false; + + $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192); + $revfound = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revexpected, $revfound); + } + + /** + * Start at non existing revision somewhere between existing revisions + */ + function test_notexistingrev() { + $rev = 1362525890; + $revexpected = 1362525359; + + $pagelog = new PageChangeLog($this->pageid, $chunk_size = 8192); + $revfound = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($revexpected, $revfound); + } + + /** + * request nonexisting page + * + */ + function test_notexistingpage() { + $rev = 1385051947; + $currentexpected = false; + + $pagelog = new PageChangeLog('nonexistingpage', $chunk_size = 8192); + $current = $pagelog->getLastRevisionAt($rev); + $this->assertEquals($currentexpected, $current); + } +} \ No newline at end of file diff --git a/_test/tests/inc/common_ml.test.php b/_test/tests/inc/common_ml.test.php index 415c0a88de4e8f178714af144bb37426ada82279..027dcaef256562ecddface2c758cff52df72a9b4 100644 --- a/_test/tests/inc/common_ml.test.php +++ b/_test/tests/inc/common_ml.test.php @@ -146,4 +146,15 @@ class common_ml_test extends DokuWikiTest { $this->assertEquals($expect, ml($id, $args)); } + + function test_ml_empty_rev() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $args = array('a' => 'b', 'c' => 'd', 'rev' => ''); + + $expect = DOKU_BASE . $this->script . '?a=b&c=d&media=some:img.jpg'; + $this->assertEquals($expect, ml('some:img.jpg', $args)); + } } diff --git a/_test/tests/inc/common_wl.test.php b/_test/tests/inc/common_wl.test.php index 2e34dcae3c4aa3eec9919a625a49c7e316bf5543..4bfde3f3945c9e75ec94abbba23b74b105f41bb1 100644 --- a/_test/tests/inc/common_wl.test.php +++ b/_test/tests/inc/common_wl.test.php @@ -142,6 +142,17 @@ class common_wl_test extends DokuWikiTest { $expect = DOKU_BASE . DOKU_SCRIPT . '/some/one?a=b&c=d'; $this->assertEquals($expect, wl('some:one', 'a=b,c=d', false, '&')); } + + function test_wl_empty_rev() { + global $conf; + $conf['useslash'] = 0; + $conf['userewrite'] = 0; + + $args = array('a' => 'b', 'c' => 'd', 'rev' => ''); + + $expect = DOKU_BASE . DOKU_SCRIPT . '?id=some:&a=b&c=d'; + $this->assertEquals($expect, wl('some:', $args)); + } diff --git a/_test/tests/inc/init_checkssl.test.php b/_test/tests/inc/init_checkssl.test.php new file mode 100644 index 0000000000000000000000000000000000000000..c57d3c37e01678b03fdc6eea147fed6aba4dd51f --- /dev/null +++ b/_test/tests/inc/init_checkssl.test.php @@ -0,0 +1,81 @@ +<?php + +class init_checkssl_test extends DokuWikiTest { + + /** + * Running behind an SSL proxy, HTTP between server and proxy + * HTTPS not set + * HTTP_X_FORWARDED_PROTO + * set to https + */ + function test1() { + $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'; + + $this->assertEquals(is_ssl(), true); + } + + /** + * Running behind a plain HTTP proxy, HTTP between server and proxy + * HTTPS not set + * HTTP_X_FORWARDED_PROTO set to http + */ + function test2() { + $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'http'; + + $this->assertEquals(is_ssl(), false); + } + + /** + * Running behind an SSL proxy, HTTP between server and proxy + * HTTPS set to off, + * HTTP_X_FORWARDED_PROTO set to https + */ + function test3() { + $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'; + $_SERVER['HTTPS'] = 'off'; + + $this->assertEquals(is_ssl(), true); + } + + /** + * Not running behind a proxy, HTTPS server + * HTTPS set to on, + * HTTP_X_FORWARDED_PROTO not set + */ + function test4() { + $_SERVER['HTTPS'] = 'on'; + + $this->assertEquals(is_ssl(), true); + } + + /** + * Not running behind a proxy, plain HTTP server + * HTTPS not set + * HTTP_X_FORWARDED_PROTO not set + */ + function test5() { + $this->assertEquals(is_ssl(), false); + } + + /** + * Not running behind a proxy, plain HTTP server + * HTTPS set to off + * HTTP_X_FORWARDED_PROTO not set + */ + function test6() { + $_SERVER['HTTPS'] = 'off'; + $this->assertEquals(is_ssl(), false); + } + + /** + * Running behind an SSL proxy, SSL between proxy and HTTP server + * HTTPS set to on, + * HTTP_X_FORWARDED_PROTO set to https + */ + function test7() { + $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https'; + $_SERVER['HTTPS'] = 'on'; + + $this->assertEquals(is_ssl(), true); + } +} diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php index cec0b80f6fa417cbe6e3918479a1d62c0251994a..4a8fb8d7117665e21fa6e53909c33831c4439dc5 100644 --- a/_test/tests/inc/input.test.php +++ b/_test/tests/inc/input.test.php @@ -14,8 +14,58 @@ class input_test extends DokuWikiTest { 'empty' => '', 'emptya' => array(), 'do' => array('save' => 'Speichern'), + ); + /** + * custom filter function + * + * @param $string + * @return mixed + */ + public function myfilter($string) { + $string = str_replace('foo', 'bar', $string); + $string = str_replace('baz', '', $string); + return $string; + } + + public function test_filter() { + $_GET = array( + 'foo' => 'foo', + 'zstring'=> "foo\0bar", + 'znull' => "\0", + 'zint' => '42'."\0".'42', + 'zintbaz'=> "baz42", + ); + $_POST = $_GET; + $_REQUEST = $_GET; + $INPUT = new Input(); + + $filter = array($this,'myfilter'); + + $this->assertNotSame('foobar', $INPUT->str('zstring')); + $this->assertSame('foobar', $INPUT->filter()->str('zstring')); + $this->assertSame('bar', $INPUT->filter($filter)->str('foo')); + $this->assertSame('bar', $INPUT->filter()->str('znull', 'bar', true)); + $this->assertNotSame('foobar', $INPUT->str('zstring')); // make sure original input is unmodified + + $this->assertNotSame('foobar', $INPUT->get->str('zstring')); + $this->assertSame('foobar', $INPUT->get->filter()->str('zstring')); + $this->assertSame('bar', $INPUT->get->filter($filter)->str('foo')); + $this->assertSame('bar', $INPUT->get->filter()->str('znull', 'bar', true)); + $this->assertNotSame('foobar', $INPUT->get->str('zstring')); // make sure original input is unmodified + + $this->assertNotSame(4242, $INPUT->int('zint')); + $this->assertSame(4242, $INPUT->filter()->int('zint')); + $this->assertSame(42, $INPUT->filter($filter)->int('zintbaz')); + $this->assertSame(42, $INPUT->filter()->str('znull', 42, true)); + + $this->assertSame(true, $INPUT->bool('znull')); + $this->assertSame(false, $INPUT->filter()->bool('znull')); + + $this->assertSame('foobar', $INPUT->filter()->valid('zstring', array('foobar', 'bang'))); + } + public function test_str() { $_REQUEST = $this->data; $_POST = $this->data; diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php index b47a575ded1cd9aafac6e15d9a5cf5e939020811..2457fb031c51f9be4c1ecbb12b7c64e3e5d83c6f 100644 --- a/_test/tests/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -303,7 +303,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('nest', array ( array ( array('footnote_open',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), diff --git a/_test/tests/inc/parser/parser_lists.test.php b/_test/tests/inc/parser/parser_lists.test.php index e4ef1f83e5dc162b72567f76f3d739f0f76acb91..6acaff63736799801ea97cd2cb659c50ba448bda 100644 --- a/_test/tests/inc/parser/parser_lists.test.php +++ b/_test/tests/inc/parser/parser_lists.test.php @@ -13,7 +13,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -46,7 +46,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('listo_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -80,7 +80,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('listo_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -109,7 +109,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -138,7 +138,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('listo_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -188,7 +188,7 @@ Bar'); array('cdata',array("Foo")), array('p_close',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('listcontent_close',array()), @@ -227,7 +227,7 @@ Bar'); $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('strong_open',array()), array('cdata',array("A")), @@ -262,7 +262,7 @@ Bar'); $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('unformatted',array("A")), array('listcontent_close',array()), @@ -291,7 +291,7 @@ Bar'); $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('cdata',array("A")), array('linebreak',array()), @@ -355,7 +355,7 @@ Bar'); $calls = array ( array('document_start',array()), array('listu_open',array()), - array('listitem_open',array(1)), + array('listitem_open',array(1,Doku_Handler_List::NODE)), array('listcontent_open',array()), array('nest', array( array( array('footnote_open',array()), diff --git a/_test/tests/inc/parser/parser_media.test.php b/_test/tests/inc/parser/parser_media.test.php new file mode 100644 index 0000000000000000000000000000000000000000..d9a0626f54ba63a1f5daf5dcb61bb03096e9625a --- /dev/null +++ b/_test/tests/inc/parser/parser_media.test.php @@ -0,0 +1,103 @@ +<?php +require_once 'parser.inc.php'; + +/** + * Tests for the implementation of audio and video files + * + * @author Michael Große <grosse@cosmocode.de> +*/ +class TestOfDoku_Parser_Media extends TestOfDoku_Parser { + + function testVideoOGVExternal() { + $file = 'http://some.where.far/away.ogv'; + $parser_response = p_get_instructions('{{' . $file . '}}'); + + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('externalmedia',array($file,null,null,null,null,'cache','details')), + array('cdata',array(null)), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripbyteindex',$parser_response),$calls); + + $Renderer = new Doku_Renderer_xhtml(); + $url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true); + //print_r("url: " . $url); + $video = '<video class="media" width="320" height="240" controls="controls">'; + $this->assertEquals(substr($url,0,66),$video); + $source = '<source src="http://some.where.far/away.ogv" type="video/ogg" />'; + $this->assertEquals(substr($url,67,64),$source); + // work around random token + $a_first_part = '<a href="/./lib/exe/fetch.php?cache=&tok='; + $a_second_part = '&media=http%3A%2F%2Fsome.where.far%2Faway.ogv" class="media mediafile mf_ogv" title="http://some.where.far/away.ogv">'; + $this->assertEquals(substr($url,132,45),$a_first_part); + $this->assertEquals(substr($url,183,121),$a_second_part); + $rest = 'away.ogv</a></video>'."\n"; + $this->assertEquals(substr($url,304),$rest); + } + + /** + * unknown extension of external media file + */ + function testVideoVIDExternal() { + $file = 'http://some.where.far/away.vid'; + $parser_response = p_get_instructions('{{' . $file . '}}'); + + $calls = array( + array('document_start', array()), + array('p_open', array()), + array('externalmedia', array($file, null, null, null, null, 'cache', 'details')), + array('cdata', array(null)), + array('p_close', array()), + array('document_end', array()), + ); + $this->assertEquals(array_map('stripbyteindex', $parser_response), $calls); + + $Renderer = new Doku_Renderer_xhtml(); + $url = $Renderer->externalmedia($file, null, null, null, null, 'cache', 'details', true); + // work around random token + $a_first_part = '<a href="/./lib/exe/fetch.php?tok='; + $a_second_part = '&media=http%3A%2F%2Fsome.where.far%2Faway.vid" class="media mediafile mf_vid" title="http://some.where.far/away.vid">'; + $this->assertEquals(substr($url,0,34),$a_first_part); + $this->assertEquals(substr($url,40,121),$a_second_part); + $rest = 'away.vid</a>'; + $this->assertEquals(substr($url,161),$rest); + } + + + function testVideoOGVInternal() { + $file = 'wiki:kind_zu_katze.ogv'; + $parser_response = p_get_instructions('{{' . $file . '}}'); + + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('internalmedia',array($file,null,null,null,null,'cache','details')), + array('cdata',array(null)), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripbyteindex',$parser_response),$calls); + + $Renderer = new Doku_Renderer_xhtml(); + $url = $Renderer->externalmedia($file,null,null,null,null,'cache','details',true); + + $video = '<video class="media" width="320" height="240" controls="controls" poster="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.png">'; + $this->assertEquals(substr($url,0,125),$video); + + $source_webm = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.webm" type="video/webm" />'; + $this->assertEquals(substr($url,126,85),$source_webm); + $source_ogv = '<source src="/./lib/exe/fetch.php?media=wiki:kind_zu_katze.ogv" type="video/ogg" />'; + $this->assertEquals(substr($url,212,83),$source_ogv); + + $a_webm = '<a href="/./lib/exe/fetch.php?id=&cache=&media=wiki:kind_zu_katze.webm" class="media mediafile mf_webm" title="wiki:kind_zu_katze.webm (99.1 KB)">kind_zu_katze.webm</a>'; + $a_ogv = '<a href="/./lib/exe/fetch.php?id=&cache=&media=wiki:kind_zu_katze.ogv" class="media mediafile mf_ogv" title="wiki:kind_zu_katze.ogv (44.8 KB)">kind_zu_katze.ogv</a>'; + $this->assertEquals(substr($url,296,176),$a_webm); + $this->assertEquals(substr($url,472,172),$a_ogv); + + $rest = '</video>'."\n"; + $this->assertEquals(substr($url,644),$rest); + } +} diff --git a/_test/tests/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php index b1ae2a84f3db92ba09215aeead9d9fc31d54f05e..648ede07edc8352c1a63a89f301a28b9ad29bcbe 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -58,6 +58,18 @@ class js_js_compress_test extends DokuWikiTest { $this->assertEquals(js_compress($text), 'text.replace(/"/,"//")'); } + function test_regex_after_and_with_slashes_outside_string(){ + $text = 'if ( peng == bla && /pattern\//.test(url)) request = new Something();'; + $this->assertEquals(js_compress($text), + 'if(peng==bla&&/pattern\//.test(url))request=new Something();'); + } + + function test_regex_after_or_with_slashes_outside_string(){ + $text = 'if ( peng == bla || /pattern\//.test(url)) request = new Something();'; + $this->assertEquals(js_compress($text), + 'if(peng==bla||/pattern\//.test(url))request=new Something();'); + } + function test_dquot1(){ $text = 'var foo="Now what \\" \'do we//get /*here*/ ?";'; $this->assertEquals(js_compress($text), $text); @@ -145,6 +157,72 @@ EOF; $this->assertEquals($out, js_compress($text)); } + function test_plusplus1(){ + $text = 'a = 5 + ++b;'; + $this->assertEquals('a=5+ ++b;',js_compress($text)); + } + + function test_plusplus2(){ + $text = 'a = 5+ ++b;'; + $this->assertEquals('a=5+ ++b;',js_compress($text)); + } + + function test_plusplus3(){ + $text = 'a = 5++ + b;'; + $this->assertEquals('a=5++ +b;',js_compress($text)); + } + + function test_plusplus4(){ + $text = 'a = 5++ +b;'; + $this->assertEquals('a=5++ +b;',js_compress($text)); + } + + function test_minusminus1(){ + $text = 'a = 5 - --b;'; + $this->assertEquals('a=5- --b;',js_compress($text)); + } + + function test_minusminus2(){ + $text = 'a = 5- --b;'; + $this->assertEquals('a=5- --b;',js_compress($text)); + } + + function test_minusminus3(){ + $text = 'a = 5-- - b;'; + $this->assertEquals('a=5-- -b;',js_compress($text)); + } + + function test_minusminus4(){ + $text = 'a = 5-- -b;'; + $this->assertEquals('a=5-- -b;',js_compress($text)); + } + + function test_minusplus1(){ + $text = 'a = 5-- +b;'; + $this->assertEquals('a=5--+b;',js_compress($text)); + } + + function test_minusplus2(){ + $text = 'a = 5-- + b;'; + $this->assertEquals('a=5--+b;',js_compress($text)); + } + + function test_plusminus1(){ + $text = 'a = 5++ - b;'; + $this->assertEquals('a=5++-b;',js_compress($text)); + } + + function test_plusminus2(){ + $text = 'a = 5++ -b;'; + $this->assertEquals('a=5++-b;',js_compress($text)); + } + + function test_unusual_signs(){ + $text='var Ï€ = Math.PI, Ï„ = 2 * Ï€, halfÏ€ = Ï€ / 2, ε = 1e-6, ε2 = ε * ε, radians = Ï€ / 180, degrees = 180 / Ï€;'; + $this->assertEquals(js_compress($text), + 'var Ï€=Math.PI,Ï„=2*Ï€,halfÏ€=Ï€/2,ε=1e-6,ε2=ε*ε,radians=Ï€/180,degrees=180/Ï€;'); + } + /** * Test the files provided with the original JsStrip */ diff --git a/bin/gittool.php b/bin/gittool.php index 6944dde57c1ee70aab66762c80621538c41c4698..cbadb5bfa27ba3f5cf8ccd29030f704c5dad6f66 100755 --- a/bin/gittool.php +++ b/bin/gittool.php @@ -101,7 +101,7 @@ class GitToolCLI extends DokuCLI { /** * Tries to install the given extensions using git clone * - * @param $extensions + * @param array $extensions */ public function cmd_clone($extensions) { $errors = array(); @@ -130,7 +130,7 @@ class GitToolCLI extends DokuCLI { /** * Tries to install the given extensions using git clone with fallback to install * - * @param $extensions + * @param array $extensions */ public function cmd_install($extensions) { $errors = array(); @@ -206,12 +206,13 @@ class GitToolCLI extends DokuCLI { * Install extension from the given download URL * * @param string $ext - * @return bool + * @return bool|null */ private function downloadExtension($ext) { /** @var helper_plugin_extension_extension $plugin */ $plugin = plugin_load('helper', 'extension_extension'); if(!$ext) die("extension plugin not available, can't continue"); + $plugin->setExtension($ext); $url = $plugin->getDownloadURL(); @@ -291,12 +292,13 @@ class GitToolCLI extends DokuCLI { * Returns the repository for the given extension * * @param $extension - * @return bool|string + * @return false|string */ private function getSourceRepo($extension) { /** @var helper_plugin_extension_extension $ext */ $ext = plugin_load('helper', 'extension_extension'); if(!$ext) die("extension plugin not available, can't continue"); + $ext->setExtension($extension); $repourl = $ext->getSourcerepoURL(); diff --git a/bin/striplangs.php b/bin/striplangs.php index 6335bc84c7f1c66b721c1271b8264a0f25de787c..82d27d4627a9e80a26c64d04241ba41c1a3b0ec1 100755 --- a/bin/striplangs.php +++ b/bin/striplangs.php @@ -26,7 +26,8 @@ class StripLangsCLI extends DokuCLI { $options->registerOption( 'keep', 'Comma separated list of languages to keep in addition to English.', - 'k' + 'k', + 'langcodes' ); $options->registerOption( 'english-only', diff --git a/bin/wantedpages.php b/bin/wantedpages.php index 8fc4ba74ff7d25bdafeced20ccfb69db9ea3e0e4..54bfd47558a76452464a8fb5d86f707cc9c1ec09 100755 --- a/bin/wantedpages.php +++ b/bin/wantedpages.php @@ -61,6 +61,13 @@ class WantedPagesCLI extends DokuCLI { } } + /** + * Determine directions of the search loop + * + * @param string $entry + * @param string $basepath + * @return int + */ protected function dir_filter($entry, $basepath) { if($entry == '.' || $entry == '..') { return WantedPagesCLI::DIR_CONTINUE; @@ -77,6 +84,13 @@ class WantedPagesCLI extends DokuCLI { return WantedPagesCLI::DIR_CONTINUE; } + /** + * Collects recursively the pages in a namespace + * + * @param string $dir + * @return array + * @throws DokuCLI_Exception + */ protected function get_pages($dir) { static $trunclen = null; if(!$trunclen) { @@ -108,6 +122,12 @@ class WantedPagesCLI extends DokuCLI { return $pages; } + /** + * Parse instructions and returns the non-existing links + * + * @param array $page array with page id and file path + * @return array + */ function internal_links($page) { global $conf; $instructions = p_get_instructions(file_get_contents($page['file'])); diff --git a/conf/mime.conf b/conf/mime.conf index 2a50fab10177268c1ed332f3cf08ba12246760f0..c2e03b775de1a2f2b93dce41f9eaa7d3414fe93f 100644 --- a/conf/mime.conf +++ b/conf/mime.conf @@ -9,7 +9,6 @@ gif image/gif png image/png ico image/vnd.microsoft.icon -swf application/x-shockwave-flash mp3 audio/mpeg ogg audio/ogg wav audio/wav @@ -66,3 +65,7 @@ odt !application/vnd.oasis.opendocument.text #xml text/xml #csv text/csv +# Also flash may be able to execute arbitrary scripts in the website's +# context +#swf application/x-shockwave-flash + diff --git a/conf/mysql.conf.php.example b/conf/mysql.conf.php.example index c67e77c4548f5f12648a5112861be40ce510dd0f..8337f51b41d2406d673e02f6ed9a2980155ea67e 100644 --- a/conf/mysql.conf.php.example +++ b/conf/mysql.conf.php.example @@ -56,7 +56,7 @@ $conf['plugin']['authmysql']['TablesToLock']= array("users", "users AS u","group * of the user. If the result table is empty or contains more than one * row, access will be denied. * - * The plugin accesses the password as 'pass' so a alias might be necessary. + * The plugin accesses the password as 'pass' so an alias might be necessary. * * Following patters will be replaced: * %{user} user name @@ -107,10 +107,10 @@ $conf['plugin']['authmysql']['getGroups'] = "SELECT name as `group` /* This statement should return a table containing all user login names * that meet certain filter criteria. The filter expressions will be added * case dependend by the plugin. At the end a sort expression will be added. - * Important is that this list contains no double entries fo a user. Each + * Important is that this list contains no double entries for a user. Each * user name is only allowed once in the table. * - * The login name will be accessed as 'user' to a alias might be neseccary. + * The login name will be accessed as 'user' to an alias might be neseccary. * No patterns will be replaced in this statement but following patters * will be replaced in the filter expressions: * %{user} in FilterLogin user's login name @@ -174,7 +174,7 @@ $conf['plugin']['authmysql']['delGroup'] = "DELETE FROM groups WHERE gid='%{gid}'"; /* This statement should return the database index of a given user name. - * The plugin will access the index with the name 'id' so a alias might be + * The plugin will access the index with the name 'id' so an alias might be * necessary. * following patters will be replaced: * %{user} user name @@ -240,7 +240,7 @@ $conf['plugin']['authmysql']['delUserGroup']= "DELETE FROM usergroup AND gid='%{gid}'"; /* This statement should return the database index of a given group name. - * The plugin will access the index with the name 'id' so a alias might + * The plugin will access the index with the name 'id' so an alias might * be necessary. * * Following patters will be replaced: diff --git a/doku.php b/doku.php index da3643544eb2e8e712d9e64247e8f0a9475fba4d..f5aa6cfa4a4c8d29829e08b643dca5bb80009607 100644 --- a/doku.php +++ b/doku.php @@ -9,12 +9,17 @@ */ // update message version -$updateVersion = 45; +$updateVersion = 47; // xdebug_start_profiling(); if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/'); +// define all DokuWiki globals here (needed within test requests but also helps to keep track) +global $ACT, $INPUT, $QUERY, $ID, $REV, $DATE_AT, $IDX, + $DATE, $RANGE, $HIGH, $TEXT, $PRE, $SUF, $SUM, $INFO, $JSINFO; + + if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) { $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO'])); } elseif(!empty($_REQUEST['idx'])) { @@ -34,6 +39,7 @@ $QUERY = trim($INPUT->str('id')); $ID = getID(); $REV = $INPUT->int('rev'); +$DATE_AT = $INPUT->str('at'); $IDX = $INPUT->str('idx'); $DATE = $INPUT->int('date'); $RANGE = $INPUT->str('range'); @@ -47,7 +53,41 @@ $PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1)); $SUF = cleanText($INPUT->post->str('suffix')); $SUM = $INPUT->post->str('summary'); -//make info about the selected page available + +//parse DATE_AT +if($DATE_AT) { + $date_parse = strtotime($DATE_AT); + if($date_parse) { + $DATE_AT = $date_parse; + } else { // check for UNIX Timestamp + $date_parse = @date('Ymd',$DATE_AT); + if(!$date_parse || $date_parse === '19700101') { + msg(sprintf($lang['unable_to_parse_date'], $DATE_AT)); + $DATE_AT = null; + } + } +} + +//check for existing $REV related to $DATE_AT +if($DATE_AT) { + $pagelog = new PageChangeLog($ID); + $rev_t = $pagelog->getLastRevisionAt($DATE_AT); + if($rev_t === '') { //current revision + $REV = null; + $DATE_AT = null; + } else if ($rev_t === false) { //page did not exist + $rev_n = $pagelog->getRelativeRevision($DATE_AT,+1); + msg(sprintf($lang['page_nonexist_rev'], + strftime($conf['dformat'],$DATE_AT), + wl($ID, array('rev' => $rev_n)), + strftime($conf['dformat'],$rev_n))); + $REV = $DATE_AT; //will result in a page not exists message + } else { + $REV = $rev_t; + } +} + +//make infos about the selected page available $INFO = pageinfo(); //export minimal info to JS, plugins can add more diff --git a/feed.php b/feed.php index a63e22164649d2c84ea6973c7aa671164b818639..aa00063a12eb921d26bc6a3ff3a8e501773be70f 100644 --- a/feed.php +++ b/feed.php @@ -306,7 +306,7 @@ function rss_buildItems(&$rss, &$data, $opt) { $src_r = ''; $src_l = ''; - if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { + if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)), 300)) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src_r = ml($id, $more, true, '&', true); } @@ -355,7 +355,7 @@ function rss_buildItems(&$rss, &$data, $opt) { break; case 'html': if($ditem['media']) { - if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src = ml($id, $more, true, '&', true); $content = '<img src="'.$src.'" alt="'.$id.'" />'; @@ -386,7 +386,7 @@ function rss_buildItems(&$rss, &$data, $opt) { case 'abstract': default: if($ditem['media']) { - if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + if($size = media_image_preview_size($id, '', new JpegMeta(mediaFN($id)))) { $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id)); $src = ml($id, $more, true, '&', true); $content = '<img src="'.$src.'" alt="'.$id.'" />'; diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 3c955cf88dd48ade31256835918d0e28d2060ab3..210d1c0eb9a0ecc84108eedb8efd3b7cfe9705db 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -14,6 +14,9 @@ class _DiffOp { var $orig; var $closing; + /** + * @return _DiffOp + */ function reverse() { trigger_error("pure virtual", E_USER_ERROR); } @@ -104,6 +107,21 @@ class _DiffOp_Change extends _DiffOp { */ class _DiffEngine { + var $xchanged = array(); + var $ychanged = array(); + var $xv = array(); + var $yv = array(); + var $xind = array(); + var $yind = array(); + var $seq; + var $in_seq; + var $lcs; + + /** + * @param array $from_lines + * @param array $to_lines + * @return _DiffOp[] + */ function diff($from_lines, $to_lines) { $n_from = count($from_lines); $n_to = count($to_lines); @@ -495,9 +513,9 @@ class Diff { * Constructor. * Computes diff between sequences of strings. * - * @param $from_lines array An array of strings. - * (Typically these are lines from a file.) - * @param $to_lines array An array of strings. + * @param array $from_lines An array of strings. + * (Typically these are lines from a file.) + * @param array $to_lines An array of strings. */ function __construct($from_lines, $to_lines) { $eng = new _DiffEngine; @@ -512,8 +530,9 @@ class Diff { * * $diff = new Diff($lines1, $lines2); * $rev = $diff->reverse(); - * @return object A Diff object representing the inverse of the - * original diff. + * + * @return Diff A Diff object representing the inverse of the + * original diff. */ function reverse() { $rev = $this; @@ -631,19 +650,19 @@ class MappedDiff extends Diff { * case-insensitve diffs, or diffs which ignore * changes in white-space. * - * @param $from_lines array An array of strings. - * (Typically these are lines from a file.) + * @param string[] $from_lines An array of strings. + * (Typically these are lines from a file.) * - * @param $to_lines array An array of strings. + * @param string[] $to_lines An array of strings. * - * @param $mapped_from_lines array This array should - * have the same size number of elements as $from_lines. - * The elements in $mapped_from_lines and - * $mapped_to_lines are what is actually compared - * when computing the diff. + * @param string[] $mapped_from_lines This array should + * have the same size number of elements as $from_lines. + * The elements in $mapped_from_lines and + * $mapped_to_lines are what is actually compared + * when computing the diff. * - * @param $mapped_to_lines array This array should - * have the same number of elements as $to_lines. + * @param string[] $mapped_to_lines This array should + * have the same number of elements as $to_lines. */ function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { @@ -697,12 +716,13 @@ class DiffFormatter { /** * Format a diff. * - * @param $diff object A Diff object. + * @param Diff $diff A Diff object. * @return string The formatted output. */ function format($diff) { $xi = $yi = 1; + $x0 = $y0 = 0; $block = false; $context = array(); @@ -752,6 +772,13 @@ class DiffFormatter { return $this->_end_diff(); } + /** + * @param int $xbeg + * @param int $xlen + * @param int $ybeg + * @param int $ylen + * @param array $edits + */ function _block($xbeg, $xlen, $ybeg, $ylen, &$edits) { $this->_start_block($this->_block_header($xbeg, $xlen, $ybeg, $ylen)); foreach ($edits as $edit) { @@ -779,6 +806,13 @@ class DiffFormatter { return $val; } + /** + * @param int $xbeg + * @param int $xlen + * @param int $ybeg + * @param int $ylen + * @return string + */ function _block_header($xbeg, $xlen, $ybeg, $ylen) { if ($xlen > 1) $xbeg .= "," . ($xbeg + $xlen - 1); @@ -788,6 +822,9 @@ class DiffFormatter { return $xbeg . ($xlen ? ($ylen ? 'c' : 'd') : 'a') . $ybeg; } + /** + * @param string $header + */ function _start_block($header) { echo $header; } @@ -896,6 +933,9 @@ class _HWLDF_WordAccumulator { $this->_tag = $new_tag; } + /** + * @param string $new_tag + */ function _flushLine($new_tag) { $this->_flushGroup($new_tag); if ($this->_line != '') @@ -1055,6 +1095,10 @@ class TableDiffFormatter extends DiffFormatter { $this->trailing_context_lines = 2; } + /** + * @param Diff $diff + * @return string + */ function format($diff) { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. @@ -1165,6 +1209,10 @@ class InlineDiffFormatter extends DiffFormatter { $this->trailing_context_lines = 2; } + /** + * @param Diff $diff + * @return string + */ function format($diff) { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index cd4c7c4c55b491677ddadccaa3adc39fa25534ae..76d973c38bfba4be7996fac1728187b86b6e7573 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -57,6 +57,12 @@ class DokuHTTPClient extends HTTPClient { * @triggers HTTPCLIENT_REQUEST_SEND * @author Andreas Gohr <andi@splitbrain.org> */ + /** + * @param string $url + * @param string|array $data the post data either as array or raw data + * @param string $method + * @return bool + */ function sendRequest($url,$data='',$method='GET'){ $httpdata = array('url' => $url, 'data' => $data, @@ -104,7 +110,7 @@ class HTTPClient { var $header_regexp; // if set this RE must match against the headers, else abort var $headers; var $debug; - var $start = 0; // for timings + var $start = 0.0; // for timings var $keep_alive = true; // keep alive rocks // don't set these, read on error @@ -166,7 +172,8 @@ class HTTPClient { * * @param string $url The URL to fetch * @param bool $sloppy304 Return body on 304 not modified - * @return bool|string response body, false on error + * @return false|string response body, false on error + * * @author Andreas Gohr <andi@splitbrain.org> */ function get($url,$sloppy304=false){ @@ -187,7 +194,8 @@ class HTTPClient { * @param string $url The URL to fetch * @param array $data Associative array of parameters * @param bool $sloppy304 Return body on 304 not modified - * @return bool|string response body, false on error + * @return false|string response body, false on error + * * @author Andreas Gohr <andi@splitbrain.org> */ function dget($url,$data,$sloppy304=false){ @@ -207,7 +215,7 @@ class HTTPClient { * * @param string $url The URL to fetch * @param array $data Associative array of parameters - * @return bool|string response body, false on error + * @return false|string response body, false on error * @author Andreas Gohr <andi@splitbrain.org> */ function post($url,$data){ @@ -229,6 +237,7 @@ class HTTPClient { * @param mixed $data - the post data either as array or raw data * @param string $method - HTTP Method usually GET or POST. * @return bool - true on success + * * @author Andreas Goetz <cpuidle@gmx.de> * @author Andreas Gohr <andi@splitbrain.org> */ @@ -580,7 +589,18 @@ class HTTPClient { $this->_debug('SSL Tunnel Response',$r_headers); if(preg_match('/^HTTP\/1\.[01] 200/i',$r_headers)){ - if (stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) { + // set correct peer name for verification (enabled since PHP 5.6) + stream_context_set_option($socket, 'ssl', 'peer_name', $requestinfo['host']); + + // Because of older PHP versions having trouble with TLS (enable_crypto returns true, but + // the conection still borks) we try SSLv3 first + if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) { + $requesturl = $requestinfo['path']; + return true; + } + + // If the proxy does not support SSLv3 we try TLS + if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { $requesturl = $requestinfo['path']; return true; } @@ -596,6 +616,7 @@ class HTTPClient { * @param string $data The data to write * @param string $message Description of what is being read * @throws HTTPClientException + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function _sendData($socket, $data, $message) { @@ -640,6 +661,7 @@ class HTTPClient { * @param bool $ignore_eof End-of-file is not an error if this is set * @throws HTTPClientException * @return string + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function _readData($socket, $nbytes, $message, $ignore_eof = false) { @@ -689,6 +711,7 @@ class HTTPClient { * @param string $message Description of what is being read * @throws HTTPClientException * @return string + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function _readLine($socket, $message) { @@ -723,6 +746,9 @@ class HTTPClient { * Uses _debug_text or _debug_html depending on the SAPI name * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $info + * @param mixed $var */ function _debug($info,$var=null){ if(!$this->debug) return; @@ -736,8 +762,8 @@ class HTTPClient { /** * print debug info as HTML * - * @param $info - * @param null $var + * @param string $info + * @param mixed $var */ function _debug_html($info, $var=null){ print '<b>'.$info.'</b> '.($this->_time() - $this->start).'s<br />'; @@ -753,8 +779,8 @@ class HTTPClient { /** * prints debug info as plain text * - * @param $info - * @param null $var + * @param string $info + * @param mixed $var */ function _debug_text($info, $var=null){ print '*'.$info.'* '.($this->_time() - $this->start)."s\n"; @@ -764,6 +790,8 @@ class HTTPClient { /** * Return current timestamp in microsecond resolution + * + * @return float */ static function _time(){ list($usec, $sec) = explode(" ", microtime()); @@ -776,6 +804,9 @@ class HTTPClient { * All Keys are lowercased. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $string + * @return array */ function _parseHeaders($string){ $headers = array(); @@ -804,6 +835,9 @@ class HTTPClient { * convert given header array to header string * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $headers + * @return string */ function _buildHeaders($headers){ $string = ''; @@ -818,6 +852,8 @@ class HTTPClient { * get cookies as http header string * * @author Andreas Goetz <cpuidle@gmx.de> + * + * @return string */ function _getCookies(){ $headers = ''; @@ -833,6 +869,9 @@ class HTTPClient { * Encode data for posting * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $data + * @return string */ function _postEncode($data){ return http_build_query($data,'','&'); @@ -843,6 +882,9 @@ class HTTPClient { * * @fixme use of urlencode might be wrong here * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $data + * @return string */ function _postMultipartEncode($data){ $boundary = '--'.$this->boundary; diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index 979dc4d16d29ee4ebb7d238ba4cd515d9ea0d905..8392986806e171b1122b9b4016ea5133465b671f 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -1,101 +1,146 @@ <?php + /** - * IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002 + * IXR - The Incutio XML-RPC Library + * + * Copyright (c) 2010, Incutio Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name of Incutio Ltd. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. * - * @version 1.61 - * @author Simon Willison - * @date 11th July 2003 - * @link http://scripts.incutio.com/xmlrpc/ - * @link http://scripts.incutio.com/xmlrpc/manual.php - * @license Artistic License http://www.opensource.org/licenses/artistic-license.php + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package IXR + * @since 1.5 + * + * @copyright Incutio Ltd 2010 (http://www.incutio.com) + * @version 1.7.4 7th September 2010 + * @author Simon Willison + * @link http://scripts.incutio.com/xmlrpc/ Site/manual * * Modified for DokuWiki * @author Andreas Gohr <andi@splitbrain.org> */ - - class IXR_Value { + + /** @var IXR_Value[]|IXR_Date|IXR_Base64|int|bool|double|string */ var $data; + /** @var string */ var $type; - function IXR_Value ($data, $type = false) { + + /** + * @param mixed $data + * @param bool $type + */ + function IXR_Value($data, $type = false) { $this->data = $data; - if (!$type) { + if(!$type) { $type = $this->calculateType(); } $this->type = $type; - if ($type == 'struct') { - /* Turn all the values in the array in to new IXR_Value objects */ - foreach ($this->data as $key => $value) { + if($type == 'struct') { + // Turn all the values in the array in to new IXR_Value objects + foreach($this->data as $key => $value) { $this->data[$key] = new IXR_Value($value); } } - if ($type == 'array') { - for ($i = 0, $j = count($this->data); $i < $j; $i++) { + if($type == 'array') { + for($i = 0, $j = count($this->data); $i < $j; $i++) { $this->data[$i] = new IXR_Value($this->data[$i]); } } } + + /** + * @return string + */ function calculateType() { - if ($this->data === true || $this->data === false) { + if($this->data === true || $this->data === false) { return 'boolean'; } - if (is_integer($this->data)) { + if(is_integer($this->data)) { return 'int'; } - if (is_double($this->data)) { + if(is_double($this->data)) { return 'double'; } + // Deal with IXR object types base64 and date - if (is_object($this->data) && is_a($this->data, 'IXR_Date')) { + if(is_object($this->data) && is_a($this->data, 'IXR_Date')) { return 'date'; } - if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) { + if(is_object($this->data) && is_a($this->data, 'IXR_Base64')) { return 'base64'; } - // If it is a normal PHP object convert it in to a struct - if (is_object($this->data)) { + // If it is a normal PHP object convert it in to a struct + if(is_object($this->data)) { $this->data = get_object_vars($this->data); return 'struct'; } - if (!is_array($this->data)) { + if(!is_array($this->data)) { return 'string'; } - /* We have an array - is it an array or a struct ? */ - if ($this->isStruct($this->data)) { + + // We have an array - is it an array or a struct? + if($this->isStruct($this->data)) { return 'struct'; } else { return 'array'; } } + + /** + * @return bool|string + */ function getXml() { - /* Return XML for this value */ - switch ($this->type) { + // Return XML for this value + switch($this->type) { case 'boolean': - return '<boolean>'.(($this->data) ? '1' : '0').'</boolean>'; + return '<boolean>' . (($this->data) ? '1' : '0') . '</boolean>'; break; case 'int': - return '<int>'.$this->data.'</int>'; + return '<int>' . $this->data . '</int>'; break; case 'double': - return '<double>'.$this->data.'</double>'; + return '<double>' . $this->data . '</double>'; break; case 'string': - return '<string>'.htmlspecialchars($this->data).'</string>'; + return '<string>' . htmlspecialchars($this->data) . '</string>'; break; case 'array': - $return = '<array><data>'."\n"; - foreach ($this->data as $item) { - $return .= ' <value>'.$item->getXml()."</value>\n"; + $return = '<array><data>' . "\n"; + foreach($this->data as $item) { + $return .= ' <value>' . $item->getXml() . "</value>\n"; } $return .= '</data></array>'; return $return; break; case 'struct': - $return = '<struct>'."\n"; - foreach ($this->data as $name => $value) { + $return = '<struct>' . "\n"; + foreach($this->data as $name => $value) { $return .= " <member><name>$name</name><value>"; - $return .= $value->getXml()."</value></member>\n"; + $return .= $value->getXml() . "</value></member>\n"; } $return .= '</struct>'; return $return; @@ -107,11 +152,17 @@ class IXR_Value { } return false; } + + /** + * Checks whether or not the supplied array is a struct or not + * + * @param array $array + * @return boolean + */ function isStruct($array) { - /* Nasty function to check if an array is a struct or not */ $expected = 0; - foreach ($array as $key => $value) { - if ((string)$key != (string)$expected) { + foreach($array as $key => $value) { + if((string) $key != (string) $expected) { return true; } $expected++; @@ -120,18 +171,25 @@ class IXR_Value { } } - +/** + * IXR_MESSAGE + * + * @package IXR + * @since 1.5 + * + */ class IXR_Message { var $message; - var $messageType; // methodCall / methodResponse / fault + var $messageType; // methodCall / methodResponse / fault var $faultCode; var $faultString; var $methodName; var $params; + // Current variable stacks - var $_arraystructs = array(); // The stack used to keep track of the current array/struct + var $_arraystructs = array(); // The stack used to keep track of the current array/struct var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array - var $_currentStructName = array(); // A stack as well + var $_currentStructName = array(); // A stack as well var $_param; var $_value; var $_currentTag; @@ -139,12 +197,23 @@ class IXR_Message { var $_lastseen; // The XML parser var $_parser; - function IXR_Message ($message) { - $this->message = $message; + + /** + * @param string $message + */ + function IXR_Message($message) { + $this->message =& $message; } + + /** + * @return bool + */ function parse() { // first remove the XML declaration - $this->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $this->message); + // merged from WP #10698 - this method avoids the RAM usage of preg_replace on very large messages + $header = preg_replace('/<\?xml.*?\?' . '>/', '', substr($this->message, 0, 100), 1); + $this->message = substr_replace($this->message, $header, 0, 100); + // workaround for a bug in PHP/libxml2, see http://bugs.php.net/bug.php?id=45996 $this->message = str_replace('<', '<', $this->message); $this->message = str_replace('>', '>', $this->message); @@ -152,7 +221,7 @@ class IXR_Message { $this->message = str_replace(''', ''', $this->message); $this->message = str_replace('"', '"', $this->message); $this->message = str_replace("\x0b", ' ', $this->message); //vertical tab - if (trim($this->message) == '') { + if(trim($this->message) == '') { return false; } $this->_parser = xml_parser_create(); @@ -162,23 +231,40 @@ class IXR_Message { xml_set_object($this->_parser, $this); xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); xml_set_character_data_handler($this->_parser, 'cdata'); - if (!xml_parse($this->_parser, $this->message)) { - /* die(sprintf('XML error: %s at line %d', - xml_error_string(xml_get_error_code($this->_parser)), - xml_get_current_line_number($this->_parser))); */ - return false; - } + $chunk_size = 262144; // 256Kb, parse in chunks to avoid the RAM usage on very large messages + $final = false; + do { + if(strlen($this->message) <= $chunk_size) { + $final = true; + } + $part = substr($this->message, 0, $chunk_size); + $this->message = substr($this->message, $chunk_size); + if(!xml_parse($this->_parser, $part, $final)) { + return false; + } + if($final) { + break; + } + } while(true); xml_parser_free($this->_parser); + // Grab the error messages, if any - if ($this->messageType == 'fault') { + if($this->messageType == 'fault') { $this->faultCode = $this->params[0]['faultCode']; $this->faultString = $this->params[0]['faultString']; } return true; } + + /** + * @param $parser + * @param string $tag + * @param $attr + */ function tag_open($parser, $tag, $attr) { - $this->currentTag = $tag; $this->_currentTagContents = ''; + $this->_currentTag = $tag; + switch($tag) { case 'methodCall': case 'methodResponse': @@ -186,7 +272,7 @@ class IXR_Message { $this->messageType = $tag; break; /* Deal with stacks of arrays and structs */ - case 'data': // data is to all intents and puposes more interesting than array + case 'data': // data is to all intents and purposes more interesting than array $this->_arraystructstypes[] = 'array'; $this->_arraystructs[] = array(); break; @@ -197,50 +283,52 @@ class IXR_Message { } $this->_lastseen = $tag; } + + /** + * @param $parser + * @param string $cdata + */ function cdata($parser, $cdata) { $this->_currentTagContents .= $cdata; } + + /** + * @param $parser + * @param $tag + */ function tag_close($parser, $tag) { $valueFlag = false; switch($tag) { case 'int': case 'i4': - $value = (int)trim($this->_currentTagContents); - $this->_currentTagContents = ''; + $value = (int) trim($this->_currentTagContents); $valueFlag = true; break; case 'double': - $value = (double)trim($this->_currentTagContents); - $this->_currentTagContents = ''; + $value = (double) trim($this->_currentTagContents); $valueFlag = true; break; case 'string': - $value = (string)$this->_currentTagContents; - $this->_currentTagContents = ''; + $value = (string) $this->_currentTagContents; $valueFlag = true; break; case 'dateTime.iso8601': $value = new IXR_Date(trim($this->_currentTagContents)); - // $value = $iso->getTimestamp(); - $this->_currentTagContents = ''; $valueFlag = true; break; case 'value': // "If no type is indicated, the type is string." - if($this->_lastseen == 'value'){ - $value = (string)$this->_currentTagContents; - $this->_currentTagContents = ''; + if($this->_lastseen == 'value') { + $value = (string) $this->_currentTagContents; $valueFlag = true; } break; case 'boolean': - $value = (boolean)trim($this->_currentTagContents); - $this->_currentTagContents = ''; + $value = (boolean) trim($this->_currentTagContents); $valueFlag = true; break; case 'base64': $value = base64_decode($this->_currentTagContents); - $this->_currentTagContents = ''; $valueFlag = true; break; /* Deal with stacks of arrays and structs */ @@ -255,75 +343,94 @@ class IXR_Message { break; case 'name': $this->_currentStructName[] = trim($this->_currentTagContents); - $this->_currentTagContents = ''; break; case 'methodName': $this->methodName = trim($this->_currentTagContents); - $this->_currentTagContents = ''; break; } - if ($valueFlag) { - /* - if (!is_array($value) && !is_object($value)) { - $value = trim($value); - } - */ - if (count($this->_arraystructs) > 0) { + + if($valueFlag) { + if(count($this->_arraystructs) > 0) { // Add value to struct or array - if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { + if($this->_arraystructstypes[count($this->_arraystructstypes) - 1] == 'struct') { // Add to struct - $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value; + $this->_arraystructs[count($this->_arraystructs) - 1][$this->_currentStructName[count($this->_currentStructName) - 1]] = $value; } else { // Add to array - $this->_arraystructs[count($this->_arraystructs)-1][] = $value; + $this->_arraystructs[count($this->_arraystructs) - 1][] = $value; } } else { - // Just add as a paramater + // Just add as a parameter $this->params[] = $value; } } + $this->_currentTagContents = ''; $this->_lastseen = $tag; } } - +/** + * IXR_Server + * + * @package IXR + * @since 1.5 + */ class IXR_Server { var $data; + /** @var array */ var $callbacks = array(); var $message; + /** @var array */ var $capabilities; - function IXR_Server($callbacks = false, $data = false) { + + /** + * @param array|bool $callbacks + * @param bool $data + * @param bool $wait + */ + function IXR_Server($callbacks = false, $data = false, $wait = false) { $this->setCapabilities(); - if ($callbacks) { + if($callbacks) { $this->callbacks = $callbacks; } $this->setCallbacks(); - $this->serve($data); + + if(!$wait) { + $this->serve($data); + } } + + /** + * @param bool|string $data + */ function serve($data = false) { - if (!$data) { + if(!$data) { $postData = trim(http_get_raw_post_data()); - if (!$postData) { + if(!$postData) { + header('Content-Type: text/plain'); // merged from WP #9093 die('XML-RPC server accepts POST requests only.'); } $data = $postData; } $this->message = new IXR_Message($data); - if (!$this->message->parse()) { + if(!$this->message->parse()) { $this->error(-32700, 'parse error. not well formed'); } - if ($this->message->messageType != 'methodCall') { + if($this->message->messageType != 'methodCall') { $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall'); } $result = $this->call($this->message->methodName, $this->message->params); + // Is the result an error? - if (is_a($result, 'IXR_Error')) { + if(is_a($result, 'IXR_Error')) { $this->error($result); } + // Encode the result $r = new IXR_Value($result); $resultxml = $r->getXml(); + // Create the XML $xml = <<<EOD <methodResponse> @@ -340,16 +447,23 @@ EOD; // Send it $this->output($xml); } + + /** + * @param string $methodname + * @param array $args + * @return IXR_Error|mixed + */ function call($methodname, $args) { - if (!$this->hasMethod($methodname)) { - return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.'); + if(!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method ' . $methodname . ' does not exist.'); } $method = $this->callbacks[$methodname]; + // Perform the callback and send the response # Removed for DokuWiki to have a more consistent interface # if (count($args) == 1) { - # // If only one paramater just send that instead of the whole array + # // If only one parameter just send that instead of the whole array # $args = $args[0]; # } @@ -359,16 +473,16 @@ EOD; $args = (array) $args; // Are we dealing with a function or a method? - if (substr($method, 0, 5) == 'this:') { + if(is_string($method) && substr($method, 0, 5) == 'this:') { // It's a class method - check it exists $method = substr($method, 5); - if (!method_exists($this, $method)) { - return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.'); + if(!method_exists($this, $method)) { + return new IXR_Error(-32601, 'server error. requested class method "' . $method . '" does not exist.'); } // Call the method #$result = $this->$method($args); - $result = call_user_func_array(array(&$this,$method),$args); - } elseif (substr($method, 0, 7) == 'plugin:') { + $result = call_user_func_array(array(&$this, $method), $args); + } elseif(substr($method, 0, 7) == 'plugin:') { list($pluginname, $callback) = explode(':', substr($method, 7), 2); if(!plugin_isdisabled($pluginname)) { $plugin = plugin_load('action', $pluginname); @@ -378,31 +492,49 @@ EOD; } } else { // It's a function - does it exist? - if (!function_exists($method)) { - return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.'); + if(is_array($method)) { + if(!is_callable(array($method[0], $method[1]))) { + return new IXR_Error(-32601, 'server error. requested object method "' . $method[1] . '" does not exist.'); + } + } else if(!function_exists($method)) { + return new IXR_Error(-32601, 'server error. requested function "' . $method . '" does not exist.'); } + // Call the function - #$result = $method($args); - $result = call_user_func_array($method,$args); + $result = call_user_func($method, $args); } return $result; } + /** + * @param int $error + * @param string|bool $message + */ function error($error, $message = false) { // Accepts either an error object or an error code and message - if ($message && !is_object($error)) { + if($message && !is_object($error)) { $error = new IXR_Error($error, $message); } $this->output($error->getXml()); } + + /** + * @param string $xml + */ function output($xml) { header('Content-Type: text/xml; charset=utf-8'); echo '<?xml version="1.0"?>', "\n", $xml; exit; } + + /** + * @param string $method + * @return bool + */ function hasMethod($method) { return in_array($method, array_keys($this->callbacks)); } + function setCapabilities() { // Initialises capabilities array $this->capabilities = array( @@ -420,31 +552,45 @@ EOD; ), ); } + + /** + * @return mixed + */ function getCapabilities() { return $this->capabilities; } + function setCallbacks() { $this->callbacks['system.getCapabilities'] = 'this:getCapabilities'; $this->callbacks['system.listMethods'] = 'this:listMethods'; $this->callbacks['system.multicall'] = 'this:multiCall'; } + + /** + * @return array + */ function listMethods() { // Returns a list of methods - uses array_reverse to ensure user defined // methods are listed before server defined methods return array_reverse(array_keys($this->callbacks)); } + + /** + * @param array $methodcalls + * @return array + */ function multiCall($methodcalls) { // See http://www.xmlrpc.com/discuss/msgReader$1208 $return = array(); - foreach ($methodcalls as $call) { + foreach($methodcalls as $call) { $method = $call['methodName']; $params = $call['params']; - if ($method == 'system.multicall') { + if($method == 'system.multicall') { $result = new IXR_Error(-32800, 'Recursive calls to system.multicall are forbidden'); } else { $result = $this->call($method, $params); } - if (is_a($result, 'IXR_Error')) { + if(is_a($result, 'IXR_Error')) { $return[] = array( 'faultCode' => $result->code, 'faultString' => $result->message @@ -457,10 +603,24 @@ EOD; } } +/** + * IXR_Request + * + * @package IXR + * @since 1.5 + */ class IXR_Request { + /** @var string */ var $method; + /** @var array */ var $args; + /** @var string */ var $xml; + + /** + * @param string $method + * @param array $args + */ function IXR_Request($method, $args) { $this->method = $method; $this->args = $args; @@ -471,7 +631,7 @@ class IXR_Request { <params> EOD; - foreach ($this->args as $arg) { + foreach($this->args as $arg) { $this->xml .= '<param><value>'; $v = new IXR_Value($arg); $this->xml .= $v->getXml(); @@ -479,15 +639,28 @@ EOD; } $this->xml .= '</params></methodCall>'; } + + /** + * @return int + */ function getLength() { return strlen($this->xml); } + + /** + * @return string + */ function getXml() { return $this->xml; } } /** + * IXR_Client + * + * @package IXR + * @since 1.5 + * * Changed for DokuWiki to use DokuHTTPClient * * This should be compatible to the original class, but uses DokuWiki's @@ -498,19 +671,34 @@ EOD; */ class IXR_Client extends DokuHTTPClient { var $posturl = ''; + /** @var IXR_Message|bool */ var $message = false; + + // Storage place for an error message + /** @var IXR_Error|bool */ var $xmlerror = false; - function IXR_Client($server, $path = false, $port = 80) { + /** + * @param string $server + * @param string|bool $path + * @param int $port + * @param int $timeout + */ + function IXR_Client($server, $path = false, $port = 80, $timeout = 15) { parent::__construct(); - if (!$path) { + if(!$path) { // Assume we have been given a URL instead $this->posturl = $server; - }else{ - $this->posturl = 'http://'.$server.':'.$port.$path; + } else { + $this->posturl = 'http://' . $server . ':' . $port . $path; } + $this->timeout = $timeout; } + /** + * parameters: method and arguments + * @return bool success or error + */ function query() { $args = func_get_args(); $method = array_shift($args); @@ -518,55 +706,87 @@ class IXR_Client extends DokuHTTPClient { $xml = $request->getXml(); $this->headers['Content-Type'] = 'text/xml'; - if(!$this->sendRequest($this->posturl,$xml,'POST')){ - $this->xmlerror = new IXR_Error(-32300, 'transport error - '.$this->error); + if(!$this->sendRequest($this->posturl, $xml, 'POST')) { + $this->xmlerror = new IXR_Error(-32300, 'transport error - ' . $this->error); return false; } // Check HTTP Response code - if($this->status < 200 || $this->status > 206){ - $this->xmlerror = new IXR_Error(-32300, 'transport error - HTTP status '.$this->status); + if($this->status < 200 || $this->status > 206) { + $this->xmlerror = new IXR_Error(-32300, 'transport error - HTTP status ' . $this->status); return false; } // Now parse what we've got back $this->message = new IXR_Message($this->resp_body); - if (!$this->message->parse()) { + if(!$this->message->parse()) { // XML error $this->xmlerror = new IXR_Error(-32700, 'parse error. not well formed'); return false; } + // Is the message a fault? - if ($this->message->messageType == 'fault') { + if($this->message->messageType == 'fault') { $this->xmlerror = new IXR_Error($this->message->faultCode, $this->message->faultString); return false; } + // Message must be OK return true; } + + /** + * @return mixed + */ function getResponse() { // methodResponses can only have one param - return that return $this->message->params[0]; } + + /** + * @return bool + */ function isError() { return (is_object($this->xmlerror)); } + + /** + * @return int + */ function getErrorCode() { return $this->xmlerror->code; } + + /** + * @return string + */ function getErrorMessage() { return $this->xmlerror->message; } } - +/** + * IXR_Error + * + * @package IXR + * @since 1.5 + */ class IXR_Error { var $code; var $message; + + /** + * @param int $code + * @param string $message + */ function IXR_Error($code, $message) { $this->code = $code; - $this->message = $message; + $this->message = htmlspecialchars($message); } + + /** + * @return string + */ function getXml() { $xml = <<<EOD <methodResponse> @@ -591,7 +811,12 @@ EOD; } } - +/** + * IXR_Date + * + * @package IXR + * @since 1.5 + */ class IXR_Date { var $year; var $month; @@ -599,14 +824,23 @@ class IXR_Date { var $hour; var $minute; var $second; + var $timezone; + + /** + * @param int|string $time + */ function IXR_Date($time) { // $time can be a PHP timestamp or an ISO one - if (is_numeric($time)) { + if(is_numeric($time)) { $this->parseTimestamp($time); } else { $this->parseIso($time); } } + + /** + * @param int $timestamp + */ function parseTimestamp($timestamp) { $this->year = gmdate('Y', $timestamp); $this->month = gmdate('m', $timestamp); @@ -614,43 +848,81 @@ class IXR_Date { $this->hour = gmdate('H', $timestamp); $this->minute = gmdate('i', $timestamp); $this->second = gmdate('s', $timestamp); + $this->timezone = ''; } + + /** + * @param string $iso + */ function parseIso($iso) { - if(preg_match('/^(\d\d\d\d)-?(\d\d)-?(\d\d)([T ](\d\d):(\d\d)(:(\d\d))?)?/',$iso,$match)){ - $this->year = (int) $match[1]; - $this->month = (int) $match[2]; - $this->day = (int) $match[3]; - $this->hour = (int) $match[5]; + if(preg_match('/^(\d\d\d\d)-?(\d\d)-?(\d\d)([T ](\d\d):(\d\d)(:(\d\d))?)?/', $iso, $match)) { + $this->year = (int) $match[1]; + $this->month = (int) $match[2]; + $this->day = (int) $match[3]; + $this->hour = (int) $match[5]; $this->minute = (int) $match[6]; $this->second = (int) $match[8]; } } + + /** + * @return string + */ function getIso() { - return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second; + return $this->year . $this->month . $this->day . 'T' . $this->hour . ':' . $this->minute . ':' . $this->second . $this->timezone; } + + /** + * @return string + */ function getXml() { - return '<dateTime.iso8601>'.$this->getIso().'</dateTime.iso8601>'; + return '<dateTime.iso8601>' . $this->getIso() . '</dateTime.iso8601>'; } + + /** + * @return int + */ function getTimestamp() { return gmmktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year); } } - +/** + * IXR_Base64 + * + * @package IXR + * @since 1.5 + */ class IXR_Base64 { var $data; + + /** + * @param string $data + */ function IXR_Base64($data) { $this->data = $data; } + + /** + * @return string + */ function getXml() { - return '<base64>'.base64_encode($this->data).'</base64>'; + return '<base64>' . base64_encode($this->data) . '</base64>'; } } - +/** + * IXR_IntrospectionServer + * + * @package IXR + * @since 1.5 + */ class IXR_IntrospectionServer extends IXR_Server { + /** @var array[] */ var $signatures; + /** @var string[] */ var $help; + function IXR_IntrospectionServer() { $this->setCallbacks(); $this->setCapabilities(); @@ -683,82 +955,102 @@ class IXR_IntrospectionServer extends IXR_Server { 'Returns a documentation string for the specified method' ); } + + /** + * @param string $method + * @param string $callback + * @param string[] $args + * @param string $help + */ function addCallback($method, $callback, $args, $help) { $this->callbacks[$method] = $callback; $this->signatures[$method] = $args; $this->help[$method] = $help; } + + /** + * @param string $methodname + * @param array $args + * @return IXR_Error|mixed + */ function call($methodname, $args) { // Make sure it's in an array - if ($args && !is_array($args)) { + if($args && !is_array($args)) { $args = array($args); } + // Over-rides default call method, adds signature check - if (!$this->hasMethod($methodname)) { - return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.'); + if(!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method "' . $this->message->methodName . '" not specified.'); } $method = $this->callbacks[$methodname]; $signature = $this->signatures[$methodname]; $returnType = array_shift($signature); // Check the number of arguments. Check only, if the minimum count of parameters is specified. More parameters are possible. // This is a hack to allow optional parameters... - if (count($args) < count($signature)) { + if(count($args) < count($signature)) { // print 'Num of args: '.count($args).' Num in signature: '.count($signature); return new IXR_Error(-32602, 'server error. wrong number of method parameters'); } + // Check the argument types $ok = true; $argsbackup = $args; - for ($i = 0, $j = count($args); $i < $j; $i++) { + for($i = 0, $j = count($args); $i < $j; $i++) { $arg = array_shift($args); $type = array_shift($signature); - switch ($type) { + switch($type) { case 'int': case 'i4': - if (is_array($arg) || !is_int($arg)) { + if(is_array($arg) || !is_int($arg)) { $ok = false; } break; case 'base64': case 'string': - if (!is_string($arg)) { + if(!is_string($arg)) { $ok = false; } break; case 'boolean': - if ($arg !== false && $arg !== true) { + if($arg !== false && $arg !== true) { $ok = false; } break; case 'float': case 'double': - if (!is_float($arg)) { + if(!is_float($arg)) { $ok = false; } break; case 'date': case 'dateTime.iso8601': - if (!is_a($arg, 'IXR_Date')) { + if(!is_a($arg, 'IXR_Date')) { $ok = false; } break; } - if (!$ok) { + if(!$ok) { return new IXR_Error(-32602, 'server error. invalid method parameters'); } } // It passed the test - run the "real" method call return parent::call($methodname, $argsbackup); } + + /** + * @param string $method + * @return array|IXR_Error + */ function methodSignature($method) { - if (!$this->hasMethod($method)) { - return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.'); + if(!$this->hasMethod($method)) { + return new IXR_Error(-32601, 'server error. requested method "' . $method . '" not specified.'); } // We should be returning an array of types $types = $this->signatures[$method]; $return = array(); - foreach ($types as $type) { - switch ($type) { + foreach($types as $type) { + switch($type) { case 'string': $return[] = 'string'; break; @@ -788,18 +1080,40 @@ class IXR_IntrospectionServer extends IXR_Server { } return $return; } + + /** + * @param string $method + * @return mixed + */ function methodHelp($method) { return $this->help[$method]; } } - +/** + * IXR_ClientMulticall + * + * @package IXR + * @since 1.5 + */ class IXR_ClientMulticall extends IXR_Client { + + /** @var array[] */ var $calls = array(); + + /** + * @param string $server + * @param string|bool $path + * @param int $port + */ function IXR_ClientMulticall($server, $path = false, $port = 80) { parent::IXR_Client($server, $path, $port); //$this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; } + + /** + * Add a call + */ function addCall() { $args = func_get_args(); $methodName = array_shift($args); @@ -809,6 +1123,10 @@ class IXR_ClientMulticall extends IXR_Client { ); $this->calls[] = $struct; } + + /** + * @return bool + */ function query() { // Prepare multicall, then call the parent::query() method return parent::query('system.multicall', $this->calls); diff --git a/inc/Input.class.php b/inc/Input.class.php index e7eef1c29cc0cae4c8ad540346cc4193678f8060..199994d8d7c7077185b9f6b77324ff85866c0204 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -20,6 +20,11 @@ class Input { protected $access; + /** + * @var Callable + */ + protected $filter; + /** * Intilizes the Input class and it subcomponents */ @@ -30,6 +35,32 @@ class Input { $this->server = new ServerInput(); } + /** + * Apply the set filter to the given value + * + * @param string $data + * @return string + */ + protected function applyfilter($data){ + if(!$this->filter) return $data; + return call_user_func($this->filter, $data); + } + + /** + * Return a filtered copy of the input object + * + * Expects a callable that accepts one string parameter and returns a filtered string + * + * @param Callable|string $filter + * @return Input + */ + public function filter($filter='stripctl'){ + $this->filter = $filter; + $clone = clone $this; + $this->filter = ''; + return $clone; + } + /** * Check if a parameter was set * @@ -52,7 +83,6 @@ class Input { * * @see isset * @param string $name Parameter name - * @return bool */ public function remove($name) { if(isset($this->access[$name])) { @@ -77,8 +107,9 @@ class Input { */ public function param($name, $default = null, $nonempty = false) { if(!isset($this->access[$name])) return $default; - if($nonempty && empty($this->access[$name])) return $default; - return $this->access[$name]; + $value = $this->applyfilter($this->access[$name]); + if($nonempty && empty($value)) return $default; + return $value; } /** @@ -100,7 +131,7 @@ class Input { * @param string $name Parameter name * @param mixed $default If parameter is not set, initialize with this value * @param bool $nonempty Init with $default if parameter is set but empty() - * @return &mixed + * @return mixed (reference) */ public function &ref($name, $default = '', $nonempty = false) { if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) { @@ -114,33 +145,35 @@ class Input { * Access a request parameter as int * * @param string $name Parameter name - * @param mixed $default Default to return if parameter isn't set or is an array + * @param int $default Default to return if parameter isn't set or is an array * @param bool $nonempty Return $default if parameter is set but empty() * @return int */ public function int($name, $default = 0, $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; - if($this->access[$name] === '') return $default; - if($nonempty && empty($this->access[$name])) return $default; + $value = $this->applyfilter($this->access[$name]); + if($value === '') return $default; + if($nonempty && empty($value)) return $default; - return (int) $this->access[$name]; + return (int) $value; } /** * Access a request parameter as string * * @param string $name Parameter name - * @param mixed $default Default to return if parameter isn't set or is an array + * @param string $default Default to return if parameter isn't set or is an array * @param bool $nonempty Return $default if parameter is set but empty() * @return string */ public function str($name, $default = '', $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; - if($nonempty && empty($this->access[$name])) return $default; + $value = $this->applyfilter($this->access[$name]); + if($nonempty && empty($value)) return $default; - return (string) $this->access[$name]; + return (string) $value; } /** @@ -158,7 +191,8 @@ class Input { public function valid($name, $valids, $default = null) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; // we don't allow arrays - $found = array_search($this->access[$name], $valids); + $value = $this->applyfilter($this->access[$name]); + $found = array_search($value, $valids); if($found !== false) return $valids[$found]; // return the valid value for type safety return $default; } @@ -176,10 +210,11 @@ class Input { public function bool($name, $default = false, $nonempty = false) { if(!isset($this->access[$name])) return $default; if(is_array($this->access[$name])) return $default; - if($this->access[$name] === '') return $default; - if($nonempty && empty($this->access[$name])) return $default; + $value = $this->applyfilter($this->access[$name]); + if($value === '') return $default; + if($nonempty && empty($value)) return $default; - return (bool) $this->access[$name]; + return (bool) $value; } /** @@ -210,7 +245,7 @@ class Input { * * This function returns the $INPUT object itself for easy chaining * - * @param $name + * @param string $name * @return Input */ public function extract($name){ diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index a35ec3ed08c73cfededc641847eb755ce3ade5e3..d50bad9b725636a35b96d608a3ba920533949f27 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -42,6 +42,7 @@ class JpegMeta { var $_fileName; var $_fp = null; + var $_fpout = null; var $_type = 'unknown'; var $_markers; @@ -132,6 +133,9 @@ class JpegMeta { * through one function * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array|string $fields field name or array with field names + * @return bool|string */ function getField($fields) { if(!is_array($fields)) $fields = array($fields); @@ -177,6 +181,10 @@ class JpegMeta { * through one function * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $field field name + * @param string $value + * @return bool success or fail */ function setField($field, $value) { if(strtolower(substr($field,0,5)) == 'iptc.'){ @@ -193,6 +201,9 @@ class JpegMeta { * through one function * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $field field name + * @return bool */ function deleteField($field) { if(strtolower(substr($field,0,5)) == 'iptc.'){ @@ -208,6 +219,9 @@ class JpegMeta { * Return a date field * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $field + * @return false|string */ function getDateField($field) { if (!isset($this->_info['dates'])) { @@ -225,6 +239,9 @@ class JpegMeta { * Return a file info field * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $field field name + * @return false|string */ function getFileField($field) { if (!isset($this->_info['file'])) { @@ -243,6 +260,8 @@ class JpegMeta { * * @author Andreas Gohr <andi@splitbrain.org> * @todo handle makernotes + * + * @return false|string */ function getCamera(){ $make = $this->getField(array('Exif.Make','Exif.TIFFMake')); @@ -256,6 +275,8 @@ class JpegMeta { * Return shutter speed as a ratio * * @author Joe Lapp <joe.lapp@pobox.com> + * + * @return string */ function getShutterSpeed() { if (!isset($this->_info['exif'])) { @@ -274,6 +295,9 @@ class JpegMeta { * Return an EXIF field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return false|string */ function getExifField($field) { if (!isset($this->_info['exif'])) { @@ -295,6 +319,9 @@ class JpegMeta { * Return an XMP field * * @author Hakan Sandell <hakan.sandell@mydata.se> + * + * @param string $field field name + * @return false|string */ function getXmpField($field) { if (!isset($this->_info['xmp'])) { @@ -316,6 +343,9 @@ class JpegMeta { * Return an Adobe Field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return false|string */ function getAdobeField($field) { if (!isset($this->_info['adobe'])) { @@ -337,6 +367,9 @@ class JpegMeta { * Return an IPTC field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return false|string */ function getIPTCField($field) { if (!isset($this->_info['iptc'])) { @@ -359,6 +392,10 @@ class JpegMeta { * * @author Sebastian Delmont <sdelmont@zonageek.com> * @author Joe Lapp <joe.lapp@pobox.com> + * + * @param string $field field name + * @param string $value + * @return bool */ function setExifField($field, $value) { if (!isset($this->_info['exif'])) { @@ -389,6 +426,10 @@ class JpegMeta { * Set an Adobe Field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @param string $value + * @return bool */ function setAdobeField($field, $value) { if (!isset($this->_info['adobe'])) { @@ -413,6 +454,10 @@ class JpegMeta { * dimensions * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param int $maxwidth + * @param int $maxheight + * @return float|int */ function getResizeRatio($maxwidth,$maxheight=0){ if(!$maxheight) $maxheight = $maxwidth; @@ -442,6 +487,10 @@ class JpegMeta { * Set an IPTC field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @param string $value + * @return bool */ function setIPTCField($field, $value) { if (!isset($this->_info['iptc'])) { @@ -465,6 +514,9 @@ class JpegMeta { * Delete an EXIF field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return bool */ function deleteExifField($field) { if (!isset($this->_info['exif'])) { @@ -486,6 +538,9 @@ class JpegMeta { * Delete an Adobe field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return bool */ function deleteAdobeField($field) { if (!isset($this->_info['adobe'])) { @@ -507,6 +562,9 @@ class JpegMeta { * Delete an IPTC field * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $field field name + * @return bool */ function deleteIPTCField($field) { if (!isset($this->_info['iptc'])) { @@ -527,12 +585,12 @@ class JpegMeta { /** * Get the image's title, tries various fields * - * @param int $max maximum number chars (keeps words) + * @param int $max maximum number chars (keeps words) + * @return false|string + * * @author Andreas Gohr <andi@splitbrain.org> */ function getTitle($max=80){ - $cap = ''; - // try various fields $cap = $this->getField(array('Iptc.Headline', 'Iptc.Caption', @@ -555,11 +613,14 @@ class JpegMeta { * Gather various date fields * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @return array|bool */ function getDates() { $this->_parseAll(); if ($this->_markers == null) { if (@isset($this->_info['file']['UnixTime'])) { + $dates = array(); $dates['FileModified'] = $this->_info['file']['UnixTime']; $dates['Time'] = $this->_info['file']['UnixTime']; $dates['TimeSource'] = 'FileModified'; @@ -690,6 +751,8 @@ class JpegMeta { * Get the image width, tries various fields * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @return false|string */ function getWidth() { if (!isset($this->_info['sof'])) { @@ -719,6 +782,8 @@ class JpegMeta { * Get the image height, tries various fields * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @return false|string */ function getHeight() { if (!isset($this->_info['sof'])) { @@ -748,6 +813,8 @@ class JpegMeta { * Get an dimension string for use in img tag * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @return false|string */ function getDimStr() { if ($this->_markers == null) { @@ -764,6 +831,9 @@ class JpegMeta { * Checks for an embedded thumbnail * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $which possible values: 'any', 'exif' or 'adobe' + * @return false|string */ function hasThumbnail($which = 'any') { if (($which == 'any') || ($which == 'exif')) { @@ -805,6 +875,9 @@ class JpegMeta { * Send embedded thumbnail to browser * * @author Sebastian Delmont <sdelmont@zonageek.com> + * + * @param string $which possible values: 'any', 'exif' or 'adobe' + * @return bool */ function sendThumbnail($which = 'any') { $data = null; @@ -855,6 +928,9 @@ class JpegMeta { * * @author Sebastian Delmont <sdelmont@zonageek.com> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $fileName file name or empty string for a random name + * @return bool */ function save($fileName = "") { if ($fileName == "") { @@ -1334,7 +1410,6 @@ class JpegMeta { return false; } - $pos = 0; $this->_info['jfif'] = array(); $vmaj = $this->_getByte($data, 5); @@ -1420,7 +1495,6 @@ class JpegMeta { break; default: return false; - break; } $this->_info['sof']['Format'] = $format; diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index e90b45f9994b083cc818ece475b013b206a91375..087d82c99efc85ab88fe720e1b598def7d70dcd2 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -108,6 +108,9 @@ class Mailer { /** * Callback function to automatically embed images referenced in HTML templates + * + * @param array $matches + * @return string placeholder */ protected function autoembed_cb($matches) { static $embeds = 0; @@ -130,7 +133,7 @@ class Mailer { * If an empy value is passed, the header is removed * * @param string $header the header name (no trailing colon!) - * @param string $value the value of the header + * @param string|string[] $value the value of the header * @param bool $clean remove all non-ASCII chars and line feeds? */ public function setHeader($header, $value, $clean = true) { @@ -160,6 +163,8 @@ class Mailer { * * Whatever is set here is directly passed to PHP's mail() command as last * parameter. Depending on the PHP setup this might break mailing alltogether + * + * @param string $param */ public function setParameters($param) { $this->sendparam = $param; @@ -177,7 +182,7 @@ class Mailer { * @param string $text plain text body * @param array $textrep replacements to apply on the text part * @param array $htmlrep replacements to apply on the HTML part, leave null to use $textrep - * @param array $html the HTML body, leave null to create it from $text + * @param string $html the HTML body, leave null to create it from $text * @param bool $wrap wrap the HTML in the default header/Footer */ public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) { @@ -265,6 +270,8 @@ class Mailer { * Placeholders can be used to reference embedded attachments * * You probably want to use setBody() instead + * + * @param string $html */ public function setHTML($html) { $this->html = $html; @@ -274,6 +281,8 @@ class Mailer { * Set the plain text part of the mail * * You probably want to use setBody() instead + * + * @param string $text */ public function setText($text) { $this->text = $text; @@ -283,7 +292,7 @@ class Mailer { * Add the To: recipients * * @see cleanAddress - * @param string|array $address Multiple adresses separated by commas or as array + * @param string|string[] $address Multiple adresses separated by commas or as array */ public function to($address) { $this->setHeader('To', $address, false); @@ -293,7 +302,7 @@ class Mailer { * Add the Cc: recipients * * @see cleanAddress - * @param string|array $address Multiple adresses separated by commas or as array + * @param string|string[] $address Multiple adresses separated by commas or as array */ public function cc($address) { $this->setHeader('Cc', $address, false); @@ -303,7 +312,7 @@ class Mailer { * Add the Bcc: recipients * * @see cleanAddress - * @param string|array $address Multiple adresses separated by commas or as array + * @param string|string[] $address Multiple adresses separated by commas or as array */ public function bcc($address) { $this->setHeader('Bcc', $address, false); @@ -340,8 +349,8 @@ class Mailer { * Example: * cc("föö <foo@bar.com>, me@somewhere.com","TBcc"); * - * @param string|array $addresses Multiple adresses separated by commas or as array - * @return bool|string the prepared header (can contain multiple lines) + * @param string|string[] $addresses Multiple adresses separated by commas or as array + * @return false|string the prepared header (can contain multiple lines) */ public function cleanAddress($addresses) { // No named recipients for To: in Windows (see FS#652) @@ -418,6 +427,8 @@ class Mailer { * Prepare the mime multiparts for all attachments * * Replaces placeholders in the HTML with the correct CIDs + * + * @return string mime multiparts */ protected function prepareAttachments() { $mime = ''; @@ -565,9 +576,9 @@ class Mailer { /** * Returns a complete, EOL terminated header line, wraps it if necessary * - * @param $key - * @param $val - * @return string + * @param string $key + * @param string $val + * @return string line */ protected function wrappedHeaderLine($key, $val){ return wordwrap("$key: $val", 78, MAILHEADER_EOL.' ').MAILHEADER_EOL; diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index db6a3a77cc231e88017a136726214ffb5a5cf4f3..15f896dcff09cbd305ae15dca680f35668d82897 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -16,8 +16,9 @@ class PassHash { * match true is is returned else false * * @author Andreas Gohr <andi@splitbrain.org> - * @param $clear string Clear-Text password - * @param $hash string Hash to compare against + * + * @param string $clear Clear-Text password + * @param string $hash Hash to compare against * @return bool */ function verify_hash($clear, $hash) { @@ -109,9 +110,9 @@ class PassHash { * If $salt is not null, the value is kept, but the lenght restriction is * applied (unless, $cut is false). * - * @param string &$salt The salt, pass null if you want one generated - * @param int $len The length of the salt - * @param bool $cut Apply length restriction to existing salt? + * @param string|null &$salt The salt, pass null if you want one generated + * @param int $len The length of the salt + * @param bool $cut Apply length restriction to existing salt? */ public function init_salt(&$salt, $len = 32, $cut = true) { if(is_null($salt)) { @@ -135,6 +136,7 @@ class PassHash { * @author Andreas Gohr <andi@splitbrain.org> * @author <mikey_nich at hotmail dot com> * @link http://de.php.net/manual/en/function.crypt.php#73619 + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @return string Hashed password @@ -175,6 +177,7 @@ class PassHash { * * @author <mikey_nich at hotmail dot com> * @link http://de.php.net/manual/en/function.crypt.php#73619 + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @param string $magic The hash identifier (apr1 or 1) @@ -337,6 +340,7 @@ class PassHash { * an exception. * * @link http://www.openwall.com/phpass/ + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @param string $magic The hash identifier (P or H) @@ -404,6 +408,7 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @return string Hashed password @@ -420,6 +425,7 @@ class PassHash { * This is used by the Django Python framework * * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @return string Hashed password @@ -486,6 +492,7 @@ class PassHash { * method 'A' is not supported. * * @link http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column + * * @param string $clear The clear text to hash * @param string $salt The salt to use, null for random * @return string Hashed password @@ -511,7 +518,6 @@ class PassHash { * @param string $data Message to be hashed. * @param string $key Shared secret key used for generating the HMAC variant of the message digest. * @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. - * * @return string */ public static function hmac($algo, $data, $key, $raw_output = false) { @@ -545,9 +551,8 @@ class PassHash { /** * Use DokuWiki's secure random generator if available * - * @param $min - * @param $max - * + * @param int $min + * @param int $max * @return int */ protected function random($min, $max){ diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index ffa03ee93ba812fb24342c99e8f79152be1a8f8b..c0e6869f1dbdcf4b8f450498debe73f249d0fc86 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -13,6 +13,11 @@ class RemoteAPICore { $this->api = $api; } + /** + * Returns details about the core methods + * + * @return array + */ function __getRemoteInfo() { return array( 'dokuwiki.getVersion' => array( @@ -158,19 +163,27 @@ class RemoteAPICore { ); } + /** + * @return string + */ function getVersion() { return getVersion(); } + /** + * @return int unix timestamp + */ function getTime() { return time(); } /** * Return a raw wiki page + * * @param string $id wiki page id - * @param string $rev revision number of the page - * @return page text. + * @param int|string $rev revision timestamp of the page or empty string + * @return string page text. + * @throws RemoteAccessDeniedException if no permission for page */ function rawPage($id,$rev=''){ $id = $this->resolvePageId($id); @@ -189,8 +202,11 @@ class RemoteAPICore { * Return a media file * * @author Gina Haeussge <osd@foosel.net> + * * @param string $id file id - * @return media file + * @return mixed media file + * @throws RemoteAccessDeniedException no permission for media + * @throws RemoteException not exist */ function getAttachment($id){ $id = cleanID($id); @@ -211,6 +227,9 @@ class RemoteAPICore { * Return info about a media file * * @author Gina Haeussge <osd@foosel.net> + * + * @param string $id page id + * @return array */ function getAttachmentInfo($id){ $id = cleanID($id); @@ -230,6 +249,11 @@ class RemoteAPICore { /** * Return a wiki page rendered to html + * + * @param string $id page id + * @param string|int $rev revision timestamp or empty string + * @return null|string html + * @throws RemoteAccessDeniedException no access to page */ function htmlPage($id,$rev=''){ $id = $this->resolvePageId($id); @@ -241,6 +265,8 @@ class RemoteAPICore { /** * List all pages - we use the indexer list here + * + * @return array */ function listPages(){ $list = array(); @@ -265,6 +291,12 @@ class RemoteAPICore { /** * List all pages in the given namespace (and below) + * + * @param string $ns + * @param array $opts + * $opts['depth'] recursion level, 0 for all + * $opts['hash'] do md5 sum of content? + * @return array */ function readNamespace($ns,$opts){ global $conf; @@ -281,9 +313,12 @@ class RemoteAPICore { /** * List all pages in the given namespace (and below) + * + * @param string $query + * @return array */ function search($query){ - $regex = ''; + $regex = array(); $data = ft_pageSearch($query,$regex); $pages = array(); @@ -314,6 +349,8 @@ class RemoteAPICore { /** * Returns the wiki title. + * + * @return string */ function getTitle(){ global $conf; @@ -328,6 +365,15 @@ class RemoteAPICore { * a regular expression matching their name. * * @author Gina Haeussge <osd@foosel.net> + * + * @param string $ns + * @param array $options + * $options['depth'] recursion level, 0 for all + * $options['showmsg'] shows message if invalid media id is used + * $options['pattern'] check given pattern + * $options['hash'] add hashes to result list + * @return array + * @throws RemoteAccessDeniedException no access to the media files */ function listAttachments($ns, $options = array()) { global $conf; @@ -359,6 +405,9 @@ class RemoteAPICore { /** * Return a list of backlinks + * + * @param string $id page id + * @return array */ function listBackLinks($id){ return ft_backlinks($this->resolvePageId($id)); @@ -366,6 +415,12 @@ class RemoteAPICore { /** * Return some basic data about a page + * + * @param string $id page id + * @param string|int $rev revision timestamp or empty string + * @return array + * @throws RemoteAccessDeniedException no access for page + * @throws RemoteException page not exist */ function pageInfo($id,$rev=''){ $id = $this->resolvePageId($id); @@ -395,6 +450,13 @@ class RemoteAPICore { * Save a wiki page * * @author Michael Klier <chi@chimeric.de> + * + * @param string $id page id + * @param string $text wiki text + * @param array $params parameters: summary, minor edit + * @return bool + * @throws RemoteAccessDeniedException no write access for page + * @throws RemoteException no id, empty new page or locked */ function putPage($id, $text, $params) { global $TEXT; @@ -451,6 +513,11 @@ class RemoteAPICore { /** * Appends text to a wiki page. + * + * @param string $id page id + * @param string $text wiki text + * @param array $params such as summary,minor + * @return bool|string */ function appendPage($id, $text, $params) { $currentpage = $this->rawPage($id); @@ -464,6 +531,12 @@ class RemoteAPICore { * Uploads a file to the wiki. * * Michael Klier <chi@chimeric.de> + * + * @param string $id page id + * @param string $file + * @param array $params such as overwrite + * @return false|string + * @throws RemoteException */ function putAttachment($id, $file, $params) { $id = cleanID($id); @@ -493,6 +566,11 @@ class RemoteAPICore { * Deletes a file from the wiki. * * @author Gina Haeussge <osd@foosel.net> + * + * @param string $id page id + * @return int + * @throws RemoteAccessDeniedException no permissions + * @throws RemoteException file in use or not deleted */ function deleteAttachment($id){ $id = cleanID($id); @@ -511,6 +589,9 @@ class RemoteAPICore { /** * Returns the permissions of a given wiki page + * + * @param string $id page id + * @return int permission level */ function aclCheck($id) { $id = $this->resolvePageId($id); @@ -521,6 +602,10 @@ class RemoteAPICore { * Lists all links contained in a wiki page * * @author Michael Klier <chi@chimeric.de> + * + * @param string $id page id + * @return array + * @throws RemoteAccessDeniedException no read access for page */ function listLinks($id) { $id = $this->resolvePageId($id); @@ -571,6 +656,10 @@ class RemoteAPICore { * * @author Michael Hamann <michael@content-space.de> * @author Michael Klier <chi@chimeric.de> + * + * @param int $timestamp unix timestamp + * @return array + * @throws RemoteException no valid timestamp */ function getRecentChanges($timestamp) { if(strlen($timestamp) != 10) { @@ -596,7 +685,7 @@ class RemoteAPICore { return $changes; } else { // in case we still have nothing at this point - return new RemoteException('There are no changes in the specified timeframe', 321); + throw new RemoteException('There are no changes in the specified timeframe', 321); } } @@ -605,6 +694,10 @@ class RemoteAPICore { * * @author Michael Hamann <michael@content-space.de> * @author Michael Klier <chi@chimeric.de> + * + * @param int $timestamp unix timestamp + * @return array + * @throws RemoteException no valid timestamp */ function getRecentMediaChanges($timestamp) { if(strlen($timestamp) != 10) @@ -637,6 +730,12 @@ class RemoteAPICore { * Returns a list of available revisions of a given wiki page * * @author Michael Klier <chi@chimeric.de> + * + * @param string $id page id + * @param int $first skip the first n changelog lines + * @return array + * @throws RemoteAccessDeniedException no read access for page + * @throws RemoteException empty id */ function pageVersions($id, $first) { $id = $this->resolvePageId($id); @@ -681,6 +780,7 @@ class RemoteAPICore { $pagelog->setChunkSize(1024); $info = $pagelog->getRevisionInfo($time); if(!empty($info)) { + $data = array(); $data['user'] = $info['user']; $data['ip'] = $info['ip']; $data['type'] = $info['type']; @@ -713,6 +813,9 @@ class RemoteAPICore { * * Returns an associative array with the keys locked, lockfail, unlocked and * unlockfail, each containing lists of pages. + * + * @param array[] $set list pages with array('lock' => array, 'unlock' => array) + * @return array */ function setLocks($set){ $locked = array(); @@ -747,13 +850,27 @@ class RemoteAPICore { ); } + /** + * Return API version + * + * @return int + */ function getAPIVersion(){ return DOKU_API_VERSION; } + /** + * Login + * + * @param string $user + * @param string $pass + * @return int + */ function login($user,$pass){ global $conf; + /** @var DokuWiki_Auth_Plugin $auth */ global $auth; + if(!$conf['useacl']) return 0; if(!$auth) return 0; @@ -774,6 +891,11 @@ class RemoteAPICore { return $ok; } + /** + * Log off + * + * @return int + */ function logoff(){ global $conf; global $auth; @@ -785,6 +907,12 @@ class RemoteAPICore { return 1; } + /** + * Resolve page id + * + * @param string $id page id + * @return string + */ private function resolvePageId($id) { $id = cleanID($id); if(empty($id)) { diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 6332746a688ec22f3b05953a776f62a64b528091..0325f6d4482c9676f3138622efd02474263d9eea 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -24,6 +24,8 @@ class Sitemapper { * @author Andreas Gohr * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html * @link http://www.sitemaps.org/ + * + * @return bool */ public static function generate(){ global $conf; @@ -53,7 +55,7 @@ class Sitemapper { foreach($pages as $id){ //skip hidden, non existing and restricted files if(isHiddenPage($id)) continue; - if(auth_aclcheck($id,'','') < AUTH_READ) continue; + if(auth_aclcheck($id,'',array()) < AUTH_READ) continue; $item = SitemapItem::createFromID($id); if ($item !== null) $items[] = $item; @@ -75,6 +77,7 @@ class Sitemapper { * * @param $items array The SitemapItems that shall be included in the sitemap. * @return string The sitemap XML. + * * @author Michael Hamann */ private static function getXML($items) { @@ -95,6 +98,7 @@ class Sitemapper { * Helper function for getting the path to the sitemap file. * * @return string The path to the sitemap file. + * * @author Michael Hamann */ public static function getFilePath() { @@ -123,6 +127,8 @@ class Sitemapper { * urls to ping using the SITEMAP_PING event. * * @author Michael Hamann + * + * @return bool */ public static function pingSearchEngines() { //ping search engines... @@ -168,9 +174,9 @@ class SitemapItem { /** * Create a new item. * - * @param $url string The url of the item - * @param $lastmod int Timestamp of the last modification - * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. + * @param string $url The url of the item + * @param int $lastmod Timestamp of the last modification + * @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. * @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0. */ public function __construct($url, $lastmod, $changefreq = null, $priority = null) { @@ -183,9 +189,9 @@ class SitemapItem { /** * Helper function for creating an item for a wikipage id. * - * @param $id string A wikipage id. - * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. - * @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0. + * @param string $id A wikipage id. + * @param string $changefreq How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. + * @param float|string $priority The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0. * @return SitemapItem The sitemap item. */ public static function createFromID($id, $changefreq = null, $priority = null) { diff --git a/inc/Tar.class.php b/inc/Tar.class.php index 903f7f35cd3e563011086d77f3ccbb2cb1557ed4..0dc7dace2c9bcacb7be8bede59296af86ce7a22e 100644 --- a/inc/Tar.class.php +++ b/inc/Tar.class.php @@ -53,6 +53,7 @@ class Tar { protected $file = ''; protected $comptype = Tar::COMPRESS_AUTO; + /** @var resource|int */ protected $fh; protected $memory = ''; protected $closed = true; @@ -105,6 +106,9 @@ class Tar { * * The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams. * Reopen the file with open() again if you want to do additional operations + * + * @return array + * @throws TarIOException */ public function contents() { if($this->closed || !$this->file) throw new TarIOException('Can not read from a closed archive'); @@ -270,6 +274,7 @@ class Tar { * Add a file to the current TAR archive using an existing file in the filesystem * * @todo handle directory adding + * * @param string $file the original file * @param string $name the name to use for the file in the archive * @throws TarIOException @@ -377,6 +382,10 @@ class Tar { * Returns the created in-memory archive data * * This implicitly calls close() on the Archive + * + * @param int $comptype + * @param int $complevel + * @return mixed|string */ public function getArchive($comptype = Tar::COMPRESS_AUTO, $complevel = 9) { $this->close(); @@ -395,7 +404,7 @@ class Tar { * Note: It more memory effective to specify the filename in the create() function and * let the library work on the new file directly. * - * @param $file + * @param string $file * @param int $comptype * @param int $complevel * @throws TarIOException @@ -522,7 +531,7 @@ class Tar { * Decode the given tar file header * * @param string $block a 512 byte block containign the header data - * @return array|bool + * @return false|array */ protected function parseHeader($block) { if(!$block || strlen($block) != 512) return false; @@ -536,6 +545,7 @@ class Tar { $header = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix", $block); if(!$header) return false; + $return = array(); $return['checksum'] = OctDec(trim($header['checksum'])); if($return['checksum'] != $chks) return false; @@ -570,7 +580,7 @@ class Tar { /** * Cleans up a path and removes relative parts, also strips leading slashes * - * @param string $p_dir + * @param string $path * @return string */ public function cleanPath($path) { @@ -590,7 +600,7 @@ class Tar { /** * Checks if the given compression type is available and throws an exception if not * - * @param $comptype + * @param int $comptype * @throws TarIllegalCompressionException */ protected function compressioncheck($comptype) { @@ -624,8 +634,14 @@ class Tar { } } +/** + * Class TarIOException + */ class TarIOException extends Exception { } +/** + * Class TarIllegalCompressionException + */ class TarIllegalCompressionException extends Exception { } diff --git a/inc/ZipLib.class.php b/inc/ZipLib.class.php index 918d3857955d6c04b75d26c78a990d5ceccf1a06..5b524c4ab04fde6153c7d2cad9787bf63e27561b 100644 --- a/inc/ZipLib.class.php +++ b/inc/ZipLib.class.php @@ -16,6 +16,10 @@ class ZipLib { var $old_offset = 0; var $dirs = Array("."); + /** + * @param string $zip_name filename path to file + * @return array|int + */ function get_List($zip_name) { $zip = @fopen($zip_name, 'rb'); if(!$zip) return(0); @@ -24,10 +28,12 @@ class ZipLib { @rewind($zip); @fseek($zip, $centd['offset']); + $ret = array(); for ($i=0; $i<$centd['entries']; $i++) { $header = $this->ReadCentralFileHeaders($zip); $header['index'] = $i; + $info = array(); $info['filename'] = $header['filename']; $info['stored_filename'] = $header['stored_filename']; $info['size'] = $header['size']; @@ -45,9 +51,15 @@ class ZipLib { return $ret; } + /** + * @param array $files array filled with array(string filename, string data) + * @param bool $compact + * @return array + */ function Add($files,$compact) { if(!is_array($files[0])) $files=Array($files); + $ret = array(); for($i=0;$files[$i];$i++){ $fn = $files[$i]; if(!in_Array(dirname($fn[0]),$this->dirs)) @@ -60,6 +72,10 @@ class ZipLib { /** * Zips recursively the $folder directory, from the $basedir directory + * + * @param string $folder filename path to file + * @param string|null $basedir + * @param string|null $parent */ function Compress($folder, $basedir=null, $parent=null) { $full_path = $basedir."/".$parent.$folder; @@ -70,6 +86,7 @@ class ZipLib { } $dir = new DirectoryIterator($full_path); foreach($dir as $file) { + /** @var DirectoryIterator $file */ if(!$file->isDot()) { $filename = $file->getFilename(); if($file->isDir()) { @@ -84,6 +101,8 @@ class ZipLib { /** * Returns the Zip file + * + * @return string */ function get_file() { $data = implode('', $this -> datasec); @@ -94,6 +113,9 @@ class ZipLib { pack('V', strlen($ctrldir)) . pack('V', strlen($data)) . "\x00\x00"; } + /** + * @param string $name the name of the directory + */ function add_dir($name) { $name = str_replace("\\", "/", $name); $fr = "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00"; @@ -117,8 +139,13 @@ class ZipLib { /** * Add a file named $name from a string $data + * + * @param string $data + * @param string $name filename + * @param bool $compact + * @return bool */ - function add_File($data, $name, $compact = 1) { + function add_File($data, $name, $compact = true) { $name = str_replace('\\', '/', $name); $dtime = dechex($this->DosTime()); @@ -166,6 +193,9 @@ class ZipLib { return true; } + /** + * @return int + */ function DosTime() { $timearray = getdate(); if ($timearray['year'] < 1980) { @@ -186,10 +216,14 @@ class ZipLib { /** * Extract a zip file $zn to the $to directory + * + * @param string $zn filename + * @param string $to filename path to file + * @param array $index + * @return array|int */ function Extract ( $zn, $to, $index = Array(-1) ) { if(!@is_dir($to)) $this->_mkdir($to); - $ok = 0; $zip = @fopen($zn,'rb'); if(!$zip) return(-1); $cdir = $this->ReadCentralDir($zip,$zn); @@ -203,6 +237,7 @@ class ZipLib { return(-1); } + $stat = array(); for ($i=0; $i<$cdir['entries']; $i++) { @fseek($zip, $pos_entry); $header = $this->ReadCentralFileHeaders($zip); @@ -218,6 +253,11 @@ class ZipLib { return $stat; } + /** + * @param resource $zip + * @param array $header + * @return array + */ function ReadFileHeader($zip, $header) { $binary_data = fread($zip, 30); $data = unpack('vchk/vid/vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $binary_data); @@ -254,6 +294,10 @@ class ZipLib { return $header; } + /** + * @param resource $zip + * @return array + */ function ReadCentralFileHeaders($zip){ $binary_data = fread($zip, 46); $header = unpack('vchkid/vid/vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $binary_data); @@ -295,6 +339,11 @@ class ZipLib { return $header; } + /** + * @param resource $zip + * @param string $zip_name filename path to file + * @return array + */ function ReadCentralDir($zip,$zip_name) { $size = filesize($zip_name); if ($size < 277){ @@ -320,6 +369,7 @@ class ZipLib { $data=unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', fread($zip, 18)); + $centd = array(); if ($data['comment_size'] != 0){ $centd['comment'] = fread($zip, $data['comment_size']); } else { @@ -334,6 +384,12 @@ class ZipLib { return $centd; } + /** + * @param array $header + * @param string $to filename path to file + * @param resource $zip + * @return bool|int + */ function ExtractFile($header,$to,$zip) { $header = $this->readfileheader($zip, $header); @@ -414,14 +470,20 @@ class ZipLib { * centralize mkdir calls and use dokuwiki io functions * * @author Christopher Smith <chris@jalakai.co.uk> + * + * @param string $d filename path to file + * @return bool|int|string */ function _mkdir($d) { return io_mkdir_p($d); } - + /** + * @param string $zn + * @param string $name + * @return null|string + */ function ExtractStr($zn, $name) { - $ok = 0; $zip = @fopen($zn,'rb'); if(!$zip) return(null); $cdir = $this->ReadCentralDir($zip,$zn); @@ -445,8 +507,13 @@ class ZipLib { return null; } + /** + * @param array $header + * @param resource $zip + * @return null|string + */ function ExtractStrFile($header,$zip) { - $hdr = $this->readfileheader($zip); + $hdr = $this->readfileheader($zip, $header); $binary_data = ''; if (!($header['external']==0x41FF0010) && !($header['external']==16)) { if ($header['compression']==0) { @@ -484,6 +551,10 @@ class ZipLib { return null; } + /** + * @param string $val + * @return int|string + */ function _ret_bytes($val) { $val = trim($val); $last = $val{strlen($val)-1}; diff --git a/inc/actions.php b/inc/actions.php index ef09a0dc7a0a3daccb2bcfe515ae0fefd930949a..709c19dddcd3383c0d58a89166098513dcf8f088 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -200,6 +200,7 @@ function act_dispatch(){ global $license; //call template FIXME: all needed vars available? + $headers = array(); $headers[] = 'Content-Type: text/html; charset=utf-8'; trigger_event('ACTION_HEADERS_SEND',$headers,'act_sendheaders'); @@ -221,6 +222,9 @@ function act_sendheaders($headers) { * Sanitize the action command * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array|string $act + * @return string */ function act_clean($act){ // check if the action was given as array key @@ -245,6 +249,9 @@ function act_clean($act){ * Add all allowed commands here. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array|string $act + * @return string */ function act_validate($act) { global $conf; @@ -284,10 +291,12 @@ function act_validate($act) { * Run permissionchecks * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $act action command + * @return string action command */ function act_permcheck($act){ global $INFO; - global $conf; if(in_array($act,array('save','preview','edit','recover'))){ if($INFO['exists']){ @@ -330,6 +339,9 @@ function act_permcheck($act){ * Handle 'draftdel' * * Deletes the draft for the current page and user + * + * @param string $act action command + * @return string action command */ function act_draftdel($act){ global $INFO; @@ -342,6 +354,9 @@ function act_draftdel($act){ * Saves a draft on preview * * @todo this currently duplicates code from ajax.php :-/ + * + * @param string $act action command + * @return string action command */ function act_draftsave($act){ global $INFO; @@ -372,6 +387,9 @@ function act_draftsave($act){ * returns a new action. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $act action command + * @return string action command */ function act_save($act){ global $ID; @@ -394,7 +412,7 @@ function act_save($act){ return 'conflict'; //save it - saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$INPUT->bool('minor')); //use pretty mode for con + saveWikiText($ID,con($PRE,$TEXT,$SUF,true),$SUM,$INPUT->bool('minor')); //use pretty mode for con //unlock it unlock($ID); @@ -410,6 +428,9 @@ function act_save($act){ * Revert to a certain revision * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $act action command + * @return string action command */ function act_revert($act){ global $ID; @@ -457,6 +478,9 @@ function act_revert($act){ * Do a redirect after receiving post data * * Tries to add the section id as hash mark after section editing + * + * @param string $id page id + * @param string $preact action command before redirect */ function act_redirect($id,$preact){ global $PRE; @@ -478,7 +502,7 @@ function act_redirect($id,$preact){ /** * Execute the redirect * - * @param array $opts id and fragment for the redirect + * @param array $opts id and fragment for the redirect and the preact */ function act_redirect_execute($opts){ $go = wl($opts['id'],'',true); @@ -492,6 +516,9 @@ function act_redirect_execute($opts){ * Handle 'login', 'logout' * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $act action command + * @return string action command */ function act_auth($act){ global $ID; @@ -527,6 +554,9 @@ function act_auth($act){ * Handle 'edit', 'preview', 'recover' * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $act action command + * @return string action command */ function act_edit($act){ global $ID; @@ -591,6 +621,9 @@ function act_edit($act){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Klier <chi@chimeric.de> + * + * @param string $act action command + * @return string action command */ function act_export($act){ global $ID; @@ -600,7 +633,6 @@ function act_export($act){ $pre = ''; $post = ''; - $output = ''; $headers = array(); // search engines: never cache exported docs! (Google only currently) @@ -644,7 +676,7 @@ function act_export($act){ $output = p_wiki_xhtml($ID,$REV,false); break; default: - $output = p_cached_output(wikiFN($ID,$REV), $mode); + $output = p_cached_output(wikiFN($ID,$REV), $mode, $ID); $headers = p_get_metadata($ID,"format $mode"); break; } @@ -672,6 +704,8 @@ function act_export($act){ * Handle sitemap delivery * * @author Michael Hamann <michael@content-space.de> + * + * @param string $act action command */ function act_sitemap($act) { global $conf; @@ -720,6 +754,10 @@ function act_sitemap($act) { * Throws exception on error. * * @author Adrian Lang <lang@cosmocode.de> + * + * @param string $act action command + * @return string action command + * @throws Exception if (un)subscribing fails */ function act_subscription($act){ global $lang; @@ -779,6 +817,9 @@ function act_subscription($act){ * default action for the event ACTION_HANDLE_SUBSCRIBE. * * @author Adrian Lang <lang@cosmocode.de> + * + * @param array &$params the parameters: target, style and action + * @throws Exception */ function subscription_handle_post(&$params) { global $INFO; diff --git a/inc/auth.php b/inc/auth.php index e224b2fb53c697e9f6047271c8acf60a433398fc..d51534e676419f2c3d9d95667a584eb94513da4e 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -95,9 +95,10 @@ function auth_setup() { $INPUT->set('http_credentials', true); } - // apply cleaning + // apply cleaning (auth specific user names, remove control chars) if (true === $auth->success) { - $INPUT->set('u', $auth->cleanUser($INPUT->str('u'))); + $INPUT->set('u', $auth->cleanUser(stripctl($INPUT->str('u')))); + $INPUT->set('p', stripctl($INPUT->str('p'))); } if($INPUT->str('authtok')) { @@ -126,6 +127,7 @@ function auth_setup() { * Loads the ACL setup and handle user wildcards * * @author Andreas Gohr <andi@splitbrain.org> + * * @return array */ function auth_loadACL() { @@ -172,7 +174,7 @@ function auth_loadACL() { /** * Event hook callback for AUTH_LOGIN_CHECK * - * @param $evdata + * @param array $evdata * @return bool */ function auth_login_wrapper($evdata) { @@ -228,7 +230,7 @@ function auth_login($user, $pass, $sticky = false, $silent = false) { if(!empty($user)) { //usual login - if($auth->checkPass($user, $pass)) { + if(!empty($pass) && $auth->checkPass($user, $pass)) { // make logininfo globally available $INPUT->server->set('REMOTE_USER', $user); $secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session @@ -279,8 +281,9 @@ function auth_login($user, $pass, $sticky = false, $silent = false) { * token is correct. Will exit with a 401 Status if not. * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $token The authentication token - * @return boolean true (or will exit on failure) + * @return boolean|null true (or will exit on failure) */ function auth_validateToken($token) { if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) { @@ -306,6 +309,7 @@ function auth_validateToken($token) { * NOTE: this is completely unrelated to the getSecurityToken() function * * @author Andreas Gohr <andi@splitbrain.org> + * * @return string The auth token */ function auth_createToken() { @@ -334,7 +338,6 @@ function auth_browseruid() { $ip = clientIP(true); $uid = ''; $uid .= $INPUT->server->str('HTTP_USER_AGENT'); - $uid .= $INPUT->server->str('HTTP_ACCEPT_ENCODING'); $uid .= $INPUT->server->str('HTTP_ACCEPT_CHARSET'); $uid .= substr($ip, 0, strpos($ip, '.')); $uid = strtolower($uid); @@ -350,6 +353,7 @@ function auth_browseruid() { * and stored in this file. * * @author Andreas Gohr <andi@splitbrain.org> + * * @param bool $addsession if true, the sessionid is added to the salt * @param bool $secure if security is more important than keeping the old value * @return string @@ -377,6 +381,7 @@ function auth_cookiesalt($addsession = false, $secure = false) { * @author Mark Seecof * @author Michael Hamann <michael@content-space.de> * @link http://www.php.net/manual/de/function.mt-rand.php#83655 + * * @param int $length number of bytes to get * @return string binary random strings */ @@ -443,6 +448,7 @@ function auth_randombytes($length) { * * @author Michael Samuel * @author Michael Hamann <michael@content-space.de> + * * @param int $min * @param int $max * @return int @@ -514,6 +520,7 @@ function auth_decrypt($ciphertext, $secret) { * off. It also clears session data. * * @author Andreas Gohr <andi@splitbrain.org> + * * @param bool $keepbc - when true, the breadcrumb data is not cleared */ function auth_logoff($keepbc = false) { @@ -554,6 +561,7 @@ function auth_logoff($keepbc = false) { * * @author Andreas Gohr <andi@splitbrain.org> * @see auth_isadmin + * * @param string $user Username * @param array $groups List of groups the user is in * @param bool $adminonly when true checks if user is admin @@ -598,6 +606,7 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false) { * * @author Andreas Gohr <andi@splitbrain.org> * @see auth_ismanager() + * * @param string $user Username * @param array $groups List of groups the user is in * @return bool @@ -612,9 +621,9 @@ function auth_isadmin($user = null, $groups = null) { * * Note: all input should NOT be nameencoded. * - * @param $memberlist string commaseparated list of allowed users and groups - * @param $user string user to match against - * @param $groups array groups the user is member of + * @param string $memberlist commaseparated list of allowed users and groups + * @param string $user user to match against + * @param array $groups groups the user is member of * @return bool true for membership acknowledged */ function auth_isMember($memberlist, $user, array $groups) { @@ -638,6 +647,7 @@ function auth_isMember($memberlist, $user, array $groups) { // compare cleaned values foreach($members as $member) { + if($member == '@ALL' ) return true; if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member); if($member[0] == '@') { $member = $auth->cleanGroup(substr($member, 1)); @@ -676,6 +686,7 @@ function auth_quickaclcheck($id) { * Returns the maximum rights a user has for the given ID or its namespace * * @author Andreas Gohr <andi@splitbrain.org> + * * @triggers AUTH_ACL_CHECK * @param string $id page ID (needs to be resolved and cleaned) * @param string $user Username @@ -698,6 +709,7 @@ function auth_aclcheck($id, $user, $groups) { * DO NOT CALL DIRECTLY, use auth_aclcheck() instead * * @author Andreas Gohr <andi@splitbrain.org> + * * @param array $data event data * @return int permission level */ @@ -830,6 +842,10 @@ function auth_aclcheck_cb($data) { * * @author Andreas Gohr <gohr@cosmocode.de> * @see rawurldecode() + * + * @param string $name + * @param bool $skip_group + * @return string */ function auth_nameencode($name, $skip_group = false) { global $cache_authname; @@ -911,6 +927,7 @@ function auth_pwgen($foruser = '') { * Sends a password to the given user * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $user Login name of the user * @param string $password The new password in clear text * @return bool true on success @@ -922,7 +939,7 @@ function auth_sendPassword($user, $password) { if(!$auth) return false; $user = $auth->cleanUser($user); - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, $requireGroups = false); if(!$userinfo['mail']) return false; @@ -946,6 +963,7 @@ function auth_sendPassword($user, $password) { * This registers a new user - Data is read directly from $_POST * * @author Andreas Gohr <andi@splitbrain.org> + * * @return bool true on success, false on any error */ function register() { @@ -1127,6 +1145,7 @@ function auth_deleteprofile(){ } } + $deleted = array(); $deleted[] = $INPUT->server->str('REMOTE_USER'); if($auth->triggerUserMod('delete', array($deleted))) { // force and immediate logout including removing the sticky cookie @@ -1184,7 +1203,7 @@ function act_resendpwd() { } $user = io_readfile($tfile); - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, $requireGroups = false); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; @@ -1236,7 +1255,7 @@ function act_resendpwd() { $user = trim($auth->cleanUser($INPUT->post->str('login'))); } - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, $requireGroups = false); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; @@ -1277,6 +1296,7 @@ function act_resendpwd() { * is chosen. * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $clear The clear text password * @param string $method The hashing method * @param string $salt A salt, null for random @@ -1301,6 +1321,7 @@ function auth_cryptPassword($clear, $method = '', $salt = null) { * Verifies a cleartext password against a crypted hash * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $clear The clear text password * @param string $crypt The hash to compare with * @return bool true if both match diff --git a/inc/blowfish.php b/inc/blowfish.php index bcf5804a2ffc522de6036dbd42a6e77577cbcd8e..7499515bc2bc79198007c23a79d7dae016c24372 100644 --- a/inc/blowfish.php +++ b/inc/blowfish.php @@ -356,7 +356,7 @@ class Horde_Cipher_blowfish * Encrypt a block on data. * * @param String $block The data to encrypt - * @param optional String $key The key to use + * @param String $key optional The key to use * * @return String the encrypted output */ @@ -404,8 +404,8 @@ class Horde_Cipher_blowfish /** * Decrypt a block on data. * - * @param String $block The data to decrypt - * @param optional String $key The key to use + * @param String $block The data to decrypt + * @param String $key optional The key to use * * @return String the decrypted output */ @@ -452,6 +452,7 @@ class Horde_Cipher_blowfish /** * Converts a text key into an array. * + * @param string $key * @return array The key. */ function _formatKey($key) { @@ -464,8 +465,8 @@ class Horde_Cipher_blowfish /** * Encryption using blowfish algorithm * - * @param string original data - * @param string the secret + * @param string $data original data + * @param string $secret the secret * * @return string the encrypted result * @@ -493,8 +494,8 @@ function PMA_blowfish_encrypt($data, $secret) { /** * Decryption using blowfish algorithm * - * @param string encrypted data - * @param string the secret + * @param string $encdata encrypted data + * @param string $secret the secret * * @return string original data * diff --git a/inc/cache.php b/inc/cache.php index 6817e771ba205b9c2ed63895e7de911842048987..edf3941342599bac5089c6c9a2aa65eb1fc0a3ab 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -50,7 +50,7 @@ class cache { $this->_addDependencies(); if ($this->_event) { - return $this->_stats(trigger_event($this->_event,$this,array($this,'_useCache'))); + return $this->_stats(trigger_event($this->_event, $this, array($this,'_useCache'))); } else { return $this->_stats($this->_useCache()); } @@ -316,7 +316,7 @@ class cache_instructions extends cache_parser { * retrieve the cached data * * @param bool $clean true to clean line endings, false to leave line endings alone - * @return string cache contents + * @return array cache contents */ public function retrieveCache($clean=true) { $contents = io_readFile($this->cache, false); @@ -326,7 +326,7 @@ class cache_instructions extends cache_parser { /** * cache $instructions * - * @param string $instructions the instruction to be cached + * @param array $instructions the instruction to be cached * @return bool true on success, false otherwise */ public function storeCache($instructions) { diff --git a/inc/changelog.php b/inc/changelog.php index 8c14f21b06ae980d3eea0967efcfb825e84892b0..c2d3cb489bcffeb6f3cf1d7e34422880c23c16d6 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -83,17 +83,19 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr 'extra' => str_replace($strip, '', $extra) ); + $wasCreated = ($type===DOKU_CHANGE_TYPE_CREATE); + $wasReverted = ($type===DOKU_CHANGE_TYPE_REVERT); // update metadata if (!$wasRemoved) { $oldmeta = p_read_metadata($id); $meta = array(); - if (!$INFO['exists'] && empty($oldmeta['persistent']['date']['created'])){ // newly created + if ($wasCreated && empty($oldmeta['persistent']['date']['created'])){ // newly created $meta['date']['created'] = $created; if ($user){ $meta['creator'] = $INFO['userinfo']['name']; $meta['user'] = $user; } - } elseif (!$INFO['exists'] && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored + } elseif (($wasCreated || $wasReverted) && !empty($oldmeta['persistent']['date']['created'])) { // re-created / restored $meta['date']['created'] = $oldmeta['persistent']['date']['created']; $meta['date']['modified'] = $created; // use the files ctime here $meta['creator'] = $oldmeta['persistent']['creator']; @@ -725,8 +727,10 @@ abstract class ChangeLog { * If file larger than $chuncksize, only chunck is read that could contain $rev. * * @param int $rev revision timestamp - * @return array(fp, array(changeloglines), $head, $tail, $eof)|bool - * returns false when not succeed. fp only defined for chuck reading, needs closing. + * @return array|false + * if success returns array(fp, array(changeloglines), $head, $tail, $eof) + * where fp only defined for chuck reading, needs closing. + * otherwise false */ protected function readloglines($rev) { $file = $this->getChangelogFilename(); @@ -845,6 +849,25 @@ abstract class ChangeLog { public function isCurrentRevision($rev) { return $rev == @filemtime($this->getFilename()); } + + /** + * Return an existing revision for a specific date which is + * the current one or younger or equal then the date + * + * @param string $id + * @param number $date_at timestamp + * @return string revision ('' for current) + */ + function getLastRevisionAt($date_at){ + //requested date_at(timestamp) younger or equal then modified_time($this->id) => load current + if($date_at >= @filemtime($this->getFilename())) { + return ''; + } else if ($rev = $this->getRelativeRevision($date_at+1, -1)) { //+1 to get also the requested date revision + return $rev; + } else { + return false; + } + } /** * Returns the next lines of the changelog of the chunck before head or after tail @@ -1072,3 +1095,4 @@ function getRevisions($id, $first, $num, $chunk_size = 8192, $media = false) { } return $changelog->getRevisions($first, $num); } + diff --git a/inc/cli.php b/inc/cli.php index 25bfddf7db7f1afbc14454df05d9c17f176bf216..14e2c0c8d40c3363200bca9379e31470c516205e 100644 --- a/inc/cli.php +++ b/inc/cli.php @@ -108,7 +108,7 @@ abstract class DokuCLI { /** * Print an error message * - * @param $string + * @param string $string */ public function error($string) { $this->colors->ptln("E: $string", 'red', STDERR); @@ -117,7 +117,7 @@ abstract class DokuCLI { /** * Print a success message * - * @param $string + * @param string $string */ public function success($string) { $this->colors->ptln("S: $string", 'green', STDERR); @@ -126,7 +126,7 @@ abstract class DokuCLI { /** * Print an info message * - * @param $string + * @param string $string */ public function info($string) { $this->colors->ptln("I: $string", 'cyan', STDERR); @@ -199,8 +199,8 @@ class DokuCLI_Colors { /** * Convenience function to print a line in a given color * - * @param $line - * @param $color + * @param string $line + * @param string $color * @param resource $channel */ public function ptln($line, $color, $channel = STDOUT) { @@ -470,8 +470,8 @@ class DokuCLI_Options { * Can only be used after parseOptions() has been run * * @param string $option - * @param mixed $default what to return if the option was not set - * @return mixed + * @param bool|string $default what to return if the option was not set + * @return bool|string */ public function getOpt($option, $default = false) { if(isset($this->options[$option])) return $this->options[$option]; @@ -593,8 +593,8 @@ class DokuCLI_Options { /** * Displays text in multiple word wrapped columns * - * @param array $widths list of column widths (in characters) - * @param array $texts list of texts for each column + * @param int[] $widths list of column widths (in characters) + * @param string[] $texts list of texts for each column * @return string */ private function tableFormat($widths, $texts) { @@ -640,6 +640,11 @@ class DokuCLI_Exception extends Exception { const E_OPT_ABIGUOUS = 4; //Option abiguous const E_ARG_READ = 5; //Could not read argv + /** + * @param string $message The Exception message to throw. + * @param int $code The Exception code + * @param Exception $previous The previous exception used for the exception chaining. + */ public function __construct($message = "", $code = 0, Exception $previous = null) { if(!$code) $code = DokuCLI_Exception::E_ANY; parent::__construct($message, $code, $previous); diff --git a/inc/cliopts.php b/inc/cliopts.php index c75a5a93b4ccfb37b29d5659f70f47ed5d788271..7d71c7dc922431d83d18e8b17a8be3aa71dbad9e 100644 --- a/inc/cliopts.php +++ b/inc/cliopts.php @@ -36,9 +36,9 @@ if (version_compare(phpversion(), '4.3.0', '<') || php_sapi_name() == 'cgi') { // PHP ini settings set_time_limit(0); - ini_set('track_errors', true); - ini_set('html_errors', false); - ini_set('magic_quotes_runtime', false); + ini_set('track_errors', "1"); + ini_set('html_errors', "0"); + ini_set('magic_quotes_runtime', "0"); // Define stream constants define('STDIN', fopen('php://stdin', 'r')); @@ -78,7 +78,7 @@ class Doku_Cli_Opts { * @param string $bin_file executing file name - this MUST be passed the __FILE__ constant * @param string $short_options short options * @param array $long_options (optional) long options - * @return Doku_Cli_Opts_Container or Doku_Cli_Opts_Error + * @return Doku_Cli_Opts_Container|Doku_Cli_Opts_Error */ function & getOptions($bin_file, $short_options, $long_options = null) { $args = Doku_Cli_Opts::readPHPArgv(); diff --git a/inc/common.php b/inc/common.php index 8c9956018879baa317dd283bcd27faa277edf326..2c9359a0c5d7ec3b4351f03f98a8dec3957a2b73 100644 --- a/inc/common.php +++ b/inc/common.php @@ -49,7 +49,7 @@ function ptln($string, $indent = 0) { * * @author Andreas Gohr <andi@splitbrain.org> * - * @param $string string being stripped + * @param string $string being stripped * @return string */ function stripctl($string) { @@ -62,6 +62,7 @@ function stripctl($string) { * @author Andreas Gohr <andi@splitbrain.org> * @link http://en.wikipedia.org/wiki/Cross-site_request_forgery * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html + * * @return string */ function getSecurityToken() { @@ -95,7 +96,7 @@ function checkSecurityToken($token = null) { * @author Andreas Gohr <andi@splitbrain.org> * * @param bool $print if true print the field, otherwise html of the field is returned - * @return void|string html of hidden form field + * @return string html of hidden form field */ function formSecurityToken($print = true) { $ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n"; @@ -120,6 +121,7 @@ function basicinfo($id, $htmlClient=true){ global $INPUT; // set info about manager/admin status. + $info = array(); $info['isadmin'] = false; $info['ismanager'] = false; if($INPUT->server->has('REMOTE_USER')) { @@ -335,7 +337,7 @@ function buildAttributes($params, $skipempty = false) { * * @author Andreas Gohr <andi@splitbrain.org> * - * @return array(pageid=>name, ... ) + * @return string[] with the data: array(pageid=>name, ... ) */ function breadcrumbs() { // we prepare the breadcrumbs early for quick session closing @@ -438,6 +440,8 @@ function idfilter($id, $ue = true) { function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&') { global $conf; if(is_array($urlParameters)) { + if(isset($urlParameters['rev']) && !$urlParameters['rev']) unset($urlParameters['rev']); + if(isset($urlParameters['at']) && $conf['date_at_format']) $urlParameters['at'] = date($conf['date_at_format'],$urlParameters['at']); $urlParameters = buildURLparams($urlParameters, $separator); } else { $urlParameters = str_replace(',', $separator, $urlParameters); @@ -544,6 +548,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) if(empty($more['w'])) unset($more['w']); if(empty($more['h'])) unset($more['h']); if(isset($more['id']) && $direct) unset($more['id']); + if(isset($more['rev']) && !$more['rev']) unset($more['rev']); $more = buildURLparams($more, $sep); } else { $matches = array(); @@ -685,6 +690,7 @@ function checkwordblock($text = '') { } if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) { // prepare event data + $data = array(); $data['matches'] = $matches; $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR'); if($INPUT->server->str('REMOTE_USER')) { @@ -968,7 +974,7 @@ function rawLocale($id, $ext = 'txt') { * @author Andreas Gohr <andi@splitbrain.org> * * @param string $id page id - * @param string $rev timestamp when a revision of wikitext is desired + * @param string|int $rev timestamp when a revision of wikitext is desired * @return string */ function rawWiki($id, $rev = '') { @@ -1108,7 +1114,7 @@ function parsePageTemplate(&$data) { * @param string $range in form "from-to" * @param string $id page id * @param string $rev optional, the revision timestamp - * @return array with three slices + * @return string[] with three slices */ function rawWikiSlices($range, $id, $rev = '') { $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev); @@ -1119,6 +1125,7 @@ function rawWikiSlices($range, $id, $rev = '') { $from = !$from ? 0 : ($from - 1); $to = !$to ? strlen($text) : ($to - 1); + $slices = array(); $slices[0] = substr($text, 0, $from); $slices[1] = substr($text, $from, $to - $from); $slices[2] = substr($text, $to); @@ -1293,7 +1300,7 @@ function saveOldRevision($id) { * @param int|string $rev Old page revision * @param string $summary What changed * @param boolean $minor Is this a minor edit? - * @param array $replace Additional string substitutions, @KEY@ to be replaced by value + * @param string[] $replace Additional string substitutions, @KEY@ to be replaced by value * @return bool * * @author Andreas Gohr <andi@splitbrain.org> @@ -1373,8 +1380,8 @@ function getGoogleQuery() { /** * Return the human readable size of a file * - * @param int $size A file size - * @param int $dec A number of decimal places + * @param int $size A file size + * @param int $dec A number of decimal places * @return string human readable size * * @author Martin Benjamin <b.martin@cybernet.ch> @@ -1457,7 +1464,7 @@ function dformat($dt = null, $format = '') { * @author <ungu at terong dot com> * @link http://www.php.net/manual/en/function.date.php#54072 * - * @param int $int_date: current date in UNIX timestamp + * @param int $int_date current date in UNIX timestamp * @return string */ function date_iso8601($int_date) { @@ -1583,7 +1590,7 @@ function shorten($keep, $short, $max, $min = 9, $char = '…') { } /** - * Return the users realname or e-mail address for use + * Return the users real name or e-mail address for use * in page footer and recent changes pages * * @param string|null $username or null when currently logged-in user should be used @@ -1641,22 +1648,20 @@ function userlink($username = null, $textonly = false) { $evt = new Doku_Event('COMMON_USER_LINK', $data); if($evt->advise_before(true)) { if(empty($data['name'])) { - if($conf['showuseras'] == 'loginname') { - $data['name'] = $textonly ? $data['username'] : hsc($data['username']); - } else { - if($auth) $info = $auth->getUserData($username); - if(isset($info) && $info) { - switch($conf['showuseras']) { - case 'username': - case 'username_link': - $data['name'] = $textonly ? $info['name'] : hsc($info['name']); - break; - case 'email': - case 'email_link': - $data['name'] = obfuscate($info['mail']); - break; - } + if($auth) $info = $auth->getUserData($username); + if($conf['showuseras'] != 'loginname' && isset($info) && $info) { + switch($conf['showuseras']) { + case 'username': + case 'username_link': + $data['name'] = $textonly ? $info['name'] : hsc($info['name']); + break; + case 'email': + case 'email_link': + $data['name'] = obfuscate($info['mail']); + break; } + } else { + $data['name'] = $textonly ? $data['username'] : hsc($data['username']); } } @@ -1823,6 +1828,8 @@ function send_redirect($url) { } else { header('Location: '.$url); } + + if(defined('DOKU_UNITTEST')) return; // no exits during unit tests exit; } @@ -1913,7 +1920,7 @@ function set_doku_pref($pref, $val) { /** * Strips source mapping declarations from given text #601 * - * @param &string $text reference to the CSS or JavaScript code to clean + * @param string &$text reference to the CSS or JavaScript code to clean */ function stripsourcemaps(&$text){ $text = preg_replace('/^(\/\/|\/\*)[@#]\s+sourceMappingURL=.*?(\*\/)?$/im', '\\1\\2', $text); diff --git a/inc/compatibility.php b/inc/compatibility.php index ae780e5ac88fa3ca26d6408d8b766e967674db43..cb865a2d71f8e84c710bab21bcac84408219bf46 100644 --- a/inc/compatibility.php +++ b/inc/compatibility.php @@ -33,4 +33,50 @@ if(!function_exists('ctype_digit')) { if(preg_match('/^\d+$/', $text)) return true; return false; } +} + +if(!function_exists('gzopen') && function_exists('gzopen64')) { + /** + * work around for PHP compiled against certain zlib versions #865 + * + * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists + * + * @param string $filename + * @param string $mode + * @param int $use_include_path + * @return mixed + */ + function gzopen($filename, $mode, $use_include_path = 0) { + return gzopen64($filename, $mode, $use_include_path); + } +} + +if(!function_exists('gzseek') && function_exists('gzseek64')) { + /** + * work around for PHP compiled against certain zlib versions #865 + * + * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists + * + * @param resource $zp + * @param int $offset + * @param int $whence + * @return int + */ + function gzseek($zp, $offset, $whence = SEEK_SET) { + return gzseek64($zp, $offset, $whence); + } +} + +if(!function_exists('gztell') && function_exists('gztell64')) { + /** + * work around for PHP compiled against certain zlib versions #865 + * + * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists + * + * @param resource $zp + * @return int + */ + function gztell($zp) { + return gztell64($zp); + } } \ No newline at end of file diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 2c4f1612bec7f1430213fa30e31d4f10f8946f5b..a6dfadc80351c3b25f9a3a5851a9a83c248e1f6d 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -8,71 +8,75 @@ $config_cascade = array_merge( array( 'main' => array( - 'default' => array(DOKU_CONF.'dokuwiki.php'), - 'local' => array(DOKU_CONF.'local.php'), - 'protected' => array(DOKU_CONF.'local.protected.php'), - ), - 'acronyms' => array( - 'default' => array(DOKU_CONF.'acronyms.conf'), - 'local' => array(DOKU_CONF.'acronyms.local.conf'), - ), - 'entities' => array( - 'default' => array(DOKU_CONF.'entities.conf'), - 'local' => array(DOKU_CONF.'entities.local.conf'), - ), + 'default' => array(DOKU_CONF . 'dokuwiki.php'), + 'local' => array(DOKU_CONF . 'local.php'), + 'protected' => array(DOKU_CONF . 'local.protected.php'), + ), + 'acronyms' => array( + 'default' => array(DOKU_CONF . 'acronyms.conf'), + 'local' => array(DOKU_CONF . 'acronyms.local.conf'), + ), + 'entities' => array( + 'default' => array(DOKU_CONF . 'entities.conf'), + 'local' => array(DOKU_CONF . 'entities.local.conf'), + ), 'interwiki' => array( - 'default' => array(DOKU_CONF.'interwiki.conf'), - 'local' => array(DOKU_CONF.'interwiki.local.conf'), - ), + 'default' => array(DOKU_CONF . 'interwiki.conf'), + 'local' => array(DOKU_CONF . 'interwiki.local.conf'), + ), 'license' => array( - 'default' => array(DOKU_CONF.'license.php'), - 'local' => array(DOKU_CONF.'license.local.php'), - ), + 'default' => array(DOKU_CONF . 'license.php'), + 'local' => array(DOKU_CONF . 'license.local.php'), + ), 'mediameta' => array( - 'default' => array(DOKU_CONF.'mediameta.php'), - 'local' => array(DOKU_CONF.'mediameta.local.php'), - ), - 'mime' => array( - 'default' => array(DOKU_CONF.'mime.conf'), - 'local' => array(DOKU_CONF.'mime.local.conf'), - ), - 'scheme' => array( - 'default' => array(DOKU_CONF.'scheme.conf'), - 'local' => array(DOKU_CONF.'scheme.local.conf'), - ), - 'smileys' => array( - 'default' => array(DOKU_CONF.'smileys.conf'), - 'local' => array(DOKU_CONF.'smileys.local.conf'), - ), + 'default' => array(DOKU_CONF . 'mediameta.php'), + 'local' => array(DOKU_CONF . 'mediameta.local.php'), + ), + 'mime' => array( + 'default' => array(DOKU_CONF . 'mime.conf'), + 'local' => array(DOKU_CONF . 'mime.local.conf'), + ), + 'scheme' => array( + 'default' => array(DOKU_CONF . 'scheme.conf'), + 'local' => array(DOKU_CONF . 'scheme.local.conf'), + ), + 'smileys' => array( + 'default' => array(DOKU_CONF . 'smileys.conf'), + 'local' => array(DOKU_CONF . 'smileys.local.conf'), + ), 'wordblock' => array( - 'default' => array(DOKU_CONF.'wordblock.conf'), - 'local' => array(DOKU_CONF.'wordblock.local.conf'), - ), + 'default' => array(DOKU_CONF . 'wordblock.conf'), + 'local' => array(DOKU_CONF . 'wordblock.local.conf'), + ), 'userstyle' => array( - 'screen' => DOKU_CONF.'userstyle.css', - 'print' => DOKU_CONF.'userprint.css', - 'feed' => DOKU_CONF.'userfeed.css', - 'all' => DOKU_CONF.'userall.css', - ), + 'screen' => array(DOKU_CONF . 'userstyle.css', DOKU_CONF . 'userstyle.less'), + 'print' => array(DOKU_CONF . 'userprint.css', DOKU_CONF . 'userprint.less'), + 'feed' => array(DOKU_CONF . 'userfeed.css', DOKU_CONF . 'userfeed.less'), + 'all' => array(DOKU_CONF . 'userall.css', DOKU_CONF . 'userall.less') + ), 'userscript' => array( - 'default' => DOKU_CONF.'userscript.js' - ), - 'acl' => array( - 'default' => DOKU_CONF.'acl.auth.php', - ), + 'default' => array(DOKU_CONF . 'userscript.js') + ), + 'acl' => array( + 'default' => DOKU_CONF . 'acl.auth.php', + ), 'plainauth.users' => array( - 'default' => DOKU_CONF.'users.auth.php', - ), - + 'default' => DOKU_CONF . 'users.auth.php', + ), 'plugins' => array( - 'default' => array(DOKU_CONF.'plugins.php'), - 'local' => array(DOKU_CONF.'plugins.local.php'), + 'default' => array(DOKU_CONF . 'plugins.php'), + 'local' => array(DOKU_CONF . 'plugins.local.php'), 'protected' => array( - DOKU_CONF.'plugins.required.php', - DOKU_CONF.'plugins.protected.php', - ), + DOKU_CONF . 'plugins.required.php', + DOKU_CONF . 'plugins.protected.php', ), ), - $config_cascade + 'lang' => array( + 'core' => array(DOKU_CONF . 'lang/'), + 'plugin' => array(DOKU_CONF . 'plugin_lang/'), + 'template' => array(DOKU_CONF . 'template_lang/') + ) + ), + $config_cascade ); diff --git a/inc/confutils.php b/inc/confutils.php index 31371d41fb5a200f1c845388bed182960e38c0d9..85bf5128ce3fb5a29f6fdc3d75ca841e913da565 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -14,6 +14,10 @@ * are returned. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file file name + * @param bool $knownonly + * @return array with extension, mimetype and if it should be downloaded */ function mimetype($file, $knownonly=true){ $mtypes = getMimeTypes(); // known mimetypes diff --git a/inc/events.php b/inc/events.php index 318a7617e4aa356152547ab60eae524e364b2297..256fb561e7e81810a28c83fa700bdcb0a392051f 100644 --- a/inc/events.php +++ b/inc/events.php @@ -27,6 +27,9 @@ class Doku_Event { /** * event constructor + * + * @param string $name + * @param mixed $data */ function Doku_Event($name, &$data) { @@ -120,14 +123,18 @@ class Doku_Event { * stop any further processing of the event by event handlers * this function does not prevent the default action taking place */ - function stopPropagation() { $this->_continue = false; } + function stopPropagation() { + $this->_continue = false; + } /** * preventDefault * * prevent the default action taking place */ - function preventDefault() { $this->_default = false; } + function preventDefault() { + $this->_default = false; + } } /** @@ -165,13 +172,13 @@ class Doku_Event_Handler { * * register a hook for an event * - * @param $event string name used by the event, (incl '_before' or '_after' for triggers) - * @param $advise string - * @param $obj object object in whose scope method is to be executed, + * @param string $event string name used by the event, (incl '_before' or '_after' for triggers) + * @param string $advise + * @param object $obj object in whose scope method is to be executed, * if NULL, method is assumed to be a globally available function - * @param $method string event handler function - * @param $param mixed data passed to the event handler - * @param $seq int sequence number for ordering hook execution (ascending) + * @param string $method event handler function + * @param mixed $param data passed to the event handler + * @param int $seq sequence number for ordering hook execution (ascending) */ function register_hook($event, $advise, $obj, $method, $param=null, $seq=0) { $seq = (int)$seq; @@ -216,14 +223,14 @@ class Doku_Event_Handler { * * function wrapper to process (create, trigger and destroy) an event * - * @param $name string name for the event - * @param $data mixed event data - * @param $action callback (optional, default=NULL) default action, a php callback function - * @param $canPreventDefault bool (optional, default=true) can hooks prevent the default action + * @param string $name name for the event + * @param mixed $data event data + * @param callback $action (optional, default=NULL) default action, a php callback function + * @param bool $canPreventDefault (optional, default=true) can hooks prevent the default action * * @return mixed the event results value after all event processing is complete - * by default this is the return value of the default action however - * it can be set or modified by event handler hooks + * by default this is the return value of the default action however + * it can be set or modified by event handler hooks */ function trigger_event($name, &$data, $action=null, $canPreventDefault=true) { diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index 55b31a454533856de5b614ba994c04856d30b82f..3c5bdfeee82ad122d5870a775c6aa40a0ca4090f 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -16,6 +16,7 @@ * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> * @author Gerry Weissbach <dokuwiki@gammaproduction.de> + * * @param string $file local file to send * @param string $mime mime type of the file * @param bool $dl set to true to force a browser download @@ -121,12 +122,13 @@ function rfc2231_encode($name, $value, $charset='utf-8', $lang='en') { * WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE ) * * @author Gerry Weissbach <gerry.w@gammaproduction.de> + * * @param string $media reference to the media id * @param string $file reference to the file variable * @param string $rev * @param int $width * @param int $height - * @return array(STATUS, STATUSMESSAGE) + * @return array as array(STATUS, STATUSMESSAGE) */ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { global $MIME, $EXT, $CACHE, $INPUT; @@ -174,6 +176,9 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { * Resolves named constants * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $cache + * @return int cachetime in seconds */ function calc_cache($cache) { global $conf; diff --git a/inc/form.php b/inc/form.php index fadc71d3e886f95e2f88de8335e03c1bcc322cbb..00eea9b3a084e12c7a36ed2527b18df043237aec 100644 --- a/inc/form.php +++ b/inc/form.php @@ -52,6 +52,7 @@ class Doku_Form { * @param bool|string $action (optional, deprecated) submit URL, defaults to current page * @param bool|string $method (optional, deprecated) 'POST' or 'GET', default is POST * @param bool|string $enctype (optional, deprecated) Encoding type of the data + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function Doku_Form($params, $action=false, $method=false, $enctype=false) { @@ -84,6 +85,7 @@ class Doku_Form { * Usually results in a border drawn around the form. * * @param string $legend Label that will be printed with the border. + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function startFieldset($legend) { @@ -115,6 +117,7 @@ class Doku_Form { * * @param string $name Field name. * @param string $value Field value. If null, remove a previously added field. + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function addHidden($name, $value) { @@ -132,6 +135,7 @@ class Doku_Form { * If string, it is printed without escaping special chars. * * * @param string|array $elem Pseudo-tag or string to add to the form. + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function addElement($elem) { @@ -145,6 +149,7 @@ class Doku_Form { * * @param string $pos 0-based index where the element will be inserted. * @param string|array $elem Pseudo-tag or string to add to the form. + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function insertElement($pos, $elem) { @@ -158,6 +163,7 @@ class Doku_Form { * * @param int $pos 0-based index the element will be placed at. * @param string|array $elem Pseudo-tag or string to add to the form. + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function replaceElement($pos, $elem) { @@ -172,7 +178,8 @@ class Doku_Form { * Gets the position of the first of a type of element. * * @param string $type Element type to look for. - * @return int position of element if found, otherwise false + * @return int|false position of element if found, otherwise false + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function findElementByType($type) { @@ -189,7 +196,8 @@ class Doku_Form { * Gets the position of the element with an ID attribute. * * @param string $id ID of the element to find. - * @return int position of element if found, otherwise false + * @return int|false position of element if found, otherwise false + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function findElementById($id) { @@ -207,7 +215,8 @@ class Doku_Form { * * @param string $name Attribute name. * @param string $value Attribute value. - * @return int position of element if found, otherwise false + * @return int|false position of element if found, otherwise false + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function findElementByAttribute($name, $value) { @@ -227,6 +236,7 @@ class Doku_Form { * * @param int $pos 0-based index * @return array reference pseudo-element + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function &getElementAt($pos) { @@ -243,6 +253,8 @@ class Doku_Form { * 'form_$type'. The function should return the HTML to be printed. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @return string html of the form */ function getForm() { global $lang; @@ -310,6 +322,7 @@ class Doku_Form { * @param string $tag Tag name. * @param array $attrs Optional attributes. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeTag($tag, $attrs=array()) { @@ -326,6 +339,7 @@ function form_makeTag($tag, $attrs=array()) { * @param string $tag Tag name. * @param array $attrs Optional attributes. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeOpenTag($tag, $attrs=array()) { @@ -341,6 +355,7 @@ function form_makeOpenTag($tag, $attrs=array()) { * * @param string $tag Tag name. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeCloseTag($tag) { @@ -358,6 +373,7 @@ function form_makeCloseTag($tag) { * @param string $text Text to fill the field with. * @param array $attrs Optional attributes. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeWikiText($text, $attrs=array()) { @@ -378,6 +394,7 @@ function form_makeWikiText($text, $attrs=array()) { * @param string $value (optional) Displayed label. Uses $act if not provided. * @param array $attrs Optional attributes. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeButton($type, $act, $value='', $attrs=array()) { @@ -406,6 +423,7 @@ function form_makeButton($type, $act, $value='', $attrs=array()) { * reference it with a 'for' attribute. * @param array $attrs Optional attributes. * @return array pseudo-tag + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function form_makeField($type, $name, $value='', $label=null, $id='', $class='', $attrs=array()) { @@ -522,6 +540,18 @@ function form_makeRadioField($name, $value='1', $label=null, $id='', $class='', * a string. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $name Name attribute of the input. + * @param string[]|array[] $values The list of values can be strings, arrays of (value,text), + * or an associative array with the values as keys and labels as values. + * @param string|int $selected default selected value, string or index number + * @param string $class Class attribute of the label. If this is 'block', + * then a line break will be added after the field. + * @param string $label Label that will be printed before the input. + * @param string $id ID attribute of the input. If set, the label will + * reference it with a 'for' attribute. + * @param array $attrs Optional attributes. + * @return array pseudo-tag */ function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) { if (is_null($label)) $label = $name; @@ -556,6 +586,18 @@ function form_makeMenuField($name, $values, $selected='', $label=null, $id='', $ * Items are selected by supplying its value or an array of values. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $name Name attribute of the input. + * @param string[]|array[] $values The list of values can be strings, arrays of (value,text), + * or an associative array with the values as keys and labels as values. + * @param array|string $selected value or array of values of the items that need to be selected + * @param string $class Class attribute of the label. If this is 'block', + * then a line break will be added after the field. + * @param string $label Label that will be printed before the input. + * @param string $id ID attribute of the input. If set, the label will + * reference it with a 'for' attribute. + * @param array $attrs Optional attributes. + * @return array pseudo-tag */ function form_makeListboxField($name, $values, $selected='', $label=null, $id='', $class='', $attrs=array()) { if (is_null($label)) $label = $name; @@ -595,6 +637,9 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id='' * Attributes are passed to buildAttributes() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html of tag */ function form_tag($attrs) { return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'/>'; @@ -608,6 +653,9 @@ function form_tag($attrs) { * Attributes are passed to buildAttributes() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html of tag */ function form_opentag($attrs) { return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'>'; @@ -621,6 +669,9 @@ function form_opentag($attrs) { * There are no attributes. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html of tag */ function form_closetag($attrs) { return '</'.$attrs['_tag'].'>'; @@ -634,6 +685,9 @@ function form_closetag($attrs) { * Attributes are passed to buildAttributes() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_openfieldset($attrs) { $s = '<fieldset '.buildAttributes($attrs,true).'>'; @@ -648,6 +702,8 @@ function form_openfieldset($attrs) { * There are no attributes. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @return string html */ function form_closefieldset() { return '</fieldset>'; @@ -661,6 +717,9 @@ function form_closefieldset() { * Value is passed to formText() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_hidden($attrs) { return '<input type="hidden" name="'.$attrs['name'].'" value="'.formText($attrs['value']).'" />'; @@ -674,6 +733,9 @@ function form_hidden($attrs) { * Text will be passed to formText(), attributes to buildAttributes() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_wikitext($attrs) { // mandatory attributes @@ -693,6 +755,9 @@ function form_wikitext($attrs) { * Other attributes are passed to buildAttributes() * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_button($attrs) { $p = (!empty($attrs['_action'])) ? 'name="do['.$attrs['_action'].']" ' : ''; @@ -708,6 +773,9 @@ function form_button($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_field($attrs) { $s = '<label'; @@ -729,6 +797,9 @@ function form_field($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_fieldright($attrs) { $s = '<label'; @@ -750,6 +821,9 @@ function form_fieldright($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_textfield($attrs) { // mandatory attributes @@ -773,6 +847,9 @@ function form_textfield($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_passwordfield($attrs) { // mandatory attributes @@ -798,6 +875,9 @@ function form_passwordfield($attrs) { * Other attributes are passed to buildAttributes() for the input tag * * @author Michael Klier <chi@chimeric.de> + * + * @param array $attrs attributes + * @return string html */ function form_filefield($attrs) { $s = '<label'; @@ -824,6 +904,9 @@ function form_filefield($attrs) { * $attrs['value'][1] is constructed as well. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_checkboxfield($attrs) { // mandatory attributes @@ -853,6 +936,9 @@ function form_checkboxfield($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_radiofield($attrs) { // mandatory attributes @@ -879,6 +965,9 @@ function form_radiofield($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_menufield($attrs) { $attrs['size'] = '1'; @@ -924,6 +1013,9 @@ function form_menufield($attrs) { * Other attributes are passed to buildAttributes() for the input tag. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param array $attrs attributes + * @return string html */ function form_listboxfield($attrs) { $s = '<label'; diff --git a/inc/fulltext.php b/inc/fulltext.php index dd918f214ffb182755da5680c7f8222a4e921dca..d6cddc56654525d96233d10b135dba4ad04538ea 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -20,9 +20,13 @@ if(!defined('FT_SNIPPET_NUMBER')) define('FT_SNIPPET_NUMBER',15); * * refactored into ft_pageSearch(), _ft_pageSearch() and trigger_event() * + * @param string $query + * @param array $highlight + * @return array */ function ft_pageSearch($query,&$highlight){ + $data = array(); $data['query'] = $query; $data['highlight'] =& $highlight; @@ -34,6 +38,9 @@ function ft_pageSearch($query,&$highlight){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Kazutaka Miyasaka <kazmiya@gmail.com> + * + * @param array $data event data + * @return array matching documents */ function _ft_pageSearch(&$data) { $Indexer = idx_get_indexer(); @@ -205,6 +212,11 @@ function ft_mediause($id, $ignore_perms = false){ * @triggers SEARCH_QUERY_PAGELOOKUP * @author Andreas Gohr <andi@splitbrain.org> * @author Adrian Lang <lang@cosmocode.de> + * + * @param string $id page id + * @param bool $in_ns match against namespace as well? + * @param bool $in_title search in title? + * @return string[] */ function ft_pageLookup($id, $in_ns=false, $in_title=false){ $data = compact('id', 'in_ns', 'in_title'); @@ -212,10 +224,16 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){ return trigger_event('SEARCH_QUERY_PAGELOOKUP', $data, '_ft_pageLookup'); } +/** + * Returns list of pages as array(pageid => First Heading) + * + * @param array &$data event data + * @return string[] + */ function _ft_pageLookup(&$data){ // split out original parameters $id = $data['id']; - if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) { + if (preg_match('/(?:^| )(?:@|ns:)([\w:]+)/', $id, $matches)) { $ns = cleanID($matches[1]) . ':'; $id = str_replace($matches[0], '', $id); } @@ -269,6 +287,10 @@ function _ft_pageLookup(&$data){ * Tiny helper function for comparing the searched title with the title * from the search index. This function is a wrapper around stripos with * adapted argument order and return value. + * + * @param string $search searched title + * @param string $title title from index + * @return bool */ function _ft_pageLookupTitleCompare($search, $title) { return stripos($title, $search) !== false; @@ -278,6 +300,10 @@ function _ft_pageLookupTitleCompare($search, $title) { * Sort pages based on their namespace level first, then on their string * values. This makes higher hierarchy pages rank higher than lower hierarchy * pages. + * + * @param string $a + * @param string $b + * @return int Returns < 0 if $a is less than $b; > 0 if $a is greater than $b, and 0 if they are equal. */ function ft_pagesorter($a, $b){ $ac = count(explode(':',$a)); @@ -295,6 +321,10 @@ function ft_pagesorter($a, $b){ * * @author Andreas Gohr <andi@splitbrain.org> * @triggers FULLTEXT_SNIPPET_CREATE + * + * @param string $id page id + * @param array $highlight + * @return mixed */ function ft_snippet($id,$highlight){ $text = rawWiki($id); @@ -389,6 +419,9 @@ function ft_snippet($id,$highlight){ /** * Wraps a search term in regex boundary checks. + * + * @param string $term + * @return string */ function ft_snippet_re_preprocess($term) { // do not process asian terms where word boundaries are not explicit @@ -432,6 +465,7 @@ function ft_snippet_re_preprocess($term) { * based upon PEAR's PHP_Compat function for array_intersect_key() * * @param array $args An array of page arrays + * @return array */ function ft_resultCombine($args){ $array_count = count($args); @@ -461,6 +495,8 @@ function ft_resultCombine($args){ * based upon ft_resultCombine() function * * @param array $args An array of page arrays + * @return array + * * @author Kazutaka Miyasaka <kazmiya@gmail.com> */ function ft_resultUnite($args) { @@ -484,6 +520,8 @@ function ft_resultUnite($args) { * nearly identical to PHP5's array_diff_key() * * @param array $args An array of page arrays + * @return array + * * @author Kazutaka Miyasaka <kazmiya@gmail.com> */ function ft_resultComplement($args) { @@ -506,6 +544,10 @@ function ft_resultComplement($args) { * * @author Andreas Gohr <andi@splitbrain.org> * @author Kazutaka Miyasaka <kazmiya@gmail.com> + * + * @param Doku_Indexer $Indexer + * @param string $query search query + * @return array of search formulas */ function ft_queryParser($Indexer, $query){ /** @@ -736,6 +778,12 @@ function ft_queryParser($Indexer, $query){ * This function is used in ft_queryParser() and not for general purpose use. * * @author Kazutaka Miyasaka <kazmiya@gmail.com> + * + * @param Doku_Indexer $Indexer + * @param string $term + * @param bool $consider_asian + * @param bool $phrase_mode + * @return string */ function ft_termParser($Indexer, $term, $consider_asian = true, $phrase_mode = false) { $parsed = ''; diff --git a/inc/html.php b/inc/html.php index bda6fb3983be4de6566ab2cbfbdbc428a976c821..87affd47b64e50cdaf442def6f625174f9bfaeae 100644 --- a/inc/html.php +++ b/inc/html.php @@ -83,6 +83,10 @@ function html_denied() { * inserts section edit buttons if wanted or removes the markers * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $text + * @param bool $show show section edit buttons? + * @return string */ function html_secedit($text,$show=true){ global $INFO; @@ -101,8 +105,11 @@ function html_secedit($text,$show=true){ * prepares section edit button data for event triggering * used as a callback in html_secedit * - * @triggers HTML_SECEDIT_BUTTON * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $matches matches with regexp + * @return string + * @triggers HTML_SECEDIT_BUTTON */ function html_secedit_button($matches){ $data = array('secid' => $matches[1], @@ -121,6 +128,9 @@ function html_secedit_button($matches){ * used as default action form HTML_SECEDIT_BUTTON * * @author Adrian Lang <lang@cosmocode.de> + * + * @param array $data name, section id and target + * @return string html */ function html_secedit_get_button($data) { global $ID; @@ -147,6 +157,8 @@ function html_secedit_get_button($data) { * Just the back to top button (in its own form) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return string html */ function html_topbtn(){ global $lang; @@ -161,6 +173,15 @@ function html_topbtn(){ * If tooltip exists, the access key tooltip is replaced. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $name + * @param string $id + * @param string $akey access key + * @param string[] $params key-value pairs added as hidden inputs + * @param string $method + * @param string $tooltip + * @param bool|string $label label text, false: lookup btn_$name in localization + * @return string */ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false){ global $conf; @@ -213,15 +234,18 @@ function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false } /** - * show a wiki page + * Show a wiki page * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param null|string $txt wiki text or null for showing $ID */ function html_show($txt=null){ global $ID; global $REV; global $HIGH; global $INFO; + global $DATE_AT; //disable section editing for old revisions or in preview if($txt || $REV){ $secedit = false; @@ -241,8 +265,8 @@ function html_show($txt=null){ echo '</div></div>'; }else{ - if ($REV) print p_locale_xhtml('showrev'); - $html = p_wiki_xhtml($ID,$REV,true); + if ($REV||$DATE_AT) print p_locale_xhtml('showrev'); + $html = p_wiki_xhtml($ID,$REV,true,$DATE_AT); $html = html_secedit($html,$secedit); if($INFO['prependTOC']) $html = tpl_toc(true).$html; $html = html_hilight($html,$HIGH); @@ -281,6 +305,10 @@ function html_draft(){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Harry Fuecks <hfuecks@gmail.com> + * + * @param string $html + * @param array|string $phrases + * @return string html */ function html_hilight($html,$phrases){ $phrases = (array) $phrases; @@ -299,6 +327,9 @@ function html_hilight($html,$phrases){ * Callback used by html_hilight() * * @author Harry Fuecks <hfuecks@gmail.com> + * + * @param array $m matches + * @return string html */ function html_hilight_callback($m) { $hlight = unslash($m[0]); @@ -314,15 +345,17 @@ function html_hilight_callback($m) { * @author Andreas Gohr <andi@splitbrain.org> */ function html_search(){ - global $QUERY; + global $QUERY, $ID; global $lang; $intro = p_locale_xhtml('searchpage'); // allow use of placeholder in search intro + $pagecreateinfo = (auth_quickaclcheck($ID) >= AUTH_CREATE) ? $lang['searchcreatepage'] : ''; $intro = str_replace( - array('@QUERY@','@SEARCH@'), - array(hsc(rawurlencode($QUERY)),hsc($QUERY)), - $intro); + array('@QUERY@', '@SEARCH@', '@CREATEPAGEINFO@'), + array(hsc(rawurlencode($QUERY)), hsc($QUERY), $pagecreateinfo), + $intro + ); echo $intro; flush(); @@ -422,6 +455,9 @@ function html_locked(){ * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param int $first skip the first n changelog lines + * @param bool|string $media_id id of media, or false for current page */ function html_revisions($first=0, $media_id = false){ global $ID; @@ -643,6 +679,9 @@ function html_revisions($first=0, $media_id = false){ * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * @author Ben Coburn <btcoburn@silicodon.net> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param int $first + * @param string $show_changes */ function html_recent($first=0, $show_changes='both'){ global $conf; @@ -830,6 +869,8 @@ function html_recent($first=0, $show_changes='both'){ * Display page index * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $ns */ function html_index($ns){ global $conf; @@ -858,6 +899,9 @@ function html_index($ns){ * User function for html_buildlist() * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $item + * @return string */ function html_list_index($item){ global $ID, $conf; @@ -888,10 +932,23 @@ function html_list_index($item){ * it gives different classes to opened or closed "folders" * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $item + * @return string html */ function html_li_index($item){ + global $INFO; + + $class = ''; + $id = ''; + if($item['type'] == "f"){ - return '<li class="level'.$item['level'].'">'; + // scroll to the current item + if($item['id'] == $INFO['id']) { + $id = ' id="scroll__here"'; + $class = ' bounce'; + } + return '<li class="level'.$item['level'].$class.'" '.$id.'>'; }elseif($item['open']){ return '<li class="open">'; }else{ @@ -903,6 +960,9 @@ function html_li_index($item){ * Default List item * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $item + * @return string html */ function html_li_default($item){ return '<li class="level'.$item['level'].'">'; @@ -926,7 +986,7 @@ function html_li_default($item){ * @param array $data array with item arrays * @param string $class class of ul wrapper * @param callable $func callback to print an list item - * @param string $lifunc callback to the opening li tag + * @param callable $lifunc callback to the opening li tag * @param bool $forcewrapper Trigger building a wrapper ul if the first level is 0 (we have a root object) or 1 (just the root content) * @return string html of an unordered list @@ -1018,12 +1078,13 @@ function html_backlinks(){ /** * Get header of diff HTML + * * @param string $l_rev Left revisions * @param string $r_rev Right revision * @param string $id Page id, if null $ID is used * @param bool $media If it is for media files * @param bool $inline Return the header on a single line - * @return array HTML snippets for diff header + * @return string[] HTML snippets for diff header */ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = false) { global $lang; @@ -1479,7 +1540,7 @@ function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) { /** * Insert soft breaks in diff html * - * @param $diffhtml + * @param string $diffhtml * @return string */ function html_insert_softbreaks($diffhtml) { @@ -1518,6 +1579,9 @@ REGEX; * show warning on conflict detection * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $text + * @param string $summary */ function html_conflict($text,$summary){ global $ID; @@ -1678,7 +1742,6 @@ function html_edit(){ global $lang; global $conf; global $TEXT; - global $RANGE; if ($INPUT->has('changecheck')) { $check = $INPUT->str('changecheck'); @@ -1780,6 +1843,7 @@ function html_edit(){ * Display the default edit form * * Is the default action for HTML_EDIT_FORMSELECTION. + * * @param mixed[] $param */ function html_edit_form($param) { @@ -1799,6 +1863,8 @@ function html_edit_form($param) { * Adds a checkbox for minor edits for logged in users * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return array|bool */ function html_minoredit(){ global $conf; @@ -1899,6 +1965,7 @@ function html_debug(){ print '</pre>'; if (function_exists('apache_get_version')) { + $apache = array(); $apache['version'] = apache_get_version(); if (function_exists('apache_get_modules')) { @@ -2077,6 +2144,9 @@ function html_resendpwd() { * Return the TOC rendered to XHTML * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $toc + * @return string html */ function html_TOC($toc){ if(!count($toc)) return ''; @@ -2095,6 +2165,9 @@ function html_TOC($toc){ /** * Callback for html_buildlist + * + * @param array $item + * @return string html */ function html_list_toc($item){ if(isset($item['hid'])){ @@ -2129,6 +2202,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){ * Triggers an event with the form name: HTML_{$name}FORM_OUTPUT * * @author Tom N Harris <tnharris@whoopdedo.org> + * * @param string $name The name of the form * @param Doku_Form $form The form */ @@ -2141,6 +2215,7 @@ function html_form($name, &$form) { /** * Form print function. * Just calls printForm() on the data object. + * * @param Doku_Form $data The form */ function html_form_output($data) { diff --git a/inc/httputils.php b/inc/httputils.php index efeb2a56ca328dda83d6a3d422d718bd8c3c4908..ac79aa1768cb4358b2558401ec8625f8fd379f1d 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -15,6 +15,7 @@ define('HTTP_CHUNK_SIZE',16*1024); * * @author Simon Willison <swillison@gmail.com> * @link http://simonwillison.net/2003/Apr/23/conditionalGet/ + * * @param int $timestamp lastmodified time of the cache file * @returns void or exits with previously header() commands executed */ @@ -64,6 +65,7 @@ function http_conditionalRequest($timestamp){ * Let the webserver send the given file via x-sendfile method * * @author Chris Smith <chris@jalakai.co.uk> + * * @param string $file absolute path of file to send * @returns void or exits with previous header() commands executed */ @@ -190,6 +192,9 @@ function http_rangeRequest($fh,$size,$mime){ * (samepath/samefilename.sameext.gz) created after the uncompressed file * * @author Chris Smith <chris.eureka@jalakai.co.uk> + * + * @param string $uncompressed_file + * @return bool */ function http_gzip_valid($uncompressed_file) { $gzip = $uncompressed_file.'.gz'; @@ -206,6 +211,9 @@ function http_gzip_valid($uncompressed_file) { * This function handles output of cacheable resource files. It ses the needed * HTTP headers. If a useable cache is present, it is passed to the web server * and the script is terminated. + * + * @param string $cache cache file name + * @param bool $cache_ok if cache can be used */ function http_cached($cache, $cache_ok) { global $conf; @@ -235,6 +243,9 @@ function http_cached($cache, $cache_ok) { /** * Cache content and print it + * + * @param string $file file name + * @param string $content */ function http_cached_finish($file, $content) { global $conf; diff --git a/inc/indexer.php b/inc/indexer.php index 5ca2f0bb1ff327351971b2263299f7ec49d3c698..014c5c5eb0f46fc238b7b085096b0f99824dae37 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -61,6 +61,8 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Michael Hamann <michael@content-space.de> + * + * @return int|string */ function idx_get_version(){ static $indexer_version = null; @@ -84,6 +86,9 @@ function idx_get_version(){ * Differs from strlen in handling of asian characters. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $w + * @return int */ function wordlen($w){ $l = strlen($w); @@ -115,7 +120,8 @@ class Doku_Indexer { * * @param string $page a page name * @param string $text the body of the page - * @return boolean the function completed successfully + * @return string|boolean the function completed successfully + * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Andreas Gohr <andi@splitbrain.org> */ @@ -190,6 +196,7 @@ class Doku_Indexer { * * @param string $text content of the page * @return array list of word IDs and number of times used + * * @author Andreas Gohr <andi@splitbrain.org> * @author Christopher Smith <chris@jalakai.co.uk> * @author Tom N Harris <tnharris@whoopdedo.org> @@ -245,7 +252,8 @@ class Doku_Indexer { * @param string $page a page name * @param mixed $key a key string or array of key=>value pairs * @param mixed $value the value or list of values - * @return boolean the function completed successfully + * @return boolean|string the function completed successfully + * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Michael Hamann <michael@content-space.de> */ @@ -453,7 +461,8 @@ class Doku_Indexer { * Erases entries in all known indexes. * * @param string $page a page name - * @return boolean the function completed successfully + * @return string|boolean the function completed successfully + * * @author Tom N Harris <tnharris@whoopdedo.org> */ public function deletePage($page) { @@ -474,6 +483,7 @@ class Doku_Indexer { * * @param string $page a page name * @return boolean the function completed successfully + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function deletePageNoLock($page) { @@ -568,6 +578,7 @@ class Doku_Indexer { * @param string $text plain text * @param boolean $wc are wildcards allowed? * @return array list of words in the text + * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Andreas Gohr <andi@splitbrain.org> */ @@ -676,6 +687,7 @@ class Doku_Indexer { * * @param array $tokens list of words to search for * @return array list of page names with usage counts + * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Andreas Gohr <andi@splitbrain.org> */ @@ -730,6 +742,7 @@ class Doku_Indexer { * @param string $value search term to look for, must be a string or array of strings * @param callback $func comparison function * @return array lists with page names, keys are query values if $value is array + * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Michael Hamann <michael@content-space.de> */ @@ -829,6 +842,7 @@ class Doku_Indexer { * @param array $words The query terms. * @param array $result Set to word => array("length*id" ...) * @return array Set to length => array(id ...) + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function getIndexWords(&$words, &$result) { @@ -909,6 +923,7 @@ class Doku_Indexer { * * @param string $key list only pages containing the metadata key (optional) * @return array list of page names + * * @author Tom N Harris <tnharris@whoopdedo.org> */ public function getPages($key=null) { @@ -942,6 +957,7 @@ class Doku_Indexer { * @param int $minlen minimum length of words to count * @param string $key metadata key to list. Uses the fulltext index if not given * @return array list of words as the keys and frequency as values + * * @author Tom N Harris <tnharris@whoopdedo.org> */ public function histogram($min=1, $max=0, $minlen=3, $key=null) { @@ -1002,6 +1018,8 @@ class Doku_Indexer { * Lock the indexer. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @return bool|string */ protected function lock() { global $conf; @@ -1033,6 +1051,8 @@ class Doku_Indexer { * Release the indexer lock. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @return bool */ protected function unlock() { global $conf; @@ -1050,6 +1070,7 @@ class Doku_Indexer { * @param string $idx name of the index * @param string $suffix subpart identifier * @return array list of lines without CR or LF + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function getIndex($idx, $suffix) { @@ -1066,6 +1087,7 @@ class Doku_Indexer { * @param string $suffix subpart identifier * @param array $lines list of lines without LF * @return bool If saving succeeded + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function saveIndex($idx, $suffix, &$lines) { @@ -1090,6 +1112,7 @@ class Doku_Indexer { * @param string $suffix subpart identifier * @param int $id the line number * @return string a line with trailing whitespace removed + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function getIndexKey($idx, $suffix, $id) { @@ -1114,6 +1137,7 @@ class Doku_Indexer { * @param int $id the line number * @param string $line line to write * @return bool If saving succeeded + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function saveIndexKey($idx, $suffix, $id, $line) { @@ -1155,6 +1179,7 @@ class Doku_Indexer { * @param string $suffix subpart identifier * @param string $value line to find in the index * @return int|bool line number of the value in the index or false if writing the index failed + * * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function addIndexKey($idx, $suffix, $value) { @@ -1178,6 +1203,8 @@ class Doku_Indexer { * a sorted array of lengths of the words used in the wiki. * * @author YoBoY <yoboy.leguesh@gmail.com> + * + * @return array */ protected function listIndexLengths() { return idx_listIndexLengths(); @@ -1190,6 +1217,9 @@ class Doku_Indexer { * that there are indices for. * * @author YoBoY <yoboy.leguesh@gmail.com> + * + * @param array|int $filter + * @return array */ protected function indexLengths($filter) { global $conf; @@ -1216,6 +1246,11 @@ class Doku_Indexer { * Insert or replace a tuple in a line. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $line + * @param string|int $id + * @param int $count + * @return string */ protected function updateTuple($line, $id, $count) { if ($line != ''){ @@ -1237,6 +1272,10 @@ class Doku_Indexer { * * @author Tom N Harris <tnharris@whoopdedo.org> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $keys + * @param string $line + * @return array */ protected function parseTuples(&$keys, $line) { $result = array(); @@ -1257,13 +1296,16 @@ class Doku_Indexer { * Sum the counts in a list of tuples. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $line + * @return int */ protected function countTuples($line) { $freq = 0; $parts = explode(':', $line); foreach ($parts as $tuple) { if ($tuple === '') continue; - list($pid, $cnt) = explode('*', $tuple); + list(/* $pid */, $cnt) = explode('*', $tuple); $freq += (int)$cnt; } return $freq; @@ -1273,7 +1315,8 @@ class Doku_Indexer { /** * Create an instance of the indexer. * - * @return Doku_Indexer a Doku_Indexer + * @return Doku_Indexer a Doku_Indexer + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function idx_get_indexer() { @@ -1288,6 +1331,7 @@ function idx_get_indexer() { * Returns words that will be ignored. * * @return array list of stop words + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function & idx_get_stopwords() { @@ -1312,7 +1356,8 @@ function & idx_get_stopwords() { * @param string $page name of the page to index * @param boolean $verbose print status messages * @param boolean $force force reindexing even when the index is up to date - * @return boolean the function completed successfully + * @return string|boolean the function completed successfully + * * @author Tom N Harris <tnharris@whoopdedo.org> */ function idx_addPage($page, $verbose=false, $force=false) { @@ -1441,6 +1486,10 @@ function idx_tokenizer($string, $wc=false) { * Read the list of words in an index (if it exists). * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $idx + * @param string $suffix + * @return array */ function idx_getIndex($idx, $suffix) { global $conf; @@ -1456,6 +1505,8 @@ function idx_getIndex($idx, $suffix) { * a sorted array of lengths of the words used in the wiki. * * @author YoBoY <yoboy.leguesh@gmail.com> + * + * @return array */ function idx_listIndexLengths() { global $conf; @@ -1510,6 +1561,9 @@ function idx_listIndexLengths() { * that there are indices for. * * @author YoBoY <yoboy.leguesh@gmail.com> + * + * @param array|int $filter + * @return array */ function idx_indexLengths($filter) { global $conf; @@ -1539,6 +1593,9 @@ function idx_indexLengths($filter) { * not a letter, number, or underscore. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $name + * @return string */ function idx_cleanName($name) { $name = utf8_romanize(trim((string)$name)); diff --git a/inc/infoutils.php b/inc/infoutils.php index f9ba115608c4355599efd77d7ac638f5e8599868..399963176d1704afa13eef4574b5a4833f9b1096 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -20,27 +20,28 @@ function checkUpdateMessages(){ if(!$conf['updatecheck']) return; if($conf['useacl'] && !$INFO['ismanager']) return; - $cf = $conf['cachedir'].'/messages.txt'; + $cf = getCacheName($updateVersion, '.updmsg'); $lm = @filemtime($cf); // check if new messages needs to be fetched if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){ @touch($cf); - dbglog("checkUpdateMessages(): downloading messages.txt"); + dbglog("checkUpdateMessages(): downloading messages to ".$cf); $http = new DokuHTTPClient(); $http->timeout = 12; - $data = $http->get(DOKU_MESSAGEURL.$updateVersion); - if(substr(trim($data), -1) != '%') { - // this doesn't look like one of our messages, maybe some WiFi login interferred - $data = ''; - }else { - io_saveFile($cf,$data); + $resp = $http->get(DOKU_MESSAGEURL.$updateVersion); + if(is_string($resp) && ($resp == "" || substr(trim($resp), -1) == '%')) { + // basic sanity check that this is either an empty string response (ie "no messages") + // or it looks like one of our messages, not WiFi login or other interposed response + io_saveFile($cf,$resp); + } else { + dbglog("checkUpdateMessages(): unexpected HTTP response received"); } }else{ - dbglog("checkUpdateMessages(): messages.txt up to date"); - $data = io_readFile($cf); + dbglog("checkUpdateMessages(): messages up to date"); } + $data = io_readFile($cf); // show messages through the usual message mechanism $msgs = explode("\n%\n",$data); foreach($msgs as $msg){ @@ -113,13 +114,13 @@ function check(){ if ($INFO['isadmin'] || $INFO['ismanager']){ msg('DokuWiki version: '.getVersion(),1); - if(version_compare(phpversion(),'5.2.0','<')){ - msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1); + if(version_compare(phpversion(),'5.3.3','<')){ + msg('Your PHP version is too old ('.phpversion().' vs. 5.3.3+ needed)',-1); }else{ msg('PHP version '.phpversion(),1); } } else { - if(version_compare(phpversion(),'5.2.0','<')){ + if(version_compare(phpversion(),'5.3.3','<')){ msg('Your PHP version is too old',-1); } } @@ -296,6 +297,7 @@ define('MSG_ADMINS_ONLY',4); */ function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){ global $MSG, $MSG_shown; + $errors = array(); $errors[-1] = 'error'; $errors[0] = 'info'; $errors[1] = 'success'; @@ -452,7 +454,7 @@ function dbg_backtrace(){ }elseif(is_array($arg)){ $params[] = '[Array]'; }elseif(is_null($arg)){ - $param[] = '[NULL]'; + $params[] = '[NULL]'; }else{ $params[] = (string) '"'.$arg.'"'; } diff --git a/inc/init.php b/inc/init.php index df38326c07f166cfb403eda74f99ece43315ec3c..12bb6f5882994612aaf2ff81c45b043a473937ec 100644 --- a/inc/init.php +++ b/inc/init.php @@ -178,14 +178,6 @@ $_REQUEST = array_merge($_GET,$_POST); // we don't want a purge URL to be digged if(isset($_REQUEST['purge']) && !empty($_SERVER['HTTP_REFERER'])) unset($_REQUEST['purge']); -// disable gzip if not available -if($conf['compression'] == 'bz2' && !function_exists('bzopen')){ - $conf['compression'] = 'gz'; -} -if($conf['compression'] == 'gz' && !function_exists('gzopen')){ - $conf['compression'] = 0; -} - // precalculate file creation modes init_creationmodes(); @@ -201,6 +193,14 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con // load libraries require_once(DOKU_INC.'inc/load.php'); +// disable gzip if not available +if($conf['compression'] == 'bz2' && !function_exists('bzopen')){ + $conf['compression'] = 'gz'; +} +if($conf['compression'] == 'gz' && !function_exists('gzopen')){ + $conf['compression'] = 0; +} + // input handle class global $INPUT; $INPUT = new Input(); @@ -259,17 +259,33 @@ function init_paths(){ $conf['media_changelog'] = $conf['metadir'].'/_media.changes'; } +/** + * Load the language strings + * + * @param string $langCode language code, as passed by event handler + */ function init_lang($langCode) { //prepare language array - global $lang; + global $lang, $config_cascade; $lang = array(); //load the language files require(DOKU_INC.'inc/lang/en/lang.php'); + foreach ($config_cascade['lang']['core'] as $config_file) { + if (@file_exists($config_file . 'en/lang.php')) { + include($config_file . 'en/lang.php'); + } + } + if ($langCode && $langCode != 'en') { if (file_exists(DOKU_INC."inc/lang/$langCode/lang.php")) { require(DOKU_INC."inc/lang/$langCode/lang.php"); } + foreach ($config_cascade['lang']['core'] as $config_file) { + if (@file_exists($config_file . "$langCode/lang.php")) { + include($config_file . "$langCode/lang.php"); + } + } } } @@ -456,10 +472,6 @@ function getBaseURL($abs=null){ $port = ''; } - if(!$port && isset($_SERVER['SERVER_PORT'])) { - $port = $_SERVER['SERVER_PORT']; - } - if(is_null($port)){ $port = ''; } @@ -490,6 +502,14 @@ function getBaseURL($abs=null){ * @returns bool true when SSL is active */ function is_ssl(){ + // check if we are behind a reverse proxy + if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { + return true; + } else { + return false; + } + } if (!isset($_SERVER['HTTPS']) || preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){ return false; diff --git a/inc/io.php b/inc/io.php index 27a34b045957f5e3a6a6be54c983d58be718d98a..bfa394a17c298d4b425691f013211d1bb3a4c024 100644 --- a/inc/io.php +++ b/inc/io.php @@ -20,6 +20,7 @@ if(!defined('DOKU_INC')) die('meh.'); * @param string $id - a pageid, the namespace of that id will be tried to deleted * @param string $basedir - the config name of the type to delete (datadir or mediadir usally) * @return bool - true if at least one namespace was deleted + * * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> */ @@ -60,6 +61,11 @@ function io_sweepNS($id,$basedir='datadir'){ * $data[3] rev: The page revision, false for current wiki pages. * * @author Ben Coburn <btcoburn@silicodon.net> + * + * @param string $file filename + * @param string $id page id + * @param bool|int $rev revision timestamp + * @return string */ function io_readWikiPage($file, $id, $rev=false) { if (empty($rev)) { $rev = false; } @@ -69,7 +75,11 @@ function io_readWikiPage($file, $id, $rev=false) { /** * Callback adapter for io_readFile(). + * * @author Ben Coburn <btcoburn@silicodon.net> + * + * @param array $data event data + * @return string */ function _io_readWikiPage_action($data) { if (is_array($data) && is_array($data[0]) && count($data[0])===2) { @@ -88,6 +98,10 @@ function _io_readWikiPage_action($data) { * be sure to set $clean to false! * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename + * @param bool $clean + * @return string */ function io_readFile($file,$clean=true){ $ret = ''; @@ -108,9 +122,12 @@ function io_readFile($file,$clean=true){ } /** * Returns the content of a .bz2 compressed file as string + * * @author marcel senf <marcel@rucksackreinigung.de> + * + * @param string $file filename + * @return string content */ - function bzfile($file){ $bz = bzopen($file,"r"); $str = ''; @@ -138,6 +155,12 @@ function bzfile($file){ * $data[3] rev: The page revision, false for current wiki pages. * * @author Ben Coburn <btcoburn@silicodon.net> + * + * @param string $file filename + * @param string $content + * @param string $id page id + * @param int|bool $rev timestamp of revision + * @return bool */ function io_writeWikiPage($file, $content, $id, $rev=false) { if (empty($rev)) { $rev = false; } @@ -149,6 +172,9 @@ function io_writeWikiPage($file, $content, $id, $rev=false) { /** * Callback adapter for io_saveFile(). * @author Ben Coburn <btcoburn@silicodon.net> + * + * @param array $data event data + * @return bool */ function _io_writeWikiPage_action($data) { if (is_array($data) && is_array($data[0]) && count($data[0])===3) { @@ -168,7 +194,11 @@ function _io_writeWikiPage_action($data) { * and bz2 if extension is .bz2 * * @author Andreas Gohr <andi@splitbrain.org> - * @return bool true on success + * + * @param string $file filename path to file + * @param string $content + * @param bool $append + * @return bool true on success, otherwise false */ function io_saveFile($file,$content,$append=false){ global $conf; @@ -221,6 +251,10 @@ function io_saveFile($file,$content,$append=false){ * 2005-10-14 : added regex option -- Christopher Smith <chris@jalakai.co.uk> * * @author Steven Danz <steven-danz@kc.rr.com> + * + * @param string $file filename + * @param string $badline exact linematch to remove + * @param bool $regex use regexp? * @return bool true on success */ function io_deleteFromFile($file,$badline,$regex=false){ @@ -285,6 +319,8 @@ function io_deleteFromFile($file,$badline,$regex=false){ * the lock is assumed to be stale and the function goes on * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename */ function io_lock($file){ global $conf; @@ -311,6 +347,8 @@ function io_lock($file){ * Unlocks a file * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename */ function io_unlock($file){ global $conf; @@ -331,6 +369,9 @@ function io_unlock($file){ * $data[1] ns_type: 'pages' or 'media' namespace tree. * * @author Ben Coburn <btcoburn@silicodon.net> + * + * @param string $id page id + * @param string $ns_type 'pages' or 'media' */ function io_createNamespace($id, $ns_type='pages') { // verify ns_type @@ -365,6 +406,8 @@ function io_createNamespace($id, $ns_type='pages') { * Create the directory needed for the given file * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file file name */ function io_makeFileDir($file){ $dir = dirname($file); @@ -379,6 +422,9 @@ function io_makeFileDir($file){ * @link http://www.php.net/manual/en/function.mkdir.php * @author <saint@corenova.com> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $target filename + * @return bool|int|string */ function io_mkdir_p($target){ global $conf; @@ -454,6 +500,9 @@ function io_rmdir($path, $removefiles = false) { * This is used when the safemode workaround is enabled * * @author <andi@splitbrain.org> + * + * @param string $dir name of the new directory + * @return false|string */ function io_mkdir_ftp($dir){ global $conf; @@ -488,6 +537,8 @@ function io_mkdir_ftp($dir){ * its path. * * @author Michael Klier <chi@chimeric.de> + * + * @return false|string path to new directory or false */ function io_mktmpdir() { global $conf; @@ -516,6 +567,13 @@ function io_mktmpdir() { * * @author Andreas Gohr <andi@splitbrain.org> * @author Chris Smith <chris@jalakai.co.uk> + * + * @param string $url url to download + * @param string $file path to file or directory where to save + * @param bool $useAttachment if true: try to use name of download, uses otherwise $defaultName, false: uses $file as path to file + * @param string $defaultName fallback for if using $useAttachment + * @param int $maxSize maximum file size + * @return bool|string if failed false, otherwise true or the name of the file in the given dir */ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=2097152){ global $conf; @@ -563,6 +621,10 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20 * * rename() can not overwrite existing files on Windows * this function will use copy/unlink instead + * + * @param string $from + * @param string $to + * @return bool succes or fail */ function io_rename($from,$to){ global $conf; @@ -582,6 +644,11 @@ function io_rename($from,$to){ * Returns the exit code from the process. * * @author Tom N Harris <tnharris@whoopdedo.org> + * + * @param string $cmd + * @param string $input input pipe + * @param string $output output pipe + * @return int exit code from process */ function io_exec($cmd, $input, &$output){ $descspec = array( diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index a63e1ed44a4c62c30d817ab9bb781283d221f053..50984e6303ef11db3090fd0eb37895e98c6fc8cc 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -9,6 +9,7 @@ * @author uahello@gmail.com * @author Ahmad Abd-Elghany <tolpa1@gmail.com> * @author alhajr <alhajr300@gmail.com> + * @author Mohamed Belhsine <b.mohamed897@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'rtl'; @@ -53,6 +54,8 @@ $lang['btn_register'] = 'سجّل'; $lang['btn_apply'] = 'طبق'; $lang['btn_media'] = 'مدير الوسائط'; $lang['btn_deleteuser'] = 'اØØ°Ù Øسابي الخاص'; +$lang['btn_img_backto'] = 'عودة إلى %s'; +$lang['btn_mediaManager'] = 'اعرض ÙÙŠ مدير الوسائط'; $lang['loggedinas'] = 'داخل باسم:'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'عذراً,كلمة السر غير صØÙŠØØ© $lang['minoredit'] = 'تعديلات Ø·ÙÙŠÙØ©'; $lang['draftdate'] = 'ØÙظ المسودات آليا Ù…Ùعّل'; $lang['nosecedit'] = 'غÙيرت الصÙØØ© ÙÙŠ هذه الأثناء، معلومات الجزء اصبØت قديمة. ØÙÙ…Ùلت كل الصÙØØ© بدلا.'; +$lang['searchcreatepage'] = 'إن لم تجد ما تبØØ« عنه، يمكنك إنشاء صÙØØ© جديدة بعنوان ما تبØØ« عنة بالضغط على زر "Øرر هذه الصÙØØ©".'; $lang['regmissing'] = 'عذرا، عليك ملء جميع الØقول.'; $lang['reguexists'] = 'عذرا، يوجد مشترك بنÙس الاسم.'; $lang['regsuccess'] = 'أنشئ المستخدم Ùˆ ارسلت كلمة السر بالبريد.'; @@ -86,6 +90,7 @@ $lang['profdeleteuser'] = 'اØØ°Ù Øساب'; $lang['profdeleted'] = 'Øسابك الخاص تم ØØ°ÙÙ‡ من هذه الموسوعة'; $lang['profconfdelete'] = 'أنا أرغب ÙÙŠ ØØ°Ù Øسابي من هذه الموسوعة.<br/> هذا الØدث غير ممكن.'; +$lang['profconfdeletemissing'] = 'لم تقم بوضع علامة ÙÙŠ مربع التأكيد'; $lang['pwdforget'] = 'أنسيت كلمة السر؟ اØصل على واØدة جديدة'; $lang['resendna'] = 'هذه الويكي لا تدعم إعادة إرسال كلمة المرور.'; $lang['resendpwd'] = 'اضبط كلمة سر جديدة لـ'; @@ -183,6 +188,11 @@ $lang['difflink'] = 'رابط إلى هذه المقارنة'; $lang['diff_type'] = 'أظهر الÙروق:'; $lang['diff_inline'] = 'ضمنا'; $lang['diff_side'] = 'جنبا إلى جنب'; +$lang['diffprevrev'] = 'المراجعة السابقة'; +$lang['diffnextrev'] = 'المراجعة التالية'; +$lang['difflastrev'] = 'المراجعة الأخيرة'; +$lang['diffbothprevrev'] = 'جانبي المراجعة السابقة'; +$lang['diffbothnextrev'] = 'جانبي المراجعة التالية'; $lang['line'] = 'سطر'; $lang['breadcrumb'] = 'أثر:'; $lang['youarehere'] = 'أنت هنا:'; @@ -239,7 +249,6 @@ $lang['admin_register'] = 'أض٠مستخدما جديدا'; $lang['metaedit'] = 'تØرير البيانات الشمولية '; $lang['metasaveerr'] = 'Ùشلت كتابة البيانات الشمولية'; $lang['metasaveok'] = 'ØÙÙظت البيانات الشمولية'; -$lang['btn_img_backto'] = 'عودة إلى %s'; $lang['img_title'] = 'العنوان:'; $lang['img_caption'] = 'وصÙ:'; $lang['img_date'] = 'التاريخ:'; @@ -252,7 +261,6 @@ $lang['img_camera'] = 'الكمرا:'; $lang['img_keywords'] = 'كلمات Ù…ÙتاØية:'; $lang['img_width'] = 'العرض:'; $lang['img_height'] = 'الإرتÙاع:'; -$lang['btn_mediaManager'] = 'اعرض ÙÙŠ مدير الوسائط'; $lang['subscr_subscribe_success'] = 'اضي٠%s لقائمة اشتراك %s'; $lang['subscr_subscribe_error'] = 'خطأ ÙÙŠ إضاÙØ© %s لقائمة اشتراك %s'; $lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضاÙتك لقائمة الاشتراك'; @@ -287,6 +295,7 @@ $lang['i_phpver'] = 'نسخة PHP التي لديك هي وهي أقل من النسخة المطلوبة <code>%s</code> عليك تØديث نسخة PHP'; +$lang['i_mbfuncoverload'] = 'يجب ايقا٠تشغيل mbstring.func_overload ÙÙŠ مل٠php.ini لتشغيل دوكوويكي.'; $lang['i_permfail'] = 'إن <code>%s</code> غير قابل للكتابة بواسطة دوكو ويكي، عليك تعديل إعدادات الصلاØيات لهذا المجلد!'; $lang['i_confexists'] = 'إن <code>%s</code> موجود أصلاً'; $lang['i_writeerr'] = 'لا يمكن إنشاء <code>%s</code>ØŒ عليك التأكد من صلاØيات المل٠أو المجلد وإنشاء المل٠يدوياً.'; @@ -340,4 +349,5 @@ $lang['media_update'] = 'ارÙع إصدارا Ø£Øدث'; $lang['media_restore'] = 'استرجع هذه النسخة'; $lang['currentns'] = 'مساØØ© الاسم الØالية'; $lang['searchresult'] = 'نتيجة البØØ«'; +$lang['plainhtml'] = 'نص HTML غير منسق'; $lang['wikimarkup'] = 'علامات الوكي'; diff --git a/inc/lang/ar/searchpage.txt b/inc/lang/ar/searchpage.txt index 62c05f5e4e4f73431e111ec1d79592c5b77c8a76..56355f85f809c6810aa423cd36436496fc0156fe 100644 --- a/inc/lang/ar/searchpage.txt +++ b/inc/lang/ar/searchpage.txt @@ -1,5 +1,5 @@ ====== بØØ« ====== -نتائج البØØ« . إن لم تجد ما تبØØ« عنه، يمكنك إنشاء صÙØØ© جديدة بعنوان ما تبØØ« عنة بالضغط على زر "Øرر هذه الصÙØØ©". +نتائج البØØ« . @CREATEPAGEINFO@ ===== نتائج البØØ« ===== \ No newline at end of file diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index 5edcfbe58fff4546bb2240d89814ecdef8592c71..bcec31daecbea834b6ac70421913e906183e2c25 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -58,6 +58,7 @@ $lang['badlogin'] = 'TÉ™ssüf ki istifadəçi adı vÉ™ ya ÅŸifrÉ™ s $lang['minoredit'] = 'Az dÉ™yiÅŸiklÉ™r'; $lang['draftdate'] = 'Qaralama yadda saxlandı'; $lang['nosecedit'] = 'Bu vaxt É™rzindÉ™ sÉ™hifÉ™ dÉ™yiÅŸilmiÅŸdir, vÉ™ bölmÉ™ haqqında mÉ™lumat köhnÉ™lmiÅŸdir. SÉ™hifÉ™nin tam versiyası yüklÉ™nmiÅŸdir.'; +$lang['searchcreatepage'] = "ÆgÉ™r Siz axtardığınızı tapa bilmÉ™dinizsÉ™, onda Siz adı axtarışınız ilÉ™ uyÄŸun düşən yeni sÉ™hifÉ™ yarada bilÉ™rsiniz. Bunu elÉ™mÉ™k üçün, sadÉ™cÉ™ ''SÉ™hifÉ™ni yarat'' düymÉ™sini sıxın."; $lang['regmissing'] = 'TÉ™ssüf ki Siz bütün xanÉ™lÉ™ri doldurmalısınız.'; $lang['reguexists'] = 'TÉ™ssüf ki bu ad ilÉ™ istifadəçi artıq mövcuddur.'; $lang['regsuccess'] = 'Ä°stivadÉ™ci yaradıldı vÉ™ ÅŸifrÉ™ sizin e-maila göndÉ™rildi.'; diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt index 4f8efe007a0263a1b9ddbc9d31ec9d77166c7be5..6b7fce7549582b8771ee78da9827f360909c13d0 100644 --- a/inc/lang/az/searchpage.txt +++ b/inc/lang/az/searchpage.txt @@ -1,5 +1,5 @@ ====== Axtarış ====== -Qarşınızda - axtarışın nÉ™ticÉ™lÉ™ridir. ÆgÉ™r Siz axtardığınızı tapa bilmÉ™dinizsÉ™, onda Siz adı axtarışınız ilÉ™ uyÄŸun düşən yeni sÉ™hifÉ™ yarada bilÉ™rsiniz. Bunu elÉ™mÉ™k üçün, sadÉ™cÉ™ ''SÉ™hifÉ™ni yarat'' düymÉ™sini sıxın. +Qarşınızda - axtarışın nÉ™ticÉ™lÉ™ridir. @CREATEPAGEINFO@ ===== NÉ™ticÉ™lÉ™r ===== diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index bfa8b2ad78221826b2b427ef0975d5f3b2439d23..cfacd09aa6cb3abafe6dc77170597668898a1db9 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -66,6 +66,7 @@ $lang['badpassconfirm'] = 'За Ñъжаление паролата е г $lang['minoredit'] = 'Промените Ñа незначителни'; $lang['draftdate'] = 'Черновата е автоматично запиÑана на'; $lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на Ñтраницата поради неактуална информациÑ.'; +$lang['searchcreatepage'] = 'Ðко не намирате каквото Ñте Ñ‚ÑŠÑ€Ñили, може да Ñъздадете или редактирате Ñтраница, кръÑтена на вашата заÑвка, чрез ÑÑŠÐ¾Ñ‚Ð²ÐµÑ‚Ð½Ð¸Ñ Ð±ÑƒÑ‚Ð¾Ð½.'; $lang['regmissing'] = 'МолÑ, попълнете вÑички полета.'; $lang['reguexists'] = 'Вече ÑъщеÑтвува потребител Ñ Ð¸Ð·Ð±Ñ€Ð°Ð½Ð¾Ñ‚Ð¾ име.'; $lang['regsuccess'] = 'ПотребителÑÑ‚ е Ñъздаден, а паролата е пратена по електронната поща.'; diff --git a/inc/lang/bg/searchpage.txt b/inc/lang/bg/searchpage.txt index 48d47515af47a6da86757cfd8208db47835560af..a44c648cab745d1a3198a4dbcb65af0cbf89e109 100644 --- a/inc/lang/bg/searchpage.txt +++ b/inc/lang/bg/searchpage.txt @@ -1,5 +1,5 @@ ====== ТърÑене ====== -Резултата от Ñ‚ÑŠÑ€Ñенето ще намерите по-долу. Ðко не намирате каквото Ñте Ñ‚ÑŠÑ€Ñили, може да Ñъздадете или редактирате Ñтраница, кръÑтена на вашата заÑвка, чрез ÑÑŠÐ¾Ñ‚Ð²ÐµÑ‚Ð½Ð¸Ñ Ð±ÑƒÑ‚Ð¾Ð½. +Резултата от Ñ‚ÑŠÑ€Ñенето ще намерите по-долу. @CREATEPAGEINFO@ ===== Резултати ===== diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index 98607d322e6aff28230a84cce25610e429bf78f7..3a4e30923a910d773e47b2d54bf5b4f54b44c028 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -59,6 +59,7 @@ $lang['badlogin'] = 'Disculpe, pero el nom d\'usuari o la contrasen $lang['minoredit'] = 'Canvis menors'; $lang['draftdate'] = 'Borrador gravat el'; $lang['nosecedit'] = 'La pà gina ha canviat mentres tant, l\'informació de la secció no estava al dia, s\'ha carregat la pà gina sancera.'; +$lang['searchcreatepage'] = 'Si no ha trobat lo que buscava pot crear o editar una pà gina en el mateix nom que el text que ha buscat utilisant el botó corresponent.'; $lang['regmissing'] = 'Disculpe, pero deu omplir tots els camps.'; $lang['reguexists'] = 'Disculpe, pero ya existix un usuari en este nom.'; $lang['regsuccess'] = 'S\'ha creat l\'usuari i se li ha enviat la contrasenya per correu electrònic.'; diff --git a/inc/lang/ca-valencia/searchpage.txt b/inc/lang/ca-valencia/searchpage.txt index 80f7e9119380aa410016b2709903eefbcd5b7648..7ed3cd2afbed3a56ad587b8c2172bd8911a80678 100644 --- a/inc/lang/ca-valencia/searchpage.txt +++ b/inc/lang/ca-valencia/searchpage.txt @@ -1,5 +1,5 @@ ====== Buscar ====== -Pot vore els resultats de la busca acà avall. Si no ha trobat lo que buscava pot crear o editar una pà gina en el mateix nom que el text que ha buscat utilisant el botó corresponent. +Pot vore els resultats de la busca acà avall. @CREATEPAGEINFO@ ===== Resultats ===== diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 00d28083c9a05e8994fecb56102b8495f23c9076..31c16ee23e6577cc6281c98e8f189a5d1ee8e87d 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -62,6 +62,7 @@ $lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.'; $lang['minoredit'] = 'Canvis menors'; $lang['draftdate'] = 'L\'esborrany s\'ha desat automà ticament'; $lang['nosecedit'] = 'Mentrestant la pà gina ha estat modificada. La informació de seccions estava obsoleta i ha calgut carregar la pà gina sencera.'; +$lang['searchcreatepage'] = "Si no trobeu allò que buscà veu, podeu crear una pà gina nova per mitjà del botó ''Edita aquesta pà gina''."; $lang['regmissing'] = 'Heu d\'omplir tots els camps.'; $lang['reguexists'] = 'Ja existeix un altre usuari amb aquest nom.'; $lang['regsuccess'] = 'S\'ha creat l\'usuari. La contrasenya s\'ha enviat per correu.'; diff --git a/inc/lang/ca/searchpage.txt b/inc/lang/ca/searchpage.txt index bf69aef155129c87e5654ba05626d2b6ae1c4311..27efcdabfd98327ee2ce670a62de677cec7fed6c 100644 --- a/inc/lang/ca/searchpage.txt +++ b/inc/lang/ca/searchpage.txt @@ -1,5 +1,5 @@ ====== Cerca ====== -Heus acà els resultats de la cerca. Si no trobeu allò que buscà veu, podeu crear una pà gina nova per mitjà del botó ''Edita aquesta pà gina''. +Heus acà els resultats de la cerca. @CREATEPAGEINFO@ ===== Resultats ===== \ No newline at end of file diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index fa0a650440f89341a98ed9edaa57af090ece56f1..1dd4def5ac4917dd627fd57175e272ec0441d1bc 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -17,6 +17,8 @@ * @author ZbynÄ›k KÅ™ivka <krivka@fit.vutbr.cz> * @author Petr KlÃma <qaxi@seznam.cz> * @author Radovan Buroň <radovan@buron.cz> + * @author Viktor Zavadil <vzavadil@newps.cz> + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -49,7 +51,7 @@ $lang['btn_delete'] = 'Vymazat'; $lang['btn_back'] = 'ZpÄ›t'; $lang['btn_backlink'] = 'ZpÄ›tné odkazy'; $lang['btn_backtomedia'] = 'ZpÄ›t do VýbÄ›ru dokumentu'; -$lang['btn_subscribe'] = 'OdebÃrat emailem zmÄ›ny stránky'; +$lang['btn_subscribe'] = 'OdebÃrat e-mailem zmÄ›ny stránky'; $lang['btn_profile'] = 'Upravit profil'; $lang['btn_reset'] = 'Reset'; $lang['btn_resendpwd'] = 'Nastavit nové heslo'; @@ -68,7 +70,7 @@ $lang['user'] = 'Uživatelské jméno'; $lang['pass'] = 'Heslo'; $lang['newpass'] = 'Nové heslo'; $lang['oldpass'] = 'SouÄasné heslo'; -$lang['passchk'] = 'jeÅ¡tÄ› jednou'; +$lang['passchk'] = 'Zopakovat'; $lang['remember'] = 'PÅ™ihlásit se nastálo'; $lang['fullname'] = 'Celé jméno'; $lang['email'] = 'E-mail'; @@ -78,18 +80,19 @@ $lang['badpassconfirm'] = 'Bohužel Å¡patné heslo'; $lang['minoredit'] = 'Drobné zmÄ›ny'; $lang['draftdate'] = 'Koncept automaticky uložen v'; $lang['nosecedit'] = 'Stránka byla v meziÄase zmÄ›nÄ›na. Informace o sekci již nebylo platné, byla naÄtena celá stránka.'; +$lang['searchcreatepage'] = 'Pokud jste nenaÅ¡li, co hledáte, zkuste požadovanou stránku sami vytvoÅ™it stisknutÃm tlaÄÃtka \'\'VytvoÅ™it stránku\'\'.'; $lang['regmissing'] = 'MusÃte vyplnit vÅ¡echny údaje.'; $lang['reguexists'] = 'Uživatel se stejným jménem už je zaregistrován.'; -$lang['regsuccess'] = 'Uživatelský úÄet byl vytvoÅ™en a heslo zasláno mailem.'; +$lang['regsuccess'] = 'Uživatelský úÄet byl vytvoÅ™en a heslo zasláno e-mailem.'; $lang['regsuccess2'] = 'Uživatelský úÄet byl vytvoÅ™en.'; $lang['regmailfail'] = 'Zdá se, že nastala chyba pÅ™i posÃlánà mailu s heslem. Zkuste kontaktovat správce.'; -$lang['regbadmail'] = 'Zadaná mailová adresa nenà platná. Pokud si myslÃte, že to je Å¡patnÄ›, zkuste kontaktovat správce.'; +$lang['regbadmail'] = 'Zadaná e-mailová adresa nenà platná. Pokud si myslÃte, že to je Å¡patnÄ›, zkuste kontaktovat správce.'; $lang['regbadpass'] = 'Heslo nebylo zadáno dvakrát stejnÄ›, zkuste to prosÃm znovu.'; $lang['regpwmail'] = 'VaÅ¡e heslo do systému DokuWiki'; $lang['reghere'] = 'Nemáte uživatelský úÄet? ZÅ™iÄte si ho'; $lang['profna'] = 'Tato wiki neumožňuje zmÄ›nu profilu'; $lang['profnochange'] = 'Žádné zmÄ›ny nebyly provedeny.'; -$lang['profnoempty'] = 'Nelze zadat prázdné jméno nebo mailová adresa.'; +$lang['profnoempty'] = 'Nelze vynechat jméno nebo e-mailovou adresu.'; $lang['profchanged'] = 'Uživatelský profil zmÄ›nÄ›n.'; $lang['profnodelete'] = 'Tato wiki nepodporuje mazánà uživatelů'; $lang['profdeleteuser'] = 'Smazat úÄet'; @@ -102,8 +105,8 @@ $lang['resendpwd'] = 'Nastavit nové heslo pro'; $lang['resendpwdmissing'] = 'MusÃte vyplnit vÅ¡echny položky.'; $lang['resendpwdnouser'] = 'Bohužel takový uživatel v systému nenÃ.'; $lang['resendpwdbadauth'] = 'AutorizaÄnà kód nenà platný. Zadali jste opravdu celý odkaz na potvrzovacà stránku?'; -$lang['resendpwdconfirm'] = 'Odkaz na potvrzovacà stránku byl odeslán mailem.'; -$lang['resendpwdsuccess'] = 'VaÅ¡e nové heslo bylo odesláno emailem.'; +$lang['resendpwdconfirm'] = 'Odkaz na potvrzovacà stránku byl odeslán e-mailem.'; +$lang['resendpwdsuccess'] = 'VaÅ¡e nové heslo bylo odesláno e-mailem.'; $lang['license'] = 'KromÄ› mÃst, kde je explicitnÄ› uvedeno jinak, je obsah této wiki licencován pod následujÃcà licencÃ:'; $lang['licenseok'] = 'Poznámka: TÃm, že editujete tuto stránku, souhlasÃte, aby váš obsah byl licencován pod následujÃcà licencÃ:'; $lang['searchmedia'] = 'Hledat jméno souboru:'; @@ -194,6 +197,11 @@ $lang['difflink'] = 'Odkaz na výstup diff'; $lang['diff_type'] = 'Zobrazit rozdÃly:'; $lang['diff_inline'] = 'Vložené'; $lang['diff_side'] = 'PÅ™idané'; +$lang['diffprevrev'] = 'PÅ™edchozà verze'; +$lang['diffnextrev'] = 'NásledujÃcà verze'; +$lang['difflastrev'] = 'Poslednà revize'; +$lang['diffbothprevrev'] = 'ObÄ› strany pÅ™edchozà revize'; +$lang['diffbothnextrev'] = 'ObÄ› strany pÅ™ÃÅ¡tà revize'; $lang['line'] = 'Řádek'; $lang['breadcrumb'] = 'Historie:'; $lang['youarehere'] = 'UmÃstÄ›nÃ:'; @@ -270,14 +278,14 @@ $lang['subscr_unsubscribe_error'] = 'DoÅ¡lo k chybÄ› pÅ™i odhlaÅ¡ovánà %s ze s $lang['subscr_already_subscribed'] = '%s již je pÅ™ihlášen do seznamu odbÄ›ratelů %s'; $lang['subscr_not_subscribed'] = '%s nenà pÅ™ihlášen do seznamu odbÄ›ratelů %s'; $lang['subscr_m_not_subscribed'] = 'V souÄasné dobÄ› neodebÃráte zmÄ›ny na aktuálnà stránce nebo ve jmenném prostoru.'; -$lang['subscr_m_new_header'] = 'PÅ™ihlásit k odebÃránà zmÄ›n emailem'; +$lang['subscr_m_new_header'] = 'PÅ™ihlásit k odebÃránà zmÄ›n e-mailem'; $lang['subscr_m_current_header'] = 'Aktuálnà odbÄ›ratelé zmÄ›n'; -$lang['subscr_m_unsubscribe'] = 'Odhlásit z odbÄ›ru zmÄ›n emailem'; -$lang['subscr_m_subscribe'] = 'PÅ™ihlásit se k odbÄ›ru zmÄ›n emailem'; +$lang['subscr_m_unsubscribe'] = 'Odhlásit z odbÄ›ru zmÄ›n e-mailem'; +$lang['subscr_m_subscribe'] = 'PÅ™ihlásit se k odbÄ›ru zmÄ›n e-mailem'; $lang['subscr_m_receive'] = 'PÅ™ejete si dostávat'; -$lang['subscr_style_every'] = 'email pro každou zmÄ›nu'; -$lang['subscr_style_digest'] = 'souhrnný email zmÄ›n pro každou stránku (každé %.2f dny/dnÃ)'; -$lang['subscr_style_list'] = 'seznam zmÄ›nÄ›ných stránek od poslednÃho emailu (každé %.2f dny/dnÃ)'; +$lang['subscr_style_every'] = 'e-mail pro každou zmÄ›nu'; +$lang['subscr_style_digest'] = 'souhrnný e-mail zmÄ›n pro každou stránku (každé %.2f dny/dnÃ)'; +$lang['subscr_style_list'] = 'seznam zmÄ›nÄ›ných stránek od poslednÃho e-mailu (každé %.2f dny/dnÃ)'; $lang['authtempfail'] = 'Autentizace uživatelů je doÄasnÄ› nedostupná. Pokud tento problém pÅ™etrvává, informujte prosÃm správce této wiki.'; $lang['authpwdexpire'] = 'Platnost vaÅ¡eho hesla vyprÅ¡Ã za %d dnÃ, mÄ›li byste ho zmÄ›nit co nejdÅ™Ãve.'; $lang['i_chooselang'] = 'Vyberte si jazyk'; @@ -289,6 +297,7 @@ $lang['i_problems'] = 'Instalátor narazil na nÞe popsané problé $lang['i_modified'] = 'Instalátor bude z bezpeÄnostnÃch důvodů pracovat pouze s Äistou a jeÅ¡tÄ› neupravenou instalacà DokuWiki. BuÄ znovu rozbalte soubory z instalaÄnÃho balÃÄku, nebo zkuste prostudovat <a href="http://dokuwiki.org/install">instrukce pro instalaci DokuWiki</a>.'; $lang['i_funcna'] = 'PHP funkce <code>%s</code> nenà dostupná. Váš webhosting ji možná z nÄ›jakého důvodu vypnul.'; $lang['i_phpver'] = 'Verze vaÅ¡Ã instalace PHP <code>%s</code> je nižšà než požadovaná <code>%s</code>. Budete muset aktualizovat svou instalaci PHP.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload musà být vypnut v php.ini pro bÄ›h DokuWiki.'; $lang['i_permfail'] = 'DokuWiki nemůže zapisovat do <code>%s</code>. Budete muset opravit práva k tomuto adresáři.'; $lang['i_confexists'] = '<code>%s</code> již existuje'; $lang['i_writeerr'] = 'Nelze vytvoÅ™it <code>%s</code>. Budete muset zkontrolovat práva k souborům Äi adresářům a vytvoÅ™it tento soubor ruÄnÄ›.'; @@ -342,3 +351,5 @@ $lang['currentns'] = 'Aktuálnà jmenný prostor'; $lang['searchresult'] = 'Výsledek hledánÃ'; $lang['plainhtml'] = 'ÄŒisté HTML'; $lang['wikimarkup'] = 'Wiki jazyk'; +$lang['page_nonexist_rev'] = 'Stránka neexistovala na %s. Byla vytvoÅ™ena dodateÄne na <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Nelze rozebrat parametr "%s".'; diff --git a/inc/lang/cs/mailtext.txt b/inc/lang/cs/mailtext.txt index f235a299b307bb3208c8edbe0a5d770f7d46bbe6..443fc3e98349c1d0a852e0324af974b320495cbe 100644 --- a/inc/lang/cs/mailtext.txt +++ b/inc/lang/cs/mailtext.txt @@ -13,5 +13,5 @@ Uživatel : @USER@ -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ diff --git a/inc/lang/cs/password.txt b/inc/lang/cs/password.txt index 18f21f1b1267dcd116f18540a17735421e64b5de..1b9f7777830012085b70feb2c7122241b72700c1 100644 --- a/inc/lang/cs/password.txt +++ b/inc/lang/cs/password.txt @@ -1,4 +1,4 @@ -Dobrý den, +Dobrý den! Zde jsou pÅ™ihlaÅ¡ovacà informace pro wiki @TITLE@ (@DOKUWIKIURL@) @@ -7,5 +7,5 @@ Uživatelské jméno : @LOGIN@ Heslo : @PASSWORD@ -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ diff --git a/inc/lang/cs/pwconfirm.txt b/inc/lang/cs/pwconfirm.txt index aa37b3b8436e327ee7311594d339c0bea884f2b7..4fcc0ab26f4dff8d26f326ad14b69b59cf5c36e0 100644 --- a/inc/lang/cs/pwconfirm.txt +++ b/inc/lang/cs/pwconfirm.txt @@ -1,13 +1,13 @@ -Dobrý den, +Dobrý den! NÄ›kdo požádal o nové heslo k vaÅ¡emu uživatelskému úÄtu na wiki @TITLE@ (@DOKUWIKIURL@) -Pokud jste o nové heslo nežádali, ignorujte prosÃm tento email. +Pokud jste o nové heslo nežádali, ignorujte prosÃm tento e-mail. Pro potvrzenÃ, že jste tento požadavek poslali opravdu vy, prosÃm otevÅ™ete následujÃcà odkaz. @CONFIRM@ -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/cs/registermail.txt b/inc/lang/cs/registermail.txt index 201e7b7799394820b5df8274e3cb2f8ed35ac489..f44189941169f3925aaa7645dc266959c002efa5 100644 --- a/inc/lang/cs/registermail.txt +++ b/inc/lang/cs/registermail.txt @@ -10,5 +10,5 @@ IP adresa : @IPADDRESS@ Hostitel : @HOSTNAME@ -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/cs/resendpwd.txt b/inc/lang/cs/resendpwd.txt index 1d2aa0d9718fcf692648188c8a2a5da8c9aae46c..0820f287b5efaca40c3ceeee1346f0185f875e6c 100644 --- a/inc/lang/cs/resendpwd.txt +++ b/inc/lang/cs/resendpwd.txt @@ -1,3 +1,3 @@ ====== Zaslat nové heslo ====== -Abyste zÃskali nové heslo k vaÅ¡emu uÄtu v této wiki, vyplňte vÅ¡echny nÞe uvedené informace . VaÅ¡e nové heslo bude zasláno na emailovou adresu, kterou jste zadali pÅ™i registraci. Uživatelské jméno by mÄ›lo být stejné jako vaÅ¡e uživatelské jméno, s nÃmž se pÅ™ihlaÅ¡ujete do této wiki. +Abyste zÃskali nové heslo ke svému úÄtu v této wiki, vyplňte vÅ¡echny nÞe uvedené informace. Nové heslo bude zasláno na e-mailovou adresu, kterou jste zadali pÅ™i registraci. Uživatelské jméno by mÄ›lo být stejné jako vaÅ¡e uživatelské jméno, s nÃmž se pÅ™ihlaÅ¡ujete do této wiki. diff --git a/inc/lang/cs/searchpage.txt b/inc/lang/cs/searchpage.txt index ac045e100ae376dc348e4fd201685907ae5fb5ea..2f5e89ff65f074ab0565bcbaad125f098beb5eff 100644 --- a/inc/lang/cs/searchpage.txt +++ b/inc/lang/cs/searchpage.txt @@ -1,5 +1,5 @@ ====== Vyhledávánà ====== -Výsledky hledánà můžete vidÄ›t nÞe. Pokud jste nenaÅ¡li, co hledáte, zkuste požadovanou stránku sami vytvoÅ™it stisknutÃm tlaÄÃtka ''VytvoÅ™it stránku''. +Výsledky hledánà můžete vidÄ›t nÞe. @CREATEPAGEINFO@ ===== Výsledky ===== diff --git a/inc/lang/cs/subscr_digest.txt b/inc/lang/cs/subscr_digest.txt index 1b177096557a8ebfdf13f503717a66ae2cf0c527..128d91931e9179cef1e8358b91995bd79ee75568 100644 --- a/inc/lang/cs/subscr_digest.txt +++ b/inc/lang/cs/subscr_digest.txt @@ -11,12 +11,12 @@ Stará revize: @OLDPAGE@ Nová revize: @NEWPAGE@ Pro odhlášenà z odebÃránà zmÄ›n na této webové stránce -se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese +se prosÃm pÅ™ihlaÅ¡te do wiki na adrese @DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ -a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi +a odhlaste se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/cs/subscr_list.txt b/inc/lang/cs/subscr_list.txt index f85be8a9f5ffb9f9dc5e2fa52800c7c30f28f718..81b344dc834d8c5860712c77fd70ffed7372d521 100644 --- a/inc/lang/cs/subscr_list.txt +++ b/inc/lang/cs/subscr_list.txt @@ -11,9 +11,9 @@ Pro odhlášenà z odebÃránà zmÄ›n se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese @DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ -a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi +a odhlaste se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/cs/subscr_single.txt b/inc/lang/cs/subscr_single.txt index 1ee33da0918999b8cf21aade88d8e4d5d2b652da..6f3774cd979dfb96925ee758756d2dca771784d2 100644 --- a/inc/lang/cs/subscr_single.txt +++ b/inc/lang/cs/subscr_single.txt @@ -14,12 +14,12 @@ Stará revize: @OLDPAGE@ Nová revize: @NEWPAGE@ Pro odhlášenà z odebÃránà zmÄ›n na této webové stránce -se prosÃm pÅ™ÃhlaÅ¡te do wiki na adrese +se prosÃm pÅ™ihlaÅ¡te do wiki na adrese @DOKUWIKIURL@, pak navÅ¡tivte @SUBSCRIBE@ -a odhlaÅ¡tÄ› se z odebÃránà zmÄ›n na stránce Äi +a odhlaste se z odebÃránà zmÄ›n na stránce Äi ve jmenném prostoru. -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/cs/uploadmail.txt b/inc/lang/cs/uploadmail.txt index b19b0bf7e1a3351b37d552c564f4c302b27e1112..28f4e2895cbf9108edfd12ddd567d9591d5ed1ca 100644 --- a/inc/lang/cs/uploadmail.txt +++ b/inc/lang/cs/uploadmail.txt @@ -1,4 +1,4 @@ -Do vaÅ¡Ã DokuWiki byl nahrán nový dokument. Tady jsou detaily: +Do DokuWiki byl nahrán nový dokument. Tady jsou detaily: Soubor : @MEDIA@ Datum : @DATE@ @@ -10,5 +10,5 @@ MIME typ : @MIME@ Uživatel : @USER@ -- -Tento email byl automaticky vygenerován systémem DokuWiki +Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 3f06bf7583ea7926e54c848052e909e132c968b8..3b353d50cc8209435b4da983cef93908f48486f3 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -17,6 +17,8 @@ * @author Soren Birk <soer9648@hotmail.com> * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> + * @author Søren Birk <sbi@eucl.dk> + * @author Søren Birk <soer9648@eucl.dk> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -61,6 +63,8 @@ $lang['btn_register'] = 'Registrér'; $lang['btn_apply'] = 'Anvend'; $lang['btn_media'] = 'Media Manager'; $lang['btn_deleteuser'] = 'Fjern Min Konto'; +$lang['btn_img_backto'] = 'Tilbage til %s'; +$lang['btn_mediaManager'] = 'Vis i Media Manager'; $lang['loggedinas'] = 'Logget ind som:'; $lang['user'] = 'Brugernavn'; $lang['pass'] = 'Adgangskode'; @@ -76,6 +80,7 @@ $lang['badpassconfirm'] = 'Kodeordet var desværre forkert'; $lang['minoredit'] = 'Mindre ændringer'; $lang['draftdate'] = 'Kladde automatisk gemt d.'; $lang['nosecedit'] = 'Siden blev ændret i mellemtiden, sektions information var for gammel, hentede hele siden i stedet.'; +$lang['searchcreatepage'] = 'Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke pÃ¥ knappen **\'\'[Opret dette dokument]\'\'**.'; $lang['regmissing'] = 'Du skal udfylde alle felter.'; $lang['reguexists'] = 'Dette brugernavn er allerede i brug.'; $lang['regsuccess'] = 'Du er nu oprettet som bruger. Dit adgangskode bliver sendt til dig i en e-mail.'; @@ -147,6 +152,7 @@ $lang['js']['restore_confirm'] = 'Vil du virkeligt genskabe denne version?'; $lang['js']['media_diff'] = 'Vis forskelle:'; $lang['js']['media_diff_both'] = 'Side ved Side'; $lang['js']['media_diff_opacity'] = 'Skin-igennem'; +$lang['js']['media_diff_portions'] = 'Skub'; $lang['js']['media_select'] = 'Vælg filer...'; $lang['js']['media_upload_btn'] = 'Upload'; $lang['js']['media_done_btn'] = 'Færdig'; @@ -190,6 +196,11 @@ $lang['difflink'] = 'Link til denne sammenlinings vising'; $lang['diff_type'] = 'Vis forskelle:'; $lang['diff_inline'] = 'Indeni'; $lang['diff_side'] = 'Side ved Side'; +$lang['diffprevrev'] = 'Forrige revision'; +$lang['diffnextrev'] = 'Næste revision'; +$lang['difflastrev'] = 'Sidste revision'; +$lang['diffbothprevrev'] = 'Begge sider forrige revision'; +$lang['diffbothnextrev'] = 'Begge sider næste revision'; $lang['line'] = 'Linje'; $lang['breadcrumb'] = 'Sti:'; $lang['youarehere'] = 'Du er her:'; @@ -246,7 +257,6 @@ $lang['admin_register'] = 'Tilføj ny bruger'; $lang['metaedit'] = 'Rediger metadata'; $lang['metasaveerr'] = 'Skrivning af metadata fejlede'; $lang['metasaveok'] = 'Metadata gemt'; -$lang['btn_img_backto'] = 'Tilbage til %s'; $lang['img_title'] = 'Titel:'; $lang['img_caption'] = 'Billedtekst:'; $lang['img_date'] = 'Dato:'; @@ -259,7 +269,6 @@ $lang['img_camera'] = 'Kamera:'; $lang['img_keywords'] = 'Emneord:'; $lang['img_width'] = 'Bredde:'; $lang['img_height'] = 'Højde:'; -$lang['btn_mediaManager'] = 'Vis i Media Manager'; $lang['subscr_subscribe_success'] = 'Tilføjede %s til abonnement listen for %s'; $lang['subscr_subscribe_error'] = 'Fejl ved tilføjelse af %s til abonnement listen for %s'; $lang['subscr_subscribe_noaddress'] = 'Der er ikke nogen addresse forbundet til din bruger, sÃ¥ du kan ikke blive tilføjet til abonnement listen'; @@ -289,6 +298,7 @@ Du burde enten gen-udpakke filerne fra den hentede pakke eller tjekke den fuldst <a href="http://dokuwiki.org/install">DokuWiki installations instruktioner</a>'; $lang['i_funcna'] = 'PHP funtionen <code>%s</code> er ikke tilgængelig. MÃ¥ske har din udbyder slÃ¥et det fra af en eller anden grund?'; $lang['i_phpver'] = 'Din PHP version <code>%s</code> er mindre en den nødvendige <code>%s</code>. Du er nød til at opgradere din PHP installation.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload skal være deaktiveret i php.ini for at køre DokuWiki.'; $lang['i_permfail'] = 'DokuWiki kan ikke skrive til <code>%s</code>. Du er nød til at rette tilladelses indstillingerne for denne mappe!'; $lang['i_confexists'] = '<code>%s</code> eksisterer allerede'; $lang['i_writeerr'] = 'Kunne ikke oprette <code>%s</code>. Du bliver nød til at tjekke mappe/fil- tilladelserne og oprette filen manuelt.'; @@ -300,10 +310,12 @@ $lang['i_policy'] = 'Begyndende ACL politik'; $lang['i_pol0'] = 'Ã…ben Wiki (alle kan læse, skrive og uploade)'; $lang['i_pol1'] = 'Offentlig Wiki (alle kan læse, kun registrerede brugere kan skrive og overføre)'; $lang['i_pol2'] = 'Lukket Wiki (kun for registerede brugere kan læse, skrive og overføre)'; +$lang['i_allowreg'] = 'Tillad at brugere kan registrere sig selv'; $lang['i_retry'] = 'Forsøg igen'; $lang['i_license'] = 'Vælg venligst licensen du vil tilføje dit indhold under:'; $lang['i_license_none'] = 'Vis ikke licensinformationer'; $lang['i_pop_field'] = 'Hjælp os venligst med at forbedre oplevelsen af DokuWiki:'; +$lang['i_pop_label'] = 'Send anonymt brugsdata til DokuWikis udviklere, én gang om mÃ¥neden'; $lang['recent_global'] = 'Du ser lige nu ændringerne i <b>%s</b> navnerummet. Du kan ogsÃ¥ <a href="%s">se de sidste ændringer for hele wiki siden </a>'; $lang['years'] = '%d Ã¥r siden'; $lang['months'] = '%d mÃ¥ned siden'; @@ -336,3 +348,8 @@ $lang['media_perm_read'] = 'Du har ikke nok rettigheder til at læse filer $lang['media_perm_upload'] = 'Du har ikke nok rettigheder til at uploade filer.'; $lang['media_update'] = 'Upload ny version'; $lang['media_restore'] = 'Genskab denne version'; +$lang['currentns'] = 'Nuværende navnerum'; +$lang['searchresult'] = 'Søgsresultat'; +$lang['plainhtml'] = 'Ren HTML'; +$lang['wikimarkup'] = 'Wiki Opmærkning'; +$lang['page_nonexist_rev'] = 'Siden blev ikke fundet ved %s. Den blev efterfølgende oprettet ved <a href="%s">%s</a>.'; diff --git a/inc/lang/da/searchpage.txt b/inc/lang/da/searchpage.txt index eca1b589cda8c04cb4ff6306b1a0c2c1ee8b1330..9cefd419ca2f78acb25522823f1729cc4adeed21 100644 --- a/inc/lang/da/searchpage.txt +++ b/inc/lang/da/searchpage.txt @@ -1,5 +1,5 @@ ====== Søgning ====== -Du kan se resultaterne af din søgning nedenunder. Hvis resultaterne ikke indeholder det du søgte efter kan du oprette et nyt dokument med samme navn som søgningen ved at trykke pÃ¥ knappen **''[Opret dette dokument]''**. +Du kan se resultaterne af din søgning nedenunder. @CREATEPAGEINFO@ ===== Søgeresultater ===== diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index c81109580b35f9ba8958334d532cb23bd38ae292..1a1491f6bb1ea99860fcbc3918c428941a94bda1 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -81,6 +81,7 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.'; $lang['minoredit'] = 'Kleine Änderung'; $lang['draftdate'] = 'Entwurf gespeichert am'; $lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, da das Sektionsinfo veraltet ist. Die ganze Seite wird stattdessen geladen.'; +$lang['searchcreatepage'] = "Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **''[Seite anlegen]''** drückst."; $lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden'; $lang['reguexists'] = 'Der Benutzername existiert leider schon.'; $lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.'; diff --git a/inc/lang/de-informal/searchpage.txt b/inc/lang/de-informal/searchpage.txt index 72c57b765812c723c1eada231e531c6152de1152..e78e4abddbc350075dc347ced691ca7bfa5d3183 100644 --- a/inc/lang/de-informal/searchpage.txt +++ b/inc/lang/de-informal/searchpage.txt @@ -1,6 +1,6 @@ ====== Suche ====== -Unten sind die Ergebnisse deiner Suche gelistet. Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue Seite für den Suchbegriff anlegen, indem du auf den Knopf **''[Seite anlegen]''** drückst. +Unten sind die Ergebnisse deiner Suche gelistet. @CREATEPAGEINFO@ ===== Ergebnisse ===== diff --git a/inc/lang/de/backlinks.txt b/inc/lang/de/backlinks.txt index 1ffa815c213f4337809eedae3bd5a268dd97626b..25e0ed5f9e50526b34bb593aad0dda694e6142c5 100644 --- a/inc/lang/de/backlinks.txt +++ b/inc/lang/de/backlinks.txt @@ -1,5 +1,5 @@ ====== Links hierher ====== -Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite verlinken. +Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite führen. diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 12b7db396bb3ba32661900f5715e268752b3b0e2..2725c247a3988a60a0dac5f3f12ce680bb50316e 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -26,6 +26,8 @@ * @author Joerg <scooter22@gmx.de> * @author Simon <st103267@stud.uni-stuttgart.de> * @author Hoisl <hoisl@gmx.at> + * @author Marcel Eickhoff <eickhoff.marcel@gmail.com> + * @author Pascal Schröder <Pascal1802@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -87,6 +89,7 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.'; $lang['minoredit'] = 'kleine Änderung'; $lang['draftdate'] = 'Entwurf gespeichert am'; $lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, Sektionsinfo ist veraltet, lade stattdessen volle Seite.'; +$lang['searchcreatepage'] = 'Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **\'\'[Seite anlegen]\'\'** Knopf drücken.'; $lang['regmissing'] = 'Alle Felder müssen ausgefüllt werden.'; $lang['reguexists'] = 'Der Benutzername existiert leider schon.'; $lang['regsuccess'] = 'Der neue Benutzer wurde angelegt und das Passwort per E-Mail versandt.'; @@ -204,6 +207,8 @@ $lang['diff_side'] = 'Side by Side'; $lang['diffprevrev'] = 'Vorhergehende Ãœberarbeitung'; $lang['diffnextrev'] = 'Nächste Ãœberarbeitung'; $lang['difflastrev'] = 'Letzte Ãœberarbeitung'; +$lang['diffbothprevrev'] = 'Beide Seiten der vorigen Revision'; +$lang['diffbothnextrev'] = 'Beide Seiten der Revision'; $lang['line'] = 'Zeile'; $lang['breadcrumb'] = 'Zuletzt angesehen:'; $lang['youarehere'] = 'Sie befinden sich hier:'; @@ -299,6 +304,7 @@ $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführ $lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Skript nur mit einer neuen bzw. nicht modifizierten DokuWiki Installation. Sie sollten entweder alle Dateien noch einmal frisch installieren oder die <a href="http://dokuwiki.org/install">Dokuwiki-Installationsanleitung</a> konsultieren.'; $lang['i_funcna'] = 'Die PHP-Funktion <code>%s</code> ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?'; $lang['i_phpver'] = 'Ihre PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisieren Sie Ihre PHP-Installation.'; +$lang['i_mbfuncoverload'] = 'Um DokuWiki zu starten muss mbstring.func_overload in php.ini ausgeschaltet sein.'; $lang['i_permfail'] = '<code>%s</code> ist nicht durch DokuWiki beschreibbar. Sie müssen die Berechtigungen dieses Ordners ändern!'; $lang['i_confexists'] = '<code>%s</code> existiert bereits'; $lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Sie sollten die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.'; @@ -352,3 +358,5 @@ $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnisse'; $lang['plainhtml'] = 'HTML Klartext'; $lang['wikimarkup'] = 'Wiki Markup'; +$lang['page_nonexist_rev'] = 'DIe Seite exitiert nicht unter %s. Sie wurde aber unter <a herf="%s">%s</a>'; +$lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.'; diff --git a/inc/lang/de/searchpage.txt b/inc/lang/de/searchpage.txt index 56104551b73462706371797f8f5c772c37e70322..6cd8006ac3cc1ea9a903c98736040511b453a821 100644 --- a/inc/lang/de/searchpage.txt +++ b/inc/lang/de/searchpage.txt @@ -1,6 +1,6 @@ ====== Suche ====== -Unten sind die Ergebnisse Ihrer Suche gelistet. Falls der gesuchte Begriff nicht gefunden wurde, können Sie direkt eine neue Seite für den Suchbegriff anlegen, indem Sie auf den **''[Seite anlegen]''** Knopf drücken. +Unten sind die Ergebnisse Ihrer Suche gelistet. @CREATEPAGEINFO@ ===== Ergebnisse ===== diff --git a/inc/lang/el/searchpage.txt b/inc/lang/el/searchpage.txt index b52162b60c1f4fba8aaef160e86d939f7b5b1088..c5bbbbfae9c0eb6be335dcd980739a79df25f0ee 100644 --- a/inc/lang/el/searchpage.txt +++ b/inc/lang/el/searchpage.txt @@ -1,4 +1,4 @@ ====== Αναζήτηση ====== -Τα αποτελÎσματα της αναζήτησής σας: +Τα αποτελÎσματα της αναζήτησής σας. @CREATEPAGEINFO@ diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 9c1e5dacd1bc7ffaab15cc0a535d6f336f1e7a29..fb455f85fc643779e2f8e0236df3096a092ab48a 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -70,6 +70,7 @@ $lang['badpassconfirm'] = 'Sorry, the password was wrong'; $lang['minoredit'] = 'Minor Changes'; $lang['draftdate'] = 'Draft autosaved on'; // full dformat date will be added $lang['nosecedit'] = 'The page was changed in the meantime, section info was out of date loaded full page instead.'; +$lang['searchcreatepage'] = 'If you didn\'t find what you were looking for, you can create or edit the page named after your query with the appropriate tool.'; $lang['regmissing'] = 'Sorry, you must fill in all fields.'; $lang['reguexists'] = 'Sorry, a user with this login already exists.'; @@ -367,4 +368,6 @@ $lang['currentns'] = 'Current namespace'; $lang['searchresult'] = 'Search Result'; $lang['plainhtml'] = 'Plain HTML'; $lang['wikimarkup'] = 'Wiki Markup'; +$lang['page_nonexist_rev'] = 'Page did not exist at %s. It was subsequently created at <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Unable to parse at parameter "%s".'; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/en/searchpage.txt b/inc/lang/en/searchpage.txt index 50578db3ff15cab931b7e7857c85ac6d65f32296..ba0960aa682bcc3e5e6a87a7aecba5f913fc0c77 100644 --- a/inc/lang/en/searchpage.txt +++ b/inc/lang/en/searchpage.txt @@ -1,5 +1,5 @@ ====== Search ====== -You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate tool. +You can find the results of your search below. @CREATEPAGEINFO@ ===== Results ===== diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index f81de7fa1600d479ee041682ab9bae972f5df05b..0cb84a2de268bdb70e8f067240bcd38dc49f4376 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -71,6 +71,7 @@ $lang['badpassconfirm'] = 'Pardonu, la pasvorto malÄustis'; $lang['minoredit'] = 'Etaj modifoj'; $lang['draftdate'] = 'Lasta konservo de la skizo:'; $lang['nosecedit'] = 'La paÄo ÅanÄiÄis intertempe, sekcio-informo estis malÄisdata, tial la tuta paÄo estas reÅargita.'; +$lang['searchcreatepage'] = 'Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paÄon kun necesa nomo per la koresponda butono.'; $lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.'; $lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; $lang['regsuccess'] = 'La uzanto kreiÄis kaj la pasvorto sendiÄis per retpoÅto.'; diff --git a/inc/lang/eo/searchpage.txt b/inc/lang/eo/searchpage.txt index a940c503d02e6f730fe2a1b42c80cb2bf91d80d0..bdefe7b59f328c0ef39c83a5752bbb66f90ff36a 100644 --- a/inc/lang/eo/searchpage.txt +++ b/inc/lang/eo/searchpage.txt @@ -1,5 +1,5 @@ ====== Serĉo ====== -Sube estas rezultoj de serĉo en la retejo.\\ Se vi ne trovis tion, kion vi serĉis, vi povas krei novan paÄon kun necesa nomo per la koresponda butono. +Sube estas rezultoj de serĉo en la retejo.\\ @CREATEPAGEINFO@ ===== Rezultoj ===== diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 47bee3b6f1218394b787124a268ecc4097fe50fd..8f4cb2977640ed3f848a70b067602089bdc45244 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -98,6 +98,7 @@ $lang['badpassconfirm'] = 'Lo siento, la contraseña es errónea'; $lang['minoredit'] = 'Cambios menores'; $lang['draftdate'] = 'Borrador guardado automáticamente:'; $lang['nosecedit'] = 'La página ha cambiado en el lapso, la información de sección estaba anticuada, en su lugar se cargó la página completa.'; +$lang['searchcreatepage'] = "Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''."; $lang['regmissing'] = 'Lo siento, tienes que completar todos los campos.'; $lang['reguexists'] = 'Lo siento, ya existe un usuario con este nombre.'; $lang['regsuccess'] = 'El usuario ha sido creado y la contraseña se ha enviado por correo.'; diff --git a/inc/lang/es/searchpage.txt b/inc/lang/es/searchpage.txt index 47a1a90dd2195b21d77ed0f891ac27188b51433c..819815b15a045421c8e5da3ea436b269d19492da 100644 --- a/inc/lang/es/searchpage.txt +++ b/inc/lang/es/searchpage.txt @@ -1,5 +1,5 @@ ====== Búsqueda ====== -Puedes encontrar los resultados de tu búsqueda abajo. Si no has encontrado lo que buscabas, puedes crear una nueva página con tu consulta utilizando el botón ''Crea esta página''. +Puedes encontrar los resultados de tu búsqueda abajo. @CREATEPAGEINFO@ ===== Resultados ===== \ No newline at end of file diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index 9ae06d7d2a63c105f407731fb9c58bff7fe89c09..d3c510c438f6b01f98c1b824d1e8d16ad2b3af4f 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -69,6 +69,7 @@ $lang['badpassconfirm'] = 'Väär salasõna'; $lang['minoredit'] = 'Ebaolulised muudatused'; $lang['draftdate'] = 'Mustand automaatselt salvestatud'; $lang['nosecedit'] = 'Leht on vahepeal muutunud, jaotiste teave osutus aegunuks sestap laeti tervelehekülg.'; +$lang['searchcreatepage'] = "Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu."; $lang['regmissing'] = 'Kõik väljad tuleb ära täita.'; $lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.'; $lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.'; diff --git a/inc/lang/et/searchpage.txt b/inc/lang/et/searchpage.txt index bbc86b637d78c142edca885d4c1a932247449923..6ba57324a4bb1374b2bb7729d62734a96f89df94 100644 --- a/inc/lang/et/searchpage.txt +++ b/inc/lang/et/searchpage.txt @@ -1,5 +1,5 @@ ====== Otsi ====== -Leiad vasted oma otsingule. Kui Sa otsitavat ei leidnud võid tekitada oma otsingu nimelise uue lehe kasutades ''Toimeta seda lehte'' nuppu. +Leiad vasted oma otsingule. @CREATEPAGEINFO@ ===== Vasted ===== diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index 0c996feaf8c3542783454aeeff0fda552b9f2e57..fcf45b946817dd944b9ea920254dea75247e169e 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -1,11 +1,12 @@ <?php + /** - * Basque language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Xabi Ezpeleta <xezpeleta@mendikute.com> * @author Inko Illarramendi <inko.i.a@gmail.com> * @author Zigor Astarbe <astarbe@gmail.com> + * @author Yadav Gowda <yadav.gowda@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -49,6 +50,9 @@ $lang['btn_revert'] = 'Berrezarri'; $lang['btn_register'] = 'Erregistratu'; $lang['btn_apply'] = 'Baieztatu'; $lang['btn_media'] = 'Media Kudeatzailea'; +$lang['btn_deleteuser'] = 'Nire kontua kendu'; +$lang['btn_img_backto'] = 'Atzera hona %s'; +$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi'; $lang['loggedinas'] = 'Erabiltzailea:'; $lang['user'] = 'Erabiltzailea'; $lang['pass'] = 'Pasahitza'; @@ -63,6 +67,7 @@ $lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz $lang['minoredit'] = 'Aldaketa Txikiak'; $lang['draftdate'] = 'Zirriborroa automatikoki gorde da hemen:'; $lang['nosecedit'] = 'Orria aldatua izan da bitartean, info atala zaharkituta geratu da, orri osoa kargatu da horren ordez.'; +$lang['searchcreatepage'] = 'Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean \'\'Sortu orri hau\'\' erabiliz.'; $lang['regmissing'] = 'Barkatu, hutsune guztiak bete behar dituzu.'; $lang['reguexists'] = 'Barkatu, izen bereko erabiltzailea existitzen da.'; $lang['regsuccess'] = 'Erabiltzailea sortu da. Pasahitza mailez bidaliko zaizu.'; @@ -76,6 +81,7 @@ $lang['profna'] = 'Wiki honek ez du profilaren aldaketa ahalbidet $lang['profnochange'] = 'Aldaketarik ez, ez dago egiteko ezer.'; $lang['profnoempty'] = 'Izen edota e-posta hutsa ez dago onartua.'; $lang['profchanged'] = 'Erabiltzaile profila arrakastaz eguneratua.'; +$lang['profdeleteuser'] = 'Kontua ezabatu'; $lang['pwdforget'] = 'Pasahitza ahaztu duzu? Eskuratu berri bat'; $lang['resendna'] = 'Wiki honek ez du pasahitz berbidalketa onartzen.'; $lang['resendpwd'] = '-entzat pasahitza berria ezarri'; @@ -227,7 +233,6 @@ $lang['admin_register'] = 'Erabiltzaile berria gehitu'; $lang['metaedit'] = 'Metadatua Aldatu'; $lang['metasaveerr'] = 'Metadatuaren idazketak huts egin du'; $lang['metasaveok'] = 'Metadatua gordea'; -$lang['btn_img_backto'] = 'Atzera hona %s'; $lang['img_title'] = 'Izenburua:'; $lang['img_caption'] = 'Epigrafea:'; $lang['img_date'] = 'Data:'; @@ -240,7 +245,6 @@ $lang['img_camera'] = 'Kamera:'; $lang['img_keywords'] = 'Hitz-gakoak:'; $lang['img_width'] = 'Zabalera:'; $lang['img_height'] = 'Altuera:'; -$lang['btn_mediaManager'] = 'Media kudeatzailean ikusi'; $lang['subscr_subscribe_success'] = '%s gehitua %s-ren harpidetza zerrendara'; $lang['subscr_subscribe_error'] = 'Errorea %s gehitzen %s-ren harpidetza zerrendara'; $lang['subscr_subscribe_noaddress'] = 'Ez dago helbiderik zure login-arekin lotuta, ezin zara harpidetza zerrendara gehitua izan.'; diff --git a/inc/lang/eu/searchpage.txt b/inc/lang/eu/searchpage.txt index 2a487a3bb9dc1c56311e7deacb0d16e4db8f43e2..c632305b995005ab19436d71240c2b50af461c2c 100644 --- a/inc/lang/eu/searchpage.txt +++ b/inc/lang/eu/searchpage.txt @@ -1,5 +1,5 @@ ====== Bilaketa ====== -Emaitzak ondorengo aurkiketan bilatu ditzakezu. Bilatzen zabiltzana aurkitu ez baduzu, zuk zeuk sortu dezakezu orri berri bat bilaketa ostean ''Sortu orri hau'' erabiliz. +Emaitzak ondorengo aurkiketan bilatu ditzakezu. @CREATEPAGEINFO@ ===== Bilaketa emaitzak: ===== diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index 2649ad73969bf7009318c79793cb60d11dbc47b4..25de5c92ee332058ac3c89cb30ac64f2ec27d6cf 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -12,6 +12,9 @@ * @author mehrdad <mehrdad.jafari.bojd@gmail.com> * @author reza_khn <reza_khn@yahoo.com> * @author Hamid <zarrabi@sharif.edu> + * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> + * @author Mohammad Sadegh <msdn2013@gmail.com> + * @author Omid Hezaveh <hezpublic@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'rtl'; @@ -73,6 +76,7 @@ $lang['badpassconfirm'] = 'متاسÙÙ… ØŒ رمز عبور اشتباه $lang['minoredit'] = 'این ویرایش Ø®Ùرد است'; $lang['draftdate'] = 'ذخیره خودکار پیش‌نویس'; $lang['nosecedit'] = 'این صÙØÙ‡ در این میان تغییر کرده است، اطلاعات بخش قدیمی شده است، در عوض Ù…Øتوای Ú©Ù„ نمایش داده می‌شود.'; +$lang['searchcreatepage'] = 'اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صÙØه‌ی مورد نظر را ایجاد کنید.'; $lang['regmissing'] = 'متاسÙÙ…ØŒ شما باید همه قسمت‌ها را پر کنید.'; $lang['reguexists'] = 'نام کاربری‌ای Ú©Ù‡ وارد کردید قبلن استÙاده شده است. خواهشمندیم یک نام دیگر انتخاب کنید.'; $lang['regsuccess'] = 'کاربر ساخته شد Ùˆ گذرواژه به صورت ایمیل ارسال گردید.'; diff --git a/inc/lang/fa/searchpage.txt b/inc/lang/fa/searchpage.txt index 3f0378ed394cdfdf07533fe36da9db2787c9119f..f7f1a53094a7e57bca4a65415d68c08f35d81c52 100644 --- a/inc/lang/fa/searchpage.txt +++ b/inc/lang/fa/searchpage.txt @@ -1,5 +1,5 @@ ====== جستجو ====== -نتایج جستجو در زیر آمده است. اگر به نتیجه‌ی مطلوبی نرسیده‌اید، می‌توانید صÙØه‌ی مورد نظر را ایجاد کنید. +نتایج جستجو در زیر آمده است. @CREATEPAGEINFO@ ===== نتایج ===== \ No newline at end of file diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 0f82c3b7a9db0bc85481316e75365161404be2b7..9bf4aad197db183fa4632be354ff775abfbf876e 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -9,6 +9,7 @@ * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> * @author Rami Lehti <rammer@ipi.fi> + * @author Jussi Takala <jussi.takala@live.fi> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -53,6 +54,8 @@ $lang['btn_register'] = 'Rekisteröidy'; $lang['btn_apply'] = 'Toteuta'; $lang['btn_media'] = 'Media manager'; $lang['btn_deleteuser'] = 'Poista tilini'; +$lang['btn_img_backto'] = 'Takaisin %s'; +$lang['btn_mediaManager'] = 'Näytä mediamanagerissa'; $lang['loggedinas'] = 'Kirjautunut nimellä:'; $lang['user'] = 'Käyttäjänimi'; $lang['pass'] = 'Salasana'; @@ -68,6 +71,7 @@ $lang['badpassconfirm'] = 'Valitan. Salasana oli väärin'; $lang['minoredit'] = 'Pieni muutos'; $lang['draftdate'] = 'Luonnos tallennettu automaattisesti'; $lang['nosecedit'] = 'Sivu on muuttunut välillä ja kappaleen tiedot olivat vanhentuneet. Koko sivu ladattu.'; +$lang['searchcreatepage'] = 'Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä \'\'Muokkaa tätä sivua\'\' -napilla.'; $lang['regmissing'] = 'Kaikki kentät tulee täyttää.'; $lang['reguexists'] = 'Käyttäjä tällä käyttäjänimellä on jo olemassa.'; $lang['regsuccess'] = 'Käyttäjä luotiin ja salasana lähetettiin sähköpostilla.'; @@ -184,6 +188,9 @@ $lang['difflink'] = 'Linkki vertailunäkymään'; $lang['diff_type'] = 'Näytä eroavaisuudet:'; $lang['diff_inline'] = 'Sisäkkäin'; $lang['diff_side'] = 'Vierekkäin'; +$lang['diffprevrev'] = 'Edellinen revisio'; +$lang['diffnextrev'] = 'Seuraava revisio'; +$lang['difflastrev'] = 'Viimeisin revisio'; $lang['line'] = 'Rivi'; $lang['breadcrumb'] = 'Jäljet:'; $lang['youarehere'] = 'Olet täällä:'; @@ -240,7 +247,6 @@ $lang['admin_register'] = 'Lisää uusi käyttäjä'; $lang['metaedit'] = 'Muokkaa metadataa'; $lang['metasaveerr'] = 'Metadatan kirjoittaminen epäonnistui'; $lang['metasaveok'] = 'Metadata tallennettu'; -$lang['btn_img_backto'] = 'Takaisin %s'; $lang['img_title'] = 'Otsikko:'; $lang['img_caption'] = 'Kuvateksti:'; $lang['img_date'] = 'Päivämäärä:'; @@ -253,7 +259,6 @@ $lang['img_camera'] = 'Kamera:'; $lang['img_keywords'] = 'Avainsanat:'; $lang['img_width'] = 'Leveys:'; $lang['img_height'] = 'Korkeus:'; -$lang['btn_mediaManager'] = 'Näytä mediamanagerissa'; $lang['subscr_subscribe_success'] = '%s lisätty %s tilauslistalle'; $lang['subscr_subscribe_error'] = 'Virhe lisättäessä %s tilauslistalle %s'; $lang['subscr_subscribe_noaddress'] = 'Login tiedoissasi ei ole sähköpostiosoitetta. Sinua ei voi lisätä tilaukseen'; @@ -281,6 +286,7 @@ $lang['i_problems'] = 'Asennusohjelma löysi alla listattuja ongelmia $lang['i_modified'] = 'Turvallisuussyistä tämä ohjelma toimii vain uusien ja muokkaamattomien Dokuwiki-asennusten kanssa. Pura tiedostot uudestaan asennuspaketista, tai lue <a href="http://dokuwiki.org/install">Dokuwikin asennusohje (englanniksi)</a>'; $lang['i_funcna'] = 'PHP:n funktio <code>%s</code> ei ole käytettävissä. Palveluntarjoajasi on saattanut poistaa sen jostain syystä.'; $lang['i_phpver'] = 'Käyttämäsi PHP-ohjelmiston versio <code>%s</code> on pienempi, kuin tarvitaan <code>%s</code>. PHP-asennuksesi pitää päivittää.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload pitää ottaa pois käytöstä php.ini -tiedostosta käyttääksesi DokuWikiä'; $lang['i_permfail'] = '<code>%s</code> ei ole DokuWikin kirjoitettavissa. Muokkaa hakemiston oikeuksia!'; $lang['i_confexists'] = '<code>%s</code> on jo olemassa'; $lang['i_writeerr'] = '<code>%s</code>n luonti epäonnistui. Tarkista hakemiston/tiedoston oikeudet ja luo tiedosto käsin.'; @@ -334,3 +340,4 @@ $lang['currentns'] = 'Nykyinen nimiavaruus'; $lang['searchresult'] = 'Haun tulokset'; $lang['plainhtml'] = 'pelkkä HTML'; $lang['wikimarkup'] = 'Wiki markup'; +$lang['unable_to_parse_date'] = 'Parametrin "%s" jäsennys ei onnistu.'; diff --git a/inc/lang/fi/searchpage.txt b/inc/lang/fi/searchpage.txt index aa9fbf52f3af78da5472fbff7d13f58fe1a2ff54..b2ad8cc986773e031487cbeef44af560e97150ab 100644 --- a/inc/lang/fi/searchpage.txt +++ b/inc/lang/fi/searchpage.txt @@ -1,5 +1,5 @@ ====== Etsi ====== -Löydät etsinnän tulokset alta. Jos et löytänyt etsimääsi voit luoda uuden sivun tiedustelusi pohjalta käyttämällä ''Muokkaa tätä sivua'' -napilla. +Löydät etsinnän tulokset alta. @CREATEPAGEINFO@ ===== Tulokset ===== diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index b326d27ac97bef32d9c92334f7f193af3ba8e607..0aee76e01b089cc8b4aeda1ee6aaf61b61e44901 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -59,6 +59,7 @@ $lang['badlogin'] = 'Skeivt brúkaranavn ella loyniorð.'; $lang['minoredit'] = 'Smærri broytingar'; $lang['draftdate'] = 'Goym kladdu sett frá'; $lang['nosecedit'] = 'Hendan sÃðan var broytt undir tilevnan, brotið var ikki rætt dagfest, heintaði fulla sÃðu à staðin'; +$lang['searchcreatepage'] = "Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin."; $lang['regmissing'] = 'Tú skalt fylla út øll øki.'; $lang['reguexists'] = 'Hetta brúkaranavn er upptiki.'; $lang['regsuccess'] = 'Tú ert nú stovnavur sum brúkari. TÃtt loyniorð verður sent til tÃn à einum T-posti.'; diff --git a/inc/lang/fo/searchpage.txt b/inc/lang/fo/searchpage.txt index 6304a8901dbc9107eecc9a41b35264c063e81ebc..33bcc320647ebee530b44b21c1ca3d5580ed6316 100644 --- a/inc/lang/fo/searchpage.txt +++ b/inc/lang/fo/searchpage.txt @@ -1,5 +1,5 @@ ====== Leiting ====== -Tú kanst sÃggja úrslitini av tÃni leiting niðanfyri. Um úrslitini ikki innihalda tað sum tú leitaði eftir kanst tú upprætta eitt nýtt skjal við sama navni sum leitingin við at trýsta á **''[Upprætta hetta skjal]''** knappin. +Tú kanst sÃggja úrslitini av tÃni leiting niðanfyri. @CREATEPAGEINFO@ ===== Leitiúrslit ===== diff --git a/inc/lang/fr/denied.txt b/inc/lang/fr/denied.txt index da01a40869d58b844337140af23bf1018457f50f..6de1930040197975b21b79762ba656e08a01517a 100644 --- a/inc/lang/fr/denied.txt +++ b/inc/lang/fr/denied.txt @@ -1,4 +1,4 @@ ====== Autorisation refusée ====== -Désolé, vous n'avez pas suffisement d'autorisations pour poursuivre votre demande. +Désolé, vous n'avez pas suffisamment d'autorisations pour poursuivre votre demande. diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index c5edd4cf7874c5692e2c217ee1c4f3d29c8113c1..7a9b821580ab2d9c15b4358e88e46372e9ab7b9b 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -35,6 +35,7 @@ * @author Caillot <remicaillot5@gmail.com> * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author YoBoY <yoboy@ubuntu-fr.org> + * @author james <j.mccann@celcat.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -77,7 +78,7 @@ $lang['btn_draftdel'] = 'Effacer le brouillon'; $lang['btn_revert'] = 'Restaurer'; $lang['btn_register'] = 'Créer un compte'; $lang['btn_apply'] = 'Appliquer'; -$lang['btn_media'] = 'Gestionnaire de médias'; +$lang['btn_media'] = 'Gestionnaire Multimédia'; $lang['btn_deleteuser'] = 'Supprimer mon compte'; $lang['btn_img_backto'] = 'Retour vers %s'; $lang['btn_mediaManager'] = 'Voir dans le gestionnaire de médias'; @@ -96,6 +97,7 @@ $lang['badpassconfirm'] = 'Désolé, le mot de passe est erroné'; $lang['minoredit'] = 'Modification mineure'; $lang['draftdate'] = 'Brouillon enregistré automatiquement le'; $lang['nosecedit'] = 'La page a changé entre temps, les informations de la section sont obsolètes ; la page complète a été chargée à la place.'; +$lang['searchcreatepage'] = 'Si vous n\'avez pas trouvé ce que vous cherchiez, vous pouvez créer ou modifier la page correspondante à votre requête en cliquant sur le bouton approprié.'; $lang['regmissing'] = 'Désolé, vous devez remplir tous les champs.'; $lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà pris.'; $lang['regsuccess'] = 'L\'utilisateur a été créé. Le mot de passe a été expédié par courriel.'; @@ -360,7 +362,7 @@ $lang['media_perm_read'] = 'Désolé, vous n\'avez pas l\'autorisation de $lang['media_perm_upload'] = 'Désolé, vous n\'avez pas l\'autorisation d\'envoyer des fichiers.'; $lang['media_update'] = 'Envoyer une nouvelle version'; $lang['media_restore'] = 'Restaurer cette version'; -$lang['currentns'] = 'Namespace actuel'; +$lang['currentns'] = 'Catégorie courante'; $lang['searchresult'] = 'Résultat de la recherche'; $lang['plainhtml'] = 'HTML brut'; $lang['wikimarkup'] = 'Wiki balise'; diff --git a/inc/lang/fr/newpage.txt b/inc/lang/fr/newpage.txt index b23bf4fe4d766dbe258ae240396a6e82df2ee045..c649489fae1ed24af2e368be9a4491c96d1f1daf 100644 --- a/inc/lang/fr/newpage.txt +++ b/inc/lang/fr/newpage.txt @@ -1,4 +1,4 @@ ====== Cette page n'existe pas encore ====== -Vous avez suivi un lien vers une page qui n'existe pas encore. Si vos autorisations sont suffisants, vous pouvez la créer en cliquant sur « Créer cette page ». +Vous avez suivi un lien vers une page qui n'existe pas encore. Si vos permissions sont suffisantes, vous pouvez la créer en cliquant sur « Créer cette page ». diff --git a/inc/lang/fr/searchpage.txt b/inc/lang/fr/searchpage.txt index a9bd91608f712dba7639d4852140b78df7c0727d..5577a3a2a3fb1e2bd09014e7855857b70184c958 100644 --- a/inc/lang/fr/searchpage.txt +++ b/inc/lang/fr/searchpage.txt @@ -1,5 +1,5 @@ ====== Recherche ====== -Voici les résultats de votre recherche. Si vous n'avez pas trouvé ce que vous cherchiez, vous pouvez créer ou modifier la page correspondante à votre requête en cliquant sur le bouton approprié. +Voici les résultats de votre recherche. @CREATEPAGEINFO@ ===== Résultats ===== diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php index aed2253590adacee2d791ba7fbc84417a6ae6c8b..82cbbbfab194c8c0f7310be49ff40d55909e063a 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -63,6 +63,7 @@ $lang['badlogin'] = 'SentÃmolo, mais o nome de usuario ou o contra $lang['minoredit'] = 'Trocos Menores'; $lang['draftdate'] = 'Borrador gardado automaticamente en'; $lang['nosecedit'] = 'A páxina mudou entrementres, a información da sección estaba desfasada polo que se cargou a páxina completa no seu lugar.'; +$lang['searchcreatepage'] = "Se non atopaches o que estabas a procurar, podes crear ou editar a páxina co nome relacionado coa túa procura empregando o botón axeitado."; $lang['regmissing'] = 'SentÃmolo, mais tes que cubrir todos os campos.'; $lang['reguexists'] = 'SentÃmolo, mais xa existe un usuario con ese nome.'; $lang['regsuccess'] = 'O usuario foi creado e o contrasinal enviado por correo-e.'; diff --git a/inc/lang/gl/searchpage.txt b/inc/lang/gl/searchpage.txt index 227ca5dbc1db90edb9d0055aed64ec72f5a83a9d..e37ec46427c5f7a7933b051e16b5eeff9ced3dcc 100644 --- a/inc/lang/gl/searchpage.txt +++ b/inc/lang/gl/searchpage.txt @@ -1,5 +1,5 @@ ====== Procura ====== -Podes atopar os resultados da túa procura a continuación. Se non atopaches o que estabas a procurar, podes crear ou editar a páxina co nome relacionado coa túa procura empregando o botón axeitado. +Podes atopar os resultados da túa procura a continuación. @CREATEPAGEINFO@ ===== Resultados ===== diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 101102b482560a895db79b369105ca56d45234e1..5e2ecbdff2e5ec183795b74c961f34713577a28c 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'מצטערי×, הסיסמה שגויה'; $lang['minoredit'] = '×©×™× ×•×™× ×ž×–×¢×¨×™×™×'; $lang['draftdate'] = 'הטיוטה × ×©×ž×¨×” ×וטומטית ב־'; $lang['nosecedit'] = 'הדף ×”×©×ª× ×” ×‘×™× ×ª×™×™×, הקטע שערכת ××™× ×• מעודכן - העמוד כולו × ×˜×¢×Ÿ ×‘×ž×§×•× ×–×ת.'; +$lang['searchcreatepage'] = '×× ×œ× × ×ž×¦×ו ×“×¤×™× ×‘×—×™×¤×•×©, לחיצה על הכפתור "עריכה" תיצור דף חדש על ×©× ×ž×™×œ×ª החיפוש ×©×”×•×–× ×”.'; $lang['regmissing'] = 'עליך ×œ×ž×œ× ×ת כל השדות, עמך הסליחה.'; $lang['reguexists'] = 'משתמש ×‘×©× ×–×” כבר × ×¨×©×, עמך הסליחה.'; $lang['regsuccess'] = 'ההרשמה הצליחה, המשתמש × ×¨×©× ×•×”×•×“×¢×” × ×©×œ×—×” בדו×״ל.'; diff --git a/inc/lang/he/searchpage.txt b/inc/lang/he/searchpage.txt index aed23be2417684cc9b9a1c06497166675c42136a..78839c371ba0d9fc6cf75251f98de2d7fc1d21ba 100644 --- a/inc/lang/he/searchpage.txt +++ b/inc/lang/he/searchpage.txt @@ -1,5 +1,5 @@ ====== חיפוש ====== -× ×™×ª×Ÿ לר×ות ×ת תוצ×ות החיפוש למטה. ×× ×œ× × ×ž×¦×ו ×“×¤×™× ×‘×—×™×¤×•×©, לחיצה על הכפתור "עריכה" תיצור דף חדש על ×©× ×ž×™×œ×ª החיפוש ×©×”×•×–× ×”. +× ×™×ª×Ÿ לר×ות ×ת תוצ×ות החיפוש למטה. @CREATEPAGEINFO@ ===== תוצ×ות ===== \ No newline at end of file diff --git a/inc/lang/hr/adminplugins.txt b/inc/lang/hr/adminplugins.txt index 556ffda0b12e14e290249436afbff7901fcacc12..5a7656d27594dea359cc87b4bb8b764cf49021b2 100644 --- a/inc/lang/hr/adminplugins.txt +++ b/inc/lang/hr/adminplugins.txt @@ -1 +1 @@ -===== Dodatni Pluginovi ===== \ No newline at end of file +===== Dodatni dodatci ===== \ No newline at end of file diff --git a/inc/lang/hr/backlinks.txt b/inc/lang/hr/backlinks.txt index e7115a6b6e48f836d5d5a8ed3d0d841cfc320034..a78b9213ee150ecff80b414e28a69913a56cd989 100644 --- a/inc/lang/hr/backlinks.txt +++ b/inc/lang/hr/backlinks.txt @@ -1,3 +1,3 @@ -====== Linkovi na stranicu ====== +====== Veze na stranicu ====== -Slijedi spisak svih dokumenata koji imaju link na trenutni. +Slijedi spisak svih stanica koje imaju vezu na trenutnu stranicu. diff --git a/inc/lang/hr/edit.txt b/inc/lang/hr/edit.txt index 8cd57d524ace73461eb2309f7cc07a7c990216e1..bce1abeea4d5c6fb6ef8947cd139f4d2f2b31649 100644 --- a/inc/lang/hr/edit.txt +++ b/inc/lang/hr/edit.txt @@ -1 +1 @@ -Nakon Å¡to ste napravili sve potrebne promjene - odaberite ''Snimi'' za snimanje dokumenta. +Uredite stranicu i pritisnite "Snimi". Pogledajte [[wiki:syntax]] za Wiki sintaksu. Molimo izmijenite samo ako možete unaprijediti sadržaj. Ako trebate testirati ili nauÄiti kako se neÅ¡to radi, molimo koristite za to namijenjene stranice kao Å¡to je [[playground:playground|igraonica]]. diff --git a/inc/lang/hr/index.txt b/inc/lang/hr/index.txt index 9c30a805ca0d648707c123b3e762892d508097ba..4395994c40a4cd5e6df1638313353e422675a0ea 100644 --- a/inc/lang/hr/index.txt +++ b/inc/lang/hr/index.txt @@ -1 +1,3 @@ -====== Indeks ====== +====== Mapa stranica ====== + +Ovo je mapa svih dostupnih stranica poredanih po [[doku>namespaces|imenskom prostoru]]. diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index 6a3fa20e2f785406bd4a99b4f1ad62a258b8a1cb..c3cf6d8221621e0f9ce86a80985252beb15947f6 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -16,42 +16,42 @@ $lang['doublequoteclosing'] = 'â€'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '\''; -$lang['btn_edit'] = 'Izmijeni dokument'; -$lang['btn_source'] = 'Prikaži kod dokumenta'; +$lang['btn_edit'] = 'Izmijeni stranicu'; +$lang['btn_source'] = 'Prikaži kod stranice'; $lang['btn_show'] = 'Prikaži dokument'; -$lang['btn_create'] = 'Novi dokument'; +$lang['btn_create'] = 'Stvori ovu stranicu'; $lang['btn_search'] = 'Pretraži'; $lang['btn_save'] = 'Spremi'; $lang['btn_preview'] = 'Prikaži'; $lang['btn_top'] = 'Na vrh'; $lang['btn_newer'] = '<< noviji'; $lang['btn_older'] = 'stariji >>'; -$lang['btn_revs'] = 'Stare inaÄice'; +$lang['btn_revs'] = 'Stare promjene'; $lang['btn_recent'] = 'Nedavne izmjene'; -$lang['btn_upload'] = 'Postavi'; +$lang['btn_upload'] = 'UÄitaj'; $lang['btn_cancel'] = 'Odustani'; -$lang['btn_index'] = 'Indeks'; -$lang['btn_secedit'] = 'Izmjeni'; +$lang['btn_index'] = 'Mapa lokacije'; +$lang['btn_secedit'] = 'Uredi'; $lang['btn_login'] = 'Prijavi se'; $lang['btn_logout'] = 'Odjavi se'; $lang['btn_admin'] = 'Administriranje'; -$lang['btn_update'] = 'Ažuriraj'; +$lang['btn_update'] = 'Dopuni'; $lang['btn_delete'] = 'ObriÅ¡i'; -$lang['btn_back'] = 'Povratak'; +$lang['btn_back'] = 'Nazad'; $lang['btn_backlink'] = 'Povratni linkovi'; -$lang['btn_backtomedia'] = 'Povratak na Mediafile izbornik'; -$lang['btn_subscribe'] = 'Pretplati se na promjene dokumenta'; -$lang['btn_profile'] = 'Ažuriraj profil'; -$lang['btn_reset'] = 'PoniÅ¡ti promjene'; +$lang['btn_backtomedia'] = 'Natrag na odabir datoteka'; +$lang['btn_subscribe'] = 'UreÄ‘ivanje pretplata'; +$lang['btn_profile'] = 'Dopuni profil'; +$lang['btn_reset'] = 'PoniÅ¡ti'; $lang['btn_resendpwd'] = 'Postavi novu lozinku'; $lang['btn_draft'] = 'Uredi nacrt dokumenta'; -$lang['btn_recover'] = 'Vrati prijaÅ¡nji nacrt dokumenta'; -$lang['btn_draftdel'] = 'ObriÅ¡i nacrt dokumenta'; +$lang['btn_recover'] = 'Vrati nacrt stranice'; +$lang['btn_draftdel'] = 'ObriÅ¡i nacrt stranice'; $lang['btn_revert'] = 'Vrati'; $lang['btn_register'] = 'Registracija'; $lang['btn_apply'] = 'Primjeni'; $lang['btn_media'] = 'Upravitelj datoteka'; -$lang['btn_deleteuser'] = 'Ukloni mojeg korisnika'; +$lang['btn_deleteuser'] = 'Ukloni mog korisnika'; $lang['btn_img_backto'] = 'Povratak na %s'; $lang['btn_mediaManager'] = 'Pogledaj u upravitelju datoteka'; $lang['loggedinas'] = 'Prijavljen kao:'; @@ -59,16 +59,17 @@ $lang['user'] = 'KorisniÄko ime'; $lang['pass'] = 'Lozinka'; $lang['newpass'] = 'Nova lozinka'; $lang['oldpass'] = 'Potvrdi trenutnu lozinku'; -$lang['passchk'] = 'Ponoviti'; +$lang['passchk'] = 'joÅ¡ jednom'; $lang['remember'] = 'Zapamti me'; $lang['fullname'] = 'Ime i prezime'; -$lang['email'] = 'Email'; +$lang['email'] = 'E-poÅ¡ta'; $lang['profile'] = 'KorisniÄki profil'; $lang['badlogin'] = 'Ne ispravno korisniÄko ime ili lozinka.'; $lang['badpassconfirm'] = 'Nažalost, lozinka nije ispravna'; $lang['minoredit'] = 'Manje izmjene'; -$lang['draftdate'] = 'Nacrt dokumenta je automatski spremljen u '; +$lang['draftdate'] = 'Nacrt promjena automatski spremljen u'; $lang['nosecedit'] = 'Stranica se u meÄ‘uvremenu promijenila. Informacija o odjeljku je ostarila pa je uÄitana kompletna stranica.'; +$lang['searchcreatepage'] = 'Ako ne možete naći Å¡to tražite, možete urediti ili stvoriti novu stranicu s odgovarajućim alatom.'; $lang['regmissing'] = 'Morate popuniti sva polja.'; $lang['reguexists'] = 'Korisnik s tim korisniÄkim imenom već postoji.'; $lang['regsuccess'] = 'Korisnik je uspjeÅ¡no stvoren i poslana je lozinka emailom.'; @@ -80,7 +81,7 @@ $lang['regpwmail'] = 'VaÅ¡a DokuWiki lozinka'; $lang['reghere'] = 'JoÅ¡ uvijek nemate korisniÄki raÄun? Registrirajte se.'; $lang['profna'] = 'Ovaj wiki ne dopuÅ¡ta izmjene korisniÄkog profila.'; $lang['profnochange'] = 'Nema izmjena.'; -$lang['profnoempty'] = 'Prazno korisniÄko ime ili email nisu dopuÅ¡teni.'; +$lang['profnoempty'] = 'Prazno korisniÄko ime ili e-poÅ¡ta nisu dopuÅ¡teni.'; $lang['profchanged'] = 'KorisniÄki profil je uspjeÅ¡no izmijenjen.'; $lang['profnodelete'] = 'Ovaj wiki ne podržava brisanje korisnika'; $lang['profdeleteuser'] = 'ObriÅ¡i korisnika'; @@ -88,22 +89,22 @@ $lang['profdeleted'] = 'VaÅ¡ korisnik je obrisan s ovog wiki-a'; $lang['profconfdelete'] = 'Želim ukloniti mojeg korisnika s ovog wiki-a. <br/> Ova akcija se ne može poniÅ¡titi.'; $lang['profconfdeletemissing'] = 'KvaÄica za potvrdu nije oznaÄena'; $lang['pwdforget'] = 'Izgubili ste lozinku? Zatražite novu'; -$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke emailom.'; +$lang['resendna'] = 'Ovaj wiki ne podržava ponovno slanje lozinke e-poÅ¡tom.'; $lang['resendpwd'] = 'Postavi novu lozinku za'; $lang['resendpwdmissing'] = 'Ispunite sva polja.'; $lang['resendpwdnouser'] = 'Nije moguće pronaći korisnika.'; $lang['resendpwdbadauth'] = 'Neispravan autorizacijski kod. Provjerite da li ste koristili potpun potvrdni link.'; -$lang['resendpwdconfirm'] = 'Potvrdni link je poslan emailom.'; -$lang['resendpwdsuccess'] = 'Nova lozinka je poslana emailom.'; +$lang['resendpwdconfirm'] = 'Potvrdni link je poslan e-poÅ¡tom.'; +$lang['resendpwdsuccess'] = 'Nova lozinka je poslana e-poÅ¡tom.'; $lang['license'] = 'Osim na mjestima gdje je naznaÄeno drugaÄije, sadržaj ovog wikija je licenciran sljedećom licencom:'; $lang['licenseok'] = 'Pažnja: promjenom ovog dokumenta pristajete licencirati sadržaj sljedećom licencom: '; $lang['searchmedia'] = 'Traži naziv datoteke:'; $lang['searchmedia_in'] = 'Traži u %s'; -$lang['txt_upload'] = 'Odaberite datoteku za postavljanje:'; -$lang['txt_filename'] = 'Postaviti kao (nije obavezno):'; +$lang['txt_upload'] = 'Odaberite datoteku za uÄitavanje:'; +$lang['txt_filename'] = 'UÄitaj kao (nije obavezno):'; $lang['txt_overwrt'] = 'PrepiÅ¡i postojeću datoteku'; $lang['maxuploadsize'] = 'Moguće je uÄitati maks. %s po datoteci.'; -$lang['lockedby'] = 'ZakljuÄao:'; +$lang['lockedby'] = 'Trenutno zakljuÄao:'; $lang['lockexpire'] = 'ZakljuÄano do:'; $lang['js']['willexpire'] = 'Dokument kojeg mijenjate će biti zakljuÄan joÅ¡ 1 minutu.\n Ukoliko želite i dalje raditi izmjene na dokumentu - kliknite na "Pregled".'; $lang['js']['notsavedyet'] = 'VaÅ¡e izmjene će se izgubiti. @@ -149,16 +150,16 @@ $lang['js']['media_cancel'] = 'ukloni'; $lang['js']['media_overwrt'] = 'PrepiÅ¡i preko postojeće datoteke'; $lang['rssfailed'] = 'DoÅ¡lo je do greÅ¡ke prilikom preuzimanja feed-a: '; $lang['nothingfound'] = 'Traženi dokumetni nisu pronaÄ‘eni.'; -$lang['mediaselect'] = 'Mediafile datoteke'; -$lang['fileupload'] = 'Mediafile postavljanje'; -$lang['uploadsucc'] = 'Postavljanje uspjeÅ¡no'; -$lang['uploadfail'] = 'NeuspjeÅ¡no postavljanje. Možda dozvole na poslužitelju nisu ispravne?'; -$lang['uploadwrong'] = 'Postavljanje nije dopuÅ¡teno. Nastavak datoteke je zabranjen!'; +$lang['mediaselect'] = 'Datoteke'; +$lang['fileupload'] = 'UÄitavanje datoteka'; +$lang['uploadsucc'] = 'UÄitavanje uspjeÅ¡no'; +$lang['uploadfail'] = 'NeuspjeÅ¡no uÄitavanje. Možda dozvole na poslužitelju nisu ispravne?'; +$lang['uploadwrong'] = 'UÄitavanje nije dopuÅ¡teno. Nastavak datoteke je zabranjen!'; $lang['uploadexist'] = 'Datoteka već postoji.'; -$lang['uploadbadcontent'] = 'Postavljeni sadržaj ne odgovara ekstenziji %s datoteke.'; -$lang['uploadspam'] = 'Postavljanje je blokirano spam crnom listom.'; -$lang['uploadxss'] = 'Postavljanje je blokirano zbog mogućeg zlonamjernog sadržaja.'; -$lang['uploadsize'] = 'Postavljena datoteka je prevelika (max. %s)'; +$lang['uploadbadcontent'] = 'UÄitani sadržaj ne odgovara ekstenziji %s datoteke.'; +$lang['uploadspam'] = 'UÄitavanje je sprijeÄeno od spam crne liste.'; +$lang['uploadxss'] = 'UÄitavanje je sprijeÄeno zbog mogućeg zlonamjernog sadržaja.'; +$lang['uploadsize'] = 'UÄitana datoteka je prevelika (max. %s)'; $lang['deletesucc'] = 'Datoteka "%s" je obrisana.'; $lang['deletefail'] = '"%s" se ne može obrisati - provjerite dozvole na poslužitelju.'; $lang['mediainuse'] = 'Datoteka "%s" nije obrisana - joÅ¡ uvijek se koristi.'; @@ -166,10 +167,10 @@ $lang['namespaces'] = 'Imenski prostori'; $lang['mediafiles'] = 'Datoteke u'; $lang['accessdenied'] = 'Nemate potrebne dozvole za pregled ove stranice.'; $lang['mediausage'] = 'Koristi sljedeću sintaksu za referenciranje ove datoteke:'; -$lang['mediaview'] = 'Pregledaj originalnu datoteku'; +$lang['mediaview'] = 'Vidi izvornu datoteku'; $lang['mediaroot'] = 'root'; $lang['mediaupload'] = 'Postavi datoteku u odabrani imenski prostor. Podimenski prostori se stvaraju dodavanjem istih kao prefiks naziva datoteke u "Postavi kao" polju, tako da se odvoje dvotoÄkama.'; -$lang['mediaextchange'] = 'Ekstenzija datoteke promijenjena iz .%s u .%s!'; +$lang['mediaextchange'] = 'Nastavak datoteke promijenjen iz .%s u .%s!'; $lang['reference'] = 'Reference za'; $lang['ref_inuse'] = 'Datoteka se ne može obrisati jer se joÅ¡ uvijek koristi u sljedećim dokumentima:'; $lang['ref_hidden'] = 'Neke reference se nalaze na dokumentima koje nemate dozvolu Äitati'; @@ -178,25 +179,25 @@ $lang['quickhits'] = 'PronaÄ‘eno po nazivima dokumenata'; $lang['toc'] = 'Sadržaj'; $lang['current'] = 'trenutno'; $lang['yours'] = 'VaÅ¡a inaÄica'; -$lang['diff'] = 'Prikaži razlike u odnosu na trenutnu inaÄicu'; -$lang['diff2'] = 'Pokaži razlike izmeÄ‘u odabranih inaÄica'; -$lang['difflink'] = 'Poveznica na ovaj prikaz usporedbe'; -$lang['diff_type'] = 'Razlike u prikazu:'; +$lang['diff'] = 'Prikaži razlike u odnosu na zadnje stanje'; +$lang['diff2'] = 'Pokaži razlike izmeÄ‘u odabranih izmjena'; +$lang['difflink'] = 'Poveznica na ovu usporedbu'; +$lang['diff_type'] = 'Vidi razlike:'; $lang['diff_inline'] = 'U istoj razini'; $lang['diff_side'] = 'Usporedo'; -$lang['diffprevrev'] = 'ProÅ¡la verzija'; -$lang['diffnextrev'] = 'Novija verzija'; -$lang['difflastrev'] = 'Zadnja verzija'; -$lang['diffbothprevrev'] = 'ProÅ¡le verzije na obje strane'; -$lang['diffbothnextrev'] = 'Novije verzije na obje strane'; +$lang['diffprevrev'] = 'Starija izmjena'; +$lang['diffnextrev'] = 'Novija izmjena'; +$lang['difflastrev'] = 'Zadnja izmjena'; +$lang['diffbothprevrev'] = 'Starije izmjene na obje strane'; +$lang['diffbothnextrev'] = 'Novije izmjene na obje strane'; $lang['line'] = 'Redak'; -$lang['breadcrumb'] = 'Putanja:'; +$lang['breadcrumb'] = 'Zadnje viÄ‘eno:'; $lang['youarehere'] = 'Vi ste ovdje:'; $lang['lastmod'] = 'Zadnja izmjena:'; $lang['by'] = 'od'; $lang['deleted'] = 'obrisano'; $lang['created'] = 'stvoreno'; -$lang['restored'] = 'vraćena prijaÅ¡nja inaÄica (%s)'; +$lang['restored'] = 'vraćeno na prijaÅ¡nju izmjenu (%s)'; $lang['external_edit'] = 'vanjsko ureÄ‘ivanje'; $lang['summary'] = 'Sažetak izmjena'; $lang['noflash'] = 'Za prikazivanje ovog sadržaja potreban je <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>'; @@ -211,33 +212,33 @@ $lang['mail_newpage'] = 'stranica dodana:'; $lang['mail_changed'] = 'stranica izmjenjena:'; $lang['mail_subscribe_list'] = 'stranice promijenjene u imenskom prostoru:'; $lang['mail_new_user'] = 'novi korisnik:'; -$lang['mail_upload'] = 'datoteka postavljena:'; +$lang['mail_upload'] = 'datoteka uÄitana:'; $lang['changes_type'] = 'Vidi promjene od'; $lang['pages_changes'] = 'Stranice'; -$lang['media_changes'] = 'Medijske datoteke'; +$lang['media_changes'] = 'Datoteke'; $lang['both_changes'] = 'Zajedno stranice i datoteke'; $lang['qb_bold'] = 'Podebljani tekst'; $lang['qb_italic'] = 'UkoÅ¡eni tekst'; $lang['qb_underl'] = 'Podcrtani tekst'; $lang['qb_code'] = 'Kod'; $lang['qb_strike'] = 'Precrtani tekst'; -$lang['qb_h1'] = 'Naslov - razina 1'; -$lang['qb_h2'] = 'Naslov - razina 2'; -$lang['qb_h3'] = 'Naslov - razina 3'; -$lang['qb_h4'] = 'Naslov - razina 4'; -$lang['qb_h5'] = 'Naslov - razina 5'; +$lang['qb_h1'] = 'Naslov 1. razine'; +$lang['qb_h2'] = 'Naslov 2. razine'; +$lang['qb_h3'] = 'Naslov 3. razine'; +$lang['qb_h4'] = 'Naslov 4. razine'; +$lang['qb_h5'] = 'Naslov 5. razine'; $lang['qb_h'] = 'Naslov'; $lang['qb_hs'] = 'Odaberite naslov'; $lang['qb_hplus'] = 'Naslov viÅ¡e razine'; $lang['qb_hminus'] = 'Naslov niže razine'; $lang['qb_hequal'] = 'Naslov iste razine'; -$lang['qb_link'] = 'Interni link'; -$lang['qb_extlink'] = 'Vanjski link'; +$lang['qb_link'] = 'Interna poveznica'; +$lang['qb_extlink'] = 'Vanjska poveznica'; $lang['qb_hr'] = 'Vodoravna crta'; -$lang['qb_ol'] = 'Pobrojana lista'; -$lang['qb_ul'] = 'Lista'; -$lang['qb_media'] = 'Dodaj slike i ostale datoteke'; -$lang['qb_sig'] = 'Potpis'; +$lang['qb_ol'] = 'Element brojane liste'; +$lang['qb_ul'] = 'Element obiÄne liste'; +$lang['qb_media'] = 'Dodaj slike i ostale datoteke (prikaz u novom prozoru)'; +$lang['qb_sig'] = 'Ubaci potpis'; $lang['qb_smileys'] = 'SmijeÅ¡kići'; $lang['qb_chars'] = 'Posebni znakovi'; $lang['upperns'] = 'SkoÄi u nadreÄ‘eni imenski prostor'; @@ -269,19 +270,20 @@ $lang['subscr_m_new_header'] = 'Dodaj pretplatu'; $lang['subscr_m_current_header'] = 'Trenutne pretplate'; $lang['subscr_m_unsubscribe'] = 'Odjavi pretplatu'; $lang['subscr_m_subscribe'] = 'Pretplati se'; -$lang['subscr_m_receive'] = 'Primaj'; -$lang['subscr_style_every'] = 'email za svaku promjenu'; -$lang['subscr_style_digest'] = 'email s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)'; -$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnjeg primljenog email-a (svaka %.2f dana)'; +$lang['subscr_m_receive'] = 'Primi'; +$lang['subscr_style_every'] = 'e-poÅ¡ta za svaku promjenu'; +$lang['subscr_style_digest'] = 'e-poÅ¡ta s kratakim prikazom promjena za svaku stranicu (svaka %.2f dana)'; +$lang['subscr_style_list'] = 'listu promijenjenih stranica od zadnje primljene e-poÅ¡te (svaka %.2f dana)'; $lang['authtempfail'] = 'Autentifikacija korisnika je privremeno nedostupna. Molimo Vas da kontaktirate administratora.'; $lang['authpwdexpire'] = 'VaÅ¡a lozinka će isteći za %d dana, trebate ju promijeniti.'; $lang['i_chooselang'] = 'Izaberite vaÅ¡ jezik'; -$lang['i_installer'] = 'DokuWiki instalacija'; +$lang['i_installer'] = 'DokuWiki postavljanje'; $lang['i_wikiname'] = 'Naziv Wikija'; $lang['i_enableacl'] = 'Omogući ACL (preporuÄeno)'; $lang['i_superuser'] = 'Superkorisnik'; $lang['i_problems'] = 'Instalacija je pronaÅ¡la probleme koji su naznaÄeni ispod. Nije moguće nastaviti dok se ti problemi ne rijeÅ¡e.'; -$lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta ce raditi samo sa novim i nepromijenjenim instalacijama dokuWikija. Preporucujemo da ili re-ekstraktirate fajlove iz downloadovanog paketa ili konsultujete pune a href="http://dokuwiki.org/install">Instrukcije za instalaciju Dokuwikija</a>'; +$lang['i_modified'] = 'Zbog sigurnosnih razlog, ova skripta raditi će samo sa novim i neizmijenjenim DokuWiki instalacijama. + Molimo ponovno prekopirajte datoteke iz preuzetoga paketa ili pogledajte detaljno <a href="http://dokuwiki.org/install">Uputstvo za postavljanje DokuWiki-a</a>'; $lang['i_funcna'] = 'PHP funkcija <code>%s</code> nije dostupna. Možda ju je vaÅ¡ pružatelj hostinga onemogućio iz nekog razloga?'; $lang['i_phpver'] = 'VaÅ¡a PHP verzija <code>%s</code> je niža od potrebne <code>%s</code>. Trebate nadograditi vaÅ¡u PHP instalaciju.'; $lang['i_mbfuncoverload'] = 'mbstring.func_overload mora biti onemogućena u php.ini da bi ste pokrenuli DokuWiki.'; @@ -321,15 +323,15 @@ $lang['media_list_thumbs'] = 'Ikone'; $lang['media_list_rows'] = 'Redovi'; $lang['media_sort_name'] = 'Naziv'; $lang['media_sort_date'] = 'Datum'; -$lang['media_namespaces'] = 'Odaberi namespace'; -$lang['media_files'] = 'Datoteka u %s'; +$lang['media_namespaces'] = 'Odaberi imenski prostor'; +$lang['media_files'] = 'Datoteke u %s'; $lang['media_upload'] = 'UÄitaj u %s'; $lang['media_search'] = 'Potraži u %s'; $lang['media_view'] = '%s'; $lang['media_viewold'] = '%s na %s'; $lang['media_edit'] = 'Uredi %s'; $lang['media_history'] = 'Povijest %s'; -$lang['media_meta_edited'] = 'meta podatci ureÄ‘eni'; +$lang['media_meta_edited'] = 'meta podaci ureÄ‘eni'; $lang['media_perm_read'] = 'Nažalost, nemate prava za Äitanje datoteka.'; $lang['media_perm_upload'] = 'Nažalost, nemate prava za uÄitavanje datoteka.'; $lang['media_update'] = 'UÄitaj novu verziju'; @@ -338,3 +340,5 @@ $lang['currentns'] = 'Tekući imeniÄki prostor'; $lang['searchresult'] = 'Rezultati pretraživanja'; $lang['plainhtml'] = 'ÄŒisti HTML'; $lang['wikimarkup'] = 'Wiki kod'; +$lang['page_nonexist_rev'] = 'Stranica ne postoji na %s. Ona je naknadno napravljena na <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Ne mogu analizirati parametar "%s".'; diff --git a/inc/lang/hr/revisions.txt b/inc/lang/hr/revisions.txt index d224a56f3bade9786e82aa25b7f6745a08a1fcaa..67d4cb89fe2e8ac60a129a87509d56d56db3d881 100644 --- a/inc/lang/hr/revisions.txt +++ b/inc/lang/hr/revisions.txt @@ -1,3 +1,3 @@ ====== Stare verzije ====== -Slijedi spisak starih verzija za traženi dokument. +Slijedi spisak starih verzija za traženi dokument. Da bi ste se vratili na neku od njih, odaberite ju, pritisnite UreÄ‘ivanje i snimite ju. diff --git a/inc/lang/hr/searchpage.txt b/inc/lang/hr/searchpage.txt index 91d9f9c0a4ffd83a85816f9171c74ff1eb8a11af..90d2ffdf4653e9634b258984aa589b0d5115c147 100644 --- a/inc/lang/hr/searchpage.txt +++ b/inc/lang/hr/searchpage.txt @@ -1 +1,5 @@ -====== Rezultati pretraživanja ====== +====== Pretraživanja ====== + +Možete naći rezultat vaÅ¡e pretrage u nastavku. @CREATEPAGEINFO@ + +====== Rezultati ====== diff --git a/inc/lang/hr/showrev.txt b/inc/lang/hr/showrev.txt index aba2c0db0f79dcbeb0c92d813799f149ad67c0c3..86c1a0295ba28dedb433b323fd158dad8c304404 100644 --- a/inc/lang/hr/showrev.txt +++ b/inc/lang/hr/showrev.txt @@ -1,2 +1,2 @@ -**Ovo je stara verzija dokumenta!** +**Ovo je stara izmjena dokumenta!** ---- diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index eb4b4601adbf4932ccdd0f1d0370631374b1a6a7..bdc78f68dec1790abacf2ab180cfa87b42d7244f 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -75,6 +75,7 @@ $lang['badpassconfirm'] = 'Hibás jelszó'; $lang['minoredit'] = 'Apróbb változások'; $lang['draftdate'] = 'Piszkozat elmentve:'; $lang['nosecedit'] = 'IdÅ‘közben megváltozott az oldal, emiatt a szakasz nem friss. Töltsd újra az egész oldalt!'; +$lang['searchcreatepage'] = "Ha nem találtad meg amit kerestél, akkor létrehozhatsz egy új oldalt a keresésed alapján ''Az oldal szerkesztése'' gombbal."; $lang['regmissing'] = 'Sajnáljuk, az összes mezÅ‘t ki kell töltened.'; $lang['reguexists'] = 'Sajnáljuk, ilyen azonosÃtójú felhasználónk már van.'; $lang['regsuccess'] = 'A felhasználói azonosÃtót létrehoztuk. A jelszót postáztuk.'; diff --git a/inc/lang/hu/searchpage.txt b/inc/lang/hu/searchpage.txt index ffde87b66d169fee5c537df198d9f3ed222071ef..7e186e5cbb1582077cb38269731218122783c153 100644 --- a/inc/lang/hu/searchpage.txt +++ b/inc/lang/hu/searchpage.txt @@ -1,5 +1,5 @@ ====== Keresés ====== -A keresés eredményét lentebb láthatod. Ha nem találtad meg amit kerestél, akkor létrehozhatsz egy új oldalt a keresésed alapján ''Az oldal szerkesztése'' gombbal. +A keresés eredményét lentebb láthatod. @CREATEPAGEINFO@ ===== Eredmény(ek) ===== \ No newline at end of file diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php index cabbbab93c6cb8eb3c454ef43e757dd774cf6db8..a533883b6142b703856fe8c900b016f2f22bb23a 100644 --- a/inc/lang/ia/lang.php +++ b/inc/lang/ia/lang.php @@ -64,6 +64,7 @@ $lang['badlogin'] = 'Le nomine de usator o le contrasigno es incorr $lang['minoredit'] = 'Modificationes minor'; $lang['draftdate'] = 'Version provisori automaticamente salveguardate le'; $lang['nosecedit'] = 'Le pagina ha essite modificate intertanto. Le informationes del section es ora obsolete, dunque le pagina complete ha essite cargate in su loco.'; +$lang['searchcreatepage'] = 'Si tu non ha trovate lo que tu cerca, tu pote crear o modificar le pagina nominate secundo tu consulta con le button appropriate.'; $lang['regmissing'] = 'Es necessari completar tote le campos.'; $lang['reguexists'] = 'Regrettabilemente, un usator con iste nomine ja existe.'; $lang['regsuccess'] = 'Le conto ha essite create e le contrasigno ha essite inviate per e-mail.'; diff --git a/inc/lang/ia/searchpage.txt b/inc/lang/ia/searchpage.txt index c536833717169c0fd002f1b87793e61ce867752b..a8f7fce514c8a3b8ae1f049bf0f20e15a06de0cd 100644 --- a/inc/lang/ia/searchpage.txt +++ b/inc/lang/ia/searchpage.txt @@ -1,5 +1,5 @@ ====== Recerca ====== -Le resultatos de tu recerca se trova hic infra. Si tu non ha trovate lo que tu cerca, tu pote crear o modificar le pagina nominate secundo tu consulta con le button appropriate. +Le resultatos de tu recerca se trova hic infra. @CREATEPAGEINFO@ ===== Resultatos ===== \ No newline at end of file diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index ff77cf24da7c008f213901931ba729728fc740ba..dc4ca00e0ef10efe2df1cdfeadd9e7aee3eafa7b 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -69,6 +69,7 @@ $lang['badlogin'] = 'Maaf, username atau password salah.'; $lang['badpassconfirm'] = 'Maaf, password salah'; $lang['minoredit'] = 'Perubahan Minor'; $lang['draftdate'] = 'Simpan draft secara otomatis'; +$lang['searchcreatepage'] = 'Jika Anda tidak menemukan apa yang diinginkan, Anda dapat membuat halaman baru, dengan nama sesuai "text pencarian" Anda. Gunakan tombol "Edit halaman ini".'; $lang['regmissing'] = 'Maaf, Anda harus mengisi semua field.'; $lang['reguexists'] = 'Maaf, user dengan user login ini telah ada.'; $lang['regsuccess'] = 'User telah didaftarkan dan password telah dikirim ke email Anda.'; diff --git a/inc/lang/id/searchpage.txt b/inc/lang/id/searchpage.txt index c47bed7dc5625b14a6362bf9794f92cccb00dcf0..b3fb56580057b838bca297d0c6896c9a91c0a68d 100644 --- a/inc/lang/id/searchpage.txt +++ b/inc/lang/id/searchpage.txt @@ -1,5 +1,5 @@ ====== Pencarian ====== -Anda dapat menemukan hasil pencarian dibawah ini. Jika Anda tidak menemukan apa yang diinginkan, Anda dapat membuat halaman baru, dengan nama sesuai "text pencarian" Anda. Gunakan tombol "Edit halaman ini". +Anda dapat menemukan hasil pencarian dibawah ini. @CREATEPAGEINFO@ ===== Hasil Pencarian ===== \ No newline at end of file diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index f59a7b9488327edb997b1012f5371f4ca095b53f..c6b99d5b501301b7f564eabc1c78f54f55359e56 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -20,6 +20,7 @@ * @author Mirko <malisan.mirko@gmail.com> * @author Francesco <francesco.cavalli@hotmail.com> * @author Fabio <fabioslurp@yahoo.it> + * @author Torpedo <dgtorpedo@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -81,6 +82,7 @@ $lang['badpassconfirm'] = 'La password è errata'; $lang['minoredit'] = 'Modifiche minori'; $lang['draftdate'] = 'Bozza salvata in automatico il'; $lang['nosecedit'] = 'La pagina è stata modificata nel frattempo; è impossibile modificare solo la sezione scelta, quindi è stata caricata la pagina intera.'; +$lang['searchcreatepage'] = 'Se non hai trovato quello che cercavi, puoi creare una nuova pagina con questo titolo usando il pulsante \'\'Crea questa pagina\'\'.'; $lang['regmissing'] = 'Devi riempire tutti i campi.'; $lang['reguexists'] = 'Il nome utente inserito esiste già .'; $lang['regsuccess'] = 'L\'utente è stato creato. La password è stata spedita via email.'; @@ -151,6 +153,7 @@ $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?'; $lang['js']['restore_confirm'] = 'Vuoi davvero ripristinare questa versione?'; $lang['js']['media_diff'] = 'Guarda le differenze:'; $lang['js']['media_diff_both'] = 'Fianco a Fianco'; +$lang['js']['media_diff_opacity'] = 'Trasparire'; $lang['js']['media_diff_portions'] = 'rubare'; $lang['js']['media_select'] = 'Seleziona files..'; $lang['js']['media_upload_btn'] = 'Upload'; @@ -198,6 +201,8 @@ $lang['diff_side'] = 'Fianco a Fianco'; $lang['diffprevrev'] = 'Revisione precedente'; $lang['diffnextrev'] = 'Prossima revisione'; $lang['difflastrev'] = 'Ultima revisione'; +$lang['diffbothprevrev'] = 'Entrambe le parti precedenti la revisione'; +$lang['diffbothnextrev'] = 'Entrambe le parti successive la revisione'; $lang['line'] = 'Linea'; $lang['breadcrumb'] = 'Traccia:'; $lang['youarehere'] = 'Ti trovi qui:'; @@ -295,6 +300,7 @@ Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le <a href="http://dokuwiki.org/install">istruzioni per l\'installazione di Dokuwiki</a>'; $lang['i_funcna'] = 'La funzione PHP <code>%s</code> non è disponibile. Forse è stata disabilitata dal tuo provider per qualche motivo?'; $lang['i_phpver'] = 'La versione di PHP <code>%s</code> è inferiore a quella richiesta <code>%s</code>. Devi aggiornare l\'installazione di PHP.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload deve essere disabilitato in php.ini per eseguire DokuWiki.'; $lang['i_permfail'] = 'DokuWiki non può scrivere <code>%s</code>. E\' necessario correggere i permessi per questa directory!'; $lang['i_confexists'] = '<code>%s</code> esiste già '; $lang['i_writeerr'] = 'Impossibile creare <code>%s</code>. E\' necessario verificare i permessi della directory o del file oppure creare il file manualmente.'; @@ -347,3 +353,4 @@ $lang['media_restore'] = 'Ripristina questa versione'; $lang['currentns'] = 'Namespace corrente'; $lang['searchresult'] = 'Risultati della ricerca'; $lang['plainhtml'] = 'HTML'; +$lang['page_nonexist_rev'] = 'Pagina non esistente a %s. E\' stata creata successivamente a <a href="%s">%s</a>.'; diff --git a/inc/lang/it/searchpage.txt b/inc/lang/it/searchpage.txt index 60a019c3e7b8f2c92202e20000eb899d96550be5..6f269da015e89c172a0ae7c4b2d2fd7f290b3e37 100644 --- a/inc/lang/it/searchpage.txt +++ b/inc/lang/it/searchpage.txt @@ -1,5 +1,5 @@ ====== Cerca ====== -Questi sono i risultati della ricerca. Se non hai trovato quello che cercavi, puoi creare una nuova pagina con questo titolo usando il pulsante ''Crea questa pagina''. +Questi sono i risultati della ricerca. @CREATEPAGEINFO@ ===== Risultati ===== diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index 381863eb3538ec0980256266d19aa8b3ad3b3a86..3a5f169e7673e02f4441449294715120ae61a2da 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -73,6 +73,7 @@ $lang['badpassconfirm'] = 'パスワードãŒé–“é•ã£ã¦ã„ã¾ã™ã€‚'; $lang['minoredit'] = 'å°å¤‰æ›´'; $lang['draftdate'] = 'ドラフトä¿å˜æ—¥æ™‚:'; $lang['nosecedit'] = 'ページ内容ãŒå¤‰æ›´ã•ã‚Œã¦ã„ã¾ã™ãŒã‚»ã‚¯ã‚·ãƒ§ãƒ³æƒ…å ±ãŒå¤ã„ãŸã‚ã€ä»£ã‚ã‚Šã«ãƒšãƒ¼ã‚¸å…¨ä½“ã‚’ãƒãƒ¼ãƒ‰ã—ã¾ã—ãŸã€‚'; +$lang['searchcreatepage'] = 'ã‚‚ã—ã€æŽ¢ã—ã¦ã„ã‚‹ã‚‚ã®ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ 検索ã‚ーワードã«ã¡ãªã‚“ã åå‰ã®æ–‡æ›¸ã‚’作æˆã‚‚ã—ãã¯ç·¨é›†ã‚’è¡Œã£ã¦ãã ã•ã„。'; $lang['regmissing'] = 'å…¨ã¦ã®é …目を入力ã—ã¦ãã ã•ã„。'; $lang['reguexists'] = 'ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¯æ—¢ã«å˜åœ¨ã—ã¦ã„ã¾ã™ã€‚'; $lang['regsuccess'] = 'æ–°ã—ã„ユーザーãŒä½œæˆã•ã‚Œã¾ã—ãŸã€‚パスワードã¯ç™»éŒ²ã—ãŸãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹å®›ã¦ã«é€ä»˜ã•ã‚Œã¾ã™ã€‚'; @@ -343,3 +344,5 @@ $lang['currentns'] = 'ç¾åœ¨ã®åå‰ç©ºé–“'; $lang['searchresult'] = '検索çµæžœ'; $lang['plainhtml'] = 'プレーンHTML'; $lang['wikimarkup'] = 'Wikiマークアップ'; +$lang['page_nonexist_rev'] = '指定ページ %s ã¯ã‚ã‚Šã¾ã›ã‚“。ã“ã®ãƒªãƒ³ã‚¯ <a href="%s">%s</a> ã‹ã‚‰ä½œæˆã§ãã¾ã™ã€‚'; +$lang['unable_to_parse_date'] = 'パラメータ "%s" を処ç†ã§ãã¾ã›ã‚“。'; diff --git a/inc/lang/ja/searchpage.txt b/inc/lang/ja/searchpage.txt index af312728b9c34080dcadf6154eceb25a2d3276cf..80b0950c6878357b2edd6d3425ce7996e5a8c1e9 100644 --- a/inc/lang/ja/searchpage.txt +++ b/inc/lang/ja/searchpage.txt @@ -1,5 +1,5 @@ ====== 検索 ====== -以下ã«æ¤œç´¢çµæžœã‚’表示ã—ã¾ã™ã€‚ã‚‚ã—ã€æŽ¢ã—ã¦ã„ã‚‹ã‚‚ã®ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ 検索ã‚ーワードã«ã¡ãªã‚“ã åå‰ã®æ–‡æ›¸ã‚’作æˆã‚‚ã—ãã¯ç·¨é›†ã‚’è¡Œã£ã¦ãã ã•ã„。 +以下ã«æ¤œç´¢çµæžœã‚’表示ã—ã¾ã™ã€‚@CREATEPAGEINFO@ ===== çµæžœ ===== diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index ff5e66d9b1b8584d28e899af07cc7913301eeeb9..877c43de3b86b79904dcbecc37ac2734038ce87d 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -74,6 +74,7 @@ $lang['badpassconfirm'] = '죄송하지만 비밀번호가 잘못ë˜ì—ˆ $lang['minoredit'] = '사소한 바뀜'; $lang['draftdate'] = '초안 ìžë™ ì €ìž¥ 시간'; $lang['nosecedit'] = 'í•œ ë™ì•ˆ 문서가 바뀌었으며, 문단 ì •ë³´ê°€ 오래ë˜ì–´ 문서 ì „ì²´ë¥¼ ëŒ€ì‹ ì—´ì—ˆìŠµë‹ˆë‹¤.'; +$lang['searchcreatepage'] = '만약 ì›í•˜ëŠ” 문서를 찾지 못했다면, \'\'문서 만들기\'\'나 \'\'문서 편집\'\'ì„ ì‚¬ìš©í•´ 검색어와 ê°™ì€ ì´ë¦„ì˜ ë¬¸ì„œë¥¼ 만들거나 íŽ¸ì§‘í• ìˆ˜ 있습니다.'; $lang['regmissing'] = '죄송하지만 ëª¨ë“ í•„ë“œë¥¼ 채워야 합니다.'; $lang['reguexists'] = '죄송하지만 ê°™ì€ ì´ë¦„ì„ ì‚¬ìš©í•˜ëŠ” 사용ìžê°€ 있습니다.'; $lang['regsuccess'] = '사용ìžë¥¼ 만들었으며 비밀번호는 ì´ë©”ì¼ë¡œ 보냈습니다.'; @@ -136,7 +137,7 @@ $lang['js']['medialeft'] = '왼쪽으로 그림 배치'; $lang['js']['mediaright'] = '오른쪽으로 그림 배치'; $lang['js']['mediacenter'] = '가운ë°ìœ¼ë¡œ 그림 배치'; $lang['js']['medianoalign'] = '배치하지 ì•ŠìŒ'; -$lang['js']['nosmblinks'] = '윈ë„ìš° ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ ë§ˆì´í¬ë¡œì†Œí”„트 ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ì—서만 ë™ìž‘합니다.\n그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; +$lang['js']['nosmblinks'] = 'Windows ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ Microsoft Internet Explorerì—서만 ë™ìž‘합니다.\n그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; $lang['js']['linkwiz'] = 'ë§í¬ 마법사'; $lang['js']['linkto'] = '다ìŒìœ¼ë¡œ ì—°ê²°:'; $lang['js']['del_confirm'] = 'ì •ë§ ì„ íƒëœ í•ëª©ì„ ì‚ì œí•˜ê² ìŠµë‹ˆê¹Œ?'; @@ -280,11 +281,11 @@ $lang['subscr_style_list'] = '마지막 ì´ë©”ì¼ ì´í›„ ë°”ë€ ë¬¸ì„œì˜ $lang['authtempfail'] = 'ì‚¬ìš©ìž ì¸ì¦ì„ ì¼ì‹œì 으로 ì‚¬ìš©í• ìˆ˜ 없습니다. 만약 계ì†í•´ì„œ ë¬¸ì œê°€ ë°œìƒí•œë‹¤ë©´ 위키 관리ìžì—게 문ì˜í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; $lang['authpwdexpire'] = '비밀번호를 바꾼지 %dì¼ì´ 지났으며, 비밀번호를 곧 바꿔야 합니다.'; $lang['i_chooselang'] = 'ì‚¬ìš©í• ì–¸ì–´ë¥¼ ì„ íƒí•˜ì„¸ìš”'; -$lang['i_installer'] = 'ë„ì¿ ìœ„í‚¤ 설치'; +$lang['i_installer'] = 'ë„ì¿ ìœ„í‚¤ 설치 관리ìž'; $lang['i_wikiname'] = '위키 ì´ë¦„'; $lang['i_enableacl'] = 'ACL 활성화 (권장)'; $lang['i_superuser'] = 'ìŠˆí¼ ì‚¬ìš©ìž'; -$lang['i_problems'] = '설치하는 ë™ì•ˆ 아래와 ê°™ì€ ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. ë¬¸ì œë¥¼ í•´ê²°í•œ 후 설치를 계ì†í• 수 있습니다.'; +$lang['i_problems'] = '설치 관리ìžê°€ ì•„ëž˜ì— ë‚˜ì™€ 있는 몇 가지 ë¬¸ì œë¥¼ 찾았습니다. ë¬¸ì œë¥¼ 해결하지 ì „ê¹Œì§€ 설치를 계ì†í• 수 없습니다.'; $lang['i_modified'] = '보안 ìƒì˜ ì´ìœ ë¡œ ì´ ìŠ¤í¬ë¦½íŠ¸ëŠ” ìˆ˜ì •ë˜ì§€ ì•Šì€ ìƒˆ ë„ì¿ ìœ„í‚¤ 설치ì—서만 ë™ìž‘ë©ë‹ˆë‹¤. 다운로드한 압축 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/ko:install">ë„ì¿ ìœ„í‚¤ 설치 ê³¼ì •</a>ì„ ì°¸ê³ í•´ì„œ 설치하세요.'; $lang['i_funcna'] = '<code>%s</code> PHP 함수를 ì‚¬ìš©í• ìˆ˜ 없습니다. 호스트 ì œê³µìžê°€ ì–´ë–¤ ì´ìœ ì—ì„œì¸ì§€ 막아 놓았ì„지 모릅니다.'; @@ -295,8 +296,10 @@ $lang['i_confexists'] = '<code>%s</code>(ì€)는 ì´ë¯¸ 존재합니다 $lang['i_writeerr'] = '<code>%s</code>(ì„)를 만들 수 없습니다. ë¨¼ì € ë””ë ‰í„°ë¦¬/íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ê³ 파ì¼ì„ 수ë™ìœ¼ë¡œ 만드세요.'; $lang['i_badhash'] = 'dokuwiki.php를 ì¸ì‹í• 수 없거나 ì›ë³¸ 파ì¼ì´ 아닙니다 (í•´ì‹œ=<code>%s</code>)'; $lang['i_badval'] = '<code>%s</code> - 잘못ë˜ì—ˆê±°ë‚˜ 빈 값입니다'; -$lang['i_success'] = '환경 ì„¤ì •ì´ ì„±ê³µì 으로 ë났습니다. 지금 install.php를 ì§€ì›Œë„ ìƒê´€ì—†ìŠµë‹ˆë‹¤. <a href="doku.php?id=wiki:welcome">새 ë„ì¿ ìœ„í‚¤</a>ë¡œ 들어가세요.'; -$lang['i_failure'] = '환경 ì„¤ì • 파ì¼ì— 쓰는 ë„ì¤‘ì— ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. <a href="doku.php?id=wiki:welcome">새 ë„ì¿ ìœ„í‚¤</a>를 사용하기 ì „ì— ìˆ˜ë™ìœ¼ë¡œ ë¬¸ì œë¥¼ 해결해야 합니다.'; +$lang['i_success'] = '환경 ì„¤ì •ì´ ì„±ê³µì 으로 ë났습니다. 지금 install.php를 ì§€ì›Œë„ ìƒê´€ì—†ìŠµë‹ˆë‹¤. +<a href="doku.php?id=wiki:welcome">새 ë„ì¿ ìœ„í‚¤</a>ë¡œ 들어가세요.'; +$lang['i_failure'] = '환경 ì„¤ì • 파ì¼ì— 쓰는 ë„ì¤‘ì— ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. +<a href="doku.php?id=wiki:welcome">새 ë„ì¿ ìœ„í‚¤</a>를 사용하기 ì „ì— ìˆ˜ë™ìœ¼ë¡œ ë¬¸ì œë¥¼ 해결해야 합니다.'; $lang['i_policy'] = '초기 ACL ì •ì±…'; $lang['i_pol0'] = '열린 위키 (누구나 ì½ê¸°, 쓰기, 올리기가 가능합니다)'; $lang['i_pol1'] = '공개 위키 (누구나 ì½ì„ 수 있지만, 등ë¡ëœ 사용ìžë§Œ 쓰기와 올리기가 가능합니다)'; @@ -343,3 +346,5 @@ $lang['currentns'] = '현재 ì´ë¦„공간'; $lang['searchresult'] = '검색 ê²°ê³¼'; $lang['plainhtml'] = 'ì¼ë°˜ HTML'; $lang['wikimarkup'] = '위키 문법'; +$lang['page_nonexist_rev'] = '문서가 %sì— ì¡´ìž¬í•˜ì§€ 않았습니다. ê·¸ 뒤로 <a href="%s">%s</a>ì— ë§Œë“¤ì–´ì¡ŒìŠµë‹ˆë‹¤.'; +$lang['unable_to_parse_date'] = '"%s" 변수ì—ì„œ 구문 분ì„í• ìˆ˜ 없습니다.'; diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 53faa04c6feec977c0544bbefe3e87477806738c..6aa1c89af8f2e8985f8cd2311abfc7489d1e8213 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 검색 ====== -아래ì—ì„œ 검색 결과를 ì°¾ì„ ìˆ˜ 있습니다. 만약 ì›í•˜ëŠ” 문서를 찾지 못했다면, ''문서 만들기''나 ''문서 편집''ì„ ì‚¬ìš©í•´ 검색어와 ê°™ì€ ì´ë¦„ì˜ ë¬¸ì„œë¥¼ 만들거나 íŽ¸ì§‘í• ìˆ˜ 있습니다. +아래ì—ì„œ 검색 결과를 ì°¾ì„ ìˆ˜ 있습니다. @CREATEPAGEINFO@ -===== ê²°ê³¼ ===== \ No newline at end of file +===== ê²°ê³¼ ===== diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php index b1b733ec94a8e9bd298de78b97480e22287804dd..a3c91eee8584af45f8b29fcbb14a6e63531f1043 100644 --- a/inc/lang/ku/lang.php +++ b/inc/lang/ku/lang.php @@ -138,5 +138,6 @@ $lang['img_copyr'] = 'Copyright:'; $lang['img_format'] = 'Format:'; $lang['img_camera'] = 'Camera:'; $lang['img_keywords']= 'Keywords:'; +$lang['searchcreatepage'] = "Heke tiÅŸtek nehatibe dîtin, tu dikarî dest bi nivîsandina rûpelekê nû bikî. Ji bo vê, ''Vê rûpelê biguherîne'' bitikîne."; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/ku/searchpage.txt b/inc/lang/ku/searchpage.txt index 6646228d5200b6b5a2626139f7cdf79b3d07523a..f762b9873c7f9422eb5871c0b4c168ec90059911 100644 --- a/inc/lang/ku/searchpage.txt +++ b/inc/lang/ku/searchpage.txt @@ -1,5 +1,5 @@ ====== Lêbigere ====== -Jêr encamên lêgerandina te tên nîşan dan. Heke tiÅŸtek nehatibe dîtin, tu dikarî dest bi nivîsandina rûpelekê nû bikî. Ji bo vê, ''Vê rûpelê biguherîne'' bitikîne. +Jêr encamên lêgerandina te tên nîşan dan. @CREATEPAGEINFO@ ===== Encam ===== \ No newline at end of file diff --git a/inc/lang/la/searchpage.txt b/inc/lang/la/searchpage.txt index 8e929110d7fb60f408a526992a04c504da760352..75fd7cd5bcc924e1b699c623e6abce8b10cb60f6 100644 --- a/inc/lang/la/searchpage.txt +++ b/inc/lang/la/searchpage.txt @@ -1,5 +1,5 @@ ====== Quaerere ====== -Responsiones in hac pagina uidere potes. +Responsiones in hac pagina uidere potes. @CREATEPAGEINFO@ ===== Responsiones ===== \ No newline at end of file diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php index a1b6ccf84abb730655d79890930ec71c3638477a..1090878e2b5e11785a758ab7959e2f6eafc6e288 100644 --- a/inc/lang/lb/lang.php +++ b/inc/lang/lb/lang.php @@ -55,6 +55,7 @@ $lang['badlogin'] = 'Entschëllegt, de Benotzernumm oder d\'Passwue $lang['minoredit'] = 'Kleng Ännerungen'; $lang['draftdate'] = 'Entworf automatesch gespäichert den'; $lang['nosecedit'] = 'D\'Säit gouf an Zwëschenzäit g\'ännert, Sektiounsinfo veralt. Ganz Säit gouf aplaz gelueden.'; +$lang['searchcreatepage'] = 'Wanns de net fënns wats de gesicht hues kanns de eng nei Säit mam Numm vun denger Sich uleeën.'; $lang['regmissing'] = 'Du muss all d\'Felder ausfëllen.'; $lang['reguexists'] = 'Et get schonn e Benotzer mat deem Numm.'; $lang['regsuccess'] = 'De Benotzer gouf erstallt an d\'Passwuert via Email geschéckt.'; diff --git a/inc/lang/lb/searchpage.txt b/inc/lang/lb/searchpage.txt index 5e15a2c6079c3355389c6e22f1d9053180a063dd..9f4e5475e5548a69e881aae34a0b9c49f1563d15 100644 --- a/inc/lang/lb/searchpage.txt +++ b/inc/lang/lb/searchpage.txt @@ -1,5 +1,5 @@ ======Sich====== -Hei ënnendrënner sinn d'Resultater vun der Sich. Wanns de net fënns wats de gesicht hues kanns de eng nei Säit mam Numm vun denger Sich uleeën. +Hei ënnendrënner sinn d'Resultater vun der Sich. @CREATEPAGEINFO@ =====Resultater===== \ No newline at end of file diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index d6552d68c76ac2a76f2462aac5e8eea64badf3f8..d53a117f4da945f0ad6742fef11c8973d0d33c5d 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -60,6 +60,7 @@ $lang['badlogin'] = 'NurodÄ—te blogÄ… vartotojo vardÄ… arba slapta $lang['minoredit'] = 'Nedidelis pataisymas'; $lang['draftdate'] = 'JuodraÅ¡tis automatiÅ¡kai iÅ¡saugotas'; $lang['nosecedit'] = 'Puslapis buvo kažkieno pataisytas, teksto dalies informacija tapo pasenusi, todÄ—l pakrautas visas puslapis.'; +$lang['searchcreatepage'] = 'Jeigu neradote to, ko ieÅ¡kojote, galite sukurti naujÄ… puslapį Å¡iuo pavadinimu paspausdami "Redaguoti šį puslapį".'; $lang['regmissing'] = 'Turite užpildyti visus laukus.'; $lang['reguexists'] = 'Vartotojas su pasirinktu prisijungimo vardu jau egzistuoja.'; $lang['regsuccess'] = 'Vartotojas sukurtas, slaptažodis iÅ¡siųstas el. paÅ¡tu.'; diff --git a/inc/lang/lt/searchpage.txt b/inc/lang/lt/searchpage.txt index a83a6a58a99fbb19648e781fa5a1a7d8ec240e0e..f03f5f17b290d87e21cccd0b925ae6bb6f073825 100644 --- a/inc/lang/lt/searchpage.txt +++ b/inc/lang/lt/searchpage.txt @@ -1,5 +1,5 @@ ====== PaieÅ¡ka ====== -Žemiau matote JÅ«sų atliktos paieÅ¡kos rezultatus. Jeigu neradote to, ko ieÅ¡kojote, galite sukurti naujÄ… puslapį Å¡iuo pavadinimu paspausdami "Redaguoti šį puslapį". +Žemiau matote JÅ«sų atliktos paieÅ¡kos rezultatus. @CREATEPAGEINFO@ ===== Rezultatai ===== \ No newline at end of file diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 15994afe602f72b7d937303df4034f75db021b04..ddc97fa8906e91837b16857b131f5dfef979e398 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -65,6 +65,7 @@ $lang['badpassconfirm'] = 'Atvaino, aplama parole'; $lang['minoredit'] = 'SÄ«ki labojumi'; $lang['draftdate'] = 'Melnraksts automÄtiski saglabÄts'; $lang['nosecedit'] = 'Lapa pa Å¡o laiku ir mainÄ«jusies, sekcijas informÄcija novecojusi. IelÄdÄ“ta lapas pilnÄs versija.'; +$lang['searchcreatepage'] = 'Ja neatradi meklÄ“to, nospiežot pogu "Labot lapu", vari izveidot jaunu lapu ar tevis meklÄ“tajiem atslÄ“gvÄrdiem nosaukumÄ.'; $lang['regmissing'] = 'Atvaino, jÄaizpilda visas ailes.'; $lang['reguexists'] = 'Atvaino, tÄds lietotÄjs jau ir.'; $lang['regsuccess'] = 'LietotÄjs izveidots. Parole nosÅ«tÄ«ta pa pastu.'; diff --git a/inc/lang/lv/searchpage.txt b/inc/lang/lv/searchpage.txt index 22eb55f04b42efcb4a8b56450686d91d420b0115..a67f9f166a5627671519a9db03097b01fb3259d6 100644 --- a/inc/lang/lv/searchpage.txt +++ b/inc/lang/lv/searchpage.txt @@ -1,4 +1,5 @@ ====== MeklÄ“Å¡ana ====== -Te vari redzÄ“t meklÄ“Å¡anas rezultÄtus. Ja neatradi meklÄ“to, nospiežot pogu "Labot lapu", vari izveidot jaunu lapu ar tevis meklÄ“tajiem atslÄ“gvÄrdiem nosaukumÄ. +Te vari redzÄ“t meklÄ“Å¡anas rezultÄtus. @CREATEPAGEINFO@ + ===== Atrasts ===== diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php index 6239c01fe5f96c437a6c022fe9eb204a7aa0c447..b6e0cc6e0281a822cefef387e2f5ea2ae7f415fb 100644 --- a/inc/lang/mg/lang.php +++ b/inc/lang/mg/lang.php @@ -117,5 +117,5 @@ $lang['qb_sig'] = 'Manisy sonia'; $lang['js']['del_confirm']= 'Hofafana ilay andalana?'; $lang['admin_register']= 'Ampio mpampiasa vaovao...'; - +$lang['searchcreatepage'] = "Raha tsy nahita izay notadiavinao ianao, dia afaka mamorona pejy vaovao avy amin'ny teny nanaovanao fikarohana; Ampiasao ny bokotra ''Hanova ny pejy''."; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/mg/searchpage.txt b/inc/lang/mg/searchpage.txt index 68c6271df45fa076aff882d427cac285e1ae9990..ef3ed8b19139476703b1853ecf9fabb9d1b0fa58 100644 --- a/inc/lang/mg/searchpage.txt +++ b/inc/lang/mg/searchpage.txt @@ -2,6 +2,6 @@ Ireto ambany ireto ny valin'ny fikarohanao. -Raha tsy nahita izay notadiavinao ianao, dia afaka mamorona pejy vaovao avy amin'ny teny nanaovanao fikarohana; Ampiasao ny bokotra ''Hanova ny pejy''. +@CREATEPAGEINFO@ ===== Vokatry ny fikarohana ===== \ No newline at end of file diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 72779dd10f84a4710740195c5be0a842f059f262..7ebb14b9362de03b11e86c11ab405e5b8809da30 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -68,6 +68,7 @@ $lang['badlogin'] = 'माफ़ करा, वापरकरॠ$lang['minoredit'] = 'छोटे बदल'; $lang['draftdate'] = 'पà¥à¤°à¤¤ आपोआप सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ केलà¥à¤¯à¤¾à¤šà¥€ तारीख'; $lang['nosecedit'] = 'मधà¥à¤¯à¤‚तरीचà¥à¤¯à¤¾ काळात हे पृषà¥à¤ बदलले आहे.विà¤à¤¾à¤—ाची माहिती जà¥à¤¨à¥€ à¤à¤¾à¤²à¥€ होती. तà¥à¤¯à¤¾à¤à¤µà¤œà¥€ सबंध पृषà¥à¤ परत लोड केले आहे.'; +$lang['searchcreatepage'] = 'जर तà¥à¤®à¤šà¥€ शोधत असलेली गोषà¥à¤Ÿ तà¥à¤®à¥à¤¹à¤¾à¤²à¤¾ सापडली नाही, तर योगà¥à¤¯ बटण वापरून तà¥à¤®à¥à¤¹à¥€ शोधत असलेलà¥à¤¯à¤¾ गोषà¥à¤Ÿà¥€à¤µà¤¿à¤·à¤¯à¥€ तà¥à¤®à¥à¤¹à¥€ à¤à¤–ादे पान निरà¥à¤®à¤¾à¤£ किंवा संपादित करू शकता.'; $lang['regmissing'] = 'कृपया सरà¥à¤µ रकाने à¤à¤°à¤¾.'; $lang['reguexists'] = 'या नावाने सदसà¥à¤¯à¤¾à¤šà¥€ नोंदणी à¤à¤¾à¤²à¥‡à¤²à¥€ आहे, कृपया दà¥à¤¸à¤°à¥‡ सदसà¥à¤¯ नाव निवडा.'; $lang['regsuccess'] = 'सदसà¥à¤¯à¤¾à¤šà¥€ नोंदणी à¤à¤¾à¤²à¥€ आहे आणि परवलीचा शबà¥à¤¦ इमेल केला आहे.'; diff --git a/inc/lang/mr/searchpage.txt b/inc/lang/mr/searchpage.txt index 23e10b1d3a95214f5f154d5a7c9f0d591b014e14..d41954b4a632c6bc8e3237f06b7afbf3fd820952 100644 --- a/inc/lang/mr/searchpage.txt +++ b/inc/lang/mr/searchpage.txt @@ -1,5 +1,5 @@ ====== शोध ====== -तà¥à¤®à¥à¤¹à¤¾à¤²à¤¾ खाली तà¥à¤®à¤šà¥à¤¯à¤¾ शोधाचे फलित दिसतील. जर तà¥à¤®à¤šà¥€ शोधत असलेली गोषà¥à¤Ÿ तà¥à¤®à¥à¤¹à¤¾à¤²à¤¾ सापडली नाही, तर योगà¥à¤¯ बटण वापरून तà¥à¤®à¥à¤¹à¥€ शोधत असलेलà¥à¤¯à¤¾ गोषà¥à¤Ÿà¥€à¤µà¤¿à¤·à¤¯à¥€ तà¥à¤®à¥à¤¹à¥€ à¤à¤–ादे पान निरà¥à¤®à¤¾à¤£ किंवा संपादित करू शकता. +तà¥à¤®à¥à¤¹à¤¾à¤²à¤¾ खाली तà¥à¤®à¤šà¥à¤¯à¤¾ शोधाचे फलित दिसतील. @CREATEPAGEINFO@ ====== फलित ====== \ No newline at end of file diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index ddf0312422d1977ed16b999b8e3c2c766fc95e8a..d4efc89bdfa805666a21e8283a8d45270e632c29 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -58,6 +58,7 @@ $lang['badlogin'] = 'माफ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ , पॠ$lang['minoredit'] = 'सामानà¥à¤¯ परिवरà¥à¤¤à¤¨'; $lang['draftdate'] = 'डà¥à¤°à¤¾à¤«à¥à¤Ÿ सà¥à¤µà¤šà¤¾à¤²à¤¿à¤¤ रà¥à¤ªà¤®à¤¾ वचत à¤à¤à¤•à¥‹'; $lang['nosecedit'] = 'यो पृषà¥à¤ यसै बखतमा परिवरà¥à¤¤à¤¨ à¤à¤¯à¥‹, खणà¥à¤¡ जानकारी अधà¥à¤¯à¤¾à¤µà¤§à¤¿à¤• हà¥à¤¨ सकेन र पूरै पृषà¥à¤ लोड à¤à¤¯à¥‹ । '; +$lang['searchcreatepage'] = 'यदि तपाईले आफà¥à¤²à¥‡ खोजेको पाउनà¥à¤à¤à¤¨ à¤à¤¨à¥‡, तपाईलेको उपयà¥à¤•à¥à¤¤ बटन पà¥à¤°à¤¯à¥‹à¤— गरी खोज सà¤à¤— समà¥à¤¬à¤¨à¥à¤§à¤¿à¤¤ शिरà¥à¤·à¤•à¤¹à¤°à¥ à¤à¤à¤•à¤¾ पृषà¥à¤ सृजना या समà¥à¤ªà¤¾à¤¦à¤¨ गरà¥à¤¨ सकà¥à¤¨à¥à¤¹à¥à¤¨à¥à¤› ।'; $lang['regmissing'] = 'माफ गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾ , सबै ठाउमा à¤à¤°à¥à¤¨à¥à¤ªà¤°à¥à¤¨à¥‡à¤› ।'; $lang['reguexists'] = 'यो नामको पà¥à¤°à¤¯à¥‹à¤—करà¥à¤¤à¤¾ पहिले देखि रहेको छ।'; $lang['regsuccess'] = 'यो पà¥à¤°à¤¯à¥‹à¤—करà¥à¤¤à¤¾ बनाइà¤à¤•à¥‹ छ र पà¥à¤°à¤µà¥‡à¤¶à¤¶à¤µà¥à¤¦ इमेलमा पठइà¤à¤•à¥‹ छ।'; diff --git a/inc/lang/ne/searchpage.txt b/inc/lang/ne/searchpage.txt index a8139f0ab1581b22dbc57a1a1e2a46c5748bf3eb..021306b4b83c5fa856241dfba673087ce3726d69 100644 --- a/inc/lang/ne/searchpage.txt +++ b/inc/lang/ne/searchpage.txt @@ -1,3 +1,5 @@ ====== खोज ====== -तपाईले आफà¥à¤¨à¥‹ खोजको निमà¥à¤¨ नतिजा पाउन सकà¥à¤¨à¥à¤¹à¥à¤¨à¥à¤›à¥¤ यदि तपाईले आफà¥à¤²à¥‡ खोजेको पाउनà¥à¤à¤à¤¨ à¤à¤¨à¥‡, तपाईलेको उपयà¥à¤•à¥à¤¤ बटन पà¥à¤°à¤¯à¥‹à¤— गरी खोज सà¤à¤— समà¥à¤¬à¤¨à¥à¤§à¤¿à¤¤ शिरà¥à¤·à¤•à¤¹à¤°à¥ à¤à¤à¤•à¤¾ पृषà¥à¤ सृजना या समà¥à¤ªà¤¾à¤¦à¤¨ गरà¥à¤¨ सकà¥à¤¨à¥à¤¹à¥à¤¨à¥à¤› । + +तपाईले आफà¥à¤¨à¥‹ खोजको निमà¥à¤¨ नतिजा पाउन सकà¥à¤¨à¥à¤¹à¥à¤¨à¥à¤›à¥¤ @CREATEPAGEINFO@ + ===== नतिजा ===== \ No newline at end of file diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index a9058720c07eb83258b21961fc09cd6a0020ace9..aa0087718f274cda1214f700912eac9c0897ae86 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -85,6 +85,7 @@ $lang['badpassconfirm'] = 'Sorry, het wachtwoord was onjuist'; $lang['minoredit'] = 'Kleine wijziging'; $lang['draftdate'] = 'Concept automatisch opgeslagen op'; $lang['nosecedit'] = 'De pagina is tussentijds veranderd, sectie-informatie was verouderd, volledige pagina geladen.'; +$lang['searchcreatepage'] = "Niks gevonden? Maak een nieuwe pagina met als naam je zoekopdracht. Klik hiervoor op ''Maak deze pagina aan''."; $lang['regmissing'] = 'Vul alle velden in'; $lang['reguexists'] = 'Er bestaat al een gebruiker met deze loginnaam.'; $lang['regsuccess'] = 'De gebruiker is aangemaakt. Het wachtwoord is per e-mail verzonden.'; diff --git a/inc/lang/nl/searchpage.txt b/inc/lang/nl/searchpage.txt index 3ace704c876cac73a806965acfc60ef50ab53ae6..e03679b2b75ded7d597e2fc887ae69d49cb19e3b 100644 --- a/inc/lang/nl/searchpage.txt +++ b/inc/lang/nl/searchpage.txt @@ -1,5 +1,5 @@ ====== Zoeken ====== -Hieronder zijn de resultaten van de zoekopdracht. Niks gevonden? Maak een nieuwe pagina met als naam je zoekopdracht. Klik hiervoor op ''Pagina aanpassen''. +Hieronder zijn de resultaten van de zoekopdracht. @CREATEPAGEINFO@ ===== Resultaten ===== diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index 6156fa34c91c47a1fd8efdbe04d690202ad8dea9..ecf10ff5bcc33c21900dfa2b6af269c992ce4b07 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -21,6 +21,7 @@ * @author Thomas Juberg <Thomas.Juberg@Gmail.com> * @author Boris <boris@newton-media.no> * @author Christopher Schive <chschive@frisurf.no> + * @author Patrick <spill.p@hotmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -82,6 +83,7 @@ $lang['badpassconfirm'] = 'Beklager, passordet var feil'; $lang['minoredit'] = 'Mindre endringer'; $lang['draftdate'] = 'Kladd autolagret'; $lang['nosecedit'] = 'Siden ble endret i mellomtiden, seksjonsinfo har blitt foreldet - lastet full side istedet.'; +$lang['searchcreatepage'] = 'Hvis du ikke finner det du leter etter, sÃ¥ kan du skape en ny side med samme navn som ditt søk ved Ã¥ klikke pÃ¥ \'\'**Lag denne siden**\'\'-knappen.'; $lang['regmissing'] = 'Vennligst fyll ut alle felt.'; $lang['reguexists'] = 'Det finnes allerede en konto med dette brukernavnet.'; $lang['regsuccess'] = 'Brukerkonto har blitt laget og passord har blitt sendt via e-post.'; @@ -115,7 +117,7 @@ $lang['searchmedia_in'] = 'Søk i %s'; $lang['txt_upload'] = 'Velg fil som skal lastes opp:'; $lang['txt_filename'] = 'Skriv inn wikinavn (alternativt):'; $lang['txt_overwrt'] = 'Overskriv eksisterende fil'; -$lang['maxuploadsize'] = 'Opplast maks % per fil.'; +$lang['maxuploadsize'] = 'Opplast maks %s per fil.'; $lang['lockedby'] = 'LÃ¥st av:'; $lang['lockexpire'] = 'LÃ¥singen utløper:'; $lang['js']['willexpire'] = 'Din redigeringslÃ¥s for dette dokumentet kommer snart til Ã¥ utløpe.\nFor Ã¥ unngÃ¥ versjonskonflikter bør du forhÃ¥ndsvise dokumentet ditt for Ã¥ forlenge redigeringslÃ¥sen.'; @@ -355,3 +357,4 @@ $lang['currentns'] = 'gjeldende navnemellomrom'; $lang['searchresult'] = 'Søk i resultat'; $lang['plainhtml'] = 'Enkel HTML'; $lang['wikimarkup'] = 'wiki-format'; +$lang['page_nonexist_rev'] = 'Finnes ingen side pÃ¥ %s. Den er derfor laget pÃ¥ <a href="%s">%s</a>'; diff --git a/inc/lang/no/searchpage.txt b/inc/lang/no/searchpage.txt index e94e7895b39e8846e597a647ed71704ffd31f130..2e7b0d887a62cf92696df7f3c5309050d3abb73f 100644 --- a/inc/lang/no/searchpage.txt +++ b/inc/lang/no/searchpage.txt @@ -1,5 +1,5 @@ ====== Søk ====== -Du ser resultatet av dette søket nedenfor. Hvis du ikke finner det du leter etter, sÃ¥ kan du skape en ny side med samme navn som ditt søk ved Ã¥ klikke pÃ¥ ''**Lag denne siden**''-knappen. +Du ser resultatet av dette søket nedenfor. @CREATEPAGEINFO@ ===== Resultat ===== diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index c6ff4983e936382986675d82c88b5d6f9840efae..baf3c28a989859047294646893a04e469354dfd8 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -78,6 +78,7 @@ $lang['badpassconfirm'] = 'Niestety, hasÅ‚o jest niepoprawne.'; $lang['minoredit'] = 'Mniejsze zmiany'; $lang['draftdate'] = 'Czas zachowania szkicu'; $lang['nosecedit'] = 'Strona zostaÅ‚a zmodyfikowana, sekcje zostaÅ‚y zmienione. ZaÅ‚adowano caÅ‚Ä… stronÄ™.'; +$lang['searchcreatepage'] = 'JeÅ›li nie znaleziono szukanego hasÅ‚a, możesz utworzyć nowÄ… stronÄ™, której tytuÅ‚em bÄ™dzie poszukiwane hasÅ‚o.'; $lang['regmissing'] = 'WypeÅ‚nij wszystkie pola.'; $lang['reguexists'] = 'Użytkownik o tej nazwie już istnieje.'; $lang['regsuccess'] = 'Utworzono użytkownika. HasÅ‚o zostaÅ‚o przesÅ‚ane pocztÄ….'; diff --git a/inc/lang/pl/searchpage.txt b/inc/lang/pl/searchpage.txt index 61b9ffbf94bad8eba46aa13979b4ea0c67a781e1..442975fe10e06dd04198d314cb2d42b4f4ae1894 100644 --- a/inc/lang/pl/searchpage.txt +++ b/inc/lang/pl/searchpage.txt @@ -1,5 +1,5 @@ ====== Wyszukiwanie ====== -Wyniki wyszukiwania. JeÅ›li nie znaleziono szukanego hasÅ‚a, możesz utworzyć nowÄ… stronÄ™, której tytuÅ‚em bÄ™dzie poszukiwane hasÅ‚o. +Wyniki wyszukiwania. @CREATEPAGEINFO@ ===== Wyniki ===== diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index 31940f5be1724bb648ea1b0edf0147874b9f98fe..be62af6fee24015ebb909d90b7f3a906d389be91 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -85,6 +85,7 @@ $lang['badpassconfirm'] = 'Desculpe, mas a senha está errada '; $lang['minoredit'] = 'Alterações mÃnimas'; $lang['draftdate'] = 'O rascunho foi salvo automaticamente em'; $lang['nosecedit'] = 'A página foi modificada nesse intervalo de tempo. Como a informação da seção estava desatualizada, foi carregada a página inteira.'; +$lang['searchcreatepage'] = 'Se você não encontrou o que está procurando, pode criar ou editar a página com o nome que você especificou, usando o botão apropriado.'; $lang['regmissing'] = 'Desculpe, mas você precisa preencher todos os campos.'; $lang['reguexists'] = 'Desculpe, mas já existe um usuário com esse nome.'; $lang['regsuccess'] = 'O usuário foi criado e a senha enviada para seu e-mail.'; diff --git a/inc/lang/pt-br/searchpage.txt b/inc/lang/pt-br/searchpage.txt index 2fba3afe9944a81d1db01d9bd436040eb8cd6b43..636bfeb7aef96b79031def5d209b9293a5d9aabf 100644 --- a/inc/lang/pt-br/searchpage.txt +++ b/inc/lang/pt-br/searchpage.txt @@ -1,5 +1,5 @@ ====== Pesquisa ====== -Você pode encontrar os resultados da sua pesquisa abaixo. Se você não encontrou o que está procurando, pode criar ou editar a página com o nome que você especificou, usando o botão apropriado. +Você pode encontrar os resultados da sua pesquisa abaixo. @CREATEPAGEINFO@ ===== Resultados ===== diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index ddc9b33ab38ca2dcd4f6a66112ac24ae787cdbb8..54f56f8e3b3798e9e8a2226f92ebb5c71d0b41f0 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'Infelizmente a palavra-passe não é a correct $lang['minoredit'] = 'Alterações Menores'; $lang['draftdate'] = 'Rascunho automaticamente gravado em'; $lang['nosecedit'] = 'A página foi modificada entretanto. Como a informação da secção estava desactualizada, foi carregada a página inteira.'; +$lang['searchcreatepage'] = 'Se não encontrou o que procurava pode criar uma nova página com o nome da sua pesquisa, usando o botão apropriado.'; $lang['regmissing'] = 'Por favor, preencha todos os campos.'; $lang['reguexists'] = 'Este utilizador já está inscrito. Por favor escolha outro nome de utilizador.'; $lang['regsuccess'] = 'O utilizador foi criado e a senha foi enviada para o endereço de correio electrónico usado na inscrição.'; diff --git a/inc/lang/pt/searchpage.txt b/inc/lang/pt/searchpage.txt index 2239330dd85219edf6b6f8fbdc79f7bfe65aa121..563ce28343796e8c3781c06f817c765542d9ed00 100644 --- a/inc/lang/pt/searchpage.txt +++ b/inc/lang/pt/searchpage.txt @@ -1,5 +1,5 @@ ====== Pesquisa ====== -Pode encontrar os resultados da sua pesquisa abaixo. Se não encontrou o que procurava pode criar uma nova página com o nome da sua pesquisa, usando o botão apropriado. +Pode encontrar os resultados da sua pesquisa abaixo. @CREATEPAGEINFO@ ===== Resultados ===== diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index cd7d4fcc3510d9d169f42c3e14c0f7512703aa61..e8d8c4af29d50ef08fc83f903ac8fbf5d9a77138 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -67,6 +67,7 @@ $lang['badlogin'] = 'Ne pare rău, utilizatorul È™i/sau parola au f $lang['minoredit'] = 'Modificare minoră'; $lang['draftdate'] = 'Schiță salvată automat la'; $lang['nosecedit'] = 'Pagina s-a modificat între timp, secÈ›iunea info a expirat, s-a încărcat pagina întreagă în loc.'; +$lang['searchcreatepage'] = "Dacă nu ai găsit ce ai căutat, poÈ›i crea o pagină nouă prin folosirea butonului ''Editează această pagină''."; $lang['regmissing'] = 'Ne pare rău, trebuie să completezi toate cîmpurile.'; $lang['reguexists'] = 'Ne pare rău, un utilizator cu acest nume este deja autentificat.'; $lang['regsuccess'] = 'Utilizatorul a fost creat. Parola a fost trimisă prin e-mail.'; diff --git a/inc/lang/ro/searchpage.txt b/inc/lang/ro/searchpage.txt index 53e66adf06743fbbc75740d9d8ef5b0996511367..d4e3df2ee7a1001458367ec8820bc5d7fceb2469 100644 --- a/inc/lang/ro/searchpage.txt +++ b/inc/lang/ro/searchpage.txt @@ -1,5 +1,5 @@ ====== Căutare ====== -Rezultatele căutării sunt afiÈ™ate mai jos. Dacă nu ai găsit ce ai căutat, poÈ›i crea o pagină nouă prin folosirea butonului ''Editează această pagină''. +Rezultatele căutării sunt afiÈ™ate mai jos. @CREATEPAGEINFO@ ===== Rezultate ===== diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index e2f9b3d57f386123bdaf4f86ea10c9925913fdc6..ffe51338662d22816bf03f18d541ed3ff0608b45 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -27,6 +27,8 @@ * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Владимир <id37736@yandex.ru> * @author Igor Degraf <igordegraf@gmail.com> + * @author Type-kun <workwork-1@yandex.ru> + * @author Vitaly Filatenko <kot@hacktest.net> */ $lang['encoding'] = ' utf-8'; $lang['direction'] = 'ltr'; @@ -73,7 +75,7 @@ $lang['btn_media'] = 'Управление медиафайлами' $lang['btn_deleteuser'] = 'Удалить мой аккаунт'; $lang['btn_img_backto'] = 'ВернутьÑÑ Ðº %s'; $lang['btn_mediaManager'] = 'ПроÑмотр в «управлении медиафайлами»'; -$lang['loggedinas'] = 'Зашли как:'; +$lang['loggedinas'] = 'Зашли как'; $lang['user'] = 'Логин'; $lang['pass'] = 'Пароль'; $lang['newpass'] = 'Ðовый пароль'; @@ -88,6 +90,7 @@ $lang['badpassconfirm'] = 'ПроÑтите, пароль неверны $lang['minoredit'] = 'Ðебольшие изменениÑ'; $lang['draftdate'] = 'Черновик Ñохранён'; $lang['nosecedit'] = 'За Ñто Ð²Ñ€ÐµÐ¼Ñ Ñтраница была изменена и Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ Ñекции уÑтарела. Загружена Ð¿Ð¾Ð»Ð½Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñтраницы.'; +$lang['searchcreatepage'] = 'ЕÑли вы не нашли то, что иÑкали, вы можете Ñоздать новую Ñтраницу Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼, Ñовпадающим Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñом. Чтобы Ñделать Ñто, проÑто нажмите на кнопку «Создать Ñтраницу».'; $lang['regmissing'] = 'Извините, вам Ñледует заполнить вÑе полÑ.'; $lang['reguexists'] = 'Извините, пользователь Ñ Ñ‚Ð°ÐºÐ¸Ð¼ логином уже ÑущеÑтвует.'; $lang['regsuccess'] = 'Пользователь Ñоздан; пароль выÑлан на Ð°Ð´Ñ€ÐµÑ Ñлектронной почты.'; @@ -187,7 +190,7 @@ $lang['mediausage'] = 'Ð”Ð»Ñ ÑÑылки на Ñтот файл и $lang['mediaview'] = 'ПоÑмотреть иÑходный файл'; $lang['mediaroot'] = 'корень'; $lang['mediaupload'] = 'ЗдеÑÑŒ можно загрузить файл в текущий каталог («проÑтранÑтво имён»). Чтобы Ñоздать подкаталоги, добавьте их к началу имени файла («Загрузить как»). Имена подкаталогов разделÑÑŽÑ‚ÑÑ Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ñми. '; -$lang['mediaextchange'] = 'РаÑширение изменилоÑÑŒ: Ñ .%s на .%s!'; +$lang['mediaextchange'] = 'РаÑширение изменилоÑÑŒ Ñ .%s на .%s!'; $lang['reference'] = 'СÑылки длÑ'; $lang['ref_inuse'] = 'Ðтот файл не может быть удалён, так как он иÑпользуетÑÑ Ð½Ð° Ñледующих Ñтраницах:'; $lang['ref_hidden'] = 'Ðекоторые ÑÑылки находÑÑ‚ÑÑ Ð½Ð° Ñтраницах, на чтение которых у Ð²Ð°Ñ Ð½ÐµÑ‚ прав доÑтупа'; @@ -196,15 +199,17 @@ $lang['quickhits'] = 'СоответÑÑ‚Ð²Ð¸Ñ Ð² названиÑÑ… $lang['toc'] = 'Содержание'; $lang['current'] = 'текущий'; $lang['yours'] = 'Ваша верÑиÑ'; -$lang['diff'] = 'показать Ð¾Ñ‚Ð»Ð¸Ñ‡Ð¸Ñ Ð¾Ñ‚ текущей верÑии'; +$lang['diff'] = 'Показать Ð¾Ñ‚Ð»Ð¸Ñ‡Ð¸Ñ Ð¾Ñ‚ текущей верÑии'; $lang['diff2'] = 'Показать Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñƒ ревизиÑми '; $lang['difflink'] = 'СÑылка на Ñто Ñравнение'; $lang['diff_type'] = 'ПоÑмотреть отличиÑ'; $lang['diff_inline'] = 'вÑтроенный'; $lang['diff_side'] = 'бок о бок'; $lang['diffprevrev'] = 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑиÑ'; -$lang['diffnextrev'] = 'Ð¡Ð»ÐµÐ´ÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑиÑ'; +$lang['diffnextrev'] = 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ð²ÐµÑ€ÑиÑ'; $lang['difflastrev'] = 'ПоÑледнÑÑ Ð²ÐµÑ€ÑиÑ'; +$lang['diffbothprevrev'] = 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñправа и Ñлева'; +$lang['diffbothnextrev'] = 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ñправа и Ñлева'; $lang['line'] = 'Строка'; $lang['breadcrumb'] = 'Ð’Ñ‹ поÑетили:'; $lang['youarehere'] = 'Ð’Ñ‹ находитеÑÑŒ здеÑÑŒ:'; @@ -212,7 +217,7 @@ $lang['lastmod'] = 'ПоÑледние изменениÑ:'; $lang['by'] = ' —'; $lang['deleted'] = 'удалено'; $lang['created'] = 'Ñоздано'; -$lang['restored'] = 'ÑÑ‚Ð°Ñ€Ð°Ñ Ñ€ÐµÐ²Ð¸Ð·Ð¸Ñ Ð²Ð¾ÑÑтановлена (%s)'; +$lang['restored'] = 'ÑÑ‚Ð°Ñ€Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð²Ð¾ÑÑтановлена (%s)'; $lang['external_edit'] = 'внешнее изменение'; $lang['summary'] = 'Сводка изменений'; $lang['noflash'] = 'Ð”Ð»Ñ Ð¿Ñ€Ð¾Ñмотра Ñтого Ñодержимого требуетÑÑ <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.'; @@ -287,8 +292,8 @@ $lang['subscr_m_unsubscribe'] = 'Отменить подпиÑку'; $lang['subscr_m_subscribe'] = 'ПодпиÑатьÑÑ'; $lang['subscr_m_receive'] = 'Получить'; $lang['subscr_style_every'] = 'уведомлÑÑ‚ÑŒ о каждом изменении'; -$lang['subscr_style_digest'] = 'информационное Ñлектронное пиÑьмо Ñо ÑпиÑком изменений Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ Ñтраницы (каждые %.2f дней)'; -$lang['subscr_style_list'] = 'ÑпиÑок изменённых Ñтраниц Ñо времени поÑледнего отправленного Ñлектронного пиÑьма (каждые %.2f дней)'; +$lang['subscr_style_digest'] = 'информационное Ñлектронное пиÑьмо Ñо ÑпиÑком изменений Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ Ñтраницы (каждые %.2f дн.)'; +$lang['subscr_style_list'] = 'ÑпиÑок изменённых Ñтраниц Ñо времени поÑледнего отправленного Ñлектронного пиÑьма (каждые %.2f дн.)'; $lang['authtempfail'] = 'ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ временно недоÑтупна. ЕÑли проблема продолжаетÑÑ ÐºÐ°ÐºÐ¾Ðµ-то времÑ, пожалуйÑта, Ñообщите об Ñтом Ñвоему админиÑтратору вики.'; $lang['authpwdexpire'] = 'ДейÑтвие вашего Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¸Ñтекает через %d дней. Ð’Ñ‹ должны изменить его как можно Ñкорее'; $lang['i_chooselang'] = 'Выберите Ñвой Ñзык/Choose your language'; @@ -302,6 +307,7 @@ $lang['i_modified'] = 'Из Ñоображений безопаÑно <a href="http://www.dokuwiki.org/install">инÑтрукции по уÑтановке «Докувики»</a>'; $lang['i_funcna'] = 'Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ PHP <code>%s</code> недоÑтупна. Может быть, она по какой-то причине заблокирована вашим хоÑтером?'; $lang['i_phpver'] = 'Ваша верÑÐ¸Ñ PHP (<code>%s</code>) ниже требуемой (<code>%s</code>). Вам необходимо обновить уÑтановленную верÑию PHP.'; +$lang['i_mbfuncoverload'] = 'Ð”Ð»Ñ Ð·Ð°Ð¿ÑƒÑка "Докувики" необходимо отключить параметр mbstring.func_overload в php.ini'; $lang['i_permfail'] = '<code>%s</code> недоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи «Докувики». Вам необходимо иÑправить ÑиÑтемные права доÑтупа Ð´Ð»Ñ Ñтой директории!'; $lang['i_confexists'] = '<code>%s</code> уже ÑущеÑтвует'; $lang['i_writeerr'] = 'Ðе удалоÑÑŒ Ñоздать <code>%s</code>. Вам необходимо проверить ÑиÑтемные права доÑтупа к файлу и директориÑм, и Ñоздать файл вручную. '; @@ -311,7 +317,7 @@ $lang['i_success'] = 'ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¾ÑˆÐ»Ð° уÑпе <a href="doku.php?id=wiki:welcome">Ñвоей новой «Докувики»</a>.'; $lang['i_failure'] = 'При запиÑи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётÑÑ Ð¸Ñправить их вручную, прежде чем вы Ñможете иÑпользовать <a href="doku.php?id=wiki:welcome">Ñвою новую «Докувики»</a>.'; $lang['i_policy'] = 'ИÑÑ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾Ð»Ð¸Ñ‚Ð¸ÐºÐ° прав доÑтупа'; -$lang['i_pol0'] = 'ÐžÑ‚ÐºÑ€Ñ‹Ñ‚Ð°Ñ Ð²Ð¸ÐºÐ¸ (чтение, запиÑÑŒ, закачка файлов Ð´Ð»Ñ Ð²Ñех)'; +$lang['i_pol0'] = 'ÐžÑ‚ÐºÑ€Ñ‹Ñ‚Ð°Ñ Ð²Ð¸ÐºÐ¸ (чтение, запиÑÑŒ, загрузка файлов Ð´Ð»Ñ Ð²Ñех)'; $lang['i_pol1'] = 'ОбщедоÑÑ‚ÑƒÐ¿Ð½Ð°Ñ Ð²Ð¸ÐºÐ¸ (чтение Ð´Ð»Ñ Ð²Ñех, запиÑÑŒ и загрузка файлов Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрированных пользователей)'; $lang['i_pol2'] = 'Ð—Ð°ÐºÑ€Ñ‹Ñ‚Ð°Ñ Ð²Ð¸ÐºÐ¸ (чтение, запиÑÑŒ и загрузка файлов только Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрированных пользователей)'; $lang['i_allowreg'] = 'Разрешить пользователÑм ÑамоÑтоÑтельно региÑтрироватьÑÑ'; @@ -322,10 +328,10 @@ $lang['i_pop_field'] = 'ПожалуйÑта, помогите нам $lang['i_pop_label'] = 'ОтправлÑÑ‚ÑŒ раз в меÑÑц анонимную пользовательÑкую информацию разработчикам «Докувики»'; $lang['recent_global'] = 'Ð’Ñ‹ проÑматриваете Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² проÑтранÑтве имён <b>%s</b>. Ð’Ñ‹ можете также <a href="%s">проÑмотреть недавние Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²Ð¾ вÑей вики</a>.'; $lang['years'] = '%d лет назад'; -$lang['months'] = '%d меÑÑц(ев) назад'; +$lang['months'] = '%d меÑÑц (-ев) назад'; $lang['weeks'] = '%d недель назад'; $lang['days'] = '%d дней назад'; -$lang['hours'] = '%d чаÑ(ов) назад'; +$lang['hours'] = '%d Ñ‡Ð°Ñ (-ов) назад'; $lang['minutes'] = '%d минут назад'; $lang['seconds'] = '%d Ñекунд назад'; $lang['wordblock'] = 'Ваши Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ðµ Ñохранены, поÑкольку они Ñодержат блокируемые Ñлова (Ñпам).'; @@ -341,8 +347,8 @@ $lang['media_sort_name'] = 'Сортировка по имени'; $lang['media_sort_date'] = 'Сортировка по дате'; $lang['media_namespaces'] = 'Выберите каталог'; $lang['media_files'] = 'Файлы в %s'; -$lang['media_upload'] = 'Загрузка в проÑтранÑтво имён <strong>%s</strong>.'; -$lang['media_search'] = 'ПоиÑк в проÑтранÑтве имён <strong>%s</strong>.'; +$lang['media_upload'] = 'Загрузка в проÑтранÑтво имён %s'; +$lang['media_search'] = 'ПоиÑк в проÑтранÑтве имён %s'; $lang['media_view'] = '%s'; $lang['media_viewold'] = '%s в %s '; @@ -357,3 +363,5 @@ $lang['currentns'] = 'Текущее проÑтранÑтво имё $lang['searchresult'] = 'Результаты поиÑка'; $lang['plainhtml'] = 'ПроÑтой HTML'; $lang['wikimarkup'] = 'вики-разметка'; +$lang['page_nonexist_rev'] = 'Ðта Ñтраница ещё не ÑущеÑтвовала %s. Она была Ñоздана <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Ðевозможно обработать параметр "%s".'; diff --git a/inc/lang/ru/mailtext.txt b/inc/lang/ru/mailtext.txt index 953daddf2cd93a934cefcfdff84289e34b9eee4c..929174910486f41431a742dbf533fcfb177f76a9 100644 --- a/inc/lang/ru/mailtext.txt +++ b/inc/lang/ru/mailtext.txt @@ -13,5 +13,5 @@ IP-адреÑ: @IPADDRESS@ -- -Ðто пиÑьмо было Ñгенерировано «Докувики» по адреÑу +Ðто пиÑьмо Ñоздано «Докувики» Ñ Ñайта @DOKUWIKIURL@ diff --git a/inc/lang/ru/password.txt b/inc/lang/ru/password.txt index fabdf2b68d2cfdd4c92a9dbc6d378b17d43fc767..360201bd900daf55868bace38f3bac29201c976c 100644 --- a/inc/lang/ru/password.txt +++ b/inc/lang/ru/password.txt @@ -6,5 +6,5 @@ Пароль: @PASSWORD@ -- -Ðто пиÑьмо было Ñгенерировано «Докувики» по адреÑу +Ðто пиÑьмо Ñоздано «Докувики» Ñ Ñайта @DOKUWIKIURL@ diff --git a/inc/lang/ru/pwconfirm.txt b/inc/lang/ru/pwconfirm.txt index 954c75dfe506a9af7ed83f00982786a8f21a8dcb..de31aa9a8797a1507aeebbe6e871082f2a5edcb9 100644 --- a/inc/lang/ru/pwconfirm.txt +++ b/inc/lang/ru/pwconfirm.txt @@ -9,5 +9,5 @@ @CONFIRM@ -- -Ðто Ñообщение было Ñгенерировано «Докувики» по адреÑу +Ðто пиÑьмо Ñоздано «Докувики» Ñ Ñайта @DOKUWIKIURL@ diff --git a/inc/lang/ru/registermail.txt b/inc/lang/ru/registermail.txt index 86ef11e8c41f92dff456fe36f7a4643b42bf68d6..d552965589f4843f0a4ce45380f4928e65366462 100644 --- a/inc/lang/ru/registermail.txt +++ b/inc/lang/ru/registermail.txt @@ -10,5 +10,5 @@ ХоÑÑ‚: @HOSTNAME@ -- -Ðто Ñообщение было Ñгенерировано «Докувики» по адреÑу +Ðто пиÑьмо Ñоздано «Докувики» Ñ Ñайта @DOKUWIKIURL@ diff --git a/inc/lang/ru/revisions.txt b/inc/lang/ru/revisions.txt index 55072cd8ac6bab1f41f198649cc15e2c405d826a..40fbedf0e0db6cbe837f514e40a88e3a58090695 100644 --- a/inc/lang/ru/revisions.txt +++ b/inc/lang/ru/revisions.txt @@ -1,3 +1,3 @@ ====== ИÑÑ‚Ð¾Ñ€Ð¸Ñ Ñтраницы ====== -Перед вами — иÑÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð°Ð²Ð¾Ðº текущего документа. Чтобы вернутьÑÑ Ðº одной из предыдущих верÑий, выберите нужную, нажмите «Править Ñтраницу» и Ñохраните. +Перед вами иÑÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð°Ð²Ð¾Ðº текущего документа. Чтобы вернутьÑÑ Ðº одной из предыдущих верÑий, выберите нужную, нажмите «Править Ñтраницу» и Ñохраните. diff --git a/inc/lang/ru/searchpage.txt b/inc/lang/ru/searchpage.txt index 04feb21cdb68ff281a4e47e93d39e0c5d1a4de7e..d12a848c65c07e261af220abfcd17abbbc78c52b 100644 --- a/inc/lang/ru/searchpage.txt +++ b/inc/lang/ru/searchpage.txt @@ -1,5 +1,5 @@ ====== ПоиÑк ====== -Перед вами результаты поиÑка. ЕÑли вы не нашли то, что иÑкали, вы можете Ñоздать новую Ñтраницу Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼, Ñовпадающим Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñом. Чтобы Ñделать Ñто, проÑто нажмите на кнопку «Создать Ñтраницу». +Перед вами результаты поиÑка. @CREATEPAGEINFO@ ===== Результаты ===== \ No newline at end of file diff --git a/inc/lang/ru/uploadmail.txt b/inc/lang/ru/uploadmail.txt index 84103b45a8df5ae2c81803f0dd798d96e19063dc..1cc5c6a5aa111770535fd34388d1c557b45b98e0 100644 --- a/inc/lang/ru/uploadmail.txt +++ b/inc/lang/ru/uploadmail.txt @@ -11,5 +11,5 @@ Пользователь: @USER@ -- -Ðто пиÑьмо было Ñгенерировано «Докувики» по адреÑу +Ðто пиÑьмо Ñоздано «Докувики» Ñ Ñайта @DOKUWIKIURL@ diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index e501cb7fcf02da685d02b6389ecef20e8d740501..afbf79503db3b40f06a284ccf121a848e8abf1b0 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -66,6 +66,7 @@ $lang['badpassconfirm'] = 'Ľutujem, heslo bolo nesprávne.'; $lang['minoredit'] = 'MenÅ¡ie zmeny'; $lang['draftdate'] = 'Koncept automaticky uložený'; $lang['nosecedit'] = 'Stránka bola medziÄasom zmenená, informácie o sekcii sú zastaralé a z tohto dôvodu bola nahraná celá stránka.'; +$lang['searchcreatepage'] = "Pokiaľ ste nenaÅ¡li, Äo hľadáte, skúste požadovanú stránku sami vytvoriÅ¥ stlaÄenÃm tlaÄidla ''VytvoriÅ¥ stránku''."; $lang['regmissing'] = 'MusÃte vyplniÅ¥ vÅ¡etky údaje.'; $lang['reguexists'] = 'UžÃvateľ s rovnakým menom je už zaregistrovaný.'; $lang['regsuccess'] = 'UžÃvateľský úÄet bol vytvorený a heslo zaslané emailom.'; diff --git a/inc/lang/sk/searchpage.txt b/inc/lang/sk/searchpage.txt index 3fdf074b7a27a273785257655c7cf674924de938..3684f1c6c38562f9dbae0910cd93e0b2596479a3 100644 --- a/inc/lang/sk/searchpage.txt +++ b/inc/lang/sk/searchpage.txt @@ -1,5 +1,5 @@ ====== Vyhľadávanie ====== -Výsledky hľadania môžete vidieÅ¥ nižšie. Pokiaľ ste nenaÅ¡li, Äo hľadáte, skúste požadovanú stránku sami vytvoriÅ¥ stlaÄenÃm tlaÄidla ''VytvoriÅ¥ stránku''. +Výsledky hľadania môžete vidieÅ¥ nižšie. @CREATEPAGEINFO@ ===== Výsledky ===== diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index f76dbb7d18c86d2912ba6fec69eec210fd2025f6..b649d08cb6f1b99de8ae464f17ce26926d2ff242 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -72,6 +72,7 @@ $lang['badpassconfirm'] = 'Napaka! Geslo ni pravo.'; $lang['minoredit'] = 'ManjÅ¡e spremembe'; $lang['draftdate'] = 'Samodejno shranjevanje osnutka je omogoÄeno'; $lang['nosecedit'] = 'Stran je bila v vmesnem Äasu spremenjena. Podatki strani so bili zastareli, zato se je celotna vsebina naložila znova.'; +$lang['searchcreatepage'] = "V kolikor rezultati niso skladni z zahtevami iskanja, je mogoÄe ustvariti novo stran z nazivom vaÅ¡e poizvedbe preko povezave ''Uredi stran''."; $lang['regmissing'] = 'Izpolniti je treba vsa polja.'; $lang['reguexists'] = 'Uporabnik s tem imenom že obstaja.'; $lang['regsuccess'] = 'UporabniÅ¡ki raÄun je uspeÅ¡no ustvarjen. Geslo je bilo poslano na naveden elektronski naslov.'; diff --git a/inc/lang/sl/searchpage.txt b/inc/lang/sl/searchpage.txt index 736a36182cd637df571b86c9da48b692b2e15d52..6ccfa96a4563666875b62d1f824901dada4b15b7 100644 --- a/inc/lang/sl/searchpage.txt +++ b/inc/lang/sl/searchpage.txt @@ -1,5 +1,5 @@ ====== Iskanje ====== -Spodaj so izpisani rezultati iskanja. V kolikor rezultati niso skladni z zahtevami iskanja, je mogoÄe ustvariti novo stran z nazivom vaÅ¡e poizvedbe preko povezave ''Uredi stran''. +Spodaj so izpisani rezultati iskanja. @CREATEPAGEINFO@ ===== Rezultati ===== \ No newline at end of file diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 49984097c613f467cc5a169752ac230623ecedd1..4c61b6a70fe07c6dd10e81c438764a8dc6b3b8de 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -63,6 +63,7 @@ $lang['badlogin'] = 'Na vjen keq, emri ose fjalëkalimi është gab $lang['minoredit'] = 'Ndryshime të Vogla'; $lang['draftdate'] = 'Skica u ruajt automatikisht në'; $lang['nosecedit'] = 'Faqja u ndryshua ndëwrkohë, informacioni i kwtij seksioni ishte i vjetër, u ngarkua faqja e tërë në vend të saj.'; +$lang['searchcreatepage'] = 'Nëse nuk e gjetët atë që po kërkonit, mund të krijoni ose redaktoni një faqe pas pyetjes suaj me butonin përkatës.'; $lang['regmissing'] = 'Na vjen keq, duhet të plotësoni të gjitha fushat.'; $lang['reguexists'] = 'Na vjen keq, ekziston një përdorues tjetër me të njëjtin emër.'; $lang['regsuccess'] = 'Përdoruesi u regjistrua dhe fjalëkalimi u dërgua me email.'; diff --git a/inc/lang/sq/searchpage.txt b/inc/lang/sq/searchpage.txt index 2f34cabb9aca8a6dd3c8eba4170b6594cc9c09d4..b0d6d1f31fb57826ca2048461dd55d5f1b430d3d 100644 --- a/inc/lang/sq/searchpage.txt +++ b/inc/lang/sq/searchpage.txt @@ -1,5 +1,5 @@ ====== Kërko ====== -Mund të gjeni rezultatet e kërkimit tuaj më poshtë. Nëse nuk e gjetët atë që po kërkonit, mund të krijoni ose redaktoni një faqe pas pyetjes suaj me butonin përkatës. +Mund të gjeni rezultatet e kërkimit tuaj më poshtë. @CREATEPAGEINFO@ ===== Rezultate ===== \ No newline at end of file diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 22a500e76db72fa00fc3dbb655e3e83c4af7480a..37a36c82b1343c859a4de4f653f201124ae40c80 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -60,6 +60,7 @@ $lang['badlogin'] = 'Извините, није добро кори $lang['minoredit'] = 'Мала измена'; $lang['draftdate'] = 'Ðацрт је аутоматÑки Ñачуван'; $lang['nosecedit'] = 'Страна је у међувремену промењена, поглавље је заÑтарело и поново Ñе учитава цела Ñтрана.'; +$lang['searchcreatepage'] = "Ðко ниÑте нашли то што Ñте тражили, можете да направите нову Ñтраницу названу по Вашем упиту кориÑтећи дугме ''Измени ову Ñтраницу''."; $lang['regmissing'] = 'Извините, морате да попуните Ñва поља.'; $lang['reguexists'] = 'Извините, кориÑник Ñа иÑтим именом већ поÑтоји.'; $lang['regsuccess'] = 'КориÑник је направљен и лозинка је поÑлата путем е-поште.'; diff --git a/inc/lang/sr/searchpage.txt b/inc/lang/sr/searchpage.txt index 010966a7c42499b2ecea77a59c6902dd53df93bd..458c5b1fc9e9e9e358922b3383b5d8393ca18a8c 100644 --- a/inc/lang/sr/searchpage.txt +++ b/inc/lang/sr/searchpage.txt @@ -1,5 +1,5 @@ ====== Претрага ====== -ИÑпод можете да нађете резултате Ваше претраге. Ðко ниÑте нашли то што Ñте тражили, можете да направите нову Ñтраницу названу по Вашем упиту кориÑтећи дугме ''Измени ову Ñтраницу''. +ИÑпод можете да нађете резултате Ваше претраге. @CREATEPAGEINFO@ ===== Резултати ===== diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 1f129c62130be96a61a8d5acc374bd2e04de6dc2..f22491db10e5b055ce75ce3b235b13222fdd26b7 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -82,6 +82,7 @@ $lang['badpassconfirm'] = 'Ledsen, lösenordet var felaktigt'; $lang['minoredit'] = 'SmÃ¥ ändringar'; $lang['draftdate'] = 'Utkast automatiskt sparat'; $lang['nosecedit'] = 'Sidan ändrades medan du skrev, sektionsinformationen var inte uppdaterad. Laddar hela sidan istället.'; +$lang['searchcreatepage'] = 'Om du inte hittar det du letar efter, sÃ¥ kan du skapa eller redigera sidan med nÃ¥gon av knapparna.'; $lang['regmissing'] = 'Du mÃ¥ste fylla i alla fälten.'; $lang['reguexists'] = 'Det finns redan en användare med det användarnamnet.'; $lang['regsuccess'] = 'Användarkontot skapat, lösenordet har skickats via e-post.'; diff --git a/inc/lang/sv/searchpage.txt b/inc/lang/sv/searchpage.txt index bcc88cd95987df90c6b29f224ed852e61d75f2ef..7b2d3bca36155f1a9014088901a22b4b0e12f2ab 100644 --- a/inc/lang/sv/searchpage.txt +++ b/inc/lang/sv/searchpage.txt @@ -1,5 +1,5 @@ ====== Sök ====== -Nedan ser du resultatet av sökningen. Om du inte hittar det du letar efter, sÃ¥ kan du skapa eller redigera sidan med nÃ¥gon av knapparna. +Nedan ser du resultatet av sökningen. @CREATEPAGEINFO@ ===== Resultat ===== diff --git a/inc/lang/ta/lang.php b/inc/lang/ta/lang.php index 4a1da35317f06297293bb44783da2cff0cffee67..a5b89527a05c468130d5b084934d99fef1743caf 100644 --- a/inc/lang/ta/lang.php +++ b/inc/lang/ta/lang.php @@ -10,7 +10,7 @@ $lang['btn_show'] = 'பகà¯à®•à®¤à¯à®¤à¯ˆ காணà¯à®ªà®¿ '; $lang['btn_create'] = 'இநà¯à®¤ பகà¯à®•à®¤à¯à®¤à¯ˆ உரà¯à®µà®¾à®•à¯à®•à¯ '; $lang['btn_search'] = 'தேடà¯'; $lang['btn_save'] = 'சேமி '; -$lang['btn_revs'] = 'old திரà¯à®¤à¯à®¤à®™à¯à®•à®³à¯'; +$lang['btn_revs'] = 'பழைய திரà¯à®¤à¯à®¤à®™à¯à®•à®³à¯'; $lang['btn_recent'] = 'சமீபதà¯à®¤à®¿à®¯ மாறà¯à®±à®™à¯à®•à®³à¯'; $lang['btn_upload'] = 'பதிவேறà¯à®±à¯'; $lang['btn_cancel'] = 'ரதà¯à®¤à¯'; @@ -30,3 +30,8 @@ $lang['fullname'] = 'உணà¯à®®à¯ˆà®¯à®¾à®© பெயரà¯'; $lang['email'] = 'மினà¯à®©à®žà¯à®šà®²à¯'; $lang['profile'] = 'பயனà¯à®ªà®Ÿà¯à®¤à¯à®¤à¯à®ªà®µà®°à¯ விவரமà¯'; $lang['minoredit'] = 'சிறிய மாறà¯à®±à®™à¯à®•à®³à¯'; +$lang['media_historytab'] = 'வரலாறà¯'; +$lang['media_list_rows'] = 'வரிசைகள௠'; +$lang['media_sort_name'] = 'பெயர௠'; +$lang['media_sort_date'] = 'தேதி '; +$lang['media_namespaces'] = 'பெயரà¯à®µà¯†à®³à®¿à®¯à¯ˆ தேரà¯à®µà¯à®šà¯†à®¯à¯ '; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index 0e9f1d3bb5c45eacb9861fb3106d379e835d33a0..113431276783fb21fb2ab401cde15139e98df4c9 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -68,6 +68,7 @@ $lang['badpassconfirm'] = 'พาสเวิร์ดไม่ถูภ$lang['minoredit'] = 'เป็นà¸à¸²à¸£à¹à¸à¹‰à¹„ขเล็à¸à¸™à¹‰à¸à¸¢'; $lang['draftdate'] = 'บันทึà¸à¸‰à¸šà¸±à¸šà¸£à¹ˆà¸²à¸‡à¹€à¸¡à¸·à¹ˆà¸'; $lang['nosecedit'] = 'ในช่วงเวลาที่ผ่านมานี้เพจถูà¸à¹à¸à¹‰à¹„ขไปà¹à¸¥à¹‰à¸§, เนื้à¸à¸«à¸²à¹ƒà¸™à¹€à¸‹à¸„ชั่นนี้ไม่ทันสมัย à¸à¸£à¸¸à¸“าโหลดเพจใหม่ทั้งหน้าà¹à¸—น'; +$lang['searchcreatepage'] = 'ถ้าคุณไม่พบสิ่งที่คนมà¸à¸‡à¸«à¸² คุณสามารถเลืà¸à¸à¸—ี่จะสร้าง หรืà¸à¹à¸à¹‰à¹„ขชื่à¸à¹€à¸žà¸ˆà¸«à¸¥à¸±à¸‡à¸ˆà¸²à¸à¸”ูผลสืบค้นà¹à¸¥à¹‰à¸§à¸”้วยปุ่มที่เหมาะสม'; $lang['regmissing'] = 'ขà¸à¸à¸ ัย คุณต้à¸à¸‡à¸à¸£à¸à¸à¹ƒà¸«à¹‰à¸„รบทุà¸à¸Šà¹ˆà¸à¸‡'; $lang['reguexists'] = 'ชื่à¸à¸šà¸±à¸à¸Šà¸µà¸—ี่ใส่นั้นมีผู้à¸à¸·à¹ˆà¸™à¹„ด้ใช้à¹à¸¥à¹‰à¸§ à¸à¸£à¸¸à¸“าเลืà¸à¸à¸Šà¸·à¹ˆà¸à¸œà¸¹à¹‰à¹ƒà¸Šà¹‰à¸à¸·à¹ˆà¸™'; $lang['regsuccess'] = 'ผู้ใช้ถูà¸à¸ªà¸£à¹‰à¸²à¸‡à¹à¸¥à¹‰à¸§ à¹à¸¥à¸°à¸£à¸«à¸±à¸ªà¸œà¹ˆà¸²à¸™à¹„ด้ถูà¸à¸ªà¹ˆà¸‡à¹„ปทางà¸à¸µà¹€à¸¡à¸¥à¹à¸¥à¹‰à¸§'; diff --git a/inc/lang/th/searchpage.txt b/inc/lang/th/searchpage.txt index d6399a9e9b42524b98e48576e9d203e17167bd66..263c656abf91c7081b1b0c5594c4c57b319dc126 100644 --- a/inc/lang/th/searchpage.txt +++ b/inc/lang/th/searchpage.txt @@ -1,4 +1,5 @@ ====== สืบค้น ====== -คุณสามารถพบผลลัพธ์à¸à¸²à¸£à¸ªà¸·à¸šà¸„้นขà¸à¸‡à¸„ุณด้านล่าง ถ้าคุณไม่พบสิ่งที่คนมà¸à¸‡à¸«à¸² คุณสามารถเลืà¸à¸à¸—ี่จะสร้าง หรืà¸à¹à¸à¹‰à¹„ขชื่à¸à¹€à¸žà¸ˆà¸«à¸¥à¸±à¸‡à¸ˆà¸²à¸à¸”ูผลสืบค้นà¹à¸¥à¹‰à¸§à¸”้วยปุ่มที่เหมาะสม + +คุณสามารถพบผลลัพธ์à¸à¸²à¸£à¸ªà¸·à¸šà¸„้นขà¸à¸‡à¸„ุณด้านล่าง @CREATEPAGEINFO@ ====== ผลลัพธ์ ====== \ No newline at end of file diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 90a7ea7ba383993f51a1fe58464162fb74802295..1676256a58bc7763de9195aec3b18ba612d7b8f7 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -74,6 +74,7 @@ $lang['badpassconfirm'] = 'Ãœzgünüz, parolanız yanlış'; $lang['minoredit'] = 'Küçük DeÄŸiÅŸiklikler'; $lang['draftdate'] = 'Taslak ÅŸu saatte otomatik kaydedildi:'; $lang['nosecedit'] = 'Sayfa yakın zamanda deÄŸiÅŸtirilmiÅŸtir, bölüm bilgisi eski kalmıştır. Bunun için bölüm yerine tüm sayfa yüklenmiÅŸtir.'; +$lang['searchcreatepage'] = "Aradığınız ÅŸeyi bulamadıysanız, ''Sayfayı deÄŸiÅŸtir'' tuÅŸuna tıklayarak girdiÄŸiniz sorgu adıyla yeni bir sayfa oluÅŸturabilirsiniz ."; $lang['regmissing'] = 'Ãœzgünüz, tüm alanları doldurmalısınız.'; $lang['reguexists'] = 'Ãœzgünüz, bu isime sahip bir kullanıcı zaten mevcut.'; $lang['regsuccess'] = 'Kullanıcı oluÅŸturuldu ve ÅŸifre e-posta adresine gönderildi.'; diff --git a/inc/lang/tr/searchpage.txt b/inc/lang/tr/searchpage.txt index ae6d50c771c00acc66e4f7ddc770e3465705e0f9..bdb3ddf17494ee7044f84ff082d9c692b5cad428 100644 --- a/inc/lang/tr/searchpage.txt +++ b/inc/lang/tr/searchpage.txt @@ -1,5 +1,5 @@ ====== Arama ====== -AÅŸağıda aramanın sonuçları listelenmiÅŸtir. Aradığınız ÅŸeyi bulamadıysanız, ''Sayfayı deÄŸiÅŸtir'' tuÅŸuna tıklayarak girdiÄŸiniz sorgu adıyla yeni bir sayfa oluÅŸturabilirsiniz . +AÅŸağıda aramanın sonuçları listelenmiÅŸtir. @CREATEPAGEINFO@ ===== Sonuçlar ===== diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 56f064c9fddf0ef9b1c0f75ebfb650fdbe0ec925..a6b08c905ecf31bfc2a7897cd7b6aaaf584ad18a 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -68,6 +68,7 @@ $lang['badpassconfirm'] = 'Вибачте, але пароль невір $lang['minoredit'] = 'Ðезначні зміни'; $lang['draftdate'] = 'Чернетка збережена'; $lang['nosecedit'] = 'Сторінку змінено, дані розділу заÑтарілі. Завантажено Ñторінку повніÑÑ‚ÑŽ.'; +$lang['searchcreatepage'] = 'Якщо ви не знайшли те, що ви шукали, ви можете Ñтворити або редагувати Ñторінку, що має таке ж ім’Ñ, що Ñ– пошуковий запит за допомогою відповідної кнопки.'; $lang['regmissing'] = 'Ðеобхідно заповнити вÑÑ– полÑ.'; $lang['reguexists'] = 'КориÑтувач з таким іменем вже Ñ–Ñнує.'; $lang['regsuccess'] = 'КориÑтувача Ñтворено. Пароль відправлено на e-mail.'; diff --git a/inc/lang/uk/searchpage.txt b/inc/lang/uk/searchpage.txt index 971c24814ad43f5a0245207190a594f6630f4503..3889a7618c3814595700af0087875b3e461129f5 100644 --- a/inc/lang/uk/searchpage.txt +++ b/inc/lang/uk/searchpage.txt @@ -1,5 +1,5 @@ ====== Пошук ====== -ДивітьÑÑ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¸ пошуку нижче. Якщо ви не знайшли те, що ви шукали, ви можете Ñтворити або редагувати Ñторінку, що має таке ж ім’Ñ, що Ñ– пошуковий запит за допомогою відповідної кнопки. +ДивітьÑÑ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚Ð°Ñ‚Ð¸ пошуку нижче. @CREATEPAGEINFO@ ===== Результати ===== diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index b2349d0b0bd82b8c7bb2e6819ce35b41cfb29bfa..41a7d590ff6443b94d0b70d0f060384a9e1c90f3 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -59,6 +59,7 @@ $lang['badlogin'] = 'Username hoặc password không đúng.'; $lang['minoredit'] = 'Minor Changes'; $lang['draftdate'] = 'Bản nháp được tá»± Ä‘á»™ng lÆ°u lúc'; $lang['nosecedit'] = 'Các trang web đã được thay đổi trong khi chỠđợi, phần thông tin quá hạn đã được thay thế bằng trang đầy đủ.'; +$lang['searchcreatepage'] = "Nếu bạn không thấy được những gì bạn Ä‘ang tìm, bạn có thể tạo má»™t trang má»›i bằng cách bấm và o nút ''Biên soạn trang nà y'', khi đó bạn sẽ có 1 trang má»›i vá»›i tên trang chÃnh là tuwfw khóa bạn đã tìm kiếm."; $lang['regmissing'] = 'Bạn cần Ä‘iá»n và o tất cả các trÆ°á»ng'; $lang['reguexists'] = 'Bạn khác đã dùng username nà y rồi.'; $lang['regsuccess'] = 'Äã tạo username, và đã gởi password.'; diff --git a/inc/lang/vi/searchpage.txt b/inc/lang/vi/searchpage.txt index 7ded7a808c430a9937ccee76c11075b38defd47f..c0c748545f08eebe6379742fd4c0eefa4da8be10 100644 --- a/inc/lang/vi/searchpage.txt +++ b/inc/lang/vi/searchpage.txt @@ -1,5 +1,5 @@ ====== Tìm ====== -Sau đây là kết quả mà bạn đã tìm. Nếu bạn không thấy được những gì bạn Ä‘ang tìm, bạn có thể tạo má»™t trang má»›i bằng cách bấm và o nút ''Biên soạn trang nà y'', khi đó bạn sẽ có 1 trang má»›i vá»›i tên trang chÃnh là tuwfw khóa bạn đã tìm kiếm. +Sau đây là kết quả mà bạn đã tìm. @CREATEPAGEINFO@ ===== Kết quả ===== diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 953d866f877c2d6e8ba771c04da2af9cd845dabd..c5e7da000ba68e06912cd260e3f186de59a8a5f8 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -14,6 +14,8 @@ * @author tsangho <ou4222@gmail.com> * @author Danny Lin <danny0838@gmail.com> * @author Stan <talktostan@gmail.com> + * @author June-Hao Hou <junehao@gmail.com> + * @author lioujheyu <lioujheyu@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -75,6 +77,7 @@ $lang['badpassconfirm'] = '抱æ‰ï¼Œé€™å¯†ç¢¼æ˜¯éŒ¯çš„'; $lang['minoredit'] = 'å°ä¿®æ”¹'; $lang['draftdate'] = 'è‰ç¨¿å·²è‡ªå‹•å˜æª”æ–¼'; $lang['nosecedit'] = '在您編輯期間,其他使用者修改éŽæœ¬é é¢ã€‚å€æ®µè³‡æ–™å·²é€¾æ™‚ï¼Œå› æ¤ç³»çµ±è¼‰å…¥äº†å…¨é ,以å–代之。'; +$lang['searchcreatepage'] = '若沒找到您想è¦çš„,å¯æŒ‰ä¸‹æŒ‰éˆ•å»ºç«‹æˆ–編輯和查詢關éµå—åŒåçš„é é¢ã€‚'; $lang['regmissing'] = '很抱æ‰ï¼Œæ‰€æœ‰æ¬„ä½éƒ½è¦å¡«å¯«ã€‚'; $lang['reguexists'] = '很抱æ‰ï¼Œæœ‰äººå·²ä½¿ç”¨äº†é€™å€‹å¸³è™Ÿã€‚'; $lang['regsuccess'] = '使用者帳號已建立,密碼已寄發至該電郵。'; @@ -303,6 +306,7 @@ $lang['i_policy'] = 'åˆæ¥çš„ ACL 政ç–'; $lang['i_pol0'] = '開放的 wiki (任何人å¯è®€å–ã€å¯«å…¥ã€ä¸Šå‚³)'; $lang['i_pol1'] = '公開的 wiki (任何人å¯è®€å–,註冊使用者å¯å¯«å…¥èˆ‡ä¸Šå‚³)'; $lang['i_pol2'] = 'å°é–‰çš„ wiki (åªæœ‰è¨»å†Šä½¿ç”¨è€…å¯è®€å–ã€å¯«å…¥ã€ä¸Šå‚³)'; +$lang['i_allowreg'] = 'å…許使用者自行註冊'; $lang['i_retry'] = 'é‡è©¦'; $lang['i_license'] = 'è«‹é¸æ“‡æ‚¨æƒ³è¦çš„內容發佈授權方å¼ï¼š'; $lang['i_license_none'] = 'ä¸è¦é¡¯ç¤ºä»»ä½•é—œæ–¼æŽˆæ¬Šæ–¹å¼çš„訊æ¯'; diff --git a/inc/lang/zh-tw/searchpage.txt b/inc/lang/zh-tw/searchpage.txt index e0f04c433ecfb9236b2f904d8d06b91ad2076f75..96680019d5c878401fe212bb77e117a19b49248a 100644 --- a/inc/lang/zh-tw/searchpage.txt +++ b/inc/lang/zh-tw/searchpage.txt @@ -1,5 +1,5 @@ ====== æœå°‹ç²¾éˆ ====== -æ示:您å¯ä»¥åœ¨ä¸‹é¢æ‰¾åˆ°æ‚¨çš„æœå°‹çµæžœã€‚若沒找到您想è¦çš„,å¯æŒ‰ä¸‹æŒ‰éˆ•å»ºç«‹æˆ–編輯和查詢關éµå—åŒåçš„é é¢ã€‚ +æ示:您å¯ä»¥åœ¨ä¸‹é¢æ‰¾åˆ°æ‚¨çš„æœå°‹çµæžœã€‚@CREATEPAGEINFO@ ===== æœå°‹çµæžœ ===== diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index c8a76b66b627679c65350a9916ea50a9d6f8eda4..d960eb799992373c48b7df481f92754ccebe6c5c 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -23,6 +23,7 @@ * @author Cupen <Cupenoruler@foxmail.com> * @author xiqingongzi <Xiqingongzi@Gmail.com> * @author qinghao <qingxianhao@gmail.com> + * @author Yuwei Sun <yuwei@hrz.tu-chemnitz.de> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -84,6 +85,7 @@ $lang['badpassconfirm'] = '对ä¸èµ·ï¼Œå¯†ç 错误'; $lang['minoredit'] = '细微修改'; $lang['draftdate'] = 'è‰ç¨¿è‡ªåŠ¨ä¿å˜äºŽ'; $lang['nosecedit'] = '在您编辑期间本页刚被他人修改过,局部信æ¯å·²è¿‡æœŸï¼Œæ•…载入全页。'; +$lang['searchcreatepage'] = '如果没有找到您想è¦çš„东西,您å¯ä»¥ä½¿ç”¨ç›¸åº”的按钮æ¥åˆ›å»ºæˆ–编辑该页é¢ã€‚'; $lang['regmissing'] = '对ä¸èµ·ï¼Œæ‚¨å¿…须填写所有的å—段。'; $lang['reguexists'] = '对ä¸èµ·ï¼Œè¯¥ç”¨æˆ·åå·²ç»å˜åœ¨ã€‚'; $lang['regsuccess'] = '新用户已建立,密ç 将通过电å邮件å‘é€ç»™æ‚¨ã€‚'; @@ -302,6 +304,7 @@ $lang['i_modified'] = '由于安全上的考虑,该脚本åªèƒ½ç”¨ <a href="http://dokuwiki.org/install">Dokuwiki 安装指å—</a>'; $lang['i_funcna'] = 'PHP 功能 <code>%s</code> æ— æ³•ä½¿ç”¨ã€‚ä¹Ÿè®¸æ‚¨çš„æœåŠ¡å™¨æä¾›å•†å› ä¸ºæŸäº›åŽŸå› ç¦ç”¨äº†å®ƒã€‚'; $lang['i_phpver'] = '您的 PHP 版本 <code>%s</code> 低于最低è¦æ±‚çš„ <code>%s</code>。您需è¦å‡çº§æ‚¨çš„ PHP 版本。'; +$lang['i_mbfuncoverload'] = '为了è¿è¡ŒDocuWiki,您必须在php.iniä¸ç¦ç”¨mbstring.func_overload。'; $lang['i_permfail'] = 'DokuWiki æ— æ³•å†™å…¥ <code>%s</code>。您需è¦ä¿®æ”¹è¯¥è·¯å¾„çš„æƒé™è®¾å®šï¼'; $lang['i_confexists'] = '<code>%s</code> å·²ç»å˜åœ¨'; $lang['i_writeerr'] = 'æ— æ³•åˆ›å»º <code>%s</code>。您需è¦æ£€æŸ¥è¯¥è·¯å¾„/文件的æƒé™è®¾å®šå¹¶æ‰‹åŠ¨åˆ›å»ºè¯¥æ–‡ä»¶ã€‚'; diff --git a/inc/lang/zh/searchpage.txt b/inc/lang/zh/searchpage.txt index 8222e242c183b0634f7d79248d12c74e67ce544c..be7ae7909262120e1e3c25a514f0e6c25297f2c5 100644 --- a/inc/lang/zh/searchpage.txt +++ b/inc/lang/zh/searchpage.txt @@ -1,5 +1,5 @@ ====== æœç´¢ ====== -下é¢å°†æ˜¾ç¤ºæ‚¨çš„æœç´¢ç»“果。如果没有找到您想è¦çš„东西,您å¯ä»¥ä½¿ç”¨ç›¸åº”的按钮æ¥åˆ›å»ºæˆ–编辑该页é¢ã€‚ +下é¢å°†æ˜¾ç¤ºæ‚¨çš„æœç´¢ç»“果。@CREATEPAGEINFO@ ===== æœç´¢ç»“æžœ ===== \ No newline at end of file diff --git a/inc/mail.php b/inc/mail.php index 9994ac63e3abd0ff3d66c7cd8feb80e6a54bf307..9f1b1f3d633d5047acbfb0f98310127422b346e7 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -27,7 +27,7 @@ if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); * Check if a given mail address is valid */ if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-"); -if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)'); +if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,63})'); /** * Prepare mailfrom replacement patterns diff --git a/inc/media.php b/inc/media.php index 9022858e1599095d49f17c4f35b9a2b0eafae3fc..09bfc99ac3da9b67dad3b78cf6a6e783fd59dffc 100644 --- a/inc/media.php +++ b/inc/media.php @@ -16,6 +16,9 @@ if(!defined('NL')) define('NL',"\n"); * their CSS tags except pagenames won't be links. * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> + * + * @param array $data + * @param string $id */ function media_filesinuse($data,$id){ global $lang; @@ -41,6 +44,11 @@ function media_filesinuse($data,$id){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $id media id + * @param int $auth permission level + * @param array $data + * @return false|string */ function media_metasave($id,$auth,$data){ if($auth < AUTH_UPLOAD) return false; @@ -86,6 +94,7 @@ function media_metasave($id,$auth,$data){ * check if a media is external source * * @author Gerrit Uitslag <klapinklapin@gmail.com> + * * @param string $id the media ID or URL * @return bool */ @@ -98,6 +107,7 @@ function media_isexternal($id){ * Check if a media item is public (eg, external URL or readable by @ALL) * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $id the media ID or URL * @return bool */ @@ -113,6 +123,10 @@ function media_ispublic($id){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $id media id + * @param int $auth permission level + * @return bool */ function media_metaform($id,$auth){ global $lang; @@ -175,6 +189,9 @@ function media_metaform($id,$auth){ * Convenience function to check if a media file is still in use * * @author Michael Klier <chi@chimeric.de> + * + * @param string $id media id + * @return array|bool */ function media_inuse($id) { global $conf; @@ -202,6 +219,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8); * If configured, checks for media references before deletion * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $id media id * @param int $auth no longer used * @return int One of: 0, @@ -219,6 +237,7 @@ function media_delete($id,$auth){ $file = mediaFN($id); // trigger an event - MEDIA_DELETE_FILE + $data = array(); $data['id'] = $id; $data['name'] = utf8_basename($file); $data['path'] = $file; @@ -253,9 +272,9 @@ function media_delete($id,$auth){ /** * Handle file uploads via XMLHttpRequest * - * @param string $ns target namespace - * @param int $auth current auth check result - * @return mixed false on error, id of the new file on success + * @param string $ns target namespace + * @param int $auth current auth check result + * @return false|string false on error, id of the new file on success */ function media_upload_xhr($ns,$auth){ if(!checkSecurityToken()) return false; @@ -298,10 +317,11 @@ function media_upload_xhr($ns,$auth){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Klier <chi@chimeric.de> - * @param string $ns target namespace - * @param int $auth current auth check result - * @param bool|array $file $_FILES member, $_FILES['upload'] if false - * @return mixed false on error, id of the new file on success + * + * @param string $ns target namespace + * @param int $auth current auth check result + * @param bool|array $file $_FILES member, $_FILES['upload'] if false + * @return false|string false on error, id of the new file on success */ function media_upload($ns,$auth,$file=false){ if(!checkSecurityToken()) return false; @@ -345,6 +365,7 @@ function media_upload($ns,$auth,$file=false){ * Using copy, makes sure any setgid bits on the media directory are honored * * @see move_uploaded_file() + * * @param string $from * @param string $to * @return bool @@ -362,13 +383,21 @@ function copy_uploaded_file($from, $to){ * (The triggered event is preventable.) * * Event data: - * $data[0] fn_tmp: the temporary file name (read from $_FILES) - * $data[1] fn: the file name of the uploaded file - * $data[2] id: the future directory id of the uploaded file - * $data[3] imime: the mimetype of the uploaded file + * $data[0] fn_tmp: the temporary file name (read from $_FILES) + * $data[1] fn: the file name of the uploaded file + * $data[2] id: the future directory id of the uploaded file + * $data[3] imime: the mimetype of the uploaded file * $data[4] overwrite: if an existing file is going to be overwritten + * $data[5] move: name of function that performs move/copy/.. * * @triggers MEDIA_UPLOAD_FINISH + * + * @param array $file + * @param string $id media id + * @param bool $ow overwrite? + * @param int $auth permission level + * @param string $move name of functions that performs move/copy/.. + * @return false|array|string */ function media_save($file, $id, $ow, $auth, $move) { if($auth < AUTH_UPLOAD) { @@ -418,6 +447,7 @@ function media_save($file, $id, $ow, $auth, $move) { } // prepare event data + $data = array(); $data[0] = $file['name']; $data[1] = $fn; $data[2] = $id; @@ -430,8 +460,12 @@ function media_save($file, $id, $ow, $auth, $move) { } /** - * Callback adapter for media_upload_finish() + * Callback adapter for media_upload_finish() triggered by MEDIA_UPLOAD_FINISH + * * @author Michael Klier <chi@chimeric.de> + * + * @param array $data event data + * @return false|array|string */ function _media_upload_action($data) { // fixme do further sanity tests of given data? @@ -448,6 +482,14 @@ function _media_upload_action($data) { * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Klier <chi@chimeric.de> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $fn_tmp + * @param string $fn + * @param string $id media id + * @param string $imime mime type + * @param bool $overwrite overwrite existing? + * @param string $move function name + * @return array|string */ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'move_uploaded_file') { global $conf; @@ -491,6 +533,7 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov * directory * * @author Kate Arzamastseva <pshns@ukr.net> + * * @param string $id * @return int - revision date */ @@ -534,6 +577,10 @@ function media_saveOldRevision($id){ * @author Andreas Gohr <andi@splitbrain.org> * @link http://www.splitbrain.org/blog/2007-02/12-internet_explorer_facilitates_cross_site_scripting * @fixme check all 26 magic IE filetypes here? + * + * @param string $file path to file + * @param string $mime mimetype + * @return int */ function media_contentcheck($file,$mime){ global $conf; @@ -543,14 +590,14 @@ function media_contentcheck($file,$mime){ $bytes = fread($fh, 256); fclose($fh); if(preg_match('/<(script|a|img|html|body|iframe)[\s>]/i',$bytes)){ - return -3; + return -3; //XSS: possibly malicious content } } } if(substr($mime,0,6) == 'image/'){ $info = @getimagesize($file); if($mime == 'image/gif' && $info[2] != 1){ - return -1; + return -1; // uploaded content did not match the file extension }elseif($mime == 'image/jpeg' && $info[2] != 2){ return -1; }elseif($mime == 'image/png' && $info[2] != 3){ @@ -561,7 +608,7 @@ function media_contentcheck($file,$mime){ global $TEXT; $TEXT = io_readFile($file); if(checkwordblock()){ - return -2; + return -2; //blocked by the spam blacklist } } return 0; @@ -571,6 +618,12 @@ function media_contentcheck($file,$mime){ * Send a notify mail on uploads * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id media id + * @param string $file path to file + * @param string $mime mime type + * @param bool|int $old_rev revision timestamp or false + * @return bool */ function media_notify($id,$file,$mime,$old_rev=false){ global $conf; @@ -582,6 +635,12 @@ function media_notify($id,$file,$mime,$old_rev=false){ /** * List all files in a given Media namespace + * + * @param string $ns namespace + * @param null|int $auth permission level + * @param string $jump id + * @param bool $fullscreenview + * @param bool|string $sort sorting order, false skips sorting */ function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=false){ global $conf; @@ -724,6 +783,7 @@ function media_tab_files_options(){ * Returns type of sorting for the list of files in media manager * * @author Kate Arzamastseva <pshns@ukr.net> + * * @return string - sort type */ function _media_get_sort_type() { @@ -734,6 +794,7 @@ function _media_get_sort_type() { * Returns type of listing for the list of files in media manager * * @author Kate Arzamastseva <pshns@ukr.net> + * * @return string - list type */ function _media_get_list_type() { @@ -765,6 +826,10 @@ function _media_get_display_param($param, $values) { * Prints tab that displays a list of all files * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $ns + * @param null|int $auth permission level + * @param string $jump item id */ function media_tab_files($ns,$auth=null,$jump='') { global $lang; @@ -781,6 +846,10 @@ function media_tab_files($ns,$auth=null,$jump='') { * Prints tab that displays uploading form * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $ns + * @param null|int $auth permission level + * @param string $jump item id */ function media_tab_upload($ns,$auth=null,$jump='') { global $lang; @@ -798,6 +867,9 @@ function media_tab_upload($ns,$auth=null,$jump='') { * Prints tab that displays search form * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $ns + * @param null|int $auth permission level */ function media_tab_search($ns,$auth=null) { global $INPUT; @@ -817,8 +889,13 @@ function media_tab_search($ns,$auth=null) { * Prints tab that displays mediafile details * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image media id + * @param string $ns + * @param null|int $auth permission level + * @param string|int $rev revision timestamp or empty string */ -function media_tab_view($image, $ns, $auth=null, $rev=false) { +function media_tab_view($image, $ns, $auth=null, $rev='') { global $lang; if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*"); @@ -837,6 +914,10 @@ function media_tab_view($image, $ns, $auth=null, $rev=false) { * Prints tab that displays form for editing mediafile metadata * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image media id + * @param string $ns + * @param null|int $auth permission level */ function media_tab_edit($image, $ns, $auth=null) { if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*"); @@ -851,6 +932,10 @@ function media_tab_edit($image, $ns, $auth=null) { * Prints tab that displays mediafile revisions * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image media id + * @param string $ns + * @param null|int $auth permission level */ function media_tab_history($image, $ns, $auth=null) { global $lang; @@ -874,13 +959,14 @@ function media_tab_history($image, $ns, $auth=null) { /** * Prints mediafile details * - * @param string $image media id - * @param $auth - * @param int|bool $rev - * @param JpegMeta|bool $meta + * @param string $image media id + * @param int $auth permission level + * @param int|string $rev revision timestamp or empty string + * @param JpegMeta|bool $meta + * * @author Kate Arzamastseva <pshns@ukr.net> */ -function media_preview($image, $auth, $rev=false, $meta=false) { +function media_preview($image, $auth, $rev='', $meta=false) { $size = media_image_preview_size($image, $rev, $meta); @@ -912,8 +998,12 @@ function media_preview($image, $auth, $rev=false, $meta=false) { * Prints mediafile action buttons * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image media id + * @param int $auth permission level + * @param string|int $rev revision timestamp, or empty string */ -function media_preview_buttons($image, $auth, $rev=false) { +function media_preview_buttons($image, $auth, $rev='') { global $lang, $conf; echo '<ul class="actions">'.NL; @@ -961,11 +1051,11 @@ function media_preview_buttons($image, $auth, $rev=false) { * Returns image width and height for mediamanager preview panel * * @author Kate Arzamastseva <pshns@ukr.net> - * @param string $image - * @param int $rev - * @param JpegMeta $meta - * @param int $size - * @return array + * @param string $image + * @param int|string $rev + * @param JpegMeta|bool $meta + * @param int $size + * @return array|false */ function media_image_preview_size($image, $rev, $meta, $size = 500) { if (!preg_match("/\.(jpe?g|gif|png)$/", $image) || !file_exists(mediaFN($image, $rev))) return false; @@ -986,9 +1076,10 @@ function media_image_preview_size($image, $rev, $meta, $size = 500) { * Returns the requested EXIF/IPTC tag from the image meta * * @author Kate Arzamastseva <pshns@ukr.net> - * @param array $tags + * + * @param array $tags array with tags, first existing is returned * @param JpegMeta $meta - * @param string $alt + * @param string $alt alternative value * @return string */ function media_getTag($tags,$meta,$alt=''){ @@ -1002,8 +1093,9 @@ function media_getTag($tags,$meta,$alt=''){ * Returns mediafile tags * * @author Kate Arzamastseva <pshns@ukr.net> + * * @param JpegMeta $meta - * @return array + * @return array list of tags of the mediafile */ function media_file_tags($meta) { // load the field descriptions @@ -1032,8 +1124,13 @@ function media_file_tags($meta) { * Prints mediafile tags * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image image id + * @param int $auth permission level + * @param string|int $rev revision timestamp, or empty string + * @param bool|JpegMeta $meta image object, or create one if false */ -function media_details($image, $auth, $rev=false, $meta=false) { +function media_details($image, $auth, $rev='', $meta=false) { global $lang; if (!$meta) $meta = new JpegMeta(mediaFN($image, $rev)); @@ -1056,6 +1153,12 @@ function media_details($image, $auth, $rev=false, $meta=false) { * Shows difference between two revisions of file * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image image id + * @param string $ns + * @param int $auth permission level + * @param bool $fromajax + * @return false|null|string */ function media_diff($image, $ns, $auth, $fromajax = false) { global $conf; @@ -1105,6 +1208,7 @@ function media_diff($image, $ns, $auth, $fromajax = false) { } // prepare event data + $data = array(); $data[0] = $image; $data[1] = $l_rev; $data[2] = $r_rev; @@ -1114,14 +1218,13 @@ function media_diff($image, $ns, $auth, $fromajax = false) { // trigger event return trigger_event('MEDIA_DIFF', $data, '_media_file_diff', true); - } /** * Callback for media file diff * - * @param $data - * @return bool|void + * @param array $data event data + * @return false|null */ function _media_file_diff($data) { if(is_array($data) && count($data)===6) { @@ -1135,6 +1238,13 @@ function _media_file_diff($data) { * Shows difference between two revisions of image * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $image + * @param string|int $l_rev revision timestamp, or empty string + * @param string|int $r_rev revision timestamp, or empty string + * @param string $ns + * @param int $auth permission level + * @param bool $fromajax */ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){ global $lang; @@ -1255,11 +1365,12 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){ * and slider * * @author Kate Arzamastseva <pshns@ukr.net> - * @param string $image - * @param int $l_rev - * @param int $r_rev - * @param array $l_size - * @param array $r_size + * + * @param string $image image id + * @param int $l_rev revision timestamp, or empty string + * @param int $r_rev revision timestamp, or empty string + * @param array $l_size array with width and height + * @param array $r_size array with width and height * @param string $type */ function media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $type) { @@ -1292,10 +1403,11 @@ function media_image_diff($image, $l_rev, $r_rev, $l_size, $r_size, $type) { /** * Restores an old revision of a media file * - * @param string $image - * @param int $rev - * @param int $auth + * @param string $image media id + * @param int $rev revision timestamp or empty string + * @param int $auth * @return string - file's id + * * @author Kate Arzamastseva <pshns@ukr.net> */ function media_restore($image, $rev, $auth){ @@ -1325,19 +1437,24 @@ function media_restore($image, $rev, $auth){ * @author Andreas Gohr <gohr@cosmocode.de> * @author Kate Arzamastseva <pshns@ukr.net> * @triggers MEDIA_SEARCH + * + * @param string $query + * @param string $ns + * @param null|int $auth + * @param bool $fullscreen + * @param string $sort */ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural'){ global $conf; global $lang; $ns = cleanID($ns); - + $evdata = array( + 'ns' => $ns, + 'data' => array(), + 'query' => $query + ); if ($query) { - $evdata = array( - 'ns' => $ns, - 'data' => array(), - 'query' => $query - ); $evt = new Doku_Event('MEDIA_SEARCH', $evdata); if ($evt->advise_before()) { $dir = utf8_encodeFN(str_replace(':','/',$evdata['ns'])); @@ -1375,10 +1492,14 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural /** * Formats and prints one file in the list + * + * @param array $item + * @param int $auth permission level + * @param string $jump item id + * @param bool $display_namespace */ function media_printfile($item,$auth,$jump,$display_namespace=false){ global $lang; - global $conf; // Prepare zebra coloring // I always wanted to use this variable name :-D @@ -1452,9 +1573,9 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){ /** * Display a media icon * - * @param $filename - * @param string $size the size subfolder, if not specified 16x16 is used - * @return string + * @param string $filename media id + * @param string $size the size subfolder, if not specified 16x16 is used + * @return string html */ function media_printicon($filename, $size=''){ list($ext) = mimetype(mediaFN($filename),false); @@ -1472,6 +1593,11 @@ function media_printicon($filename, $size=''){ * Formats and prints one file in the list in the thumbnails view * * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param array $item + * @param int $auth permission level + * @param bool|string $jump item id + * @param bool $display_namespace */ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false){ @@ -1519,6 +1645,9 @@ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false /** * Prints a thumbnail and metainfo + * + * @param array $item + * @param bool $fullscreen */ function media_printimgdetail($item, $fullscreen=false){ // prepare thumbnail @@ -1582,15 +1711,15 @@ function media_printimgdetail($item, $fullscreen=false){ } /** - * Build link based on the current, adding/rewriting - * parameters + * Build link based on the current, adding/rewriting parameters * * @author Kate Arzamastseva <pshns@ukr.net> + * * @param array|bool $params - * @param string $amp - separator - * @param bool $abs - * @param bool $params_array - * @return string|array - link + * @param string $amp separator + * @param bool $abs absolute url? + * @param bool $params_array return the parmeters array? + * @return string|array - link or link parameters */ function media_managerURL($params=false, $amp='&', $abs=false, $params_array=false) { global $ID; @@ -1621,6 +1750,10 @@ function media_managerURL($params=false, $amp='&', $abs=false, $params_array * * @author Andreas Gohr <andi@splitbrain.org> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $ns + * @param int $auth permission level + * @param bool $fullscreen */ function media_uploadform($ns, $auth, $fullscreen = false){ global $lang; @@ -1708,6 +1841,10 @@ function media_getuploadsize(){ * * @author Tobias Sarnowski <sarnowski@cosmocode.de> * @author Kate Arzamastseva <pshns@ukr.net> + * + * @param string $ns + * @param string $query + * @param bool $fullscreen */ function media_searchform($ns,$query='',$fullscreen=false){ global $lang; @@ -1735,6 +1872,8 @@ function media_searchform($ns,$query='',$fullscreen=false){ * Build a tree outline of available media namespaces * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $ns */ function media_nstree($ns){ global $conf; @@ -1783,6 +1922,9 @@ function media_nstree($ns){ * Prints a media namespace tree item * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $item + * @return string html */ function media_nstree_item($item){ global $INPUT; @@ -1806,6 +1948,9 @@ function media_nstree_item($item){ * Prints a media namespace tree item opener * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $item + * @return string html */ function media_nstree_li($item){ $class='media level'.$item['level']; @@ -1827,6 +1972,12 @@ function media_nstree_li($item){ * Resizes the given image to the given size * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename, path to file + * @param string $ext extension + * @param int $w desired width + * @param int $h desired height + * @return string path to resized or original size if failed */ function media_resize_image($file, $ext, $w, $h=0){ global $conf; @@ -1847,9 +1998,10 @@ function media_resize_image($file, $ext, $w, $h=0){ $local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext); $mtime = @filemtime($local); // 0 if not exists - if( $mtime > filemtime($file) || - media_resize_imageIM($ext,$file,$info[0],$info[1],$local,$w,$h) || - media_resize_imageGD($ext,$file,$info[0],$info[1],$local,$w,$h) ){ + if($mtime > filemtime($file) || + media_resize_imageIM($ext, $file, $info[0], $info[1], $local, $w, $h) || + media_resize_imageGD($ext, $file, $info[0], $info[1], $local, $w, $h) + ) { if(!empty($conf['fperm'])) @chmod($local, $conf['fperm']); return $local; } @@ -1865,6 +2017,12 @@ function media_resize_image($file, $ext, $w, $h=0){ * image because most pics are more interesting in that area (rule of thirds) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename, path to file + * @param string $ext extension + * @param int $w desired width + * @param int $h desired height + * @return string path to resized or original size if failed */ function media_crop_image($file, $ext, $w, $h=0){ global $conf; @@ -1929,7 +2087,7 @@ function media_crop_image($file, $ext, $w, $h=0){ * @param string $id id of the image * @param int $w resize/crop width * @param int $h resize/crop height - * @return string + * @return string token or empty string if no token required */ function media_get_token($id,$w,$h){ // token is only required for modified images @@ -1952,6 +2110,11 @@ function media_get_token($id,$w,$h){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Pavel Vitis <Pavel.Vitis@seznam.cz> + * + * @param string $url + * @param string $ext extension + * @param int $cache cachetime in seconds + * @return false|string path to cached file */ function media_get_from_URL($url,$ext,$cache){ global $conf; @@ -1964,12 +2127,12 @@ function media_get_from_URL($url,$ext,$cache){ $mtime = @filemtime($local); // 0 if not exists //decide if download needed: - if( ($mtime == 0) || // cache does not exist - ($cache != -1 && $mtime < time()-$cache) // 'recache' and cache has expired - ){ - if(media_image_download($url,$local)){ + if(($mtime == 0) || // cache does not exist + ($cache != -1 && $mtime < time() - $cache) // 'recache' and cache has expired + ) { + if(media_image_download($url, $local)) { return $local; - }else{ + } else { return false; } } @@ -1985,6 +2148,10 @@ function media_get_from_URL($url,$ext,$cache){ * Download image files * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $url + * @param string $file path to file in which to put the downloaded content + * @return bool */ function media_image_download($url,$file){ global $conf; @@ -2020,6 +2187,15 @@ function media_image_download($url,$file){ * * @author Pavel Vitis <Pavel.Vitis@seznam.cz> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $ext extension + * @param string $from filename path to file + * @param int $from_w original width + * @param int $from_h original height + * @param string $to path to resized file + * @param int $to_w desired width + * @param int $to_h desired height + * @return bool */ function media_resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){ global $conf; @@ -2044,6 +2220,17 @@ function media_resize_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){ * crop images using external ImageMagick convert program * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $ext extension + * @param string $from filename path to file + * @param int $from_w original width + * @param int $from_h original height + * @param string $to path to resized file + * @param int $to_w desired width + * @param int $to_h desired height + * @param int $ofs_x offset of crop centre + * @param int $ofs_y offset of crop centre + * @return bool */ function media_crop_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x,$ofs_y){ global $conf; @@ -2069,6 +2256,17 @@ function media_crop_imageIM($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x,$o * * @author Andreas Gohr <andi@splitbrain.org> * @author Sebastian Wienecke <s_wienecke@web.de> + * + * @param string $ext extension + * @param string $from filename path to file + * @param int $from_w original width + * @param int $from_h original height + * @param string $to path to resized file + * @param int $to_w desired width + * @param int $to_h desired height + * @param int $ofs_x offset of crop centre + * @param int $ofs_y offset of crop centre + * @return bool */ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x=0,$ofs_y=0){ global $conf; @@ -2081,6 +2279,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x= } // create an image of the given filetype + $image = false; if ($ext == 'jpg' || $ext == 'jpeg'){ if(!function_exists("imagecreatefromjpeg")) return false; $image = @imagecreatefromjpeg($from); @@ -2094,6 +2293,7 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x= } if(!$image) return false; + $newimg = false; if(($conf['gdlib']>1) && function_exists("imagecreatetruecolor") && $ext != 'gif'){ $newimg = @imagecreatetruecolor ($to_w, $to_h); } @@ -2169,23 +2369,23 @@ function media_resize_imageGD($ext,$from,$from_w,$from_h,$to,$to_w,$to_h,$ofs_x= * Return other media files with the same base name * but different extensions. * - * @param string $src - ID of media file - * @param array $exts - alternative extensions to find other files for - * @return array - mime type => file ID + * @param string $src - ID of media file + * @param string[] $exts - alternative extensions to find other files for + * @return array - array(mime type => file ID) * * @author Anika Henke <anika@selfthinker.org> */ function media_alternativefiles($src, $exts){ $files = array(); - list($srcExt, $srcMime) = mimetype($src); + list($srcExt, /* $srcMime */) = mimetype($src); $filebase = substr($src, 0, -1 * (strlen($srcExt)+1)); foreach($exts as $ext) { $fileid = $filebase.'.'.$ext; $file = mediaFN($fileid); if(file_exists($file)) { - list($fileExt, $fileMime) = mimetype($file); + list(/* $fileExt */, $fileMime) = mimetype($file); $files[$fileMime] = $fileid; } } @@ -2196,7 +2396,7 @@ function media_alternativefiles($src, $exts){ * Check if video/audio is supported to be embedded. * * @param string $mime - mimetype of media file - * @param string $type - type of media files to check ('video', 'audio', or none) + * @param string $type - type of media files to check ('video', 'audio', or null for all) * @return boolean * * @author Anika Henke <anika@selfthinker.org> diff --git a/inc/pageutils.php b/inc/pageutils.php index 5f62926e42778307e095d1a1aa91923f166ce858..2fbcbfd1fc82f98fc4aeaa1a82306c752a07bf0c 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -20,7 +20,7 @@ * * @param string $param the $_REQUEST variable name, default 'id' * @param bool $clean if true, ID is cleaned - * @return mixed|string + * @return string */ function getID($param='id',$clean=true){ /** @var Input $INPUT */ @@ -97,6 +97,7 @@ function getID($param='id',$clean=true){ * converted to unaccented ones * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $raw_id The pageid to clean * @param boolean $ascii Force ASCII * @return string cleaned id @@ -152,7 +153,7 @@ function cleanID($raw_id,$ascii=false){ * @author Andreas Gohr <andi@splitbrain.org> * * @param string $id - * @return string|bool the namespace part or false if the given ID has no namespace (root) + * @return string|false the namespace part or false if the given ID has no namespace (root) */ function getNS($id){ $pos = strrpos((string)$id,':'); @@ -255,7 +256,13 @@ function sectionID($title,&$check) { * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well) * @return bool exists? */ -function page_exists($id,$rev='',$clean=true) { +function page_exists($id,$rev='',$clean=true, $date_at=false) { + if($rev !== '' && $date_at) { + $pagelog = new PageChangeLog($id); + $pagelog_rev = $pagelog->getLastRevisionAt($rev); + if($pagelog_rev !== false) + $rev = $pagelog_rev; + } return @file_exists(wikiFN($id,$rev,$clean)); } @@ -265,7 +272,7 @@ function page_exists($id,$rev='',$clean=true) { * The filename is URL encoded to protect Unicode chars * * @param $raw_id string id of wikipage - * @param $rev string page revision, empty string for current + * @param $rev int|string page revision, empty string for current * @param $clean bool flag indicating that $raw_id should be cleaned. Only set to false * when $id is guaranteed to have been cleaned already. * @return string full path @@ -435,7 +442,7 @@ function localeFN($id,$ext='txt'){ * @param string $ns namespace which is context of id * @param string $id relative id * @param bool $clean flag indicating that id should be cleaned - * @return mixed|string + * @return string */ function resolve_id($ns,$id,$clean=true){ global $conf; @@ -486,9 +493,17 @@ function resolve_id($ns,$id,$clean=true){ * @param string &$page (reference) relative media id, updated to resolved id * @param bool &$exists (reference) updated with existance of media */ -function resolve_mediaid($ns,&$page,&$exists){ +function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ $page = resolve_id($ns,$page); - $file = mediaFN($page); + if($rev !== '' && $date_at){ + $medialog = new MediaChangeLog($page); + $medialog_rev = $medialog->getLastRevisionAt($rev); + if($medialog_rev !== false) { + $rev = $medialog_rev; + } + } + + $file = mediaFN($page,$rev); $exists = @file_exists($file); } @@ -501,7 +516,7 @@ function resolve_mediaid($ns,&$page,&$exists){ * @param string &$page (reference) relative page id, updated to resolved id * @param bool &$exists (reference) updated with existance of media */ -function resolve_pageid($ns,&$page,&$exists){ +function resolve_pageid($ns,&$page,&$exists,$rev='',$date_at=false ){ global $conf; global $ID; $exists = false; @@ -521,20 +536,26 @@ function resolve_pageid($ns,&$page,&$exists){ $page = resolve_id($ns,$page,false); // resolve but don't clean, yet // get filename (calls clean itself) - $file = wikiFN($page); + if($rev !== '' && $date_at) { + $pagelog = new PageChangeLog($page); + $pagelog_rev = $pagelog->getLastRevisionAt($rev); + if($pagelog_rev !== false)//something found + $rev = $pagelog_rev; + } + $file = wikiFN($page,$rev); // if ends with colon or slash we have a namespace link if(in_array(substr($page,-1), array(':', ';')) || ($conf['useslash'] && substr($page,-1) == '/')){ - if(page_exists($page.$conf['start'])){ + if(page_exists($page.$conf['start'],$rev,true,$date_at)){ // start page inside namespace $page = $page.$conf['start']; $exists = true; - }elseif(page_exists($page.noNS(cleanID($page)))){ + }elseif(page_exists($page.noNS(cleanID($page)),$rev,true,$date_at)){ // page named like the NS inside the NS $page = $page.noNS(cleanID($page)); $exists = true; - }elseif(page_exists($page)){ + }elseif(page_exists($page,$rev,true,$date_at)){ // page like namespace exists $page = $page; $exists = true; @@ -551,7 +572,7 @@ function resolve_pageid($ns,&$page,&$exists){ }else{ $try = $page.'s'; } - if(page_exists($try)){ + if(page_exists($try,$rev,true,$date_at)){ $page = $try; $exists = true; } @@ -718,6 +739,7 @@ function utf8_decodeFN($file){ * Used for sidebars, but can be used other stuff as well * * @todo add event hook + * * @param string $page the pagename you're looking for * @return string|false the full page id of the found page, false if any */ diff --git a/inc/parser/handler.php b/inc/parser/handler.php index a1040d12e78e21bb77c6c9af3faae21f84d5333e..d96a01a60aa47982a26b0f65c602393485e1fa75 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -71,6 +71,7 @@ class Doku_Handler { */ function plugin($match, $state, $pos, $pluginname){ $data = array($match); + /** @var DokuWiki_Syntax_Plugin $plugin */ $plugin = plugin_load('syntax',$pluginname); if($plugin != null){ $data = $plugin->handle($match, $state, $pos, $this); @@ -711,6 +712,9 @@ class Doku_Handler_CallWriter { var $Handler; + /** + * @param Doku_Handler $Handler + */ function Doku_Handler_CallWriter(& $Handler) { $this->Handler = & $Handler; } @@ -747,7 +751,7 @@ class Doku_Handler_Nest { /** * constructor * - * @param object $CallWriter the renderers current call writer + * @param Doku_Handler_CallWriter $CallWriter the renderers current call writer * @param string $close closing instruction name, this is required to properly terminate the * syntax mode if the document ends without a closing pattern */ @@ -805,6 +809,8 @@ class Doku_Handler_List { var $listCalls = array(); var $listStack = array(); + const NODE = 1; + function Doku_Handler_List(& $CallWriter) { $this->CallWriter = & $CallWriter; } @@ -856,7 +862,8 @@ class Doku_Handler_List { $depth = $this->interpretSyntax($call[1][0], $listType); $this->initialDepth = $depth; - $this->listStack[] = array($listType, $depth); + // array(list type, current depth, index of current listitem_open) + $this->listStack[] = array($listType, $depth, 1); $this->listCalls[] = array('list'.$listType.'_open',array(),$call[2]); $this->listCalls[] = array('listitem_open',array(1),$call[2]); @@ -881,6 +888,7 @@ class Doku_Handler_List { function listOpen($call) { $depth = $this->interpretSyntax($call[1][0], $listType); $end = end($this->listStack); + $key = key($this->listStack); // Not allowed to be shallower than initialDepth if ( $depth < $this->initialDepth ) { @@ -897,6 +905,9 @@ class Doku_Handler_List { $this->listCalls[] = array('listitem_open',array($depth-1),$call[2]); $this->listCalls[] = array('listcontent_open',array(),$call[2]); + // new list item, update list stack's index into current listitem_open + $this->listStack[$key][2] = count($this->listCalls) - 2; + // Switched list type... } else { @@ -908,7 +919,7 @@ class Doku_Handler_List { $this->listCalls[] = array('listcontent_open',array(),$call[2]); array_pop($this->listStack); - $this->listStack[] = array($listType, $depth); + $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2); } //------------------------------------------------------------------------ @@ -920,7 +931,10 @@ class Doku_Handler_List { $this->listCalls[] = array('listitem_open', array($depth-1), $call[2]); $this->listCalls[] = array('listcontent_open',array(),$call[2]); - $this->listStack[] = array($listType, $depth); + // set the node/leaf state of this item's parent listitem_open to NODE + $this->listCalls[$this->listStack[$key][2]][1][1] = self::NODE; + + $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2); //------------------------------------------------------------------------ // Getting shallower ( $depth < $end[1] ) @@ -934,6 +948,7 @@ class Doku_Handler_List { while (1) { $end = end($this->listStack); + $key = key($this->listStack); if ( $end[1] <= $depth ) { @@ -946,6 +961,9 @@ class Doku_Handler_List { $this->listCalls[] = array('listitem_open',array($depth-1),$call[2]); $this->listCalls[] = array('listcontent_open',array(),$call[2]); + // new list item, update list stack's index into current listitem_open + $this->listStack[$key][2] = count($this->listCalls) - 2; + } else { // Switching list type... $this->listCalls[] = array('list'.$end[0].'_close', array(), $call[2]); @@ -954,7 +972,7 @@ class Doku_Handler_List { $this->listCalls[] = array('listcontent_open',array(),$call[2]); array_pop($this->listStack); - $this->listStack[] = array($listType, $depth); + $this->listStack[] = array($listType, $depth, count($this->listCalls) - 2); } break; diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php index 2e84eca7cccf75a5d22acc2321e945e45abe0c0a..b46a5f505c38207dfefd6c2295482cba64773d49 100644 --- a/inc/parser/lexer.php +++ b/inc/parser/lexer.php @@ -56,12 +56,12 @@ class Doku_LexerParallelRegex { /** * Adds a pattern with an optional label. * - * @param mixed $pattern Perl style regex. Must be UTF-8 + * @param mixed $pattern Perl style regex. Must be UTF-8 * encoded. If its a string, the (, ) * lose their meaning unless they * form part of a lookahead or * lookbehind assertation. - * @param string $label Label of regex to be returned + * @param bool|string $label Label of regex to be returned * on a match. Label must be ASCII * @access public */ @@ -151,7 +151,8 @@ class Doku_LexerParallelRegex { * "or" operator. Caches the regex. * Will automatically escape (, ) and / tokens. * - * @param array $patterns List of patterns in order. + * @internal array $_patterns List of patterns in order. + * @return null|string * @access private */ function _getCompoundedRegex() { @@ -297,6 +298,7 @@ class Doku_Lexer { */ function Doku_Lexer(&$parser, $start = "accept", $case = false) { $this->_case = $case; + /** @var Doku_LexerParallelRegex[] _regexes */ $this->_regexes = array(); $this->_parser = &$parser; $this->_mode = new Doku_LexerStateStack($start); @@ -425,11 +427,13 @@ class Doku_Lexer { * Sends the matched token and any leading unmatched * text to the parser changing the lexer to a new * mode if one is listed. - * @param string $unmatched Unmatched leading portion. - * @param string $matched Actual token match. - * @param string $mode Mode after match. A boolean + * @param string $unmatched Unmatched leading portion. + * @param string $matched Actual token match. + * @param bool|string $mode Mode after match. A boolean * false mode causes no change. - * @param int $pos Current byte index location in raw doc + * @param int $initialPos + * @param int $matchPos + * Current byte index location in raw doc * thats being parsed * @return boolean False if there was any error * from the parser. @@ -498,11 +502,12 @@ class Doku_Lexer { * Calls the parser method named after the current * mode. Empty content will be ignored. The lexer * has a parser handler for each mode in the lexer. - * @param string $content Text parsed. - * @param boolean $is_match Token is recognised rather + * @param string $content Text parsed. + * @param boolean $is_match Token is recognised rather * than unparsed data. - * @param int $pos Current byte index location in raw doc + * @param int $pos Current byte index location in raw doc * thats being parsed + * @return bool * @access private */ function _invokeParser($content, $is_match, $pos) { diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 25bf3fe3df1a5f4efbaf2135a68e7935bae643c6..ac8fd21304303bc5b9841bf25cc944eb71cc0ccd 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -165,7 +165,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { if(!isset($this->meta['title'])) $this->meta['title'] = $text; // add the header to the TOC - $hid = $this->_headerToLink($text, 'true'); + $hid = $this->_headerToLink($text, true); $this->toc_additem($hid, $text, $level); // add to summary @@ -251,8 +251,9 @@ class Doku_Renderer_metadata extends Doku_Renderer { * Open a list item * * @param int $level the nesting level + * @param bool $node true when a node; false when a leaf */ - function listitem_open($level) { + function listitem_open($level,$node=false) { $this->cdata(str_repeat(DOKU_TAB, $level).'* '); } @@ -421,8 +422,8 @@ class Doku_Renderer_metadata extends Doku_Renderer { /** * keep track of internal links in $this->meta['relation']['references'] * - * @param string $id page ID to link to. eg. 'wiki:syntax' - * @param string|array $name name for the link, array for media file + * @param string $id page ID to link to. eg. 'wiki:syntax' + * @param string|array|null $name name for the link, array for media file */ function internallink($id, $name = null) { global $ID; @@ -458,8 +459,8 @@ class Doku_Renderer_metadata extends Doku_Renderer { /** * Render an external link * - * @param string $url full URL with scheme - * @param string|array $name name for the link, array for media file + * @param string $url full URL with scheme + * @param string|array|null $name name for the link, array for media file */ function externallink($url, $name = null) { if(is_array($name)) { @@ -628,9 +629,9 @@ class Doku_Renderer_metadata extends Doku_Renderer { * Construct a title and handle images in titles * * @author Harry Fuecks <hfuecks@gmail.com> - * @param string|array $title either string title or media array - * @param string $default default title if nothing else is found - * @param null|string $id linked page id (used to extract title from first heading) + * @param string|array|null $title either string title or media array + * @param string $default default title if nothing else is found + * @param null|string $id linked page id (used to extract title from first heading) * @return string title text */ function _getLinkTitle($title, $default, $id = null) { diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 09294539e4538d5c06fbef02cb5cca0a604e33ae..e1d28267a1fab6c5c052bece3f3e312316686e6d 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -190,7 +190,7 @@ class Doku_Renderer extends DokuWiki_Plugin { /** * Render plain text data * - * @param $text + * @param string $text */ function cdata($text) { } @@ -343,8 +343,9 @@ class Doku_Renderer extends DokuWiki_Plugin { * Open a list item * * @param int $level the nesting level + * @param bool $node true when a node; false when a leaf */ - function listitem_open($level) { + function listitem_open($level,$node=false) { } /** @@ -759,6 +760,9 @@ class Doku_Renderer extends DokuWiki_Plugin { * casing and special chars * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $name + * @return string */ function _simpleTitle($name) { global $conf; @@ -778,6 +782,11 @@ class Doku_Renderer extends DokuWiki_Plugin { /** * Resolve an interwikilink + * + * @param string $shortcut identifier for the interwiki link + * @param string $reference fragment that refers the content + * @param null|bool $exists reference which returns if an internal page exists + * @return string interwikilink */ function _resolveInterWiki(&$shortcut, $reference, &$exists = null) { //get interwiki URL diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 5c0353688c1a7de3971bcab586093cda8b4f165b..f1703111e67b9f5eba849e87dcfca9a7deaadfbb 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -28,6 +28,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** @var array A stack of section edit data */ protected $sectionedits = array(); + var $date_at = ''; // link pages and media against this revision /** @var int last section edit id, used by startSectionEdit */ protected $lastsecid = 0; @@ -58,10 +59,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** * Register a new edit section range * - * @param $type string The section type identifier - * @param $title string The section title - * @param $start int The byte position for the edit start - * @return string A marker class for the starting HTML element + * @param string $type The section type identifier + * @param string $title The section title + * @param int $start The byte position for the edit start + * @return string A marker class for the starting HTML element + * * @author Adrian Lang <lang@cosmocode.de> */ public function startSectionEdit($start, $type, $title = null) { @@ -72,8 +74,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** * Finish an edit section range * - * @param $end int The byte position for the edit end; null for the rest of - * the page + * @param int $end The byte position for the edit end; null for the rest of the page + * * @author Adrian Lang <lang@cosmocode.de> */ public function finishSectionEdit($end = null) { @@ -455,9 +457,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * Open a list item * * @param int $level the nesting level + * @param bool $node true when a node; false when a leaf */ - function listitem_open($level) { - $this->doc .= '<li class="level'.$level.'">'; + function listitem_open($level, $node=false) { + $branching = $node ? ' node' : ''; + $this->doc .= '<li class="level'.$level.$branching.'">'; } /** @@ -818,8 +822,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $default = $this->_simpleTitle($id); // now first resolve and clean up the $id - resolve_pageid(getNS($ID), $id, $exists); + resolve_pageid(getNS($ID), $id, $exists, $this->date_at, true); + $link = array(); $name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype); if(!$isImage) { if($exists) { @@ -846,11 +851,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['pre'] = '<span class="curid">'; $link['suf'] = '</span>'; } - $link['more'] = ''; - $link['class'] = $class; - $link['url'] = wl($id, $params); - $link['name'] = $name; - $link['title'] = $id; + $link['more'] = ''; + $link['class'] = $class; + if($this->date_at) { + $params['at'] = $this->date_at; + } + $link['url'] = wl($id, $params); + $link['name'] = $name; + $link['title'] = $id; //add search string if($search) { ($conf['userewrite']) ? $link['url'] .= '?' : $link['url'] .= '&'; @@ -904,6 +912,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } //prepare for formating + $link = array(); $link['target'] = $conf['target']['extern']; $link['style'] = ''; $link['pre'] = ''; @@ -981,6 +990,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $conf; //simple setup + $link = array(); $link['target'] = $conf['target']['windows']; $link['pre'] = ''; $link['suf'] = ''; @@ -995,6 +1005,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['title'] = $this->_xmlEntities($url); $url = str_replace('\\', '/', $url); + $url = ltrim($url,'/'); $url = 'file:///'.$url; $link['url'] = $url; @@ -1062,7 +1073,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $height = null, $cache = null, $linking = null, $return = false) { global $ID; list($src, $hash) = explode('#', $src, 2); - resolve_mediaid(getNS($ID), $src, $exists); + resolve_mediaid(getNS($ID), $src, $exists, $this->date_at, true); $noLink = false; $render = ($linking == 'linkonly') ? false : true; @@ -1070,7 +1081,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { list($ext, $mime) = mimetype($src, false); if(substr($mime, 0, 5) == 'image' && $render) { - $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), ($linking == 'direct')); + $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache, 'rev'=>$this->_getLastMediaRevisionAt($src)), ($linking == 'direct')); } elseif(($mime == 'application/x-shockwave-flash' || media_supportedav($mime)) && $render) { // don't link movies $noLink = true; @@ -1078,7 +1089,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // add file icons $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext); $link['class'] .= ' mediafile mf_'.$class; - $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache), true); + $link['url'] = ml($src, array('id' => $ID, 'cache' => $cache , 'rev'=>$this->_getLastMediaRevisionAt($src)), true); if($exists) $link['title'] .= ' ('.filesize_h(filesize(mediaFN($src))).')'; } @@ -1109,9 +1120,10 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @param int $height height of media in pixel * @param string $cache cache|recache|nocache * @param string $linking linkonly|detail|nolink + * @param bool $return return HTML instead of adding to $doc */ function externalmedia($src, $title = null, $align = null, $width = null, - $height = null, $cache = null, $linking = null) { + $height = null, $cache = null, $linking = null, $return = false) { list($src, $hash) = explode('#', $src, 2); $noLink = false; $render = ($linking == 'linkonly') ? false : true; @@ -1135,8 +1147,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if($hash) $link['url'] .= '#'.$hash; //output formatted - if($linking == 'nolink' || $noLink) $this->doc .= $link['name']; - else $this->doc .= $this->_formatLink($link); + if($return) { + if($linking == 'nolink' || $noLink) return $link['name']; + else return $this->_formatLink($link); + } else { + if($linking == 'nolink' || $noLink) $this->doc .= $link['name']; + else $this->doc .= $this->_formatLink($link); + } } /** @@ -1430,7 +1447,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { return $title; } //add image tag - $ret .= '<img src="'.ml($src, array('w' => $width, 'h' => $height, 'cache' => $cache)).'"'; + $ret .= '<img src="'.ml($src, array('w' => $width, 'h' => $height, 'cache' => $cache, 'rev'=>$this->_getLastMediaRevisionAt($src))).'"'; $ret .= ' class="media'.$align.'"'; if($title) { @@ -1565,7 +1582,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * Returns HTML code for images used in link titles * * @author Andreas Gohr <andi@splitbrain.org> - * @param string $img + * @param array $img * @return string HTML img tag or similar */ function _imageTitle($img) { @@ -1575,7 +1592,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // see internalmedia() and externalmedia() list($img['src']) = explode('#', $img['src'], 2); if($img['type'] == 'internalmedia') { - resolve_mediaid(getNS($ID), $img['src'], $exists); + resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true); } return $this->_media( @@ -1638,13 +1655,22 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if(!$atts['width']) $atts['width'] = 320; if(!$atts['height']) $atts['height'] = 240; - // prepare alternative formats - $extensions = array('webm', 'ogv', 'mp4'); - $alternatives = media_alternativefiles($src, $extensions); - $poster = media_alternativefiles($src, array('jpg', 'png'), true); - $posterUrl = ''; - if(!empty($poster)) { - $posterUrl = ml(reset($poster), '', true, '&'); + $posterUrl = ''; + $files = array(); + $isExternal = media_isexternal($src); + + if ($isExternal) { + // take direct source for external files + list(/*ext*/, $srcMime) = mimetype($src); + $files[$srcMime] = $src; + } else { + // prepare alternative formats + $extensions = array('webm', 'ogv', 'mp4'); + $files = media_alternativefiles($src, $extensions); + $poster = media_alternativefiles($src, array('jpg', 'png')); + if(!empty($poster)) { + $posterUrl = ml(reset($poster), '', true, '&'); + } } $out = ''; @@ -1655,13 +1681,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $fallback = ''; // output source for each alternative video format - foreach($alternatives as $mime => $file) { - $url = ml($file, '', true, '&'); + foreach($files as $mime => $file) { + if ($isExternal) { + $url = $file; + $linkType = 'externalmedia'; + } else { + $url = ml($file, '', true, '&'); + $linkType = 'internalmedia'; + } $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL; // alternative content (just a link to the file) - $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true); + $fallback .= $this->$linkType($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true); } // finish @@ -1679,11 +1711,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * @param array $atts - additional attributes for the <audio> tag * @return string */ - function _audio($src, $atts = null) { + function _audio($src, $atts = array()) { + $files = array(); + $isExternal = media_isexternal($src); - // prepare alternative formats - $extensions = array('ogg', 'mp3', 'wav'); - $alternatives = media_alternativefiles($src, $extensions); + if ($isExternal) { + // take direct source for external files + list(/*ext*/, $srcMime) = mimetype($src); + $files[$srcMime] = $src; + } else { + // prepare alternative formats + $extensions = array('ogg', 'mp3', 'wav'); + $files = media_alternativefiles($src, $extensions); + } $out = ''; // open audio tag @@ -1691,13 +1731,19 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $fallback = ''; // output source for each alternative audio format - foreach($alternatives as $mime => $file) { - $url = ml($file, '', true, '&'); + foreach($files as $mime => $file) { + if ($isExternal) { + $url = $file; + $linkType = 'externalmedia'; + } else { + $url = ml($file, '', true, '&'); + $linkType = 'internalmedia'; + } $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(utf8_basename(noNS($file))); $out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL; // alternative content (just a link to the file) - $fallback .= $this->internalmedia($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true); + $fallback .= $this->$linkType($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true); } // finish @@ -1705,6 +1751,21 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $out .= '</audio>'.NL; return $out; } + + /** + * _getLastMediaRevisionAt is a helperfunction to internalmedia() and _media() + * which returns an existing media revision less or equal to rev or date_at + * + * @author lisps + * @param string $media_id + * @access protected + * @return string revision ('' for current) + */ + function _getLastMediaRevisionAt($media_id){ + if(!$this->date_at || media_isexternal($media_id)) return ''; + $pagelog = new MediaChangeLog($media_id); + return $pagelog->getLastRevisionAt($this->date_at); + } #endregion } diff --git a/inc/parserutils.php b/inc/parserutils.php index 9c2a0b570fe4886c47dea60c6bc55c8f472b3eec..3ef8138a739010b75a4a0c080f90389f31eecc72 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -55,8 +55,13 @@ define('METADATA_RENDER_UNLIMITED', 4); * wasn't found * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id + * @param string|int $rev revision timestamp or empty string + * @param bool $excuse + * @return null|string */ -function p_wiki_xhtml($id, $rev='', $excuse=true){ +function p_wiki_xhtml($id, $rev='', $excuse=true,$date_at=''){ $file = wikiFN($id,$rev); $ret = ''; @@ -65,9 +70,9 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){ $keep = $ID; $ID = $id; - if($rev){ + if($rev || $date_at){ if(@file_exists($file)){ - $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info); //no caching on old revisions + $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info,$date_at); //no caching on old revisions }elseif($excuse){ $ret = p_locale_xhtml('norev'); } @@ -89,6 +94,9 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){ * Returns the specified local text in parsed format * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id + * @return null|string */ function p_locale_xhtml($id){ //fetch parsed locale @@ -101,6 +109,11 @@ function p_locale_xhtml($id){ * * @author Andreas Gohr <andi@splitbrain.org> * @author Chris Smith <chris@jalakai.co.uk> + * + * @param string $file filename, path to file + * @param string $format + * @param string $id page id + * @return null|string */ function p_cached_output($file, $format='xhtml', $id='') { global $conf; @@ -129,6 +142,11 @@ function p_cached_output($file, $format='xhtml', $id='') { * Uses and creates a serialized cache file * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename, path to file + * @param bool $cacheonly + * @param string $id page id + * @return array|null */ function p_cached_instructions($file,$cacheonly=false,$id='') { static $run = null; @@ -157,7 +175,8 @@ function p_cached_instructions($file,$cacheonly=false,$id='') { * * @author Harry Fuecks <hfuecks@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> - * @param string $text raw wiki syntax text + * + * @param string $text raw wiki syntax text * @return array a list of instruction arrays */ function p_get_instructions($text){ @@ -185,9 +204,9 @@ function p_get_instructions($text){ /** * returns the metadata of a page * - * @param string $id The id of the page the metadata should be returned from - * @param string $key The key of the metdata value that shall be read (by default everything) - separate hierarchies by " " like "date created" - * @param int $render If the page should be rendererd - possible values: + * @param string $id The id of the page the metadata should be returned from + * @param string $key The key of the metdata value that shall be read (by default everything) - separate hierarchies by " " like "date created" + * @param int $render If the page should be rendererd - possible values: * METADATA_DONT_RENDER, METADATA_RENDER_USING_SIMPLE_CACHE, METADATA_RENDER_USING_CACHE * METADATA_RENDER_UNLIMITED (also combined with the previous two options), * default: METADATA_RENDER_USING_CACHE @@ -360,6 +379,9 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ * used on page deletion * * @author Michael Klier <chi@chimeric.de> + * + * @param string $id page id + * @return bool success / fail */ function p_purge_metadata($id) { $meta = p_read_metadata($id); @@ -423,6 +445,10 @@ function p_save_metadata($id, $meta) { * renders the metadata of a page * * @author Esther Brunner <esther@kaffeehaus.ch> + * + * @param string $id page id + * @param array $orig the original metadata + * @return array|null array('current'=> array,'persistent'=> array); */ function p_render_metadata($id, $orig){ // make sure the correct ID is in global ID @@ -477,6 +503,8 @@ function p_render_metadata($id, $orig){ * returns all available parser syntax modes in correct order * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return array[] with for each plugin the array('sort' => sortnumber, 'mode' => mode string, 'obj' => plugin object) */ function p_get_parsermodes(){ global $conf; @@ -569,6 +597,10 @@ function p_get_parsermodes(){ * Callback function for usort * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $a + * @param array $b + * @return int $a is lower/equal/higher than $b */ function p_sort_modes($a, $b){ if($a['sort'] == $b['sort']) return 0; @@ -582,15 +614,25 @@ function p_sort_modes($a, $b){ * * @author Harry Fuecks <hfuecks@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $mode + * @param array|null|false $instructions + * @param array $info returns render info like enabled toc and cache + * @return null|string rendered output */ -function p_render($mode,$instructions,&$info){ +function p_render($mode,$instructions,&$info,$date_at=''){ if(is_null($instructions)) return ''; + if($instructions === false) return ''; $Renderer = p_get_renderer($mode); if (is_null($Renderer)) return null; $Renderer->reset(); + if($date_at) { + $Renderer->date_at = $date_at; + } + $Renderer->smileys = getSmileys(); $Renderer->entities = getEntities(); $Renderer->acronyms = getAcronyms(); @@ -617,7 +659,7 @@ function p_render($mode,$instructions,&$info){ * Figure out the correct renderer class to use for $mode, * instantiate and return it * - * @param $mode string Mode of the renderer to get + * @param string $mode Mode of the renderer to get * @return null|Doku_Renderer The renderer * * @author Christopher Smith <chris@jalakai.co.uk> @@ -636,6 +678,7 @@ function p_get_renderer($mode) { } // not bundled, see if its an enabled renderer plugin & when $mode is 'xhtml', the renderer can supply that format. + /** @var Doku_Renderer $Renderer */ $Renderer = $plugin_controller->load('renderer',$rname); if ($Renderer && is_a($Renderer, 'Doku_Renderer') && ($mode != 'xhtml' || $mode == $Renderer->getFormat())) { return $Renderer; @@ -673,8 +716,8 @@ function p_get_renderer($mode) { * METADATA_RENDER_USING_SIMPLE_CACHE, * METADATA_RENDER_USING_CACHE, * METADATA_RENDER_UNLIMITED - * * @return string|null The first heading + * * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Hamann <michael@content-space.de> */ @@ -688,8 +731,8 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){ * @param string $code source code to be highlighted * @param string $language language to provide highlighting * @param string $wrapper html element to wrap the returned highlighted text - * * @return string xhtml code + * * @author Christopher Smith <chris@jalakai.co.uk> * @author Andreas Gohr <andi@splitbrain.org> */ diff --git a/inc/plugin.php b/inc/plugin.php index fbfc0325f74ed03dbb8f714e35ae34de93af378c..9d9b2044c2035f60c6749ba3aecd09e4c90fb55c 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -30,7 +30,7 @@ class DokuWiki_Plugin { * desc - Short description of the plugin (Text only) * url - Website with more information on the plugin (eg. syntax description) */ - function getInfo() { + public function getInfo(){ $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if(@file_exists($info)) return confToHash($info); @@ -48,16 +48,27 @@ class DokuWiki_Plugin { // plugin introspection methods // extract from class name, format = <plugin type>_plugin_<name>[_<component name>] - function getPluginType() { + /** + * @return string plugin type + */ + public function getPluginType() { list($t) = explode('_', get_class($this), 2); return $t; } - function getPluginName() { - list($t, $p, $n) = explode('_', get_class($this), 4); + + /** + * @return string plugin name + */ + public function getPluginName() { + list(/* $t */, /* $p */, $n) = explode('_', get_class($this), 4); return $n; } - function getPluginComponent() { - list($t, $p, $n, $c) = explode('_', get_class($this), 4); + + /** + * @return string component name + */ + public function getPluginComponent() { + list(/* $t */, /* $p */, /* $n */, $c) = explode('_', get_class($this), 4); return (isset($c)?$c:''); } @@ -71,7 +82,7 @@ class DokuWiki_Plugin { * @param string $id id of the string to be retrieved * @return string string in appropriate language or english if not available */ - function getLang($id) { + public function getLang($id) { if (!$this->localised) $this->setupLocale(); return (isset($this->lang[$id]) ? $this->lang[$id] : ''); @@ -86,16 +97,18 @@ class DokuWiki_Plugin { * @param string $id id of language dependent wiki page * @return string parsed contents of the wiki page in xhtml format */ - function locale_xhtml($id) { + public function locale_xhtml($id) { return p_cached_output($this->localFN($id)); } /** - * localFN($id) - * prepends appropriate path for a language dependent filename + * Prepends appropriate path for a language dependent filename * plugin equivalent of localFN() + * + * @param string $id id of localization file + * @return string wiki text */ - function localFN($id) { + public function localFN($id) { global $conf; $plugin = $this->getPluginName(); $file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; @@ -110,21 +123,33 @@ class DokuWiki_Plugin { } /** - * setupLocale() - * reads all the plugins language dependent strings into $this->lang - * this function is automatically called by getLang() + * Reads all the plugins language dependent strings into $this->lang + * this function is automatically called by getLang() */ function setupLocale() { - if ($this->localised) return; + if($this->localised) return; - global $conf; // definitely don't invoke "global $lang" - $path = DOKU_PLUGIN.$this->getPluginName().'/lang/'; + global $conf, $config_cascade; // definitely don't invoke "global $lang" + $path = DOKU_PLUGIN . $this->getPluginName() . '/lang/'; $lang = array(); // don't include once, in case several plugin components require the same language file - @include($path.'en/lang.php'); - if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php'); + @include($path . 'en/lang.php'); + foreach($config_cascade['lang']['plugin'] as $config_file) { + if(@file_exists($config_file . $this->getPluginName() . '/en/lang.php')) { + include($config_file . $this->getPluginName() . '/en/lang.php'); + } + } + + if($conf['lang'] != 'en') { + @include($path . $conf['lang'] . '/lang.php'); + foreach($config_cascade['lang']['plugin'] as $config_file) { + if(@file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) { + include($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php'); + } + } + } $this->lang = $lang; $this->localised = true; @@ -140,7 +165,7 @@ class DokuWiki_Plugin { * @param mixed $notset what to return if the setting is not available * @return mixed */ - function getConf($setting, $notset=false){ + public function getConf($setting, $notset=false){ if (!$this->configloaded){ $this->loadConfig(); } @@ -177,7 +202,7 @@ class DokuWiki_Plugin { * * @return array setting => value */ - function readDefaultSettings() { + protected function readDefaultSettings() { $path = DOKU_PLUGIN.$this->getPluginName().'/conf/'; $conf = array(); @@ -196,10 +221,9 @@ class DokuWiki_Plugin { * * @param string $name name of plugin to load * @param bool $msg if a message should be displayed in case the plugin is not available - * - * @return object helper plugin object + * @return DokuWiki_Plugin|null helper plugin object */ - function loadHelper($name, $msg = true){ + public function loadHelper($name, $msg = true){ $obj = plugin_load('helper',$name); if (is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.",-1); return $obj; @@ -211,8 +235,14 @@ class DokuWiki_Plugin { /** * email * standardised function to generate an email link according to obfuscation settings + * + * @param string $email + * @param string $name + * @param string $class + * @param string $more + * @return string html */ - function email($email, $name='', $class='', $more='') { + public function email($email, $name='', $class='', $more='') { if (!$email) return $name; $email = obfuscate($email); if (!$name) $name = $email; @@ -223,8 +253,15 @@ class DokuWiki_Plugin { /** * external_link * standardised function to generate an external link according to conf settings + * + * @param string $link + * @param string $title + * @param string $class + * @param string $target + * @param string $more + * @return string */ - function external_link($link, $title='', $class='', $target='', $more='') { + public function external_link($link, $title='', $class='', $target='', $more='') { global $conf; $link = htmlentities($link); @@ -247,11 +284,12 @@ class DokuWiki_Plugin { * Instead use render_text() * * @deprecated 2014-01-22 - * @param $name - * @param $arguments + * + * @param string $name + * @param array $arguments * @return null|string */ - function __call($name, $arguments) { + public function __call($name, $arguments) { if($name == 'render'){ dbg_deprecated('render_text()'); if(!isset($arguments[1])) $arguments[1] = 'xhtml'; @@ -265,11 +303,11 @@ class DokuWiki_Plugin { * output text string through the parser, allows dokuwiki markup to be used * very ineffecient for small pieces of data - try not to use * - * @param string $text wiki markup to parse + * @param string $text wiki markup to parse * @param string $format output format * @return null|string */ - function render_text($text, $format='xhtml') { + public function render_text($text, $format='xhtml') { return p_render($format, p_get_instructions($text),$info); } @@ -278,7 +316,7 @@ class DokuWiki_Plugin { * * @return bool false if the plugin has to be instantiated */ - function isSingleton() { + public function isSingleton() { return true; } } diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index d80cd4c9e0d6674688e4f0aab0f75735c142b9ea..dfd4d0a2951612860791950a2bd247b49530b963 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -66,14 +66,14 @@ class Doku_Plugin_Controller { * @param $name string name of the plugin to load * @param $new bool true to return a new instance of the plugin, false to use an already loaded instance * @param $disabled bool true to load even disabled plugins - * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|null the plugin object or null on failure + * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|DokuWiki_Auth_Plugin|DokuWiki_Admin_Plugin|DokuWiki_Action_Plugin|DokuWiki_Remote_Plugin|null the plugin object or null on failure */ public function load($type,$name,$new=false,$disabled=false){ //we keep all loaded plugins available in global scope for reuse global $DOKU_PLUGINS; - list($plugin,$component) = $this->_splitName($name); + list($plugin, /* $component */) = $this->_splitName($name); // check if disabled if(!$disabled && $this->isdisabled($plugin)){ @@ -114,7 +114,7 @@ class Doku_Plugin_Controller { * Whether plugin is disabled * * @param string $plugin name of plugin - * @return bool; true disabled, false enabled + * @return bool true disabled, false enabled */ public function isdisabled($plugin) { return empty($this->tmp_plugins[$plugin]); @@ -124,7 +124,7 @@ class Doku_Plugin_Controller { * Disable the plugin * * @param string $plugin name of plugin - * @return bool; true saving succeed, false saving failed + * @return bool true saving succeed, false saving failed */ public function disable($plugin) { if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false; @@ -136,7 +136,7 @@ class Doku_Plugin_Controller { * Enable the plugin * * @param string $plugin name of plugin - * @return bool; true saving succeed, false saving failed + * @return bool true saving succeed, false saving failed */ public function enable($plugin) { if(array_key_exists($plugin,$this->plugin_cascade['protected'])) return false; @@ -178,8 +178,10 @@ class Doku_Plugin_Controller { // to keep everything simple we just skip the plugin completely continue; } elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) { - // treat this as a default disabled plugin(over-rideable by the plugin manager) - // deprecated 2011-09-10 (usage of disabled files) + /** + * treat this as a default disabled plugin(over-rideable by the plugin manager) + * @deprecated 2011-09-10 (usage of disabled files) + */ if (empty($this->plugin_cascade['local'][$plugin])) { $all_plugins[$plugin] = 0; } else { @@ -227,7 +229,7 @@ class Doku_Plugin_Controller { * @param bool $forceSave; * false to save only when config changed * true to always save - * @return bool; true saving succeed, false saving failed + * @return bool true saving succeed, false saving failed */ protected function saveList($forceSave = false) { global $conf; @@ -300,12 +302,9 @@ class Doku_Plugin_Controller { /** * Returns a list of available plugin components of given type * - * @param string $type, plugin_type name; - * the type of plugin to return, - * @param bool $enabled; - * true to return enabled plugins, - * false to return disabled plugins - * + * @param string $type plugin_type name; the type of plugin to return, + * @param bool $enabled true to return enabled plugins, + * false to return disabled plugins * @return array of plugin components of requested type */ protected function _getListByType($type, $enabled) { diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 911c4e5c0811076aa250ba93ef30c46f69ac9761..4d591869d53eaaad88f23b6960ff2484f9dd90d8 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -49,7 +49,7 @@ function plugin_load($type,$name,$new=false,$disabled=false) { * Whether plugin is disabled * * @param string $plugin name of plugin - * @return bool; true disabled, false enabled + * @return bool true disabled, false enabled */ function plugin_isdisabled($plugin) { /** @var $plugin_controller Doku_Plugin_Controller */ @@ -61,7 +61,7 @@ function plugin_isdisabled($plugin) { * Enable the plugin * * @param string $plugin name of plugin - * @return bool; true saving succeed, false saving failed + * @return bool true saving succeed, false saving failed */ function plugin_enable($plugin) { /** @var $plugin_controller Doku_Plugin_Controller */ @@ -73,7 +73,7 @@ function plugin_enable($plugin) { * Disable the plugin * * @param string $plugin name of plugin - * @return bool; true saving succeed, false saving failed + * @return bool true saving succeed, false saving failed */ function plugin_disable($plugin) { /** @var $plugin_controller Doku_Plugin_Controller */ diff --git a/inc/remote.php b/inc/remote.php index e27aa74f8abcf7c49da36cc4e2969783c5416655..861353a190b74fb0d1a4f5e693ee6d5d565e5185 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -60,6 +60,9 @@ class RemoteAPI { private $dateTransformation; private $fileTransformation; + /** + * constructor + */ public function __construct() { $this->dateTransformation = array($this, 'dummyTransformation'); $this->fileTransformation = array($this, 'dummyTransformation'); @@ -75,7 +78,7 @@ class RemoteAPI { } /** - * call a method via remote api. + * Call a method via remote api. * * @param string $method name of the method to call. * @param array $args arguments to pass to the given method @@ -85,7 +88,7 @@ class RemoteAPI { if ($args === null) { $args = array(); } - list($type, $pluginName, $call) = explode('.', $method, 3); + list($type, $pluginName, /* $call */) = explode('.', $method, 3); if ($type === 'plugin') { return $this->callPlugin($pluginName, $method, $args); } @@ -95,11 +98,25 @@ class RemoteAPI { return $this->callCustomCallPlugin($method, $args); } + /** + * Check existance of core methods + * + * @param string $name name of the method + * @return bool if method exists + */ private function coreMethodExist($name) { $coreMethods = $this->getCoreMethods(); return array_key_exists($name, $coreMethods); } + /** + * Try to call custom methods provided by plugins + * + * @param string $method name of method + * @param array $args + * @return mixed + * @throws RemoteException if method not exists + */ private function callCustomCallPlugin($method, $args) { $customCalls = $this->getCustomCallPlugins(); if (!array_key_exists($method, $customCalls)) { @@ -109,6 +126,12 @@ class RemoteAPI { return $this->callPlugin($customCall[0], $customCall[1], $args); } + /** + * Returns plugin calls that are registered via RPC_CALL_ADD action + * + * @return array with pairs of custom plugin calls + * @triggers RPC_CALL_ADD + */ private function getCustomCallPlugins() { if ($this->pluginCustomCalls === null) { $data = array(); @@ -118,6 +141,15 @@ class RemoteAPI { return $this->pluginCustomCalls; } + /** + * Call a plugin method + * + * @param string $pluginName + * @param string $method method name + * @param array $args + * @return mixed return of custom method + * @throws RemoteException + */ private function callPlugin($pluginName, $method, $args) { $plugin = plugin_load('remote', $pluginName); $methods = $this->getPluginMethods(); @@ -129,6 +161,14 @@ class RemoteAPI { return call_user_func_array(array($plugin, $name), $args); } + /** + * Call a core method + * + * @param string $method name of method + * @param array $args + * @return mixed + * @throws RemoteException if method not exist + */ private function callCoreMethod($method, $args) { $coreMethods = $this->getCoreMethods(); $this->checkAccess($coreMethods[$method]); @@ -139,6 +179,11 @@ class RemoteAPI { return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args); } + /** + * Check if access should be checked + * + * @param array $methodMeta data about the method + */ private function checkAccess($methodMeta) { if (!isset($methodMeta['public'])) { $this->forceAccess(); @@ -149,12 +194,26 @@ class RemoteAPI { } } - private function checkArgumentLength($method, $args) { - if (count($method['args']) < count($args)) { + /** + * Check the number of parameters + * + * @param array $methodMeta data about the method + * @param array $args + * @throws RemoteException if wrong parameter count + */ + private function checkArgumentLength($methodMeta, $args) { + if (count($methodMeta['args']) < count($args)) { throw new RemoteException('Method does not exist - wrong parameter count.', -32603); } } + /** + * Determine the name of the real method + * + * @param array $methodMeta list of data of the methods + * @param string $method name of method + * @return string + */ private function getMethodName($methodMeta, $method) { if (isset($methodMeta[$method]['name'])) { return $methodMeta[$method]['name']; @@ -164,6 +223,8 @@ class RemoteAPI { } /** + * Perform access check for current user + * * @return bool true if the current user has access to remote api. */ public function hasAccess() { @@ -186,8 +247,10 @@ class RemoteAPI { } /** - * @throws RemoteException On denied access. + * Requests access + * * @return void + * @throws RemoteException On denied access. */ public function forceAccess() { if (!$this->hasAccess()) { @@ -196,7 +259,10 @@ class RemoteAPI { } /** + * Collects all the methods of the enabled Remote Plugins + * * @return array all plugin methods. + * @throws RemoteException if not implemented */ public function getPluginMethods() { if ($this->pluginMethods === null) { @@ -204,6 +270,7 @@ class RemoteAPI { $plugins = plugin_list('remote'); foreach ($plugins as $pluginName) { + /** @var DokuWiki_Remote_Plugin $plugin */ $plugin = plugin_load('remote', $pluginName); if (!is_subclass_of($plugin, 'DokuWiki_Remote_Plugin')) { throw new RemoteException("Plugin $pluginName does not implement DokuWiki_Remote_Plugin"); @@ -219,6 +286,8 @@ class RemoteAPI { } /** + * Collects all the core methods + * * @param RemoteAPICore $apiCore this parameter is used for testing. Here you can pass a non-default RemoteAPICore * instance. (for mocking) * @return array all core methods. @@ -234,22 +303,50 @@ class RemoteAPI { return $this->coreMethods->__getRemoteInfo(); } + /** + * Transform file to xml + * + * @param mixed $data + * @return mixed + */ public function toFile($data) { return call_user_func($this->fileTransformation, $data); } + /** + * Transform date to xml + * + * @param mixed $data + * @return mixed + */ public function toDate($data) { return call_user_func($this->dateTransformation, $data); } + /** + * A simple transformation + * + * @param mixed $data + * @return mixed + */ public function dummyTransformation($data) { return $data; } + /** + * Set the transformer function + * + * @param callback $dateTransformation + */ public function setDateTransformation($dateTransformation) { $this->dateTransformation = $dateTransformation; } + /** + * Set the transformer function + * + * @param callback $fileTransformation + */ public function setFileTransformation($fileTransformation) { $this->fileTransformation = $fileTransformation; } diff --git a/inc/search.php b/inc/search.php index 5489dc2c0fad3e3af397fb28102441245eb73521..935969d3f2fb2871b79e15c76826e07dddcbbb3b 100644 --- a/inc/search.php +++ b/inc/search.php @@ -134,6 +134,11 @@ function search_namespaces(&$data,$base,$file,$type,$lvl,$opts){ /** * List all mediafiles in a namespace + * $opts['depth'] recursion level, 0 for all + * $opts['showmsg'] shows message if invalid media id is used + * $opts['skipacl'] skip acl checking + * $opts['pattern'] check given pattern + * $opts['hash'] add hashes to result list * * @author Andreas Gohr <andi@splitbrain.org> */ @@ -258,6 +263,7 @@ function search_allpages(&$data,$base,$file,$type,$lvl,$opts){ //only search txt files if(substr($file,-4) != '.txt') return true; + $item = array(); $item['id'] = pathID($file); if(!$opts['skipacl'] && auth_quickaclcheck($item['id']) < AUTH_READ){ return false; diff --git a/inc/subscription.php b/inc/subscription.php index aab6de926464448cfc687927646815cc09fd9764..58376f2ecd55057adf8d9bdb5404c4af81117cbb 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -444,17 +444,17 @@ class Subscription { * Send the diff for some media change * * @fixme this should embed thumbnails of images in HTML version + * * @param string $subscriber_mail The target mail address * @param string $template Mail template ('uploadmail', ...) * @param string $id Media file for which the notification is * @param int|bool $rev Old revision if any - * @return bool true if successfully sent */ public function send_media_diff($subscriber_mail, $template, $id, $rev = false) { global $conf; $file = mediaFN($id); - list($mime, $ext) = mimetype($id); + list($mime, /* $ext */) = mimetype($id); $trep = array( 'MIME' => $mime, @@ -515,7 +515,7 @@ class Subscription { * @author Adrian Lang <lang@cosmocode.de> * * @param string $subscriber_mail The target mail address - * @param array $id The ID + * @param string $id The ID * @param int $lastupdate Time of the last notification * @return bool */ @@ -619,6 +619,7 @@ class Subscription { /** * Get a valid message id for a certain $id and revision (or the current revision) + * * @param string $id The id of the page (or media file) the message id should be for * @param string $rev The revision of the page, set to the current revision of the page $id if not set * @return string diff --git a/inc/template.php b/inc/template.php index 7f3c68534dcd8dfc8cb25fb9bb2c55e857d94a03..3bccb0bd87756029816c20586ea522e0ed3616c0 100644 --- a/inc/template.php +++ b/inc/template.php @@ -68,6 +68,7 @@ function tpl_basedir($tpl='') { * handled by this function. ACL stuff is not done here either. * * @author Andreas Gohr <andi@splitbrain.org> + * * @triggers TPL_ACT_RENDER * @triggers TPL_CONTENT_DISPLAY * @param bool $prependTOC should the TOC be displayed here? @@ -170,8 +171,9 @@ function tpl_content_core() { break; default: $evt = new Doku_Event('TPL_ACT_UNKNOWN', $ACT); - if($evt->advise_before()) + if($evt->advise_before()) { msg("Failed to handle command: ".hsc($ACT), -1); + } $evt->advise_after(); unset($evt); return false; @@ -186,6 +188,7 @@ function tpl_content_core() { * a false argument * * @author Andreas Gohr <andi@splitbrain.org> + * * @param bool $return Should the TOC be returned instead to be printed? * @return string */ @@ -204,7 +207,7 @@ function tpl_toc($return = false) { $toc = $TOC; } elseif(($ACT == 'show' || substr($ACT, 0, 6) == 'export') && !$REV && $INFO['exists']) { // get TOC from metadata, render if neccessary - $meta = p_get_metadata($ID, false, METADATA_RENDER_USING_CACHE); + $meta = p_get_metadata($ID, '', METADATA_RENDER_USING_CACHE); if(isset($meta['internal']['toc'])) { $tocok = $meta['internal']['toc']; } else { @@ -243,6 +246,8 @@ function tpl_toc($return = false) { * Handle the admin page contents * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return bool */ function tpl_admin() { global $INFO; @@ -277,6 +282,7 @@ function tpl_admin() { * This has to go into the head section of your template. * * @author Andreas Gohr <andi@splitbrain.org> + * * @triggers TPL_METAHEADER_OUTPUT * @param bool $alt Should feeds and alternative format links be added? * @return bool @@ -426,10 +432,12 @@ function tpl_metaheaders($alt = true) { * instances. Attributes are given as key value pairs. Values will be HTML * encoded automatically so they should be provided as is in the $data array. * - * For tags having a body attribute specify the the body data in the special + * For tags having a body attribute specify the body data in the special * attribute '_data'. This field will NOT BE ESCAPED automatically. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $data */ function _tpl_metaheaders_action($data) { foreach($data as $tag => $inst) { @@ -456,6 +464,12 @@ function _tpl_metaheaders_action($data) { * Just builds a link. * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $url + * @param string $name + * @param string $more + * @param bool $return if true return the link html, otherwise print + * @return bool|string html of the link, or true if printed */ function tpl_link($url, $name, $more = '', $return = false) { $out = '<a href="'.$url.'" '; @@ -472,6 +486,10 @@ function tpl_link($url, $name, $more = '', $return = false) { * Wrapper around html_wikilink * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id + * @param string|null $name the name of the link + * @return bool true */ function tpl_pagelink($id, $name = null) { print '<bdi>'.html_wikilink($id, $name).'</bdi>'; @@ -485,6 +503,9 @@ function tpl_pagelink($id, $name = null) { * returns false if none is available * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id page id + * @return false|string */ function tpl_getparent($id) { $parent = getNS($id).':'; @@ -503,6 +524,10 @@ function tpl_getparent($id) { * * @author Adrian Lang <mail@adrianlang.de> * @see tpl_get_action + * + * @param string $type + * @param bool $return + * @return bool|string html, or false if no data, true if printed */ function tpl_button($type, $return = false) { $data = tpl_get_action($type); @@ -534,6 +559,13 @@ function tpl_button($type, $return = false) { * * @author Adrian Lang <mail@adrianlang.de> * @see tpl_get_action + * + * @param string $type action command + * @param string $pre prefix of link + * @param string $suf suffix of link + * @param string $inner innerHML of link + * @param bool $return if true it returns html, otherwise prints + * @return bool|string html or false if no data, true if printed */ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = false) { global $lang; @@ -571,7 +603,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals $linktarget, $pre.(($inner) ? $inner : $caption).$suf, 'class="action '.$type.'" '. $akey.$rel. - 'title="'.hsc($caption).$addTitle.'"', 1 + 'title="'.hsc($caption).$addTitle.'"', true ); } if($return) return $out; @@ -599,6 +631,7 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals * @author Andreas Gohr <andi@splitbrain.org> * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * @author Adrian Lang <mail@adrianlang.de> + * * @param string $type * @return array|bool|string */ @@ -747,7 +780,6 @@ function tpl_get_action($type) { break; default: return '[unknown %s type]'; - break; } return compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement'); } @@ -756,21 +788,22 @@ function tpl_get_action($type) { * Wrapper around tpl_button() and tpl_actionlink() * * @author Anika Henke <anika@selfthinker.org> - * @param - * @param bool $link link or form button? - * @param bool $wrapper HTML element wrapper - * @param bool $return return or print - * @param string $pre prefix for links - * @param string $suf suffix for links - * @param string $inner inner HTML for links + * + * @param string $type action command + * @param bool $link link or form button? + * @param string|bool $wrapper HTML element wrapper + * @param bool $return return or print + * @param string $pre prefix for links + * @param string $suf suffix for links + * @param string $inner inner HTML for links * @return bool|string */ function tpl_action($type, $link = false, $wrapper = false, $return = false, $pre = '', $suf = '', $inner = '') { $out = ''; if($link) { - $out .= tpl_actionlink($type, $pre, $suf, $inner, 1); + $out .= tpl_actionlink($type, $pre, $suf, $inner, true); } else { - $out .= tpl_button($type, 1); + $out .= tpl_button($type, true); } if($out && $wrapper) $out = "<$wrapper>$out</$wrapper>"; @@ -790,6 +823,7 @@ function tpl_action($type, $link = false, $wrapper = false, $return = false, $pr * autocompletion feature (MSIE and Firefox) * * @author Andreas Gohr <andi@splitbrain.org> + * * @param bool $ajax * @param bool $autocomplete * @return bool @@ -818,6 +852,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) { * Print the breadcrumbs trace * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $sep Separator between entries * @return bool */ @@ -859,6 +894,7 @@ function tpl_breadcrumbs($sep = '•') { * @author Sean Coates <sean@caedmon.net> * @author <fredrik@averpil.com> * @todo May behave strangely in RTL languages + * * @param string $sep Separator between entries * @return bool */ @@ -909,6 +945,7 @@ function tpl_youarehere($sep = ' » ') { * Could be enhanced with a profile link in future? * * @author Andreas Gohr <andi@splitbrain.org> + * * @return bool */ function tpl_userinfo() { @@ -927,6 +964,7 @@ function tpl_userinfo() { * Print some info about the current page * * @author Andreas Gohr <andi@splitbrain.org> + * * @param bool $ret return content instead of printing it * @return bool|string */ @@ -990,6 +1028,7 @@ function tpl_pageinfo($ret = false) { * the given ID is used. * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $id page id * @param bool $ret return content instead of printing * @return bool|string @@ -1027,9 +1066,10 @@ function tpl_pagetitle($id = null, $ret = false) { * Only allowed in: detail.php * * @author Andreas Gohr <andi@splitbrain.org> - * @param array $tags tags to try - * @param string $alt alternative output if no data was found - * @param null $src the image src, uses global $SRC if not given + * + * @param array|string $tags tag or array of tags to try + * @param string $alt alternative output if no data was found + * @param null|string $src the image src, uses global $SRC if not given * @return string */ function tpl_img_getTag($tags, $alt = '', $src = null) { @@ -1117,12 +1157,13 @@ function tpl_get_img_meta() { * @param $maxheight int - maximal height of the image * @param $link bool - link to the orginal size? * @param $params array - additional image attributes - * @return mixed Result of TPL_IMG_DISPLAY + * @return bool Result of TPL_IMG_DISPLAY */ function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) { global $IMG; /** @var Input $INPUT */ global $INPUT; + global $REV; $w = tpl_img_getTag('File.Width'); $h = tpl_img_getTag('File.Height'); @@ -1147,8 +1188,8 @@ function tpl_img($maxwidth = 0, $maxheight = 0, $link = true, $params = null) { } //prepare URLs - $url = ml($IMG, array('cache'=> $INPUT->str('cache')), true, '&'); - $src = ml($IMG, array('cache'=> $INPUT->str('cache'), 'w'=> $w, 'h'=> $h), true, '&'); + $url = ml($IMG, array('cache'=> $INPUT->str('cache'),'rev'=>$REV), true, '&'); + $src = ml($IMG, array('cache'=> $INPUT->str('cache'),'rev'=>$REV, 'w'=> $w, 'h'=> $h), true, '&'); //prepare attributes $alt = tpl_img_getTag('Simple.Title'); @@ -1269,21 +1310,37 @@ function tpl_loadConfig() { * tpl_getLang($id) * * use this function to access template language variables + * + * @param string $id key of language string + * @return string */ function tpl_getLang($id) { static $lang = array(); if(count($lang) === 0) { - $path = tpl_incdir().'lang/'; + global $conf, $config_cascade; // definitely don't invoke "global $lang" + + $path = tpl_incdir() . 'lang/'; $lang = array(); - global $conf; // definitely don't invoke "global $lang" // don't include once - @include($path.'en/lang.php'); - if($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php'); - } + @include($path . 'en/lang.php'); + foreach($config_cascade['lang']['template'] as $config_file) { + if(@file_exists($config_file . $conf['template'] . '/en/lang.php')) { + include($config_file . $conf['template'] . '/en/lang.php'); + } + } + if($conf['lang'] != 'en') { + @include($path . $conf['lang'] . '/lang.php'); + foreach($config_cascade['lang']['template'] as $config_file) { + if(@file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) { + include($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php'); + } + } + } + } return $lang[$id]; } @@ -1300,11 +1357,14 @@ function tpl_locale_xhtml($id) { /** * Prepends appropriate path for a language dependent filename + * + * @param string $id id of localized text + * @return string wiki text */ function tpl_localeFN($id) { $path = tpl_incdir().'lang/'; global $conf; - $file = DOKU_CONF.'/template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; if (!@file_exists($file)){ $file = $path.$conf['lang'].'/'.$id.'.txt'; if(!@file_exists($file)){ @@ -1326,6 +1386,8 @@ function tpl_localeFN($id) { * * @triggers MEDIAMANAGER_CONTENT_OUTPUT * @param bool $fromajax - set true when calling this function via ajax + * @param string $sort + * * @author Andreas Gohr <andi@splitbrain.org> */ function tpl_mediaContent($fromajax = false, $sort='natural') { @@ -1500,6 +1562,9 @@ function tpl_mediaTree() { * Note: this will not use any pretty URLs * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $empty empty option label + * @param string $button submit button label */ function tpl_actiondropdown($empty = '', $button = '>') { global $ID; @@ -1613,6 +1678,11 @@ function tpl_license($img = 'badge', $imgonly = false, $return = false, $wrap = * * This function is useful to populate sidebars or similar features in a * template + * + * @param string $pageid + * @param bool $print + * @param bool $propagate + * @return bool|null|string */ function tpl_include_page($pageid, $print = true, $propagate = false) { if (!$pageid) return false; @@ -1721,10 +1791,11 @@ function tpl_flush() { * If a given location starts with a colon it is assumed to be a media * file, otherwise it is assumed to be relative to the current template * - * @param array $search locations to look at - * @param bool $abs if to use absolute URL - * @param array &$imginfo filled with getimagesize() + * @param string[] $search locations to look at + * @param bool $abs if to use absolute URL + * @param array &$imginfo filled with getimagesize() * @return string + * * @author Andreas Gohr <andi@splitbrain.org> */ function tpl_getMediaFile($search, $abs = false, &$imginfo = null) { @@ -1775,6 +1846,8 @@ function tpl_getMediaFile($search, $abs = false, &$imginfo = null) { * * @author Anika Henke <anika@selfthinker.org> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file */ function tpl_includeFile($file) { global $config_cascade; @@ -1800,6 +1873,7 @@ function tpl_includeFile($file) { * Returns <link> tag for various icon types (favicon|mobile|generic) * * @author Anika Henke <anika@selfthinker.org> + * * @param array $types - list of icon types to display (favicon|mobile|generic) * @return string */ @@ -1875,6 +1949,8 @@ function tpl_media() { * Return useful layout classes * * @author Anika Henke <anika@selfthinker.org> + * + * @return string */ function tpl_classes() { global $ACT, $conf, $ID, $INFO; diff --git a/inc/utf8.php b/inc/utf8.php index c944667f74448525b48e0a602547369c127ab505..f86217686e219f0321cb34be948858920e8a90a1 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -43,6 +43,9 @@ if(!function_exists('utf8_isASCII')){ * Checks if a string contains 7bit ASCII only * * @author Andreas Haerter <andreas.haerter@dev.mail-node.com> + * + * @param string $str + * @return bool */ function utf8_isASCII($str){ return (preg_match('/(?:[^\x00-\x7F])/', $str) !== 1); @@ -56,6 +59,9 @@ if(!function_exists('utf8_strip')){ * Returns a pure ASCII7 string * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $str + * @return string */ function utf8_strip($str){ $ascii = ''; @@ -75,6 +81,9 @@ if(!function_exists('utf8_check')){ * * @author <bmorel@ssi.fr> * @link http://www.php.net/manual/en/function.utf8-encode.php + * + * @param string $Str + * @return bool */ function utf8_check($Str) { $len = strlen($Str); @@ -105,6 +114,7 @@ if(!function_exists('utf8_basename')){ * * @see basename() * @link https://bugs.php.net/bug.php?id=37738 + * * @param string $path A path * @param string $suffix If the name component ends in suffix this will also be cut off * @return string @@ -134,6 +144,9 @@ if(!function_exists('utf8_strlen')){ * @author <chernyshevsky at hotmail dot com> * @see strlen() * @see utf8_decode() + * + * @param string $string + * @return int */ function utf8_strlen($string){ return strlen(utf8_decode($string)); @@ -148,10 +161,11 @@ if(!function_exists('utf8_substr')){ * * @author Harry Fuecks <hfuecks@gmail.com> * @author Chris Smith <chris@jalakai.co.uk> + * * @param string $str * @param int $offset number of UTF-8 characters offset (from left) * @param int $length (optional) length in UTF-8 characters from offset - * @return mixed string or false if failure + * @return string */ function utf8_substr($str, $offset, $length = null) { if(UTF8_MBSTRING){ @@ -250,6 +264,14 @@ if(!function_exists('utf8_substr_replace')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see substr_replace() + * + * @param string $string input string + * @param string $replacement the replacement + * @param int $start the replacing will begin at the start'th offset into string. + * @param int $length If given and is positive, it represents the length of the portion of string which is + * to be replaced. If length is zero then this function will have the effect of inserting + * replacement into string at the given start offset. + * @return string */ function utf8_substr_replace($string, $replacement, $start , $length=0 ){ $ret = ''; @@ -266,6 +288,7 @@ if(!function_exists('utf8_ltrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see ltrim() + * * @param string $str * @param string $charlist * @return string @@ -286,6 +309,7 @@ if(!function_exists('utf8_rtrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see rtrim() + * * @param string $str * @param string $charlist * @return string @@ -306,6 +330,7 @@ if(!function_exists('utf8_trim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see trim() + * * @param string $str * @param string $charlist * @return string @@ -326,6 +351,9 @@ if(!function_exists('utf8_strtolower')){ * @author Leo Feyer <leo@typolight.org> * @see strtolower() * @see utf8_strtoupper() + * + * @param string $string + * @return string */ function utf8_strtolower($string){ if(UTF8_MBSTRING) return mb_strtolower($string,'utf-8'); @@ -344,6 +372,9 @@ if(!function_exists('utf8_strtoupper')){ * @author Leo Feyer <leo@typolight.org> * @see strtoupper() * @see utf8_strtoupper() + * + * @param string $string + * @return string */ function utf8_strtoupper($string){ if(UTF8_MBSTRING) return mb_strtoupper($string,'utf-8'); @@ -359,7 +390,8 @@ if(!function_exists('utf8_ucfirst')){ * Make a string's first character uppercase * * @author Harry Fuecks - * @param string + * + * @param string $str * @return string with first character as upper case (if applicable) */ function utf8_ucfirst($str){ @@ -381,9 +413,10 @@ if(!function_exists('utf8_ucwords')){ * Uppercase the first character of each word in a string * * @author Harry Fuecks - * @param string - * @return string with first char of each word uppercase * @see http://www.php.net/ucwords + * + * @param string $str + * @return string with first char of each word uppercase */ function utf8_ucwords($str) { // Note: [\x0c\x09\x0b\x0a\x0d\x20] matches; @@ -399,10 +432,11 @@ if(!function_exists('utf8_ucwords')){ * You don't need to call this yourself * * @author Harry Fuecks - * @param array $matches matches corresponding to a single word - * @return string with first char of the word in uppercase * @see utf8_ucwords * @see utf8_strtoupper + * + * @param array $matches matches corresponding to a single word + * @return string with first char of the word in uppercase */ function utf8_ucwords_callback($matches) { $leadingws = $matches[2]; @@ -420,6 +454,10 @@ if(!function_exists('utf8_deaccent')){ * letters. Default is to deaccent both cases ($case = 0) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $string + * @param int $case + * @return string */ function utf8_deaccent($string,$case=0){ if($case <= 0){ @@ -439,6 +477,9 @@ if(!function_exists('utf8_romanize')){ * Romanize a non-latin string * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $string + * @return string */ function utf8_romanize($string){ if(utf8_isASCII($string)) return $string; //nothing to do @@ -456,6 +497,7 @@ if(!function_exists('utf8_stripspecials')){ * stripped chars (they are not included in $UTF8_SPECIAL_CHARS) * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $string The UTF8 string to strip of special chars * @param string $repl Replace special with this string * @param string $additional Additional chars to strip (used in regexp char class) @@ -480,9 +522,10 @@ if(!function_exists('utf8_strpos')){ * * @author Leo Feyer <leo@typolight.org> * @see strpos() - * @param string - * @param string - * @param integer + * + * @param string $haystack + * @param string $needle + * @param integer $offset * @return integer */ function utf8_strpos($haystack, $needle, $offset=0){ @@ -512,6 +555,9 @@ if(!function_exists('utf8_tohtml')){ * @author Tom N Harris <tnharris@whoopdedo.org> * @author <vpribish at shopping dot com> * @link http://www.php.net/manual/en/function.utf8-decode.php + * + * @param string $str + * @return string */ function utf8_tohtml ($str) { $ret = ''; @@ -542,6 +588,7 @@ if(!function_exists('utf8_unhtml')){ * what it should be -> "&&#38;" * * @author Tom N Harris <tnharris@whoopdedo.org> + * * @param string $str UTF-8 encoded string * @param boolean $entities Flag controlling decoding of named entities. * @return string UTF-8 encoded string with numeric (and named) entities replaced. @@ -564,7 +611,7 @@ if(!function_exists('utf8_decode_numeric')){ * Decodes numeric HTML entities to their correct UTF-8 characters * * @param $ent string A numeric entity - * @return string + * @return string|false */ function utf8_decode_numeric($ent) { switch ($ent[2]) { @@ -597,10 +644,10 @@ if(!class_exists('utf8_entity_decoder')){ } /** - * Wrapper aorund unicode_to_utf8() + * Wrapper around unicode_to_utf8() * - * @param $c string - * @return mixed + * @param string $c + * @return string|false */ function makeutf8($c) { return unicode_to_utf8(array(ord($c))); @@ -609,8 +656,8 @@ if(!class_exists('utf8_entity_decoder')){ /** * Decodes any HTML entity to it's correct UTF-8 char equivalent * - * @param $ent string An entity - * @return string + * @param string $ent An entity + * @return string|false */ function decode($ent) { if ($ent[1] == '#') { @@ -640,12 +687,13 @@ if(!function_exists('utf8_to_unicode')){ * * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> - * @param string $str UTF-8 encoded string - * @param boolean $strict Check for invalid sequences? - * @return mixed array of unicode code points or false if UTF-8 invalid * @see unicode_to_utf8 * @link http://hsivonen.iki.fi/php-utf8/ * @link http://sourceforge.net/projects/phputf8/ + * + * @param string $str UTF-8 encoded string + * @param boolean $strict Check for invalid sequences? + * @return mixed array of unicode code points or false if UTF-8 invalid */ function utf8_to_unicode($str,$strict=false) { $mState = 0; // cached expected number of octets after the current octet @@ -815,7 +863,8 @@ if(!function_exists('unicode_to_utf8')){ * * @param array $arr of unicode code points representing a string * @param boolean $strict Check for invalid sequences? - * @return mixed UTF-8 string or false if array contains invalid code points + * @return string|false UTF-8 string or false if array contains invalid code points + * * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> * @see utf8_to_unicode @@ -896,6 +945,10 @@ if(!function_exists('utf8_to_utf16be')){ * UTF-8 to UTF-16BE conversion. * * Maybe really UCS-2 without mb_string due to utf8_to_unicode limits + * + * @param string $str + * @param bool $bom + * @return string */ function utf8_to_utf16be(&$str, $bom = false) { $out = $bom ? "\xFE\xFF" : ''; @@ -914,6 +967,9 @@ if(!function_exists('utf16be_to_utf8')){ * UTF-8 to UTF-16BE conversion. * * Maybe really UCS-2 without mb_string due to utf8_to_unicode limits + * + * @param string $str + * @return false|string */ function utf16be_to_utf8(&$str) { $uni = unpack('n*',$str); @@ -933,6 +989,7 @@ if(!function_exists('utf8_bad_replace')){ * * @author Harry Fuecks <hfuecks@gmail.com> * @see http://www.w3.org/International/questions/qa-forms-utf-8 + * * @param string $str to search * @param string $replace to replace bad bytes with (defaults to '?') - use ASCII * @return string @@ -967,8 +1024,8 @@ if(!function_exists('utf8_correctIdx')){ /** * adjust a byte index into a utf8 string to a utf8 character boundary * - * @param $str string utf8 character string - * @param $i int byte index into $str + * @param string $str utf8 character string + * @param int $i byte index into $str * @param $next bool direction to search for boundary, * false = up (current character) * true = down (next character) diff --git a/install.php b/install.php index 767dd332f1f770de17840a889ad72fa935541dbc..d031cb3d93a8052ddfdf904ea3e07b7bc2788e35 100644 --- a/install.php +++ b/install.php @@ -58,7 +58,6 @@ $dokuwiki_hash = array( '2013-05-10' => '7b62b75245f57f122d3e0f8ed7989623', '2013-12-08' => '263c76af309fbf083867c18a34ff5214', '2014-05-05' => '263c76af309fbf083867c18a34ff5214', - 'devel' => 'b3ddc3f793eac8c135176e535054c00a', ); @@ -160,6 +159,8 @@ header('Content-Type: text/html; charset=utf-8'); /** * Print the input form + * + * @param array $d submitted entry 'd' of request data */ function print_form($d){ global $lang; @@ -265,6 +266,9 @@ function print_retry() { * Check validity of data * * @author Andreas Gohr + * + * @param array $d + * @return bool ok? */ function check_data(&$d){ static $form_default = array( @@ -334,6 +338,9 @@ function check_data(&$d){ * Writes the data to the config files * * @author Chris Smith <chris@jalakai.co.uk> + * + * @param array $d + * @return bool */ function store_data($d){ global $LC; @@ -438,6 +445,10 @@ EOT; * Write the given content to a file * * @author Chris Smith <chris@jalakai.co.uk> + * + * @param string $filename + * @param string $data + * @return bool */ function fileWrite($filename, $data) { global $error; @@ -460,6 +471,8 @@ function fileWrite($filename, $data) { * unmodified main config file * * @author Chris Smith <chris@jalakai.co.uk> + * + * @return bool */ function check_configs(){ global $error; @@ -498,6 +511,8 @@ function check_configs(){ * Check other installation dir/file permission requirements * * @author Chris Smith <chris@jalakai.co.uk> + * + * @return bool */ function check_permissions(){ global $error; @@ -533,14 +548,16 @@ function check_permissions(){ * Check the availability of functions used in DokuWiki and the PHP version * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return bool */ function check_functions(){ global $error; global $lang; $ok = true; - if(version_compare(phpversion(),'5.2.0','<')){ - $error[] = sprintf($lang['i_phpver'],phpversion(),'5.2.0'); + if(version_compare(phpversion(),'5.3.3','<')){ + $error[] = sprintf($lang['i_phpver'],phpversion(),'5.3.3'); $ok = false; } @@ -626,6 +643,8 @@ function print_errors(){ * remove magic quotes recursivly * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $array */ function remove_magic_quotes(&$array) { foreach (array_keys($array) as $key) { diff --git a/lib/exe/css.php b/lib/exe/css.php index 902996062a94e4856f43b2011f564782eb4aba09..9f828feaa25abb25a0e0678e329755c5ab6e32bb 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -53,7 +53,7 @@ function css_out(){ // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility if (isset($config_cascade['userstyle']['default'])) { - $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default']; + $config_cascade['userstyle']['screen'] = array($config_cascade['userstyle']['default']); } // cache influencers @@ -83,8 +83,10 @@ function css_out(){ $files[$mediatype] = array_merge($files[$mediatype], $styleini['stylesheets'][$mediatype]); } // load user styles - if(isset($config_cascade['userstyle'][$mediatype])){ - $files[$mediatype][$config_cascade['userstyle'][$mediatype]] = DOKU_BASE; + if(!empty($config_cascade['userstyle'][$mediatype])) { + foreach($config_cascade['userstyle'][$mediatype] as $userstyle) { + $files[$mediatype][$userstyle] = DOKU_BASE; + } } $cache_files = array_merge($cache_files, array_keys($files[$mediatype])); @@ -163,12 +165,15 @@ function css_out(){ * most of this function is error handling to show a nice useful error when * LESS compilation fails * - * @param $css + * @param string $css * @return string */ function css_parseless($css) { + global $conf; + $less = new lessc(); $less->importDir[] = DOKU_INC; + $less->setPreserveComments(!$conf['compress']); if (defined('DOKU_UNITTEST')){ $less->importDir[] = TMP_DIR; @@ -223,6 +228,10 @@ function css_parseless($css) { * (sans the surrounding __ and with a ini_ prefix) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $css + * @param array $replacements array(placeholder => value) + * @return string */ function css_applystyle($css, $replacements) { // we convert ini replacements to LESS variable names @@ -251,6 +260,7 @@ function css_applystyle($css, $replacements) { * the stylesheet modes * * @author Andreas Gohr <andi@splitbrain.org> + * * @param string $tpl the used template * @return array with keys 'stylesheets' and 'replacements' */ @@ -321,6 +331,10 @@ function css_styleini($tpl) { * Amend paths used in replacement relative urls, refer FS#2879 * * @author Chris Smith <chris@jalakai.co.uk> + * + * @param array $replacements with key-value pairs + * @param string $location + * @return array */ function css_fixreplacementurls($replacements, $location) { foreach($replacements as $key => $value) { @@ -404,6 +418,10 @@ function css_filetypes(){ /** * Loads a given file and fixes relative URLs with the * given location prefix + * + * @param string $file file system path + * @param string $location + * @return string */ function css_loadfile($file,$location=''){ $css_file = new DokuCssFile($file); @@ -419,7 +437,7 @@ class DokuCssFile { protected $filepath; // file system path to the CSS/Less file protected $location; // base url location of the CSS/Less file - private $relative_path = null; + protected $relative_path = null; public function __construct($file) { $this->filepath = $file; @@ -452,7 +470,7 @@ class DokuCssFile { * * @return string relative file system path */ - private function getRelativePath(){ + protected function getRelativePath(){ if (is_null($this->relative_path)) { $basedir = array(DOKU_INC); @@ -502,6 +520,9 @@ class DokuCssFile { * Convert local image URLs to data URLs if the filesize is small * * Callback for preg_replace_callback + * + * @param array $match + * @return string */ function css_datauri($match){ global $conf; @@ -529,9 +550,11 @@ function css_datauri($match){ * Returns a list of possible Plugin Styles (no existance check here) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $mediatype + * @return array */ function css_pluginstyles($mediatype='screen'){ - global $lang; $list = array(); $plugins = plugin_list(); foreach ($plugins as $p){ @@ -550,6 +573,9 @@ function css_pluginstyles($mediatype='screen'){ * Very simple CSS optimizer * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $css + * @return string */ function css_compress($css){ //strip comments through a callback @@ -586,6 +612,9 @@ function css_compress($css){ * Keeps short comments (< 5 chars) to maintain typical browser hacks * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param array $matches + * @return string */ function css_comment_cb($matches){ if(strlen($matches[2]) > 4) return ''; @@ -597,7 +626,7 @@ function css_comment_cb($matches){ * * Strips one line comments but makes sure it will not destroy url() constructs with slashes * - * @param $matches + * @param array $matches * @return string */ function css_onelinecomment_cb($matches) { diff --git a/lib/exe/detail.php b/lib/exe/detail.php index cd3f362ad69b460016ce9e1e055e3db2da0a503e..cc29d5b87914c4fb6f33e45d0fddb909bbc565be 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -5,6 +5,7 @@ require_once(DOKU_INC.'inc/init.php'); $IMG = getID('media'); $ID = cleanID($INPUT->str('id')); +$REV = $INPUT->int('rev'); // this makes some general info available as well as the info about the // "parent" page @@ -35,7 +36,7 @@ $ERROR = false; $AUTH = auth_quickaclcheck($IMG); if($AUTH >= AUTH_READ){ // check if image exists - $SRC = mediaFN($IMG); + $SRC = mediaFN($IMG,$REV); if(!@file_exists($SRC)){ //doesn't exist! http_status(404); diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 3ab117736aea13fda2b976f5a49ba917622ac514..89c4b7cd0cdc0dfa118dba2aa056e384715ac822 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -51,8 +51,9 @@ exit; /** * Trims the recent changes cache (or imports the old changelog) as needed. * - * @param media_changes If the media changelog shall be trimmed instead of - * the page changelog + * @param bool $media_changes If the media changelog shall be trimmed instead of + * the page changelog + * @return bool * * @author Ben Coburn <btcoburn@silicodon.net> */ @@ -83,7 +84,7 @@ function runTrimRecentChanges($media_changes = false) { io_saveFile($fn.'_tmp', ''); // presave tmp as 2nd lock $trim_time = time() - $conf['recent_days']*86400; $out_lines = array(); - + $old_lines = array(); for ($i=0; $i<count($lines); $i++) { $log = parseChangelogLine($lines[$i]); if ($log === false) continue; // discard junk diff --git a/lib/exe/js.php b/lib/exe/js.php index bec12ef7a4244d91200f708569c5c2b3ad125aba..793104e8132340004b8862b8f4cc5797dfd15c70 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -72,8 +72,10 @@ function js_out(){ // add possible plugin scripts and userscript $files = array_merge($files,js_pluginscripts()); - if(isset($config_cascade['userscript']['default'])){ - $files[] = $config_cascade['userscript']['default']; + if(!empty($config_cascade['userscript']['default'])) { + foreach($config_cascade['userscript']['default'] as $userscript) { + $files[] = $userscript; + } } $cache_files = array_merge($files, getConfigFiles('main')); @@ -154,6 +156,8 @@ function js_out(){ * Load the given file, handle include calls and print it * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $file filename path to file */ function js_load($file){ if(!@file_exists($file)) return; @@ -189,6 +193,8 @@ function js_load($file){ * Returns a list of possible Plugin Scripts (no existance check here) * * @author Andreas Gohr <andi@splitbrain.org> + * + * @return array */ function js_pluginscripts(){ $list = array(); @@ -206,6 +212,8 @@ function js_pluginscripts(){ * - Nothing is returned for plugins without an entry for $lang['js'] * * @author Gabriel Birke <birke@d-scribe.de> + * + * @return array */ function js_pluginstrings() { global $conf; @@ -231,6 +239,8 @@ function js_pluginstrings() { * * - $lang['js'] must be an array. * - Nothing is returned for template without an entry for $lang['js'] + * + * @return array */ function js_templatestrings() { global $conf; @@ -252,6 +262,9 @@ function js_templatestrings() { * as newline * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $string + * @return string */ function js_escape($string){ return str_replace('\\\\n','\\n',addslashes($string)); @@ -261,6 +274,8 @@ function js_escape($string){ * Adds the given JavaScript code to the window.onload() event * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $func */ function js_runonstart($func){ echo "jQuery(function(){ $func; });".NL; @@ -275,6 +290,9 @@ function js_runonstart($func){ * @author Nick Galbreath <nickg@modp.com> * @author Andreas Gohr <andi@splitbrain.org> * @link http://code.google.com/p/jsstrip/ + * + * @param string $s + * @return string */ function js_compress($s){ $s = ltrim($s); // strip all initial whitespace @@ -289,7 +307,11 @@ function js_compress($s){ // items that don't need spaces next to them $chars = "^&|!+\-*\/%=\?:;,{}()<>% \t\n\r'\"[]"; - $regex_starters = array("(", "=", "[", "," , ":", "!"); + // items which need a space if the sign before and after whitespace is equal. + // E.g. '+ ++' may not be compressed to '+++' --> syntax error. + $ops = "+-"; + + $regex_starters = array("(", "=", "[", "," , ":", "!", "&", "|"); $whitespaces_chars = array(" ", "\t", "\n", "\r", "\0", "\x0B"); @@ -389,19 +411,27 @@ function js_compress($s){ // whitespaces if( $ch == ' ' || $ch == "\r" || $ch == "\n" || $ch == "\t" ){ - // leading spaces - if($i+1 < $slen && (strpos($chars,$s[$i+1]) !== false)){ - $i = $i + 1; - continue; - } - // trailing spaces - // if this ch is space AND the last char processed - // is special, then skip the space $lch = substr($result,-1); - if($lch && (strpos($chars,$lch) !== false)){ - $i = $i + 1; - continue; + + // Only consider deleting whitespace if the signs before and after + // are not equal and are not an operator which may not follow itself. + if ((!$lch || $s[$i+1] == ' ') + || $lch != $s[$i+1] + || strpos($ops,$s[$i+1]) === false) { + // leading spaces + if($i+1 < $slen && (strpos($chars,$s[$i+1]) !== false)){ + $i = $i + 1; + continue; + } + // trailing spaces + // if this ch is space AND the last char processed + // is special, then skip the space + if($lch && (strpos($chars,$lch) !== false)){ + $i = $i + 1; + continue; + } } + // else after all of this convert the "whitespace" to // a single space. It will get appended below $ch = ' '; diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index c09daa17c00d76c8e65a4f5c515e30167f48934d..61a68281f417f0be8547e559ba7d195c145a7b9e 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -23,6 +23,11 @@ class dokuwiki_xmlrpc_server extends IXR_Server { $this->IXR_Server(); } + /** + * @param string $methodname + * @param array $args + * @return IXR_Error|mixed + */ function call($methodname, $args){ try { $result = $this->remote->call($methodname, $args); @@ -40,10 +45,18 @@ class dokuwiki_xmlrpc_server extends IXR_Server { } } + /** + * @param string|int $data iso date(yyyy[-]mm[-]dd[ hh:mm[:ss]]) or timestamp + * @return IXR_Date + */ function toDate($data) { return new IXR_Date($data); } + /** + * @param string $data + * @return IXR_Base64 + */ function toFile($data) { return new IXR_Base64($data); } diff --git a/lib/images/smileys/index.php b/lib/images/smileys/index.php index 9a2905b33662cd884417d13356e2e31a630e677c..4167eda5b8055fece249a383dd5b69dad15cf533 100644 --- a/lib/images/smileys/index.php +++ b/lib/images/smileys/index.php @@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en" dir="ltr"> <head> - <title>simleys</title> + <title>smileys</title> <style type="text/css"> body { diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index ebb097a04bfab717f20dabc396dada1b2ea6f438..814bbfe9c44ff27524cad7b2e6c87c43c5d1b63f 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -762,6 +762,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { */ function _html_select(){ $inlist = false; + $usel = ''; + $gsel = ''; if($this->who && !in_array($this->who,$this->usersgroups) && @@ -770,11 +772,9 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if($this->who{0} == '@'){ $gsel = ' selected="selected"'; }else{ - $usel = ' selected="selected"'; + $usel = ' selected="selected"'; } }else{ - $usel = ''; - $gsel = ''; $inlist = true; } diff --git a/lib/plugins/acl/lang/cs/help.txt b/lib/plugins/acl/lang/cs/help.txt index 1dbc88ad0dcc2a5a9c9a5fc35fb243d134482c56..1b6fa1eacafc8b9c03631ddf5ba443e5ff174fda 100644 --- a/lib/plugins/acl/lang/cs/help.txt +++ b/lib/plugins/acl/lang/cs/help.txt @@ -1,11 +1,8 @@ === NápovÄ›da: === -Na této stránce můžete pÅ™idávat a odebÃrat oprávnÄ›nà na jmenné prostory a stránky VaÅ¡Ã wiki. +Na této stránce můžete pÅ™idávat a odebÃrat oprávnÄ›nà pro jmenné prostory a stránky svojà wiki. +* Levý panel zobrazuje vÅ¡echny dostupné jmenné prostory a stránky. +* Formulář výše umožňuje vidÄ›t a modifikovat oprávnÄ›nà vybraného uživatele nebo skupiny. +* V tabulce uvedené nÞe jsou zobrazeny vÅ¡echna aktuálnà pravidla pro Å™Ãzenà pÅ™Ãstupu (oprávnÄ›nÃ). Zde můžete rychle odebÃrat a mÄ›nit vÃce položek (oprávnÄ›nÃ) najednou. -Levý panel zobrazuje vÅ¡echny dostupné jmenné prostory a stránky. - -Formulář výše umožňuje vidÄ›t a modifikovat oprávnÄ›nà vybraného uživatele nebo skupiny. - -V tabulce uvedené nÞe jsou zobrazeny vÅ¡echny aktuálnà pravidla pro Å™Ãzenà pÅ™Ãstupu (oprávnÄ›nÃ). Zde můžete rychle odebÃrat a mÄ›nit vÃce položek (oprávnÄ›nÃ) najednou. - -Pro detailnÄ›jÅ¡Ã nápovÄ›du si pÅ™eÄtÄ›te stránku [[doku>acl|oficiálnà dokumentaci ACL]], která Vám může pomoci plnÄ› pochopit princip, jak Å™Ãzenà pÅ™Ãstupu na DokuWiki funguje. +Pro detailnÄ›jÅ¡Ã nápovÄ›du si pÅ™eÄtÄ›te stránku [[doku>acl|oficiálnà dokumentace ACL]], která Vám může pomoci plnÄ› pochopit princip, na kterém Å™Ãzenà pÅ™Ãstupu na DokuWiki funguje. diff --git a/lib/plugins/acl/lang/eu/lang.php b/lib/plugins/acl/lang/eu/lang.php index f051523d956b5048d45cbfd10836bac54b2e2e2a..bb6ab964af3752ca6a95e44f220dda8dd4749ac4 100644 --- a/lib/plugins/acl/lang/eu/lang.php +++ b/lib/plugins/acl/lang/eu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Basque language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Inko Illarramendi <inko.i.a@gmail.com> * @author Zigor Astarbe <astarbe@gmail.com> */ diff --git a/lib/plugins/acl/lang/fr/help.txt b/lib/plugins/acl/lang/fr/help.txt index 0819784881707909d4bc375fee8127f4eccea4c0..9fc2af66541c56e7b07c30bf786463dd1815e1e8 100644 --- a/lib/plugins/acl/lang/fr/help.txt +++ b/lib/plugins/acl/lang/fr/help.txt @@ -6,6 +6,6 @@ Le panneau de gauche liste toutes les catégories et les pages disponibles. Le formulaire ci-dessus permet d'afficher et de modifier les autorisations d'un utilisateur ou d'un groupe sélectionné. -Dans le tableau ci-dessous, toutes les listes de contrôle d'accès (ACL) actuelles sont affichées. Vous pouvez l'utiliser pour supprimer ou modifier rapidement plusieurs contrôles d'accès. +Le tableau ci-dessous présente toutes les listes de contrôle d'accès (ACL) actuelles. Vous pouvez l'utiliser pour supprimer ou modifier rapidement plusieurs contrôles d'accès. La lecture de [[doku>fr:acl|la documentation officielle des contrôles d'accès]] pourra vous permettre de mieux comprendre le fonctionnement du contrôle d'accès dans DokuWiki. diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 6d5201cf61a6b3933bc642ff46fb3a68375db39f..b10c544eeb05bf5007952bbd8e5c257ce06e98d5 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -1,7 +1,16 @@ <?php +/** + * Class remote_plugin_acl + */ class remote_plugin_acl extends DokuWiki_Remote_Plugin { - function _getMethods() { + + /** + * Returns details about the remote plugin methods + * + * @return array + */ + public function _getMethods() { return array( 'addAcl' => array( 'args' => array('string','string','int'), @@ -17,12 +26,29 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { ); } - function addAcl($scope, $user, $level){ + /** + * Add a new entry to ACL config + * + * @param string $scope + * @param string $user + * @param int $level see also inc/auth.php + * @return bool + */ + public function addAcl($scope, $user, $level){ + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_add($scope, $user, $level); } - function delAcl($scope, $user){ + /** + * Remove an entry from ACL config + * + * @param string $scope + * @param string $user + * @return bool + */ + public function delAcl($scope, $user){ + /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); return $apa->_acl_del($scope, $user); } diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 9a1fb9fdc351f3ccbcf958c122d2a6789a25a3be..39dece4536bb113bd02fa79f9f623e21b858ba16 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -14,7 +14,14 @@ if(!defined('DOKU_INC')) die(); */ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { - function getMenuText($language) { + /** + * Return the text that is displayed at the main admin menu + * (Default localized language string 'menu' is returned, override this function for setting another name) + * + * @param string $language language code + * @return string menu string + */ + public function getMenuText($language) { $menutext = $this->getLang('menu'); if (!$menutext) { $info = $this->getInfo(); @@ -23,23 +30,48 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { return $menutext; } - function getMenuSort() { + /** + * Determine position in list in admin window + * Lower values are sorted up + * + * @return int + */ + public function getMenuSort() { return 1000; } - function handle() { + /** + * Carry out required processing + */ + public function handle() { trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); } - function html() { + /** + * Output html of the admin page + */ + public function html() { trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING); } - function forAdminOnly() { + /** + * Return true for access only by admins (config:superuser) or false if managers are allowed as well + * + * @return bool + */ + public function forAdminOnly() { return true; } - function getTOC(){ + /** + * Return array with ToC items. Items can be created with the html_mktocitem() + * + * @see html_mktocitem() + * @see tpl_toc() + * + * @return array + */ + public function getTOC(){ return array(); } } diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b0473563914601a864251414f0de2a7ef90f2ceb..4799b3a38dad26a3d3a9a7b4cdc36b1b3ea9df0d 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -116,7 +116,7 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * @author Gabriel Birke <birke@d-scribe.de> * @param string $type Modification type ('create', 'modify', 'delete') * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type - * @return mixed Result from the modification function or false if an event handler has canceled the action + * @return bool|null|int Result from the modification function or false if an event handler has canceled the action */ public function triggerUserMod($type, $params) { $validTypes = array( @@ -124,12 +124,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { 'modify' => 'modifyUser', 'delete' => 'deleteUsers' ); - if(empty($validTypes[$type])) + if(empty($validTypes[$type])) { return false; + } + + $result = false; $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null); $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata); if($evt->advise_before(true)) { - $result = call_user_func_array(array($this, $validTypes[$type]), $params); + $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']); $evt->data['modification_result'] = $result; } $evt->advise_after(); @@ -229,14 +232,15 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * at least these fields: * * name string full name of the user - * mail string email addres of the user + * mail string email address of the user * grps array list of groups the user is in * * @author Andreas Gohr <andi@splitbrain.org> * @param string $user the user name - * @return array containing user data or false + * @param bool $requireGroups whether or not the returned data must include groups + * @return false|array containing user data or false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } diff --git a/lib/plugins/authad/adLDAP/adLDAP.php b/lib/plugins/authad/adLDAP/adLDAP.php index c1f92abe289524e6bb63f2a6ab656d90d0c5f87f..5563e4fe9c38c0953f04dd681aa27d16efac0a1f 100644 --- a/lib/plugins/authad/adLDAP/adLDAP.php +++ b/lib/plugins/authad/adLDAP/adLDAP.php @@ -947,5 +947,3 @@ class adLDAP { * } */ class adLDAPException extends Exception {} - -?> \ No newline at end of file diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 0860e5756af7a39a588027e79979afa3dcbb63ff..88b56046cf3fedd6264cf7bd9be757302f9cc842 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -177,9 +177,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @author James Van Lommel <james@nosq.com> * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin * @return array */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { global $conf; global $lang; global $ID; @@ -202,6 +203,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } //general user info + $info = array(); $info['name'] = $result[0]['displayname'][0]; $info['mail'] = $result[0]['mail'][0]; $info['uid'] = $result[0]['samaccountname'][0]; @@ -327,6 +329,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Bulk retrieval of user data * * @author Dominik Eckelmann <dokuwiki@cosmocode.de> + * * @param int $start index of first user to be returned * @param int $limit max number of users to be returned * @param array $filter array of field/pattern pairs, null for no filter @@ -445,7 +448,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the domain part from a user * - * @param $user + * @param string $user * @return string */ public function _userDomain($user) { @@ -456,7 +459,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the user part from a user * - * @param $user + * @param string $user * @return string */ public function _userName($user) { @@ -542,6 +545,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * The patterns are set up with $this->_constructPattern() * * @author Chris Smith <chris@jalakai.co.uk> + * * @param string $user * @param array $info * @return bool @@ -563,6 +567,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Create a pattern for $this->_filter() * * @author Chris Smith <chris@jalakai.co.uk> + * * @param array $filter */ protected function _constructPattern($filter) { diff --git a/lib/plugins/authad/lang/ar/lang.php b/lib/plugins/authad/lang/ar/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..e0ba7681ac80a98dfdf09873f86e3821a9d28ac8 --- /dev/null +++ b/lib/plugins/authad/lang/ar/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Mohamed Belhsine <b.mohamed897@gmail.com> + */ +$lang['domain'] = 'مجال تسجيل الدخول'; diff --git a/lib/plugins/authad/lang/cs/lang.php b/lib/plugins/authad/lang/cs/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..8119d208aeabb31bde53e05208449ff741ed5376 --- /dev/null +++ b/lib/plugins/authad/lang/cs/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> + */ +$lang['domain'] = 'PÅ™ihlaÅ¡ovacà doména'; diff --git a/lib/plugins/authad/lang/fa/settings.php b/lib/plugins/authad/lang/fa/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..161479afbe4ed6d5dc97ced8d35a97ca6a789736 --- /dev/null +++ b/lib/plugins/authad/lang/fa/settings.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Omid Hezaveh <hezpublic@gmail.com> + */ +$lang['admin_password'] = 'رمز کاربر بالایی '; +$lang['use_ssl'] = 'از اس‌اس‌ال استÙاده می‌کنید؟ در این صورت تی‌ال‌اس را در پایین Ùعال نکنید. '; +$lang['use_tls'] = 'از تی‌ال‌اس استÙاده می‌کنید؟ در این صورت اس‌اس‌ال را در بالا Ùعال نکنید. '; diff --git a/lib/plugins/authad/lang/no/lang.php b/lib/plugins/authad/lang/no/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..a1c9c7e8a59a1799e222ea04815b74a01cc7a2f1 --- /dev/null +++ b/lib/plugins/authad/lang/no/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Patrick <spill.p@hotmail.com> + */ +$lang['domain'] = 'LoggpÃ¥-domene'; diff --git a/lib/plugins/authad/lang/no/settings.php b/lib/plugins/authad/lang/no/settings.php index bab5ce67dadcde38d4f555666ef4cb7d2bb78e65..f309ead50abb599da84b8804aca31e433dc1b1e8 100644 --- a/lib/plugins/authad/lang/no/settings.php +++ b/lib/plugins/authad/lang/no/settings.php @@ -4,6 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Christopher Schive <chschive@frisurf.no> + * @author Patrick <spill.p@hotmail.com> */ +$lang['account_suffix'] = 'Ditt konto-suffiks F. Eks. <code>@my.domain.org</code>'; $lang['admin_password'] = 'Passordet til brukeren over.'; $lang['expirywarn'] = 'Antall dager pÃ¥ forhÃ¥nd brukeren varsles om at passordet utgÃ¥r. 0 for Ã¥ deaktivere.'; diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index c9c6d9f886a556b77d44b6275c403abc66fd047e..99c916b44cb5bf93acbb33e1c5479a80a34b89e4 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -8,11 +8,20 @@ * @author Artur <ncuxxx@gmail.com> * @author Erli Moen <evseev.jr@gmail.com> * @author Владимир <id37736@yandex.ru> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Type-kun <workwork-1@yandex.ru> + * @author Vitaly Filatenko <kot@hacktest.net> */ -$lang['account_suffix'] = 'Ð¡ÑƒÑ„Ñ„Ð¸ÐºÑ Ð²Ð°ÑˆÐµÐ³Ð¾ аккаунта типа <code>@my.domain.org</code>'; +$lang['account_suffix'] = 'Ð¡ÑƒÑ„Ñ„Ð¸ÐºÑ Ð²Ð°ÑˆÐµÐ³Ð¾ аккаунта. Ðапример, <code>@my.domain.org</code>'; +$lang['base_dn'] = 'Ваш базовый DN. Ðапример: <code>DC=my,DC=domain,DC=org</code>'; $lang['domain_controllers'] = 'СпиÑок DNS-Ñерверов, разделенных запÑтой. Ðапример:<code>srv1.domain.org,srv2.domain.org</code>'; +$lang['admin_username'] = 'Привилегированный пользователь Active Directory Ñ Ð´Ð¾Ñтупом ко вÑем оÑтальным пользовательÑким данным. ÐеобÑзательно, однако необходимо Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ñ‹Ñ… дейÑтвий вроде отправки почтовой подпиÑки.'; $lang['admin_password'] = 'Пароль Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð³Ð¾ пользователÑ.'; $lang['sso'] = 'ИÑпользовать SSO (Single-Sign-On) через Kerberos или NTLM?'; +$lang['sso_charset'] = 'Кодировка, в которой веб-Ñервер передаёт Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Kerberos или NTLM. Ð”Ð»Ñ UTF-8 или latin-1 оÑтаётÑÑ Ð¿ÑƒÑтым. Требует раÑширение iconv.'; +$lang['real_primarygroup'] = 'Должна ли иÑпользоватьÑÑ Ð½Ð°ÑтоÑÑ‰Ð°Ñ Ð¿ÐµÑ€Ð²Ð¸Ñ‡Ð½Ð°Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð° вмеÑто "Domain Users" (медленнее)'; $lang['use_ssl'] = 'ИÑпользовать SSL? ЕÑли да, то не включайте TLS.'; $lang['use_tls'] = 'ИÑпользовать TLS? ЕÑли да, то не включайте SSL.'; $lang['debug'] = 'Выводить дополнительную информацию при ошибках?'; +$lang['expirywarn'] = 'За Ñколько дней нужно предупреждать Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¾ необходимоÑти изменить пароль. 0 - отключить.'; +$lang['additional'] = 'Дополнительные AD атрибуты, разделённые запÑтой, Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€ÐºÐ¸ из данных пользователÑ. ИÑпользуетÑÑ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ð¼Ð¸ плагинами.'; diff --git a/lib/plugins/authad/lang/zh-tw/lang.php b/lib/plugins/authad/lang/zh-tw/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..6ad0947a233e80db7e07e86c1e0eeb0380ca8747 --- /dev/null +++ b/lib/plugins/authad/lang/zh-tw/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author June-Hao Hou <junehao@gmail.com> + */ +$lang['domain'] = '登入網域'; diff --git a/lib/plugins/authad/lang/zh-tw/settings.php b/lib/plugins/authad/lang/zh-tw/settings.php index bd5d9413a834b4e1d30b5df04119fc3d3d47dd9e..42cd8c96b6a1dfa1d8deb547d1b33a6605f05f8a 100644 --- a/lib/plugins/authad/lang/zh-tw/settings.php +++ b/lib/plugins/authad/lang/zh-tw/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author syaoranhinata@gmail.com + * @author June-Hao Hou <junehao@gmail.com> */ $lang['account_suffix'] = '您的帳號後綴。如: <code>@my.domain.org</code>'; $lang['base_dn'] = '您的基本è˜åˆ¥å。如: <code>DC=my,DC=domain,DC=org</code>'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = '以逗號分隔的域å控制器列表。如 $lang['admin_username'] = 'Active Directory 的特權使用者,å¯ä»¥æŸ¥çœ‹æ‰€æœ‰ä½¿ç”¨è€…的數據。(éžå¿…è¦ï¼Œä½†å°ç™¼é€è¨‚閱郵件ç‰æ´»å‹•ä¾†èªªï¼Œé€™æ˜¯å¿…é ˆçš„ã€‚)'; $lang['admin_password'] = '上述使用者的密碼。'; $lang['sso'] = '是å¦ä½¿ç”¨ Kerberos 或 NTLM 的單一登入系統 (Single-Sign-On)?'; +$lang['sso_charset'] = 'ä½ çš„ç¶²ç«™ä¼ºæœå™¨å‚³éž Kerberos 或 NTML 帳號å稱所用的語系編碼。空白表示 UTF-8 或 latin-1。æ¤è¨å®šéœ€è¦ç”¨åˆ° iconv 套件。'; $lang['real_primarygroup'] = '是å¦è¦–作真æ£çš„主è¦ç¾¤çµ„,而ä¸æ˜¯å‡è¨ç‚ºç¶²åŸŸä½¿ç”¨è€… (比較慢)'; $lang['use_ssl'] = '使用 SSL 連接嗎?如果è¦ä½¿ç”¨ï¼Œè«‹ä¸è¦å•Ÿç”¨ä¸‹æ–¹çš„ TLS。'; $lang['use_tls'] = '使用 TLS 連接嗎?如果è¦ä½¿ç”¨ï¼Œè«‹ä¸è¦å•Ÿç”¨ä¸Šæ–¹çš„ SSL。'; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 0d5e130ea9cbe167b785d65e7b1aa705a0c07570..fd4729331719d8b63a80efcb132a7844479edabe 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -103,7 +103,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { return true; } else { // See if we can find the user - $info = $this->getUserData($user, true); + $info = $this->_getUserData($user, true); if(empty($info['dn'])) { return false; } else { @@ -145,11 +145,20 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Stephane Chazelas <stephane.chazelas@emerson.com> * @author Steffen Schoch <schoch@dsb.net> * + * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin + * @return array containing user data or false + */ + public function getUserData($user, $requireGroups=true) { + return $this->_getUserData($user); + } + + /** * @param string $user * @param bool $inbind authldap specific, true if in bind phase * @return array containing user data or false */ - public function getUserData($user, $inbind = false) { + protected function _getUserData($user, $inbind = false) { global $conf; if(!$this->_openLDAP()) return false; @@ -172,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } } + $info = array(); $info['user'] = $user; $info['server'] = $this->getConf('server'); @@ -555,15 +565,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Wraps around ldap_search, ldap_list or ldap_read depending on $scope * * @author Andreas Gohr <andi@splitbrain.org> - * @param resource $link_identifier - * @param string $base_dn - * @param string $filter - * @param string $scope can be 'base', 'one' or 'sub' - * @param null $attributes - * @param int $attrsonly - * @param int $sizelimit - * @param int $timelimit - * @param int $deref + * @param resource $link_identifier + * @param string $base_dn + * @param string $filter + * @param string $scope can be 'base', 'one' or 'sub' + * @param null|array $attributes + * @param int $attrsonly + * @param int $sizelimit * @return resource */ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..49d485afdd6346014cf493d951f50210a9fadce2 --- /dev/null +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Mohammad Sadegh <msdn2013@gmail.com> + * @author Omid Hezaveh <hezpublic@gmail.com> + */ +$lang['starttls'] = 'از تی‌ال‌اس (TLS) استÙاده می‌کنید؟'; +$lang['bindpw'] = 'رمزعبور کاربر بالا'; diff --git a/lib/plugins/authldap/lang/hr/settings.php b/lib/plugins/authldap/lang/hr/settings.php index 44caeacc851db85452f236550abb9fbf20e67cf3..cb8df7218cc9bf64ccf4019d6c157eaac88a508c 100644 --- a/lib/plugins/authldap/lang/hr/settings.php +++ b/lib/plugins/authldap/lang/hr/settings.php @@ -21,3 +21,7 @@ $lang['userscope'] = 'OgraniÄi podruÄje za pretragu korisnika'; $lang['groupscope'] = 'OgraniÄi podruÄje za pretragu grupa'; $lang['groupkey'] = 'ÄŒlanstvo grupa iz svih atributa korisnika (umjesto standardnih AD grupa) npr. grupa iz odjela ili telefonskog broja'; $lang['debug'] = 'Prikaži dodatne informacije u sluÄaju greÅ¡ke'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php index 6bedb29912d5fe8fbb29c643e7b548ff7aba244b..61671ed4645fc939543ad6330fc9e992298c13fb 100644 --- a/lib/plugins/authldap/lang/no/settings.php +++ b/lib/plugins/authldap/lang/no/settings.php @@ -4,6 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Christopher Schive <chschive@frisurf.no> + * @author Patrick <spill.p@hotmail.com> */ $lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.'; $lang['starttls'] = 'Bruke TLS-forbindelser?'; +$lang['bindpw'] = 'Passord til brukeren over'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 5677e06a31c0b5cfdf795f34c4245ab6204be296..53499064891a10049e95d7916b0687389de04241 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -8,10 +8,20 @@ * @author Erli Moen <evseev.jr@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Владимир <id37736@yandex.ru> + * @author Vitaly Filatenko <kot@hacktest.net> */ +$lang['server'] = 'Ваш LDAP Ñервер. Либо Ð¸Ð¼Ñ Ñ…Ð¾Ñта (<code>localhost</code>), либо полный URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'Порт LDAP Ñервера, еÑли выше не был указан полный URL'; +$lang['usertree'] = 'Где иÑкать аккаунты пользователей. Ðапример: <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Где иÑкать группы пользователей. Ðапример: <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'LDAP фильтр Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка аккаунтов пользователей. Ðапример: <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP фильтр Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка групп. Ðапример: <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'ВерÑÐ¸Ñ Ð¿Ñ€Ð¾Ñ‚Ð¾ÐºÐ¾Ð»Ð°. Возможно вам нужно указать <code>3</code>'; $lang['starttls'] = 'ИÑпользовать TLS подключениÑ?'; $lang['deref'] = 'Как раÑшифровывать пÑевдонимы?'; $lang['bindpw'] = 'Пароль Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð³Ð¾ пользователÑ.'; +$lang['userscope'] = 'Ограничить облаÑÑ‚ÑŒ поиÑка при поиÑке пользователей'; +$lang['groupscope'] = 'Ограничить облаÑÑ‚ÑŒ поиÑка при поиÑке групп'; $lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 1e6e6a4a97eb49ee1451627d6f8d0345e700ef39..0d423b6c9bf053a830fd508dba19cd0c392246f9 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -21,6 +21,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { /** @var int database subrevision */ protected $dbsub = 0; + /** @var array cache to avoid re-reading user info data */ + protected $cacheUserInfo = array(); + /** * Constructor * @@ -112,7 +115,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * Check if the given config strings are set * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * @param array $keys + * + * @param string[] $keys * @param bool $wop is this a check for a write operation? * @return bool */ @@ -157,10 +161,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if($result !== false && count($result) == 1) { - if($this->getConf('forwardClearPass') == 1) + if($this->getConf('forwardClearPass') == 1) { $rc = true; - else + } else { $rc = auth_verifyPassword($pass, $result[0]['pass']); + } } $this->_closeDB(); } @@ -174,16 +179,23 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * * @param string $user user login to get data for + * @param bool $requireGroups when true, group membership information should be included in the returned array; + * when false, it maybe included, but is not required by the caller * @return array|bool */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { + if($this->_cacheExists($user, $requireGroups)) { + return $this->cacheUserInfo[$user]; + } + if($this->_openDB()) { $this->_lockTables("READ"); - $info = $this->_getUserInfo($user); + $info = $this->_getUserInfo($user, $requireGroups); $this->_unlockTables(); $this->_closeDB(); - } else + } else { $info = false; + } return $info; } @@ -209,12 +221,14 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { global $conf; if($this->_openDB()) { - if(($info = $this->_getUserInfo($user)) !== false) + if(($info = $this->_getUserInfo($user)) !== false) { return false; // user already exists + } // set defaultgroup if no groups were given - if($grps == null) + if($grps == null) { $grps = array($conf['defaultgroup']); + } $this->_lockTables("WRITE"); $pwd = $this->getConf('forwardClearPass') ? $pwd : auth_cryptPassword($pwd); @@ -234,17 +248,17 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * The dataset update will be rejected if the user name should be changed * to an already existing one. * - * The password must be provides unencrypted. Pasword cryption is done + * The password must be provided unencrypted. Pasword encryption is done * automatically if configured. * - * If one or more groups could't be updated, an error would be set. In + * If one or more groups can't be updated, an error will be set. In * this case the dataset might already be changed and we can't rollback - * the changes. Transactions would be really usefull here. + * the changes. Transactions would be really useful here. * * modifyUser() may be called without SQL statements defined that are * needed to change group membership (for example if only the user profile - * should be modified). In this case we asure that we don't touch groups - * even $changes['grps'] is set by mistake. + * should be modified). In this case we assure that we don't touch groups + * even when $changes['grps'] is set by mistake. * * @author Chris Smith <chris@jalakai.co.uk> * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> @@ -256,27 +270,30 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { public function modifyUser($user, $changes) { $rc = false; - if(!is_array($changes) || !count($changes)) + if(!is_array($changes) || !count($changes)) { return true; // nothing to change + } if($this->_openDB()) { $this->_lockTables("WRITE"); - if(($uid = $this->_getUserID($user))) { - $rc = $this->_updateUserInfo($changes, $uid); + $rc = $this->_updateUserInfo($user, $changes); - if($rc && isset($changes['grps']) && $this->cando['modGroups']) { - $groups = $this->_getGroups($user); - $grpadd = array_diff($changes['grps'], $groups); - $grpdel = array_diff($groups, $changes['grps']); + if($rc && isset($changes['grps']) && $this->cando['modGroups']) { + $groups = $this->_getGroups($user); + $grpadd = array_diff($changes['grps'], $groups); + $grpdel = array_diff($groups, $changes['grps']); - foreach($grpadd as $group) - if(($this->_addUserToGroup($user, $group, 1)) == false) - $rc = false; + foreach($grpadd as $group) { + if(($this->_addUserToGroup($user, $group, true)) == false) { + $rc = false; + } + } - foreach($grpdel as $group) - if(($this->_delUserFromGroup($user, $group)) == false) - $rc = false; + foreach($grpdel as $group) { + if(($this->_delUserFromGroup($user, $group)) == false) { + $rc = false; + } } } @@ -304,8 +321,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if(is_array($users) && count($users)) { $this->_lockTables("WRITE"); foreach($users as $user) { - if($this->_delUser($user)) + if($this->_delUser($user)) { $count++; + } } $this->_unlockTables(); } @@ -349,7 +367,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @param int $first index of first user to be returned * @param int $limit max number of users to be returned - * @param array|string $filter array of field/pattern pairs + * @param array $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { @@ -367,9 +385,11 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if(!empty($result)) { - foreach($result as $user) - if(($info = $this->_getUserInfo($user['user']))) + foreach($result as $user) { + if(($info = $this->_getUserInfo($user['user']))) { $out[$user['user']] = $info; + } + } } $this->_unlockTables(); @@ -466,7 +486,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{user}', $this->_escape($user), $sql); $sql = str_replace('%{gid}', $this->_escape($gid), $sql); $sql = str_replace('%{group}', $this->_escape($group), $sql); - if($this->_modifyDB($sql) !== false) return true; + if($this->_modifyDB($sql) !== false) { + $this->_flushUserInfoCache($user); + return true; + } if($newgroup) { // remove previously created group on error $sql = str_replace('%{gid}', $this->_escape($gid), $this->getConf('delGroup')); @@ -501,6 +524,10 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{gid}', $this->_escape($gid), $sql); $sql = str_replace('%{group}', $this->_escape($group), $sql); $rc = $this->_modifyDB($sql) == 0 ? true : false; + + if ($rc) { + $this->_flushUserInfoCache($user); + } } } return $rc; @@ -526,8 +553,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $result = $this->_queryDB($sql); if($result !== false && count($result)) { - foreach($result as $row) + foreach($result as $row) { $groups[] = $row['group']; + } } return $groups; } @@ -585,11 +613,12 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if($uid) { foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, 1); + $gid = $this->_addUserToGroup($user, $group, true); if($gid === false) break; } if($gid !== false){ + $this->_flushUserInfoCache($user); return true; } else { /* remove the new user and all group relations if a group can't @@ -614,7 +643,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * - * @param string $user user whose id is desired + * @param string $user username of the user to be deleted * @return bool */ protected function _delUser($user) { @@ -626,6 +655,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql = str_replace('%{uid}', $this->_escape($uid), $this->getConf('delUser')); $sql = str_replace('%{user}', $this->_escape($user), $sql); $this->_modifyDB($sql); + $this->_flushUserInfoCache($user); return true; } } @@ -633,23 +663,100 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { } /** - * getUserInfo + * Flush cached user information + * + * @author Christopher Smith <chris@jalakai.co.uk> + * + * @param string $user username of the user whose data is to be removed from the cache + * if null, empty the whole cache + */ + protected function _flushUserInfoCache($user=null) { + if (is_null($user)) { + $this->cacheUserInfo = array(); + } else { + unset($this->cacheUserInfo[$user]); + } + } + + /** + * Quick lookup to see if a user's information has been cached + * + * This test does not need a database connection or read lock * - * Gets the data for a specific user The database connection + * @author Christopher Smith <chris@jalakai.co.uk> + * + * @param string $user username to be looked up in the cache + * @param bool $requireGroups true, if cached info should include group memberships + * + * @return bool existence of required user information in the cache + */ + protected function _cacheExists($user, $requireGroups=true) { + if (isset($this->cacheUserInfo[$user])) { + if (!is_array($this->cacheUserInfo[$user])) { + return true; // user doesn't exist + } + + if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) { + return true; + } + } + + return false; + } + + /** + * Get a user's information + * + * The database connection must already be established for this function to work. + * + * @author Christopher Smith <chris@jalakai.co.uk> + * + * @param string $user username of the user whose information is being reterieved + * @param bool $requireGroups true if group memberships should be included + * @param bool $useCache true if ok to return cached data & to cache returned data + * + * @return mixed false|array false if the user doesn't exist + * array containing user information if user does exist + */ + protected function _getUserInfo($user, $requireGroups=true, $useCache=true) { + $info = null; + + if ($useCache && isset($this->cacheUserInfo[$user])) { + $info = $this->cacheUserInfo[$user]; + } + + if (is_null($info)) { + $info = $this->_retrieveUserInfo($user); + } + + if (($requireGroups == true) && $info && !isset($info['grps'])) { + $info['grps'] = $this->_getGroups($user); + } + + if ($useCache) { + $this->cacheUserInfo[$user] = $info; + } + + return $info; + } + + /** + * retrieveUserInfo + * + * Gets the data for a specific user. The database connection * must already be established for this function to work. * Otherwise it will return 'false'. * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * * @param string $user user's nick to get data for - * @return bool|array false on error, user info on success + * @return false|array false on error, user info on success */ - protected function _getUserInfo($user) { + protected function _retrieveUserInfo($user) { $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo')); $result = $this->_queryDB($sql); if($result !== false && count($result)) { $info = $result[0]; - $info['grps'] = $this->_getGroups($user); return $info; } return false; @@ -666,20 +773,25 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * The database connection has already to be established for this * function to work. Otherwise it will return 'false'. * - * The password will be crypted if necessary. + * The password will be encrypted if necessary. * + * @param string $user user's nick being updated * @param array $changes array of items to change as pairs of item and value - * @param mixed $uid user id of dataset to change, must be unique in DB * @return bool true on success or false on error * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> */ - protected function _updateUserInfo($changes, $uid) { + protected function _updateUserInfo($user, $changes) { $sql = $this->getConf('updateUser')." "; $cnt = 0; $err = 0; if($this->dbcon) { + $uid = $this->_getUserID($user); + if ($uid === false) { + return false; + } + foreach($changes as $item => $value) { if($item == 'user') { if(($this->_getUserID($changes['user']))) { @@ -707,6 +819,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $sql .= " ".str_replace('%{uid}', $uid, $this->getConf('UpdateTarget')); if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp. $this->_modifyDB($sql); + $this->_flushUserInfoCache($user); } return true; } @@ -724,7 +837,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * * @param string $group group name which id is desired - * @return mixed group id + * @return false|string group id */ protected function _getGroupID($group) { if($this->dbcon) { @@ -797,7 +910,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * * @param string $query SQL string that contains the query - * @return array with the result table + * @return array|false with the result table */ protected function _queryDB($query) { if($this->getConf('debug') >= 2) { @@ -888,6 +1001,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { * abrogated. * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> + * + * @return bool */ protected function _unlockTables() { if($this->dbcon) { diff --git a/lib/plugins/authmysql/lang/cs/settings.php b/lib/plugins/authmysql/lang/cs/settings.php index 350c3236b02e03aef5bc74681737f00fcd3743fe..09146a4514700e23cc704ec7ecd41dfafce8ee6d 100644 --- a/lib/plugins/authmysql/lang/cs/settings.php +++ b/lib/plugins/authmysql/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['server'] = 'Váš server MySQL'; $lang['user'] = 'Uživatelské jméno pro MySQL'; @@ -19,7 +20,7 @@ $lang['getGroups'] = 'PÅ™Ãkaz SQL pro zÃskánà uživatelovy skupi $lang['getUsers'] = 'PÅ™Ãkaz SQL pro seznam vÅ¡ech uživatelů'; $lang['FilterLogin'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle pÅ™ihlaÅ¡ovacÃho jména'; $lang['FilterName'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle celého jména'; -$lang['FilterEmail'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle adres emailů'; +$lang['FilterEmail'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle adres e-mailů'; $lang['FilterGroup'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle Älenstvà ve skupinách'; $lang['SortOrder'] = 'PÅ™Ãkaz SQL pro Å™azenà uživatelů'; $lang['addUser'] = 'PÅ™Ãkaz SQL pro pÅ™idánà nového uživatele'; @@ -32,7 +33,7 @@ $lang['delUserRefs'] = 'PÅ™Ãkaz SQL pro odstranÄ›nà Älenstvà uživ $lang['updateUser'] = 'PÅ™Ãkaz SQL pro aktualizaci uživatelského profilu'; $lang['UpdateLogin'] = 'Klauzule pro aktualizaci pÅ™ihlaÄovacÃho jména uživatele'; $lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele'; +$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; $lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; $lang['UpdateTarget'] = 'OmezujÃcà klauzule pro identifikaci uživatele pÅ™i aktualizaci'; $lang['delUserGroup'] = 'PÅ™Ãkaz SQL pro zruÅ¡enà Älenstvà uživatele v dané skupinÄ›'; diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php index 1e38cb6b4b78c860dc33c9ffa71b0113feaf944e..ed21201fbb25ff203a4dfb142c1281a3f7c0275d 100644 --- a/lib/plugins/authmysql/lang/da/settings.php +++ b/lib/plugins/authmysql/lang/da/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> */ @@ -11,6 +11,7 @@ $lang['user'] = 'MySQL brugernavn'; $lang['password'] = 'Kodeord til ovenstÃ¥ende bruger'; $lang['database'] = 'Database der skal benyttes'; $lang['charset'] = 'Tegnsæt benyttet i database'; +$lang['debug'] = 'Vis yderligere debug output'; $lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; $lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation'; $lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; @@ -21,7 +22,6 @@ $lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe'; $lang['delUser'] = 'SQL-sætning til at slette en bruger'; $lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper'; $lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil'; -$lang['debug'] = 'Vis yderligere debug output'; $lang['debug_o_0'] = 'ingen'; $lang['debug_o_1'] = 'kun ved fejl'; $lang['debug_o_2'] = 'alle SQL forespørgsler'; diff --git a/lib/plugins/authmysql/lang/fa/settings.php b/lib/plugins/authmysql/lang/fa/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..68ad5ce8374104adaf90a3a769fc92d545f686f3 --- /dev/null +++ b/lib/plugins/authmysql/lang/fa/settings.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> + */ +$lang['server'] = 'سرور MySQL'; +$lang['user'] = 'نام کاربری MySQL'; +$lang['database'] = 'پایگاه داده مورد استÙاده'; diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..32517957b88a8fe263e166c5d88c4ca8fc47e6e1 --- /dev/null +++ b/lib/plugins/authmysql/lang/fi/settings.php @@ -0,0 +1,11 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jussi Takala <jussi.takala@live.fi> + */ +$lang['server'] = 'Sinun MySQL-serveri'; +$lang['user'] = 'MySQL-käyttäjänimi'; +$lang['password'] = 'Salasana yläolevalle käyttäjälle'; +$lang['charset'] = 'Käytetty merkistö tietokannassa'; diff --git a/lib/plugins/authmysql/lang/hr/settings.php b/lib/plugins/authmysql/lang/hr/settings.php index 0ef389f467245889e6197980746a384c0465b6d3..af99669999e70b86b312caf92167b0a64385ca2c 100644 --- a/lib/plugins/authmysql/lang/hr/settings.php +++ b/lib/plugins/authmysql/lang/hr/settings.php @@ -19,7 +19,7 @@ $lang['getGroups'] = 'SQL izraz za dohvaćanje Älanstva u grupama'; $lang['getUsers'] = 'SQL izraz za ispis svih korisnika'; $lang['FilterLogin'] = 'SQL izraz za izdvajanje korisnika po korisniÄkom imenu'; $lang['FilterName'] = 'SQL izraz za izdvajanje korisnika po punom imenu'; -$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po email adresi'; +$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po adresi e-poÅ¡te'; $lang['FilterGroup'] = 'SQL izraz za izdvajanje korisnika po Älanstvu u grupama'; $lang['SortOrder'] = 'SQL izraz za sortiranje korisnika'; $lang['addUser'] = 'SQL izraz za dodavanje novih korisnika'; diff --git a/lib/plugins/authmysql/lang/no/settings.php b/lib/plugins/authmysql/lang/no/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..45ab09819f9539cf93fd6fd774379868ce881d3d --- /dev/null +++ b/lib/plugins/authmysql/lang/no/settings.php @@ -0,0 +1,14 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Patrick <spill.p@hotmail.com> + */ +$lang['server'] = 'Din MySQL-server'; +$lang['user'] = 'Ditt MySQL-brukernavn'; +$lang['password'] = 'Passord til brukeren'; +$lang['database'] = 'Database som skal brukes'; +$lang['debug_o_0'] = 'ingen'; +$lang['debug_o_1'] = 'bare ved feil'; +$lang['debug_o_2'] = 'alle SQL-forespørsler'; diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index e51b39858148a782e0dddc5c5f990442483b11c1..4cb280aae34063687f2daed571cd20485905015d 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -104,7 +104,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * - * @param array $keys + * @param string[] $keys * @param bool $wop * @return bool */ @@ -159,9 +159,11 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { if($first) $sql .= " OFFSET $first"; $result = $this->_queryDB($sql); - foreach($result as $user) - if(($info = $this->_getUserInfo($user['user']))) + foreach($result as $user) { + if(($info = $this->_getUserInfo($user['user']))) { $out[$user['user']] = $info; + } + } $this->_unlockTables(); $this->_closeDB(); @@ -212,7 +214,10 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { $sql = str_replace('%{user}', addslashes($user), $sql); $sql = str_replace('%{gid}', addslashes($gid), $sql); $sql = str_replace('%{group}', addslashes($group), $sql); - if($this->_modifyDB($sql) !== false) return true; + if($this->_modifyDB($sql) !== false) { + $this->_flushUserInfoCache($user); + return true; + } if($newgroup) { // remove previously created group on error $sql = str_replace('%{gid}', addslashes($gid), $this->conf['delGroup']); @@ -262,11 +267,12 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { if($uid) { foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, 1); + $gid = $this->_addUserToGroup($user, $group, true); if($gid === false) break; } if($gid !== false){ + $this->_flushUserInfoCache($user); return true; } else { /* remove the new user and all group relations if a group can't @@ -336,7 +342,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * * @param string $query SQL string that contains the query - * @return array the result table + * @return array|false the result table */ protected function _queryDB($query) { $resultarray = array(); @@ -359,6 +365,9 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * MySQL one because it does NOT return the last insertID * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $query + * @return bool */ protected function _modifyDB($query) { if($this->dbcon) { @@ -392,6 +401,8 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * Commit a transaction * * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> + * + * @return bool */ protected function _unlockTables() { if($this->dbcon) { diff --git a/lib/plugins/authpgsql/lang/cs/settings.php b/lib/plugins/authpgsql/lang/cs/settings.php index aec7eecf1d97be214691f8d28be61f452b2cf29b..ad135e2417bfdd648e8aaf3f21dff50991951b76 100644 --- a/lib/plugins/authpgsql/lang/cs/settings.php +++ b/lib/plugins/authpgsql/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['server'] = 'Váš server PostgreSQL'; $lang['port'] = 'Port vaÅ¡eho serveru PostgreSQL'; @@ -18,7 +19,7 @@ $lang['getGroups'] = 'PÅ™Ãkaz SQL pro zÃskánà Älenstvà uživat $lang['getUsers'] = 'PÅ™Ãkaz SQL pro seznam vÅ¡ech uživatelů'; $lang['FilterLogin'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle pÅ™ihlaÅ¡ovacÃho jména'; $lang['FilterName'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle celého jména'; -$lang['FilterEmail'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle adres emailů'; +$lang['FilterEmail'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle adres e-mailů'; $lang['FilterGroup'] = 'PÅ™Ãkaz SQL pro filtrovánà uživatelů podle Älenstvà ve skupinách'; $lang['SortOrder'] = 'PÅ™Ãkaz SQL pro Å™azenà uživatelů'; $lang['addUser'] = 'PÅ™Ãkaz SQL pro Å™azenà uživatelů'; @@ -31,7 +32,7 @@ $lang['delUserRefs'] = 'PÅ™Ãkaz SQL pro odstranÄ›nà Älenstvà uživ $lang['updateUser'] = 'PÅ™Ãkaz SQL pro aktualizaci uživatelského profilu'; $lang['UpdateLogin'] = 'Klauzule pro aktualizaci pÅ™ihlaÄovacÃho jména uživatele'; $lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci emailové adresy uživatele'; +$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; $lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; $lang['UpdateTarget'] = 'OmezujÃcà klauzule pro identifikaci uživatele pÅ™i aktualizaci'; $lang['delUserGroup'] = 'PÅ™Ãkaz SQL pro zruÅ¡enà Älenstvà uživatele v dané skupinÄ›'; diff --git a/lib/plugins/authpgsql/lang/fa/settings.php b/lib/plugins/authpgsql/lang/fa/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..8134939674937ca62b6b6f4ae199add8dbc76b19 --- /dev/null +++ b/lib/plugins/authpgsql/lang/fa/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> + */ +$lang['database'] = 'پایگاه داده مورد استÙاده'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php index baf40a468a6c3030e3a88f2ccb78a5f6894dc72a..e8a40dcb2c7310ba308a51f9d5bbba80570386da 100644 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ b/lib/plugins/authpgsql/lang/it/settings.php @@ -4,8 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Francesco <francesco.cavalli@hotmail.com> + * @author Torpedo <dgtorpedo@gmail.com> */ $lang['server'] = 'Il tuo server PostgreSQL '; $lang['port'] = 'La porta del tuo server PostgreSQL '; $lang['user'] = 'Lo username PostgreSQL'; $lang['database'] = 'Database da usare'; +$lang['getUsers'] = 'Dichiarazione SQL per elencare tutti gli utenti'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 65cbce8df991d07ad4e6e6eed5727cce5e0b8a61..416ea0ec9c9f640a6d83df48b6b6cdd7615efcdf 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -6,11 +6,12 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Vitaly Filatenko <kot@hacktest.net> */ $lang['server'] = 'Ваш PostgreSQL-Ñервер'; $lang['port'] = 'Порт вашего PostgreSQL-Ñервера'; $lang['user'] = 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ PostgreSQL'; -$lang['password'] = 'Пароль Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð³Ð¾ пользователÑ.'; +$lang['password'] = 'Пароль Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ð¾Ð³Ð¾ пользователÑ'; $lang['database'] = 'Ð˜Ð¼Ñ Ð±Ð°Ð·Ñ‹ данных'; $lang['debug'] = 'Отображать дополнительную отладочную информацию'; $lang['checkPass'] = 'Выражение SQL, оÑущеÑтвлÑющее проверку паролÑ'; @@ -30,5 +31,8 @@ $lang['getUserID'] = 'Выражение SQL, обеÑпечиваю $lang['delUser'] = 'Выражение SQL, оÑущеÑтвлÑющее удаление пользователÑ'; $lang['delUserRefs'] = 'Выражение SQL, оÑущеÑтвлÑющее удаление Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð· вÑех группы'; $lang['updateUser'] = 'Выражение SQL, оÑущеÑтвлÑющее обновление Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ'; +$lang['UpdateLogin'] = 'Измените уÑловие Ð´Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð»Ð¾Ð³Ð¸Ð½Ð°'; +$lang['UpdatePass'] = 'Измените уÑловие Ð´Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ'; +$lang['UpdateEmail'] = 'Измените уÑловие Ð´Ð»Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ email'; $lang['delUserGroup'] = 'Выражение SQL, оÑущеÑтвлÑющее удаление Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð· указанной группы'; $lang['getGroupID'] = 'Выражение SQL, обеÑпечивающее получение первичного ключа указанной группы'; diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index cd5294157502b497220f6f1b20848587a0dfbbfc..9df96389a5ac855fb21a10214c21ae344e652499 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -12,13 +12,14 @@ * @group plugins */ class helper_plugin_authplain_escaping_test extends DokuWikiTest { - - protected $pluginsEnabled = array('authplain'); + + protected $pluginsEnabled = array('authplainharness'); + /** @var auth_plugin_authplain|auth_plugin_authplainharness */ protected $auth; - + protected function reloadUsers() { /* auth caches data loaded from file, but recreated object forces reload */ - $this->auth = new auth_plugin_authplain(); + $this->auth = new auth_plugin_authplainharness(); } function setUp() { @@ -76,7 +77,44 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { $this->assertEquals($saved['name'], $user['name']); $this->assertTrue($this->auth->checkPass("testuser", $user['pass'])); } + + // really only required for developers to ensure this plugin will + // work with systems running on PCRE 6.6 and lower. + public function testLineSplit(){ + $this->auth->setPregsplit_safe(false); + + $names = array( + 'plain', + 'ut-fठ8', + 'colon:', + 'backslash\\', + 'alltogether\\ठ:' + ); + $userpass = 'user:password_hash:'; + $other_user_data = ':email@address:group1,group2'; + + foreach ($names as $testname) { + $escaped = str_replace(array('\\',':'),array('\\\\','\\:'),$testname); // escape : & \ + $test_line = $userpass.$escaped.$other_user_data; + $result = $this->auth->splitUserData($test_line); + + $this->assertEquals($escaped, $result[2]); + } + } } -?> \ No newline at end of file +class auth_plugin_authplainharness extends auth_plugin_authplain { + + public function setPregsplit_safe($bool) { + $this->_pregsplit_safe = $bool; + } + + public function getPregsplit_safe(){ + return $this->_pregsplit_safe; + } + + public function splitUserData($line){ + return $this->_splitUserData($line); + } +} diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index e53f566671936d36824a3795c61e247697279470..fd2d0b2493e5cf8f7b1bc673263f567fe0a675a5 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -17,6 +17,9 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { /** @var array filter pattern */ protected $_pattern = array(); + /** @var bool safe version of preg_split */ + protected $_pregsplit_safe = false; + /** * Constructor * @@ -44,6 +47,8 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $this->cando['getUsers'] = true; $this->cando['getUserCount'] = true; } + + $this->_pregsplit_safe = version_compare(PCRE_VERSION,'6.7','>='); } /** @@ -76,9 +81,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> * @param string $user - * @return array|bool + * @param bool $requireGroups (optional) ignored by this plugin, grps info always supplied + * @return array|false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if($this->users === null) $this->_loadUserData(); return isset($this->users[$user]) ? $this->users[$user] : false; } @@ -328,7 +334,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { if(empty($line)) continue; /* NB: preg_split can be deprecated/replaced with str_getcsv once dokuwiki is min php 5.3 */ - $row = preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \: + $row = $this->_splitUserData($line); $row = str_replace('\\:', ':', $row); $row = str_replace('\\\\', '\\', $row); @@ -341,6 +347,33 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { } } + protected function _splitUserData($line){ + // due to a bug in PCRE 6.6, preg_split will fail with the regex we use here + // refer github issues 877 & 885 + if ($this->_pregsplit_safe){ + return preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \: + } + + $row = array(); + $piece = ''; + $len = strlen($line); + for($i=0; $i<$len; $i++){ + if ($line[$i]=='\\'){ + $piece .= $line[$i]; + $i++; + if ($i>=$len) break; + } else if ($line[$i]==':'){ + $row[] = $piece; + $piece = ''; + continue; + } + $piece .= $line[$i]; + } + $row[] = $piece; + + return $row; + } + /** * return true if $user + $info match $filter criteria, false otherwise * diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 835d277759af4637b3cd89bd7ab23d29437bbd65..9202a221b747c586481dcd876e7c385895c49d41 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -32,6 +32,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { var $_session_started = false; var $_localised_prompts = false; + /** + * @return int + */ function getMenuSort() { return 100; } /** @@ -40,14 +43,20 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { function handle() { global $ID, $INPUT; - if (!$this->_restore_session()) return $this->_close_session(); - if ($INPUT->int('save') != 1) return $this->_close_session(); - if (!checkSecurityToken()) return $this->_close_session(); + if(!$this->_restore_session() || $INPUT->int('save') != 1 || !checkSecurityToken()) { + $this->_close_session(); + return; + } - if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } + if(is_null($this->_config)) { + $this->_config = new configuration($this->_file); + } // don't go any further if the configuration is locked - if ($this->_config->_locked) return $this->_close_session(); + if($this->_config->locked) { + $this->_close_session(); + return; + } $this->_input = $INPUT->arr('config'); @@ -104,6 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { formSecurityToken(); $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); + /** @var setting[] $undefined_settings */ $undefined_settings = array(); $in_fieldset = false; $first_plugin_fieldset = true; @@ -162,7 +172,17 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // show undefined settings list if ($allow_debug && !empty($undefined_settings)) { - function _setting_natural_comparison($a, $b) { return strnatcmp($a->_key, $b->_key); } + /** + * Callback for sorting settings + * + * @param setting $a + * @param setting $b + * @return int if $a is lower/equal/higher than $b + */ + function _setting_natural_comparison($a, $b) { + return strnatcmp($a->_key, $b->_key); + } + usort($undefined_settings, '_setting_natural_comparison'); $this->_print_h1('undefined_settings', $this->getLang('_header_undefined')); ptln('<fieldset>'); @@ -235,6 +255,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if ($this->_session_started) session_write_close(); } + /** + * @param bool $prompts + */ function setupLocale($prompts=false) { parent::setupLocale(); @@ -245,6 +268,9 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { } + /** + * @return bool + */ function _setup_localised_plugin_prompts() { global $conf; @@ -299,6 +325,8 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { * Generates a two-level table of contents for the config plugin. * * @author Ben Coburn <btcoburn@silicodon.net> + * + * @return array */ function getTOC() { if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } @@ -328,6 +356,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { $t[] = html_mktocitem('configuration_manager', $this->getLang('_configuration_manager'), 1); $t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1); + /** @var setting $setting */ foreach($toc['conf'] as $setting) { $name = $setting->prompt($this); $t[] = html_mktocitem($setting->_key, $name, 2); @@ -352,6 +381,10 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { return $t; } + /** + * @param string $id + * @param string $text + */ function _print_h1($id, $text) { ptln('<h1 id="'.$id.'">'.$text.'</h1>'); } diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 8dae2311027e22f524ccc67ac739a1adfba052ff..590631dae0863bc2d30969345010a9b9df0ebce7 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -10,7 +10,9 @@ if(!defined('CM_KEYMARKER')) define('CM_KEYMARKER','____'); if (!class_exists('configuration')) { - + /** + * Class configuration + */ class configuration { var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname']) @@ -151,6 +153,8 @@ if (!class_exists('configuration')) { /** * Update last modified time stamp of the config file + * + * @return bool */ public function touch_settings(){ if ($this->locked) return false; @@ -285,6 +289,10 @@ if (!class_exists('configuration')) { /** * not used ... conf's contents are an array! * reduce any multidimensional settings to one dimension using CM_KEYMARKER + * + * @param $conf + * @param string $prefix + * @return array */ protected function _flatten($conf,$prefix='') { @@ -403,6 +411,9 @@ if (!class_exists('configuration')) { } if (!class_exists('setting')) { + /** + * Class setting + */ class setting { var $_key = ''; @@ -452,7 +463,7 @@ if (!class_exists('setting')) { * - if changed value passes error check, set $this->_local to the new value * * @param mixed $input the new value - * @return boolean true if changed, false otherwise (incl. on error) + * @return boolean true if changed, false otherwise (also on error) */ public function update($input) { if (is_null($input)) return false; @@ -476,10 +487,9 @@ if (!class_exists('setting')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array(string $label_html, string $input_html) + * @return array with content array(string $label_html, string $input_html) */ public function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -503,6 +513,10 @@ if (!class_exists('setting')) { /** * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string */ public function out($var, $fmt='php') { @@ -556,7 +570,7 @@ if (!class_exists('setting')) { /** * Returns caution * - * @return bool|string caution string, otherwise false for invalid caution + * @return false|string caution string, otherwise false for invalid caution */ public function caution() { if (!empty($this->_caution)) { @@ -603,12 +617,15 @@ if (!class_exists('setting')) { if (!class_exists('setting_array')) { + /** + * Class setting_array + */ class setting_array extends setting { /** * Create an array from a string * - * @param $string + * @param string $string * @return array */ protected function _from_string($string){ @@ -622,7 +639,7 @@ if (!class_exists('setting_array')) { /** * Create a string from an array * - * @param $array + * @param array $array * @return string */ protected function _from_array($array){ @@ -657,13 +674,23 @@ if (!class_exists('setting_array')) { return true; } + /** + * Escaping + * + * @param string $string + * @return string + */ protected function _escape($string) { $tr = array("\\" => '\\\\', "'" => '\\\''); return "'".strtr( cleanText($string), $tr)."'"; } /** - * generate string to save setting value to file according to $fmt + * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string */ function out($var, $fmt='php') { @@ -680,8 +707,14 @@ if (!class_exists('setting_array')) { return $out; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -706,9 +739,18 @@ if (!class_exists('setting_array')) { } if (!class_exists('setting_string')) { + /** + * Class setting_string + */ class setting_string extends setting { + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -733,10 +775,21 @@ if (!class_exists('setting_string')) { } if (!class_exists('setting_password')) { + /** + * Class setting_password + */ class setting_password extends setting_string { var $_code = 'plain'; // mechanism to be used to obscure passwords + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; if (!$input) return false; @@ -751,9 +804,15 @@ if (!class_exists('setting_password')) { return true; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = $this->is_protected() ? 'disabled="disabled"' : ''; $key = htmlspecialchars($this->_key); @@ -766,7 +825,9 @@ if (!class_exists('setting_password')) { } if (!class_exists('setting_email')) { - + /** + * Class setting_email + */ class setting_email extends setting_string { var $_multiple = false; var $_placeholders = false; @@ -775,6 +836,7 @@ if (!class_exists('setting_email')) { * update setting with user provided value $input * if value fails error check, save it * + * @param mixed $input * @return boolean true if changed, false otherwise (incl. on error) */ function update($input) { @@ -829,7 +891,17 @@ if (!class_exists('setting_email')) { * @deprecated 2013-02-16 */ if (!class_exists('setting_richemail')) { + /** + * Class setting_richemail + */ class setting_richemail extends setting_email { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { $this->_placeholders = true; return parent::update($input); @@ -839,6 +911,9 @@ if (!class_exists('setting_richemail')) { if (!class_exists('setting_numeric')) { + /** + * Class setting_numeric + */ class setting_numeric extends setting_string { // This allows for many PHP syntax errors... // var $_pattern = '/^[-+\/*0-9 ]*$/'; @@ -847,6 +922,14 @@ if (!class_exists('setting_numeric')) { var $_min = null; var $_max = null; + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { $local = $this->_local; $valid = parent::update($input); @@ -863,6 +946,13 @@ if (!class_exists('setting_numeric')) { return $valid; } + /** + * Generate string to save setting value to file according to $fmt + * + * @param string $var name of variable + * @param string $fmt save format + * @return string + */ function out($var, $fmt='php') { if ($this->is_protected()) return ''; @@ -881,6 +971,9 @@ if (!class_exists('setting_numeric')) { } if (!class_exists('setting_numericopt')) { + /** + * Class setting_numericopt + */ class setting_numericopt extends setting_numeric { // just allow an empty config var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/'; @@ -888,10 +981,18 @@ if (!class_exists('setting_numericopt')) { } if (!class_exists('setting_onoff')) { + /** + * Class setting_onoff + */ class setting_onoff extends setting_numeric { - + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo = false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -909,6 +1010,14 @@ if (!class_exists('setting_onoff')) { return array($label,$input); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -923,11 +1032,21 @@ if (!class_exists('setting_onoff')) { } if (!class_exists('setting_multichoice')) { + /** + * Class setting_multichoice + */ class setting_multichoice extends setting_string { var $_choices = array(); + var $lang; //some custom language strings are stored in setting + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo = false) { - $value = ''; $disable = ''; $nochoice = ''; @@ -970,6 +1089,14 @@ if (!class_exists('setting_multichoice')) { return array($label,$input); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if (is_null($input)) return false; if ($this->is_protected()) return false; @@ -987,10 +1114,20 @@ if (!class_exists('setting_multichoice')) { if (!class_exists('setting_dirchoice')) { + /** + * Class setting_dirchoice + */ class setting_dirchoice extends setting_multichoice { var $_dir = ''; + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { // populate $this->_choices with a list of directories @@ -1016,12 +1153,18 @@ if (!class_exists('setting_dirchoice')) { if (!class_exists('setting_hidden')) { + /** + * Class setting_hidden + */ class setting_hidden extends setting { // Used to explicitly ignore a setting in the configuration manager. } } if (!class_exists('setting_fieldset')) { + /** + * Class setting_fieldset + */ class setting_fieldset extends setting { // A do-nothing class used to detect the 'fieldset' type. // Used to start a new settings "display-group". @@ -1029,6 +1172,9 @@ if (!class_exists('setting_fieldset')) { } if (!class_exists('setting_undefined')) { + /** + * Class setting_undefined + */ class setting_undefined extends setting_hidden { // A do-nothing class used to detect settings with no metadata entry. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1036,6 +1182,9 @@ if (!class_exists('setting_undefined')) { } if (!class_exists('setting_no_class')) { + /** + * Class setting_no_class + */ class setting_no_class extends setting_undefined { // A do-nothing class used to detect settings with a missing setting class. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1043,6 +1192,9 @@ if (!class_exists('setting_no_class')) { } if (!class_exists('setting_no_default')) { + /** + * Class setting_no_default + */ class setting_no_default extends setting_undefined { // A do-nothing class used to detect settings with no default value. // Used internaly to hide undefined settings, and generate the undefined settings list. @@ -1050,11 +1202,22 @@ if (!class_exists('setting_no_default')) { } if (!class_exists('setting_multicheckbox')) { + /** + * Class setting_multicheckbox + */ class setting_multicheckbox extends setting_string { var $_choices = array(); var $_combine = array(); + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -1075,9 +1238,15 @@ if (!class_exists('setting_multicheckbox')) { return true; } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { - $value = ''; $disable = ''; if ($this->is_protected()) { @@ -1125,7 +1294,7 @@ if (!class_exists('setting_multicheckbox')) { // handle any remaining values $other = join(',',$value); - $class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ? + $class = ((count($default) == count($value)) && (count($value) == count(array_intersect($value,$default)))) ? " selectiondefault" : ""; $input .= '<div class="other'.$class.'">'."\n"; @@ -1139,6 +1308,9 @@ if (!class_exists('setting_multicheckbox')) { /** * convert comma separated list to an array and combine any complimentary values + * + * @param string $str + * @return array */ function _str2array($str) { $array = explode(',',$str); @@ -1162,6 +1334,9 @@ if (!class_exists('setting_multicheckbox')) { /** * convert array of values + other back to a comma separated list, incl. splitting any combined values + * + * @param array $input + * @return string */ function _array2str($input) { @@ -1190,6 +1365,9 @@ if (!class_exists('setting_multicheckbox')) { } if (!class_exists('setting_regex')){ + /** + * Class setting_regex + */ class setting_regex extends setting_string { var $_delimiter = '/'; // regex delimiter to be used in testing input @@ -1213,7 +1391,7 @@ if (!class_exists('setting_regex')){ // see if the regex compiles and runs (we don't check for effectiveness) $regex = $this->_delimiter . $input . $this->_delimiter . $this->_pregflags; $lastError = error_get_last(); - $ok = @preg_match($regex,'testdata'); + @preg_match($regex,'testdata'); if (preg_last_error() != PREG_NO_ERROR || error_get_last() != $lastError) { $this->_input = $input; $this->_error = true; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 83de802a3b94714f90ce94a6c185e58d4b5dcc81..232a8177f477072a7a7852da2354b828a6958a6d 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -6,8 +6,15 @@ */ if (!class_exists('setting_sepchar')) { + /** + * Class setting_sepchar + */ class setting_sepchar extends setting_multichoice { + /** + * @param string $key + * @param array|null $param array with metadata of setting + */ function setting_sepchar($key,$param=null) { $str = '_-.'; for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i}; @@ -19,8 +26,19 @@ if (!class_exists('setting_sepchar')) { } if (!class_exists('setting_savedir')) { + /** + * Class setting_savedir + */ class setting_savedir extends setting_string { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -40,9 +58,20 @@ if (!class_exists('setting_savedir')) { } if (!class_exists('setting_authtype')) { + /** + * Class setting_authtype + */ class setting_authtype extends setting_multichoice { + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { + /** @var $plugin_controller Doku_Plugin_Controller */ global $plugin_controller; // retrieve auth types provided by plugins @@ -53,7 +82,16 @@ if (!class_exists('setting_authtype')) { parent::initialize($default,$local,$protected); } + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { + /** @var $plugin_controller Doku_Plugin_Controller */ global $plugin_controller; // is an update possible/requested? @@ -92,8 +130,19 @@ if (!class_exists('setting_authtype')) { } if (!class_exists('setting_im_convert')) { + /** + * Class setting_im_convert + */ class setting_im_convert extends setting_string { + /** + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (also on error) + */ function update($input) { if ($this->is_protected()) return false; @@ -115,14 +164,24 @@ if (!class_exists('setting_im_convert')) { } if (!class_exists('setting_disableactions')) { + /** + * Class setting_disableactions + */ class setting_disableactions extends setting_multicheckbox { + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { global $lang; // make some language adjustments (there must be a better way) // transfer some DokuWiki language strings to the plugin - if (!$plugin->localised) $this->setupLocale(); + if (!$plugin->localised) $plugin->setupLocale(); $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs']; foreach ($this->_choices as $choice) @@ -134,10 +193,20 @@ if (!class_exists('setting_disableactions')) { } if (!class_exists('setting_compression')) { + /** + * Class setting_compression + */ class setting_compression extends setting_multichoice { var $_choices = array('0'); // 0 = no compression, always supported + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { // populate _choices with the compression methods supported by this php installation @@ -150,16 +219,26 @@ if (!class_exists('setting_compression')) { } if (!class_exists('setting_license')) { + /** + * Class setting_license + */ class setting_license extends setting_multichoice { var $_choices = array(''); // none choosen + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { global $license; foreach($license as $key => $data){ $this->_choices[] = $key; - $this->lang[$this->_key.'_o_'.$key] = $data['name']; + $this->lang[$this->_key.'_o_'.$key] = $data['name']; // stored in setting } parent::initialize($default,$local,$protected); @@ -169,9 +248,20 @@ if (!class_exists('setting_license')) { if (!class_exists('setting_renderer')) { + /** + * Class setting_renderer + */ class setting_renderer extends setting_multichoice { var $_prompts = array(); - + var $_format = null; + + /** + * Receives current values for the setting $key + * + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ function initialize($default,$local,$protected) { $format = $this->_format; @@ -188,11 +278,18 @@ if (!class_exists('setting_renderer')) { parent::initialize($default,$local,$protected); } + /** + * Build html for label and input of setting + * + * @param DokuWiki_Plugin $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return array with content array(string $label_html, string $input_html) + */ function html(&$plugin, $echo=false) { // make some language adjustments (there must be a better way) // transfer some plugin names to the config plugin - if (!$plugin->localised) $this->setupLocale(); + if (!$plugin->localised) $plugin->setupLocale(); foreach ($this->_choices as $choice) { if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) { diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 99c74848bb0d1b82e20db8650a3e50c55d43b248..71257cf43a5b465e80a7b21376513e7bd4c81fb6 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -54,6 +54,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { msg($this->getLang('repo_error').' [<a href="'.$url.'">'.$this->getLang('repo_retry').'</a>]', -1); } + if(!in_array('ssl', stream_get_transports())) { + msg($this->getLang('nossl'), -1); + } + /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); @@ -75,10 +79,10 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { case 'uninstall': $extension->setExtension($extname); $status = $extension->uninstall(); - if($status !== true) { - msg($status, -1); - } else { + if($status) { msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + } else { + msg(sprintf($this->getLang('msg_delete_failed'), hsc($extension->getDisplayName())), -1); } break; case 'enable'; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 2aca0e21877dadac41c38619f580eec1045bdc62..dfa6249077d40feba8c007f2a5b79fcbd3b6dd73 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -799,7 +799,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * The directory is registered for cleanup when the class is destroyed * - * @return bool|string + * @return false|string */ protected function mkTmpDir(){ $dir = io_mktmpdir(); @@ -1079,7 +1079,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> * @param string $file The file to analyze - * @return string|bool false if the file can't be read, otherwise an "extension" + * @return string|false false if the file can't be read, otherwise an "extension" */ private function guess_archive($file) { $fh = fopen($file, 'rb'); @@ -1095,6 +1095,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Copy with recursive sub-directory support + * + * @param string $src filename path to file + * @param string $dst filename path to file + * @return bool|int|string */ private function dircopy($src, $dst) { global $conf; diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 47edca8c12d4eb50175694b4d1af4d6a7b571624..872cccc8c8d35a69e6b600a89308ba00e6259846 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -333,7 +333,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * Shortens the URL for display * * @param string $url - * * @return string HTML link */ function shortlink($url){ @@ -387,7 +386,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '<dd>'; $return .= hsc($extension->getInstalledVersion()); $return .= '</dd>'; - } else { + } + if (!$extension->isBundled()) { $return .= '<dt>'.$this->getLang('install_date').'</dt>'; $return .= '<dd>'; $return .= ($extension->getUpdateDate() ? hsc($extension->getUpdateDate()) : $this->getLang('unknown')); @@ -401,13 +401,6 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $return .= '</dd>'; } - if($extension->getInstallDate()) { - $return .= '<dt>'.$this->getLang('installed').'</dt>'; - $return .= '<dd>'; - $return .= hsc($extension->getInstallDate()); - $return .= '</dd>'; - } - $return .= '<dt>'.$this->getLang('provides').'</dt>'; $return .= '<dd><bdi>'; $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); @@ -467,6 +460,7 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @return string The HTML code */ function make_actions(helper_plugin_extension_extension $extension) { + global $conf; $return = ''; $errors = ''; @@ -498,6 +492,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $errors .= '<p class="permerror">'.$this->getLang('git').'</p>'; } + if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['auth'] != $extension->getID()) { + $errors .= '<p class="permerror">'.$this->getLang('auth').'</p>'; + } + }else{ if (($canmod = $extension->canModify()) === true) { if ($extension->getDownloadURL()) { diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 6ffe89eb7b1d961913aab74f47aec3b6ce848f29..5dc2707cf1695e76586f7a2c966fc32ef041aa83 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -32,7 +32,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { $request_needed = false; foreach ($list as $name) { $cache = new cache('##extension_manager##'.$name, '.repo'); - $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { $this->loaded_extensions[$name] = true; $request_data['ext'][] = $name; @@ -64,7 +64,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { public function hasAccess() { if ($this->has_access === null) { $cache = new cache('##extension_manager###hasAccess', '.repo'); - $result = null; + if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) { $httpclient = new DokuHTTPClient(); $httpclient->timeout = 5; @@ -91,7 +91,7 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { */ public function getData($name) { $cache = new cache('##extension_manager##'.$name, '.repo'); - $result = null; + if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { $this->loaded_extensions[$name] = true; $httpclient = new DokuHTTPClient(); diff --git a/lib/plugins/extension/lang/cs/intro_install.txt b/lib/plugins/extension/lang/cs/intro_install.txt new file mode 100644 index 0000000000000000000000000000000000000000..b274959b9355197b17f7a8a3576c1795222c1332 --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_install.txt @@ -0,0 +1 @@ +Zde můžete ruÄnÄ› instalovat zásuvné moduly a Å¡ablony vzhledu, buÄ nahránÃm, nebo zadánÃm pÅ™Ãmé URL pro staženÃ. \ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/intro_templates.txt b/lib/plugins/extension/lang/cs/intro_templates.txt new file mode 100644 index 0000000000000000000000000000000000000000..45abe952c3f78be4c2af2a3af153fd98c1059359 --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_templates.txt @@ -0,0 +1 @@ +Toto jsou Å¡ablony, které jsou momentálnÄ› nainstalovány v této DokuWiki. AktuálnÄ› použÃvanu Å¡ablonu lze vybrat ve [[?do=admin&page=config|Správci rozÅ¡ÃÅ™enÃ]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/lang.php b/lib/plugins/extension/lang/cs/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..dc38afd52ad018e11729ac67e78d9f76e3156e1f --- /dev/null +++ b/lib/plugins/extension/lang/cs/lang.php @@ -0,0 +1,92 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Viktor Zavadil <vzavadil@newps.cz> + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> + */ +$lang['menu'] = 'Manager rozÅ¡ÃÅ™enÃ'; +$lang['tab_plugins'] = 'Instalované moduly'; +$lang['tab_templates'] = 'Instalované Å¡ablony'; +$lang['tab_search'] = 'Vyhledej a instaluj'; +$lang['tab_install'] = 'RuÄnà instalovánÃ'; +$lang['notimplemented'] = 'Tato vychytávka nenà dosud implementována'; +$lang['notinstalled'] = 'Toto rozÅ¡ÃÅ™enà nenà instalováno'; +$lang['alreadyenabled'] = 'Toto rozÅ¡ÃÅ™enà je již povoleno'; +$lang['alreadydisabled'] = 'Toto rozÅ¡ÃÅ™enà je již vypnuto'; +$lang['pluginlistsaveerror'] = 'DoÅ¡lo k chybÄ› pÅ™i ukládánà seznamu zásuvných modulů'; +$lang['unknownauthor'] = 'Neznámý autor'; +$lang['unknownversion'] = 'Neznámá verze'; +$lang['btn_info'] = 'Zobrazit vÃce informacÃ'; +$lang['btn_update'] = 'Aktualizovat'; +$lang['btn_uninstall'] = 'Odinstalovat'; +$lang['btn_enable'] = 'Povolit'; +$lang['btn_disable'] = 'Zakázat'; +$lang['btn_install'] = 'Instalovat'; +$lang['btn_reinstall'] = 'PÅ™einstalovat'; +$lang['js']['reallydel'] = 'Opravdu odinstalovat toto rozÅ¡ÃÅ™enÃ?'; +$lang['search_for'] = 'Hledat rozÅ¡ÃÅ™enÃ:'; +$lang['search'] = 'Hledat'; +$lang['extensionby'] = '<strong>%s</strong> od %s'; +$lang['screenshot'] = 'Screenshot %s'; +$lang['popularity'] = 'Popularita: %s%%'; +$lang['homepage_link'] = 'Dokumenty'; +$lang['bugs_features'] = 'Chyby'; +$lang['tags'] = 'Å tÃtky:'; +$lang['author_hint'] = 'Vyhledat rozÅ¡ÃÅ™enà podle tohoto autora'; +$lang['installed'] = 'Nainstalováno:'; +$lang['downloadurl'] = 'URL stahovánÃ:'; +$lang['repository'] = 'Repozitář:'; +$lang['unknown'] = '<em>neznámý</em>'; +$lang['installed_version'] = 'Nainstalovaná verze:'; +$lang['install_date'] = 'Poslednà aktualizace'; +$lang['available_version'] = 'Dostupná verze:'; +$lang['compatible'] = 'Kompatibilnà s:'; +$lang['depends'] = 'Závisà na:'; +$lang['similar'] = 'Podobný jako:'; +$lang['conflicts'] = 'Koliduje s:'; +$lang['donate'] = 'LÃbà se ti to?'; +$lang['donate_action'] = 'Kup autorovi kávu!'; +$lang['repo_retry'] = 'Opakovat'; +$lang['provides'] = 'Poskytuje:'; +$lang['status'] = 'Stav:'; +$lang['status_installed'] = 'instalovaný'; +$lang['status_not_installed'] = 'nenainstalovaný'; +$lang['status_protected'] = 'chránÄ›ný'; +$lang['status_enabled'] = 'povolený'; +$lang['status_disabled'] = 'zakázaný'; +$lang['status_unmodifiable'] = 'nemÄ›nný'; +$lang['status_plugin'] = 'zásuvný modul'; +$lang['status_template'] = 'Å¡ablona'; +$lang['status_bundled'] = 'svázaný'; +$lang['msg_enabled'] = 'Zásuvný modul %s povolen'; +$lang['msg_disabled'] = 'Zásuvný modul %s zakázán'; +$lang['msg_delete_success'] = 'RozÅ¡ÃÅ™enà odinstalováno'; +$lang['msg_delete_failed'] = 'Odinstalovánà rozÅ¡ÃÅ™enà %s selhalo'; +$lang['msg_template_install_success'] = 'Å ablona %s úspěšnÄ› nainstalována'; +$lang['msg_template_update_success'] = 'Å ablona %s úspěšnÄ› aktualizována'; +$lang['msg_plugin_install_success'] = 'Zásuvný modul %s úspěšnÄ› nainstalován.'; +$lang['msg_plugin_update_success'] = 'Zásuvný modul %s úspěšnÄ› aktualizován.'; +$lang['msg_upload_failed'] = 'Nahrávánà souboru selhalo'; +$lang['missing_dependency'] = '<strong>ChybÄ›jÃcà nebo zakázaná závislost:</strong> %s'; +$lang['security_issue'] = '<strong>BezpeÄnostnà problém:</strong> %s'; +$lang['security_warning'] = '<strong>BezpeÄnostnà varovánÃ:</strong> %s'; +$lang['update_available'] = '<strong>Aktualizace:</strong> Je dostupná nová verze %s.'; +$lang['wrong_folder'] = '<strong>Zásuvný modul nesprávnÄ› nainstalován:</strong> PÅ™ejmenujte adresář modulu "%s" na "%s".'; +$lang['url_change'] = '<strong>URL se zmÄ›nila:</strong> URL pro stahovánà se zmÄ›nila od poslednà aktualizace. PÅ™ed dalÅ¡Ã aktualizacà tohoto rozÅ¡ÃÅ™enà ověřte správnost nové URL.<br />Nová: %s<br />Stará: %s'; +$lang['error_badurl'] = 'Adresy URL by mÄ›ly zaÄÃnat s http nebo https'; +$lang['error_dircreate'] = 'Nelze vytvoÅ™it doÄasný adresář pro pÅ™ijetà stahovánÃ'; +$lang['error_download'] = 'Nelze stáhnout soubor: %s'; +$lang['error_decompress'] = 'Selhalo rozbalenà staženého souboru. Toto je nejspÃÅ¡ důsledek poÅ¡kozenà souboru pÅ™i pÅ™enosu, zkuste soubor stáhnout znovu; pÅ™ÃpadnÄ› nemusel být rozpoznán formát sbaleného souboru a bude tÅ™eba pÅ™istoupit k ruÄnà instalaci. '; +$lang['error_findfolder'] = 'Nelze rozpoznat adresář pro rozÅ¡ÃÅ™enÃ, je tÅ™eba stáhnout a instalovat ruÄnÄ›'; +$lang['error_copy'] = 'DoÅ¡lo k chybÄ› kopÃrovánà souborů pÅ™i pokusu nainstalovat soubory do adresáře <em>%s</em>: může být plný disk nebo Å¡patnÄ› nastavena pÅ™Ãstupová práva. Tato chyba mohla zapÅ™ÃÄinit pouze ÄásteÄnou instalaci zásuvného modulu a uvést wiki do nestabilnÃho stavu.'; +$lang['noperms'] = 'Nelze zapisovat do adresáře pro rozÅ¡ÃÅ™enÃ'; +$lang['notplperms'] = 'Nelze zapisovat do odkládacÃho adresáře'; +$lang['nopluginperms'] = 'Nelze zapisovat do adresáře se zásuvnými moduly'; +$lang['git'] = 'Toto rozÅ¡ÃÅ™enà bylo nainstalováno pÅ™es git. Touto cestou ho nejspÃÅ¡ tady aktualizovat nechcete.'; +$lang['auth'] = 'Tento ověřovacà zásuvný modul nenà povolen v nastavenÃ, zvažte jeho deaktivaci.'; +$lang['install_url'] = 'Nainstalovat z URL:'; +$lang['install_upload'] = 'Nahrát rozÅ¡ÃÅ™enÃ:'; +$lang['repo_error'] = 'Nelze kontaktovat repozitář se zásuvnými moduly. UjistÄ›te se, že váš server může kontaktovat www.dokuwiki.org a zkontrolujte nastavenà proxy.'; +$lang['nossl'] = 'Použité PHP pravdÄ›podobnÄ› nepodporuje SSL. Staženà mnoha DokuWiki rozÅ¡ÃÅ™enà nebude fungovat.'; diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..c341bc5f91ebb75c25e2a497ce929566f4d222df --- /dev/null +++ b/lib/plugins/extension/lang/da/lang.php @@ -0,0 +1,24 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Søren Birk <soer9648@eucl.dk> + */ +$lang['update_available'] = '<strong>Opdatering:</strong> Ny version %s er tilgængelig.'; +$lang['wrong_folder'] = '<strong>Plugin ikke installeret korrekt:</strong> Omdøb plugin-mappe "%s" til "%s".'; +$lang['url_change'] = '<strong>URL ændret:</strong> Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.<br />Ny: %s<br />Gammel: %s'; +$lang['error_badurl'] = 'URL\'er skal starte med http eller https'; +$lang['error_dircreate'] = 'Ikke i stand til at oprette midlertidig mappe til modtagelse af download'; +$lang['error_download'] = 'Ikke i stand til at downloade filen: %s'; +$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dÃ¥rlig download, hvor du i sÃ¥ fald bør du prøve igen; eller komprimeringsformatet kan være ukendt, hvor du i sÃ¥ fald bliver nød til at downloade og installere manuelt.'; +$lang['error_findfolder'] = 'Ikke i stand til at identificere udvidelsesmappe - du bliver nød til at downloade og installere manuelt.'; +$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen <em>%s</em>: disken kan være fuld, eller mangel pÃ¥ fil-tilladelser. Dette kan have resulteret i et delvist installeret plugin, og efterladt din wiki-installation ustabil.'; +$lang['noperms'] = 'Udvidelsesmappe er ikke skrivbar'; +$lang['notplperms'] = 'Skabelonmappe er ikke skrivbar'; +$lang['nopluginperms'] = 'Pluginmappe er ikke skrivbar'; +$lang['git'] = 'Udvidelsen blev installeret via git - du vil muligvis ikke opdatere herfra.'; +$lang['auth'] = 'Auth-plugin er ikke aktiveret i konfigurationen - overvej at deaktivere den.'; +$lang['install_url'] = 'Installér fra URL:'; +$lang['install_upload'] = 'Upload Udvidelse:'; +$lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 72c9b9e2da880ba42a88247d9cc7054f3c738a95..f545b6da345c0ac83b32de59c11ad0cddceb35ca 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -69,7 +69,8 @@ $lang['status_bundled'] = 'bundled'; $lang['msg_enabled'] = 'Plugin %s enabled'; $lang['msg_disabled'] = 'Plugin %s disabled'; -$lang['msg_delete_success'] = 'Extension uninstalled'; +$lang['msg_delete_success'] = 'Extension %s uninstalled'; +$lang['msg_delete_failed'] = 'Uninstalling Extension %s failed'; $lang['msg_template_install_success'] = 'Template %s installed successfully'; $lang['msg_template_update_success'] = 'Template %s updated successfully'; $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; @@ -94,8 +95,10 @@ $lang['noperms'] = 'Extension directory is not writable'; $lang['notplperms'] = 'Template directory is not writable'; $lang['nopluginperms'] = 'Plugin directory is not writable'; $lang['git'] = 'This extension was installed via git, you may not want to update it here.'; +$lang['auth'] = 'This auth plugin is not enabled in configuration, consider disabling it.'; $lang['install_url'] = 'Install from URL:'; $lang['install_upload'] = 'Upload Extension:'; -$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; \ No newline at end of file +$lang['repo_error'] = 'The plugin repository could not be contacted. Make sure your server is allowed to contact www.dokuwiki.org and check your proxy settings.'; +$lang['nossl'] = 'Your PHP seems to miss SSL support. Downloading will not work for many DokuWiki extensions.'; \ No newline at end of file diff --git a/lib/plugins/extension/lang/fa/lang.php b/lib/plugins/extension/lang/fa/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..95c3e9652cf199ca2a5022f1e570dab83e930bbe --- /dev/null +++ b/lib/plugins/extension/lang/fa/lang.php @@ -0,0 +1,40 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> + */ +$lang['menu'] = 'مدیریت اÙزونه ها'; +$lang['tab_plugins'] = 'پلاگین های نصب شده'; +$lang['tab_templates'] = 'قالب های نصب شده'; +$lang['tab_search'] = 'جستجو Ùˆ نصب'; +$lang['tab_install'] = 'نصب دستی'; +$lang['notinstalled'] = 'این اÙزونه نصب نشده است'; +$lang['alreadyenabled'] = 'این اÙزونه Ùعال شده است'; +$lang['alreadydisabled'] = 'این اÙزونه غیرÙعال شده است'; +$lang['unknownversion'] = 'نسخه ناشناخته'; +$lang['btn_info'] = 'نمایش اطلاعات بیشتر'; +$lang['btn_update'] = 'به روز رسانی'; +$lang['btn_enable'] = 'Ùعال'; +$lang['btn_disable'] = 'غیرÙعال'; +$lang['btn_install'] = 'نصب'; +$lang['btn_reinstall'] = 'نصب مجدد'; +$lang['search_for'] = 'جستجوی اÙزونه:'; +$lang['search'] = 'جستجو'; +$lang['tags'] = 'برچسب ها:'; +$lang['installed_version'] = 'نسخه نصب شده:'; +$lang['available_version'] = 'نسخه در دسترس:'; +$lang['repo_retry'] = 'دوباره'; +$lang['status'] = 'وضعیت'; +$lang['status_installed'] = 'نصب شده'; +$lang['status_not_installed'] = 'نصب نشده'; +$lang['status_enabled'] = 'Ùعال'; +$lang['status_disabled'] = 'غیرÙعال'; +$lang['status_plugin'] = 'پلاگین'; +$lang['status_template'] = 'قالب'; +$lang['noperms'] = 'پوشه اÙزونه ها قابل نوشتن نیست'; +$lang['notplperms'] = 'پوشه قالب ها قابل نوشتن نیست'; +$lang['nopluginperms'] = 'پوشه پلاگین ها قابل نوشتن نیست'; +$lang['install_url'] = 'نصب از آدرس:'; +$lang['install_upload'] = 'بارگذاری اÙزونه:'; diff --git a/lib/plugins/extension/lang/fi/lang.php b/lib/plugins/extension/lang/fi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..a154f25639ef00579bd72ca372483407ef965d12 --- /dev/null +++ b/lib/plugins/extension/lang/fi/lang.php @@ -0,0 +1,37 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jussi Takala <jussi.takala@live.fi> + */ +$lang['tab_plugins'] = 'Asennetut liitännäiset'; +$lang['tab_search'] = 'Etsi ja asenna'; +$lang['tab_install'] = 'Manuaalinen asennus'; +$lang['notimplemented'] = 'Tätä ominaisuutta ei ole vielä toteutettu'; +$lang['notinstalled'] = 'Tätä laajennusta ei ole asennettu'; +$lang['alreadyenabled'] = 'Tämä laajennus on jo käytössä'; +$lang['alreadydisabled'] = 'Tämä laajennus on jo otettu pois käytöstä'; +$lang['pluginlistsaveerror'] = 'Tapahtui virhe tallentaessa liitännäislistaa'; +$lang['unknownauthor'] = 'Tuntematon tekijä'; +$lang['unknownversion'] = 'Tuntematon versio'; +$lang['btn_info'] = 'Näytä lisää tietoa'; +$lang['btn_update'] = 'Päivitä'; +$lang['btn_enable'] = 'Ota käyttöön'; +$lang['btn_disable'] = 'Poista käytöstä'; +$lang['btn_install'] = 'Asenna'; +$lang['btn_reinstall'] = 'Uudelleenasenna'; +$lang['js']['reallydel'] = 'Haluatko varmasti poistaa tämän laajennuksen?'; +$lang['search_for'] = 'Etsi laajennusta:'; +$lang['search'] = 'Etsi'; +$lang['downloadurl'] = 'Lataa URL-osoite'; +$lang['installed_version'] = 'Asennettu versio'; +$lang['install_date'] = 'Sinun viimeinen päivitys:'; +$lang['available_version'] = 'Saatavissa oleva versio:'; +$lang['status_installed'] = 'asennettu'; +$lang['status_protected'] = 'suojattu'; +$lang['status_enabled'] = 'otettu käyttöön'; +$lang['status_disabled'] = 'otettu pois käytöstä'; +$lang['status_plugin'] = 'liitännäinen'; +$lang['install_url'] = 'Asenna URL-osoitteesta:'; +$lang['install_upload'] = 'Ladattu laajennus:'; diff --git a/lib/plugins/extension/lang/hr/lang.php b/lib/plugins/extension/lang/hr/lang.php index 890681301931b3954681b1adfac3da04bd0e17f9..f43defcb10fd735c7e76684792c3188685530ed6 100644 --- a/lib/plugins/extension/lang/hr/lang.php +++ b/lib/plugins/extension/lang/hr/lang.php @@ -6,24 +6,24 @@ * @author Davor Turkalj <turki.bsc@gmail.com> */ $lang['menu'] = 'Upravitelj dodataka'; -$lang['tab_plugins'] = 'Instalirani dodatci'; -$lang['tab_templates'] = 'Instalirani predloÅ¡ci'; -$lang['tab_search'] = 'Potraži i instaliraj'; -$lang['tab_install'] = 'RuÄno instaliranje'; +$lang['tab_plugins'] = 'UgraÄ‘eni dodatci'; +$lang['tab_templates'] = 'UgraÄ‘eni predloÅ¡ci'; +$lang['tab_search'] = 'Potraži i ugradi'; +$lang['tab_install'] = 'RuÄna ugradnja'; $lang['notimplemented'] = 'Ova mogućnost joÅ¡ nije napravljena'; -$lang['notinstalled'] = 'Dodatak nije instaliran'; +$lang['notinstalled'] = 'Dodatak nije ugraÄ‘en'; $lang['alreadyenabled'] = 'Ovaj dodatak je već omogućen'; $lang['alreadydisabled'] = 'Ovaj dodatak je već onemogućen'; $lang['pluginlistsaveerror'] = 'Dogodila se greÅ¡ka pri snimanju liste dodataka'; $lang['unknownauthor'] = 'Nepoznat autor'; $lang['unknownversion'] = 'Nepoznata inaÄica'; $lang['btn_info'] = 'Prikaži viÅ¡e informacija'; -$lang['btn_update'] = 'Ažuriraj'; +$lang['btn_update'] = 'Dogradi'; $lang['btn_uninstall'] = 'Ukloni'; $lang['btn_enable'] = 'Omogući'; $lang['btn_disable'] = 'Onemogući'; -$lang['btn_install'] = 'Postavi'; -$lang['btn_reinstall'] = 'Ponovno postavi'; +$lang['btn_install'] = 'Ugradi'; +$lang['btn_reinstall'] = 'Ponovno ugradi'; $lang['js']['reallydel'] = 'Zaista ukloniti ovo proÅ¡irenje?'; $lang['search_for'] = 'Pretraži proÅ¡irenja'; $lang['search'] = 'Pretraži'; @@ -34,9 +34,55 @@ $lang['homepage_link'] = 'Upute'; $lang['bugs_features'] = 'GreÅ¡ke'; $lang['tags'] = 'Oznake:'; $lang['author_hint'] = 'Potraži dodatke od ovog autora'; -$lang['installed'] = 'Postavljeno:'; +$lang['installed'] = 'UgraÄ‘eno:'; $lang['downloadurl'] = 'URL adresa preuzimanja:'; $lang['repository'] = 'Repozitorij:'; $lang['unknown'] = '<em>nepoznat</em>'; -$lang['installed_version'] = 'Postavljena inaÄica:'; +$lang['installed_version'] = 'UgraÄ‘ena inaÄica:'; $lang['install_date'] = 'VaÅ¡e zadnje osvježavanje:'; +$lang['available_version'] = 'Dostupna inaÄica'; +$lang['compatible'] = 'Kompatibilan s:'; +$lang['depends'] = 'Zavisi o:'; +$lang['similar'] = 'SliÄan s:'; +$lang['conflicts'] = 'U sukobu s:'; +$lang['donate'] = 'Poput ovog?'; +$lang['donate_action'] = 'Kupite autoru kavu!'; +$lang['repo_retry'] = 'Ponovi'; +$lang['provides'] = 'Osigurava:'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'ugraÄ‘en'; +$lang['status_not_installed'] = 'nije ugraÄ‘en'; +$lang['status_protected'] = 'zaÅ¡tićen'; +$lang['status_enabled'] = 'omogućen'; +$lang['status_disabled'] = 'onemogućen'; +$lang['status_unmodifiable'] = 'neizmjenjiv'; +$lang['status_plugin'] = 'dodatak'; +$lang['status_template'] = 'predložak'; +$lang['status_bundled'] = 'ugraÄ‘en'; +$lang['msg_enabled'] = 'Dodatak %s omogućen'; +$lang['msg_disabled'] = 'Dodatak %s onemogućen'; +$lang['msg_delete_success'] = 'ProÅ¡irenje uklonjeno'; +$lang['msg_template_install_success'] = 'Predložak %s uspjeÅ¡no ugraÄ‘en'; +$lang['msg_template_update_success'] = 'Predložak %s uspjeÅ¡no nadograÄ‘en'; +$lang['msg_plugin_install_success'] = 'Dodatak %s uspjeÅ¡no ugraÄ‘en'; +$lang['msg_plugin_update_success'] = 'Dodatak %s uspjeÅ¡no nadograÄ‘en'; +$lang['msg_upload_failed'] = 'UÄitavanje datoteke nije uspjelo'; +$lang['missing_dependency'] = '<strong>Nedostaje ili onemogućena zavisnost:</strong> %s'; +$lang['security_issue'] = '<strong>Sigurnosno pitanje:</strong> %s'; +$lang['security_warning'] = '<strong>Sigurnosno upozorenje:</strong> %s'; +$lang['update_available'] = '<strong>Nadogranja:</strong> Nova inaÄica %s je dostupna.'; +$lang['wrong_folder'] = '<strong>Dodatak neispravno ugraÄ‘en:</strong> Preimenujte mapu dodatka iz "%s" u "%s".'; +$lang['url_change'] = '<strong>URL izmijenjen:</strong> Adresa za preuzimanje je promijenjena od zadnjeg preuzimanja. Provjerite da li je novu URL valjan prije nadogradnje proÅ¡irenja.<br />Novi: %s<br />Stari: %s'; +$lang['error_badurl'] = 'URL adrese trebaju zapoÄinjati sa http ili https'; +$lang['error_dircreate'] = 'Ne mogu napraviti privremenu mapu za prihvat preuzimanja'; +$lang['error_download'] = 'Ne mogu preuzeti datoteku: %s'; +$lang['error_decompress'] = 'Ne mogu raspakirati preuzetu datoteku. To može biti rezultati loÅ¡eg preuzimanja i tada treba pokuÅ¡ati ponovo; ili format sažimanja je nepoznat i u tom sluÄaju treba datoteku ruÄno preuzeti i ugraditi.'; +$lang['error_findfolder'] = 'Ne mogu odrediti mapu proÅ¡irenja, trebate ga ruÄno preuzeti i ugraditi'; +$lang['error_copy'] = 'Dogodila se greÅ¡ka pri kopiranju dok je pokuÅ¡avanja ugradnja datoteka u mapu <em>%s</em>: disk može biti pun ili dozvole pristupa nisu dobre. Ovo može rezultirati djelomiÄno ugraÄ‘enim dodatkom i može uÄiniti VaÅ¡ wiki nestabilnim'; +$lang['noperms'] = 'Nije moguće pisati u mapu proÅ¡iranja'; +$lang['notplperms'] = 'Nije moguće pisati u mapu predloÅ¡ka'; +$lang['nopluginperms'] = 'Nije moguće pisati u mapu dodatka'; +$lang['git'] = 'ProÅ¡irenje je ugraÄ‘eno preko Git-a, možda ga ne želite nadograÄ‘ivati ovdje.'; +$lang['install_url'] = 'Ugradi s URL-a:'; +$lang['install_upload'] = 'UÄitaj proÅ¡irenje:'; +$lang['repo_error'] = 'Repozitorij dodataka nije dostupan. Budite sigurni da server može pristupiti www.dokuwiki.org i provjerite proxy postavke.'; diff --git a/lib/plugins/extension/lang/it/lang.php b/lib/plugins/extension/lang/it/lang.php index 7dff6c5b29753e954ee27d73b2ba3d9b04fdc03e..1aa658e0f9cba8ea6b3b81bf416355c7c25f16b3 100644 --- a/lib/plugins/extension/lang/it/lang.php +++ b/lib/plugins/extension/lang/it/lang.php @@ -5,11 +5,18 @@ * * @author Francesco <francesco.cavalli@hotmail.com> * @author Fabio <fabioslurp@yahoo.it> + * @author Torpedo <dgtorpedo@gmail.com> */ +$lang['unknownauthor'] = 'Autore sconosciuto'; +$lang['unknownversion'] = 'Revisione sconosciuta'; +$lang['btn_info'] = 'Mostra maggiori informazioni'; +$lang['btn_update'] = 'Aggiorna'; +$lang['btn_uninstall'] = 'Disinstalla'; $lang['btn_enable'] = 'Abilita'; $lang['btn_disable'] = 'Disabilita'; $lang['btn_install'] = 'Installa'; $lang['btn_reinstall'] = 'Reinstalla'; +$lang['js']['reallydel'] = 'Sicuro di disinstallare questa estensione?'; $lang['search'] = 'Cerca'; $lang['homepage_link'] = 'Documenti'; $lang['bugs_features'] = 'Bug'; @@ -18,13 +25,18 @@ $lang['author_hint'] = 'Cerca estensioni per questo autore'; $lang['installed'] = 'Installato:'; $lang['downloadurl'] = 'URL download:'; $lang['repository'] = 'Repository'; +$lang['unknown'] = '<em>sconosciuto</em>'; $lang['installed_version'] = 'Versione installata'; $lang['install_date'] = 'Il tuo ultimo aggiornamento:'; $lang['available_version'] = 'Versione disponibile:'; $lang['compatible'] = 'Compatibile con:'; +$lang['depends'] = 'Dipende da:'; $lang['similar'] = 'Simile a:'; +$lang['conflicts'] = 'Conflitto con:'; $lang['donate'] = 'Simile a questo?'; +$lang['donate_action'] = 'Paga un caffè all\'autore!'; $lang['repo_retry'] = 'Riprova'; +$lang['provides'] = 'Fornisce:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'installato'; $lang['status_not_installed'] = 'non installato'; @@ -34,6 +46,15 @@ $lang['status_disabled'] = 'disabilitato'; $lang['status_unmodifiable'] = 'inmodificabile'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'modello'; +$lang['msg_enabled'] = 'Plugin %s abilitato'; +$lang['msg_disabled'] = 'Plugin %s disabilitato'; +$lang['msg_delete_success'] = 'Estensione %s disinstallata'; +$lang['msg_plugin_install_success'] = 'Plugin %s installato con successo'; +$lang['msg_plugin_update_success'] = 'Plugin %s aggiornato con successo'; +$lang['msg_upload_failed'] = 'Caricamento del file fallito'; +$lang['missing_dependency'] = '<strong>Dipendenza mancante o disabilitata: </strong> %s'; +$lang['update_available'] = '<strong>Aggiornamento:</strong> Nuova versione %s disponibile.'; +$lang['wrong_folder'] = '<strong>Plugin non installato correttamente:</strong> rinomina la directory del plugin "%s" in "%s".'; $lang['error_badurl'] = 'URLs deve iniziare con http o https'; $lang['error_dircreate'] = 'Impossibile creare una cartella temporanea per ricevere il download'; $lang['error_download'] = 'Impossibile scaricare il file: %s'; diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index dec46d629f7e4cccc5b2d94501ddc44a0e1888f1..ce6ed2b976caa533c8c95104fa14b98bf216a16e 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -5,6 +5,7 @@ * * @author Hideaki SAWADA <chuno@live.jp> * @author PzF_X <jp_minecraft@yahoo.co.jp> + * @author Satoshi Sahara <sahara.satoshi@gmail.com> */ $lang['menu'] = '拡張機能管ç†'; $lang['tab_plugins'] = 'インストール済プラグイン'; @@ -62,7 +63,8 @@ $lang['status_template'] = 'テンプレート'; $lang['status_bundled'] = 'åŒæ¢±'; $lang['msg_enabled'] = '%s プラグインを有効化ã—ã¾ã—ãŸã€‚'; $lang['msg_disabled'] = '%s プラグインを無効化ã—ã¾ã—ãŸã€‚'; -$lang['msg_delete_success'] = '拡張機能をアンインストールã—ã¾ã—ãŸã€‚'; +$lang['msg_delete_success'] = '拡張機能 %s をアンインストールã—ã¾ã—ãŸã€‚'; +$lang['msg_delete_failed'] = '拡張機能 %s ã®ã‚¢ãƒ³ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«å¤±æ•—ã—ã¾ã—ãŸã€‚'; $lang['msg_template_install_success'] = '%s テンプレートをインストールã§ãã¾ã—ãŸã€‚'; $lang['msg_template_update_success'] = '%s テンプレートを更新ã§ãã¾ã—ãŸã€‚'; $lang['msg_plugin_install_success'] = '%s プラグインをインストールã§ãã¾ã—ãŸã€‚'; @@ -84,6 +86,8 @@ $lang['noperms'] = '拡張機能ディレクトリãŒæ›¸ã込㿠$lang['notplperms'] = 'テンプレートディレクトリãŒæ›¸ãè¾¼ã¿ä¸å¯ã§ã™ã€‚'; $lang['nopluginperms'] = 'プラグインディレクトリãŒæ›¸ãè¾¼ã¿ä¸å¯ã§ã™ã€‚'; $lang['git'] = 'ã“ã®æ‹¡å¼µæ©Ÿèƒ½ã¯ Git 経由ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ãŠã‚Šã€ã“ã“ã§æ›´æ–°ã™ã¹ãã§ãªã„ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“。'; +$lang['auth'] = 'ã“ã®èªè¨¼ãƒ—ラグインã¯è¨å®šç®¡ç†ç”»é¢ã§ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ã€‚'; $lang['install_url'] = 'URL ã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ï¼š'; $lang['install_upload'] = '拡張機能をアップãƒãƒ¼ãƒ‰ï¼š'; $lang['repo_error'] = 'プラグインã®ãƒªãƒã‚¸ãƒˆãƒªã«æŽ¥ç¶šã§ãã¾ã›ã‚“。サーãƒãƒ¼ãŒ www.dokuwiki.org ã«æŽ¥ç¶šã§ãã‚‹ã“ã¨ã‚„プãƒã‚ã‚·ã®è¨å®šã‚’確èªã—ã¦ä¸‹ã•ã„。'; +$lang['nossl'] = 'PHP機能ãŒSSLをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„ãŸã‚ã€æ‹¡å¼µæ©Ÿèƒ½ã®ãƒ€ã‚¦ãƒ³ãƒãƒ¼ãƒ‰ãŒæ£å¸¸ã«å‹•ä½œã—ã¾ã›ã‚“。'; diff --git a/lib/plugins/extension/lang/ko/lang.php b/lib/plugins/extension/lang/ko/lang.php index 53c9b4481b0aea19eab9179a08f79027e5495725..5dc5d826947a4a35d8f3e6155d1326f3f8294ced 100644 --- a/lib/plugins/extension/lang/ko/lang.php +++ b/lib/plugins/extension/lang/ko/lang.php @@ -62,7 +62,8 @@ $lang['status_template'] = '템플릿'; $lang['status_bundled'] = 'í¬í•¨'; $lang['msg_enabled'] = '%s 플러그ì¸ì´ 활성화ë˜ì—ˆìŠµë‹ˆë‹¤'; $lang['msg_disabled'] = '%s 플러그ì¸ì´ 비활성화ë˜ì—ˆìŠµë‹ˆë‹¤'; -$lang['msg_delete_success'] = '확장 ê¸°ëŠ¥ì´ ì œê±°ë˜ì—ˆìŠµë‹ˆë‹¤'; +$lang['msg_delete_success'] = '%s 확장 ê¸°ëŠ¥ì´ ì œê±°ë˜ì—ˆìŠµë‹ˆë‹¤'; +$lang['msg_delete_failed'] = '%s 확장 기능 ì œê±°ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤'; $lang['msg_template_install_success'] = '%s í…œí”Œë¦¿ì„ ì„±ê³µì 으로 설치했습니다'; $lang['msg_template_update_success'] = '%s í…œí”Œë¦¿ì„ ì„±ê³µì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤'; $lang['msg_plugin_install_success'] = '%s 플러그ì¸ì„ 성공ì 으로 설치했습니다'; @@ -79,11 +80,13 @@ $lang['error_dircreate'] = '다운로드를 ë°›ì„ ìž„ì‹œ í´ë”를 만들 $lang['error_download'] = '파ì¼ì„ ë‹¤ìš´ë¡œë“œí• ìˆ˜ 없습니다: %s'; $lang['error_decompress'] = '다운로드한 파ì¼ì˜ ì••ì¶•ì„ í’€ 수 없습니다. ì´ëŠ” ì•„ë§ˆë„ ìž˜ëª»ëœ ë‹¤ìš´ë¡œë“œì˜ ê²°ê³¼ë¡œ, ì´ëŸ´ 경우 다시 ì‹œë„해야 합니다; ë˜ëŠ” 압축 형ì‹ì„ ì•Œ 수 없으며, ì´ëŸ´ 경우 수ë™ìœ¼ë¡œ ë‹¤ìš´ë¡œë“œí•˜ê³ ì„¤ì¹˜í•´ì•¼ 합니다.'; $lang['error_findfolder'] = '확장 기능 ë””ë ‰í„°ë¦¬ë¥¼ ì‹ë³„í• ìˆ˜ 없습니다, 수ë™ìœ¼ë¡œ ë‹¤ìš´ë¡œë“œí•˜ê³ ì„¤ì¹˜í•´ì•¼ 합니다'; -$lang['error_copy'] = '<em>%s</em> ë””ë ‰í„°ë¦¬ì— íŒŒì¼ì„ 설치하는 ë™ì•ˆ íŒŒì¼ ë³µì‚¬ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤: 디스í¬ê°€ 꽉 찼거나 íŒŒì¼ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ë˜ì—ˆì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 부분ì 으로 ë˜ì—ˆê±°ë‚˜ ë¶ˆì•ˆì •í•˜ê²Œ 위키 설치가 ë˜ì—ˆì„ 수 있습니다.'; +$lang['error_copy'] = '<em>%s</em> ë””ë ‰í„°ë¦¬ì— íŒŒì¼ì„ 설치하는 ë™ì•ˆ íŒŒì¼ ë³µì‚¬ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤: 디스í¬ê°€ 꽉 찼거나 íŒŒì¼ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ë˜ì—ˆì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. 플러그ì¸ì´ 부분ì 으로 설치ë˜ì–´ 위키가 ë¶ˆì•ˆì •í• ì§€ë„ ëª¨ë¦…ë‹ˆë‹¤'; $lang['noperms'] = '확장 기능 ë””ë ‰í„°ë¦¬ì— ì“¸ 수 없습니다'; $lang['notplperms'] = 'ìž„ì‹œ ë””ë ‰í„°ë¦¬ì— ì“¸ 수 없습니다'; $lang['nopluginperms'] = 'í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í„°ë¦¬ì— ì“¸ 수 없습니다'; -$lang['git'] = 'ì´ í™•ìž¥ ê¸°ëŠ¥ì€ gitì„ í†µí•´ 설치ë˜ì—ˆìœ¼ë©°, 여기ì—ì„œ ì—…ë°ì´íŠ¸í• 수 ì—†ì„ ìˆ˜ 있습니다.'; +$lang['git'] = 'ì´ í™•ìž¥ ê¸°ëŠ¥ì€ git를 통해 설치ë˜ì—ˆìœ¼ë©°, 여기ì—ì„œ ì—…ë°ì´íŠ¸í• 수 ì—†ì„ ìˆ˜ 있습니다.'; +$lang['auth'] = 'ì´ ì¸ì¦ 플러그ì¸ì€ 환경 ì„¤ì •ì—ì„œ í™œì„±í™”í• ìˆ˜ 없습니다, ê·¸ê²ƒì„ ë¹„í™œì„±í™”í•˜ëŠ” ê²ƒì„ ê³ ë ¤í•˜ì„¸ìš”.'; $lang['install_url'] = 'URLì—ì„œ 설치:'; $lang['install_upload'] = '확장 기능 올리기:'; $lang['repo_error'] = 'í”ŒëŸ¬ê·¸ì¸ ì €ìž¥ì†Œì— ì—°ê²°í• ìˆ˜ 없습니다. 서버가 www.dokuwiki.orgì— ì—°ê²°í• ìˆ˜ 있는지 확ì¸í•˜ê³ 프ë¡ì‹œ ì„¤ì •ì„ í™•ì¸í•˜ì„¸ìš”.'; +$lang['nossl'] = 'PHPê°€ SSL 지ì›ì„ 하지 않는 것으로 보입니다. ë§Žì€ ë„ì¿ ìœ„í‚¤ 확장 ê¸°ëŠ¥ì˜ ë‹¤ìš´ë¡œë“œê°€ ìž‘ë™í•˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤.'; diff --git a/lib/plugins/extension/lang/nl/lang.php b/lib/plugins/extension/lang/nl/lang.php index a54924e937bcba8aa73130ac752d888d7acd5799..f75f78121abb5a63900d310498a90f44fb650f6b 100644 --- a/lib/plugins/extension/lang/nl/lang.php +++ b/lib/plugins/extension/lang/nl/lang.php @@ -63,7 +63,7 @@ $lang['status_template'] = 'template'; $lang['status_bundled'] = 'Gebundeld'; $lang['msg_enabled'] = 'Plugin %s ingeschakeld'; $lang['msg_disabled'] = 'Plugin %s uitgeschakeld'; -$lang['msg_delete_success'] = 'Uitbreiding gedeinstalleerd'; +$lang['msg_delete_success'] = 'Uitbreiding %s gedeinstalleerd'; $lang['msg_template_install_success'] = 'Template %s werd succesvol geïnstalleerd'; $lang['msg_template_update_success'] = 'Template %s werd succesvol geüpdatet'; $lang['msg_plugin_install_success'] = 'Plugin %s werd succesvol geïnstalleerd'; diff --git a/lib/plugins/extension/lang/ru/intro_install.txt b/lib/plugins/extension/lang/ru/intro_install.txt new file mode 100644 index 0000000000000000000000000000000000000000..7b8ac661bb2d62c88a3969617b987b09c0eba1d2 --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_install.txt @@ -0,0 +1 @@ +ЗдеÑÑŒ вы можете ÑамоÑтоÑтельно уÑтановить плагины и шаблоны, загрузив их или предоÑтавив прÑмой URL Ð´Ð»Ñ ÑкачиваниÑ. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_plugins.txt b/lib/plugins/extension/lang/ru/intro_plugins.txt new file mode 100644 index 0000000000000000000000000000000000000000..7262516db9bf82ff44b2c9969d5c7b6b4fd458ee --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_plugins.txt @@ -0,0 +1 @@ +Плагины, уÑтановленные в вашей DokuWiki. ЗдеÑÑŒ вы можете их включить или выключить, или даже полноÑтью удалить. Также здеÑÑŒ показываютÑÑ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð¾Ð², обÑзательно прочтите документацию плагина перед обновлением. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_search.txt b/lib/plugins/extension/lang/ru/intro_search.txt new file mode 100644 index 0000000000000000000000000000000000000000..a8486eab6c386db5511250dcaa020202dc701d0d --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_search.txt @@ -0,0 +1 @@ +Ðта вкладка дает вам доÑтуп ко вÑем имеющимÑÑ Ñторонним плагинам и шаблонам Ð´Ð»Ñ DokuWiki. Имейте в виду, что уÑтановка Ñтороннего кода может предÑтавлÑÑ‚ÑŒ **угрозу безопаÑноÑти**, возможно вам нужно Ñперва прочитать о [[doku>security#plugin_security|безопаÑноÑти плагинов]]. \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_templates.txt b/lib/plugins/extension/lang/ru/intro_templates.txt new file mode 100644 index 0000000000000000000000000000000000000000..2d0b742567e57d9e5030ee15efee9d91674e66e4 --- /dev/null +++ b/lib/plugins/extension/lang/ru/intro_templates.txt @@ -0,0 +1 @@ +Ðто шаблоны, уÑтановленные в вашей DokuWiki. Ð’Ñ‹ можете выбрать шаблон, который нужно иÑпользовать в [[?do=admin&page=config|Менеджере Конфигурации]] \ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index fa1625f280c1dfcb4fdb1df5f289eb8fe0421c55..64db39b789551929df095e08c137ef95f01f6232 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -5,13 +5,19 @@ * * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Igor Degraf <igordegraf@gmail.com> + * @author Type-kun <workwork-1@yandex.ru> + * @author Vitaly Filatenko <kot@hacktest.net> */ $lang['menu'] = 'Управление дополнениÑми'; $lang['tab_plugins'] = 'УÑтановленные плагины'; $lang['tab_templates'] = 'УÑтановленные шаблоны'; $lang['tab_search'] = 'ПоиÑк и уÑтановка'; $lang['tab_install'] = 'Ð ÑƒÑ‡Ð½Ð°Ñ ÑƒÑтановка'; +$lang['notimplemented'] = 'Ðта возможноÑÑ‚ÑŒ ещё не реализована'; $lang['notinstalled'] = 'Ðто дополнение не уÑтановлено'; +$lang['alreadyenabled'] = 'Ðто раÑширение уже включено'; +$lang['alreadydisabled'] = 'Ðто раÑширение уже выключено'; +$lang['pluginlistsaveerror'] = 'Ошибка при Ñохранении ÑпиÑка плагинов'; $lang['unknownauthor'] = 'Ðвтор неизвеÑтен'; $lang['unknownversion'] = 'ВерÑÐ¸Ñ Ð½ÐµÐ¸Ð·Ð²ÐµÑтна'; $lang['btn_info'] = 'Отобразить доп. информацию'; @@ -25,8 +31,10 @@ $lang['js']['reallydel'] = 'ДейÑтвительно удалить ÑÑ‚ $lang['search_for'] = 'ПоиÑк дополнениÑ:'; $lang['search'] = 'Ðайти'; $lang['extensionby'] = '<strong>%s</strong> — %s'; -$lang['popularity'] = 'ПопоулÑрноÑÑ‚ÑŒ: %s%%'; -$lang['bugs_features'] = 'Ошибки'; +$lang['screenshot'] = 'Скриншот: %s'; +$lang['popularity'] = 'ПопулÑрноÑÑ‚ÑŒ: %s%%'; +$lang['homepage_link'] = 'ОпиÑание'; +$lang['bugs_features'] = 'Баг-трекер'; $lang['tags'] = 'Метки:'; $lang['author_hint'] = 'Ðайти Ð´Ð¾Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñтого автора'; $lang['installed'] = 'УÑтановлено:'; @@ -43,26 +51,42 @@ $lang['conflicts'] = 'Конфликтует Ñ:'; $lang['donate'] = 'ÐравитÑÑ?'; $lang['donate_action'] = 'Купить автору кофе!'; $lang['repo_retry'] = 'Повторить'; +$lang['provides'] = 'ПредоÑтавлÑет:'; +$lang['status'] = 'СтатуÑ:'; $lang['status_installed'] = 'уÑтановлено'; $lang['status_not_installed'] = 'не уÑтановлено'; $lang['status_protected'] = 'защищено'; -$lang['status_enabled'] = 'включен'; +$lang['status_enabled'] = 'включён'; $lang['status_disabled'] = 'отключено'; $lang['status_unmodifiable'] = 'неизменÑемо'; $lang['status_plugin'] = 'плагин'; $lang['status_template'] = 'шаблон'; $lang['status_bundled'] = 'в комплекте'; -$lang['msg_enabled'] = 'Плагин %s включен'; -$lang['msg_disabled'] = 'Плагин %s отключен'; +$lang['msg_enabled'] = 'Плагин %s включён'; +$lang['msg_disabled'] = 'Плагин %s отключён'; $lang['msg_delete_success'] = 'Дополнение удалено'; +$lang['msg_delete_failed'] = 'Ðе удалоÑÑŒ удалить раÑширение %s'; $lang['msg_template_install_success'] = 'Шаблон %s уÑпешно уÑтановлен'; $lang['msg_template_update_success'] = 'Шаблон %s уÑпешно обновлён'; $lang['msg_plugin_install_success'] = 'Плагин %s уÑпешно уÑтановлен'; $lang['msg_plugin_update_success'] = 'Плагин %s уÑпешно обновлён'; -$lang['noperms'] = 'Папка Ð´Ð»Ñ Ñ€Ð°Ñширений не доÑтупна на запиÑÑŒ'; -$lang['notplperms'] = 'Папка Ð´Ð»Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¾Ð² не доÑтупна на запиÑÑŒ'; -$lang['nopluginperms'] = 'Папка плагинов не доÑтупна на запиÑÑŒ'; -$lang['git'] = 'Ðто раÑширение было уÑтановлено через git, Ð’Ñ‹ не можете обновить его тут.'; +$lang['msg_upload_failed'] = 'Ðе удалоÑÑŒ загрузить файл'; +$lang['missing_dependency'] = '<strong>ОтÑутÑтвует или отключена завиÑимоÑÑ‚ÑŒ:</strong> %s'; +$lang['security_issue'] = '<strong>Проблема безопаÑноÑти:</strong> %s'; +$lang['security_warning'] = '<strong>Предупреждение безопаÑноÑти:</strong> %s'; +$lang['update_available'] = '<strong>Обновление:</strong> доÑтупна Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ %s.'; +$lang['wrong_folder'] = '<strong>Плагин уÑтановлен неправильно:</strong> Переименуйте директорию "%s" в "%s".'; +$lang['url_change'] = '<strong>СÑылка изменилаÑÑŒ:</strong> СÑылка Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ изменилаÑÑŒ Ñ Ð¿Ñ€Ð¾ÑˆÐ»Ð¾Ð³Ð¾ раза. Проверьте новую ÑÑылку прежде чем обновлÑÑ‚ÑŒ раÑширение.<br />ÐоваÑ: %s<br />СтараÑ: %s'; +$lang['error_badurl'] = 'СÑылки должны начинатьÑÑ Ñ http или https'; +$lang['error_dircreate'] = 'Ðе удалоÑÑŒ Ñоздать временную директорию Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸'; +$lang['error_download'] = 'Ðе удалоÑÑŒ загрузить файл: %s'; +$lang['error_decompress'] = 'Ðе удалоÑÑŒ раÑпаковать загруженный файл. Возможно, файл был повреждён при загрузке - тогда нужно попробовать ещё раз. Либо неизвеÑтен формат архива - тогда загрузку и уÑтановку надо произвеÑти вручную.'; +$lang['error_findfolder'] = 'Ðе удалоÑÑŒ определить директорию Ð´Ð»Ñ Ñ€Ð°ÑширениÑ, загрузку и уÑтановку надо произвеÑти вручную.'; +$lang['error_copy'] = 'Возникла ошибка ÐºÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² в директорию <em>%s</em>: возможно, диÑк переполнен, или неверно выÑтавлены права доÑтупа. Ðто могло привеÑти к неполной уÑтановке плагина и нарушить работу вашей вики.'; +$lang['noperms'] = 'Папка Ð´Ð»Ñ Ñ€Ð°Ñширений недоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи'; +$lang['notplperms'] = 'Папка Ð´Ð»Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¾Ð² недоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи'; +$lang['nopluginperms'] = 'Папка плагинов недоÑтупна Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи'; +$lang['git'] = 'Ðто раÑширение было уÑтановлено через git. Ð’Ñ‹ не можете обновить его тут.'; $lang['install_url'] = 'УÑтановить Ñ Ð°Ð´Ñ€ÐµÑа URL:'; $lang['install_upload'] = 'Скачать раÑширение:'; -$lang['repo_error'] = 'Сайт Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð°Ð¼Ð¸ недоÑтупен. УбедитеÑÑŒ, что у Ñайта еÑÑ‚ÑŒ доÑтуп на www.dokuwiki.org и также проверьте наÑтройки ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾ÐºÑи.'; +$lang['repo_error'] = 'Сайт Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½Ð°Ð¼Ð¸ недоÑтупен. УбедитеÑÑŒ, что у Ñайта еÑÑ‚ÑŒ доÑтуп на www.dokuwiki.org, а также проверьте наÑтройки ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ð˜Ð½Ñ‚ÐµÑ€Ð½ÐµÑ‚Ð¾Ð¼.'; diff --git a/lib/plugins/extension/lang/zh-tw/intro_install.txt b/lib/plugins/extension/lang/zh-tw/intro_install.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ba93f5f8d17fa55254176e23726ba637aed4ff2 --- /dev/null +++ b/lib/plugins/extension/lang/zh-tw/intro_install.txt @@ -0,0 +1 @@ +在æ¤ä½ å¯ä»¥é€éŽæª”案上傳或æ供下載網å€çš„æ–¹å¼ï¼Œé€²è¡Œæ‰‹å‹•å®‰è£å¤–æŽ›èˆ‡ç‰ˆåž‹é¢¨æ ¼ã€‚ \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh-tw/intro_plugins.txt b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt new file mode 100644 index 0000000000000000000000000000000000000000..b5b77a26734dc00381e67415a592e59d32849b09 --- /dev/null +++ b/lib/plugins/extension/lang/zh-tw/intro_plugins.txt @@ -0,0 +1 @@ +已經有一些外掛套件被安è£åœ¨ä½ çš„DokuWiki之ä¸ã€‚ä½ å¯ä»¥åœ¨é€™è£¡å•Ÿç”¨ã€ç¦ç”¨ï¼Œç”šè‡³æ˜¯å®Œå…¨ç§»é™¤å®ƒå€‘。如外掛å¯æ›´æ–°ä¹ŸåŒæ™‚會顯示在這裡,請確ä¿åœ¨æ›´æ–°å‰å…ˆé–±è®€éŽè©²å¥—件之文件。 \ No newline at end of file diff --git a/lib/plugins/extension/lang/zh-tw/lang.php b/lib/plugins/extension/lang/zh-tw/lang.php index 304aed5ee5b185e3c5d9a5a28bea02262606e39c..79657ffeb4b8da326b5714fc9a311c8d47ad8cb9 100644 --- a/lib/plugins/extension/lang/zh-tw/lang.php +++ b/lib/plugins/extension/lang/zh-tw/lang.php @@ -4,8 +4,77 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Stan <talktostan@gmail.com> + * @author June-Hao Hou <junehao@gmail.com> + * @author lioujheyu <lioujheyu@gmail.com> */ +$lang['menu'] = '延伸功能管ç†'; +$lang['tab_plugins'] = '已安è£å¤–掛'; $lang['tab_templates'] = '已安è£è£æ¨¡ç‰ˆ '; $lang['tab_search'] = 'æœå°‹èˆ‡å®‰è£'; +$lang['tab_install'] = '手動安è£'; +$lang['notimplemented'] = 'æ¤åŠŸèƒ½å°šæœªå®Œæˆ'; +$lang['notinstalled'] = 'æ¤å»¶ä¼¸åŠŸèƒ½å°šæœªå®‰è£'; +$lang['alreadyenabled'] = 'æ¤å»¶ä¼¸åŠŸèƒ½å·²ç¶“安è£'; +$lang['alreadydisabled'] = 'æ¤å»¶ä¼¸åŠŸèƒ½åœç”¨'; +$lang['unknownauthor'] = '作者未知'; +$lang['unknownversion'] = '版本未知'; +$lang['btn_info'] = '顯示更多訊æ¯'; $lang['btn_update'] = 'æ›´æ–°'; +$lang['btn_uninstall'] = '移除安è£'; +$lang['btn_enable'] = '啟用'; +$lang['btn_disable'] = 'åœç”¨'; +$lang['btn_install'] = '安è£'; +$lang['btn_reinstall'] = 'é‡æ–°å®‰è£'; +$lang['js']['reallydel'] = '確定è¦ç§»é™¤æ¤å»¶ä¼¸åŠŸèƒ½ï¼Ÿ'; +$lang['search_for'] = 'æœå°‹å»¶ä¼¸åŠŸèƒ½ï¼š'; +$lang['search'] = 'æœå°‹'; +$lang['homepage_link'] = '文件'; +$lang['tags'] = '標籤:'; +$lang['author_hint'] = 'æœå°‹ç›¸åŒä½œè€…的延伸功能'; +$lang['installed'] = '已安è£ï¼š'; +$lang['downloadurl'] = '下載網å€ï¼š'; +$lang['unknown'] = '<em>未知</em>'; +$lang['installed_version'] = '已安è£ç‰ˆæœ¬ï¼š'; +$lang['install_date'] = 'ä½ æœ€å¾Œä¸€æ¬¡æ›´æ–°: '; +$lang['available_version'] = 'å¯ç”¨ç‰ˆæœ¬ï¼š'; +$lang['compatible'] = '相容於:'; +$lang['depends'] = 'ä¾è³´æ–¼: '; +$lang['similar'] = '類似於: '; +$lang['conflicts'] = '相è¡çªæ–¼: '; +$lang['donate'] = 'åƒé€™æ¨£ï¼Ÿ'; +$lang['donate_action'] = '請作者一æ¯å’–å•¡ï¼'; +$lang['repo_retry'] = 'å†è©¦ä¸€æ¬¡'; +$lang['status'] = '狀態:'; +$lang['status_installed'] = '已安è£'; +$lang['status_not_installed'] = '未安è£'; +$lang['status_protected'] = 'å·²ä¿è·'; +$lang['status_enabled'] = '作用ä¸'; +$lang['status_disabled'] = 'åœç”¨ä¸'; +$lang['status_unmodifiable'] = 'ä¸å¯æ›´å‹•'; +$lang['status_plugin'] = '外掛'; +$lang['status_template'] = '模æ¿'; +$lang['status_bundled'] = '已綑ç¶å…§é™„'; +$lang['msg_enabled'] = '外掛 %s 已啟用'; +$lang['msg_disabled'] = '外掛 %s å·²ç¦ç”¨'; +$lang['msg_delete_success'] = 'é™„åŠ å…ƒä»¶å·²ç§»é™¤'; +$lang['msg_template_install_success'] = 'æ¨¡æ¿ %s 以æˆåŠŸå®‰è£'; +$lang['msg_template_update_success'] = 'æ¨¡æ¿ %s 以æˆåŠŸæ›´æ–°'; +$lang['msg_plugin_install_success'] = '外掛 %s 以æˆåŠŸå®‰è£'; +$lang['msg_plugin_update_success'] = '外掛 %s 以æˆåŠŸæ›´æ–°'; +$lang['msg_upload_failed'] = '上傳檔案失敗'; +$lang['missing_dependency'] = '<strong>éºå¤±æˆ–ç¦ç”¨ç›¸ä¾æ€§å¥—件:</strong> %s'; +$lang['security_issue'] = '<strong>安全性å•é¡Œ:</strong> %s'; +$lang['security_warning'] = '<strong>安全å•é¡Œè¦å‘Š:</strong> %s'; +$lang['update_available'] = '<strong>æ›´æ–°:</strong> å·²å¯å–å¾— %s 的新版本'; +$lang['wrong_folder'] = '<strong>外掛安è£ä¸æ£ç¢º:</strong> 將外掛資料夾從 "%s" æ›´å至 "%s"。'; +$lang['url_change'] = '<strong>網å€å·²è®Šæ›´:</strong> 自從上次下載後下載網å€å·²è®Šæ›´ã€‚在更新延伸功能å‰è«‹å…ˆæª¢æŸ¥æ–°ç¶²å€æ˜¯å¦å¯ç”¨ã€‚<br />æ–°: %s<br />舊: %s'; +$lang['error_download'] = '無法下載檔案:%s'; +$lang['error_decompress'] = '無法解壓縮檔案。這å¯èƒ½æ˜¯ä¸‹è¼‰å“質ä¸ä½³æ‰€è‡´ï¼Œåœ¨é€™å€‹æƒ…æ³ä¸‹ä½ 應該å†è©¦ä¸€æ¬¡ï¼›ä¹Ÿæœ‰å¯èƒ½æ˜¯å› 為無法辨è˜çš„å£“ç¸®æ ¼å¼ï¼Œåœ¨é€™å€‹æƒ…æ³ä¸‹ä½ 應該自行下載並手動安è£'; +$lang['error_findfolder'] = '無法辨èªå»¶ä¼¸åŠŸèƒ½è³‡æ–™å¤¾ï¼Œä½ å¿…é ˆè‡ªè¡Œä¸‹è¼‰ä¸¦æ‰‹å‹•å®‰è£'; +$lang['noperms'] = '延伸功能資料夾無法寫入'; +$lang['notplperms'] = '版型資料夾無法寫入'; +$lang['nopluginperms'] = '外掛資料夾無法寫入'; +$lang['git'] = 'æ¤å»¶ä¼¸åŠŸèƒ½æ˜¯é€éŽgit安è£çš„,最好ä¸è¦ç”¨ä¸Šå‚³æ–¹å¼ã€‚'; +$lang['install_url'] = 'é€éŽç¶²å€å®‰è£ï¼š'; +$lang['install_upload'] = '上傳延伸功能:'; diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 9265f44d5608f2c0bc5affa3b5d2e06b342e73c3..773256faf24b102a8f488ba6b0ad3226278b1e62 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -44,9 +44,14 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { $this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info'); } - /** * Handle the match + * + * @param string $match The text matched by the patterns + * @param int $state The lexer state for the match + * @param int $pos The character position of the matched text + * @param Doku_Handler $handler The Doku_Handler object + * @return array Return an array with all data you want to use in render */ function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end @@ -55,6 +60,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Create output + * + * @param string $format string output format being rendered + * @param Doku_Renderer $renderer the current renderer object + * @param array $data data created by handler() + * @return boolean rendered correctly? */ function render($format, Doku_Renderer $renderer, $data) { if($format == 'xhtml'){ @@ -103,8 +113,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param string $type + * @param Doku_Renderer_xhtml $renderer */ - function _plugins_xhtml($type, Doku_Renderer &$renderer){ + function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){ global $lang; $renderer->doc .= '<ul>'; @@ -114,7 +127,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { // remove subparts foreach($plugins as $p){ if (!$po = plugin_load($type,$p)) continue; - list($name,$part) = explode('_',$p,2); + list($name,/* $part */) = explode('_',$p,2); $plginfo[$name] = $po->getInfo(); } @@ -141,8 +154,10 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * list all installed plugins * * uses some of the original renderer methods + * + * @param Doku_Renderer_xhtml $renderer */ - function _helpermethods_xhtml(Doku_Renderer &$renderer){ + function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){ $plugins = plugin_list('helper'); foreach($plugins as $p){ if (!$po = plugin_load('helper',$p)) continue; @@ -189,6 +204,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax types and their registered modes + * + * @return string */ function _syntaxtypes_xhtml(){ global $PARSER_MODES; @@ -211,6 +228,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * lists all known syntax modes and their sorting value + * + * @return string */ function _syntaxmodes_xhtml(){ $modes = p_get_parsermodes(); @@ -249,13 +268,18 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Adds a TOC item + * + * @param string $text + * @param int $level + * @param Doku_Renderer_xhtml $renderer + * @return string */ - function _addToTOC($text, $level, Doku_Renderer &$renderer){ + protected function _addToTOC($text, $level, Doku_Renderer_xhtml $renderer){ global $conf; + $hid = ''; if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){ - /** @var $renderer Doku_Renderer_xhtml */ - $hid = $renderer->_headerToLink($text, 'true'); + $hid = $renderer->_headerToLink($text, true); $renderer->toc[] = array( 'hid' => $hid, 'title' => $text, diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index eacde06d00f7816c3a9de1da8d90f6a1f5b0dd7e..b4fb33b9069adc354b0017416560412c2f787bee 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -74,6 +74,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Check if autosubmit is enabled + * * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ @@ -82,6 +83,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Send the data, to the submit url + * * @param string $data The popularity data * @return string An empty string if everything worked fine, a string describing the error otherwise */ @@ -97,6 +99,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Compute the last time the data was sent. If it has never been sent, we return 0. + * + * @return int */ function lastSentTime(){ $manualSubmission = @filemtime($this->popularityLastSubmitFile); @@ -107,6 +111,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return string The popularity data as a string */ function gatherAsString(){ @@ -124,6 +129,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { /** * Gather all information + * * @return array The popularity data as an array */ function _gather(){ @@ -288,17 +294,24 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @author <gilthans dot NO dot SPAM at gmail dot com> * @link http://de3.php.net/manual/en/ini.core.php#79564 + * + * @param string $v + * @return int|string */ function _to_byte($v){ $l = substr($v, -1); $ret = substr($v, 0, -1); switch(strtoupper($l)){ + /** @noinspection PhpMissingBreakStatementInspection */ case 'P': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'T': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'G': $ret *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'M': $ret *= 1024; case 'K': diff --git a/lib/plugins/popularity/lang/eu/lang.php b/lib/plugins/popularity/lang/eu/lang.php index b52ccaee1cf4b6c0785f1de80abc61aa468fa5b2..b5b80357c6ddbdd1f46a2b216be6f76bcd0ddb4c 100644 --- a/lib/plugins/popularity/lang/eu/lang.php +++ b/lib/plugins/popularity/lang/eu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Basque language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Inko Illarramendi <inko.i.a@gmail.com> * @author Zigor Astarbe <astarbe@gmail.com> */ diff --git a/lib/plugins/popularity/lang/hr/intro.txt b/lib/plugins/popularity/lang/hr/intro.txt new file mode 100644 index 0000000000000000000000000000000000000000..c7c3eba61e4dc1551c889cb4060abdc73681885a --- /dev/null +++ b/lib/plugins/popularity/lang/hr/intro.txt @@ -0,0 +1,7 @@ +====== Povratna informacija o popularnosti ====== + +Ovaj [[doku>popularity|alat]] prikupla anonimne podatke o VaÅ¡em wiki i omogućava Vam da ih poÅ¡aljete DokuWiki razvojnom timu. To im pomaže da bolje razumiju kako korisnici koriste DokuWiki i osigurava kvalitetnije odluke o budućem razvoju u skladu s stvarnim koriÅ¡tenjem. + +Pozivamo Vas da ponavljate ovaj korak s vremena na vrijeme kako bi razvojni tim bio obavijeÅ¡ten o razvoju VaÅ¡eg wiki-a. VaÅ¡i novi podaci biti će identificirani putem anonimne oznake. + +Prikupljeni podatci sadrže informacije kako Å¡to je DokuWiki inaÄica, broj i veliÄina vaÅ¡ih stranica i datoteka, ugraÄ‘eni dodatci i PHP-u koji se koristi. Sirovi podatci koji će biti poslani su prikazani niže. Molim koristite gumb "PoÅ¡alji podatke" da bi ste poslali ove informacije. diff --git a/lib/plugins/popularity/lang/hr/lang.php b/lib/plugins/popularity/lang/hr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..a8ea707281ff9ba8c2492c2b771a09686591a7d7 --- /dev/null +++ b/lib/plugins/popularity/lang/hr/lang.php @@ -0,0 +1,14 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Davor Turkalj <turki.bsc@gmail.com> + */ +$lang['name'] = 'Povratna informacija o popularnosti (može proteći neko vrijeme dok se uÄita)'; +$lang['submit'] = 'PoÅ¡alji podatke'; +$lang['autosubmit'] = 'Å alji podatke automatski jednom mjeseÄno'; +$lang['submissionFailed'] = 'Podatci ne mogu biti poslani zbog slijedeće greÅ¡ke:'; +$lang['submitDirectly'] = 'Podatke možete poslati ruÄno potvrÄ‘ivanjem forme u nastavku.'; +$lang['autosubmitError'] = 'Zadnje automatsko slanje nije uspjeÅ¡no zbog slijedeće greÅ¡ke:'; +$lang['lastSent'] = 'Podatci su poslani'; diff --git a/lib/plugins/popularity/lang/hr/submitted.txt b/lib/plugins/popularity/lang/hr/submitted.txt new file mode 100644 index 0000000000000000000000000000000000000000..8c841b3df2cf5b2378bc49a0458e22769e34ae1d --- /dev/null +++ b/lib/plugins/popularity/lang/hr/submitted.txt @@ -0,0 +1,3 @@ +====== Povratna informacija o popularnosti ====== + +Podatci su uspjeÅ¡no poslani. \ No newline at end of file diff --git a/lib/plugins/revert/lang/ar/lang.php b/lib/plugins/revert/lang/ar/lang.php index 71f411c52054af4cba3f218633b0e1eb8536cf92..6262cc6741a995635a1c859bcf7e64a351f09e08 100644 --- a/lib/plugins/revert/lang/ar/lang.php +++ b/lib/plugins/revert/lang/ar/lang.php @@ -8,6 +8,7 @@ * @author uahello@gmail.com * @author Ahmad Abd-Elghany <tolpa1@gmail.com> * @author alhajr <alhajr300@gmail.com> + * @author Mohamed Belhsine <b.mohamed897@gmail.com> */ $lang['menu'] = 'مدير الاسترجاع'; $lang['filter'] = 'ابØØ« ÙÙŠ الصÙØات المتأذاة'; diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index e1b47bb8da6c210af5606bf01eadd95c02217c40..619a9d929af2a2f6ce057af30baefe9a25649ef1 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -17,6 +17,8 @@ * @author Gerrit Uitslag <klapinklapin@gmail.com> * @author Petr KlÃma <qaxi@seznam.cz> * @author Radovan Buroň <radovan@buron.cz> + * @author Viktor Zavadil <vzavadil@newps.cz> + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['menu'] = 'Obnova zaspamovaných stránek'; $lang['filter'] = 'Hledat zaspamované stránky'; diff --git a/lib/plugins/revert/lang/eu/lang.php b/lib/plugins/revert/lang/eu/lang.php index d3532c070e086a86282a2f51e662e231a5720937..40be3e38226752860a2708cb93823fa2f5fb12ad 100644 --- a/lib/plugins/revert/lang/eu/lang.php +++ b/lib/plugins/revert/lang/eu/lang.php @@ -1,9 +1,11 @@ <?php + /** - * Basque language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Inko Illarramendi <inko.i.a@gmail.com> * @author Zigor Astarbe <astarbe@gmail.com> + * @author Yadav Gowda <yadav.gowda@gmail.com> */ $lang['menu'] = 'Berrezartze Kudeatzailea'; $lang['filter'] = 'Bilatu spam duten orriak'; diff --git a/lib/plugins/revert/lang/hr/intro.txt b/lib/plugins/revert/lang/hr/intro.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d7a52dfbc2ffcbfc2be5efcbc7e212d06068e0e --- /dev/null +++ b/lib/plugins/revert/lang/hr/intro.txt @@ -0,0 +1,3 @@ +====== Pomoćnik za povrat ====== + +Pomaže vam pri povratku u sluÄaju spam napada. Da bi ste naÅ¡li listu stranica koje su oneÄišćene spam-om unesite tekst za potragu (npr. spam URL), te potvrdite da su naÄ‘ene stranice zaista spam i vratite na prethodno stanje. \ No newline at end of file diff --git a/lib/plugins/revert/lang/hr/lang.php b/lib/plugins/revert/lang/hr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..59413690224c696086b57bc3a8466a69adf2176c --- /dev/null +++ b/lib/plugins/revert/lang/hr/lang.php @@ -0,0 +1,16 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Davor Turkalj <turki.bsc@gmail.com> + */ +$lang['menu'] = 'Pomoćnik za povrat stanja'; +$lang['filter'] = 'Potraži spam stranice'; +$lang['revert'] = 'Povrati odabrane stranice'; +$lang['reverted'] = '%s vraćena na izdanje %s'; +$lang['removed'] = '%s uklonjen'; +$lang['revstart'] = 'Proces povratka zapoÄeo. To može potrajati. Ako se dogodi istek vremena prije zavrÅ¡etka, trebate povrat stranica vrÅ¡iti u manjim grupama.'; +$lang['revstop'] = 'Proces povratka uspjeÅ¡no zavrÅ¡io.'; +$lang['note1'] = 'Obavijest: ova pretraga razlikuje velika/mala slova'; +$lang['note2'] = 'Obavijest: stranica će biti vraćena na zadnje stanje koje ne sadrži traženi spam termin <i>%s</i>.'; diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index 5666100e904001753d5944944562c46f89412b74..df4b271b1302e1f22d9cd46775fdef94b80e44ba 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -18,4 +18,4 @@ $lang['removed'] = '%s ì œê±°ë¨'; $lang['revstart'] = 'ë˜ëŒë¦¬ê¸° ìž‘ì—…ì„ ì‹œìž‘í•©ë‹ˆë‹¤. 오랜 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다. 완료ë˜ê¸° ì „ì— ìŠ¤í¬ë¦½íŠ¸ 시간 초과가 ë°œìƒí•œë‹¤ë©´ ë” ìž‘ì€ ìž‘ì—…ìœ¼ë¡œ 나누어서 ë˜ëŒë¦¬ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; $lang['revstop'] = 'ë˜ëŒë¦¬ê¸° ìž‘ì—…ì´ ì„±ê³µì 으로 ë났습니다.'; $lang['note1'] = 'ì°¸ê³ : 대소문ìžë¥¼ 구별해 찾습니다'; -$lang['note2'] = 'ì°¸ê³ : 문서는 <i>%s</i> 스팸 단어를 í¬í•¨í•˜ì§€ ì•Šì€ ìµœì‹ íŒìœ¼ë¡œ ë˜ëŒë¦½ë‹ˆë‹¤. '; +$lang['note2'] = 'ì°¸ê³ : 문서는 <i>%s</i> 스팸 단어를 í¬í•¨í•˜ì§€ ì•Šì€ ìµœì‹ íŒìœ¼ë¡œ ë˜ëŒë¦½ë‹ˆë‹¤.'; diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php index 6806dcd93cb6cf143bef83969f0613a4b80939ed..76da8ca9cfe65d77dd7a482feafa94bdc45a7e79 100644 --- a/lib/plugins/revert/lang/no/lang.php +++ b/lib/plugins/revert/lang/no/lang.php @@ -19,6 +19,7 @@ * @author Thomas Juberg <Thomas.Juberg@Gmail.com> * @author Boris <boris@newton-media.no> * @author Christopher Schive <chschive@frisurf.no> + * @author Patrick <spill.p@hotmail.com> */ $lang['menu'] = 'Tilbakestillingsbehandler'; $lang['filter'] = 'Søk etter søppelmeldinger'; diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 4a301f927fa4f4ddb988fc6e10f87d8f84674215..9e2913d78c1c3c835744bd7d87aa9c44d5a956f0 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -52,6 +52,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * 'stack' - Special case. Plugin wraps other paragraphs. * * @see Doku_Handler_Block + * * @return string */ function getPType(){ @@ -70,7 +71,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * @param int $state The lexer state for the match * @param int $pos The character position of the matched text * @param Doku_Handler $handler The Doku_Handler object - * @return array Return an array with all data you want to use in render + * @return bool|array Return an array with all data you want to use in render, false don't add an instruction */ function handle($match, $state, $pos, Doku_Handler $handler){ trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); @@ -94,10 +95,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { * The contents of the $data array depends on what the handler() function above * created * - * @param $format string output format being rendered - * @param $renderer Doku_Renderer the current renderer object - * @param $data array data created by handler() - * @return boolean rendered correctly? + * @param string $format output format being rendered + * @param Doku_Renderer $renderer the current renderer object + * @param array $data data created by handler() + * @return boolean rendered correctly? (however, returned value is not used at the moment) */ function render($format, Doku_Renderer $renderer, $data) { trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index b67d91b361de83f6f8fc129555fcc73fb9db8135..86562f1dd7fc36fdebe6754295c54ad502e22b64 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -58,9 +58,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } - /** - * Return prompt for admin menu - */ + /** + * Return prompt for admin menu + * + * @param string $language + * @return string + */ public function getMenuText($language) { if (!is_null($this->_auth)) @@ -71,6 +74,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * return sort order for position in admin menu + * + * @return int */ public function getMenuSort() { return 2; @@ -78,6 +83,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Handle user request + * + * @return bool */ public function handle() { global $INPUT; @@ -128,6 +135,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Output appropriate html + * + * @return bool */ public function html() { global $ID; @@ -738,6 +747,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { global $auth; global $INPUT; + $user = array(); $user[0] = ($clean) ? $auth->cleanUser($INPUT->str('userid')) : $INPUT->str('userid'); $user[1] = $INPUT->str('userpass'); $user[2] = $INPUT->str('username'); @@ -764,7 +774,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $this->_filter = array(); if ($op == 'new') { - list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false); + list($user,/* $pass */,$name,$mail,$grps) = $this->_retrieveUser(false); if (!empty($user)) $this->_filter['user'] = $user; if (!empty($name)) $this->_filter['name'] = $name; @@ -816,6 +826,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $disabled = 'disabled="disabled"'; + $buttons = array(); $buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : ''; if ($this->_user_total == -1) { @@ -937,8 +948,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * Returns cleaned user data * * @param array $candidate raw values of line from input file - * @param $error - * @return array|bool cleaned data or false + * @param string $error + * @return array|false cleaned data or false */ protected function _cleanImportUser($candidate, & $error){ global $INPUT; @@ -951,7 +962,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $INPUT->set('usergroups', $candidate[4]); $cleaned = $this->_retrieveUser(); - list($user,$pass,$name,$mail,$grps) = $cleaned; + list($user,/* $pass */,$name,$mail,/* $grps */) = $cleaned; if (empty($user)) { $error = $this->lang['import_error_baduserid']; return false; @@ -1021,6 +1032,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * wrapper for is_uploaded_file to facilitate overriding by test suite + * + * @param string $file filename + * @return bool */ protected function _isUploadedFile($file) { return is_uploaded_file($file); @@ -1031,6 +1045,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @deprecated remove when dokuwiki php requirement increases to 5.3+ * also associated unit test & mock access method + * + * @param string $csv string to parse + * @return array */ protected function _getcsv($csv) { return function_exists('str_getcsv') ? str_getcsv($csv) : $this->str_getcsv($csv); @@ -1041,6 +1058,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * loosely based on www.php.net/str_getcsv#88311 * * @deprecated remove when dokuwiki php requirement increases to 5.3+ + * + * @param string $str string to parse + * @return array */ protected function str_getcsv($str) { $fp = fopen("php://temp/maxmemory:1048576", 'r+'); // 1MiB diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index bbb5606790133fa070c956bba8fa7bfbe37c8b41..6130fccd88e7aee6e333f463a3a28a34aaddfe62 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -15,6 +15,7 @@ * @author Jakub A. TěšÃnský (j@kub.cz) * @author mkucera66@seznam.cz * @author ZbynÄ›k KÅ™ivka <krivka@fit.vutbr.cz> + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['menu'] = 'Správa uživatelů'; $lang['noauth'] = '(autentizace uživatelů nenà k dispozici)'; @@ -55,20 +56,23 @@ $lang['next'] = 'dalÅ¡Ã'; $lang['last'] = 'poslednÃ'; $lang['edit_usermissing'] = 'Vybraný uživatel nebyl nalezen, zadané uživatelského mohlo být smazáno nebo zmÄ›nÄ›no.'; $lang['user_notify'] = 'Upozornit uživatele'; -$lang['note_notify'] = 'Maily s upozornÄ›nÃm se budou posÃlat pouze, když uživatel dostává nové heslo.'; +$lang['note_notify'] = 'E-maily s upozornÄ›nÃm se budou posÃlat pouze, když uživatel dostává nové heslo.'; $lang['note_group'] = 'Novà uživatelé budou pÅ™idáváni do této výchozà skupiny (%s), pokud pro nÄ› nenà uvedena žádná skupina.'; $lang['note_pass'] = 'Heslo bude automaticky vygenerováno, pokud je pole ponecháno prázdné a je zapnuto upozornÄ›nà uživatele.'; $lang['add_ok'] = 'Uživatel úspěšnÄ› vytvoÅ™en'; $lang['add_fail'] = 'VytvoÅ™enà uživatele selhalo'; -$lang['notify_ok'] = 'Odeslán mail s upozornÄ›nÃm'; -$lang['notify_fail'] = 'Mail s upozornÄ›nÃm nebylo možno odeslat'; +$lang['notify_ok'] = 'Odeslán e-mail s upozornÄ›nÃm'; +$lang['notify_fail'] = 'E-mail s upozornÄ›nÃm nebylo možno odeslat'; +$lang['import_userlistcsv'] = 'Seznam uživatelů (CSV):'; +$lang['import_header'] = 'Poslednà selhánà importu'; $lang['import_success_count'] = 'Import uživatelů: nalezeno %d uživatelů, %d úspěšnÄ› importováno.'; $lang['import_failure_count'] = 'Import uživatelů: %d selhalo. Seznam chybných je nÞe.'; $lang['import_error_fields'] = 'Nedostatek položek, nalezena/y %d, požadovány 4.'; $lang['import_error_baduserid'] = 'Chybà User-id'; $lang['import_error_badname'] = 'Å patné jméno'; -$lang['import_error_badmail'] = 'Å patná emailová adresa'; +$lang['import_error_badmail'] = 'Å patná e-mailová adresa'; $lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán nebo je prázdný.'; $lang['import_error_readfail'] = 'Import selhal. Nelze ÄÃst nahraný soubor.'; $lang['import_error_create'] = 'Nelze vytvoÅ™it uživatele'; -$lang['import_notify_fail'] = 'Importovanému uživateli %s s emailem %s nemohlo být zasláno upozornÄ›nÃ.'; +$lang['import_notify_fail'] = 'Importovanému uživateli %s s e-mailem %s nemohlo být zasláno upozornÄ›nÃ.'; +$lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CVS'; diff --git a/lib/plugins/usermanager/lang/da/import.txt b/lib/plugins/usermanager/lang/da/import.txt new file mode 100644 index 0000000000000000000000000000000000000000..8ff1946b825a5b9ff8281d1047b2634b8203a000 --- /dev/null +++ b/lib/plugins/usermanager/lang/da/import.txt @@ -0,0 +1,9 @@ +===== Samling af Brugere Import ===== + +Kræver en CSV-fil med brugere pÃ¥ mindst fire kolonner. +Kolonnerne skal indeholde, i denne orden: bruger-id, fulde navn, email-adresse og grupper. +CSV-felterne skal separeres af kommaer (,) og strengafgrænser med anførelsestegn (%%""%%). Backslash (\) kan benyttes som "escape character". +For et eksempel pÃ¥ en brugbar fil, kan du prøve "Eksportér Brugere"-funktionen her over. +Overlappende bruger-id'er bliver ignoreret. + +En adgangskode vil blive genereret og sendt til hver succesfuldt importeret bruger. \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index 47d7efea2321b9273f24db4a0aa5e99e8a89804d..795024f89cf36cfe12a15fdeb13c0edbc70d61e0 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -13,6 +13,7 @@ * @author Michael Pedersen subben@gmail.com * @author Mikael Lyngvig <mikael@lyngvig.org> * @author soer9648 <soer9648@eucl.dk> + * @author Søren Birk <soer9648@eucl.dk> */ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; @@ -72,3 +73,4 @@ $lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades e $lang['import_error_readfail'] = 'Import Fejlet. Ikke muligt at læse uploadede fil.'; $lang['import_error_create'] = 'Ikke muligt at oprette brugeren'; $lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med emailen %s.'; +$lang['import_downloadfailures'] = 'Download Fejl som CSV til rettelser'; diff --git a/lib/plugins/usermanager/lang/eu/lang.php b/lib/plugins/usermanager/lang/eu/lang.php index 5d3a01fc7cf2245bab06dffaa484ed4b76cc0dfd..1fbe1373920b2118ebc2ef896abca53036aa32db 100644 --- a/lib/plugins/usermanager/lang/eu/lang.php +++ b/lib/plugins/usermanager/lang/eu/lang.php @@ -1,7 +1,8 @@ <?php + /** - * Basque language file - * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Inko Illarramendi <inko.i.a@gmail.com> * @author Zigor Astarbe <astarbe@gmail.com> */ diff --git a/lib/plugins/usermanager/lang/fa/lang.php b/lib/plugins/usermanager/lang/fa/lang.php index 68db206b9f978cd0e84f900af0961751be4863ee..bb2505a2774e949afb7fe3f13e9521adce285e9e 100644 --- a/lib/plugins/usermanager/lang/fa/lang.php +++ b/lib/plugins/usermanager/lang/fa/lang.php @@ -11,6 +11,7 @@ * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> * @author Hamid <zarrabi@sharif.edu> + * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> */ $lang['menu'] = 'مدیریت کاربر'; $lang['noauth'] = '(معتبرسازی کاربر ممکن نیست)'; @@ -33,6 +34,8 @@ $lang['search'] = 'جستجو'; $lang['search_prompt'] = 'انجام جستجو'; $lang['clear'] = 'بازنویسی Ùیلترهای جستجو'; $lang['filter'] = 'Ùیلتر'; +$lang['import'] = 'ورود کاربران جدید'; +$lang['error'] = 'متن خطا'; $lang['summary'] = 'نمایش کاربر %1$d-%2$d از %3$d. در Ú©Ù„ %4$d کاربر.'; $lang['nonefound'] = 'هیچ کاربری یاÙت نشد. در Ú©Ù„ %d کاربر.'; $lang['delete_ok'] = '%d کاربر Øذ٠شد'; diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index de243133a8dde5997faf476490b7164cd89d185b..dba67fb61f467005a53f1e9d13ac6f2f31f59fcc 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -7,6 +7,7 @@ * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> + * @author Jussi Takala <jussi.takala@live.fi> */ $lang['menu'] = 'Käyttäjähallinta'; $lang['noauth'] = '(autentikointi ei ole käytössä)'; @@ -29,6 +30,9 @@ $lang['search'] = 'Hae'; $lang['search_prompt'] = 'Tee haku'; $lang['clear'] = 'Tyhjennä hakusuodatin'; $lang['filter'] = 'Suodatin'; +$lang['import'] = 'Tuo uusia käyttäjiä'; +$lang['line'] = 'Rivi nro.'; +$lang['error'] = 'Vikailmoitus'; $lang['summary'] = 'Näytetään käyttäjät %1$d-%2$d / %3$d löytynyttä. %4$d käyttäjää yhteensä.'; $lang['nonefound'] = 'Ei löytynyt käyttäjiä. %d käyttäjää yhteensä.'; $lang['delete_ok'] = '%d käyttäjää poistettu'; @@ -49,3 +53,9 @@ $lang['add_ok'] = 'Käyttäjä lisätty onnistuneesti'; $lang['add_fail'] = 'Käyttäjän lisäys epäonnistui'; $lang['notify_ok'] = 'Ilmoitus sähköpostilla lähetetty'; $lang['notify_fail'] = 'Ilmoitusta sähköpostilla ei voitu lähettää'; +$lang['import_error_baduserid'] = 'Käyttäjätunnus puuttuu'; +$lang['import_error_badname'] = 'Epäkelpo nimi'; +$lang['import_error_badmail'] = 'Epäkelpo sähköpostiosoite'; +$lang['import_error_upload'] = 'Tuonti epäonnistui. CSV-tiedostoa ei voitu ladata tai se on tyhjä.'; +$lang['import_error_readfail'] = 'Tuonti epäonnistui. Ladattua tiedostoa ei voida lukea.'; +$lang['import_error_create'] = 'Käyttäjää ei voida luoda.'; diff --git a/lib/plugins/usermanager/lang/hr/add.txt b/lib/plugins/usermanager/lang/hr/add.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7c866495f6fb7f97a699354ff1ffb722cceb815 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/add.txt @@ -0,0 +1 @@ +===== Dodaj korisnika ===== diff --git a/lib/plugins/usermanager/lang/hr/delete.txt b/lib/plugins/usermanager/lang/hr/delete.txt new file mode 100644 index 0000000000000000000000000000000000000000..072185fc1008e12d79a76d5a56e6c9def53e1991 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/delete.txt @@ -0,0 +1 @@ +===== Ukloni korisnika ===== diff --git a/lib/plugins/usermanager/lang/hr/edit.txt b/lib/plugins/usermanager/lang/hr/edit.txt new file mode 100644 index 0000000000000000000000000000000000000000..752fd81f36f192ecda310d886ffe99f807a10354 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/edit.txt @@ -0,0 +1 @@ +===== Uredi korisnika ===== diff --git a/lib/plugins/usermanager/lang/hr/import.txt b/lib/plugins/usermanager/lang/hr/import.txt new file mode 100644 index 0000000000000000000000000000000000000000..85ea92723fae252ee5087a13edd61b6ce46f6921 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/import.txt @@ -0,0 +1,9 @@ +===== Masovni unos korisnika ===== + +Zahtjeva CSV datoteku popisa korisnika s minimalno Äetiri kolone. +Kolone moraju sadržavati redom: korisniÄko ime, puno ime, adresu e-poÅ¡te i grupe. +Polja trebaju biti odvojena zarezom (,) a znakovni nizovi s dvostrukim navodnicima (%%""%%). Obrnuta kosa crta (\) koristi se za specijalne kodove (escaping). +Koristite "Izvoz korisnika" funkciju da bi ste dobili primjer odgovarajuće datoteke. +Duplikati korisniÄkih imena biti će ignorirani. + +UspjeÅ¡no kreiranim korisnicima lozinka će biti generirana i poslana e-poÅ¡tom. \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/hr/intro.txt b/lib/plugins/usermanager/lang/hr/intro.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f156579bdb033b9a30785722e3884c0cad1e2ef --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/intro.txt @@ -0,0 +1 @@ +====== Upravitelj korisnicima ====== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/hr/lang.php b/lib/plugins/usermanager/lang/hr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..a71afb60a32221e40ae7c5650fdbefbddaa1ee80 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/lang.php @@ -0,0 +1,66 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Davor Turkalj <turki.bsc@gmail.com> + */ +$lang['menu'] = 'Upravitelj korisnicima'; +$lang['noauth'] = '(korisniÄka prijava nije dostupna)'; +$lang['nosupport'] = '(upravljanje korisnikom nije podržano)'; +$lang['badauth'] = 'pogreÅ¡an mehanizam prijave'; +$lang['user_id'] = 'Korisnik'; +$lang['user_pass'] = 'Lozinka'; +$lang['user_name'] = 'Stvarno ime'; +$lang['user_mail'] = 'E-poÅ¡ta'; +$lang['user_groups'] = 'Grupe'; +$lang['field'] = 'Polje'; +$lang['value'] = 'Vrijednost'; +$lang['add'] = 'Dodaj'; +$lang['delete'] = 'ObriÅ¡i'; +$lang['delete_selected'] = 'ObriÅ¡i odabrano'; +$lang['edit'] = 'Uredi'; +$lang['edit_prompt'] = 'Uredi ovog korisnika'; +$lang['modify'] = 'Snimi promjene'; +$lang['search'] = 'Potraži'; +$lang['search_prompt'] = 'Izvedi potragu'; +$lang['clear'] = 'ObriÅ¡i filtar potrage'; +$lang['filter'] = 'Filtar'; +$lang['export_all'] = 'Izvezi sve korisnike (CSV)'; +$lang['export_filtered'] = 'Izvezi filtriranu listu korisnika (CSV)'; +$lang['import'] = 'Unos novih korisnika'; +$lang['line'] = 'Linija br.'; +$lang['error'] = 'Poruka o greÅ¡ci'; +$lang['summary'] = 'Prikaz korisnika %1$d-%2$d od %3$d naÄ‘enih. Ukupno %4$d korisnika.'; +$lang['nonefound'] = 'Nema korisnika koji odgovaraju filtru.Ukupno %d korisnika.'; +$lang['delete_ok'] = '%d korisnika obrisano'; +$lang['delete_fail'] = '%d neuspjelih brisanja.'; +$lang['update_ok'] = 'Korisnik uspjeÅ¡no izmijenjen'; +$lang['update_fail'] = 'Neuspjela izmjena korisnika'; +$lang['update_exists'] = 'Promjena korisniÄkog imena neuspjeÅ¡na, traženo ime (%s) već postoji (ostale izmjene biti će primijenjene).'; +$lang['start'] = 'poÄetni'; +$lang['prev'] = 'prethodni'; +$lang['next'] = 'slijedeći'; +$lang['last'] = 'zadnji'; +$lang['edit_usermissing'] = 'Odabrani korisnik nije naÄ‘en, traženo korisniÄko ime vjerojatno je obrisano i promijenjeno negdje drugdje.'; +$lang['user_notify'] = 'Obavijesti korisnika'; +$lang['note_notify'] = 'Obavijest korisniku biti će poslana samo ako je upisana nova lozinka.'; +$lang['note_group'] = 'Novi korisnik biti će dodijeljen u podrazumijevanu grupu (%s) ako grupa nije specificirana.'; +$lang['note_pass'] = 'Lozinka će biti generirana ako se polje ostavi prazno i obavješćivanje korisnika je omogućeno.'; +$lang['add_ok'] = 'Korisnik uspjeÅ¡no dodan'; +$lang['add_fail'] = 'NeuspjeÅ¡no dodavanje korisnika'; +$lang['notify_ok'] = 'Poslana obavijest korisniku'; +$lang['notify_fail'] = 'Obavijest korisniku ne može biti poslana'; +$lang['import_userlistcsv'] = 'Datoteka s popisom korisnika (CSV):'; +$lang['import_header'] = 'Zadnje greÅ¡ke pri uvozu'; +$lang['import_success_count'] = 'Uvoz korisnika: %d korisnika naÄ‘eno, %d uspjeÅ¡no uvezeno'; +$lang['import_failure_count'] = 'Uvoz korisnika: %d neuspjeÅ¡no. GreÅ¡ke su navedene niže.'; +$lang['import_error_fields'] = 'Nedovoljan broj polja, naÄ‘eno %d, potrebno 4.'; +$lang['import_error_baduserid'] = 'Nedostaje korisniÄko ime'; +$lang['import_error_badname'] = 'Krivo ime'; +$lang['import_error_badmail'] = 'Kriva adresa e-poÅ¡te'; +$lang['import_error_upload'] = 'Uvoz neuspjeÅ¡an. CSV datoteka ne može biti uÄitana ili je prazna.'; +$lang['import_error_readfail'] = 'Uvoz neuspjeÅ¡an. Ne mogu proÄitati uÄitanu datoteku.'; +$lang['import_error_create'] = 'Ne mogu kreirati korisnika'; +$lang['import_notify_fail'] = 'Obavijest uvezenom korisniku %s nije moguće poslati na adresu e-poÅ¡te %s.'; +$lang['import_downloadfailures'] = 'Preuzmi greÅ¡ke kao CSV za ispravak'; diff --git a/lib/plugins/usermanager/lang/hr/list.txt b/lib/plugins/usermanager/lang/hr/list.txt new file mode 100644 index 0000000000000000000000000000000000000000..50b1d2513743d8154b024da0d0641da35c910425 --- /dev/null +++ b/lib/plugins/usermanager/lang/hr/list.txt @@ -0,0 +1 @@ +===== Lista korisnika ===== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index 70e3d94f0894e205e74ed687906dbf9465bd0687..bc76470e84911dd059a22bf5ee0dbfe1254b042a 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -13,7 +13,7 @@ * @author Garam <rowain8@gmail.com> */ $lang['menu'] = 'ì‚¬ìš©ìž ê´€ë¦¬ìž'; -$lang['noauth'] = '(ì‚¬ìš©ìž ì¸ì¦ì´ 불가능합니다)'; +$lang['noauth'] = '(ì‚¬ìš©ìž ì¸ì¦ì„ ì‚¬ìš©í• ìˆ˜ 없습니다)'; $lang['nosupport'] = '(ì‚¬ìš©ìž ê´€ë¦¬ê°€ 지ì›ë˜ì§€ 않습니다)'; $lang['badauth'] = 'ì¸ì¦ ë©”ì»¤ë‹ˆì¦˜ì´ ìž˜ëª»ë˜ì—ˆìŠµë‹ˆë‹¤'; $lang['user_id'] = '사용ìž'; @@ -35,10 +35,10 @@ $lang['clear'] = '검색 í•„í„° ìž¬ì„¤ì •'; $lang['filter'] = 'í•„í„°'; $lang['export_all'] = 'ëª¨ë“ ì‚¬ìš©ìž ëª©ë¡ ë‚´ë³´ë‚´ê¸° (CSV)'; $lang['export_filtered'] = 'í•„í„°ëœ ì‚¬ìš©ìž ëª©ë¡ ë‚´ë³´ë‚´ê¸° (CSV)'; -$lang['import'] = '새 ì‚¬ìš©ìž ëª©ë¡ ê°€ì ¸ì˜¤ê¸°'; +$lang['import'] = '새 ì‚¬ìš©ìž ê°€ì ¸ì˜¤ê¸°'; $lang['line'] = '줄 번호'; $lang['error'] = '오류 메시지'; -$lang['summary'] = 'ì°¾ì€ ì‚¬ìš©ìž %3$d 중 %1$d-%2$dì„(를) 봅니다. ì „ì²´ 사용ìžëŠ” %4$d명입니다.'; +$lang['summary'] = 'ì°¾ì€ ì‚¬ìš©ìž %3$d명 중 %1$d-%2$dì„(를) 봅니다. ì „ì²´ 사용ìžëŠ” %4$d명입니다.'; $lang['nonefound'] = 'ì°¾ì€ ì‚¬ìš©ìžê°€ 없습니다. ì „ì²´ 사용ìžëŠ” %d명입니다.'; $lang['delete_ok'] = 'ì‚¬ìš©ìž %dëª…ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤'; $lang['delete_fail'] = 'ì‚¬ìš©ìž %dëª…ì„ ì‚ì œí•˜ëŠ” ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'; @@ -68,6 +68,6 @@ $lang['import_error_badname'] = 'ìž˜ëª»ëœ ì´ë¦„'; $lang['import_error_badmail'] = 'ìž˜ëª»ëœ ì´ë©”ì¼ ì£¼ì†Œ'; $lang['import_error_upload'] = 'ê°€ì ¸ì˜¤ê¸°ë¥¼ 실패했습니다. csv 파ì¼ì„ 올릴 수 없거나 비어 있습니다.'; $lang['import_error_readfail'] = 'ê°€ì ¸ì˜¤ê¸°ë¥¼ 실패했습니다. 올린 파ì¼ì„ ì½ì„ 수 없습니다.'; -$lang['import_error_create'] = '사용ìžë¥¼ 만들 수 없습니다.'; +$lang['import_error_create'] = '사용ìžë¥¼ 만들 수 없습니다'; $lang['import_notify_fail'] = '알림 메시지를 ê°€ì ¸ì˜¨ %s (ì´ë©”ì¼: %s) 사용ìžì—게 보낼 수 없습니다.'; $lang['import_downloadfailures'] = 'êµì •ì„ 위한 CSVë¡œ 다운로드 실패'; diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt index f2049dd0c1f0f40141ec681d8b652b587802e135..c92e47b4c8051dcaee2e04d10fdbebab726bb350 100644 --- a/lib/plugins/usermanager/lang/ru/import.txt +++ b/lib/plugins/usermanager/lang/ru/import.txt @@ -3,7 +3,6 @@ ПотребуетÑÑ ÑпиÑок пользователей в файле формата CSV, ÑоÑтоÑщий из 4 Ñтолбцов. Столбцы должны быть заполнены Ñледующим образом: user-id, полное имÑ, Ñл. почта, группы. ÐŸÐ¾Ð»Ñ CSV должны быть отделены запÑтой (,), а Ñтроки должны быть заключены в кавычки (%%""%%). Обратный ÑлÑш иÑпользуетÑÑ ÐºÐ°Ðº прерывание. -Ð’ качеÑтве примера можете взÑÑ‚ÑŒ ÑпиÑок пользователей, ÑкÑпортированный через «ÐкÑпорт пользователей». -ПовторÑющиеÑÑ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ñ‹ user-id будут игнорироватьÑÑ. +Ð’ качеÑтве примера можете взÑÑ‚ÑŒ ÑпиÑок пользователей, ÑкÑпортированный через «ÐкÑпорт пользователей». ПовторÑющиеÑÑ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ñ‹ user-id будут игнорироватьÑÑ. Пароль доÑтупа будет Ñгенерирован и отправлен по почте удачно импортированному пользователю. \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index 8bbfa639c2625c801e134e400de80f1873ea9f91..0914d7b499f23cc4e2b7f6e87d86b79701825eee 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -21,6 +21,7 @@ * @author Pavel <ivanovtsk@mail.ru> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Igor Degraf <igordegraf@gmail.com> + * @author Vitaly Filatenko <kot@hacktest.net> */ $lang['menu'] = 'Управление пользователÑми'; $lang['noauth'] = '(Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ недоÑтупна)'; @@ -68,6 +69,8 @@ $lang['add_ok'] = 'Пользователь уÑпешно доб $lang['add_fail'] = 'Ðе удалоÑÑŒ добавить пользователÑ'; $lang['notify_ok'] = 'ПиÑьмо Ñ ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸ÐµÐ¼ отправлено'; $lang['notify_fail'] = 'Ðе удалоÑÑŒ отправить пиÑьмо Ñ ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸ÐµÐ¼'; +$lang['import_userlistcsv'] = 'Файл Ñо ÑпиÑком пользователей (CSV):'; +$lang['import_header'] = 'ПоÑледний импорт - ÑпиÑок ошибок'; $lang['import_success_count'] = 'Импорт пользователей: %d пользователей найдено, %d импортировано уÑпешно.'; $lang['import_failure_count'] = 'Импорт пользователей: %d не удалоÑÑŒ. СпиÑок ошибок прочтите ниже.'; $lang['import_error_fields'] = 'Ðе вÑе Ð¿Ð¾Ð»Ñ Ð·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ñ‹. Ðайдено %d, а нужно 4.'; @@ -78,4 +81,4 @@ $lang['import_error_upload'] = 'Импорт не удалÑÑ. CSV-файл $lang['import_error_readfail'] = 'Импорт не удалÑÑ. Ðевозможно прочеÑÑ‚ÑŒ загруженный файл.'; $lang['import_error_create'] = 'Ðевозможно Ñоздать пользователÑ'; $lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по Ñлектронной почте %s.'; -$lang['import_downloadfailures'] = 'Скачать Ошибки в формате CSV Ð´Ð»Ñ Ð¸ÑправлениÑ'; +$lang['import_downloadfailures'] = 'Скачать ошибки в формате CSV Ð´Ð»Ñ Ð¸ÑправлениÑ'; diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 6b46add07ef7d35a258bce0e180ddad32517a467..fb61f6e48b4de063787f30c10ab9affbe18a5759 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -56,6 +56,8 @@ var dw_behaviour = { jQuery(document).on('click','#page__revisions input[type=checkbox]', dw_behaviour.revisionBoxHandler ); + + jQuery('.bounce').effect('bounce', {times:10}, 2000 ); }, /** @@ -64,7 +66,14 @@ var dw_behaviour = { scrollToMarker: function(){ var $obj = jQuery('#scroll__here'); if($obj.length) { - $obj[0].scrollIntoView(); + if($obj.offset().top != 0) { + jQuery('html, body').animate({ + scrollTop: $obj.offset().top - 100 + }, 500); + } else { + // hidden object have no offset but can still be scrolled into view + $obj[0].scrollIntoView(); + } } }, @@ -77,13 +86,11 @@ var dw_behaviour = { /** * Remove all search highlighting when clicking on a highlighted term - * - * @FIXME would be nice to have it fade out */ removeHighlightOnClick: function(){ jQuery('span.search_hit').click( function(e){ - jQuery(e.target).removeClass('search_hit'); + jQuery(e.target).removeClass('search_hit', 1000); } ); }, diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index 8fe2c88a22432508117f96e51b0a2b6703ebe124..d4f9c39d1270717a4fafeab12b29025ce2ec09d5 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -49,7 +49,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); if($ERROR): echo '<h1>'.$ERROR.'</h1>'; else: ?> - + <?php if($REV) echo p_locale_xhtml('showrev');?> <h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1> <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?> @@ -82,8 +82,8 @@ header('X-UA-Compatible: IE=edge,chrome=1'); $data = array( 'view' => 'detail', 'items' => array( - 'mediaManager' => tpl_action('mediaManager', 1, 'li', 1, '<span>', '</span>'), - 'img_backto' => tpl_action('img_backto', 1, 'li', 1, '<span>', '</span>'), + 'mediaManager' => tpl_action('mediaManager', true, 'li', true, '<span>', '</span>'), + 'img_backto' => tpl_action('img_backto', true, 'li', true, '<span>', '</span>'), ) ); diff --git a/lib/tpl/dokuwiki/images/pagetools-build.php b/lib/tpl/dokuwiki/images/pagetools-build.php index 1b7262ad54903f7a0d7513373b4c37f234e7aa3d..3cf35b2eae2808ea776ec6d2371255bfe6c6fe8d 100644 --- a/lib/tpl/dokuwiki/images/pagetools-build.php +++ b/lib/tpl/dokuwiki/images/pagetools-build.php @@ -92,7 +92,7 @@ function hex2rgb($hex) { /** * Scale (darken/lighten) a given image * - * @param ressource $img The truetype GD image to work on + * @param resource $img The truetype GD image to work on * @param float $scale Scale the colors by this value ( <1 darkens, >1 lightens) */ function imagecolorscale(&$img, $scale){ diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 44fef81ebad5e67a7cf387c31646831fb3b0a7cd..10c0bf91e5249f16ba6e4c7bde9d68e85cf7f4ee 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -41,7 +41,7 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <div class="content"> <?php tpl_flush() ?> <?php tpl_includeFile('sidebarheader.html') ?> - <?php tpl_include_page($conf['sidebar'], 1, 1) ?> + <?php tpl_include_page($conf['sidebar'], true, true) ?> <?php tpl_includeFile('sidebarfooter.html') ?> </div> </div></div><!-- /aside --> @@ -77,12 +77,12 @@ $showSidebar = $hasSidebar && ($ACT=='show'); $data = array( 'view' => 'main', 'items' => array( - 'edit' => tpl_action('edit', 1, 'li', 1, '<span>', '</span>'), - 'revert' => tpl_action('revert', 1, 'li', 1, '<span>', '</span>'), - 'revisions' => tpl_action('revisions', 1, 'li', 1, '<span>', '</span>'), - 'backlink' => tpl_action('backlink', 1, 'li', 1, '<span>', '</span>'), - 'subscribe' => tpl_action('subscribe', 1, 'li', 1, '<span>', '</span>'), - 'top' => tpl_action('top', 1, 'li', 1, '<span>', '</span>') + 'edit' => tpl_action('edit', true, 'li', true, '<span>', '</span>'), + 'revert' => tpl_action('revert', true, 'li', true, '<span>', '</span>'), + 'revisions' => tpl_action('revisions', true, 'li', true, '<span>', '</span>'), + 'backlink' => tpl_action('backlink', true, 'li', true, '<span>', '</span>'), + 'subscribe' => tpl_action('subscribe', true, 'li', true, '<span>', '</span>'), + 'top' => tpl_action('top', true, 'li', true, '<span>', '</span>') ) ); diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php index a2bfd4346fba7c52450592836ae5c171cff97f2f..7d9c8834747a6f643847022cdddacfa214e925ee 100644 --- a/lib/tpl/dokuwiki/tpl_header.php +++ b/lib/tpl/dokuwiki/tpl_header.php @@ -46,10 +46,10 @@ if (!defined('DOKU_INC')) die(); tpl_userinfo(); /* 'Logged in as ...' */ echo '</li>'; } - tpl_action('admin', 1, 'li'); - tpl_action('profile', 1, 'li'); - tpl_action('register', 1, 'li'); - tpl_action('login', 1, 'li'); + tpl_action('admin', true, 'li'); + tpl_action('profile', true, 'li'); + tpl_action('register', true, 'li'); + tpl_action('login', true, 'li'); ?> </ul> </div> @@ -64,9 +64,9 @@ if (!defined('DOKU_INC')) die(); </div> <ul> <?php - tpl_action('recent', 1, 'li'); - tpl_action('media', 1, 'li'); - tpl_action('index', 1, 'li'); + tpl_action('recent', true, 'li'); + tpl_action('media', true, 'li'); + tpl_action('index', true, 'li'); ?> </ul> </div>