diff --git a/_test/bootstrap.php b/_test/bootstrap.php index 6c3d6aaa8888953308a84e75dc72f41ae32f346c..58ad6a0d7d9cbf84ca4614c7237f7e001f836760 100644 --- a/_test/bootstrap.php +++ b/_test/bootstrap.php @@ -82,7 +82,12 @@ if (getenv('PRESERVE_TMP') != 'true') { // populate default dirs TestUtils::rcopy(TMP_DIR, DOKU_INC.'/conf'); TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/conf'); -TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/data'); +mkdir(DOKU_TMP_DATA); +foreach(array( + 'attic', 'cache', 'index', 'locks', 'media', + 'media_attic', 'media_meta', 'meta', 'pages', 'tmp') as $dir){ + mkdir(DOKU_TMP_DATA.'/'.$dir); +} // disable all non-default plugins by default $dh = dir(DOKU_INC.'lib/plugins/'); diff --git a/_test/conf/acl.auth.php b/_test/conf/acl.auth.php index 14344d7785b72176f7386973a9142936b236f287..8a1b01f23f1cebb240c74a7751f731a64fa96595 100644 --- a/_test/conf/acl.auth.php +++ b/_test/conf/acl.auth.php @@ -19,3 +19,9 @@ # delete 16 * @ALL 8 + +# for testing wildcards: +users:* @ALL 1 +users:%USER%:* %USER% 16 +groups:* @ALL 1 +groups:%GROUP%:* %GROUP% 16 diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index e47c063293312f6d7d90d15035159435e8151c2d..e51f1eeb1b3b18dc8b1522a813b2e050e918075e 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -18,6 +18,25 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { */ protected $pluginsDisabled = array(); + /** + * Setup the data directory + * + * This is ran before each test class + */ + public static function setUpBeforeClass() { + // just to be safe not to delete something undefined later + if(!defined('TMP_DIR')) die('no temporary directory'); + if(!defined('DOKU_TMP_DATA')) die('no temporary data directory'); + + // remove any leftovers from the last run + if(is_dir(DOKU_TMP_DATA)){ + TestUtils::rdelete(DOKU_TMP_DATA); + } + + // populate default dirs + TestUtils::rcopy(TMP_DIR, dirname(__FILE__).'/../data/'); + } + /** * Reset the DokuWiki environment before each test run. Makes sure loaded config, * language and plugins are correct. @@ -26,6 +45,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { * @return void */ public function setUp() { + // reload config global $conf, $config_cascade; $conf = array(); diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index fa3ddec90fadc125b7f65fd6e04837f031d97ef4..17282157659bab937233b22c6206696e9f7f779b 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -36,9 +36,10 @@ class TestRequest { /** * Executes the request * + * @param string $url end URL to simulate, needs to start with /doku.php currently * @return TestResponse the resulting output of the request */ - public function execute() { + public function execute($uri='/doku.php') { // save old environment $server = $_SERVER; $session = $_SESSION; @@ -46,6 +47,14 @@ class TestRequest { $post = $_POST; $request = $_REQUEST; + // prepare the right URI + $this->setUri($uri); + + // import all defined globals into the function scope + foreach(array_keys($GLOBALS) as $glb){ + global $$glb; + } + // fake environment global $default_server_vars; $_SERVER = array_merge($default_server_vars, $this->server); @@ -79,4 +88,68 @@ class TestRequest { return $response; } + + /** + * Set the virtual URI the request works against + * + * This parses the given URI and sets any contained GET variables + * but will not overwrite any previously set ones (eg. set via setGet()). + * + * It initializes the $_SERVER['REQUEST_URI'] and $_SERVER['QUERY_STRING'] + * with all set GET variables. + * + * @param string $url end URL to simulate, needs to start with /doku.php currently + * @todo make this work with other end points + */ + protected function setUri($uri){ + if(substr($uri,0,9) != '/doku.php'){ + throw new Exception("only '/doku.php' is supported currently"); + } + + $params = array(); + list($uri, $query) = explode('?',$uri,2); + if($query) parse_str($query, $params); + + $this->get = array_merge($params, $this->get); + if(count($this->get)){ + $query = '?'.http_build_query($this->get, '', '&'); + $query = str_replace( + array('%3A', '%5B', '%5D'), + array(':', '[', ']'), + $query + ); + $uri = $uri.$query; + } + + $this->setServer('QUERY_STRING', $query); + $this->setServer('REQUEST_URI', $uri); + } + + /** + * Simulate a POST request with the given variables + * + * @param array $post all the POST parameters to use + * @param string $url end URL to simulate, needs to start with /doku.php currently + * @param return TestResponse + */ + public function post($post=array(), $uri='/doku.php') { + $this->post = array_merge($this->post, $post); + $this->setServer('REQUEST_METHOD', 'POST'); + return $this->execute($uri); + } + + /** + * Simulate a GET request with the given variables + * + * @param array $GET all the POST parameters to use + * @param string $url end URL to simulate, needs to start with /doku.php currently + * @param return TestResponse + */ + public function get($get=array(), $uri='/doku.php') { + $this->get = array_merge($this->get, $get); + $this->setServer('REQUEST_METHOD', 'GET'); + return $this->execute($uri); + } + + } diff --git a/_test/tests/conf/title.test.php b/_test/tests/conf/title.test.php new file mode 100644 index 0000000000000000000000000000000000000000..7cae040e708774193b15b987244a9404bacd549b --- /dev/null +++ b/_test/tests/conf/title.test.php @@ -0,0 +1,19 @@ +<?php + +class conf_title_test extends DokuWikiTest { + + function testTitle() { + global $conf; + + $request = new TestRequest(); + $response = $request->get(); + $content = $response->queryHTML('title'); + $this->assertTrue(strpos($content,$conf['title']) > 0); + + $conf['title'] = 'Foo'; + $request = new TestRequest(); + $response = $request->get(); + $content = $response->queryHTML('title'); + $this->assertTrue(strpos($content,'Foo') > 0); + } +} diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php index ea48ec6a50643926a7b6dc2f6ec8b3e93de601b3..991f82da77e35eda6e0b586d3e45f5cba787369d 100644 --- a/_test/tests/inc/auth_aclcheck.test.php +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -235,6 +235,33 @@ class auth_acl_test extends DokuWikiTest { $this->assertEquals(auth_aclcheck('namespace:*', 'jill',array('foo','roots')), AUTH_ADMIN); } + function test_wildcards(){ + global $conf; + global $AUTH_ACL; + global $USERINFO; + $conf['useacl'] = 1; + + $_SERVER['REMOTE_USER'] = 'john'; + $USERINFO['grps'] = array('test','töst','foo bar'); + $AUTH_ACL = auth_loadACL(); // default test file + + // default setting + $this->assertEquals(AUTH_UPLOAD, auth_aclcheck('page', $_SERVER['REMOTE_USER'], $USERINFO['grps'])); + + // user namespace + $this->assertEquals(AUTH_DELETE, auth_aclcheck('users:john:foo', $_SERVER['REMOTE_USER'], $USERINFO['grps'])); + $this->assertEquals(AUTH_READ, auth_aclcheck('users:john:foo', 'schmock', array())); + + // group namespace + $this->assertEquals(AUTH_DELETE, auth_aclcheck('groups:test:foo', $_SERVER['REMOTE_USER'], $USERINFO['grps'])); + $this->assertEquals(AUTH_READ, auth_aclcheck('groups:test:foo', 'schmock', array())); + $this->assertEquals(AUTH_DELETE, auth_aclcheck('groups:toest:foo', $_SERVER['REMOTE_USER'], $USERINFO['grps'])); + $this->assertEquals(AUTH_READ, auth_aclcheck('groups:toest:foo', 'schmock', array())); + $this->assertEquals(AUTH_DELETE, auth_aclcheck('groups:foo_bar:foo', $_SERVER['REMOTE_USER'], $USERINFO['grps'])); + $this->assertEquals(AUTH_READ, auth_aclcheck('groups:foo_bar:foo', 'schmock', array())); + + } + } //Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/common_cleanText.test.php b/_test/tests/inc/common_cleanText.test.php index 00e70d4c72f2779acc34544fa0bd1baa161761a9..9d4494332001539e9afb4eda5460376c10d57918 100644 --- a/_test/tests/inc/common_cleanText.test.php +++ b/_test/tests/inc/common_cleanText.test.php @@ -3,11 +3,7 @@ class common_cleanText_test extends DokuWikiTest { function test_unix(){ - $unix = 'one - two - - three'; - + $unix = "one\n two\n\n three"; $this->assertEquals($unix,cleanText($unix)); } diff --git a/_test/tests/inc/events_nested.test.php b/_test/tests/inc/events_nested.test.php new file mode 100644 index 0000000000000000000000000000000000000000..fe5e395bb174699bd4ae5a18c97575aa9ce871b8 --- /dev/null +++ b/_test/tests/inc/events_nested.test.php @@ -0,0 +1,36 @@ +<?php + +/** + * This tests if event handlers can trigger the same event again. + * This is used by plugins that modify cache handling and use metadata + * for checking cache validity which triggers another cache use event. + */ +class events_nested_test extends DokuWikiTest { + function test_nested_events() { + global $EVENT_HANDLER; + $firstcount = 0; + $secondcount = 0; + + $EVENT_HANDLER->register_hook('NESTED_EVENT', 'BEFORE', null, + function() use (&$firstcount) { + $firstcount++; + if ($firstcount == 1) { + $param = array(); + trigger_event('NESTED_EVENT', $param); + } + } + ); + + $EVENT_HANDLER->register_hook('NESTED_EVENT', 'BEFORE', null, + function() use (&$secondcount) { + $secondcount++; + } + ); + + $param = array(); + trigger_event('NESTED_EVENT', $param); + + $this->assertEquals(2, $firstcount); + $this->assertEquals(2, $secondcount); + } +} diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php index 9cae3736a7d0380fae95d6ae9a86e862f2a5cff3..9959a1f069d366aecd38e19187e5eb5ed236ebd4 100644 --- a/_test/tests/inc/httpclient_http.test.php +++ b/_test/tests/inc/httpclient_http.test.php @@ -124,6 +124,11 @@ class httpclient_http_test extends DokuWikiTest { $http->max_bodysize = 250; $data = $http->get($this->server.'/stream/30'); $this->assertTrue($data === false, 'HTTP response'); + $http->max_bodysize_abort = false; + $data = $http->get($this->server.'/stream/30'); + $this->assertFalse($data === false, 'HTTP response'); + /* should read no more than max_bodysize+1 */ + $this->assertLessThanOrEqual(251,strlen($data)); } /** @@ -176,5 +181,15 @@ class httpclient_http_test extends DokuWikiTest { $this->assertArrayHasKey('foo',$http->resp_headers); $this->assertEquals('bar',$http->resp_headers['foo']); } + + /** + * @group internet + */ + function test_chunked(){ + $http = new HTTPClient(); + $data = $http->get('http://whoopdedo.org/cgi-bin/chunked/2550'); + $this->assertFalse($data === false, 'HTTP response'); + $this->assertEquals(2550,strlen($data)); + } } //Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php new file mode 100644 index 0000000000000000000000000000000000000000..761b7ddbc1dea06a8b8af63f619347717e576508 --- /dev/null +++ b/_test/tests/inc/input.test.php @@ -0,0 +1,216 @@ +<?php + +/** + * Tests for the Input class + */ +class input_test extends DokuWikiTest { + + private $data = array( + 'array' => array('foo', 'bar'), + 'string' => 'foo', + 'int' => '17', + 'zero' => '0', + 'one' => '1', + 'empty' => '', + 'emptya' => array() + ); + + public function test_str() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = 1; + $_POST['post'] = 1; + $INPUT = new Input(); + + $this->assertSame('foo', $INPUT->str('string')); + $this->assertSame('', $INPUT->str('none')); + $this->assertSame('', $INPUT->str('empty')); + $this->assertSame('foo', $INPUT->str('none', 'foo')); + $this->assertSame('', $INPUT->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->str('get', false)); + $this->assertSame(false, $INPUT->str('post', false)); + + $this->assertSame('foo', $INPUT->post->str('string')); + $this->assertSame('', $INPUT->post->str('none')); + $this->assertSame('', $INPUT->post->str('empty')); + $this->assertSame('foo', $INPUT->post->str('none', 'foo')); + $this->assertSame('', $INPUT->post->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->post->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->post->str('get', false)); + $this->assertSame('1', $INPUT->post->str('post', false)); + + $this->assertSame('foo', $INPUT->get->str('string')); + $this->assertSame('', $INPUT->get->str('none')); + $this->assertSame('', $INPUT->get->str('empty')); + $this->assertSame('foo', $INPUT->get->str('none', 'foo')); + $this->assertSame('', $INPUT->get->str('empty', 'foo')); + $this->assertSame('foo', $INPUT->get->str('empty', 'foo', true)); + + $this->assertSame(false, $INPUT->get->str('post', false)); + $this->assertSame('1', $INPUT->get->str('get', false)); + + $this->assertSame('', $INPUT->str('array')); + } + + public function test_int() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = 1; + $_POST['post'] = 1; + $INPUT = new Input(); + + $this->assertSame(17, $INPUT->int('int')); + $this->assertSame(0, $INPUT->int('none')); + $this->assertSame(0, $INPUT->int('empty')); + $this->assertSame(42, $INPUT->int('none', 42)); + $this->assertSame(0, $INPUT->int('zero', 42)); + $this->assertSame(42, $INPUT->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->int('get', false)); + $this->assertSame(false, $INPUT->int('post', false)); + + $this->assertSame(17, $INPUT->post->int('int')); + $this->assertSame(0, $INPUT->post->int('none')); + $this->assertSame(0, $INPUT->post->int('empty')); + $this->assertSame(42, $INPUT->post->int('none', 42)); + $this->assertSame(0, $INPUT->post->int('zero', 42)); + $this->assertSame(42, $INPUT->post->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->post->int('get', false)); + $this->assertSame(1, $INPUT->post->int('post', false)); + + $this->assertSame(17, $INPUT->post->int('int')); + $this->assertSame(0, $INPUT->post->int('none')); + $this->assertSame(0, $INPUT->post->int('empty')); + $this->assertSame(42, $INPUT->post->int('none', 42)); + $this->assertSame(0, $INPUT->post->int('zero', 42)); + $this->assertSame(42, $INPUT->post->int('zero', 42, true)); + + $this->assertSame(false, $INPUT->get->int('post', false)); + $this->assertSame(1, $INPUT->get->int('get', false)); + + $this->assertSame(0, $INPUT->int('array')); + + $this->assertSame(0, $INPUT->int('zero', -1)); + $this->assertSame(-1, $INPUT->int('empty', -1)); + $this->assertSame(-1, $INPUT->int('zero', -1, true)); + $this->assertSame(-1, $INPUT->int('empty', -1, true)); + } + + public function test_arr() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = array(1, 2); + $_POST['post'] = array(1, 2); + $INPUT = new Input(); + + $this->assertSame(array('foo', 'bar'), $INPUT->arr('array')); + $this->assertSame(array(), $INPUT->arr('none')); + $this->assertSame(array(), $INPUT->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->arr('emptya', array(1, 2), true)); + + $this->assertSame(false, $INPUT->arr('get', false)); + $this->assertSame(false, $INPUT->arr('post', false)); + + $this->assertSame(array('foo', 'bar'), $INPUT->post->arr('array')); + $this->assertSame(array(), $INPUT->post->arr('none')); + $this->assertSame(array(), $INPUT->post->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->post->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->post->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->post->arr('emptya', array(1, 2), true)); + + $this->assertSame(false, $INPUT->post->arr('get', false)); + $this->assertSame(array(1, 2), $INPUT->post->arr('post', false)); + + $this->assertSame(array('foo', 'bar'), $INPUT->get->arr('array')); + $this->assertSame(array(), $INPUT->get->arr('none')); + $this->assertSame(array(), $INPUT->get->arr('empty')); + $this->assertSame(array(1, 2), $INPUT->get->arr('none', array(1, 2))); + $this->assertSame(array(), $INPUT->get->arr('emptya', array(1, 2))); + $this->assertSame(array(1, 2), $INPUT->get->arr('emptya', array(1, 2), true)); + + $this->assertSame(array(1, 2), $INPUT->get->arr('get', false)); + $this->assertSame(false, $INPUT->get->arr('post', false)); + } + + public function test_bool() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $_GET['get'] = '1'; + $_POST['post'] = '1'; + $INPUT = new Input(); + + $this->assertSame(true, $INPUT->bool('one')); + $this->assertSame(false, $INPUT->bool('zero')); + + $this->assertSame(false, $INPUT->bool('get')); + $this->assertSame(false, $INPUT->bool('post')); + + $this->assertSame(true, $INPUT->post->bool('one')); + $this->assertSame(false, $INPUT->post->bool('zero')); + + $this->assertSame(false, $INPUT->post->bool('get')); + $this->assertSame(true, $INPUT->post->bool('post')); + + $this->assertSame(false, $INPUT->bool('zero', -1)); + $this->assertSame(-1, $INPUT->bool('empty', -1)); + $this->assertSame(-1, $INPUT->bool('zero', -1, true)); + $this->assertSame(-1, $INPUT->bool('empty', -1, true)); + } + + public function test_remove() { + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $INPUT->remove('string'); + $this->assertNull($_REQUEST['string']); + $this->assertNull($_POST['string']); + $this->assertNull($_GET['string']); + + $INPUT->post->remove('int'); + $this->assertNull($_POST['int']); + $this->assertEquals(17, $_GET['int']); + $this->assertEquals(17, $_REQUEST['int']); + } + + public function test_set(){ + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $INPUT->set('test','foo'); + $this->assertEquals('foo',$_REQUEST['test']); + $this->assertNull($_POST['test']); + $this->assertNull($_GET['test']); + + $INPUT->get->set('test2','foo'); + $this->assertEquals('foo',$_GET['test2']); + $this->assertEquals('foo',$_REQUEST['test2']); + $this->assertNull($_POST['test']); + } + + public function test_ref(){ + $_REQUEST = $this->data; + $_POST = $this->data; + $_GET = $this->data; + $INPUT = new Input(); + + $test = &$INPUT->ref('string'); + $this->assertEquals('foo',$test); + $_REQUEST['string'] = 'bla'; + $this->assertEquals('bla',$test); + } + +} diff --git a/_test/tests/inc/pageutils_findnearest.test.php b/_test/tests/inc/pageutils_findnearest.test.php new file mode 100644 index 0000000000000000000000000000000000000000..e129b5e585e2581846d3ff28ba0f16d6170ec640 --- /dev/null +++ b/_test/tests/inc/pageutils_findnearest.test.php @@ -0,0 +1,40 @@ +<?php + +class pageutils_findnearest_test extends DokuWikiTest { + function testNoSidebar() { + global $ID; + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals(false, $sidebar); + } + + function testExistingSidebars() { + global $ID; + + saveWikiText('sidebar', 'topsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + + $ID = 'foo'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + + saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('foo:bar:sidebar', $sidebar); + + $ID = 'foo:bar:test'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('foo:bar:sidebar', $sidebar); + + $ID = 'foo'; + $sidebar = page_findnearest('sidebar'); + $this->assertEquals('sidebar', $sidebar); + } + +} diff --git a/_test/tests/inc/template_sidebar.test.php b/_test/tests/inc/template_sidebar.test.php new file mode 100644 index 0000000000000000000000000000000000000000..56153894ab47c0e030845d4ee17d627e14d372d1 --- /dev/null +++ b/_test/tests/inc/template_sidebar.test.php @@ -0,0 +1,40 @@ +<?php + +class template_sidebar_test extends DokuWikiTest { + function testNoSidebar() { + global $ID; + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertEquals('',$sidebar); + } + + function testExistingSidebars() { + global $ID; + + saveWikiText('sidebar', 'topsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + + $ID = 'foo'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + + saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', ''); + + $ID = 'foo:bar:baz:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + + $ID = 'foo:bar:test'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'bottomsidebar-test') > 0); + + $ID = 'foo'; + $sidebar = tpl_sidebar(false); + $this->assertTrue(strpos($sidebar, 'topsidebar-test') > 0); + } + +} diff --git a/_test/tests/lib/exe/js_js_compress.test.php b/_test/tests/lib/exe/js_js_compress.test.php index aa8d82933b600fca0c905073a307c639827ac7ab..49f93cc54578b2ceaa350e06fd670126bc9eb7f7 100644 --- a/_test/tests/lib/exe/js_js_compress.test.php +++ b/_test/tests/lib/exe/js_js_compress.test.php @@ -111,12 +111,10 @@ class js_js_compress_test extends DokuWikiTest { } function test_multilinestring(){ - $text = 'var foo = "this is a \\ -multiline string";'; + $text = 'var foo = "this is a \\'."\n".'multiline string";'; $this->assertEquals('var foo="this is a multiline string";',js_compress($text)); - $text = "var foo = 'this is a \\ -multiline string';"; + $text = "var foo = 'this is a \\\nmultiline string';"; $this->assertEquals("var foo='this is a multiline string';",js_compress($text)); } diff --git a/_test/tests/test/basic.test.php b/_test/tests/test/basic.test.php index b4926d2ba522e80a67776c5b50708a5e0bc635e4..a0ea48a3a37cf69e3d21669ae1931ba4d797a16c 100644 --- a/_test/tests/test/basic.test.php +++ b/_test/tests/test/basic.test.php @@ -19,4 +19,87 @@ class InttestsBasicTest extends DokuWikiTest { 'DokuWiki was not a word in the output' ); } + + function testPost() { + $request = new TestRequest(); + + $input = array( + 'string' => 'A string', + 'array' => array(1, 2, 3), + 'id' => 'wiki:dokuwiki' + ); + + $response = $request->post($input); + + // server var check + $this->assertEquals('POST',$request->getServer('REQUEST_METHOD')); + $this->assertEquals('',$request->getServer('QUERY_STRING')); + $this->assertEquals('/doku.php',$request->getServer('REQUEST_URI')); + + // variable setup check + $this->assertEquals('A string', $request->getPost('string')); + $this->assertEquals(array(1, 2, 3), $request->getPost('array')); + $this->assertEquals('wiki:dokuwiki', $request->getPost('id')); + + // output check + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + } + + function testPostGet() { + $request = new TestRequest(); + + $input = array( + 'string' => 'A string', + 'array' => array(1, 2, 3), + ); + + $response = $request->post($input,'/doku.php?id=wiki:dokuwiki'); + + // server var check + $this->assertEquals('POST',$request->getServer('REQUEST_METHOD')); + $this->assertEquals('?id=wiki:dokuwiki',$request->getServer('QUERY_STRING')); + $this->assertEquals('/doku.php?id=wiki:dokuwiki',$request->getServer('REQUEST_URI')); + + // variable setup check + $this->assertEquals('A string', $request->getPost('string')); + $this->assertEquals(array(1, 2, 3), $request->getPost('array')); + $this->assertEquals('wiki:dokuwiki', $request->getGet('id')); + + // output check + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + } + + function testGet() { + $request = new TestRequest(); + + $input = array( + 'string' => 'A string', + 'array' => array(1, 2, 3), + 'test' => 'bar' + ); + + $response = $request->get($input,'/doku.php?id=wiki:dokuwiki&test=foo'); + + // server var check + $this->assertEquals('GET',$request->getServer('REQUEST_METHOD')); + $this->assertEquals( + '?id=wiki:dokuwiki&test=bar&string=A+string&array[0]=1&array[1]=2&array[2]=3', + $request->getServer('QUERY_STRING') + ); + $this->assertEquals( + '/doku.php?id=wiki:dokuwiki&test=bar&string=A+string&array[0]=1&array[1]=2&array[2]=3', + $request->getServer('REQUEST_URI') + ); + + // variable setup check + $this->assertEquals('A string', $request->getGet('string')); + $this->assertEquals(array(1, 2, 3), $request->getGet('array')); + $this->assertEquals('wiki:dokuwiki', $request->getGet('id')); + $this->assertEquals('bar', $request->getGet('test')); + + // output check + $this->assertTrue(strpos($response->getContent(), 'Andreas Gohr') >= 0); + } + + } diff --git a/conf/users.auth.php.dist b/conf/users.auth.php.dist index 6576eeb5fba9375b7dd9440191ae028fd0199e1f..df3c7848278b83255ce80df3b209dd1696e768f5 100644 --- a/conf/users.auth.php.dist +++ b/conf/users.auth.php.dist @@ -6,5 +6,5 @@ # # Format: # -# user:MD5password:Real Name:email:groups,comma,seperated +# login:passwordhash:Real Name:email:groups,comma,seperated diff --git a/doku.php b/doku.php index 97e594cb3aced502f6eca85afeaa4d11d160a015..4499bc1977df561149cbf841bfe9c01f80475e3d 100644 --- a/doku.php +++ b/doku.php @@ -4,6 +4,8 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> + * + * @global Input $INPUT */ // update message version @@ -11,13 +13,13 @@ $updateVersion = 36.1; // xdebug_start_profiling(); -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/'); -if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ +if(isset($_SERVER['HTTP_X_DOKUWIKI_DO'])) { $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO'])); -} elseif (!empty($_REQUEST['idx'])) { +} elseif(!empty($_REQUEST['idx'])) { $ACT = 'index'; -} elseif (isset($_REQUEST['do'])) { +} elseif(isset($_REQUEST['do'])) { $ACT = $_REQUEST['do']; } else { $ACT = 'show'; @@ -27,29 +29,26 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ require_once(DOKU_INC.'inc/init.php'); //import variables -$_REQUEST['id'] = str_replace("\xC2\xAD",'',$_REQUEST['id']); //soft-hyphen -$QUERY = trim($_REQUEST['id']); -$ID = getID(); +$_REQUEST['id'] = str_replace("\xC2\xAD", '', $INPUT->str('id')); //soft-hyphen +$QUERY = trim($INPUT->str('id')); +$ID = getID(); // deprecated 2011-01-14 -$NS = getNS($ID); +$NS = getNS($ID); -$REV = $_REQUEST['rev']; -$IDX = $_REQUEST['idx']; -$DATE = $_REQUEST['date']; -$RANGE = $_REQUEST['range']; -$HIGH = $_REQUEST['s']; +$REV = $INPUT->int('rev'); +$IDX = $INPUT->str('idx'); +$DATE = $INPUT->int('date'); +$RANGE = $INPUT->str('range'); +$HIGH = $INPUT->param('s'); if(empty($HIGH)) $HIGH = getGoogleQuery(); -if (isset($_POST['wikitext'])) { - $TEXT = cleanText($_POST['wikitext']); +if($INPUT->post->has('wikitext')) { + $TEXT = cleanText($INPUT->post->str('wikitext')); } -$PRE = cleanText(substr($_POST['prefix'], 0, -1)); -$SUF = cleanText($_POST['suffix']); -$SUM = $_REQUEST['summary']; - -//sanitize revision -$REV = preg_replace('/[^0-9]/','',$REV); +$PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1)); +$SUF = cleanText($INPUT->post->str('suffix')); +$SUM = $INPUT->post->str('summary'); //make infos about the selected page available $INFO = pageinfo(); @@ -58,28 +57,28 @@ $INFO = pageinfo(); $JSINFO['id'] = $ID; $JSINFO['namespace'] = (string) $INFO['namespace']; - // handle debugging -if($conf['allowdebug'] && $ACT == 'debug'){ +if($conf['allowdebug'] && $ACT == 'debug') { html_debug(); exit; } //send 404 for missing pages if configured or ID has special meaning to bots if(!$INFO['exists'] && - ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/',$ID)) && - ($ACT == 'show' || (!is_array($ACT) && substr($ACT,0,7) == 'export_')) ){ + ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/', $ID)) && + ($ACT == 'show' || (!is_array($ACT) && substr($ACT, 0, 7) == 'export_')) +) { header('HTTP/1.0 404 Not Found'); } //prepare breadcrumbs (initialize a static var) -if ($conf['breadcrumbs']) breadcrumbs(); +if($conf['breadcrumbs']) breadcrumbs(); // check upstream checkUpdateMessages(); $tmp = array(); // No event data -trigger_event('DOKUWIKI_STARTED',$tmp); +trigger_event('DOKUWIKI_STARTED', $tmp); //close session session_write_close(); diff --git a/feed.php b/feed.php index 98d5ef2e83bff16fe59c6b04524f7839ba4466f5..6ad371f1e60c5434547cc185dbf913d7710dca15 100644 --- a/feed.php +++ b/feed.php @@ -4,9 +4,12 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> + * + * @global array $conf + * @global Input $INPUT */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/'); require_once(DOKU_INC.'inc/init.php'); //close session @@ -17,14 +20,14 @@ $opt = rss_parseOptions(); // the feed is dynamic - we need a cache for each combo // (but most people just use the default feed so it's still effective) -$cache = getCacheName(join('',array_values($opt)).$_SERVER['REMOTE_USER'],'.feed'); -$key = join('', array_values($opt)) . $_SERVER['REMOTE_USER']; +$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed'); +$key = join('', array_values($opt)).$_SERVER['REMOTE_USER']; $cache = new cache($key, '.feed'); // prepare cache depends $depends['files'] = getConfigFiles('main'); $depends['age'] = $conf['rss_update']; -$depends['purge'] = isset($_REQUEST['purge']); +$depends['purge'] = $INPUT->bool('purge'); // check cacheage and deliver if nothing has changed since last // time or the update interval has not passed, also handles conditional requests @@ -39,34 +42,36 @@ if($cache->useCache($depends)) { exit; } else { http_conditionalRequest(time()); - } +} // create new feed -$rss = new DokuWikiFeedCreator(); -$rss->title = $conf['title'].(($opt['namespace']) ? ' '.$opt['namespace'] : ''); -$rss->link = DOKU_URL; +$rss = new DokuWikiFeedCreator(); +$rss->title = $conf['title'].(($opt['namespace']) ? ' '.$opt['namespace'] : ''); +$rss->link = DOKU_URL; $rss->syndicationURL = DOKU_URL.'feed.php'; $rss->cssStyleSheet = DOKU_URL.'lib/exe/css.php?s=feed'; -$image = new FeedImage(); +$image = new FeedImage(); $image->title = $conf['title']; -$image->url = tpl_getMediaFile('favicon.ico', true); -$image->link = DOKU_URL; -$rss->image = $image; - -$data = null; -$modes = array('list' => 'rssListNamespace', - 'search' => 'rssSearch', - 'recent' => 'rssRecentChanges'); -if (isset($modes[$opt['feed_mode']])) { +$image->url = tpl_getMediaFile(array(':wiki:favicon.ico', ':favicon.ico', 'images/favicon.ico'), true); +$image->link = DOKU_URL; +$rss->image = $image; + +$data = null; +$modes = array( + 'list' => 'rssListNamespace', + 'search' => 'rssSearch', + 'recent' => 'rssRecentChanges' +); +if(isset($modes[$opt['feed_mode']])) { $data = $modes[$opt['feed_mode']]($opt); } else { $eventData = array( 'opt' => &$opt, 'data' => &$data, ); - $event = new Doku_Event('FEED_MODE_UNKNOWN', $eventData); - if ($event->advise_before(true)) { + $event = new Doku_Event('FEED_MODE_UNKNOWN', $eventData); + if($event->advise_before(true)) { echo sprintf('<error>Unknown feed mode %s</error>', hsc($opt['feed_mode'])); exit; } @@ -74,7 +79,7 @@ if (isset($modes[$opt['feed_mode']])) { } rss_buildItems($rss, $data, $opt); -$feed = $rss->createFeed($opt['feed_type'],'utf-8'); +$feed = $rss->createFeed($opt['feed_type'], 'utf-8'); // save cachefile $cache->storeCache($feed); @@ -89,51 +94,55 @@ print $feed; * * @author Andreas Gohr <andi@splitbrain.org> */ -function rss_parseOptions(){ +function rss_parseOptions() { global $conf; + global $INPUT; $opt = array(); foreach(array( - // Basic feed properties - // Plugins may probably want to add new values to these - // properties for implementing own feeds - - // One of: list, search, recent - 'feed_mode' => array('mode', 'recent'), - // One of: diff, page, rev, current - 'link_to' => array('linkto', $conf['rss_linkto']), - // One of: abstract, diff, htmldiff, html - 'item_content' => array('content', $conf['rss_content']), - - // Special feed properties - // These are only used by certain feed_modes - - // String, used for feed title, in list and rc mode - 'namespace' => array('ns', null), - // Positive integer, only used in rc mode - 'items' => array('num', $conf['recent']), - // Boolean, only used in rc mode - 'show_minor' => array('minor', false), - // String, only used in search mode - 'search_query' => array('q', null), - // One of: pages, media, both - 'content_type' => array('view', $conf['rss_media']) - - ) as $name => $val) { - $opt[$name] = (isset($_REQUEST[$val[0]]) && !empty($_REQUEST[$val[0]])) - ? $_REQUEST[$val[0]] : $val[1]; + // Basic feed properties + // Plugins may probably want to add new values to these + // properties for implementing own feeds + + // One of: list, search, recent + 'feed_mode' => array('str', 'mode', 'recent'), + // One of: diff, page, rev, current + 'link_to' => array('str', 'linkto', $conf['rss_linkto']), + // One of: abstract, diff, htmldiff, html + 'item_content' => array('str', 'content', $conf['rss_content']), + + // Special feed properties + // These are only used by certain feed_modes + + // String, used for feed title, in list and rc mode + 'namespace' => array('str', 'ns', null), + // Positive integer, only used in rc mode + 'items' => array('int', 'num', $conf['recent']), + // Boolean, only used in rc mode + 'show_minor' => array('bool', 'minor', false), + // String, only used in search mode + 'search_query' => array('str', 'q', null), + // One of: pages, media, both + 'content_type' => array('str', 'view', $conf['rss_media']) + + ) as $name => $val) { + $opt[$name] = $INPUT->$val[0]($val[1], $val[2], true); } - $opt['items'] = max(0, (int) $opt['items']); - $opt['show_minor'] = (bool) $opt['show_minor']; + $opt['items'] = max(0, (int) $opt['items']); + $opt['show_minor'] = (bool) $opt['show_minor']; - $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); + $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none'); - $type = valid_input_set('type', array('rss','rss2','atom','atom1','rss1', - 'default' => $conf['rss_type']), - $_REQUEST); - switch ($type){ + $type = valid_input_set( + 'type', array( + 'rss', 'rss2', 'atom', 'atom1', 'rss1', + 'default' => $conf['rss_type'] + ), + $_REQUEST + ); + switch($type) { case 'rss': $opt['feed_type'] = 'RSS0.91'; $opt['mime_type'] = 'text/xml'; @@ -166,26 +175,27 @@ function rss_parseOptions(){ * Add recent changed pages to a feed object * * @author Andreas Gohr <andi@splitbrain.org> - * @param object $rss - the FeedCreator Object - * @param array $data - the items to add - * @param array $opt - the feed options + * @param FeedCreator $rss the FeedCreator Object + * @param array $data the items to add + * @param array $opt the feed options */ -function rss_buildItems(&$rss,&$data,$opt){ +function rss_buildItems(&$rss, &$data, $opt) { global $conf; global $lang; + /* @var auth_basic $auth */ global $auth; $eventData = array( - 'rss' => &$rss, + 'rss' => &$rss, 'data' => &$data, - 'opt' => &$opt, + 'opt' => &$opt, ); - $event = new Doku_Event('FEED_DATA_PROCESS', $eventData); - if ($event->advise_before(false)){ - foreach($data as $ditem){ - if(!is_array($ditem)){ + $event = new Doku_Event('FEED_DATA_PROCESS', $eventData); + if($event->advise_before(false)) { + foreach($data as $ditem) { + if(!is_array($ditem)) { // not an array? then only a list of IDs was given - $ditem = array( 'id' => $ditem ); + $ditem = array('id' => $ditem); } $item = new FeedItem(); @@ -195,88 +205,104 @@ function rss_buildItems(&$rss,&$data,$opt){ } // add date - if($ditem['date']){ + if($ditem['date']) { $date = $ditem['date']; - }elseif($meta['date']['modified']){ + } elseif($meta['date']['modified']) { $date = $meta['date']['modified']; - }else{ + } else { $date = @filemtime(wikiFN($id)); } - if($date) $item->date = date('r',$date); + if($date) $item->date = date('r', $date); // add title - if($conf['useheading'] && $meta['title']){ + if($conf['useheading'] && $meta['title']) { $item->title = $meta['title']; - }else{ + } else { $item->title = $ditem['id']; } - if($conf['rss_show_summary'] && !empty($ditem['sum'])){ + if($conf['rss_show_summary'] && !empty($ditem['sum'])) { $item->title .= ' - '.strip_tags($ditem['sum']); } // add item link - switch ($opt['link_to']){ + switch($opt['link_to']) { case 'page': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date + ), '&', true + ); } else { - $item->link = wl($id,'rev='.$date,true,'&', true); + $item->link = wl($id, 'rev='.$date, true, '&', true); } break; case 'rev': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date, - 'tab_details' => 'history'), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date, + 'tab_details' => 'history' + ), '&', true + ); } else { - $item->link = wl($id,'do=revisions&rev='.$date,true,'&'); + $item->link = wl($id, 'do=revisions&rev='.$date, true, '&'); } break; case 'current': - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id)), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id) + ), '&', true + ); } else { - $item->link = wl($id, '', true,'&'); + $item->link = wl($id, '', true, '&'); } break; case 'diff': default: - if ($ditem['media']) { - $item->link = media_managerURL(array('image' => $id, - 'ns' => getNS($id), - 'rev' => $date, - 'tab_details' => 'history', - 'mediado' => 'diff'), '&', true); + if($ditem['media']) { + $item->link = media_managerURL( + array( + 'image' => $id, + 'ns' => getNS($id), + 'rev' => $date, + 'tab_details' => 'history', + 'mediado' => 'diff' + ), '&', true + ); } else { - $item->link = wl($id,'rev='.$date.'&do=diff',true,'&'); + $item->link = wl($id, 'rev='.$date.'&do=diff', true, '&'); } } // add item content - switch ($opt['item_content']){ + switch($opt['item_content']) { case 'diff': case 'htmldiff': - if ($ditem['media']) { - $revs = getRevisions($id, 0, 1, 8192, true); - $rev = $revs[0]; + if($ditem['media']) { + $revs = getRevisions($id, 0, 1, 8192, true); + $rev = $revs[0]; $src_r = ''; $src_l = ''; - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); $src_r = ml($id, $more); } - if ($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)){ - $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1]; + if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) { + $more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1]; $src_l = ml($id, $more); } $content = ''; - if ($src_r) { - $content = '<table>'; + if($src_r) { + $content = '<table>'; $content .= '<tr><th width="50%">'.$rev.'</th>'; $content .= '<th width="50%">'.$lang['current'].'</th></tr>'; $content .= '<tr align="center"><td><img src="'.$src_l.'" alt="" /></td><td>'; @@ -287,57 +313,61 @@ function rss_buildItems(&$rss,&$data,$opt){ } else { require_once(DOKU_INC.'inc/DifferenceEngine.php'); $revs = getRevisions($id, 0, 1); - $rev = $revs[0]; - - if($rev){ - $df = new Diff(explode("\n",htmlspecialchars(rawWiki($id,$rev))), - explode("\n",htmlspecialchars(rawWiki($id,'')))); - }else{ - $df = new Diff(array(''), - explode("\n",htmlspecialchars(rawWiki($id,'')))); + $rev = $revs[0]; + + if($rev) { + $df = new Diff(explode("\n", htmlspecialchars(rawWiki($id, $rev))), + explode("\n", htmlspecialchars(rawWiki($id, '')))); + } else { + $df = new Diff(array(''), + explode("\n", htmlspecialchars(rawWiki($id, '')))); } - if($opt['item_content'] == 'htmldiff'){ - $tdf = new TableDiffFormatter(); - $content = '<table>'; + if($opt['item_content'] == 'htmldiff') { + $tdf = new TableDiffFormatter(); + $content = '<table>'; $content .= '<tr><th colspan="2" width="50%">'.$rev.'</th>'; $content .= '<th colspan="2" width="50%">'.$lang['current'].'</th></tr>'; $content .= $tdf->format($df); $content .= '</table>'; - }else{ - $udf = new UnifiedDiffFormatter(); + } else { + $udf = new UnifiedDiffFormatter(); $content = "<pre>\n".$udf->format($df)."\n</pre>"; } } break; case 'html': - if ($ditem['media']) { - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + if($ditem['media']) { + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $src = ml($id, $more); $content = '<img src="'.$src.'" alt="'.$id.'" />'; } else { $content = ''; } } else { - $content = p_wiki_xhtml($id,$date,false); + $content = p_wiki_xhtml($id, $date, false); // no TOC in feeds - $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s','',$content); + $content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s', '', $content); + + // add alignment for images + $content = preg_replace('/(<img .*?class="medialeft")/s', '\\1 align="left"', $content); + $content = preg_replace('/(<img .*?class="mediaright")/s', '\\1 align="right"', $content); // make URLs work when canonical is not set, regexp instead of rerendering! - if(!$conf['canonical']){ - $base = preg_quote(DOKU_REL,'/'); - $content = preg_replace('/(<a href|<img src)="('.$base.')/s','$1="'.DOKU_URL,$content); + if(!$conf['canonical']) { + $base = preg_quote(DOKU_REL, '/'); + $content = preg_replace('/(<a href|<img src)="('.$base.')/s', '$1="'.DOKU_URL, $content); } } break; case 'abstract': default: - if ($ditem['media']) { - if ($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { - $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); - $src = ml($id, $more); + if($ditem['media']) { + if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) { + $more = 'w='.$size[0].'&h='.$size[1].'t='.@filemtime(mediaFN($id)); + $src = ml($id, $more); $content = '<img src="'.$src.'" alt="'.$id.'" />'; } else { $content = ''; @@ -350,12 +380,12 @@ function rss_buildItems(&$rss,&$data,$opt){ // add user # FIXME should the user be pulled from metadata as well? - $user = @$ditem['user']; // the @ spares time repeating lookup + $user = @$ditem['user']; // the @ spares time repeating lookup $item->author = ''; - if($user && $conf['useacl'] && $auth){ + if($user && $conf['useacl'] && $auth) { $userInfo = $auth->getUserData($user); - if ($userInfo){ - switch ($conf['showuseras']){ + if($userInfo) { + switch($conf['showuseras']) { case 'username': $item->author = $userInfo['name']; break; @@ -366,35 +396,37 @@ function rss_buildItems(&$rss,&$data,$opt){ } else { $item->author = $user; } - if($userInfo && !$opt['guardmail']){ + if($userInfo && !$opt['guardmail']) { $item->authorEmail = $userInfo['mail']; - }else{ + } else { //cannot obfuscate because some RSS readers may check validity $item->authorEmail = $user.'@'.$ditem['ip']; } - }elseif($user){ + } elseif($user) { // this happens when no ACL but some Apache auth is used $item->author = $user; $item->authorEmail = $user.'@'.$ditem['ip']; - }else{ + } else { $item->authorEmail = 'anonymous@'.$ditem['ip']; } // add category if(isset($meta['subject'])) { $item->category = $meta['subject']; - }else{ + } else { $cat = getNS($id); if($cat) $item->category = $cat; } // finally add the item to the feed object, after handing it to registered plugins - $evdata = array('item' => &$item, - 'opt' => &$opt, - 'ditem' => &$ditem, - 'rss' => &$rss); - $evt = new Doku_Event('FEED_ITEM_ADD', $evdata); - if ($evt->advise_before()){ + $evdata = array( + 'item' => &$item, + 'opt' => &$opt, + 'ditem' => &$ditem, + 'rss' => &$rss + ); + $evt = new Doku_Event('FEED_ITEM_ADD', $evdata); + if($evt->advise_before()) { $rss->addItem($item); } $evt->advise_after(); // for completeness @@ -403,20 +435,19 @@ function rss_buildItems(&$rss,&$data,$opt){ $event->advise_after(); } - /** * Add recent changed pages to the feed object * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssRecentChanges($opt){ +function rssRecentChanges($opt) { global $conf; $flags = RECENTS_SKIP_DELETED; if(!$opt['show_minor']) $flags += RECENTS_SKIP_MINORS; if($opt['content_type'] == 'media' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_CHANGES; if($opt['content_type'] == 'both' && $conf['mediarevisions']) $flags += RECENTS_MEDIA_PAGES_MIXED; - $recents = getRecents(0,$opt['items'],$opt['namespace'],$flags); + $recents = getRecents(0, $opt['items'], $opt['namespace'], $flags); return $recents; } @@ -425,16 +456,16 @@ function rssRecentChanges($opt){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssListNamespace($opt){ +function rssListNamespace($opt) { require_once(DOKU_INC.'inc/search.php'); global $conf; - $ns=':'.cleanID($opt['namespace']); - $ns=str_replace(':','/',$ns); + $ns = ':'.cleanID($opt['namespace']); + $ns = str_replace(':', '/', $ns); $data = array(); sort($data); - search($data,$conf['datadir'],'search_list','',$ns); + search($data, $conf['datadir'], 'search_list', '', $ns); return $data; } @@ -444,11 +475,11 @@ function rssListNamespace($opt){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rssSearch($opt){ - if(!$opt['search_query']) return; +function rssSearch($opt) { + if(!$opt['search_query']) return array(); require_once(DOKU_INC.'inc/fulltext.php'); - $data = ft_pageSearch($opt['search_query'],$poswords); + $data = ft_pageSearch($opt['search_query'], $poswords); $data = array_keys($data); return $data; diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 0a7ce8e7c421ccea3cb1ddf4dcc5ecd42821330d..1b68cf6d3ad990aa8541260b93b5476c77d3e226 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1039,8 +1039,8 @@ class TableDiffFormatter extends DiffFormatter { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. $val = parent::format($diff); - $val = str_replace(' ',' ', $val); - $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); + $val = str_replace(' ','  ', $val); + $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); return $val; } @@ -1078,7 +1078,7 @@ class TableDiffFormatter extends DiffFormatter { } function emptyLine() { - return '<td colspan="2"> </td>'; + return '<td colspan="2"> </td>'; } function contextLine($line) { @@ -1132,8 +1132,8 @@ class InlineDiffFormatter extends DiffFormatter { // Preserve whitespaces by converting some to non-breaking spaces. // Do not convert all of them to allow word-wrap. $val = parent::format($diff); - $val = str_replace(' ',' ', $val); - $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); + $val = str_replace(' ','  ', $val); + $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); return $val; } diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 26bee52a745287aa0be5bd87f62f7102b965adb3..a25846c31cdeeabd6fb305ccd64e2a8718a8f0d4 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -61,6 +61,8 @@ class DokuHTTPClient extends HTTPClient { } +class HTTPClientException extends Exception { } + /** * This class implements a basic HTTP client * @@ -227,7 +229,7 @@ class HTTPClient { $path = $uri['path']; if(empty($path)) $path = '/'; if(!empty($uri['query'])) $path .= '?'.$uri['query']; - if(isset($uri['port']) && !empty($uri['port'])) $port = $uri['port']; + if(!empty($uri['port'])) $port = $uri['port']; if(isset($uri['user'])) $this->user = $uri['user']; if(isset($uri['pass'])) $this->pass = $uri['pass']; @@ -249,7 +251,7 @@ class HTTPClient { // prepare headers $headers = $this->headers; $headers['Host'] = $uri['host']; - if($uri['port']) $headers['Host'].= ':'.$uri['port']; + if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port']; $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; if ($this->keep_alive) { @@ -279,16 +281,13 @@ class HTTPClient { $headers['Proxy-Authorization'] = 'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass); } - // stop time - $start = time(); - // already connected? $connectionId = $this->_uniqueConnectionId($server,$port); - $this->_debug('connection pool', $this->connections); + $this->_debug('connection pool', self::$connections); $socket = null; - if (isset($this->connections[$connectionId])) { + if (isset(self::$connections[$connectionId])) { $this->_debug('reusing connection', $connectionId); - $socket = $this->connections[$connectionId]; + $socket = self::$connections[$connectionId]; } if (is_null($socket) || feof($socket)) { $this->_debug('opening connection', $connectionId); @@ -302,222 +301,161 @@ class HTTPClient { // keep alive? if ($this->keep_alive) { - $this->connections[$connectionId] = $socket; + self::$connections[$connectionId] = $socket; } else { - unset($this->connections[$connectionId]); - } - } - - //set blocking - stream_set_blocking($socket,1); - - // build request - $request = "$method $request_url HTTP/".$this->http.HTTP_NL; - $request .= $this->_buildHeaders($headers); - $request .= $this->_getCookies(); - $request .= HTTP_NL; - $request .= $data; - - $this->_debug('request',$request); - - // select parameters - $sel_r = null; - $sel_w = array($socket); - $sel_e = null; - - // send request - $towrite = strlen($request); - $written = 0; - while($written < $towrite){ - // check timeout - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while sending request (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - - // wait for stream ready or timeout (1sec) - if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ - usleep(1000); - continue; - } - - // write to stream - $ret = fwrite($socket, substr($request,$written,4096)); - if($ret === false){ - $this->status = -100; - $this->error = 'Failed writing to socket'; - unset($this->connections[$connectionId]); - return false; + unset(self::$connections[$connectionId]); } - $written += $ret; } - // continue non-blocking - stream_set_blocking($socket,0); - - // read headers from socket - $r_headers = ''; - do{ - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); - return false; - } - usleep(1000); - $r_headers .= fgets($socket,1024); - }while(!preg_match('/\r?\n\r?\n$/',$r_headers)); - - $this->_debug('response headers',$r_headers); - - // check if expected body size exceeds allowance - if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ - if($match[1] > $this->max_bodysize){ - $this->error = 'Reported content length exceeds allowed response size'; - if ($this->max_bodysize_abort) - unset($this->connections[$connectionId]); - return false; + try { + //set non-blocking + stream_set_blocking($socket, false); + + // build request + $request = "$method $request_url HTTP/".$this->http.HTTP_NL; + $request .= $this->_buildHeaders($headers); + $request .= $this->_getCookies(); + $request .= HTTP_NL; + $request .= $data; + + $this->_debug('request',$request); + $this->_sendData($socket, $request, 'request'); + + // read headers from socket + $r_headers = ''; + do{ + $r_line = $this->_readLine($socket, 'headers'); + $r_headers .= $r_line; + }while($r_line != "\r\n" && $r_line != "\n"); + + $this->_debug('response headers',$r_headers); + + // check if expected body size exceeds allowance + if($this->max_bodysize && preg_match('/\r?\nContent-Length:\s*(\d+)\r?\n/i',$r_headers,$match)){ + if($match[1] > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Reported content length exceeds allowed response size'); + else + $this->error = 'Reported content length exceeds allowed response size'; + } } - } - // get Status - if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) { - $this->error = 'Server returned bad answer'; - unset($this->connections[$connectionId]); - return false; - } - $this->status = $m[2]; - - // handle headers and cookies - $this->resp_headers = $this->_parseHeaders($r_headers); - if(isset($this->resp_headers['set-cookie'])){ - foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ - list($cookie) = explode(';',$cookie,2); - list($key,$val) = explode('=',$cookie,2); - $key = trim($key); - if($val == 'deleted'){ - if(isset($this->cookies[$key])){ - unset($this->cookies[$key]); + // get Status + if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) + throw new HTTPClientException('Server returned bad answer'); + + $this->status = $m[2]; + + // handle headers and cookies + $this->resp_headers = $this->_parseHeaders($r_headers); + if(isset($this->resp_headers['set-cookie'])){ + foreach ((array) $this->resp_headers['set-cookie'] as $cookie){ + list($cookie) = explode(';',$cookie,2); + list($key,$val) = explode('=',$cookie,2); + $key = trim($key); + if($val == 'deleted'){ + if(isset($this->cookies[$key])){ + unset($this->cookies[$key]); + } + }elseif($key){ + $this->cookies[$key] = $val; } - }elseif($key){ - $this->cookies[$key] = $val; } } - } - - $this->_debug('Object headers',$this->resp_headers); - // check server status code to follow redirect - if($this->status == 301 || $this->status == 302 ){ - // close the connection because we don't handle content retrieval here - // that's the easiest way to clean up the connection - fclose($socket); - unset($this->connections[$connectionId]); + $this->_debug('Object headers',$this->resp_headers); - if (empty($this->resp_headers['location'])){ - $this->error = 'Redirect but no Location Header found'; - return false; - }elseif($this->redirect_count == $this->max_redirect){ - $this->error = 'Maximum number of redirects exceeded'; - return false; - }else{ - $this->redirect_count++; - $this->referer = $url; - // handle non-RFC-compliant relative redirects - if (!preg_match('/^http/i', $this->resp_headers['location'])){ - if($this->resp_headers['location'][0] != '/'){ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - dirname($uri['path']).'/'.$this->resp_headers['location']; - }else{ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - $this->resp_headers['location']; + // check server status code to follow redirect + if($this->status == 301 || $this->status == 302 ){ + if (empty($this->resp_headers['location'])){ + throw new HTTPClientException('Redirect but no Location Header found'); + }elseif($this->redirect_count == $this->max_redirect){ + throw new HTTPClientException('Maximum number of redirects exceeded'); + }else{ + // close the connection because we don't handle content retrieval here + // that's the easiest way to clean up the connection + fclose($socket); + unset(self::$connections[$connectionId]); + + $this->redirect_count++; + $this->referer = $url; + // handle non-RFC-compliant relative redirects + if (!preg_match('/^http/i', $this->resp_headers['location'])){ + if($this->resp_headers['location'][0] != '/'){ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + dirname($uri['path']).'/'.$this->resp_headers['location']; + }else{ + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + $this->resp_headers['location']; + } } + // perform redirected request, always via GET (required by RFC) + return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - // perform redirected request, always via GET (required by RFC) - return $this->sendRequest($this->resp_headers['location'],array(),'GET'); } - } - // check if headers are as expected - if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){ - $this->error = 'The received headers did not match the given regexp'; - unset($this->connections[$connectionId]); - return false; - } + // check if headers are as expected + if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)) + throw new HTTPClientException('The received headers did not match the given regexp'); - //read body (with chunked encoding if needed) - $r_body = ''; - if(preg_match('/transfer\-(en)?coding:\s*chunked\r\n/i',$r_headers)){ - do { - unset($chunk_size); + //read body (with chunked encoding if needed) + $r_body = ''; + if((isset($this->resp_headers['transfer-encoding']) && $this->resp_headers['transfer-encoding'] == 'chunked') + || (isset($this->resp_headers['transfer-coding']) && $this->resp_headers['transfer-coding'] == 'chunked')){ + $abort = false; do { - if(feof($socket)){ - $this->error = 'Premature End of File (socket)'; - unset($this->connections[$connectionId]); - return false; + $chunk_size = ''; + while (preg_match('/^[a-zA-Z0-9]?$/',$byte=$this->_readData($socket,1,'chunk'))){ + // read chunksize until \r + $chunk_size .= $byte; + if (strlen($chunk_size) > 128) // set an abritrary limit on the size of chunks + throw new HTTPClientException('Allowed response size exceeded'); } - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; + $this->_readLine($socket, 'chunk'); // readtrailing \n + $chunk_size = hexdec($chunk_size); + + if($this->max_bodysize && $chunk_size+strlen($r_body) > $this->max_bodysize){ + if ($this->max_bodysize_abort) + throw new HTTPClientException('Allowed response size exceeded'); + $this->error = 'Allowed response size exceeded'; + $chunk_size = $this->max_bodysize - strlen($r_body); + $abort = true; } - $byte = fread($socket,1); - $chunk_size .= $byte; - } while (preg_match('/[a-zA-Z0-9]/',$byte)); // read chunksize including \r - - $byte = fread($socket,1); // readtrailing \n - $chunk_size = hexdec($chunk_size); - if ($chunk_size) { - $this_chunk = fread($socket,$chunk_size); - $r_body .= $this_chunk; - $byte = fread($socket,2); // read trailing \r\n - } - if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort){ - unset($this->connections[$connectionId]); - return false; - } else { - break; + if ($chunk_size > 0) { + $r_body .= $this->_readData($socket, $chunk_size, 'chunk'); + $byte = $this->_readData($socket, 2, 'chunk'); // read trailing \r\n } - } - } while ($chunk_size); - }else{ - // read entire socket - while (!feof($socket)) { - if(time()-$start > $this->timeout){ - $this->status = -100; - $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); - unset($this->connections[$connectionId]); - return false; - } - $r_body .= fread($socket,4096); - $r_size = strlen($r_body); - if($this->max_bodysize && $r_size > $this->max_bodysize){ - $this->error = 'Allowed response size exceeded'; + } while ($chunk_size && !$abort); + }elseif($this->max_bodysize){ + // read just over the max_bodysize + $r_body = $this->_readData($socket, $this->max_bodysize+1, 'response', true); + if(strlen($r_body) > $this->max_bodysize){ if ($this->max_bodysize_abort) { - unset($this->connections[$connectionId]); - return false; + throw new HTTPClientException('Allowed response size exceeded'); } else { - break; + $this->error = 'Allowed response size exceeded'; } } - if(isset($this->resp_headers['content-length']) && - !isset($this->resp_headers['transfer-encoding']) && - $this->resp_headers['content-length'] == $r_size){ - // we read the content-length, finish here - break; + }elseif(isset($this->resp_headers['content-length']) && + !isset($this->resp_headers['transfer-encoding'])){ + // read up to the content-length + $r_body = $this->_readData($socket, $this->resp_headers['content-length'], 'response', true); + }else{ + // read entire socket + $r_size = 0; + while (!feof($socket)) { + $r_body .= $this->_readData($socket, 4096, 'response', true); } } + + } catch (HTTPClientException $err) { + $this->error = $err->getMessage(); + if ($err->getCode()) + $this->status = $err->getCode(); + unset(self::$connections[$connectionId]); + fclose($socket); + return false; } if (!$this->keep_alive || @@ -525,7 +463,7 @@ class HTTPClient { // close socket $status = socket_get_status($socket); fclose($socket); - unset($this->connections[$connectionId]); + unset(self::$connections[$connectionId]); } // decode gzip if needed @@ -546,6 +484,126 @@ class HTTPClient { return true; } + /** + * Safely write data to a socket + * + * @param handle $socket An open socket handle + * @param string $data The data to write + * @param string $message Description of what is being read + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _sendData($socket, $data, $message) { + // select parameters + $sel_r = null; + $sel_w = array($socket); + $sel_e = null; + + // send request + $towrite = strlen($data); + $written = 0; + while($written < $towrite){ + // check timeout + $time_used = $this->_time() - $this->start; + if($time_used > $this->timeout) + throw new HTTPClientException(sprintf('Timeout while sending %s (%.3fs)',$message, $time_used), -100); + if(feof($socket)) + throw new HTTPClientException("Socket disconnected while writing $message"); + + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + // write to stream + $nbytes = fwrite($socket, substr($data,$written,4096)); + if($nbytes === false) + throw new HTTPClientException("Failed writing to socket while sending $message", -100); + $written += $nbytes; + } + } + } + + /** + * Safely read data from a socket + * + * Reads up to a given number of bytes or throws an exception if the + * response times out or ends prematurely. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param int $nbytes Number of bytes to read + * @param string $message Description of what is being read + * @param bool $ignore_eof End-of-file is not an error if this is set + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _readData($socket, $nbytes, $message, $ignore_eof = false) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + + $r_data = ''; + // Does not return immediately so timeout and eof can be checked + if ($nbytes < 0) $nbytes = 0; + $to_read = $nbytes; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + if(feof($socket)) { + if(!$ignore_eof) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + break; + } + + if ($to_read > 0) { + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + $bytes = fread($socket, $to_read); + if($bytes === false) + throw new HTTPClientException("Failed reading from socket while reading $message", -100); + $r_data .= $bytes; + $to_read -= strlen($bytes); + } + } + } while ($to_read > 0 && strlen($r_data) < $nbytes); + return $r_data; + } + + /** + * Safely read a \n-terminated line from a socket + * + * Always returns a complete line, including the terminating \n. + * + * @param handle $socket An open socket handle in non-blocking mode + * @param string $message Description of what is being read + * @author Tom N Harris <tnharris@whoopdedo.org> + */ + function _readLine($socket, $message) { + // select parameters + $sel_r = array($socket); + $sel_w = null; + $sel_e = null; + + $r_data = ''; + do { + $time_used = $this->_time() - $this->start; + if ($time_used > $this->timeout) + throw new HTTPClientException( + sprintf('Timeout while reading %s (%.3fs)', $message, $time_used), + -100); + if(feof($socket)) + throw new HTTPClientException("Premature End of File (socket) while reading $message"); + + // wait for stream ready or timeout + self::selecttimeout($this->timeout - $time_used, $sec, $usec); + if(@stream_select($sel_r, $sel_w, $sel_e, $sec, $usec) !== false){ + $r_data = fgets($socket, 1024); + } + } while (!preg_match('/\n$/',$r_data)); + return $r_data; + } + /** * print debug info * @@ -566,11 +624,19 @@ class HTTPClient { /** * Return current timestamp in microsecond resolution */ - function _time(){ + static function _time(){ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } + /** + * Calculate seconds and microseconds + */ + static function selecttimeout($time, &$sec, &$usec){ + $sec = floor($time); + $usec = (int)(($time - $sec) * 1000000); + } + /** * convert given header string to Header array * @@ -583,7 +649,7 @@ class HTTPClient { $lines = explode("\n",$string); array_shift($lines); //skip first line (status) foreach($lines as $line){ - list($key, $val) = explode(':',$line,2); + @list($key, $val) = explode(':',$line,2); $key = trim($key); $val = trim($val); $key = strtolower($key); diff --git a/inc/Input.class.php b/inc/Input.class.php new file mode 100644 index 0000000000000000000000000000000000000000..f4174404a9b91e813f2a7f11a095ebca4e3598b7 --- /dev/null +++ b/inc/Input.class.php @@ -0,0 +1,229 @@ +<?php + +/** + * Encapsulates access to the $_REQUEST array, making sure used parameters are initialized and + * have the correct type. + * + * All function access the $_REQUEST array by default, if you want to access $_POST or $_GET + * explicitly use the $post and $get members. + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +class Input { + + /** @var PostInput Access $_POST parameters */ + public $post; + /** @var GetInput Access $_GET parameters */ + public $get; + + protected $access; + + /** + * Intilizes the Input class and it subcomponents + */ + function __construct() { + $this->access = &$_REQUEST; + $this->post = new PostInput(); + $this->get = new GetInput(); + } + + /** + * Check if a parameter was set + * + * Basically a wrapper around isset. When called on the $post and $get subclasses, + * the parameter is set to $_POST or $_GET and to $_REQUEST + * + * @see isset + * @param string $name Parameter name + * @return bool + */ + public function has($name) { + return isset($this->access[$name]); + } + + /** + * Remove a parameter from the superglobals + * + * Basically a wrapper around unset. When NOT called on the $post and $get subclasses, + * the parameter will also be removed from $_POST or $_GET + * + * @see isset + * @param string $name Parameter name + * @return bool + */ + public function remove($name) { + if(isset($this->access[$name])) { + unset($this->access[$name]); + } + // also remove from sub classes + if(isset($this->post) && isset($_POST[$name])) { + unset($_POST[$name]); + } + if(isset($this->get) && isset($_GET[$name])) { + unset($_GET[$name]); + } + } + + /** + * Access a request parameter without any type conversion + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return mixed + */ + 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]; + } + + /** + * Sets a parameter + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + $this->access[$name] = $value; + } + + /** + * Get a reference to a request parameter + * + * This avoids copying data in memory, when the parameter is not set it will be created + * and intialized with the given $default value before a reference is returned + * + * @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 + */ + public function &ref($name, $default = '', $nonempty = false) { + if(!isset($this->access[$name]) || ($nonempty && empty($this->access[$name]))) { + $this->set($name, $default); + } + + return $this->access[$name]; + } + + /** + * 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 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; + + return (int) $this->access[$name]; + } + + /** + * 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 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; + + return (string) $this->access[$name]; + } + + /** + * Access a request parameter as bool + * + * Note: $nonempty is here for interface consistency and makes not much sense for booleans + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return bool + */ + 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; + + return (bool) $this->access[$name]; + } + + /** + * Access a request parameter as array + * + * @param string $name Parameter name + * @param mixed $default Default to return if parameter isn't set + * @param bool $nonempty Return $default if parameter is set but empty() + * @return array + */ + public function arr($name, $default = array(), $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; + + return (array) $this->access[$name]; + } + +} + +/** + * Internal class used for $_POST access in Input class + */ +class PostInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_POST; + } + + /** + * Sets a parameter in $_POST and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } +} + +/** + * Internal class used for $_GET access in Input class + + */ +class GetInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_GET; + } + + /** + * Sets a parameter in $_GET and $_REQUEST + * + * @param string $name Parameter name + * @param mixed $value Value to set + */ + public function set($name, $value) { + parent::set($name, $value); + $_REQUEST[$name] = $value; + } +} diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 5c043fb6bd7920af801a423302391ba20a252086..ac29bca667fe5dc24853895632c012122560f935 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -2972,7 +2972,7 @@ class JpegMeta { elseif ($c == 62) $ascii .= '>'; elseif ($c == 32) - $ascii .= ' '; + $ascii .= ' '; elseif ($c > 32) $ascii .= chr($c); else diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index 507150d00402e3e0f917cd4af0cce882edec89ee..c85e61395bc1ce2d27b94c51f04f29c506676dee 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -11,20 +11,24 @@ // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) // think different -if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); +if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL', "\n"); #define('MAILHEADER_ASCIIONLY',1); +/** + * Mail Handling + */ class Mailer { - protected $headers = array(); - protected $attach = array(); - protected $html = ''; - protected $text = ''; + protected $headers = array(); + protected $attach = array(); + protected $html = ''; + protected $text = ''; - protected $boundary = ''; - protected $partid = ''; - protected $sendparam= null; + protected $boundary = ''; + protected $partid = ''; + protected $sendparam = null; + /** @var EmailAddressValidator */ protected $validator = null; protected $allowhtml = true; @@ -33,38 +37,38 @@ class Mailer { * * Initializes the boundary strings and part counters */ - public function __construct(){ + public function __construct() { global $conf; - $server = parse_url(DOKU_URL,PHP_URL_HOST); + $server = parse_url(DOKU_URL, PHP_URL_HOST); - $this->partid = md5(uniqid(rand(),true)).'@'.$server; - $this->boundary = '----------'.md5(uniqid(rand(),true)); + $this->partid = md5(uniqid(rand(), true)).'@'.$server; + $this->boundary = '----------'.md5(uniqid(rand(), true)); - $listid = join('.',array_reverse(explode('/',DOKU_BASE))).$server; - $listid = strtolower(trim($listid,'.')); + $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server; + $listid = strtolower(trim($listid, '.')); - $this->allowhtml = (bool) $conf['htmlmail']; + $this->allowhtml = (bool)$conf['htmlmail']; // add some default headers for mailfiltering FS#2247 - $this->setHeader('X-Mailer','DokuWiki '.getVersion()); + $this->setHeader('X-Mailer', 'DokuWiki '.getVersion()); $this->setHeader('X-DokuWiki-User', $_SERVER['REMOTE_USER']); $this->setHeader('X-DokuWiki-Title', $conf['title']); $this->setHeader('X-DokuWiki-Server', $server); $this->setHeader('X-Auto-Response-Suppress', 'OOF'); - $this->setHeader('List-Id',$conf['title'].' <'.$listid.'>'); + $this->setHeader('List-Id', $conf['title'].' <'.$listid.'>'); } /** * Attach a file * - * @param $path Path to the file to attach - * @param $mime Mimetype of the attached file - * @param $name The filename to use - * @param $embed Unique key to reference this file from the HTML part + * @param string $path Path to the file to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part */ - public function attachFile($path,$mime,$name='',$embed=''){ - if(!$name){ + public function attachFile($path, $mime, $name = '', $embed = '') { + if(!$name) { $name = basename($path); } @@ -79,14 +83,14 @@ class Mailer { /** * Attach a file * - * @param $path The file contents to attach - * @param $mime Mimetype of the attached file - * @param $name The filename to use - * @param $embed Unique key to reference this file from the HTML part + * @param string $data The file contents to attach + * @param string $mime Mimetype of the attached file + * @param string $name The filename to use + * @param string $embed Unique key to reference this file from the HTML part */ - public function attachContent($data,$mime,$name='',$embed=''){ - if(!$name){ - list($junk,$ext) = split('/',$mime); + public function attachContent($data, $mime, $name = '', $embed = '') { + if(!$name) { + list(, $ext) = explode('/', $mime); $name = count($this->attach).".$ext"; } @@ -101,18 +105,18 @@ class Mailer { /** * Callback function to automatically embed images referenced in HTML templates */ - protected function autoembed_cb($matches){ + protected function autoembed_cb($matches) { static $embeds = 0; $embeds++; // get file and mime type $media = cleanID($matches[1]); - list($ext, $mime) = mimetype($media); - $file = mediaFN($media); + list(, $mime) = mimetype($media); + $file = mediaFN($media); if(!file_exists($file)) return $matches[0]; //bad reference, keep as is // attach it and set placeholder - $this->attachFile($file,$mime,'','autoembed'.$embeds); + $this->attachFile($file, $mime, '', 'autoembed'.$embeds); return '%%autoembed'.$embeds.'%%'; } @@ -125,18 +129,18 @@ class Mailer { * @param 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){ - $header = str_replace(' ','-',ucwords(strtolower(str_replace('-',' ',$header)))); // streamline casing - if($clean){ - $header = preg_replace('/[^\w \-\.\+\@]+/','',$header); - $value = preg_replace('/[^\w \-\.\+\@<>]+/','',$value); + public function setHeader($header, $value, $clean = true) { + $header = str_replace(' ', '-', ucwords(strtolower(str_replace('-', ' ', $header)))); // streamline casing + if($clean) { + $header = preg_replace('/[^a-zA-Z0-9_ \-\.\+\@]+/', '', $header); + $value = preg_replace('/[^a-zA-Z0-9_ \-\.\+\@<>]+/', '', $value); } // empty value deletes $value = trim($value); - if($value === ''){ + if($value === '') { if(isset($this->headers[$header])) unset($this->headers[$header]); - }else{ + } else { $this->headers[$header] = $value; } } @@ -147,7 +151,7 @@ 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 */ - public function setParameters($param){ + public function setParameters($param) { $this->sendparam = $param; } @@ -166,38 +170,40 @@ class Mailer { * @param array $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){ + public function setBody($text, $textrep = null, $htmlrep = null, $html = null, $wrap = true) { global $INFO; global $conf; - $htmlrep = (array) $htmlrep; - $textrep = (array) $textrep; + $htmlrep = (array)$htmlrep; + $textrep = (array)$textrep; // create HTML from text if not given - if(is_null($html)){ + if(is_null($html)) { $html = $text; $html = hsc($html); - $html = preg_replace('/^-----*$/m','<hr >',$html); + $html = preg_replace('/^-----*$/m', '<hr >', $html); $html = nl2br($html); } - if($wrap){ - $wrap = rawLocale('mailwrap','html'); - $html = preg_replace('/\n-- <br \/>.*$/s','',$html); //strip signature - $html = str_replace('@HTMLBODY@',$html,$wrap); + if($wrap) { + $wrap = rawLocale('mailwrap', 'html'); + $html = preg_replace('/\n-- <br \/>.*$/s', '', $html); //strip signature + $html = str_replace('@HTMLBODY@', $html, $wrap); } // copy over all replacements missing for HTML (autolink URLs) - foreach($textrep as $key => $value){ + foreach($textrep as $key => $value) { if(isset($htmlrep[$key])) continue; - if(preg_match('/^https?:\/\//i',$value)){ + if(preg_match('/^https?:\/\//i', $value)) { $htmlrep[$key] = '<a href="'.hsc($value).'">'.hsc($value).'</a>'; - }else{ + } else { $htmlrep[$key] = hsc($value); } } // embed media from templates - $html = preg_replace_callback('/@MEDIA\(([^\)]+)\)@/', - array($this,'autoembed_cb'),$html); + $html = preg_replace_callback( + '/@MEDIA\(([^\)]+)\)@/', + array($this, 'autoembed_cb'), $html + ); // prepare default replacements $ip = clientIP(); @@ -213,7 +219,7 @@ class Mailer { 'NAME' => $INFO['userinfo']['name'], 'MAIL' => $INFO['userinfo']['mail'], ); - $trep = array_merge($trep,(array) $textrep); + $trep = array_merge($trep, (array)$textrep); $hrep = array( 'DATE' => '<i>'.hsc(dformat()).'</i>', 'BROWSER' => hsc($_SERVER['HTTP_USER_AGENT']), @@ -224,16 +230,16 @@ class Mailer { 'USER' => hsc($_SERVER['REMOTE_USER']), 'NAME' => hsc($INFO['userinfo']['name']), 'MAIL' => '<a href="mailto:"'.hsc($INFO['userinfo']['mail']).'">'. - hsc($INFO['userinfo']['mail']).'</a>', + hsc($INFO['userinfo']['mail']).'</a>', ); - $hrep = array_merge($hrep,(array) $htmlrep); + $hrep = array_merge($hrep, (array)$htmlrep); // Apply replacements - foreach ($trep as $key => $substitution) { - $text = str_replace('@'.strtoupper($key).'@',$substitution, $text); + foreach($trep as $key => $substitution) { + $text = str_replace('@'.strtoupper($key).'@', $substitution, $text); } - foreach ($hrep as $key => $substitution) { - $html = str_replace('@'.strtoupper($key).'@',$substitution, $html); + foreach($hrep as $key => $substitution) { + $html = str_replace('@'.strtoupper($key).'@', $substitution, $html); } $this->setHTML($html); @@ -247,7 +253,7 @@ class Mailer { * * You probably want to use setBody() instead */ - public function setHTML($html){ + public function setHTML($html) { $this->html = $html; } @@ -256,7 +262,7 @@ class Mailer { * * You probably want to use setBody() instead */ - public function setText($text){ + public function setText($text) { $this->text = $text; } @@ -266,7 +272,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function to($address){ + public function to($address) { $this->setHeader('To', $address, false); } @@ -276,7 +282,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function cc($address){ + public function cc($address) { $this->setHeader('Cc', $address, false); } @@ -286,7 +292,7 @@ class Mailer { * @see setAddress * @param string $address Multiple adresses separated by commas */ - public function bcc($address){ + public function bcc($address) { $this->setHeader('Bcc', $address, false); } @@ -299,7 +305,7 @@ class Mailer { * @see setAddress * @param string $address from address */ - public function from($address){ + public function from($address) { $this->setHeader('From', $address, false); } @@ -308,7 +314,7 @@ class Mailer { * * @param string $subject the mail subject */ - public function subject($subject){ + public function subject($subject) { $this->headers['Subject'] = $subject; } @@ -322,65 +328,65 @@ class Mailer { * setAddress("föö <foo@bar.com>, me@somewhere.com","TBcc"); * * @param string $address Multiple adresses separated by commas - * @param string returns the prepared header (can contain multiple lines) + * @return bool|string the prepared header (can contain multiple lines) */ - public function cleanAddress($address){ + public function cleanAddress($address) { // No named recipients for To: in Windows (see FS#652) $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; - $address = preg_replace('/[\r\n\0]+/',' ',$address); // remove attack vectors + $address = preg_replace('/[\r\n\0]+/', ' ', $address); // remove attack vectors $headers = ''; - $parts = explode(',',$address); - foreach ($parts as $part){ + $parts = explode(',', $address); + foreach($parts as $part) { $part = trim($part); // parse address - if(preg_match('#(.*?)<(.*?)>#',$part,$matches)){ + if(preg_match('#(.*?)<(.*?)>#', $part, $matches)) { $text = trim($matches[1]); $addr = $matches[2]; - }else{ + } else { $addr = $part; } // skip empty ones - if(empty($addr)){ + if(empty($addr)) { continue; } // FIXME: is there a way to encode the localpart of a emailaddress? - if(!utf8_isASCII($addr)){ - msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"),-1); + if(!utf8_isASCII($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not ASCII"), -1); continue; } - if(is_null($this->validator)){ - $this->validator = new EmailAddressValidator(); + if(is_null($this->validator)) { + $this->validator = new EmailAddressValidator(); $this->validator->allowLocalAddresses = true; } - if(!$this->validator->check_email_address($addr)){ - msg(htmlspecialchars("E-Mail address <$addr> is not valid"),-1); + if(!$this->validator->check_email_address($addr)) { + msg(htmlspecialchars("E-Mail address <$addr> is not valid"), -1); continue; } // text was given - if(!empty($text) && $names){ + if(!empty($text) && $names) { // add address quotes $addr = "<$addr>"; - if(defined('MAILHEADER_ASCIIONLY')){ + if(defined('MAILHEADER_ASCIIONLY')) { $text = utf8_deaccent($text); $text = utf8_strip($text); } - if(!utf8_isASCII($text)){ + if(!utf8_isASCII($text)) { $text = '=?UTF-8?B?'.base64_encode($text).'?='; } - }else{ + } else { $text = ''; } // add to header comma seperated - if($headers != ''){ + if($headers != '') { $headers .= ', '; } $headers .= $text.' '.$addr; @@ -397,30 +403,30 @@ class Mailer { * * Replaces placeholders in the HTML with the correct CIDs */ - protected function prepareAttachments(){ + protected function prepareAttachments() { $mime = ''; $part = 1; // embedded attachments - foreach($this->attach as $media){ + foreach($this->attach as $media) { // create content id $cid = 'part'.$part.'.'.$this->partid; // replace wildcards - if($media['embed']){ - $this->html = str_replace('%%'.$media['embed'].'%%','cid:'.$cid,$this->html); + if($media['embed']) { + $this->html = str_replace('%%'.$media['embed'].'%%', 'cid:'.$cid, $this->html); } $mime .= '--'.$this->boundary.MAILHEADER_EOL; $mime .= 'Content-Type: '.$media['mime'].';'.MAILHEADER_EOL; $mime .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $mime .= "Content-ID: <$cid>".MAILHEADER_EOL; - if($media['embed']){ + if($media['embed']) { $mime .= 'Content-Disposition: inline; filename="'.$media['name'].'"'.MAILHEADER_EOL; - }else{ + } else { $mime .= 'Content-Disposition: attachment; filename="'.$media['name'].'"'.MAILHEADER_EOL; } $mime .= MAILHEADER_EOL; //end of headers - $mime .= chunk_split(base64_encode($media['data']),74,MAILHEADER_EOL); + $mime .= chunk_split(base64_encode($media['data']), 74, MAILHEADER_EOL); $part++; } @@ -434,16 +440,15 @@ class Mailer { * * @return string the prepared mail body, false on errors */ - protected function prepareBody(){ - global $conf; + protected function prepareBody() { // no HTML mails allowed? remove HTML body - if(!$this->allowhtml){ + if(!$this->allowhtml) { $this->html = ''; } // check for body - if(!$this->text && !$this->html){ + if(!$this->text && !$this->html) { return false; } @@ -452,28 +457,28 @@ class Mailer { $body = ''; - if(!$this->html && !count($this->attach)){ // we can send a simple single part message - $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; + if(!$this->html && !count($this->attach)) { // we can send a simple single part message + $this->headers['Content-Type'] = 'text/plain; charset=UTF-8'; $this->headers['Content-Transfer-Encoding'] = 'base64'; - $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); - }else{ // multi part it is + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); + } else { // multi part it is $body .= "This is a multi-part message in MIME format.".MAILHEADER_EOL; // prepare the attachments $attachments = $this->prepareAttachments(); // do we have alternative text content? - if($this->text && $this->html){ + if($this->text && $this->html) { $this->headers['Content-Type'] = 'multipart/alternative;'.MAILHEADER_EOL. - ' boundary="'.$this->boundary.'XX"'; + ' boundary="'.$this->boundary.'XX"'; $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: text/plain; charset=UTF-8'.MAILHEADER_EOL; $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body .= chunk_split(base64_encode($this->text),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->text), 74, MAILHEADER_EOL); $body .= '--'.$this->boundary.'XX'.MAILHEADER_EOL; $body .= 'Content-Type: multipart/related;'.MAILHEADER_EOL. - ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; + ' boundary="'.$this->boundary.'"'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; } @@ -481,13 +486,13 @@ class Mailer { $body .= 'Content-Type: text/html; charset=UTF-8'.MAILHEADER_EOL; $body .= 'Content-Transfer-Encoding: base64'.MAILHEADER_EOL; $body .= MAILHEADER_EOL; - $body .= chunk_split(base64_encode($this->html),74,MAILHEADER_EOL); + $body .= chunk_split(base64_encode($this->html), 74, MAILHEADER_EOL); $body .= MAILHEADER_EOL; $body .= $attachments; $body .= '--'.$this->boundary.'--'.MAILHEADER_EOL; // close open multipart/alternative boundary - if($this->text && $this->html){ + if($this->text && $this->html) { $body .= '--'.$this->boundary.'XX--'.MAILHEADER_EOL; } } @@ -498,47 +503,47 @@ class Mailer { /** * Cleanup and encode the headers array */ - protected function cleanHeaders(){ + protected function cleanHeaders() { global $conf; // clean up addresses if(empty($this->headers['From'])) $this->from($conf['mailfrom']); - $addrs = array('To','From','Cc','Bcc'); - foreach($addrs as $addr){ - if(isset($this->headers[$addr])){ + $addrs = array('To', 'From', 'Cc', 'Bcc'); + foreach($addrs as $addr) { + if(isset($this->headers[$addr])) { $this->headers[$addr] = $this->cleanAddress($this->headers[$addr]); } } - if(isset($this->headers['Subject'])){ + if(isset($this->headers['Subject'])) { // add prefix to subject - if(empty($conf['mailprefix'])){ + if(empty($conf['mailprefix'])) { if(utf8_strlen($conf['title']) < 20) { $prefix = '['.$conf['title'].']'; - }else{ + } else { $prefix = '['.utf8_substr($conf['title'], 0, 20).'...]'; } - }else{ + } else { $prefix = '['.$conf['mailprefix'].']'; } $len = strlen($prefix); - if(substr($this->headers['Subject'],0,$len) != $prefix){ + if(substr($this->headers['Subject'], 0, $len) != $prefix) { $this->headers['Subject'] = $prefix.' '.$this->headers['Subject']; } // encode subject - if(defined('MAILHEADER_ASCIIONLY')){ + if(defined('MAILHEADER_ASCIIONLY')) { $this->headers['Subject'] = utf8_deaccent($this->headers['Subject']); $this->headers['Subject'] = utf8_strip($this->headers['Subject']); } - if(!utf8_isASCII($this->headers['Subject'])){ + if(!utf8_isASCII($this->headers['Subject'])) { $this->headers['Subject'] = '=?UTF-8?B?'.base64_encode($this->headers['Subject']).'?='; } } // wrap headers - foreach($this->headers as $key => $val){ - $this->headers[$key] = wordwrap($val,78,MAILHEADER_EOL.' '); + foreach($this->headers as $key => $val) { + $this->headers[$key] = wordwrap($val, 78, MAILHEADER_EOL.' '); } } @@ -547,9 +552,9 @@ class Mailer { * * @returns string the headers */ - protected function prepareHeaders(){ + protected function prepareHeaders() { $headers = ''; - foreach($this->headers as $key => $val){ + foreach($this->headers as $key => $val) { $headers .= "$key: $val".MAILHEADER_EOL; } return $headers; @@ -563,10 +568,10 @@ class Mailer { * * @return string the mail, false on errors */ - public function dump(){ + public function dump() { $this->cleanHeaders(); - $body = $this->prepareBody(); - if($body === 'false') return false; + $body = $this->prepareBody(); + if($body === false) return false; $headers = $this->prepareHeaders(); return $headers.MAILHEADER_EOL.$body; @@ -580,13 +585,13 @@ class Mailer { * @triggers MAIL_MESSAGE_SEND * @return bool true if the mail was successfully passed to the MTA */ - public function send(){ + public function send() { $success = false; // prepare hook data $data = array( // pass the whole mail class to plugin - 'mail' => $this, + 'mail' => $this, // pass references for backward compatibility 'to' => &$this->headers['To'], 'cc' => &$this->headers['Cc'], @@ -594,7 +599,7 @@ class Mailer { 'from' => &$this->headers['From'], 'subject' => &$this->headers['Subject'], 'body' => &$this->text, - 'params' => &$this->sendparams, + 'params' => &$this->sendparam, 'headers' => '', // plugins shouldn't use this // signal if we mailed successfully to AFTER event 'success' => &$success, @@ -602,47 +607,48 @@ class Mailer { // do our thing if BEFORE hook approves $evt = new Doku_Event('MAIL_MESSAGE_SEND', $data); - if ($evt->advise_before(true)) { + if($evt->advise_before(true)) { // clean up before using the headers $this->cleanHeaders(); // any recipients? - if(trim($this->headers['To']) === '' && - trim($this->headers['Cc']) === '' && - trim($this->headers['Bcc']) === '') return false; + if(trim($this->headers['To']) === '' && + trim($this->headers['Cc']) === '' && + trim($this->headers['Bcc']) === '' + ) return false; // The To: header is special - if(isset($this->headers['To'])){ + if(isset($this->headers['To'])) { $to = $this->headers['To']; unset($this->headers['To']); - }else{ + } else { $to = ''; } // so is the subject - if(isset($this->headers['Subject'])){ + if(isset($this->headers['Subject'])) { $subject = $this->headers['Subject']; unset($this->headers['Subject']); - }else{ + } else { $subject = ''; } // make the body - $body = $this->prepareBody(); - if($body === 'false') return false; + $body = $this->prepareBody(); + if($body === false) return false; // cook the headers $headers = $this->prepareHeaders(); // add any headers set by legacy plugins - if(trim($data['headers'])){ + if(trim($data['headers'])) { $headers .= MAILHEADER_EOL.trim($data['headers']); } // send the thing - if(is_null($this->sendparam)){ - $success = @mail($to,$subject,$body,$headers); - }else{ - $success = @mail($to,$subject,$body,$headers,$this->sendparam); + if(is_null($this->sendparam)) { + $success = @mail($to, $subject, $body, $headers); + } else { + $success = @mail($to, $subject, $body, $headers, $this->sendparam); } } // any AFTER actions? diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index d825057f0876e450635341c6fbdd60bcafd7b90c..13be479cc31641e00b9e8dfde2406135f29c8d0d 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -16,65 +16,67 @@ 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 * @return bool */ - function verify_hash($clear,$hash){ - $method=''; - $salt=''; - $magic=''; + function verify_hash($clear, $hash) { + $method = ''; + $salt = ''; + $magic = ''; //determine the used method and salt $len = strlen($hash); - if(preg_match('/^\$1\$([^\$]{0,8})\$/',$hash,$m)){ + if(preg_match('/^\$1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'smd5'; $salt = $m[1]; $magic = '1'; - }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$hash,$m)){ + } elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/', $hash, $m)) { $method = 'apr1'; $salt = $m[1]; $magic = 'apr1'; - }elseif(preg_match('/^\$P\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$P\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'P'; - }elseif(preg_match('/^\$H\$(.{31})$/',$hash,$m)){ + } elseif(preg_match('/^\$H\$(.{31})$/', $hash, $m)) { $method = 'pmd5'; $salt = $m[1]; $magic = 'H'; - }elseif(preg_match('/^sha1\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^sha1\$(.{5})\$/', $hash, $m)) { $method = 'djangosha1'; $salt = $m[1]; - }elseif(preg_match('/^md5\$(.{5})\$/',$hash,$m)){ + } elseif(preg_match('/^md5\$(.{5})\$/', $hash, $m)) { $method = 'djangomd5'; $salt = $m[1]; - }elseif(preg_match('/^\$2a\$(.{2})\$/',$hash,$m)){ + } elseif(preg_match('/^\$2a\$(.{2})\$/', $hash, $m)) { $method = 'bcrypt'; $salt = $hash; - }elseif(substr($hash,0,6) == '{SSHA}'){ + } elseif(substr($hash, 0, 6) == '{SSHA}') { $method = 'ssha'; - $salt = substr(base64_decode(substr($hash, 6)),20); - }elseif(substr($hash,0,6) == '{SMD5}'){ + $salt = substr(base64_decode(substr($hash, 6)), 20); + } elseif(substr($hash, 0, 6) == '{SMD5}') { $method = 'lsmd5'; - $salt = substr(base64_decode(substr($hash, 6)),16); - }elseif($len == 32){ + $salt = substr(base64_decode(substr($hash, 6)), 16); + } elseif($len == 32) { $method = 'md5'; - }elseif($len == 40){ + } elseif($len == 40) { $method = 'sha1'; - }elseif($len == 16){ + } elseif($len == 16) { $method = 'mysql'; - }elseif($len == 41 && $hash[0] == '*'){ + } elseif($len == 41 && $hash[0] == '*') { $method = 'my411'; - }elseif($len == 34){ + } elseif($len == 34) { $method = 'kmd5'; $salt = $hash; - }else{ + } else { $method = 'crypt'; - $salt = substr($hash,0,2); + $salt = substr($hash, 0, 2); } //crypt and compare $call = 'hash_'.$method; - if($this->$call($clear,$salt,$magic) === $hash){ + if($this->$call($clear, $salt, $magic) === $hash) { return true; } return false; @@ -83,13 +85,14 @@ class PassHash { /** * Create a random salt * - * @param int $len - The length of the salt + * @param int $len The length of the salt + * @return string */ - public function gen_salt($len=32){ + public function gen_salt($len = 32) { $salt = ''; $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - for($i=0; $i<$len; $i++){ - $salt .= $chars[mt_rand(0,61)]; + for($i = 0; $i < $len; $i++) { + $salt .= $chars[mt_rand(0, 61)]; } return $salt; } @@ -100,12 +103,12 @@ class PassHash { * If $salt is not null, the value is kept, but the lenght restriction is * applied. * - * @param stringref $salt - The salt, pass null if you want one generated - * @param int $len - The length of the salt + * @param string &$salt The salt, pass null if you want one generated + * @param int $len The length of the salt */ - public function init_salt(&$salt,$len=32){ + public function init_salt(&$salt, $len = 32) { if(is_null($salt)) $salt = $this->gen_salt($len); - if(strlen($salt) > $len) $salt = substr($salt,0,$len); + if(strlen($salt) > $len) $salt = substr($salt, 0, $len); } // Password hashing methods follow below @@ -122,36 +125,37 @@ 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 - * @param string $magic - the hash identifier (apr1 or 1) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_smd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_smd5($clear, $salt = null) { + $this->init_salt($salt, 8); - if(defined('CRYPT_MD5') && CRYPT_MD5){ - return crypt($clear,'$1$'.$salt.'$'); - }else{ + if(defined('CRYPT_MD5') && CRYPT_MD5 && $salt !== '') { + return crypt($clear, '$1$'.$salt.'$'); + } else { // Fall back to PHP-only implementation return $this->hash_apr1($clear, $salt, '1'); } } - /** * Password hashing method 'lsmd5' * * Uses salted MD5 hashs. Salt is 8 bytes long. * * This is the format used by LDAP. + * + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_lsmd5($clear, $salt=null){ - $this->init_salt($salt,8); + public function hash_lsmd5($clear, $salt = null) { + $this->init_salt($salt, 8); return "{SMD5}".base64_encode(md5($clear.$salt, true).$salt); } - /** * Password hashing method 'apr1' * @@ -161,17 +165,17 @@ 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) - * @returns string - hashed password + * @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) + * @return string Hashed password */ - public function hash_apr1($clear, $salt=null, $magic='apr1'){ - $this->init_salt($salt,8); + public function hash_apr1($clear, $salt = null, $magic = 'apr1') { + $this->init_salt($salt, 8); - $len = strlen($clear); + $len = strlen($clear); $text = $clear.'$'.$magic.'$'.$salt; - $bin = pack("H32", md5($clear.$salt.$clear)); + $bin = pack("H32", md5($clear.$salt.$clear)); for($i = $len; $i > 0; $i -= 16) { $text .= substr($bin, 0, min(16, $i)); } @@ -181,22 +185,24 @@ class PassHash { $bin = pack("H32", md5($text)); for($i = 0; $i < 1000; $i++) { $new = ($i & 1) ? $clear : $bin; - if ($i % 3) $new .= $salt; - if ($i % 7) $new .= $clear; + if($i % 3) $new .= $salt; + if($i % 7) $new .= $clear; $new .= ($i & 1) ? $bin : $clear; $bin = pack("H32", md5($new)); } $tmp = ''; - for ($i = 0; $i < 5; $i++) { + for($i = 0; $i < 5; $i++) { $k = $i + 6; $j = $i + 12; - if ($j == 16) $j = 5; + if($j == 16) $j = 5; $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp; } $tmp = chr(0).chr(0).$bin[11].$tmp; - $tmp = strtr(strrev(substr(base64_encode($tmp), 2)), - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + $tmp = strtr( + strrev(substr(base64_encode($tmp), 2)), + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + ); return '$'.$magic.'$'.$salt.'$'.$tmp; } @@ -205,10 +211,10 @@ class PassHash { * * Uses MD5 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_md5($clear){ + public function hash_md5($clear) { return md5($clear); } @@ -217,10 +223,10 @@ class PassHash { * * Uses SHA1 hashs. * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_sha1($clear){ + public function hash_sha1($clear) { return sha1($clear); } @@ -229,12 +235,12 @@ class PassHash { * * Uses salted SHA1 hashs. Salt is 4 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_ssha($clear, $salt=null){ - $this->init_salt($salt,4); + public function hash_ssha($clear, $salt = null) { + $this->init_salt($salt, 4); return '{SSHA}'.base64_encode(pack("H*", sha1($clear.$salt)).$salt); } @@ -243,13 +249,13 @@ class PassHash { * * Uses salted crypt hashs. Salt is 2 bytes long. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_crypt($clear, $salt=null){ - $this->init_salt($salt,2); - return crypt($clear,$salt); + public function hash_crypt($clear, $salt = null) { + $this->init_salt($salt, 2); + return crypt($clear, $salt); } /** @@ -259,16 +265,16 @@ class PassHash { * * @link http://www.php.net/mysql * @author <soren at byu dot edu> - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_mysql($clear){ - $nr=0x50305735; - $nr2=0x12345671; - $add=7; + public function hash_mysql($clear) { + $nr = 0x50305735; + $nr2 = 0x12345671; + $add = 7; $charArr = preg_split("//", $clear); - foreach ($charArr as $char) { - if (($char == '') || ($char == ' ') || ($char == '\t')) continue; + foreach($charArr as $char) { + if(($char == '') || ($char == ' ') || ($char == '\t')) continue; $charVal = ord($char); $nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8); $nr2 += ($nr2 << 8) ^ $nr; @@ -282,10 +288,10 @@ class PassHash { * * Uses SHA1 hashs. This method is used by MySQL 4.11 and above * - * @param string $clear - the clear text to hash - * @returns string - hashed password + * @param string $clear The clear text to hash + * @return string Hashed password */ - public function hash_my411($clear){ + public function hash_my411($clear) { return '*'.sha1(pack("H*", sha1($clear))); } @@ -297,16 +303,16 @@ class PassHash { * Salt is 2 bytes long, but stored at position 16, so you need to pass at * least 18 bytes. You can pass the crypted hash as salt. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_kmd5($clear, $salt=null){ + public function hash_kmd5($clear, $salt = null) { $this->init_salt($salt); - $key = substr($salt, 16, 2); - $hash1 = strtolower(md5($key . md5($clear))); - $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); + $key = substr($salt, 16, 2); + $hash1 = strtolower(md5($key.md5($clear))); + $hash2 = substr($hash1, 0, 16).$key.substr($hash1, 16); return $hash2; } @@ -321,54 +327,55 @@ 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) - * @param int $compute - the iteration count for new passwords - * @returns string - hashed password + * @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) + * @param int $compute The iteration count for new passwords + * @throws Exception + * @return string Hashed password */ - public function hash_pmd5($clear, $salt=null, $magic='P',$compute=8){ + public function hash_pmd5($clear, $salt = null, $magic = 'P', $compute = 8) { $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - if(is_null($salt)){ + if(is_null($salt)) { $this->init_salt($salt); $salt = $itoa64[$compute].$salt; // prefix iteration count } $iterc = $salt[0]; // pos 0 of salt is iteration count - $iter = strpos($itoa64,$iterc); + $iter = strpos($itoa64, $iterc); - if($iter > 30){ + if($iter > 30) { throw new Exception("Too high iteration count ($iter) in ". - __class__.'::'.__function__); + __CLASS__.'::'.__FUNCTION__); } $iter = 1 << $iter; - $salt = substr($salt,1,8); + $salt = substr($salt, 1, 8); // iterate - $hash = md5($salt . $clear, true); + $hash = md5($salt.$clear, true); do { - $hash = md5($hash . $clear, true); - } while (--$iter); + $hash = md5($hash.$clear, true); + } while(--$iter); // encode $output = ''; - $count = 16; - $i = 0; + $count = 16; + $i = 0; do { $value = ord($hash[$i++]); $output .= $itoa64[$value & 0x3f]; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 8; $output .= $itoa64[($value >> 6) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; - if ($i < $count) + if($i < $count) $value |= ord($hash[$i]) << 16; $output .= $itoa64[($value >> 12) & 0x3f]; - if ($i++ >= $count) + if($i++ >= $count) break; $output .= $itoa64[($value >> 18) & 0x3f]; - } while ($i < $count); + } while($i < $count); return '$'.$magic.'$'.$iterc.$salt.$output; } @@ -376,7 +383,7 @@ class PassHash { /** * Alias for hash_pmd5 */ - public function hash_hmd5($clear, $salt=null, $magic='H', $compute=8){ + public function hash_hmd5($clear, $salt = null, $magic = 'H', $compute = 8) { return $this->hash_pmd5($clear, $salt, $magic, $compute); } @@ -387,12 +394,12 @@ 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 - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangosha1($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangosha1($clear, $salt = null) { + $this->init_salt($salt, 5); return 'sha1$'.$salt.'$'.sha1($salt.$clear); } @@ -403,16 +410,15 @@ 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 - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @return string Hashed password */ - public function hash_djangomd5($clear, $salt=null){ - $this->init_salt($salt,5); + public function hash_djangomd5($clear, $salt = null) { + $this->init_salt($salt, 5); return 'md5$'.$salt.'$'.md5($salt.$clear); } - /** * Passwordhashing method 'bcrypt' * @@ -424,20 +430,21 @@ class PassHash { * will break. When no salt is given, the iteration count can be set * through the $compute variable. * - * @param string $clear - the clear text to hash - * @param string $salt - the salt to use, null for random - * @param int $compute - the iteration count (between 4 and 31) - * @returns string - hashed password + * @param string $clear The clear text to hash + * @param string $salt The salt to use, null for random + * @param int $compute The iteration count (between 4 and 31) + * @throws Exception + * @return string Hashed password */ - public function hash_bcrypt($clear, $salt=null, $compute=8){ - if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1){ + public function hash_bcrypt($clear, $salt = null, $compute = 8) { + if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1) { throw new Exception('This PHP installation has no bcrypt support'); } - if(is_null($salt)){ + if(is_null($salt)) { if($compute < 4 || $compute > 31) $compute = 8; $salt = '$2a$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. - $this->gen_salt(22); + $this->gen_salt(22); } return crypt($clear, $salt); diff --git a/inc/actions.php b/inc/actions.php index 4376af5f986002816996710a5bcbf2710bc98a52..d4bd5b20eabb3ad7aa96d8e691a9dee8d3312e07 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -20,6 +20,7 @@ function act_dispatch(){ global $ID; global $INFO; global $QUERY; + global $INPUT; global $lang; global $conf; @@ -131,14 +132,14 @@ function act_dispatch(){ //handle admin tasks if($ACT == 'admin'){ // retrieve admin plugin name from $_REQUEST['page'] - if (!empty($_REQUEST['page'])) { + if (($page = $INPUT->str('page', '', true)) != '') { $pluginlist = plugin_list('admin'); - if (in_array($_REQUEST['page'], $pluginlist)) { + if (in_array($page, $pluginlist)) { // attempt to load the plugin - if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null){ + if ($plugin =& plugin_load('admin',$page) !== null){ if($plugin->forAdminOnly() && !$INFO['isadmin']){ // a manager tried to load a plugin that's for admins only - unset($_REQUEST['page']); + $INPUT->remove('page'); msg('For admins only',-1); }else{ $plugin->handle(); @@ -309,13 +310,14 @@ function act_draftdel($act){ function act_draftsave($act){ global $INFO; global $ID; + global $INPUT; global $conf; - if($conf['usedraft'] && $_POST['wikitext']){ + if($conf['usedraft'] && $INPUT->post->has('wikitext')) { $draft = array('id' => $ID, - 'prefix' => substr($_POST['prefix'], 0, -1), - 'text' => $_POST['wikitext'], - 'suffix' => $_POST['suffix'], - 'date' => (int) $_POST['date'], + 'prefix' => substr($INPUT->post->str('prefix'), 0, -1), + 'text' => $INPUT->post->str('wikitext'), + 'suffix' => $INPUT->post->str('suffix'), + 'date' => $INPUT->post->int('date'), 'client' => $INFO['client'], ); $cname = getCacheName($draft['client'].$ID,'.draft'); @@ -344,6 +346,7 @@ function act_save($act){ global $SUM; global $lang; global $INFO; + global $INPUT; //spam check if(checkwordblock()) { @@ -355,7 +358,7 @@ function act_save($act){ return 'conflict'; //save it - saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$_REQUEST['minor']); //use pretty mode for con + saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM,$INPUT->bool('minor')); //use pretty mode for con //unlock it unlock($ID); @@ -678,6 +681,7 @@ function act_subscription($act){ global $lang; global $INFO; global $ID; + global $INPUT; // subcriptions work for logged in users only if(!$_SERVER['REMOTE_USER']) return 'show'; @@ -685,8 +689,8 @@ function act_subscription($act){ // get and preprocess data. $params = array(); foreach(array('target', 'style', 'action') as $param) { - if (isset($_REQUEST["sub_$param"])) { - $params[$param] = $_REQUEST["sub_$param"]; + if ($INPUT->has("sub_$param")) { + $params[$param] = $INPUT->str("sub_$param"); } } diff --git a/inc/auth.php b/inc/auth.php index ed0e2dcf7da351d397c7e8d239fb2064db22b685..cedfdee366e4aa3fbbfca116ce06060b68d7d267 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -12,13 +12,13 @@ if(!defined('DOKU_INC')) die('meh.'); // some ACL level defines -define('AUTH_NONE',0); -define('AUTH_READ',1); -define('AUTH_EDIT',2); -define('AUTH_CREATE',4); -define('AUTH_UPLOAD',8); -define('AUTH_DELETE',16); -define('AUTH_ADMIN',255); +define('AUTH_NONE', 0); +define('AUTH_READ', 1); +define('AUTH_EDIT', 2); +define('AUTH_CREATE', 4); +define('AUTH_UPLOAD', 8); +define('AUTH_DELETE', 16); +define('AUTH_ADMIN', 255); /** * Initialize the auth system. @@ -29,26 +29,30 @@ define('AUTH_ADMIN',255); * * @todo backend loading maybe should be handled by the class autoloader * @todo maybe split into multiple functions at the XXX marked positions + * @triggers AUTH_LOGIN_CHECK + * @return bool */ -function auth_setup(){ +function auth_setup() { global $conf; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; global $AUTH_ACL; global $lang; - global $config_cascade; $AUTH_ACL = array(); if(!$conf['useacl']) return false; // load the the backend auth functions and instantiate the auth object XXX - if (@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { + if(@file_exists(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php')) { require_once(DOKU_INC.'inc/auth/basic.class.php'); require_once(DOKU_INC.'inc/auth/'.$conf['authtype'].'.class.php'); $auth_class = "auth_".$conf['authtype']; - if (class_exists($auth_class)) { + if(class_exists($auth_class)) { $auth = new $auth_class(); - if ($auth->success == false) { + if($auth->success == false) { // degrade to unauthenticated user unset($auth); auth_logoff(); @@ -61,14 +65,11 @@ function auth_setup(){ nice_die($lang['authmodfailed']); } - if(!$auth) return; + if(!$auth) return false; // do the login either by cookie or provided credentials XXX - if (!isset($_REQUEST['u'])) $_REQUEST['u'] = ''; - if (!isset($_REQUEST['p'])) $_REQUEST['p'] = ''; - if (!isset($_REQUEST['r'])) $_REQUEST['r'] = ''; - $_REQUEST['http_credentials'] = false; - if (!$conf['rememberme']) $_REQUEST['r'] = false; + $INPUT->set('http_credentials', false); + if(!$conf['rememberme']) $INPUT->set('r', false); // handle renamed HTTP_AUTHORIZATION variable (can happen when a fix like // the one presented at @@ -77,73 +78,93 @@ function auth_setup(){ if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; // streamline HTTP auth credentials (IIS/rewrite -> mod_php) - if(isset($_SERVER['HTTP_AUTHORIZATION'])){ - list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']) = + if(isset($_SERVER['HTTP_AUTHORIZATION'])) { + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } // if no credentials were given try to use HTTP auth (for SSO) - if(empty($_REQUEST['u']) && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])){ - $_REQUEST['u'] = $_SERVER['PHP_AUTH_USER']; - $_REQUEST['p'] = $_SERVER['PHP_AUTH_PW']; - $_REQUEST['http_credentials'] = true; + if(!$INPUT->str('u') && empty($_COOKIE[DOKU_COOKIE]) && !empty($_SERVER['PHP_AUTH_USER'])) { + $INPUT->set('u', $_SERVER['PHP_AUTH_USER']); + $INPUT->set('p', $_SERVER['PHP_AUTH_PW']); + $INPUT->set('http_credentials', true); } // apply cleaning - $_REQUEST['u'] = $auth->cleanUser($_REQUEST['u']); + $INPUT->set('u', $auth->cleanUser($INPUT->str('u'))); - if(isset($_REQUEST['authtok'])){ + if($INPUT->str('authtok')) { // when an authentication token is given, trust the session - auth_validateToken($_REQUEST['authtok']); - }elseif(!is_null($auth) && $auth->canDo('external')){ + auth_validateToken($INPUT->str('authtok')); + } elseif(!is_null($auth) && $auth->canDo('external')) { // external trust mechanism in place - $auth->trustExternal($_REQUEST['u'],$_REQUEST['p'],$_REQUEST['r']); - }else{ + $auth->trustExternal($INPUT->str('u'), $INPUT->str('p'), $INPUT->bool('r')); + } else { $evdata = array( - 'user' => $_REQUEST['u'], - 'password' => $_REQUEST['p'], - 'sticky' => $_REQUEST['r'], - 'silent' => $_REQUEST['http_credentials'], - ); + 'user' => $INPUT->str('u'), + 'password' => $INPUT->str('p'), + 'sticky' => $INPUT->bool('r'), + 'silent' => $INPUT->bool('http_credentials') + ); trigger_event('AUTH_LOGIN_CHECK', $evdata, 'auth_login_wrapper'); } //load ACL into a global array XXX $AUTH_ACL = auth_loadACL(); + + return true; } /** * Loads the ACL setup and handle user wildcards * * @author Andreas Gohr <andi@splitbrain.org> - * @returns array + * @return array */ -function auth_loadACL(){ +function auth_loadACL() { global $config_cascade; + global $USERINFO; if(!is_readable($config_cascade['acl']['default'])) return array(); $acl = file($config_cascade['acl']['default']); //support user wildcard - if(isset($_SERVER['REMOTE_USER'])){ - $len = count($acl); - for($i=0; $i<$len; $i++){ - if($acl[$i]{0} == '#') continue; - list($id,$rest) = preg_split('/\s+/',$acl[$i],2); + $out = array(); + foreach($acl as $line) { + $line = trim($line); + if($line{0} == '#') continue; + list($id,$rest) = preg_split('/\s+/',$line,2); + + if(strstr($line, '%GROUP%')){ + foreach((array) $USERINFO['grps'] as $grp){ + $nid = str_replace('%GROUP%',cleanID($grp),$id); + $nrest = str_replace('%GROUP%','@'.auth_nameencode($grp),$rest); + $out[] = "$nid\t$nrest"; + } + } else { $id = str_replace('%USER%',cleanID($_SERVER['REMOTE_USER']),$id); $rest = str_replace('%USER%',auth_nameencode($_SERVER['REMOTE_USER']),$rest); - $acl[$i] = "$id\t$rest"; + $out[] = "$id\t$rest"; } } - return $acl; + + return $out; } +/** + * Event hook callback for AUTH_LOGIN_CHECK + * + * @param $evdata + * @return bool + */ function auth_login_wrapper($evdata) { - return auth_login($evdata['user'], - $evdata['password'], - $evdata['sticky'], - $evdata['silent']); + return auth_login( + $evdata['user'], + $evdata['password'], + $evdata['sticky'], + $evdata['silent'] + ); } /** @@ -175,53 +196,56 @@ function auth_login_wrapper($evdata) { * @param bool $silent Don't show error on bad auth * @return bool true on successful auth */ -function auth_login($user,$pass,$sticky=false,$silent=false){ +function auth_login($user, $pass, $sticky = false, $silent = false) { global $USERINFO; global $conf; global $lang; + /* @var auth_basic $auth */ global $auth; + $sticky ? $sticky = true : $sticky = false; //sanity check - if (!$auth) return false; + if(!$auth) return false; - if(!empty($user)){ + if(!empty($user)) { //usual login - if ($auth->checkPass($user,$pass)){ + if($auth->checkPass($user, $pass)) { // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session + auth_setCookie($user, PMA_blowfish_encrypt($pass, $secret), $sticky); return true; - }else{ + } else { //invalid credentials - log off - if(!$silent) msg($lang['badlogin'],-1); + if(!$silent) msg($lang['badlogin'], -1); auth_logoff(); return false; } - }else{ + } else { // read cookie information - list($user,$sticky,$pass) = auth_getCookie(); - if($user && $pass){ + list($user, $sticky, $pass) = auth_getCookie(); + if($user && $pass) { // we got a cookie - see if we can trust it // get session info $session = $_SESSION[DOKU_COOKIE]['auth']; if(isset($session) && - $auth->useSessionCache($user) && - ($session['time'] >= time()-$conf['auth_security_timeout']) && - ($session['user'] == $user) && - ($session['pass'] == sha1($pass)) && //still crypted - ($session['buid'] == auth_browseruid()) ){ + $auth->useSessionCache($user) && + ($session['time'] >= time() - $conf['auth_security_timeout']) && + ($session['user'] == $user) && + ($session['pass'] == sha1($pass)) && //still crypted + ($session['buid'] == auth_browseruid()) + ) { // he has session, cookie and browser right - let him in $_SERVER['REMOTE_USER'] = $user; - $USERINFO = $session['info']; //FIXME move all references to session + $USERINFO = $session['info']; //FIXME move all references to session return true; } // no we don't trust it yet - recheck pass but silent $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session - $pass = PMA_blowfish_decrypt($pass,$secret); - return auth_login($user,$pass,$sticky,true); + $pass = PMA_blowfish_decrypt($pass, $secret); + return auth_login($user, $pass, $sticky, true); } } //just to be sure @@ -239,8 +263,8 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ * @param string $token The authentication token * @return boolean true (or will exit on failure) */ -function auth_validateToken($token){ - if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']){ +function auth_validateToken($token) { + if(!$token || $token != $_SESSION[DOKU_COOKIE]['auth']['token']) { // bad token header("HTTP/1.0 401 Unauthorized"); print 'Invalid auth token - maybe the session timed out'; @@ -250,7 +274,7 @@ function auth_validateToken($token){ // still here? trust the session data global $USERINFO; $_SERVER['REMOTE_USER'] = $_SESSION[DOKU_COOKIE]['auth']['user']; - $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; + $USERINFO = $_SESSION[DOKU_COOKIE]['auth']['info']; return true; } @@ -262,7 +286,7 @@ function auth_validateToken($token){ * @author Andreas Gohr <andi@splitbrain.org> * @return string The auth token */ -function auth_createToken(){ +function auth_createToken() { $token = md5(mt_rand()); @session_start(); // reopen the session if needed $_SESSION[DOKU_COOKIE]['auth']['token'] = $token; @@ -281,14 +305,14 @@ function auth_createToken(){ * * @return string a MD5 sum of various browser headers */ -function auth_browseruid(){ - $ip = clientIP(true); - $uid = ''; +function auth_browseruid() { + $ip = clientIP(true); + $uid = ''; $uid .= $_SERVER['HTTP_USER_AGENT']; $uid .= $_SERVER['HTTP_ACCEPT_ENCODING']; $uid .= $_SERVER['HTTP_ACCEPT_LANGUAGE']; $uid .= $_SERVER['HTTP_ACCEPT_CHARSET']; - $uid .= substr($ip,0,strpos($ip,'.')); + $uid .= substr($ip, 0, strpos($ip, '.')); return md5($uid); } @@ -304,15 +328,15 @@ function auth_browseruid(){ * @param bool $addsession if true, the sessionid is added to the salt * @return string */ -function auth_cookiesalt($addsession=false){ +function auth_cookiesalt($addsession = false) { global $conf; $file = $conf['metadir'].'/_htcookiesalt'; $salt = io_readFile($file); - if(empty($salt)){ - $salt = uniqid(rand(),true); - io_saveFile($file,$salt); + if(empty($salt)) { + $salt = uniqid(rand(), true); + io_saveFile($file, $salt); } - if($addsession){ + if($addsession) { $salt .= session_id(); } return $salt; @@ -327,10 +351,10 @@ function auth_cookiesalt($addsession=false){ * @author Andreas Gohr <andi@splitbrain.org> * @param bool $keepbc - when true, the breadcrumb data is not cleared */ -function auth_logoff($keepbc=false){ +function auth_logoff($keepbc = false) { global $conf; global $USERINFO; - global $INFO, $ID; + /* @var auth_basic $auth */ global $auth; // make sure the session is writable (it usually is) @@ -346,13 +370,13 @@ function auth_logoff($keepbc=false){ unset($_SESSION[DOKU_COOKIE]['bc']); if(isset($_SERVER['REMOTE_USER'])) unset($_SERVER['REMOTE_USER']); - $USERINFO=null; //FIXME + $USERINFO = null; //FIXME $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,'',time()-600000,$cookieDir,'',($conf['securecookie'] && is_ssl())); + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, '', time() - 600000, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } if($auth) $auth->logOff(); @@ -368,32 +392,34 @@ 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 + * @param string $user Username + * @param array $groups List of groups the user is in + * @param bool $adminonly when true checks if user is admin + * @return bool */ -function auth_ismanager($user=null,$groups=null,$adminonly=false){ +function auth_ismanager($user = null, $groups = null, $adminonly = false) { global $conf; global $USERINFO; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; if(is_null($user)) { - if (!isset($_SERVER['REMOTE_USER'])) { + if(!isset($_SERVER['REMOTE_USER'])) { return false; } else { $user = $_SERVER['REMOTE_USER']; } } - if(is_null($groups)){ + if(is_null($groups)) { $groups = (array) $USERINFO['grps']; } // check superuser match - if(auth_isMember($conf['superuser'],$user, $groups)) return true; + if(auth_isMember($conf['superuser'], $user, $groups)) return true; if($adminonly) return false; // check managers - if(auth_isMember($conf['manager'],$user, $groups)) return true; + if(auth_isMember($conf['manager'], $user, $groups)) return true; return false; } @@ -406,13 +432,15 @@ function auth_ismanager($user=null,$groups=null,$adminonly=false){ * The info is available through $INFO['isadmin'], too * * @author Andreas Gohr <andi@splitbrain.org> - * @see auth_ismanager + * @see auth_ismanager() + * @param string $user Username + * @param array $groups List of groups the user is in + * @return bool */ -function auth_isadmin($user=null,$groups=null){ - return auth_ismanager($user,$groups,true); +function auth_isadmin($user = null, $groups = null) { + return auth_ismanager($user, $groups, true); } - /** * Match a user and his groups against a comma separated list of * users and groups to determine membership status @@ -424,31 +452,32 @@ function auth_isadmin($user=null,$groups=null){ * @param $groups array groups the user is member of * @return bool true for membership acknowledged */ -function auth_isMember($memberlist,$user,array $groups){ +function auth_isMember($memberlist, $user, array $groups) { + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; // clean user and groups - if(!$auth->isCaseSensitive()){ - $user = utf8_strtolower($user); - $groups = array_map('utf8_strtolower',$groups); + if(!$auth->isCaseSensitive()) { + $user = utf8_strtolower($user); + $groups = array_map('utf8_strtolower', $groups); } - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),$groups); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), $groups); // extract the memberlist - $members = explode(',',$memberlist); - $members = array_map('trim',$members); + $members = explode(',', $memberlist); + $members = array_map('trim', $members); $members = array_unique($members); $members = array_filter($members); // compare cleaned values - foreach($members as $member){ + foreach($members as $member) { if(!$auth->isCaseSensitive()) $member = utf8_strtolower($member); - if($member[0] == '@'){ - $member = $auth->cleanGroup(substr($member,1)); + if($member[0] == '@') { + $member = $auth->cleanGroup(substr($member, 1)); if(in_array($member, $groups)) return true; - }else{ + } else { $member = $auth->cleanUser($member); if($member == $user) return true; } @@ -468,12 +497,12 @@ function auth_isMember($memberlist,$user,array $groups){ * @param string $id page ID (needs to be resolved and cleaned) * @return int permission level */ -function auth_quickaclcheck($id){ +function auth_quickaclcheck($id) { global $conf; global $USERINFO; # if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - return auth_aclcheck($id,$_SERVER['REMOTE_USER'],$USERINFO['grps']); + return auth_aclcheck($id, $_SERVER['REMOTE_USER'], $USERINFO['grps']); } /** @@ -482,111 +511,115 @@ function auth_quickaclcheck($id){ * * @author Andreas Gohr <andi@splitbrain.org> * - * @param string $id page ID (needs to be resolved and cleaned) - * @param string $user Username - * @param array $groups Array of groups the user is in + * @param string $id page ID (needs to be resolved and cleaned) + * @param string $user Username + * @param array|null $groups Array of groups the user is in * @return int permission level */ -function auth_aclcheck($id,$user,$groups){ +function auth_aclcheck($id, $user, $groups) { global $conf; global $AUTH_ACL; + /* @var auth_basic $auth */ global $auth; // if no ACL is used always return upload rights if(!$conf['useacl']) return AUTH_UPLOAD; - if (!$auth) return AUTH_NONE; + if(!$auth) return AUTH_NONE; //make sure groups is an array if(!is_array($groups)) $groups = array(); //if user is superuser or in superusergroup return 255 (acl_admin) - if(auth_isadmin($user,$groups)) { return AUTH_ADMIN; } + if(auth_isadmin($user, $groups)) { + return AUTH_ADMIN; + } $ci = ''; if(!$auth->isCaseSensitive()) $ci = 'ui'; - $user = $auth->cleanUser($user); - $groups = array_map(array($auth,'cleanGroup'),(array)$groups); - $user = auth_nameencode($user); + $user = $auth->cleanUser($user); + $groups = array_map(array($auth, 'cleanGroup'), (array) $groups); + $user = auth_nameencode($user); //prepend groups with @ and nameencode $cnt = count($groups); - for($i=0; $i<$cnt; $i++){ + for($i = 0; $i < $cnt; $i++) { $groups[$i] = '@'.auth_nameencode($groups[$i]); } - $ns = getNS($id); - $perm = -1; + $ns = getNS($id); + $perm = -1; - if($user || count($groups)){ + if($user || count($groups)) { //add ALL group $groups[] = '@ALL'; //add User if($user) $groups[] = $user; - }else{ + } else { $groups[] = '@ALL'; } //check exact match first - $matches = preg_grep('/^'.preg_quote($id,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + $matches = preg_grep('/^'.preg_quote($id, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } - if($perm > -1){ + if($perm > -1) { //we had a match - return it return $perm; } } //still here? do the namespace checks - if($ns){ + if($ns) { $path = $ns.':*'; - }else{ + } else { $path = '*'; //root document } - do{ - $matches = preg_grep('/^'.preg_quote($path,'/').'\s+(\S+)\s+/'.$ci,$AUTH_ACL); - if(count($matches)){ - foreach($matches as $match){ - $match = preg_replace('/#.*$/','',$match); //ignore comments - $acl = preg_split('/\s+/',$match); - if (!in_array($acl[1], $groups)) { + do { + $matches = preg_grep('/^'.preg_quote($path, '/').'\s+(\S+)\s+/'.$ci, $AUTH_ACL); + if(count($matches)) { + foreach($matches as $match) { + $match = preg_replace('/#.*$/', '', $match); //ignore comments + $acl = preg_split('/\s+/', $match); + if(!in_array($acl[1], $groups)) { continue; } if($acl[2] > AUTH_DELETE) $acl[2] = AUTH_DELETE; //no admins in the ACL! - if($acl[2] > $perm){ + if($acl[2] > $perm) { $perm = $acl[2]; } } //we had a match - return it - if ($perm != -1) { + if($perm != -1) { return $perm; } } //get next higher namespace - $ns = getNS($ns); + $ns = getNS($ns); - if($path != '*'){ + if($path != '*') { $path = $ns.':*'; if($path == ':*') $path = '*'; - }else{ + } else { //we did this already //looks like there is something wrong with the ACL //break here msg('No ACL setup yet! Denying access to everyone.'); return AUTH_NONE; } - }while(1); //this should never loop endless + } while(1); //this should never loop endless + return AUTH_NONE; } /** @@ -602,21 +635,26 @@ function auth_aclcheck($id,$user,$groups){ * @author Andreas Gohr <gohr@cosmocode.de> * @see rawurldecode() */ -function auth_nameencode($name,$skip_group=false){ +function auth_nameencode($name, $skip_group = false) { global $cache_authname; $cache =& $cache_authname; $name = (string) $name; // never encode wildcard FS#1955 if($name == '%USER%') return $name; + if($name == '%GROUP%') return $name; - if (!isset($cache[$name][$skip_group])) { - if($skip_group && $name{0} =='@'){ - $cache[$name][$skip_group] = '@'.preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",substr($name,1)); - }else{ - $cache[$name][$skip_group] = preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', - "'%'.dechex(ord(substr('\\1',-1)))",$name); + if(!isset($cache[$name][$skip_group])) { + if($skip_group && $name{0} == '@') { + $cache[$name][$skip_group] = '@'.preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", substr($name, 1) + ); + } else { + $cache[$name][$skip_group] = preg_replace( + '/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f])/e', + "'%'.dechex(ord(substr('\\1',-1)))", $name + ); } } @@ -631,20 +669,20 @@ function auth_nameencode($name,$skip_group=false){ * * @return string pronouncable password */ -function auth_pwgen(){ +function auth_pwgen() { $pw = ''; $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones - $v = 'aeiou'; //vowels - $a = $c.$v; //both + $v = 'aeiou'; //vowels + $a = $c.$v; //both //use two syllables... - for($i=0;$i < 2; $i++){ - $pw .= $c[rand(0, strlen($c)-1)]; - $pw .= $v[rand(0, strlen($v)-1)]; - $pw .= $a[rand(0, strlen($a)-1)]; + for($i = 0; $i < 2; $i++) { + $pw .= $c[rand(0, strlen($c) - 1)]; + $pw .= $v[rand(0, strlen($v) - 1)]; + $pw .= $a[rand(0, strlen($a) - 1)]; } //... and add a nice number - $pw .= rand(10,99); + $pw .= rand(10, 99); return $pw; } @@ -653,16 +691,16 @@ function auth_pwgen(){ * 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 */ -function auth_sendPassword($user,$password){ - global $conf; +function auth_sendPassword($user, $password) { global $lang; + /* @var auth_basic $auth */ global $auth; - if (!$auth) return false; + if(!$auth) return false; - $hdrs = ''; $user = $auth->cleanUser($user); $userinfo = $auth->getUserData($user); @@ -670,15 +708,15 @@ function auth_sendPassword($user,$password){ $text = rawLocale('password'); $trep = array( - 'FULLNAME' => $userinfo['name'], - 'LOGIN' => $user, - 'PASSWORD' => $password - ); + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'PASSWORD' => $password + ); $mail = new Mailer(); $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); $mail->subject($lang['regpwmail']); - $mail->setBody($text,$trep); + $mail->setBody($text, $trep); return $mail->send(); } @@ -688,12 +726,12 @@ 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(){ +function register() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; if(!$_POST['save']) return false; @@ -703,61 +741,63 @@ function register(){ $_POST['login'] = trim($auth->cleanUser($_POST['login'])); //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['fullname'])); + $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $_POST['email'])); - if( empty($_POST['login']) || + if(empty($_POST['login']) || empty($_POST['fullname']) || - empty($_POST['email']) ){ - msg($lang['regmissing'],-1); + empty($_POST['email']) + ) { + msg($lang['regmissing'], -1); return false; } - if ($conf['autopasswd']) { - $pass = auth_pwgen(); // automatically generate password - } elseif (empty($_POST['pass']) || - empty($_POST['passchk'])) { - msg($lang['regmissing'], -1); // complain about missing passwords + if($conf['autopasswd']) { + $pass = auth_pwgen(); // automatically generate password + } elseif(empty($_POST['pass']) || + empty($_POST['passchk']) + ) { + msg($lang['regmissing'], -1); // complain about missing passwords return false; - } elseif ($_POST['pass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + } elseif($_POST['pass'] != $_POST['passchk']) { + msg($lang['regbadpass'], -1); // complain about misspelled passwords return false; } else { - $pass = $_POST['pass']; // accept checked and valid password + $pass = $_POST['pass']; // accept checked and valid password } //check mail - if(!mail_isvalid($_POST['email'])){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($_POST['email'])) { + msg($lang['regbadmail'], -1); return false; } //okay try to create the user - if(!$auth->triggerUserMod('create', array($_POST['login'],$pass,$_POST['fullname'],$_POST['email']))){ - msg($lang['reguexists'],-1); + if(!$auth->triggerUserMod('create', array($_POST['login'], $pass, $_POST['fullname'], $_POST['email']))) { + msg($lang['reguexists'], -1); return false; } // create substitutions for use in notification email $substitutions = array( - 'NEWUSER' => $_POST['login'], - 'NEWNAME' => $_POST['fullname'], - 'NEWEMAIL' => $_POST['email'], - ); + 'NEWUSER' => $_POST['login'], + 'NEWNAME' => $_POST['fullname'], + 'NEWEMAIL' => $_POST['email'], + ); - if (!$conf['autopasswd']) { - msg($lang['regsuccess2'],1); + if(!$conf['autopasswd']) { + msg($lang['regsuccess2'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; } // autogenerated password? then send him the password - if (auth_sendPassword($_POST['login'],$pass)){ - msg($lang['regsuccess'],1); + if(auth_sendPassword($_POST['login'], $pass)) { + msg($lang['regsuccess'], 1); notify('', 'register', '', $_POST['login'], false, $substitutions); return true; - }else{ - msg($lang['regmailfail'],-1); + } else { + msg($lang['regmailfail'], -1); return false; } } @@ -769,63 +809,78 @@ function register(){ */ function updateprofile() { global $conf; - global $INFO; global $lang; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; - if(empty($_POST['save'])) return false; + if(!$INPUT->post->bool('save')) return false; if(!checkSecurityToken()) return false; if(!actionOK('profile')) { - msg($lang['profna'],-1); + msg($lang['profna'], -1); return false; } - if ($_POST['newpass'] != $_POST['passchk']) { - msg($lang['regbadpass'], -1); // complain about misspelled passwords + $changes = array(); + $changes['pass'] = $INPUT->post->str('newpass'); + $changes['name'] = $INPUT->post->str('fullname'); + $changes['mail'] = $INPUT->post->str('email'); + + // check misspelled passwords + if($changes['pass'] != $INPUT->post->str('passchk')) { + msg($lang['regbadpass'], -1); return false; } - //clean fullname and email - $_POST['fullname'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['fullname'])); - $_POST['email'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/','',$_POST['email'])); + // clean fullname and email + $changes['name'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['name'])); + $changes['mail'] = trim(preg_replace('/[\x00-\x1f:<>&%,;]+/', '', $changes['mail'])); - if ((empty($_POST['fullname']) && $auth->canDo('modName')) || - (empty($_POST['email']) && $auth->canDo('modMail'))) { - msg($lang['profnoempty'],-1); + // no empty name and email (except the backend doesn't support them) + if((empty($changes['name']) && $auth->canDo('modName')) || + (empty($changes['mail']) && $auth->canDo('modMail')) + ) { + msg($lang['profnoempty'], -1); return false; } - - if (!mail_isvalid($_POST['email']) && $auth->canDo('modMail')){ - msg($lang['regbadmail'],-1); + if(!mail_isvalid($changes['mail']) && $auth->canDo('modMail')) { + msg($lang['regbadmail'], -1); return false; } - if ($_POST['fullname'] != $INFO['userinfo']['name'] && $auth->canDo('modName')) $changes['name'] = $_POST['fullname']; - if ($_POST['email'] != $INFO['userinfo']['mail'] && $auth->canDo('modMail')) $changes['mail'] = $_POST['email']; - if (!empty($_POST['newpass']) && $auth->canDo('modPass')) $changes['pass'] = $_POST['newpass']; + $changes = array_filter($changes); + + // check for unavailable capabilities + if(!$auth->canDo('modName')) unset($changes['name']); + if(!$auth->canDo('modMail')) unset($changes['mail']); + if(!$auth->canDo('modPass')) unset($changes['pass']); - if (!count($changes)) { + // anything to do? + if(!count($changes)) { msg($lang['profnochange'], -1); return false; } - if ($conf['profileconfirm']) { - if (!$auth->checkPass($_SERVER['REMOTE_USER'], $_POST['oldpass'])) { - msg($lang['badlogin'],-1); + if($conf['profileconfirm']) { + if(!$auth->checkPass($_SERVER['REMOTE_USER'], $INPUT->post->str('oldpass'))) { + msg($lang['badlogin'], -1); return false; } } - if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { + if($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { // update cookie and session with the changed data - if ($changes['pass']){ - list($user,$sticky,$pass) = auth_getCookie(); - $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky)); - auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + if($changes['pass']) { + list( /*user*/, $sticky, /*pass*/) = auth_getCookie(); + $pass = PMA_blowfish_encrypt($changes['pass'], auth_cookiesalt(!$sticky)); + auth_setCookie($_SERVER['REMOTE_USER'], $pass, (bool) $sticky); } return true; } + + return false; } /** @@ -842,68 +897,73 @@ function updateprofile() { * * @return bool true on success, false on any error */ -function act_resendpwd(){ +function act_resendpwd() { global $lang; global $conf; + /* @var auth_basic $auth */ global $auth; + /* @var Input $INPUT */ + global $INPUT; if(!actionOK('resendpwd')) { - msg($lang['resendna'],-1); + msg($lang['resendna'], -1); return false; } - $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth')); - if($token){ + if($token) { // we're in token phase - get user info from token $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - if(!@file_exists($tfile)){ - msg($lang['resendpwdbadauth'],-1); - unset($_REQUEST['pwauth']); + if(!@file_exists($tfile)) { + msg($lang['resendpwdbadauth'], -1); + $INPUT->remove('pwauth'); return false; } // token is only valid for 3 days - if( (time() - filemtime($tfile)) > (3*60*60*24) ){ - msg($lang['resendpwdbadauth'],-1); - unset($_REQUEST['pwauth']); + if((time() - filemtime($tfile)) > (3 * 60 * 60 * 24)) { + msg($lang['resendpwdbadauth'], -1); + $INPUT->remove('pwauth'); @unlink($tfile); return false; } - $user = io_readfile($tfile); + $user = io_readfile($tfile); $userinfo = $auth->getUserData($user); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; } - if(!$conf['autopasswd']){ // we let the user choose a password + if(!$conf['autopasswd']) { // we let the user choose a password + $pass = $INPUT->str('pass'); + // password given correctly? - if(!isset($_REQUEST['pass']) || $_REQUEST['pass'] == '') return false; - if($_REQUEST['pass'] != $_REQUEST['passchk']){ - msg($lang['regbadpass'],-1); + if(!$pass) return false; + if($pass != $INPUT->str('passchk')) { + msg($lang['regbadpass'], -1); return false; } - $pass = $_REQUEST['pass']; - if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { - msg('error modifying user data',-1); + // change it + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg('error modifying user data', -1); return false; } - }else{ // autogenerate the password and send by mail + } else { // autogenerate the password and send by mail $pass = auth_pwgen(); - if (!$auth->triggerUserMod('modify', array($user,array('pass' => $pass)))) { - msg('error modifying user data',-1); + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg('error modifying user data', -1); return false; } - if (auth_sendPassword($user,$pass)) { - msg($lang['resendpwdsuccess'],1); + if(auth_sendPassword($user, $pass)) { + msg($lang['resendpwdsuccess'], 1); } else { - msg($lang['regmailfail'],-1); + msg($lang['regmailfail'], -1); } } @@ -913,13 +973,13 @@ function act_resendpwd(){ } else { // we're in request phase - if(!$_POST['save']) return false; + if(!$INPUT->post->bool('save')) return false; - if (empty($_POST['login'])) { + if(!$INPUT->post->str('login')) { msg($lang['resendpwdmissing'], -1); return false; } else { - $user = trim($auth->cleanUser($_POST['login'])); + $user = trim($auth->cleanUser($INPUT->post->str('login'))); } $userinfo = $auth->getUserData($user); @@ -931,30 +991,29 @@ function act_resendpwd(){ // generate auth token $token = md5(auth_cookiesalt().$user); //secret but user based $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - $url = wl('',array('do'=>'resendpwd','pwauth'=>$token),true,'&'); + $url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&'); - io_saveFile($tfile,$user); + io_saveFile($tfile, $user); $text = rawLocale('pwconfirm'); $trep = array( - 'FULLNAME' => $userinfo['name'], - 'LOGIN' => $user, - 'CONFIRM' => $url - ); + 'FULLNAME' => $userinfo['name'], + 'LOGIN' => $user, + 'CONFIRM' => $url + ); $mail = new Mailer(); $mail->to($userinfo['name'].' <'.$userinfo['mail'].'>'); $mail->subject($lang['regpwmail']); - $mail->setBody($text,$trep); - if($mail->send()){ - msg($lang['resendpwdconfirm'],1); - }else{ - msg($lang['regmailfail'],-1); + $mail->setBody($text, $trep); + if($mail->send()) { + msg($lang['resendpwdconfirm'], 1); + } else { + msg($lang['regmailfail'], -1); } return true; } - - return false; // never reached + // never reached } /** @@ -964,32 +1023,37 @@ 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 * @return string The crypted password */ -function auth_cryptPassword($clear,$method='',$salt=null){ +function auth_cryptPassword($clear, $method = '', $salt = null) { global $conf; if(empty($method)) $method = $conf['passcrypt']; - $pass = new PassHash(); - $call = 'hash_'.$method; + $pass = new PassHash(); + $call = 'hash_'.$method; - if(!method_exists($pass,$call)){ - msg("Unsupported crypt method $method",-1); + if(!method_exists($pass, $call)) { + msg("Unsupported crypt method $method", -1); return false; } - return $pass->$call($clear,$salt); + return $pass->$call($clear, $salt); } /** * Verifies a cleartext password against a crypted hash * - * @author Andreas Gohr <andi@splitbrain.org> - * @return bool + * @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 */ -function auth_verifyPassword($clear,$crypt){ +function auth_verifyPassword($clear, $crypt) { $pass = new PassHash(); - return $pass->verify_hash($clear,$crypt); + return $pass->verify_hash($clear, $crypt); } /** @@ -998,23 +1062,25 @@ function auth_verifyPassword($clear,$crypt){ * @param string $user username * @param string $pass encrypted password * @param bool $sticky whether or not the cookie will last beyond the session + * @return bool */ -function auth_setCookie($user,$pass,$sticky) { +function auth_setCookie($user, $pass, $sticky) { global $conf; + /* @var auth_basic $auth */ global $auth; global $USERINFO; - if (!$auth) return false; + if(!$auth) return false; $USERINFO = $auth->getUserData($user); // set cookie - $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); + $cookie = base64_encode($user).'|'.((int) $sticky).'|'.base64_encode($pass); $cookieDir = empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir']; - $time = $sticky ? (time()+60*60*24*365) : 0; //one year - if (version_compare(PHP_VERSION, '5.2.0', '>')) { - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl()),true); - }else{ - setcookie(DOKU_COOKIE,$cookie,$time,$cookieDir,'',($conf['securecookie'] && is_ssl())); + $time = $sticky ? (time() + 60 * 60 * 24 * 365) : 0; //one year + if(version_compare(PHP_VERSION, '5.2.0', '>')) { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl()), true); + } else { + setcookie(DOKU_COOKIE, $cookie, $time, $cookieDir, '', ($conf['securecookie'] && is_ssl())); } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; @@ -1022,6 +1088,8 @@ function auth_setCookie($user,$pass,$sticky) { $_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid(); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; $_SESSION[DOKU_COOKIE]['auth']['time'] = time(); + + return true; } /** @@ -1029,15 +1097,15 @@ function auth_setCookie($user,$pass,$sticky) { * * @returns array */ -function auth_getCookie(){ - if (!isset($_COOKIE[DOKU_COOKIE])) { +function auth_getCookie() { + if(!isset($_COOKIE[DOKU_COOKIE])) { return array(null, null, null); } - list($user,$sticky,$pass) = explode('|',$_COOKIE[DOKU_COOKIE],3); + list($user, $sticky, $pass) = explode('|', $_COOKIE[DOKU_COOKIE], 3); $sticky = (bool) $sticky; $pass = base64_decode($pass); $user = base64_decode($user); - return array($user,$sticky,$pass); + return array($user, $sticky, $pass); } //Setup VIM: ex: et ts=2 : diff --git a/inc/cache.php b/inc/cache.php index e598baa47af008d611ecb0d2bcddfebdb76ba78d..e0d08c971b2c0e771158cf326276bd1dacfc1b3a 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -84,7 +84,8 @@ class cache { * it should only overwrite a dependency when the new value is more stringent than the old */ function _addDependencies() { - if (isset($_REQUEST['purge'])) $this->depends['purge'] = true; // purge requested + global $INPUT; + if ($INPUT->has('purge')) $this->depends['purge'] = true; // purge requested } /** diff --git a/inc/common.php b/inc/common.php index cd0780730b3380c742047c9211377699a8c58324..02ed2432be5eef888091762e2b15e711c60fc501 100644 --- a/inc/common.php +++ b/inc/common.php @@ -11,11 +11,11 @@ if(!defined('DOKU_INC')) die('meh.'); /** * These constants are used with the recents function */ -define('RECENTS_SKIP_DELETED',2); -define('RECENTS_SKIP_MINORS',4); -define('RECENTS_SKIP_SUBSPACES',8); -define('RECENTS_MEDIA_CHANGES',16); -define('RECENTS_MEDIA_PAGES_MIXED',32); +define('RECENTS_SKIP_DELETED', 2); +define('RECENTS_SKIP_MINORS', 4); +define('RECENTS_SKIP_SUBSPACES', 8); +define('RECENTS_MEDIA_CHANGES', 16); +define('RECENTS_MEDIA_PAGES_MIXED', 32); /** * Wrapper around htmlspecialchars() @@ -23,7 +23,7 @@ define('RECENTS_MEDIA_PAGES_MIXED',32); * @author Andreas Gohr <andi@splitbrain.org> * @see htmlspecialchars() */ -function hsc($string){ +function hsc($string) { return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); } @@ -34,7 +34,7 @@ function hsc($string){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function ptln($string,$indent=0){ +function ptln($string, $indent = 0) { echo str_repeat(' ', $indent)."$string\n"; } @@ -43,8 +43,8 @@ function ptln($string,$indent=0){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function stripctl($string){ - return preg_replace('/[\x00-\x1F]+/s','',$string); +function stripctl($string) { + return preg_replace('/[\x00-\x1F]+/s', '', $string); } /** @@ -55,19 +55,20 @@ function stripctl($string){ * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html * @return string */ -function getSecurityToken(){ +function getSecurityToken() { return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']); } /** * Check the secret CSRF token */ -function checkSecurityToken($token=null){ +function checkSecurityToken($token = null) { + global $INPUT; if(!$_SERVER['REMOTE_USER']) return true; // no logged in user, no need for a check - if(is_null($token)) $token = $_REQUEST['sectok']; - if(getSecurityToken() != $token){ - msg('Security Token did not match. Possible CSRF attack.',-1); + if(is_null($token)) $token = $INPUT->str('sectok'); + if(getSecurityToken() != $token) { + msg('Security Token did not match. Possible CSRF attack.', -1); return false; } return true; @@ -78,13 +79,10 @@ function checkSecurityToken($token=null){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function formSecurityToken($print=true){ +function formSecurityToken($print = true) { $ret = '<div class="no"><input type="hidden" name="sectok" value="'.getSecurityToken().'" /></div>'."\n"; - if($print){ - echo $ret; - }else{ - return $ret; - } + if($print) echo $ret; + return $ret; } /** @@ -93,7 +91,7 @@ function formSecurityToken($print=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function pageinfo(){ +function pageinfo() { global $ID; global $REV; global $RANGE; @@ -102,32 +100,32 @@ function pageinfo(){ // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary - $info['id'] = $ID; + $info['id'] = $ID; $info['rev'] = $REV; // set info about manager/admin status. $info['isadmin'] = false; $info['ismanager'] = false; - if(isset($_SERVER['REMOTE_USER'])){ - $info['userinfo'] = $USERINFO; - $info['perm'] = auth_quickaclcheck($ID); - $info['subscribed'] = get_info_subscribed(); - $info['client'] = $_SERVER['REMOTE_USER']; + if(isset($_SERVER['REMOTE_USER'])) { + $info['userinfo'] = $USERINFO; + $info['perm'] = auth_quickaclcheck($ID); + $info['subscribed'] = get_info_subscribed(); + $info['client'] = $_SERVER['REMOTE_USER']; - if($info['perm'] == AUTH_ADMIN){ + if($info['perm'] == AUTH_ADMIN) { $info['isadmin'] = true; $info['ismanager'] = true; - }elseif(auth_ismanager()){ + } elseif(auth_ismanager()) { $info['ismanager'] = true; } // if some outside auth were used only REMOTE_USER is set - if(!$info['userinfo']['name']){ + if(!$info['userinfo']['name']) { $info['userinfo']['name'] = $_SERVER['REMOTE_USER']; } - }else{ - $info['perm'] = auth_aclcheck($ID,'',null); + } else { + $info['perm'] = auth_aclcheck($ID, '', null); $info['subscribed'] = false; $info['client'] = clientIP(true); } @@ -136,76 +134,76 @@ function pageinfo(){ $info['locked'] = checklock($ID); $info['filepath'] = fullpath(wikiFN($ID)); $info['exists'] = @file_exists($info['filepath']); - if($REV){ + if($REV) { //check if current revision was meant - if($info['exists'] && (@filemtime($info['filepath'])==$REV)){ + if($info['exists'] && (@filemtime($info['filepath']) == $REV)) { $REV = ''; - }elseif($RANGE){ + } elseif($RANGE) { //section editing does not work with old revisions! $REV = ''; $RANGE = ''; - msg($lang['nosecedit'],0); - }else{ + msg($lang['nosecedit'], 0); + } else { //really use old revision - $info['filepath'] = fullpath(wikiFN($ID,$REV)); + $info['filepath'] = fullpath(wikiFN($ID, $REV)); $info['exists'] = @file_exists($info['filepath']); } } $info['rev'] = $REV; - if($info['exists']){ + if($info['exists']) { $info['writable'] = (is_writable($info['filepath']) && - ($info['perm'] >= AUTH_EDIT)); - }else{ + ($info['perm'] >= AUTH_EDIT)); + } else { $info['writable'] = ($info['perm'] >= AUTH_CREATE); } - $info['editable'] = ($info['writable'] && empty($info['locked'])); - $info['lastmod'] = @filemtime($info['filepath']); + $info['editable'] = ($info['writable'] && empty($info['locked'])); + $info['lastmod'] = @filemtime($info['filepath']); //load page meta data $info['meta'] = p_get_metadata($ID); //who's the editor - if($REV){ + if($REV) { $revinfo = getRevisionInfo($ID, $REV, 1024); - }else{ - if (is_array($info['meta']['last_change'])) { + } else { + if(is_array($info['meta']['last_change'])) { $revinfo = $info['meta']['last_change']; } else { $revinfo = getRevisionInfo($ID, $info['lastmod'], 1024); // cache most recent changelog line in metadata if missing and still valid - if ($revinfo!==false) { + if($revinfo !== false) { $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } } } //and check for an external edit - if($revinfo!==false && $revinfo['date']!=$info['lastmod']){ + if($revinfo !== false && $revinfo['date'] != $info['lastmod']) { // cached changelog line no longer valid - $revinfo = false; + $revinfo = false; $info['meta']['last_change'] = $revinfo; p_set_metadata($ID, array('last_change' => $revinfo)); } - $info['ip'] = $revinfo['ip']; - $info['user'] = $revinfo['user']; - $info['sum'] = $revinfo['sum']; + $info['ip'] = $revinfo['ip']; + $info['user'] = $revinfo['user']; + $info['sum'] = $revinfo['sum']; // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID. // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor']. - if($revinfo['user']){ + if($revinfo['user']) { $info['editor'] = $revinfo['user']; - }else{ + } else { $info['editor'] = $revinfo['ip']; } // draft - $draft = getCacheName($info['client'].$ID,'.draft'); - if(@file_exists($draft)){ - if(@filemtime($draft) < @filemtime(wikiFN($ID))){ + $draft = getCacheName($info['client'].$ID, '.draft'); + if(@file_exists($draft)) { + if(@filemtime($draft) < @filemtime(wikiFN($ID))) { // remove stale draft @unlink($draft); - }else{ + } else { $info['draft'] = $draft; } } @@ -221,14 +219,14 @@ function pageinfo(){ * * @author Andreas Gohr */ -function buildURLparams($params, $sep='&'){ +function buildURLparams($params, $sep = '&') { $url = ''; $amp = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($amp) $url .= $sep; $url .= rawurlencode($key).'='; - $url .= rawurlencode((string)$val); + $url .= rawurlencode((string) $val); $amp = true; } return $url; @@ -241,29 +239,28 @@ function buildURLparams($params, $sep='&'){ * * @author Andreas Gohr */ -function buildAttributes($params,$skipempty=false){ - $url = ''; +function buildAttributes($params, $skipempty = false) { + $url = ''; $white = false; - foreach($params as $key => $val){ + foreach($params as $key => $val) { if($key{0} == '_') continue; if($val === '' && $skipempty) continue; if($white) $url .= ' '; $url .= $key.'="'; - $url .= htmlspecialchars ($val); + $url .= htmlspecialchars($val); $url .= '"'; $white = true; } return $url; } - /** * This builds the breadcrumb trail and returns it as array * * @author Andreas Gohr <andi@splitbrain.org> */ -function breadcrumbs(){ +function breadcrumbs() { // we prepare the breadcrumbs early for quick session closing static $crumbs = null; if($crumbs != null) return $crumbs; @@ -276,30 +273,30 @@ function breadcrumbs(){ $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents $file = wikiFN($ID); - if($ACT != 'show' || !@file_exists($file)){ + if($ACT != 'show' || !@file_exists($file)) { $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } // page names $name = noNSorNS($ID); - if (useHeading('navigation')) { + if(useHeading('navigation')) { // get page title - $title = p_get_first_heading($ID,METADATA_RENDER_USING_SIMPLE_CACHE); - if ($title) { + $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE); + if($title) { $name = $title; } } //remove ID from array - if (isset($crumbs[$ID])) { + if(isset($crumbs[$ID])) { unset($crumbs[$ID]); } //add to array $crumbs[$ID] = $name; //reduce size - while(count($crumbs) > $conf['breadcrumbs']){ + while(count($crumbs) > $conf['breadcrumbs']) { array_shift($crumbs); } //save to session @@ -318,18 +315,19 @@ function breadcrumbs(){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function idfilter($id,$ue=true){ +function idfilter($id, $ue = true) { global $conf; - if ($conf['useslash'] && $conf['userewrite']){ - $id = strtr($id,':','/'); - }elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && - $conf['userewrite']) { - $id = strtr($id,':',';'); - } - if($ue){ + if($conf['useslash'] && $conf['userewrite']) { + $id = strtr($id, ':', '/'); + } elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && + $conf['userewrite'] + ) { + $id = strtr($id, ':', ';'); + } + if($ue) { $id = rawurlencode($id); - $id = str_replace('%3A',':',$id); //keep as colon - $id = str_replace('%2F','/',$id); //keep as slash + $id = str_replace('%3A', ':', $id); //keep as colon + $id = str_replace('%2F', '/', $id); //keep as slash } return $id; } @@ -342,33 +340,33 @@ function idfilter($id,$ue=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function wl($id='',$urlParameters='',$absolute=false,$separator='&'){ +function wl($id = '', $urlParameters = '', $absolute = false, $separator = '&') { global $conf; - if(is_array($urlParameters)){ - $urlParameters = buildURLparams($urlParameters,$separator); - }else{ - $urlParameters = str_replace(',',$separator,$urlParameters); + if(is_array($urlParameters)) { + $urlParameters = buildURLparams($urlParameters, $separator); + } else { + $urlParameters = str_replace(',', $separator, $urlParameters); } - if ($id === '') { + if($id === '') { $id = $conf['start']; } $id = idfilter($id); - if($absolute){ + if($absolute) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id; if($urlParameters) $xlink .= '?'.$urlParameters; - }elseif($conf['userewrite']){ + } elseif($conf['userewrite']) { $xlink .= $id; if($urlParameters) $xlink .= '?'.$urlParameters; - }elseif($id){ + } elseif($id) { $xlink .= DOKU_SCRIPT.'?id='.$id; if($urlParameters) $xlink .= $separator.$urlParameters; - }else{ + } else { $xlink .= DOKU_SCRIPT; if($urlParameters) $xlink .= '?'.$urlParameters; } @@ -383,29 +381,29 @@ function wl($id='',$urlParameters='',$absolute=false,$separator='&'){ * * @author Ben Coburn <btcoburn@silicodon.net> */ -function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ +function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = '&') { global $conf; - if(is_array($more)){ - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace(',',$sep,$more); + if(is_array($more)) { + $more = buildURLparams($more, $sep); + } else { + $more = str_replace(',', $sep, $more); } $format = rawurlencode($format); - $id = idfilter($id); - if($abs){ + $id = idfilter($id); + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } - if($conf['userewrite'] == 2){ + if($conf['userewrite'] == 2) { $xlink .= DOKU_SCRIPT.'/'.$id.'?do=export_'.$format; if($more) $xlink .= $sep.$more; - }elseif($conf['userewrite'] == 1){ + } elseif($conf['userewrite'] == 1) { $xlink .= '_export/'.$format.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ + } else { $xlink .= DOKU_SCRIPT.'?do=export_'.$format.$sep.'id='.$id; if($more) $xlink .= $sep.$more; } @@ -421,42 +419,43 @@ function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ * The $more parameter should always be given as array, the function then * will strip default parameters to produce even cleaner URLs * - * @param string $id - the media file id or URL - * @param mixed $more - string or array with additional parameters - * @param boolean $direct - link to detail page if false - * @param string $sep - URL parameter separator - * @param boolean $abs - Create an absolute URL + * @param string $id the media file id or URL + * @param mixed $more string or array with additional parameters + * @param bool $direct link to detail page if false + * @param string $sep URL parameter separator + * @param bool $abs Create an absolute URL + * @return string */ -function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ +function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; - if(is_array($more)){ + if(is_array($more)) { // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); if(!$more['w']) unset($more['w']); if(!$more['h']) unset($more['h']); if(isset($more['id']) && $direct) unset($more['id']); - $more = buildURLparams($more,$sep); - }else{ - $more = str_replace('cache=cache','',$more); //skip default - $more = str_replace(',,',',',$more); - $more = str_replace(',',$sep,$more); + $more = buildURLparams($more, $sep); + } else { + $more = str_replace('cache=cache', '', $more); //skip default + $more = str_replace(',,', ',', $more); + $more = str_replace(',', $sep, $more); } - if($abs){ + if($abs) { $xlink = DOKU_URL; - }else{ + } else { $xlink = DOKU_BASE; } // external URLs are always direct without rewriting - if(preg_match('#^(https?|ftp)://#i',$id)){ + if(preg_match('#^(https?|ftp)://#i', $id)) { $xlink .= 'lib/exe/fetch.php'; // add hash: - $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id),0,6); - if($more){ + $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6); + if($more) { $xlink .= $sep.$more; $xlink .= $sep.'media='.rawurlencode($id); - }else{ + } else { $xlink .= $sep.'media='.rawurlencode($id); } return $xlink; @@ -465,29 +464,29 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ $id = idfilter($id); // decide on scriptname - if($direct){ - if($conf['userewrite'] == 1){ + if($direct) { + if($conf['userewrite'] == 1) { $script = '_media'; - }else{ + } else { $script = 'lib/exe/fetch.php'; } - }else{ - if($conf['userewrite'] == 1){ + } else { + if($conf['userewrite'] == 1) { $script = '_detail'; - }else{ + } else { $script = 'lib/exe/detail.php'; } } // build URL based on rewrite mode - if($conf['userewrite']){ + if($conf['userewrite']) { $xlink .= $script.'/'.$id; if($more) $xlink .= '?'.$more; - }else{ - if($more){ + } else { + if($more) { $xlink .= $script.'?'.$more; $xlink .= $sep.'media='.$id; - }else{ + } else { $xlink .= $script.'?media='.$id; } } @@ -495,15 +494,13 @@ function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ return $xlink; } - - /** * Just builds a link to a script * * @todo maybe obsolete * @author Andreas Gohr <andi@splitbrain.org> */ -function script($script='doku.php'){ +function script($script = 'doku.php') { return DOKU_BASE.DOKU_SCRIPT; } @@ -531,7 +528,7 @@ function script($script='doku.php'){ * @param string $text - optional text to check, if not given the globals are used * @return bool - true if a spam word was found */ -function checkwordblock($text=''){ +function checkwordblock($text = '') { global $TEXT; global $PRE; global $SUF; @@ -543,32 +540,32 @@ function checkwordblock($text=''){ if(!$text) $text = "$PRE $TEXT $SUF"; // we prepare the text a tiny bit to prevent spammers circumventing URL checks - $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i','\1http://\2 \2\3',$text); + $text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i', '\1http://\2 \2\3', $text); $wordblocks = getWordblocks(); // how many lines to read at once (to work around some PCRE limits) - if(version_compare(phpversion(),'4.3.0','<')){ + if(version_compare(phpversion(), '4.3.0', '<')) { // old versions of PCRE define a maximum of parenthesises even if no // backreferences are used - the maximum is 99 // this is very bad performancewise and may even be too high still $chunksize = 40; - }else{ + } else { // read file in chunks of 200 - this should work around the // MAX_PATTERN_SIZE in modern PCRE $chunksize = 200; } - while($blocks = array_splice($wordblocks,0,$chunksize)){ + while($blocks = array_splice($wordblocks, 0, $chunksize)) { $re = array(); // build regexp from blocks - foreach($blocks as $block){ - $block = preg_replace('/#.*$/','',$block); + foreach($blocks as $block) { + $block = preg_replace('/#.*$/', '', $block); $block = trim($block); if(empty($block)) continue; - $re[] = $block; + $re[] = $block; } - if(count($re) && preg_match('#('.join('|',$re).')#si',$text,$matches)) { + if(count($re) && preg_match('#('.join('|', $re).')#si', $text, $matches)) { // prepare event data - $data['matches'] = $matches; + $data['matches'] = $matches; $data['userinfo']['ip'] = $_SERVER['REMOTE_ADDR']; if($_SERVER['REMOTE_USER']) { $data['userinfo']['user'] = $_SERVER['REMOTE_USER']; @@ -592,42 +589,43 @@ function checkwordblock($text=''){ * a routable public address, prefering the ones suplied in the X * headers * - * @param boolean $single If set only a single IP is returned * @author Andreas Gohr <andi@splitbrain.org> + * @param boolean $single If set only a single IP is returned + * @return string */ -function clientIP($single=false){ - $ip = array(); +function clientIP($single = false) { + $ip = array(); $ip[] = $_SERVER['REMOTE_ADDR']; if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_FORWARDED_FOR']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_FORWARDED_FOR']))); if(!empty($_SERVER['HTTP_X_REAL_IP'])) - $ip = array_merge($ip,explode(',',str_replace(' ','',$_SERVER['HTTP_X_REAL_IP']))); + $ip = array_merge($ip, explode(',', str_replace(' ', '', $_SERVER['HTTP_X_REAL_IP']))); // some IPv4/v6 regexps borrowed from Feyd // see: http://forums.devnetwork.net/viewtopic.php?f=38&t=53479 - $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; - $hex_digit = '[A-Fa-f0-9]'; - $h16 = "{$hex_digit}{1,4}"; + $dec_octet = '(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[0-9])'; + $hex_digit = '[A-Fa-f0-9]'; + $h16 = "{$hex_digit}{1,4}"; $IPv4Address = "$dec_octet\\.$dec_octet\\.$dec_octet\\.$dec_octet"; - $ls32 = "(?:$h16:$h16|$IPv4Address)"; + $ls32 = "(?:$h16:$h16|$IPv4Address)"; $IPv6Address = "(?:(?:{$IPv4Address})|(?:". - "(?:$h16:){6}$ls32" . - "|::(?:$h16:){5}$ls32" . - "|(?:$h16)?::(?:$h16:){4}$ls32" . - "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32" . - "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32" . - "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32" . - "|(?:(?:$h16:){0,4}$h16)?::$ls32" . - "|(?:(?:$h16:){0,5}$h16)?::$h16" . - "|(?:(?:$h16:){0,6}$h16)?::" . - ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; + "(?:$h16:){6}$ls32". + "|::(?:$h16:){5}$ls32". + "|(?:$h16)?::(?:$h16:){4}$ls32". + "|(?:(?:$h16:){0,1}$h16)?::(?:$h16:){3}$ls32". + "|(?:(?:$h16:){0,2}$h16)?::(?:$h16:){2}$ls32". + "|(?:(?:$h16:){0,3}$h16)?::(?:$h16:){1}$ls32". + "|(?:(?:$h16:){0,4}$h16)?::$ls32". + "|(?:(?:$h16:){0,5}$h16)?::$h16". + "|(?:(?:$h16:){0,6}$h16)?::". + ")(?:\\/(?:12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))?)"; // remove any non-IP stuff - $cnt = count($ip); + $cnt = count($ip); $match = array(); - for($i=0; $i<$cnt; $i++){ - if(preg_match("/^$IPv4Address$/",$ip[$i],$match) || preg_match("/^$IPv6Address$/",$ip[$i],$match)) { + for($i = 0; $i < $cnt; $i++) { + if(preg_match("/^$IPv4Address$/", $ip[$i], $match) || preg_match("/^$IPv6Address$/", $ip[$i], $match)) { $ip[$i] = $match[0]; } else { $ip[$i] = ''; @@ -637,14 +635,14 @@ function clientIP($single=false){ $ip = array_values(array_unique($ip)); if(!$ip[0]) $ip[0] = '0.0.0.0'; // for some strange reason we don't have a IP - if(!$single) return join(',',$ip); + if(!$single) return join(',', $ip); // decide which IP to use, trying to avoid local addresses $ip = array_reverse($ip); - foreach($ip as $i){ - if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/',$i)){ + foreach($ip as $i) { + if(preg_match('/^(::1|[fF][eE]80:|127\.|10\.|192\.168\.|172\.((1[6-9])|(2[0-9])|(3[0-1]))\.)/', $i)) { continue; - }else{ + } else { return $i; } } @@ -659,42 +657,42 @@ function clientIP($single=false){ * * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code */ -function clientismobile(){ +function clientismobile() { if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) return true; - if(preg_match('/wap\.|\.wap/i',$_SERVER['HTTP_ACCEPT'])) return true; + if(preg_match('/wap\.|\.wap/i', $_SERVER['HTTP_ACCEPT'])) return true; if(!isset($_SERVER['HTTP_USER_AGENT'])) return false; $uamatches = 'midp|j2me|avantg|docomo|novarra|palmos|palmsource|240x320|opwv|chtml|pda|windows ce|mmp\/|blackberry|mib\/|symbian|wireless|nokia|hand|mobi|phone|cdm|up\.b|audio|SIE\-|SEC\-|samsung|HTC|mot\-|mitsu|sagem|sony|alcatel|lg|erics|vx|NEC|philips|mmm|xx|panasonic|sharp|wap|sch|rover|pocket|benq|java|pt|pg|vox|amoi|bird|compal|kg|voda|sany|kdd|dbt|sendo|sgh|gradi|jb|\d\d\di|moto'; - if(preg_match("/$uamatches/i",$_SERVER['HTTP_USER_AGENT'])) return true; + if(preg_match("/$uamatches/i", $_SERVER['HTTP_USER_AGENT'])) return true; return false; } - /** * Convert one or more comma separated IPs to hostnames * * If $conf['dnslookups'] is disabled it simply returns the input string * * @author Glen Harris <astfgl@iamnota.org> - * @returns a comma separated list of hostnames + * @param string $ips comma separated list of IP addresses + * @return string a comma separated list of hostnames */ -function gethostsbyaddrs($ips){ +function gethostsbyaddrs($ips) { global $conf; if(!$conf['dnslookups']) return $ips; $hosts = array(); - $ips = explode(',',$ips); + $ips = explode(',', $ips); if(is_array($ips)) { - foreach($ips as $ip){ + foreach($ips as $ip) { $hosts[] = gethostbyaddr(trim($ip)); } - return join(',',$hosts); + return join(',', $hosts); } else { return gethostbyaddr(trim($ips)); } @@ -707,7 +705,7 @@ function gethostsbyaddrs($ips){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function checklock($id){ +function checklock($id) { global $conf; $lock = wikiLockFN($id); @@ -715,14 +713,14 @@ function checklock($id){ if(!@file_exists($lock)) return false; //lockfile expired - if((time() - filemtime($lock)) > $conf['locktime']){ + if((time() - filemtime($lock)) > $conf['locktime']) { @unlink($lock); return false; } //my own lock - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { return false; } @@ -734,18 +732,18 @@ function checklock($id){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function lock($id){ +function lock($id) { global $conf; - if($conf['locktime'] == 0){ + if($conf['locktime'] == 0) { return; } $lock = wikiLockFN($id); - if($_SERVER['REMOTE_USER']){ - io_saveFile($lock,$_SERVER['REMOTE_USER']); - }else{ - io_saveFile($lock,clientIP()."\n".session_id()); + if($_SERVER['REMOTE_USER']) { + io_saveFile($lock, $_SERVER['REMOTE_USER']); + } else { + io_saveFile($lock, clientIP()."\n".session_id()); } } @@ -753,13 +751,14 @@ function lock($id){ * Unlock a page if it was locked by the user * * @author Andreas Gohr <andi@splitbrain.org> + * @param string $id page id to unlock * @return bool true if a lock was removed */ -function unlock($id){ +function unlock($id) { $lock = wikiLockFN($id); - if(@file_exists($lock)){ - list($ip,$session) = explode("\n",io_readFile($lock)); - if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()){ + if(@file_exists($lock)) { + list($ip, $session) = explode("\n", io_readFile($lock)); + if($ip == $_SERVER['REMOTE_USER'] || $ip == clientIP() || $session == session_id()) { @unlink($lock); return true; } @@ -773,8 +772,8 @@ function unlock($id){ * @see formText() for 2crlf conversion * @author Andreas Gohr <andi@splitbrain.org> */ -function cleanText($text){ - $text = preg_replace("/(\015\012)|(\015)/","\012",$text); +function cleanText($text) { + $text = preg_replace("/(\015\012)|(\015)/", "\012", $text); return $text; } @@ -786,8 +785,8 @@ function cleanText($text){ * @see cleanText() for 2unix conversion * @author Andreas Gohr <andi@splitbrain.org> */ -function formText($text){ - $text = str_replace("\012","\015\012",$text); +function formText($text) { + $text = str_replace("\012", "\015\012", $text); return htmlspecialchars($text); } @@ -796,8 +795,8 @@ function formText($text){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawLocale($id,$ext='txt'){ - return io_readFile(localeFN($id,$ext)); +function rawLocale($id, $ext = 'txt') { + return io_readFile(localeFN($id, $ext)); } /** @@ -805,7 +804,7 @@ function rawLocale($id,$ext='txt'){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawWiki($id,$rev=''){ +function rawWiki($id, $rev = '') { return io_readWikiPage(wikiFN($id, $rev), $id, $rev); } @@ -815,34 +814,33 @@ function rawWiki($id,$rev=''){ * @triggers COMMON_PAGETPL_LOAD * @author Andreas Gohr <andi@splitbrain.org> */ -function pageTemplate($id){ +function pageTemplate($id) { global $conf; - if (is_array($id)) $id = $id[0]; + if(is_array($id)) $id = $id[0]; // prepare initial event data $data = array( - 'id' => $id, // the id of the page to be created - 'tpl' => '', // the text used as template - 'tplfile' => '', // the file above text was/should be loaded from - 'doreplace' => true // should wildcard replacements be done on the text? + 'id' => $id, // the id of the page to be created + 'tpl' => '', // the text used as template + 'tplfile' => '', // the file above text was/should be loaded from + 'doreplace' => true // should wildcard replacements be done on the text? ); - $evt = new Doku_Event('COMMON_PAGETPL_LOAD',$data); - if($evt->advise_before(true)){ + $evt = new Doku_Event('COMMON_PAGETPL_LOAD', $data); + if($evt->advise_before(true)) { // the before event might have loaded the content already - if(empty($data['tpl'])){ + if(empty($data['tpl'])) { // if the before event did not set a template file, try to find one - if(empty($data['tplfile'])){ + if(empty($data['tplfile'])) { $path = dirname(wikiFN($id)); - $tpl = ''; - if(@file_exists($path.'/_template.txt')){ + if(@file_exists($path.'/_template.txt')) { $data['tplfile'] = $path.'/_template.txt'; - }else{ + } else { // search upper namespaces for templates - $len = strlen(rtrim($conf['datadir'],'/')); - while (strlen($path) >= $len){ - if(@file_exists($path.'/__template.txt')){ + $len = strlen(rtrim($conf['datadir'], '/')); + while(strlen($path) >= $len) { + if(@file_exists($path.'/__template.txt')) { $data['tplfile'] = $path.'/__template.txt'; break; } @@ -868,6 +866,12 @@ function pageTemplate($id){ * @author Andreas Gohr <andi@splitbrain.org> */ function parsePageTemplate(&$data) { + /** + * @var string $id the id of the page to be created + * @var string $tpl the text used as template + * @var string $tplfile the file above text was/should be loaded from + * @var bool $doreplace should wildcard replacements be done on the text? + */ extract($data); global $USERINFO; @@ -877,39 +881,41 @@ function parsePageTemplate(&$data) { $file = noNS($id); $page = strtr($file, $conf['sepchar'], ' '); - $tpl = str_replace(array( - '@ID@', - '@NS@', - '@FILE@', - '@!FILE@', - '@!FILE!@', - '@PAGE@', - '@!PAGE@', - '@!!PAGE@', - '@!PAGE!@', - '@USER@', - '@NAME@', - '@MAIL@', - '@DATE@', - ), - array( - $id, - getNS($id), - $file, - utf8_ucfirst($file), - utf8_strtoupper($file), - $page, - utf8_ucfirst($page), - utf8_ucwords($page), - utf8_strtoupper($page), - $_SERVER['REMOTE_USER'], - $USERINFO['name'], - $USERINFO['mail'], - $conf['dformat'], - ), $tpl); + $tpl = str_replace( + array( + '@ID@', + '@NS@', + '@FILE@', + '@!FILE@', + '@!FILE!@', + '@PAGE@', + '@!PAGE@', + '@!!PAGE@', + '@!PAGE!@', + '@USER@', + '@NAME@', + '@MAIL@', + '@DATE@', + ), + array( + $id, + getNS($id), + $file, + utf8_ucfirst($file), + utf8_strtoupper($file), + $page, + utf8_ucfirst($page), + utf8_ucwords($page), + utf8_strtoupper($page), + $_SERVER['REMOTE_USER'], + $USERINFO['name'], + $USERINFO['mail'], + $conf['dformat'], + ), $tpl + ); // we need the callback to work around strftime's char limit - $tpl = preg_replace_callback('/%./',create_function('$m','return strftime($m[0]);'),$tpl); + $tpl = preg_replace_callback('/%./', create_function('$m', 'return strftime($m[0]);'), $tpl); $data['tpl'] = $tpl; return $tpl; } @@ -924,17 +930,17 @@ function parsePageTemplate(&$data) { * * @author Andreas Gohr <andi@splitbrain.org> */ -function rawWikiSlices($range,$id,$rev=''){ +function rawWikiSlices($range, $id, $rev = '') { $text = io_readWikiPage(wikiFN($id, $rev), $id, $rev); // Parse range - list($from,$to) = explode('-',$range,2); + list($from, $to) = explode('-', $range, 2); // Make range zero-based, use defaults if marker is missing $from = !$from ? 0 : ($from - 1); $to = !$to ? strlen($text) : ($to - 1); $slices[0] = substr($text, 0, $from); - $slices[1] = substr($text, $from, $to-$from); + $slices[1] = substr($text, $from, $to - $from); $slices[2] = substr($text, $to); return $slices; } @@ -948,14 +954,16 @@ function rawWikiSlices($range,$id,$rev=''){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function con($pre,$text,$suf,$pretty=false){ - if($pretty){ - if ($pre !== '' && substr($pre, -1) !== "\n" && - substr($text, 0, 1) !== "\n") { +function con($pre, $text, $suf, $pretty = false) { + if($pretty) { + if($pre !== '' && substr($pre, -1) !== "\n" && + substr($text, 0, 1) !== "\n" + ) { $pre .= "\n"; } - if ($suf !== '' && substr($text, -1) !== "\n" && - substr($suf, 0, 1) !== "\n") { + if($suf !== '' && substr($text, -1) !== "\n" && + substr($suf, 0, 1) !== "\n" + ) { $text .= "\n"; } } @@ -970,7 +978,7 @@ function con($pre,$text,$suf,$pretty=false){ * @author Andreas Gohr <andi@splitbrain.org> * @author Ben Coburn <btcoburn@silicodon.net> */ -function saveWikiText($id,$text,$summary,$minor=false){ +function saveWikiText($id, $text, $summary, $minor = false) { /* Note to developers: This code is subtle and delicate. Test the behavior of the attic and changelog with dokuwiki and external edits @@ -981,31 +989,31 @@ function saveWikiText($id,$text,$summary,$minor=false){ global $lang; global $REV; // ignore if no changes were made - if($text == rawWiki($id,'')){ + if($text == rawWiki($id, '')) { return; } - $file = wikiFN($id); - $old = @filemtime($file); // from page - $wasRemoved = (trim($text) == ''); // check for empty or whitespace only - $wasCreated = !@file_exists($file); - $wasReverted = ($REV==true); - $newRev = false; - $oldRev = getRevisions($id, -1, 1, 1024); // from changelog - $oldRev = (int)(empty($oldRev)?0:$oldRev[0]); - if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old>=$oldRev) { + $file = wikiFN($id); + $old = @filemtime($file); // from page + $wasRemoved = (trim($text) == ''); // check for empty or whitespace only + $wasCreated = !@file_exists($file); + $wasReverted = ($REV == true); + $newRev = false; + $oldRev = getRevisions($id, -1, 1, 1024); // from changelog + $oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]); + if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) { // add old revision to the attic if missing saveOldRevision($id); // add a changelog entry if this edit came from outside dokuwiki - if ($old>$oldRev) { - addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=>true)); + if($old > $oldRev) { + addLogEntry($old, $id, DOKU_CHANGE_TYPE_EDIT, $lang['external_edit'], '', array('ExternalEdit'=> true)); // remove soon to be stale instructions $cache = new cache_instructions($id, $file); $cache->removeCache(); } } - if ($wasRemoved){ + if($wasRemoved) { // Send "update" event with empty data, so plugins can react to page deletion $data = array(array($file, '', false), getNS($id), noNS($id), false); trigger_event('IO_WIKIPAGE_WRITE', $data); @@ -1024,37 +1032,40 @@ function saveWikiText($id,$text,$summary,$minor=false){ // remove empty namespaces io_sweepNS($id, 'datadir'); io_sweepNS($id, 'mediadir'); - }else{ + } else { // save file (namespace dir is created in io_writeWikiPage) io_writeWikiPage($file, $text, $id); // pre-save the revision, to keep the attic in sync $newRev = saveOldRevision($id); - $del = false; + $del = false; } // select changelog line type $extra = ''; - $type = DOKU_CHANGE_TYPE_EDIT; - if ($wasReverted) { - $type = DOKU_CHANGE_TYPE_REVERT; + $type = DOKU_CHANGE_TYPE_EDIT; + if($wasReverted) { + $type = DOKU_CHANGE_TYPE_REVERT; $extra = $REV; - } - else if ($wasCreated) { $type = DOKU_CHANGE_TYPE_CREATE; } - else if ($wasRemoved) { $type = DOKU_CHANGE_TYPE_DELETE; } - else if ($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { $type = DOKU_CHANGE_TYPE_MINOR_EDIT; } //minor edits only for logged in users + } else if($wasCreated) { + $type = DOKU_CHANGE_TYPE_CREATE; + } else if($wasRemoved) { + $type = DOKU_CHANGE_TYPE_DELETE; + } else if($minor && $conf['useacl'] && $_SERVER['REMOTE_USER']) { + $type = DOKU_CHANGE_TYPE_MINOR_EDIT; + } //minor edits only for logged in users addLogEntry($newRev, $id, $type, $summary, $extra); // send notify mails - notify($id,'admin',$old,$summary,$minor); - notify($id,'subscribers',$old,$summary,$minor); + notify($id, 'admin', $old, $summary, $minor); + notify($id, 'subscribers', $old, $summary, $minor); // update the purgefile (timestamp of the last time anything within the wiki was changed) - io_saveFile($conf['cachedir'].'/purgefile',time()); + io_saveFile($conf['cachedir'].'/purgefile', time()); // if useheading is enabled, purge the cache of all linking pages - if(useHeading('content')){ + if(useHeading('content')) { $pages = ft_backlinks($id); - foreach ($pages as $page) { + foreach($pages as $page) { $cache = new cache_renderer($page, wikiFN($page), 'xhtml'); $cache->removeCache(); } @@ -1067,12 +1078,12 @@ function saveWikiText($id,$text,$summary,$minor=false){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function saveOldRevision($id){ +function saveOldRevision($id) { global $conf; $oldf = wikiFN($id); if(!@file_exists($oldf)) return ''; $date = filemtime($oldf); - $newf = wikiFN($id,$date); + $newf = wikiFN($id, $date); io_writeWikiPage($newf, rawWiki($id), $id, $date); return $date; } @@ -1080,72 +1091,75 @@ function saveOldRevision($id){ /** * Sends a notify mail on page change or registration * - * @param string $id The changed page - * @param string $who Who to notify (admin|subscribers|register) - * @param int $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 $id The changed page + * @param string $who Who to notify (admin|subscribers|register) + * @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 * + * @return bool * @author Andreas Gohr <andi@splitbrain.org> */ -function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ +function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) { global $lang; global $conf; global $INFO; global $DIFF_INLINESTYLES; // decide if there is something to do, eg. whom to mail - if($who == 'admin'){ - if(empty($conf['notify'])) return; //notify enabled? + if($who == 'admin') { + if(empty($conf['notify'])) return false; //notify enabled? $text = rawLocale('mailtext'); $to = $conf['notify']; $bcc = ''; - }elseif($who == 'subscribers'){ - if(!$conf['subscribers']) return; //subscribers enabled? - if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return; //skip minors + } elseif($who == 'subscribers') { + if(!$conf['subscribers']) return false; //subscribers enabled? + if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors $data = array('id' => $id, 'addresslist' => '', 'self' => false); - trigger_event('COMMON_NOTIFY_ADDRESSLIST', $data, - 'subscription_addresslist'); + trigger_event( + 'COMMON_NOTIFY_ADDRESSLIST', $data, + 'subscription_addresslist' + ); $bcc = $data['addresslist']; - if(empty($bcc)) return; + if(empty($bcc)) return false; $to = ''; $text = rawLocale('subscr_single'); - }elseif($who == 'register'){ - if(empty($conf['registernotify'])) return; + } elseif($who == 'register') { + if(empty($conf['registernotify'])) return false; $text = rawLocale('registermail'); $to = $conf['registernotify']; $bcc = ''; - }else{ - return; //just to be safe + } else { + return false; //just to be safe } // prepare replacements (keys not set in hrep will be taken from trep) $trep = array( - 'NEWPAGE' => wl($id,'',true,'&'), + 'NEWPAGE' => wl($id, '', true, '&'), 'PAGE' => $id, 'SUMMARY' => $summary ); - $trep = array_merge($trep,$replace); + $trep = array_merge($trep, $replace); $hrep = array(); // prepare content - if($who == 'register'){ - $subject = $lang['mail_new_user'].' '.$summary; - }elseif($rev){ + if($who == 'register') { + $subject = $lang['mail_new_user'].' '.$summary; + } elseif($rev) { $subject = $lang['mail_changed'].' '.$id; - $trep['OLDPAGE'] = wl($id,"rev=$rev",true,'&'); - $df = new Diff(explode("\n",rawWiki($id,$rev)), - explode("\n",rawWiki($id))); + $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&'); + $df = new Diff(explode("\n", rawWiki($id, $rev)), + explode("\n", rawWiki($id))); $dformat = new UnifiedDiffFormatter(); $tdiff = $dformat->format($df); $DIFF_INLINESTYLES = true; - $dformat = new InlineDiffFormatter(); - $hdiff = $dformat->format($df); - $hdiff = '<table>'.$hdiff.'</table>'; + $dformat = new InlineDiffFormatter(); + $hdiff = $dformat->format($df); + $hdiff = '<table>'.$hdiff.'</table>'; $DIFF_INLINESTYLES = false; - }else{ + } else { $subject = $lang['mail_newpage'].' '.$id; $trep['OLDPAGE'] = '---'; $tdiff = rawWiki($id); @@ -1159,11 +1173,11 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $mail->to($to); $mail->bcc($bcc); $mail->subject($subject); - $mail->setBody($text,$trep,$hrep); - if($who == 'subscribers'){ + $mail->setBody($text, $trep, $hrep); + if($who == 'subscribers') { $mail->setHeader( 'List-Unsubscribe', - '<'.wl($id,array('do'=>'subscribe'),true,'&').'>', + '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>', false ); } @@ -1176,8 +1190,8 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ * @author Andreas Gohr <andi@splitbrain.org> * @author Todd Augsburger <todd@rollerorgans.com> */ -function getGoogleQuery(){ - if (!isset($_SERVER['HTTP_REFERER'])) { +function getGoogleQuery() { + if(!isset($_SERVER['HTTP_REFERER'])) { return ''; } $url = parse_url($_SERVER['HTTP_REFERER']); @@ -1187,21 +1201,21 @@ function getGoogleQuery(){ // temporary workaround against PHP bug #49733 // see http://bugs.php.net/bug.php?id=49733 if(UTF8_MBSTRING) $enc = mb_internal_encoding(); - parse_str($url['query'],$query); + parse_str($url['query'], $query); if(UTF8_MBSTRING) mb_internal_encoding($enc); $q = ''; if(isset($query['q'])) - $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast + $q = $query['q']; // google, live/msn, aol, ask, altavista, alltheweb, gigablast elseif(isset($query['p'])) - $q = $query['p']; // yahoo + $q = $query['p']; // yahoo elseif(isset($query['query'])) - $q = $query['query']; // lycos, netscape, clusty, hotbot - elseif(preg_match("#a9\.com#i",$url['host'])) // a9 - $q = urldecode(ltrim($url['path'],'/')); + $q = $query['query']; // lycos, netscape, clusty, hotbot + elseif(preg_match("#a9\.com#i", $url['host'])) // a9 + $q = urldecode(ltrim($url['path'], '/')); if($q === '') return ''; - $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/',$q,-1,PREG_SPLIT_NO_EMPTY); + $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY); return $q; } @@ -1211,19 +1225,19 @@ function getGoogleQuery(){ * @deprecated No longer used * @author Andreas Gohr <andi@splitbrain.org> */ -function setCorrectLocale(){ +function setCorrectLocale() { global $conf; global $lang; $enc = strtoupper($lang['encoding']); - foreach ($lang['locales'] as $loc){ + foreach($lang['locales'] as $loc) { //try locale - if(@setlocale(LC_ALL,$loc)) return; + if(@setlocale(LC_ALL, $loc)) return; //try loceale with encoding - if(@setlocale(LC_ALL,"$loc.$enc")) return; + if(@setlocale(LC_ALL, "$loc.$enc")) return; } //still here? try to set from environment - @setlocale(LC_ALL,""); + @setlocale(LC_ALL, ""); } /** @@ -1235,17 +1249,17 @@ function setCorrectLocale(){ * @author Aidan Lister <aidan@php.net> * @version 1.0.0 */ -function filesize_h($size, $dec = 1){ +function filesize_h($size, $dec = 1) { $sizes = array('B', 'KB', 'MB', 'GB'); $count = count($sizes); - $i = 0; + $i = 0; - while ($size >= 1024 && ($i < $count - 1)) { + while($size >= 1024 && ($i < $count - 1)) { $size /= 1024; $i++; } - return round($size, $dec) . ' ' . $sizes[$i]; + return round($size, $dec).' '.$sizes[$i]; } /** @@ -1253,27 +1267,27 @@ function filesize_h($size, $dec = 1){ * * @author Andreas Gohr <gohr@cosmocode.de> */ -function datetime_h($dt){ +function datetime_h($dt) { global $lang; $ago = time() - $dt; - if($ago > 24*60*60*30*12*2){ - return sprintf($lang['years'], round($ago/(24*60*60*30*12))); + if($ago > 24 * 60 * 60 * 30 * 12 * 2) { + return sprintf($lang['years'], round($ago / (24 * 60 * 60 * 30 * 12))); } - if($ago > 24*60*60*30*2){ - return sprintf($lang['months'], round($ago/(24*60*60*30))); + if($ago > 24 * 60 * 60 * 30 * 2) { + return sprintf($lang['months'], round($ago / (24 * 60 * 60 * 30))); } - if($ago > 24*60*60*7*2){ - return sprintf($lang['weeks'], round($ago/(24*60*60*7))); + if($ago > 24 * 60 * 60 * 7 * 2) { + return sprintf($lang['weeks'], round($ago / (24 * 60 * 60 * 7))); } - if($ago > 24*60*60*2){ - return sprintf($lang['days'], round($ago/(24*60*60))); + if($ago > 24 * 60 * 60 * 2) { + return sprintf($lang['days'], round($ago / (24 * 60 * 60))); } - if($ago > 60*60*2){ - return sprintf($lang['hours'], round($ago/(60*60))); + if($ago > 60 * 60 * 2) { + return sprintf($lang['hours'], round($ago / (60 * 60))); } - if($ago > 60*2){ - return sprintf($lang['minutes'], round($ago/(60))); + if($ago > 60 * 2) { + return sprintf($lang['minutes'], round($ago / (60))); } return sprintf($lang['seconds'], $ago); } @@ -1287,15 +1301,15 @@ function datetime_h($dt){ * @see datetime_h * @author Andreas Gohr <gohr@cosmocode.de> */ -function dformat($dt=null,$format=''){ +function dformat($dt = null, $format = '') { global $conf; if(is_null($dt)) $dt = time(); $dt = (int) $dt; if(!$format) $format = $conf['dformat']; - $format = str_replace('%f',datetime_h($dt),$format); - return strftime($format,$dt); + $format = str_replace('%f', datetime_h($dt), $format); + return strftime($format, $dt); } /** @@ -1304,11 +1318,12 @@ 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 + * @return string */ function date_iso8601($int_date) { - $date_mod = date('Y-m-d\TH:i:s', $int_date); + $date_mod = date('Y-m-d\TH:i:s', $int_date); $pre_timezone = date('O', $int_date); - $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); + $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); $date_mod .= $time_zone; return $date_mod; } @@ -1322,16 +1337,16 @@ function date_iso8601($int_date) { function obfuscate($email) { global $conf; - switch ($conf['mailguard']) { + switch($conf['mailguard']) { case 'visible' : $obfuscate = array('@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '); return strtr($email, $obfuscate); case 'hex' : $encode = ''; - $len = strlen($email); - for ($x=0; $x < $len; $x++){ - $encode .= '&#x' . bin2hex($email{$x}).';'; + $len = strlen($email); + for($x = 0; $x < $len; $x++) { + $encode .= '&#x'.bin2hex($email{$x}).';'; } return $encode; @@ -1346,8 +1361,8 @@ function obfuscate($email) { * * @author Andreas Gohr <andi@splitbrain.org> */ -function unslash($string,$char="'"){ - return str_replace('\\'.$char,$char,$string); +function unslash($string, $char = "'") { + return str_replace('\\'.$char, $char, $string); } /** @@ -1356,10 +1371,10 @@ function unslash($string,$char="'"){ * @author <gilthans dot NO dot SPAM at gmail dot com> * @link http://de3.php.net/manual/en/ini.core.php#79564 */ -function php_to_byte($v){ - $l = substr($v, -1); +function php_to_byte($v) { + $l = substr($v, -1); $ret = substr($v, 0, -1); - switch(strtoupper($l)){ + switch(strtoupper($l)) { case 'P': $ret *= 1024; case 'T': @@ -1370,10 +1385,10 @@ function php_to_byte($v){ $ret *= 1024; case 'K': $ret *= 1024; - break; + break; default; $ret *= 10; - break; + break; } return $ret; } @@ -1381,8 +1396,8 @@ function php_to_byte($v){ /** * Wrapper around preg_quote adding the default delimiter */ -function preg_quote_cb($string){ - return preg_quote($string,'/'); +function preg_quote_cb($string) { + return preg_quote($string, '/'); } /** @@ -1398,14 +1413,15 @@ function preg_quote_cb($string){ * @param int $max maximum chars you want for the whole string * @param int $min minimum number of chars to have left for middle shortening * @param string $char the shortening character to use + * @return string */ -function shorten($keep,$short,$max,$min=9,$char='…'){ +function shorten($keep, $short, $max, $min = 9, $char = '…') { $max = $max - utf8_strlen($keep); if($max < $min) return $keep; $len = utf8_strlen($short); if($len <= $max) return $keep.$short; - $half = floor($max/2); - return $keep.utf8_substr($short,0,$half-1).$char.utf8_substr($short,$len-$half); + $half = floor($max / 2); + return $keep.utf8_substr($short, 0, $half - 1).$char.utf8_substr($short, $len - $half); } /** @@ -1414,11 +1430,11 @@ function shorten($keep,$short,$max,$min=9,$char='…'){ * * @author Andy Webber <dokuwiki AT andywebber DOT com> */ -function editorinfo($username){ +function editorinfo($username) { global $conf; global $auth; - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': case 'email': case 'email_link': @@ -1429,13 +1445,13 @@ function editorinfo($username){ } if(isset($info) && $info) { - switch($conf['showuseras']){ + switch($conf['showuseras']) { case 'username': return hsc($info['name']); case 'email': return obfuscate($info['mail']); case 'email_link': - $mail=obfuscate($info['mail']); + $mail = obfuscate($info['mail']); return '<a href="mailto:'.$mail.'">'.$mail.'</a>'; default: return hsc($username); @@ -1451,20 +1467,21 @@ function editorinfo($username){ * * @author Andreas Gohr <andi@splitbrain.org> * @param string $type - type of image 'badge' or 'button' + * @return string */ -function license_img($type){ +function license_img($type) { global $license; global $conf; if(!$conf['license']) return ''; if(!is_array($license[$conf['license']])) return ''; - $lic = $license[$conf['license']]; - $try = array(); + $lic = $license[$conf['license']]; + $try = array(); $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.png'; $try[] = 'lib/images/license/'.$type.'/'.$conf['license'].'.gif'; - if(substr($conf['license'],0,3) == 'cc-'){ + if(substr($conf['license'], 0, 3) == 'cc-') { $try[] = 'lib/images/license/'.$type.'/cc.png'; } - foreach($try as $src){ + foreach($try as $src) { if(@file_exists(DOKU_INC.$src)) return $src; } return ''; @@ -1476,12 +1493,15 @@ function license_img($type){ * If the memory_get_usage() function is not available the * function just assumes $bytes of already allocated memory * - * @param int $mem Size of memory you want to allocate in bytes - * @param int $used already allocated memory (see above) * @author Filip Oscadal <webmaster@illusionsoftworks.cz> * @author Andreas Gohr <andi@splitbrain.org> + * + * @param int $mem Size of memory you want to allocate in bytes + * @param int $bytes + * @internal param int $used already allocated memory (see above) + * @return bool */ -function is_mem_available($mem,$bytes=1048576){ +function is_mem_available($mem, $bytes = 1048576) { $limit = trim(ini_get('memory_limit')); if(empty($limit)) return true; // no limit set! @@ -1489,13 +1509,13 @@ function is_mem_available($mem,$bytes=1048576){ $limit = php_to_byte($limit); // get used memory if possible - if(function_exists('memory_get_usage')){ + if(function_exists('memory_get_usage')) { $used = memory_get_usage(); - }else{ + } else { $used = $bytes; } - if($used+$mem > $limit){ + if($used + $mem > $limit) { return false; } @@ -1510,10 +1530,10 @@ function is_mem_available($mem,$bytes=1048576){ * @link http://support.microsoft.com/kb/q176113/ * @author Andreas Gohr <andi@splitbrain.org> */ -function send_redirect($url){ +function send_redirect($url) { //are there any undisplayed messages? keep them in session for display global $MSG; - if (isset($MSG) && count($MSG) && !defined('NOSESSION')){ + if(isset($MSG) && count($MSG) && !defined('NOSESSION')) { //reopen session, store data and close session again @session_start(); $_SESSION[DOKU_COOKIE]['msg'] = $MSG; @@ -1524,22 +1544,23 @@ function send_redirect($url){ // work around IE bug // http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/ - list($url,$hash) = explode('#',$url); - if($hash){ - if(strpos($url,'?')){ + list($url, $hash) = explode('#', $url); + if($hash) { + if(strpos($url, '?')) { $url = $url.'&#'.$hash; - }else{ + } else { $url = $url.'?&#'.$hash; } } // check if running on IIS < 6 with CGI-PHP - if( isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && - (strpos($_SERVER['GATEWAY_INTERFACE'],'CGI') !== false) && + if(isset($_SERVER['SERVER_SOFTWARE']) && isset($_SERVER['GATEWAY_INTERFACE']) && + (strpos($_SERVER['GATEWAY_INTERFACE'], 'CGI') !== false) && (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($_SERVER['SERVER_SOFTWARE']), $matches)) && - $matches[1] < 6 ){ + $matches[1] < 6 + ) { header('Refresh: 0;url='.$url); - }else{ + } else { header('Location: '.$url); } exit; @@ -1559,12 +1580,14 @@ function send_redirect($url){ * or $_GET) * @param string $exc The text of the raised exception * + * @throws Exception + * @return mixed * @author Adrian Lang <lang@cosmocode.de> */ function valid_input_set($param, $valid_values, $array, $exc = '') { - if (isset($array[$param]) && in_array($array[$param], $valid_values)) { + if(isset($array[$param]) && in_array($array[$param], $valid_values)) { return $array[$param]; - } elseif (isset($valid_values['default'])) { + } elseif(isset($valid_values['default'])) { return $valid_values['default']; } else { throw new Exception($exc); @@ -1575,12 +1598,12 @@ function valid_input_set($param, $valid_values, $array, $exc = '') { * Read a preference from the DokuWiki cookie */ function get_doku_pref($pref, $default) { - if (strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) { + if(strpos($_COOKIE['DOKU_PREFS'], $pref) !== false) { $parts = explode('#', $_COOKIE['DOKU_PREFS']); $cnt = count($parts); - for ($i = 0; $i < $cnt; $i+=2){ - if ($parts[$i] == $pref) { - return $parts[$i+1]; + for($i = 0; $i < $cnt; $i += 2) { + if($parts[$i] == $pref) { + return $parts[$i + 1]; } } } diff --git a/inc/config_cascade.php b/inc/config_cascade.php index e4a3df353bbf9c5ca6c576eb5c3ed0894bed9a57..e1ab0eeadfa709b2347293b4bb0a074c70201322 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,6 +50,8 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'screen' => DOKU_CONF.'userstyle.css', + // @deprecated 2012-04-09: rtl will cease to be a mode of its own, + // please use "[dir=rtl]" in any css file in all, screen or print mode instead 'rtl' => DOKU_CONF.'userrtl.css', 'print' => DOKU_CONF.'userprint.css', 'feed' => DOKU_CONF.'userfeed.css', diff --git a/inc/form.php b/inc/form.php index e74c52c5d38ec41292dc44652765ef8abd0e0415..bdf520a2ee7ec9db5e9e3fcbdd2d91631539a646 100644 --- a/inc/form.php +++ b/inc/form.php @@ -295,8 +295,9 @@ class Doku_Form { */ function addRadioSet($name, $entries) { - $value = (isset($_POST[$name]) && isset($entries[$_POST[$name]])) ? - $_POST[$name] : key($entries); + global $INPUT; + $value = (array_key_exists($INPUT->post->str($name), $entries)) ? + $INPUT->str($name) : key($entries); foreach($entries as $val => $cap) { $data = ($value === $val) ? array('checked' => 'checked') : array(); $this->addElement(form_makeRadioField($name, $val, $cap, '', '', $data)); diff --git a/inc/html.php b/inc/html.php index be5666353916e9d189f95c7cfad1330e37f3c6c1..0afdb18207ac03db3d55149f94020789d67350cb 100644 --- a/inc/html.php +++ b/inc/html.php @@ -46,6 +46,7 @@ function html_login(){ global $lang; global $conf; global $ID; + global $INPUT; print p_locale_xhtml('login'); print '<div class="centeralign">'.NL; @@ -53,7 +54,7 @@ function html_login(){ $form->startFieldset($lang['btn_login']); $form->addHidden('id', $ID); $form->addHidden('do', 'login'); - $form->addElement(form_makeTextField('u', ((!$_REQUEST['http_credentials']) ? $_REQUEST['u'] : ''), $lang['user'], 'focus__this', 'block')); + $form->addElement(form_makeTextField('u', ((!$INPUT->bool('http_credentials')) ? $INPUT->str('u') : ''), $lang['user'], 'focus__this', 'block')); $form->addElement(form_makePasswordField('p', $lang['pass'], '', 'block')); if($conf['rememberme']) { $form->addElement(form_makeCheckboxField('r', '1', $lang['remember'], 'remember__me', 'simple')); @@ -229,12 +230,12 @@ function html_show($txt=null){ //PreviewHeader echo '<br id="scroll__here" />'; echo p_locale_xhtml('preview'); - echo '<div class="preview">'; + echo '<div class="preview"><div class="pad">'; $html = html_secedit(p_render('xhtml',p_get_instructions($txt),$info),$secedit); if($INFO['prependTOC']) $html = tpl_toc(true).$html; echo $html; echo '<div class="clearer"></div>'; - echo '</div>'; + echo '</div></div>'; }else{ if ($REV) print p_locale_xhtml('showrev'); @@ -326,11 +327,11 @@ function html_search(){ flush(); //show progressbar - print '<div class="centeralign" id="dw__loading">'.NL; - print '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'.NL; + print '<div id="dw__loading">'.NL; + print '<script type="text/javascript"><!--//--><![CDATA[//><!--'.NL; print 'showLoadBar();'.NL; print '//--><!]]></script>'.NL; - print '<br /></div>'.NL; + print '</div>'.NL; flush(); //do quick pagesearch @@ -366,26 +367,30 @@ function html_search(){ //do fulltext search $data = ft_pageSearch($QUERY,$regex); if(count($data)){ + print '<dl class="search_results">'; $num = 1; foreach($data as $id => $cnt){ - print '<div class="search_result">'; + print '<dt>'; print html_wikilink(':'.$id,useHeading('navigation')?null:$id,$regex); if($cnt !== 0){ - print ': <span class="search_cnt">'.$cnt.' '.$lang['hits'].'</span><br />'; + print ': '.$cnt.' '.$lang['hits'].''; + } + print '</dt>'; + if($cnt !== 0){ if($num < FT_SNIPPET_NUMBER){ // create snippets for the first number of matches only - print '<div class="search_snippet">'.ft_snippet($id,$regex).'</div>'; + print '<dd>'.ft_snippet($id,$regex).'</dd>'; } $num++; } - print '</div>'; flush(); } + print '</dl>'; }else{ print '<div class="nothing">'.$lang['nothingfound'].'</div>'; } //hide progressbar - print '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'.NL; + print '<script type="text/javascript"><!--//--><![CDATA[//><!--'.NL; print 'hideLoadBar("dw__loading");'.NL; print '//--><!]]></script>'.NL; flush(); @@ -452,7 +457,7 @@ function html_revisions($first=0, $media_id = false){ if (!$media_id) print p_locale_xhtml('revisions'); - $params = array('id' => 'page__revisions'); + $params = array('id' => 'page__revisions', 'class' => 'changes'); if ($media_id) $params['action'] = media_managerURL(array('image' => $media_id), '&'); $form = new Doku_Form($params); @@ -490,7 +495,7 @@ function html_revisions($first=0, $media_id = false){ if (!$media_id) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '); + $form->addElement(' – '); $form->addElement(htmlspecialchars($INFO['sum'])); $form->addElement(form_makeCloseTag('span')); } @@ -569,7 +574,7 @@ function html_revisions($first=0, $media_id = false){ if ($info['sum']) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - if (!$media_id) $form->addElement(' – '); + if (!$media_id) $form->addElement(' – '); $form->addElement(htmlspecialchars($info['sum'])); $form->addElement(form_makeCloseTag('span')); } @@ -667,12 +672,13 @@ function html_recent($first=0, $show_changes='both'){ if (getNS($ID) != '') print '<div class="level1"><p>' . sprintf($lang['recent_global'], getNS($ID), wl('', 'do=recent')) . '</p></div>'; - $form = new Doku_Form(array('id' => 'dw__recent', 'method' => 'GET')); + $form = new Doku_Form(array('id' => 'dw__recent', 'method' => 'GET', 'class' => 'changes')); $form->addHidden('sectok', null); $form->addHidden('do', 'recent'); $form->addHidden('id', $ID); if ($conf['mediarevisions']) { + $form->addElement('<div class="changeType">'); $form->addElement(form_makeListboxField( 'show_changes', array( @@ -685,6 +691,7 @@ function html_recent($first=0, $show_changes='both'){ array('class'=>'quickselect'))); $form->addElement(form_makeButton('submit', 'recent', $lang['btn_apply'])); + $form->addElement('</div>'); } $form->addElement(form_makeOpenTag('ul')); @@ -759,7 +766,7 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(html_wikilink(':'.$recent['id'],useHeading('navigation')?null:$recent['id'])); } $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); - $form->addElement(' – '.htmlspecialchars($recent['sum'])); + $form->addElement(' – '.htmlspecialchars($recent['sum'])); $form->addElement(form_makeCloseTag('span')); $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); @@ -1070,8 +1077,9 @@ function html_diff($text='',$intro=true,$type=null){ global $REV; global $lang; global $conf; + global $INPUT; - if(!$type) $type = $_REQUEST['difftype']; + if(!$type) $type = $INPUT->str('difftype'); if($type != 'inline') $type = 'sidebyside'; // we're trying to be clever here, revisions to compare can be either @@ -1079,16 +1087,17 @@ function html_diff($text='',$intro=true,$type=null){ // array in rev2. $rev1 = $REV; - if(is_array($_REQUEST['rev2'])){ - $rev1 = (int) $_REQUEST['rev2'][0]; - $rev2 = (int) $_REQUEST['rev2'][1]; + $rev2 = $INPUT->ref('rev2'); + if(is_array($rev2)){ + $rev1 = (int) $rev2[0]; + $rev2 = (int) $rev2[1]; if(!$rev1){ $rev1 = $rev2; unset($rev2); } }else{ - $rev2 = (int) $_REQUEST['rev2']; + $rev2 = $INPUT->int('rev2'); } $r_minor = ''; @@ -1246,6 +1255,7 @@ function html_register(){ global $lang; global $conf; global $ID; + global $INPUT; print p_locale_xhtml('register'); print '<div class="centeralign">'.NL; @@ -1253,13 +1263,13 @@ function html_register(){ $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); - $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', array('size'=>'50'))); if (!$conf['autopasswd']) { $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); } - $form->addElement(form_makeTextField('fullname', $_POST['fullname'], $lang['fullname'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makeTextField('email', $_POST['email'], $lang['email'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('email', $INPUT->post->str('email'), $lang['email'], '', 'block', array('size'=>'50'))); $form->addElement(form_makeButton('submit', '', $lang['btn_register'])); $form->endFieldset(); html_form('register', $form); @@ -1276,26 +1286,27 @@ function html_register(){ function html_updateprofile(){ global $lang; global $conf; + global $INPUT; global $ID; global $INFO; global $auth; print p_locale_xhtml('updateprofile'); - if (empty($_POST['fullname'])) $_POST['fullname'] = $INFO['userinfo']['name']; - if (empty($_POST['email'])) $_POST['email'] = $INFO['userinfo']['mail']; + $fullname = $INPUT->post->str('fullname', $INFO['userinfo']['name'], true); + $email = $INPUT->post->str('email', $INFO['userinfo']['mail'], true); print '<div class="centeralign">'.NL; $form = new Doku_Form(array('id' => 'dw__register')); $form->startFieldset($lang['profile']); $form->addHidden('do', 'profile'); $form->addHidden('save', '1'); - $form->addElement(form_makeTextField('fullname', $_SERVER['REMOTE_USER'], $lang['user'], '', 'block', array('size'=>'50', 'disabled'=>'disabled'))); + $form->addElement(form_makeTextField('login', $_SERVER['REMOTE_USER'], $lang['user'], '', 'block', array('size'=>'50', 'disabled'=>'disabled'))); $attr = array('size'=>'50'); if (!$auth->canDo('modName')) $attr['disabled'] = 'disabled'; - $form->addElement(form_makeTextField('fullname', $_POST['fullname'], $lang['fullname'], '', 'block', $attr)); + $form->addElement(form_makeTextField('fullname', $fullname, $lang['fullname'], '', 'block', $attr)); $attr = array('size'=>'50'); if (!$auth->canDo('modMail')) $attr['disabled'] = 'disabled'; - $form->addElement(form_makeTextField('email', $_POST['email'], $lang['email'], '', 'block', $attr)); + $form->addElement(form_makeTextField('email', $email, $lang['email'], '', 'block', $attr)); $form->addElement(form_makeTag('br')); if ($auth->canDo('modPass')) { $form->addElement(form_makePasswordField('newpass', $lang['newpass'], '', 'block', array('size'=>'50'))); @@ -1320,6 +1331,7 @@ function html_updateprofile(){ * @triggers HTML_EDITFORM_OUTPUT */ function html_edit(){ + global $INPUT; global $ID; global $REV; global $DATE; @@ -1332,8 +1344,8 @@ function html_edit(){ global $TEXT; global $RANGE; - if (isset($_REQUEST['changecheck'])) { - $check = $_REQUEST['changecheck']; + if ($INPUT->has('changecheck')) { + $check = $INPUT->str('changecheck'); } elseif(!$INFO['exists']){ // $TEXT has been loaded from page template $check = md5(''); @@ -1368,8 +1380,8 @@ function html_edit(){ $data = array('form' => $form, 'wr' => $wr, 'media_manager' => true, - 'target' => (isset($_REQUEST['target']) && $wr && - $RANGE !== '') ? $_REQUEST['target'] : 'section', + 'target' => ($INPUT->has('target') && $wr && + $RANGE !== '') ? $INPUT->str('target') : 'section', 'intro_locale' => $include); if ($data['target'] !== 'section') { @@ -1384,7 +1396,7 @@ function html_edit(){ } $form->addHidden('target', $data['target']); - $form->addElement(form_makeOpenTag('div', array('id'=>'wiki__editbar'))); + $form->addElement(form_makeOpenTag('div', array('id'=>'wiki__editbar', 'class'=>'editBar'))); $form->addElement(form_makeOpenTag('div', array('id'=>'size__ctl'))); $form->addElement(form_makeCloseTag('div')); if ($wr) { @@ -1412,17 +1424,16 @@ function html_edit(){ if ($wr) { // sets changed to true when previewed - echo '<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--'. NL; + echo '<script type="text/javascript"><!--//--><![CDATA[//><!--'. NL; echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '//--><!]]></script>' . NL; } ?> - <div style="width:99%;"> + <div class="editBox"> <div class="toolbar"> - <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div> - <div id="tool__bar"><?php if ($wr && $data['media_manager']){?><a href="<?php echo DOKU_BASE?>lib/exe/mediamanager.php?ns=<?php echo $INFO['namespace']?>" - target="_blank"><?php echo $lang['mediaselect'] ?></a><?php }?></div> - + <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div> + <div id="tool__bar"><?php if ($wr && $data['media_manager']){?><a href="<?php echo DOKU_BASE?>lib/exe/mediamanager.php?ns=<?php echo $INFO['namespace']?>" + target="_blank"><?php echo $lang['mediaselect'] ?></a><?php }?></div> </div> <?php @@ -1456,6 +1467,7 @@ function html_edit_form($param) { function html_minoredit(){ global $conf; global $lang; + global $INPUT; // minor edits are for logged in users only if(!$conf['useacl'] || !$_SERVER['REMOTE_USER']){ return false; @@ -1463,7 +1475,7 @@ function html_minoredit(){ $p = array(); $p['tabindex'] = 3; - if(!empty($_REQUEST['minor'])) $p['checked']='checked'; + if($INPUT->bool('minor')) $p['checked']='checked'; return form_makeCheckboxField('minor', '1', $lang['minoredit'], 'minoredit', 'nowrap', $p); } @@ -1669,8 +1681,9 @@ function html_resendpwd() { global $lang; global $conf; global $ID; + global $INPUT; - $token = preg_replace('/[^a-f0-9]+/','',$_REQUEST['pwauth']); + $token = preg_replace('/[^a-f0-9]+/','',$INPUT->str('pwauth')); if(!$conf['autopasswd'] && $token){ print p_locale_xhtml('resetpwd'); @@ -1695,7 +1708,7 @@ function html_resendpwd() { $form->addHidden('do', 'resendpwd'); $form->addHidden('save', '1'); $form->addElement(form_makeTag('br')); - $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block')); + $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block')); $form->addElement(form_makeTag('br')); $form->addElement(form_makeTag('br')); $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd'])); @@ -1714,11 +1727,11 @@ function html_TOC($toc){ if(!count($toc)) return ''; global $lang; $out = '<!-- TOC START -->'.DOKU_LF; - $out .= '<div class="toc">'.DOKU_LF; - $out .= '<div class="tocheader toctoggle" id="toc__header">'; + $out .= '<div id="dw__toc">'.DOKU_LF; + $out .= '<h3 class="toggle">'; $out .= $lang['toc']; - $out .= '</div>'.DOKU_LF; - $out .= '<div id="toc__inside">'.DOKU_LF; + $out .= '</h3>'.DOKU_LF; + $out .= '<div>'.DOKU_LF; $out .= html_buildlist($toc,'toc','html_list_toc','html_li_default',true); $out .= '</div>'.DOKU_LF.'</div>'.DOKU_LF; $out .= '<!-- TOC END -->'.DOKU_LF; @@ -1735,8 +1748,7 @@ function html_list_toc($item){ $link = $item['link']; } - return '<span class="li"><a href="'.$link.'" class="toc">'. - hsc($item['title']).'</a></span>'; + return '<a href="'.$link.'">'.hsc($item['title']).'</a>'; } /** diff --git a/inc/init.php b/inc/init.php index 403fbe4ab550f2e1203f9a14027a7184fb0f470d..a280507366547b27a91eb13b862ef604ceeaf33d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -3,7 +3,9 @@ * Initialize some defaults needed for DokuWiki */ -// start timing Dokuwiki execution +/** + * timing Dokuwiki execution + */ function delta_time($start=0) { return microtime(true)-((float)$start); } @@ -197,6 +199,10 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con // load libraries require_once(DOKU_INC.'inc/load.php'); +// input handle class +global $INPUT; +$INPUT = new Input(); + // initialize plugin controller $plugin_controller = new $plugin_controller_class(); diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index 7a246024d993660baf12e7645457fdcc451a73aa..562dc78b3be460c87cab2cfaa67dd72c0c44a638 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -9,8 +9,8 @@ */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '“'; //“ -$lang['doublequoteclosing'] = 'â€'; //” +$lang['doublequoteopening'] = '"'; //“ +$lang['doublequoteclosing'] = '"'; //” $lang['singlequoteopening'] = '‘'; //‘ $lang['singlequoteclosing'] = '’'; //’ $lang['apostrophe'] = '’'; //’ @@ -98,6 +98,7 @@ $lang['searchmedia_in'] = 'ТърÑене в %s'; $lang['txt_upload'] = 'Изберете файл за качване'; $lang['txt_filename'] = 'Качи като (незадължително)'; $lang['txt_overwrt'] = 'Презапиши ÑъщеÑтвуващите файлове'; +$lang['maxuploadsize'] = 'МакÑ. размер за отделните файлове е %s.'; $lang['lockedby'] = 'Ð’ момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; @@ -161,7 +162,7 @@ $lang['deletefail'] = '"%s" не може да бъде изтрит $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - вÑе още Ñе ползва.'; $lang['namespaces'] = 'Именни проÑтранÑтва'; $lang['mediafiles'] = 'Ðалични файлове в'; -$lang['accessdenied'] = 'ÐÑмате разрешение да преглеждате Ñтраницата.'; +$lang['accessdenied'] = 'ÐÑмате необходимите права за преглеждане на Ñтраницата.'; $lang['mediausage'] = 'Ползвайте ÑÐ»ÐµÐ´Ð½Ð¸Ñ ÑинтакÑиÑ, за да упоменете файла:'; $lang['mediaview'] = 'Преглед на Ð¾Ñ€Ð¸Ð³Ð¸Ð½Ð°Ð»Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»'; $lang['mediaroot'] = 'root'; @@ -290,7 +291,6 @@ $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити Ñа проблеми, които възпрепÑÑ‚Ñтват инÑталирането. Ще можете да продължите Ñлед като отÑтраните долуизброените проблеми.'; $lang['i_modified'] = 'Поради мерки за ÑигурноÑÑ‚ инÑталаторът работи Ñамо Ñ Ð½Ð¾Ð²Ð¸ и непроменени инÑталационни файлове. ТрÑбва да разархивирате отново файловете от ÑÐ²Ð°Ð»ÐµÐ½Ð¸Ñ Ð°Ñ€Ñ…Ð¸Ð² или да Ñе поÑъветвате Ñ <a href="http://dokuwiki.org/install">ИнÑтрукциите за инÑталиране на Dokuwiki</a>.'; - $lang['i_funcna'] = 'PHP функциÑта <code>%s</code> не е доÑтъпна. Може би е забранена от доÑтавчика на хоÑтинг.'; $lang['i_phpver'] = 'ИнÑталираната верÑÐ¸Ñ <code>%s</code> на PHP е по-Ñтара от необходимата <code>%s</code>. Ðктуализирайте PHP инÑталациÑта.'; $lang['i_permfail'] = '<code>%s</code> не е доÑтъпна за пиÑане от DokuWiki. ТрÑбва да промените правата за доÑтъп до директориÑта!'; diff --git a/inc/lang/bg/mailtext.txt b/inc/lang/bg/mailtext.txt index ad0024a8db0a7c630fa313a58bbb3bf723222615..a5f0cbd9265104dd69300f76021d5d07f54b285d 100644 --- a/inc/lang/bg/mailtext.txt +++ b/inc/lang/bg/mailtext.txt @@ -1,4 +1,4 @@ -Страница във DokuWiki е добавена или променена. Ето детайлите: +Страница в DokuWiki е добавена или променена. Ето детайлите: Дата : @DATE@ Браузър : @BROWSER@ diff --git a/inc/lang/bg/mailwrap.html b/inc/lang/bg/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..26b0a1e6a393e19af6c6669c9a189338742b7f45 --- /dev/null +++ b/inc/lang/bg/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>ПиÑмото е генерирано от DokuWiki на Ð°Ð´Ñ€ÐµÑ @DOKUWIKIURL@.</small> +</body> +</html> diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index 61e5ef3d85b7d2ffecd5c20d7fb34ae4f8e2d65c..37469522f90ce56f7ddb4713c3291efa461270cd 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -16,7 +16,7 @@ * @author Alexander Fischer <tbanus@os-forge.net> * @author Juergen Schwarzer <jschwarzer@freenet.de> * @author Marcel Metz <marcel_metz@gmx.de> - * @author Matthias Schulte <mailinglist@lupo49.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Christian Wichmann <nospam@zone0.de> * @author Pierre Corell <info@joomla-praxis.de> */ @@ -104,6 +104,7 @@ $lang['searchmedia_in'] = 'Suche in %s'; $lang['txt_upload'] = 'Datei zum Hochladen auswählen'; $lang['txt_filename'] = 'Hochladen als (optional)'; $lang['txt_overwrt'] = 'Bestehende Datei überschreiben'; +$lang['maxuploadsize'] = 'Max. %s pro Datei-Upload.'; $lang['lockedby'] = 'Momentan gesperrt von'; $lang['lockexpire'] = 'Sperre läuft ab am'; $lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.'; @@ -196,6 +197,11 @@ $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; $lang['noflash'] = 'Das <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> wird benötigt, um diesen Inhalt anzuzeigen.'; $lang['download'] = 'Download-Teil'; +$lang['tools'] = 'Werkzeuge'; +$lang['user_tools'] = 'Benutzer-Werkzeuge'; +$lang['site_tools'] = 'Webseiten-Werkzeuge'; +$lang['page_tools'] = 'Seiten-Werkzeuge'; +$lang['skip_to_content'] = 'zum Inhalt springen'; $lang['mail_newpage'] = 'Neue Seite:'; $lang['mail_changed'] = 'Seite geändert:'; $lang['mail_subscribe_list'] = 'Seite hat sich im Namespace geändert:'; @@ -248,13 +254,13 @@ $lang['img_keywords'] = 'Schlagwörter'; $lang['img_width'] = 'Breite'; $lang['img_height'] = 'Höhe'; $lang['img_manager'] = 'Im Medien-Manager anzeigen'; -$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementenliste von %s hinzugefügt'; -$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementenliste von %s'; +$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementliste von %s hinzugefügt'; +$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementliste von %s'; $lang['subscr_subscribe_noaddress'] = 'In deinem Account ist keine E-Mail-Adresse hinterlegt. Dadurch kann die Seite nicht abonniert werden'; -$lang['subscr_unsubscribe_success'] = 'Die Seite %s wurde von der Abonnementenliste von %s entfernt'; -$lang['subscr_unsubscribe_error'] = 'Fehler beim Entfernen von %s von der Abonnementenliste von %s'; -$lang['subscr_already_subscribed'] = '%s ist bereits auf der Abonnementenliste von %s'; -$lang['subscr_not_subscribed'] = '%s ist nicht auf der Abonnementenliste von %s'; +$lang['subscr_unsubscribe_success'] = 'Die Seite %s wurde von der Abonnementliste von %s entfernt'; +$lang['subscr_unsubscribe_error'] = 'Fehler beim Entfernen von %s von der Abonnementliste von %s'; +$lang['subscr_already_subscribed'] = '%s ist bereits auf der Abonnementliste von %s'; +$lang['subscr_not_subscribed'] = '%s ist nicht auf der Abonnementliste von %s'; $lang['subscr_m_not_subscribed'] = 'Du hast kein Abonnement von dieser Seite oder dem Namensraum.'; $lang['subscr_m_new_header'] = 'Abonnementen hinzufügen'; $lang['subscr_m_current_header'] = 'Aktive Abonnements'; @@ -266,6 +272,7 @@ $lang['subscr_style_digest'] = 'E-Mail mit zusammengefasster Ãœbersicht der Se $lang['subscr_style_list'] = 'Auflistung aller geänderten Seiten seit der letzten E-Mail (alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wende dich an den Admin.'; $lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wende dich an den Admin.'; +$lang['authpwdexpire'] = 'Dein Passwort läuft in %d Tag(en) ab, du solltest es es bald ändern.'; $lang['i_chooselang'] = 'Wähle deine Sprache'; $lang['i_installer'] = 'DokuWiki-Installation'; $lang['i_wikiname'] = 'Wiki-Name'; diff --git a/inc/lang/de-informal/mailwrap.html b/inc/lang/de-informal/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..420fdf83efb615b655fd971feec438dedb50ad14 --- /dev/null +++ b/inc/lang/de-informal/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Diese Mail kommt vom DokuWiki auf @DOKUWIKIURL@.</small> +</body> +</html> diff --git a/inc/lang/de-informal/resetpwd.txt b/inc/lang/de-informal/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..8423bd801c8ffd59546f37a1aa543dac20ad1c54 --- /dev/null +++ b/inc/lang/de-informal/resetpwd.txt @@ -0,0 +1,4 @@ +====== Neues Passwort setzen ====== + +Bitte gib ein neues Passwort für deinen Wiki-Zugang ein. + diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index cfbe0439647683053870c0386e3c3bd26bdf73c1..4ea75157b606fa658a238056b5d7251151c0ba7e 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -106,6 +106,7 @@ $lang['searchmedia_in'] = 'Suche in %s'; $lang['txt_upload'] = 'Datei zum Hochladen auswählen'; $lang['txt_filename'] = 'Hochladen als (optional)'; $lang['txt_overwrt'] = 'Bestehende Datei überschreiben'; +$lang['maxuploadsize'] = 'Max. %s pro Datei-Upload.'; $lang['lockedby'] = 'Momentan gesperrt von'; $lang['lockexpire'] = 'Sperre läuft ab am'; $lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, sollten Sie sie durch einen Klick auf den Vorschau-Knopf verlängern.'; diff --git a/inc/lang/de/mailwrap.html b/inc/lang/de/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..420fdf83efb615b655fd971feec438dedb50ad14 --- /dev/null +++ b/inc/lang/de/mailwrap.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +</head> +<body> + +@HTMLBODY@ + +<br /><hr /> +<small>Diese Mail kommt vom DokuWiki auf @DOKUWIKIURL@.</small> +</body> +</html> diff --git a/inc/lang/ko/backlinks.txt b/inc/lang/ko/backlinks.txt index 5c512e19d5ae88a6be9d2b75746da9a8c1534722..ce77ca5a75d66e45f92f746c4820e92f813f4bba 100644 --- a/inc/lang/ko/backlinks.txt +++ b/inc/lang/ko/backlinks.txt @@ -1,3 +1,3 @@ -====== ì´ì „ ë§í¬ ====== +====== 가리키는 ë§í¬ ====== 현재 문서를 가리키는 ë§í¬ê°€ 있는 문서 목ë¡ìž…니다. diff --git a/inc/lang/ko/conflict.txt b/inc/lang/ko/conflict.txt index bd41ebf754faf6883da1be66d240f4f0267caed1..43988a62b92e313c73947e2d44fa9cda0546fde6 100644 --- a/inc/lang/ko/conflict.txt +++ b/inc/lang/ko/conflict.txt @@ -2,4 +2,4 @@ 편집한 ë¬¸ì„œì˜ ìƒˆ ë²„ì „ì´ ìžˆìŠµë‹ˆë‹¤. ë‹¹ì‹ ì´ íŽ¸ì§‘í•˜ê³ ìžˆëŠ” ë™ì•ˆ 다른 ì‚¬ëžŒì´ ê°™ì€ íŒŒì¼ì„ íŽ¸ì§‘í•˜ì˜€ì„ ê²½ìš° ì´ëŸ° ì¼ì´ ìƒê¸¸ 수 있습니다. -ì•„ëž˜ì˜ ì°¨ì´ì ì„ ì² ì €í•˜ê²Œ ê²€í† í•˜ê³ ì–´ë–¤ ë²„ì „ì„ ì €ìž¥í•˜ì‹¤ì§€ ê²°ì •í•˜ì‹ì‹œì˜¤. **ì €ìž¥**ì„ ì„ íƒí•˜ì‹œë©´, ë‹¹ì‹ ì˜ ë²„ì „ì´ ì €ìž¥ë©ë‹ˆë‹¤. **취소** 를 ì„ íƒí•˜ì‹œë©´ 현재 ë²„ì „ì´ ìœ ì§€ë©ë‹ˆë‹¤. \ No newline at end of file +ì•„ëž˜ì˜ ì°¨ì´ë¥¼ ì² ì €í•˜ê²Œ ê²€í† í•˜ê³ ì–´ë–¤ ë²„ì „ì„ ì €ìž¥í•˜ì‹¤ì§€ ê²°ì •í•˜ì‹ì‹œì˜¤. **ì €ìž¥**ì„ ì„ íƒí•˜ë©´, ë‹¹ì‹ ì˜ ë²„ì „ì´ ì €ìž¥ë©ë‹ˆë‹¤. **취소**를 ì„ íƒí•˜ë©´ 현재 ë²„ì „ì´ ìœ ì§€ë©ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/diff.txt b/inc/lang/ko/diff.txt index 29189e9f004e252d5dc736b6306d7afda1d2163a..76b488d90c5feb7e9bfbc1dcdb4df28c6ceed596 100644 --- a/inc/lang/ko/diff.txt +++ b/inc/lang/ko/diff.txt @@ -1,3 +1,3 @@ -====== ì°¨ì´ì ====== +====== ì°¨ì´ ====== -ì´ ë¬¸ì„œì˜ ì„ íƒí•œ ì´ì „ ë²„ì „ê³¼ 현재 ë²„ì „ 사ì´ì˜ ì°¨ì´ì ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. \ No newline at end of file +ì´ ë¬¸ì„œì˜ ì„ íƒí•œ ì´ì „ ë²„ì „ê³¼ 현재 ë²„ì „ 사ì´ì˜ ì°¨ì´ë¥¼ ë³´ì—¬ì¤ë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt index a20bfb535bd00d1183fdf7f7315213936b605791..861834e5d49d70e22ffd105d7510ddd2f1cb8470 100644 --- a/inc/lang/ko/draft.txt +++ b/inc/lang/ko/draft.txt @@ -1,5 +1,5 @@ -====== 문서 ì´ˆì•ˆì´ ìžˆìŠµë‹ˆë‹¤. ====== +====== 문서 초안 ìžˆìŒ ====== ì´ ë¬¸ì„œì˜ ë§ˆì§€ë§‰ 편집 ì„¸ì…˜ì€ ì •ìƒì 으로 ë나지 않았습니다. DokuWiki는 ìž‘ì—… ë„중 ìžë™ìœ¼ë¡œ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì‚¬ìš©í•˜ì—¬ íŽ¸ì§‘ì„ ê³„ì† í• ìˆ˜ 있습니다. 마지막 세션 ë™ì•ˆ ì €ìž¥ëœ ë¬¸ì„œ ì´ˆì•ˆì„ ì•„ëž˜ì—ì„œ ë³¼ 수 있습니다. -ë¹„ì •ìƒì 으로 ëë‚œ 편집 ì„¸ì…˜ì„ //복구//í• ì§€ 여부를 ê²°ì •í•˜ê³ , ìžë™ìœ¼ë¡œ ì €ìž¥ë˜ì—ˆë˜ ì´ˆì•ˆì„ //ì‚ì œ//하거나 편집 ê³¼ì •ì„ ì·¨ì†Œí•˜ê¸° ë°”ëžë‹ˆë‹¤. \ No newline at end of file +ë¹„ì •ìƒì 으로 ëë‚œ 편집 ì„¸ì…˜ì„ **복구**í• ì§€ 여부를 ê²°ì •í•˜ê³ , ìžë™ìœ¼ë¡œ ì €ìž¥ë˜ì—ˆë˜ ì´ˆì•ˆì„ **ì‚ì œ**하거나 편집 ê³¼ì •ì„ **취소**하기 ë°”ëžë‹ˆë‹¤. \ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index 606c8429c3906e4960c66f260c9a4a95bd261e77..f52326a337735c1210b4b1f93e94b59810b8e66f 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1,2 +1 @@ -문서를 íŽ¸ì§‘í•˜ê³ **ì €ìž¥**ì„ ëˆ„ë¥´ì„¸ìš”. 위키 êµ¬ë¬¸ì€ [[wiki:syntax]] ë˜ëŠ” [[wiki:ko_syntax|(í•œêµì–´) 구문]]ì„ ì°¸ê³ í•˜ì„¸ìš”. ì´ ë¬¸ì„œë¥¼ **ë” ë‚«ê²Œ 만들 ìžì‹ ì´ ìžˆì„** ë•Œì—만 편집하ì‹ì‹œì˜¤. ì—°ìŠµì„ í•˜ê³ ì‹¶ë‹¤ë©´ ë¨¼ì € [[playground:playground|연습장]]ì— ê°€ì„œ 연습하세요. - +문서를 íŽ¸ì§‘í•˜ê³ **ì €ìž¥**ì„ ëˆ„ë¥´ì„¸ìš”. 위키 êµ¬ë¬¸ì€ [[wiki:syntax]] ë˜ëŠ” [[wiki:ko_syntax|(í•œêµì–´) 구문]]ì„ ì°¸ê³ í•˜ì„¸ìš”. ì´ ë¬¸ì„œë¥¼ **ë” ì¢‹ê²Œ 만들 ìžì‹ ì´ ìžˆì„ ë•Œ**ì—만 편집하세요. ì—°ìŠµì„ í•˜ê³ ì‹¶ë‹¤ë©´ ë¨¼ì € [[playground:playground|연습장]]ì— ê°€ì„œ 연습하세요. diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index 6113d38b15c3f010a297a450ea7b3f44f6f9c30d..f73b91294cffac255005e2039ca850b5efa7f101 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -8,8 +8,8 @@ <p>현재 설치 ê³¼ì •ì¤‘ì— ê´€ë¦¬ìžë¡œ ë¡œê·¸ì¸ í›„ DokuWikiì˜ ê´€ë¦¬ 메뉴(í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜, ì‚¬ìš©ìž ê´€ë¦¬, 위키 문서 ì ‘ê·¼ 권한 관리, 옵션 ì„¤ì •)를 가능하게 <acronym title="ì ‘ê·¼ ì œì–´ 목ë¡">ACL</acronym>ì— ëŒ€í•œ 환경 ì„¤ì •ì„ ìˆ˜í–‰í•©ë‹ˆë‹¤. ì´ ê²ƒì€ DokuWikiê°€ ë™ìž‘í•˜ëŠ”ë° í•„ìš”í•œ 사í•ì€ 아니지만, ì–´ì¨Œë“ ë” ì‰½ê²Œ 관리ìžê°€ ê´€ë¦¬í• ìˆ˜ 있ë„ë¡ í•´ì¤ë‹ˆë‹¤.</p> -<p>ìˆ™ë ¨ëœ ì‚¬ìš©ìžë“¤ì´ë‚˜ 특별한 설치 ê³¼ì •ì´ í•„ìš”í•œ ê²½ìš°ì— ë‹¤ìŒ ë§í¬ë“¤ì„ ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤: -<a href="http://dokuwiki.org/ko:install">설치 ê³¼ì •(í•œêµì–´)</a> -ê³¼ <a href="http://dokuwiki.org/ko:config">환경 ì„¤ì •(í•œêµì–´),</a> -<a href="http://dokuwiki.org/install">설치 ê³¼ì •(ì˜ì–´)</a> -ê³¼ <a href="http://dokuwiki.org/config">환경 ì„¤ì •(ì˜ì–´)</a></p> +<p>ìˆ™ë ¨ëœ ì‚¬ìš©ìžë‚˜ 특별한 설치 ê³¼ì •ì´ í•„ìš”í•œ ê²½ìš°ì— ë‹¤ìŒ ë§í¬ë¥¼ ì°¸ê³ í•˜ê¸° ë°”ëžë‹ˆë‹¤: +<a href="http://dokuwiki.org/ko:install">설치 ê³¼ì • (í•œêµì–´)</a> +ê³¼ <a href="http://dokuwiki.org/ko:config">환경 ì„¤ì • (í•œêµì–´),</a> +<a href="http://dokuwiki.org/install">설치 ê³¼ì • (ì˜ì–´)</a> +ê³¼ <a href="http://dokuwiki.org/config">환경 ì„¤ì • (ì˜ì–´)</a></p> diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 469e85bd696ef05af691ba3b14d1f9ac644a8b47..7b4e30a4917023aa225138eee85d33ced9b35e9c 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -40,7 +40,7 @@ $lang['btn_admin'] = '관리'; $lang['btn_update'] = '변경'; $lang['btn_delete'] = 'ì‚ì œ'; $lang['btn_back'] = '뒤로'; -$lang['btn_backlink'] = 'ì´ì „ ë§í¬'; +$lang['btn_backlink'] = '가리키는 ë§í¬'; $lang['btn_backtomedia'] = '미디어 íŒŒì¼ ì„ íƒìœ¼ë¡œ ëŒì•„가기'; $lang['btn_subscribe'] = 'êµ¬ë… ê´€ë¦¬'; $lang['btn_profile'] = 'ê°œì¸ ì •ë³´ 변경'; @@ -66,21 +66,21 @@ $lang['profile'] = 'ê°œì¸ ì •ë³´'; $lang['badlogin'] = 'ìž˜ëª»ëœ ì‚¬ìš©ìž ì´ë¦„ì´ê±°ë‚˜ 비밀번호입니다.'; $lang['minoredit'] = '사소한 바뀜'; $lang['draftdate'] = '문서 초안 ìžë™ ì €ìž¥ 시간'; -$lang['nosecedit'] = '문서가 ìˆ˜ì •ë˜ì–´ 세션 ì •ë³´ê°€ 달ë¼ì ¸ 문서 ì „ë¶€ë¥¼ 다시 ì½ìŠµë‹ˆë‹¤.'; +$lang['nosecedit'] = '문서가 ìˆ˜ì •ë˜ì–´ 세션 ì •ë³´ì˜ ìœ íš¨ ì‹œê°„ì´ ì§€ë‚˜ 문서 ì „ë¶€ë¥¼ 다시 ì½ìŠµë‹ˆë‹¤.'; $lang['regmissing'] = 'ëª¨ë“ í•ëª©ì„ ìž…ë ¥í•´ì•¼ 합니다.'; $lang['reguexists'] = 'ê°™ì€ ì´ë¦„ì„ ì‚¬ìš©í•˜ëŠ” 사용ìžê°€ 있습니다.'; $lang['regsuccess'] = '사용ìžë¥¼ 만들었으며 비밀번호는 ì´ë©”ì¼ë¡œ 보냈습니다.'; $lang['regsuccess2'] = '사용ìžë¥¼ 만들었습니다.'; $lang['regmailfail'] = '비밀번호를 ì´ë©”ì¼ë¡œ ì „ì†¡í• ë•Œ 오류가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤!'; -$lang['regbadmail'] = 'ì´ë©”ì¼ ì£¼ì†Œê°€ 잘못ë습니다. - 오류ë¼ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['regbadpass'] = '새 ë¹„ë°€ë²ˆí˜¸ë“¤ì´ ì¼ì¹˜í•˜ì§€ 않습니다. 다시 ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['regbadmail'] = 'ì´ë©”ì¼ ì£¼ì†Œê°€ 잘못ë습니다 - 오류ë¼ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['regbadpass'] = '새 비밀번호가 ì¼ì¹˜í•˜ì§€ 않습니다. 다시 ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['regpwmail'] = 'DokuWiki 비밀번호'; -$lang['reghere'] = 'ì•„ì§ ë“±ë¡í•˜ì§€ 않았다면 등ë¡í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['profna'] = 'ì´ ìœ„í‚¤ëŠ” ê°œì¸ ì •ë³´ ìˆ˜ì •ì„ í—ˆìš©í•˜ì§€ 않습니다.'; +$lang['reghere'] = 'ê³„ì •ì´ ì—†ë‚˜ìš”? ê³„ì •ì„ ë“±ë¡í• 수 있습니다'; +$lang['profna'] = 'ì´ ìœ„í‚¤ëŠ” ê°œì¸ ì •ë³´ ìˆ˜ì •ì„ í—ˆìš©í•˜ì§€ 않습니다'; $lang['profnochange'] = 'ë°”ë€ ì‚¬í•ì´ 없습니다.'; $lang['profnoempty'] = 'ì´ë¦„ì´ë‚˜ ì´ë©”ì¼ ì£¼ì†Œê°€ 비었습니다.'; $lang['profchanged'] = 'ê°œì¸ ì •ë³´ê°€ 성공ì 으로 바뀌었습니다.'; -$lang['pwdforget'] = '비밀번호를 ìžŠì–´ë²„ë ¸ë‚˜ìš”? 새로 ë°œê¸‰ë°›ì„ ìˆ˜ 있습니다.'; +$lang['pwdforget'] = '비밀번호를 잊으셨나요? 새로 ë°œê¸‰ë°›ì„ ìˆ˜ 있습니다'; $lang['resendna'] = 'ì´ ìœ„í‚¤ëŠ” 비밀번호 ìž¬ë°œê¸‰ì„ ì§€ì›í•˜ì§€ 않습니다.'; $lang['resendpwd'] = '다ìŒìœ¼ë¡œ 새 비밀번호 ì „ì†¡'; $lang['resendpwdmissing'] = 'ëª¨ë“ ë¹„ë°€ë²ˆí˜¸ë¥¼ ìž…ë ¥í•´ì•¼ 합니다.'; @@ -88,12 +88,12 @@ $lang['resendpwdnouser'] = '등ë¡ëœ 사용ìžê°€ 아닙니다.'; $lang['resendpwdbadauth'] = 'ì¸ì¦ 코드가 잘못ë습니다. ìž˜ëª»ëœ ë§í¬ì¸ì§€ í™•ì¸ ë°”ëžë‹ˆë‹¤.'; $lang['resendpwdconfirm'] = 'í™•ì¸ ë§í¬ë¥¼ ì´ë©”ì¼ë¡œ 보냈습니다.'; $lang['resendpwdsuccess'] = '새로운 비밀번호를 ì´ë©”ì¼ë¡œ 보냈습니다.'; -$lang['license'] = 'ì´ ìœ„í‚¤ì˜ ë‚´ìš©ì€ ë‹¤ìŒì˜ ë¼ì´ì„ ìŠ¤ì— ë”°ë¦…ë‹ˆë‹¤:'; +$lang['license'] = '별ë„ë¡œ ë¼ì´ì„ 스를 알리지 ì•Šì„ ê²½ìš°, ì´ ìœ„í‚¤ì˜ ë‚´ìš©ì€ ë‹¤ìŒì˜ ë¼ì´ì„ ìŠ¤ì— ë”°ë¦…ë‹ˆë‹¤:'; $lang['licenseok'] = 'ì°¸ê³ : ì´ ë¬¸ì„œë¥¼ íŽ¸ì§‘í• ê²½ìš° 다ìŒì˜ ë¼ì´ì„ ìŠ¤ì— ë™ì˜í•¨ì„ ì˜ë¯¸í•©ë‹ˆë‹¤:'; $lang['searchmedia'] = 'íŒŒì¼ ì´ë¦„ 찾기:'; $lang['searchmedia_in'] = '%sì—ì„œ 찾기'; -$lang['txt_upload'] = '올릴 파ì¼ì„ ì„ íƒí•©ë‹ˆë‹¤.'; -$lang['txt_filename'] = 'ì˜¬ë¦ íŒŒì¼ ì´ë¦„ì„ ìž…ë ¥í•©ë‹ˆë‹¤. (ì„ íƒ ì‚¬í•)'; +$lang['txt_upload'] = '올릴 íŒŒì¼ ì„ íƒ'; +$lang['txt_filename'] = '올릴 íŒŒì¼ ì´ë¦„ ìž…ë ¥ (ì„ íƒ ì‚¬í•)'; $lang['txt_overwrt'] = 'ì´ì „ 파ì¼ì„ 새로운 파ì¼ë¡œ ë®ì–´ì“°ê¸°'; $lang['maxuploadsize'] = '최대 올리기 용량. 파ì¼ë‹¹ %s'; $lang['lockedby'] = '현재 ìž ê²¨ì§„ 사용ìž'; @@ -124,7 +124,7 @@ $lang['js']['medialeft'] = '왼쪽 배치'; $lang['js']['mediaright'] = '오른쪽 배치'; $lang['js']['mediacenter'] = 'ê°€ìš´ë° ë°°ì¹˜'; $lang['js']['medianoalign'] = '배치 ì—†ìŒ'; -$lang['js']['nosmblinks'] = '윈ë„ìš° ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ MS ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ì—서만 ë™ìž‘합니다.\n그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; +$lang['js']['nosmblinks'] = '윈ë„ìš° ê³µìœ íŒŒì¼ê³¼ì˜ ì—°ê²°ì€ ë§ˆì´í¬ë¡œì†Œí”„트 ì¸í„°ë„· ìµìŠ¤í”Œë¡œëŸ¬ì—서만 ë™ìž‘합니다.\n그러나 ë§í¬ë¥¼ 복사하거나 붙여넣기를 í• ìˆ˜ 있습니다.'; $lang['js']['linkwiz'] = 'ë§í¬ 마법사'; $lang['js']['linkto'] = '다ìŒìœ¼ë¡œ ì—°ê²°:'; $lang['js']['del_confirm'] = 'ì •ë§ ì„ íƒëœ í•ëª©ì„ ì‚ì œí•˜ê² ìŠµë‹ˆê¹Œ?'; @@ -133,7 +133,7 @@ $lang['js']['media_diff'] = 'ì°¨ì´ ë³´ê¸°:'; $lang['js']['media_diff_both'] = '나란히 보기'; $lang['js']['media_diff_opacity'] = 'ê²¹ì³ ë³´ê¸°'; $lang['js']['media_diff_portions'] = '쪼개 보기'; -$lang['js']['media_select'] = 'íŒŒì¼ ì„ íƒ...'; +$lang['js']['media_select'] = 'íŒŒì¼ ì„ íƒâ€¦'; $lang['js']['media_upload_btn'] = '올리기'; $lang['js']['media_done_btn'] = '완료'; $lang['js']['media_drop'] = '올릴 파ì¼ì„ ëŒì–´ë„£ìœ¼ì„¸ìš”'; @@ -147,24 +147,24 @@ $lang['uploadsucc'] = '올리기 성공'; $lang['uploadfail'] = '올리기 실패. ìž˜ëª»ëœ ê¶Œí•œ 때문ì¼ì§€ë„ 모릅니다.'; $lang['uploadwrong'] = '올리기 거부. ê¸ˆì§€ëœ í™•ìž¥ìžìž…니다!'; $lang['uploadexist'] = '파ì¼ì´ ì´ë¯¸ 존재합니다.'; -$lang['uploadbadcontent'] = '올린 파ì¼ì´ íŒŒì¼ í™•ìž¥ìž %s와 ì¼ì¹˜í•˜ì§€ 않습니다.'; +$lang['uploadbadcontent'] = '올린 파ì¼ì´ %s íŒŒì¼ í™•ìž¥ìžì™€ ì¼ì¹˜í•˜ì§€ 않습니다.'; $lang['uploadspam'] = '스팸 차단 목ë¡ì´ 올리기를 취소했습니다.'; $lang['uploadxss'] = '악성 ì½”ë“œì˜ ê°€ëŠ¥ì„±ì´ ìžˆì–´ 올리기를 취소했습니다.'; $lang['uploadsize'] = '올린 파ì¼ì´ 너무 í½ë‹ˆë‹¤. (최대 %s)'; $lang['deletesucc'] = '"%s" 파ì¼ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['deletefail'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다. - ì‚ì œ ê¶Œí•œì´ ìžˆëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['mediainuse'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다. - ì•„ì§ ì‚¬ìš© 중입니다.'; +$lang['deletefail'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다 - ì‚ì œ ê¶Œí•œì´ ìžˆëŠ”ì§€ 확ì¸í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['mediainuse'] = '"%s" 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다 - ì•„ì§ ì‚¬ìš© 중입니다.'; $lang['namespaces'] = 'ì´ë¦„공간'; $lang['mediafiles'] = '사용 가능한 íŒŒì¼ ëª©ë¡'; $lang['accessdenied'] = 'ì´ ë¬¸ì„œë¥¼ ë³¼ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; $lang['mediausage'] = 'ì´ íŒŒì¼ì„ ì°¸ê³ í•˜ë ¤ë©´ ë‹¤ìŒ ë¬¸ë²•ì„ ì‚¬ìš©í•˜ê¸° ë°”ëžë‹ˆë‹¤:'; $lang['mediaview'] = 'ì›ë³¸ íŒŒì¼ ë³´ê¸°'; -$lang['mediaroot'] = '루트(root)'; -$lang['mediaupload'] = '파ì¼ì„ 현재 ì´ë¦„공간으로 올립니다. 하위 ì´ë¦„공간으로 ë§Œë“¤ë ¤ë©´ íŒŒì¼ ì´ë¦„ ì•žì— ì½œë¡ (:)으로 구분ë˜ëŠ” ì´ë¦„ì„ ë¶™ì´ë©´ ë©ë‹ˆë‹¤.'; -$lang['mediaextchange'] = 'íŒŒì¼ í™•ìž¥ìžê°€ .%sì—ì„œ .%s으로 바뀌었습니다!'; +$lang['mediaroot'] = '루트 (root)'; +$lang['mediaupload'] = '파ì¼ì„ 현재 ì´ë¦„공간으로 올립니다. 하위 ì´ë¦„공간으로 ë§Œë“¤ë ¤ë©´ ì„ íƒí•œ íŒŒì¼ ì´ë¦„ ì•žì— ì½œë¡ (:)으로 구분ë˜ëŠ” ì´ë¦„ì„ ë¶™ì´ë©´ ë©ë‹ˆë‹¤. 파ì¼ì„ 드래그 앤 ë“œë¡í•˜ì—¬ ì„ íƒí• 수 있습니다.'; +$lang['mediaextchange'] = 'íŒŒì¼ í™•ìž¥ìžê°€ .%sì—ì„œ .%s(으)ë¡œ 바뀌었습니다!'; $lang['reference'] = 'ì°¸ê³ '; $lang['ref_inuse'] = 'ë‹¤ìŒ ë¬¸ì„œì—ì„œ ì•„ì§ ì‚¬ìš© 중ì´ë¯€ë¡œ 파ì¼ì„ ì‚ì œí• ìˆ˜ 없습니다:'; -$lang['ref_hidden'] = 'ë¬¸ì„œì˜ ì¼ë¶€ ì°¸ê³ ëŠ” ì½ì„ 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; +$lang['ref_hidden'] = 'ë¬¸ì„œì˜ ì¼ë¶€ ì°¸ê³ ëŠ” ì½ì„ 수 있는 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤'; $lang['hits'] = '조회 수'; $lang['quickhits'] = 'ì¼ì¹˜í•˜ëŠ” 문서 ì´ë¦„'; $lang['toc'] = '목차'; @@ -186,19 +186,19 @@ $lang['created'] = '새로 만듦'; $lang['restored'] = 'ì´ì „ ë²„ì „ 복구 (%s)'; $lang['external_edit'] = '외부 편집기'; $lang['summary'] = '편집 요약'; -$lang['noflash'] = 'ì´ ì»¨í…ì¸ ë¥¼ 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash 플러그ì¸</a>ì´ í•„ìš”í•©ë‹ˆë‹¤.'; +$lang['noflash'] = 'ì´ ì½˜í…ì¸ ë¥¼ 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash 플러그ì¸</a>ì´ í•„ìš”í•©ë‹ˆë‹¤.'; $lang['download'] = 'ì¡°ê° ë‹¤ìš´ë¡œë“œ'; $lang['tools'] = 'ë„구'; $lang['user_tools'] = 'ì‚¬ìš©ìž ë„구'; $lang['site_tools'] = '사ì´íŠ¸ ë„구'; $lang['page_tools'] = '문서 ë„구'; -$lang['skip_to_content'] = '컨í…ì¸ ë„˜ê¸°ê¸°'; +$lang['skip_to_content'] = '콘í…ì¸ ë„˜ê¸°ê¸°'; $lang['mail_newpage'] = '문서 추가:'; $lang['mail_changed'] = '문서 바뀜:'; $lang['mail_subscribe_list'] = 'ì´ë¦„공간ì—ì„œ ë°”ë€ ë¬¸ì„œ:'; $lang['mail_new_user'] = '새로운 사용ìž:'; $lang['mail_upload'] = 'íŒŒì¼ ì²¨ë¶€:'; -$lang['changes_type'] = 'ì°¨ì´ì 보기'; +$lang['changes_type'] = 'ì°¨ì´ ë³´ê¸°'; $lang['pages_changes'] = '문서'; $lang['media_changes'] = '미디어 파ì¼'; $lang['both_changes'] = '미디어 파ì¼ê³¼ 문서 모ë‘'; @@ -212,7 +212,7 @@ $lang['qb_h2'] = '2단계 문단 ì œëª©'; $lang['qb_h3'] = '3단계 문단 ì œëª©'; $lang['qb_h4'] = '4단계 문단 ì œëª©'; $lang['qb_h5'] = '5단계 문단 ì œëª©'; -$lang['qb_h'] = 'ì œëª©'; +$lang['qb_h'] = '문단 ì œëª©'; $lang['qb_hs'] = '문단 ì œëª© ì„ íƒ'; $lang['qb_hplus'] = 'ìƒìœ„ 문단 ì œëª©'; $lang['qb_hminus'] = '하위 문단 ì œëª©'; @@ -259,15 +259,15 @@ $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['authmodfailed'] = 'ìž˜ëª»ëœ ì‚¬ìš©ìž ì¸ì¦ ì„¤ì •ìž…ë‹ˆë‹¤. 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['authtempfail'] = 'ì‚¬ìš©ìž ì¸ì¦ì´ ì¼ì‹œì 으로 불가능합니다. ë§Œì¼ ê³„ì†í•´ì„œ ë¬¸ì œê°€ ë°œìƒí•˜ë©´ 관리ìžì—게 문ì˜í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['authpwdexpire'] = '현재 비밀번호를 ì„¤ì •í•œì§€ %d ì¼ì´ 지났습니다. 새로 ì„¤ì •í•´ì£¼ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; +$lang['authpwdexpire'] = '현재 비밀번호를 ì„¤ì •í•œì§€ %dì¼ì´ 지났습니다. 새로 ì„¤ì •í•´ì£¼ì‹œê¸° ë°”ëžë‹ˆë‹¤.'; $lang['i_chooselang'] = 'ì‚¬ìš©í• ì–¸ì–´ë¥¼ ì„ íƒí•˜ì„¸ìš”'; $lang['i_installer'] = 'DokuWiki 설치'; $lang['i_wikiname'] = '위키 ì´ë¦„'; -$lang['i_enableacl'] = 'ACL 기능 사용 (권장 사í•)'; +$lang['i_enableacl'] = 'ACL 기능 사용 (권장)'; $lang['i_superuser'] = 'ìŠˆí¼ ìœ ì €'; $lang['i_problems'] = '설치 중 아래와 ê°™ì€ ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. ë¬¸ì œë¥¼ í•´ê²°í•œ 후 설치를 계ì†í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['i_modified'] = '보안 ìƒì˜ ì´ìœ ë¡œ ì´ ìŠ¤í¬ë¦½íŠ¸ëŠ” ìˆ˜ì •ë˜ì§€ ì•Šì€ ìƒˆ Dokuwiki 설치ì—서만 ë™ìž‘ë©ë‹ˆë‹¤. @@ -287,14 +287,14 @@ $lang['i_pol1'] = '공개 위키 (누구나 ì½ì„ 수 있지만, $lang['i_pol2'] = '닫힌 위키 (등ë¡ëœ 사용ìžë§Œ ì½ê¸°, 쓰기, 업로드가 가능합니다.)'; $lang['i_retry'] = '다시 ì‹œë„'; $lang['i_license'] = 'ë‚´ìš©ì„ ë°°í¬í•˜ê¸° 위한 ë¼ì´ì„ 스를 ì„ íƒí•˜ì„¸ìš”:'; -$lang['recent_global'] = '<b>%s</b> ì´ë¦„ê³µê°„ì„ êµ¬ë… ì¤‘ìž…ë‹ˆë‹¤. <a href="%s">ì „ì²´ 위키 최근 ë°”ë€œë„ ë³¼ 수</a> 있습니다.'; -$lang['years'] = '%d ë…„ ì „'; -$lang['months'] = '%d 개월 ì „'; -$lang['weeks'] = '%d 주 ì „'; -$lang['days'] = '%d ì¼ ì „'; -$lang['hours'] = '%d 시간 ì „'; -$lang['minutes'] = '%d 분 ì „'; -$lang['seconds'] = '%d ì´ˆ ì „'; +$lang['recent_global'] = '<b>%s</b> ì´ë¦„ê³µê°„ì„ êµ¬ë… ì¤‘ìž…ë‹ˆë‹¤. <a href="%s">ì „ì²´ ìœ„í‚¤ì˜ ìµœê·¼ ë°”ë€œë„ ë³¼ 수</a> 있습니다.'; +$lang['years'] = '%dë…„ ì „'; +$lang['months'] = '%d개월 ì „'; +$lang['weeks'] = '%d주 ì „'; +$lang['days'] = '%dì¼ ì „'; +$lang['hours'] = '%d시간 ì „'; +$lang['minutes'] = '%d분 ì „'; +$lang['seconds'] = '%dì´ˆ ì „'; $lang['wordblock'] = '스팸 문구를 í¬í•¨í•˜ê³ 있어서 ì €ìž¥ë˜ì§€ 않았습니다.'; $lang['media_uploadtab'] = '올리기'; $lang['media_searchtab'] = '찾기'; @@ -319,4 +319,4 @@ $lang['media_perm_read'] = 'ì´ íŒŒì¼ì„ ì½ì„ ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; $lang['media_perm_upload'] = '파ì¼ì„ 올릴 ê¶Œí•œì´ ì—†ìŠµë‹ˆë‹¤.'; $lang['media_update'] = '새 ë²„ì „ 올리기'; $lang['media_restore'] = 'ì´ ë²„ì „ìœ¼ë¡œ ë˜ëŒë¦¬ê¸°'; -$lang['plugin_install_err'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ \'%s\'를 \'%s\'ë¡œ 바꾸ì‹ì‹œì˜¤.'; +$lang['plugin_install_err'] = 'í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 잘못ë˜ì—ˆìŠµë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ë””ë ‰í† ë¦¬ \'%s\'(ì„)를 \'%s\'(으)ë¡œ 바꾸ì‹ì‹œì˜¤.'; diff --git a/inc/lang/ko/mailtext.txt b/inc/lang/ko/mailtext.txt index ead9d56957d4830260cfed32c5693f08595cb293..219fe6e0bd64eb8e4cc4ec902f8d2713e4197702 100644 --- a/inc/lang/ko/mailtext.txt +++ b/inc/lang/ko/mailtext.txt @@ -1,4 +1,4 @@ -DokuWiki 문서가 추가 ë˜ëŠ” 변경ë˜ì—ˆìŠµë‹ˆë‹¤. ì œì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다: +DokuWiki 문서가 추가 ë˜ëŠ” 변경ë˜ì—ˆìŠµë‹ˆë‹¤. ìžì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다: ë‚ ì§œ : @DATE@ 브ë¼ìš°ì € : @BROWSER@ diff --git a/inc/lang/ko/preview.txt b/inc/lang/ko/preview.txt index fec01dc43a32d7d456dbddd5e4b468f102d5dc94..6563874ee6c8b0d64eb03a0c465918f606d59a45 100644 --- a/inc/lang/ko/preview.txt +++ b/inc/lang/ko/preview.txt @@ -1,3 +1,3 @@ ====== 미리 보기 ====== -ì´ê²ƒì€ ìž…ë ¥í•œ ë‚´ìš©ì´ ì–´ë–»ê²Œ ë³´ì¼ì§€ 미리 ë³´ì—¬ì¤ë‹ˆë‹¤. ì•„ì§ **ì €ìž¥ë˜ì§€ 않았다**는 ì ì„ ê¸°ì–µí•˜ì‹ì‹œì˜¤! \ No newline at end of file +ì´ê²ƒì€ ìž…ë ¥í•œ ë‚´ìš©ì´ ì–´ë–»ê²Œ ë³´ì¼ì§€ 미리 ë³´ì—¬ì¤ë‹ˆë‹¤. ì•„ì§ **ì €ìž¥ë˜ì§€ 않았다**는 ì ì„ ê¸°ì–µí•´ë‘ì‹ì‹œì˜¤! \ No newline at end of file diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt index 2daa39060da74598e73bc91fb5e9f84355bbb210..9b2ec822fd9d1868f9e99d7a2d50d5b7a4a91856 100644 --- a/inc/lang/ko/read.txt +++ b/inc/lang/ko/read.txt @@ -1,2 +1,2 @@ -ì´ ë¬¸ì„œëŠ” ì½ê¸° ì „ìš©ìž…ë‹ˆë‹¤. 소스를 ë³¼ 수는 있지만, ìˆ˜ì •í• ìˆ˜ëŠ” 없습니다. ë¬¸ì œê°€ ìžˆë‹¤ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ì‹ì‹œì˜¤. +ì´ ë¬¸ì„œëŠ” ì½ê¸° ì „ìš©ìž…ë‹ˆë‹¤. ë‚´ìš©ì„ ë³¼ 수는 있지만, ìˆ˜ì •í• ìˆ˜ëŠ” 없습니다. ë¬¸ì œê°€ ìžˆë‹¤ê³ ìƒê°í•˜ë©´ 관리ìžì—게 문ì˜í•˜ì‹ì‹œì˜¤. diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt index e60368a74d70205704ba02803853ea5cff21e912..6509bed91d858a888975b21f5bd03d63bc317c85 100644 --- a/inc/lang/ko/register.txt +++ b/inc/lang/ko/register.txt @@ -1,3 +1,3 @@ ====== 새 ì‚¬ìš©ìž ë“±ë¡ ====== -ì´ ìœ„í‚¤ì— ìƒˆ ê³„ì •ì„ ë§Œë“œë ¤ë©´ ì•„ëž˜ì˜ ëª¨ë“ ë‚´ìš©ì„ ìž…ë ¥í•˜ì„¸ìš”. **올바른 ì´ë©”ì¼ ì£¼ì†Œ**를 사용하세요. 비밀번호를 ìž…ë ¥í•˜ëŠ” ê³³ì´ ì—†ë‹¤ë©´ 비밀번호는 ì´ ì´ë©”ì¼ë¡œ 보내집니다. ì‚¬ìš©ìž ì´ë¦„ì€ ì˜¬ë°”ë¥¸ [[doku>pagename|pagename]] ì´ì–´ì•¼ 합니다. \ No newline at end of file +ì´ ìœ„í‚¤ì— ìƒˆ ê³„ì •ì„ ë§Œë“œë ¤ë©´ ì•„ëž˜ì˜ ëª¨ë“ ë‚´ìš©ì„ ìž…ë ¥í•˜ì„¸ìš”. **올바른 ì´ë©”ì¼ ì£¼ì†Œ**를 사용하세요. 비밀번호를 ìž…ë ¥í•˜ëŠ” ê³³ì´ ì—†ë‹¤ë©´ 비밀번호는 ì´ ì´ë©”ì¼ë¡œ 보내집니다. ì‚¬ìš©ìž ì´ë¦„ì€ ì˜¬ë°”ë¥¸ [[doku>pagename|pagename]]ì´ì–´ì•¼ 합니다. \ No newline at end of file diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt index bea380f83840221e30024e66a7774a8254da320b..ed909456f8db606d0ac04945e9b3087dd37c3dd7 100644 --- a/inc/lang/ko/resetpwd.txt +++ b/inc/lang/ko/resetpwd.txt @@ -1,3 +1,3 @@ ====== 새 비밀번호 ì„¤ì • ====== -ì´ ìœ„í‚¤ì˜ ê³„ì •ì˜ ìƒˆ 비밀번호를 ìž…ë ¥í•˜ì„¸ìš”. \ No newline at end of file +ì´ ìœ„í‚¤ ê³„ì •ì˜ ìƒˆ 비밀번호를 ìž…ë ¥í•˜ì„¸ìš”. \ No newline at end of file diff --git a/inc/lang/ko/revisions.txt b/inc/lang/ko/revisions.txt index 639b36c0094d008a1190f41775c4b949a2ea6121..64733d86daf5e1cfa0f859bd5d15846ead79c349 100644 --- a/inc/lang/ko/revisions.txt +++ b/inc/lang/ko/revisions.txt @@ -1,3 +1,3 @@ -====== ì´ì „ íŒ ====== +====== ì´ì „ ë²„ì „ ====== -ì´ ë¬¸ì„œì˜ ì´ì „ íŒì€ 다ìŒê³¼ 같습니다. ì´ì „ íŒìœ¼ë¡œ ëŒì•„ê°€ë ¤ë©´, 아래ì—ì„œ ì„ íƒí•œ ë‹¤ìŒ **문서 편집**ì„ í´ë¦í•˜ê³ 나서 ì €ìž¥í•˜ì„¸ìš”. \ No newline at end of file +ì´ ë¬¸ì„œì˜ ì´ì „ ë²„ì „ì€ ë‹¤ìŒê³¼ 같습니다. ì´ì „ ë²„ì „ìœ¼ë¡œ ëŒì•„ê°€ë ¤ë©´, 아래ì—ì„œ ì„ íƒí•œ ë‹¤ìŒ **문서 편집**ì„ í´ë¦í•˜ê³ 나서 ì €ìž¥í•˜ì„¸ìš”. \ No newline at end of file diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt index 92faeb01046dc108e56444c47220f17626d38e5e..2e8502b13e1866ffcbe91711063639e9ecfd59d8 100644 --- a/inc/lang/ko/searchpage.txt +++ b/inc/lang/ko/searchpage.txt @@ -1,5 +1,5 @@ ====== 찾기 ====== -아래ì—ì„œ 찾기 결과를 ë³¼ 수 있습니다. ë§Œì¼ ì›í•˜ëŠ” ê²ƒì„ ì°¾ì§€ 못하였다면, **해당 버튼**ì„ ì‚¬ìš©í•˜ì—¬ 쿼리 ë‚´ìš©ê³¼ ê°™ì€ ì´ë¦„ì˜ ë¬¸ì„œë¥¼ 만들거나 íŽ¸ì§‘í• ìˆ˜ 있습니다. +아래ì—ì„œ 찾기 결과를 ë³¼ 수 있습니다. ë§Œì¼ ì›í•˜ëŠ” ê²ƒì„ ì°¾ì§€ 못하였다면, **문서 만들기**나 **문서 편집** ë²„íŠ¼ì„ ì‚¬ìš©í•˜ì—¬ 쿼리 ë‚´ìš©ê³¼ ê°™ì€ ì´ë¦„ì˜ ë¬¸ì„œë¥¼ 만들거나 íŽ¸ì§‘í• ìˆ˜ 있습니다. ===== ê²°ê³¼ ===== \ No newline at end of file diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt index 667d0ce2c67cf0273b5268bbba4b72206045715a..13459428fbabc739bdfae76dcbc0b9f580a14221 100644 --- a/inc/lang/ko/subscr_digest.txt +++ b/inc/lang/ko/subscr_digest.txt @@ -1,8 +1,7 @@ 안녕하세요! @TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. - -ì°¨ì´ì ì€ ë‹¤ìŒê³¼ 같습니다: +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt index a3709cbd4a8cb05cf163f57a2580a7b61cddc226..68adf0de9ed4c9eedce35dc6fa66050b56c60fe5 100644 --- a/inc/lang/ko/subscr_list.txt +++ b/inc/lang/ko/subscr_list.txt @@ -1,8 +1,7 @@ 안녕하세요! @TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. - -ì°¨ì´ì ì€ ë‹¤ìŒê³¼ 같습니다: +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt index 23973ed9936a8d89fecc43e1995e1fabb974bdda..6bd1885e6332b0fed0b56ff65fb3683036018472 100644 --- a/inc/lang/ko/subscr_single.txt +++ b/inc/lang/ko/subscr_single.txt @@ -1,7 +1,7 @@ 안녕하세요! @TITLE@ ìœ„í‚¤ì˜ @PAGE@ 문서가 바뀌었습니다. -ì°¨ì´ì ì€ ë‹¤ìŒê³¼ 같습니다: +ë°”ë€ ì ì€ ë‹¤ìŒê³¼ 같습니다: -------------------------------------------------------- @DIFF@ diff --git a/inc/lang/ko/uploadmail.txt b/inc/lang/ko/uploadmail.txt index 8195c189aa50c9c834441908c8c2e651dec2196f..675c0bd3f646abf7e4bd169e0ea653583410679f 100644 --- a/inc/lang/ko/uploadmail.txt +++ b/inc/lang/ko/uploadmail.txt @@ -1,4 +1,4 @@ -DokuWikiê°€ 파ì¼ì„ ì˜¬ë ¸ìŠµë‹ˆë‹¤. +DokuWikiê°€ 파ì¼ì„ ì˜¬ë ¸ìŠµë‹ˆë‹¤. ìžì„¸í•œ ì •ë³´ëŠ” 다ìŒê³¼ 같습니다: íŒŒì¼ : @MEDIA@ ì´ì „ ë²„ì „ : @OLD@ diff --git a/inc/lang/nl/edit.txt b/inc/lang/nl/edit.txt index e539050bc9aa05bb750c11b4fe38acf5cd3b5f95..9718d09001f5575cb8ccc7d4dbc4e526be0cf681 100644 --- a/inc/lang/nl/edit.txt +++ b/inc/lang/nl/edit.txt @@ -1 +1 @@ -Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. +Pas de pagina aan en klik op ''Opslaan''. Zie [[wiki:syntax]] voor de Wiki-syntax. Pas de pagina allen aan als hij **verbeterd** kan worden. Als je iets wilt uitproberen kun je spelen in de [[playground:playground|zandbak]]. diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 4644f5e5d501d3c669ce2a5dfacf7559828f0333..911ffdc106dd84d945d6257bc719bce072206d8d 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -51,6 +51,7 @@ $lang['btn_backtomedia'] = 'Terug naar Bestandsselectie'; $lang['btn_subscribe'] = 'Inschrijven wijzigingen'; $lang['btn_profile'] = 'Profiel aanpassen'; $lang['btn_reset'] = 'Wissen'; +$lang['btn_resendpwd'] = 'Nieuw wachtwoord bepalen'; $lang['btn_draft'] = 'Bewerk concept'; $lang['btn_recover'] = 'Herstel concept'; $lang['btn_draftdel'] = 'Verwijder concept'; @@ -87,6 +88,7 @@ $lang['profnoempty'] = 'Een lege gebruikersnaam of e-mailadres is niet $lang['profchanged'] = 'Gebruikersprofiel succesvol aangepast'; $lang['pwdforget'] = 'Je wachtwoord vergeten? Vraag een nieuw wachtwoord aan'; $lang['resendna'] = 'Deze wiki ondersteunt het verzenden van wachtwoorden niet'; +$lang['resendpwd'] = 'Nieuw wachtwoord bepalen voor'; $lang['resendpwdmissing'] = 'Sorry, je moet alle velden invullen.'; $lang['resendpwdnouser'] = 'Sorry, we kunnen deze gebruikersnaam niet vinden in onze database.'; $lang['resendpwdbadauth'] = 'Sorry, deze authentiecatiecode is niet geldig. Controleer of je de volledige bevestigings-link hebt gebruikt.'; @@ -99,6 +101,7 @@ $lang['searchmedia_in'] = 'Zoek in %s'; $lang['txt_upload'] = 'Selecteer een bestand om te uploaden'; $lang['txt_filename'] = 'Vul nieuwe naam in (optioneel)'; $lang['txt_overwrt'] = 'Overschrijf bestaand bestand'; +$lang['maxuploadsize'] = 'Max %s per bestand'; $lang['lockedby'] = 'Momenteel in gebruik door'; $lang['lockexpire'] = 'Exclusief gebruiksrecht vervalt op'; $lang['js']['willexpire'] = 'Je exclusieve gebruiksrecht voor het aanpassen van deze pagina verloopt over een minuut.\nKlik op de Voorbeeld-knop om het exclusieve gebruiksrecht te verlengen.'; @@ -193,6 +196,11 @@ $lang['external_edit'] = 'Externe bewerking'; $lang['summary'] = 'Samenvatting wijziging'; $lang['noflash'] = 'De <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> is vereist om de pagina te kunnen weergeven.'; $lang['download'] = 'Download fragment'; +$lang['tools'] = 'Hulpmiddelen'; +$lang['user_tools'] = 'Gebruikershulpmiddelen'; +$lang['site_tools'] = 'Site-hulpmiddelen'; +$lang['page_tools'] = 'Paginahulpmiddelen'; +$lang['skip_to_content'] = 'spring naar tekst'; $lang['mail_newpage'] = 'pagina toegevoegd:'; $lang['mail_changed'] = 'pagina aangepast:'; $lang['mail_subscribe_list'] = 'Pagina\'s veranderd in namespace:'; @@ -200,8 +208,8 @@ $lang['mail_new_user'] = 'nieuwe gebruiker:'; $lang['mail_upload'] = 'bestand geüpload:'; $lang['changes_type'] = 'Bekijk wijzigingen van'; $lang['pages_changes'] = 'Pagina\'s'; -$lang['media_changes'] = 'Media bestanden'; -$lang['both_changes'] = 'Zowel pagina\'s als media bestanden'; +$lang['media_changes'] = 'Mediabestanden'; +$lang['both_changes'] = 'Zowel pagina\'s als mediabestanden'; $lang['qb_bold'] = 'Vette tekst'; $lang['qb_italic'] = 'Cursieve tekst'; $lang['qb_underl'] = 'Onderstreepte tekst'; @@ -244,7 +252,7 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Trefwoorden'; $lang['img_width'] = 'Breedte'; $lang['img_height'] = 'Hoogte'; -$lang['img_manager'] = 'In media beheerder bekijken'; +$lang['img_manager'] = 'In mediabeheerder bekijken'; $lang['subscr_subscribe_success'] = '%s is ingeschreven voor %s'; $lang['subscr_subscribe_error'] = 'Fout bij inschrijven van %s voor %s'; $lang['subscr_subscribe_noaddress'] = 'Er is geen emailadres geassocieerd met uw account, u kunt daardoor niet worden ingeschreven.'; @@ -263,6 +271,7 @@ $lang['subscr_style_digest'] = 'Samenvattings-email met wijzigingen per pagina $lang['subscr_style_list'] = 'Lijst van veranderde pagina\'s sinds laatste email (elke %.2f dagen)'; $lang['authmodfailed'] = 'Ongeldige gebruikersauthenticatie-configuratie. Informeer de wikibeheerder.'; $lang['authtempfail'] = 'Gebruikersauthenticatie is tijdelijk niet beschikbaar. Als deze situatie zich blijft voordoen, informeer dan de wikibeheerder.'; +$lang['authpwdexpire'] = 'Je wachtwoord verloopt in %d dagen, je moet het binnenkort veranderen'; $lang['i_chooselang'] = 'Kies je taal'; $lang['i_installer'] = 'DokuWiki Installer'; $lang['i_wikiname'] = 'Wikinaam'; @@ -304,7 +313,7 @@ $lang['media_list_thumbs'] = 'Miniatuurweergaven'; $lang['media_list_rows'] = 'Regels'; $lang['media_sort_name'] = 'Naam'; $lang['media_sort_date'] = 'Datum'; -$lang['media_namespaces'] = 'Kies naamruimte'; +$lang['media_namespaces'] = 'Kies namespace'; $lang['media_files'] = 'Bestanden in %s'; $lang['media_upload'] = 'Upload naar %s'; $lang['media_search'] = 'Zoeken in %s'; diff --git a/inc/lang/nl/mailwrap.html b/inc/lang/nl/mailwrap.html new file mode 100644 index 0000000000000000000000000000000000000000..2ffe19a88b839c8984ae84b27830249e9c5133a2 --- /dev/null +++ b/inc/lang/nl/mailwrap.html @@ -0,0 +1,13 @@ +<html> + <head> + <title>@TITLE@</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + </head> + <body> + + @HTMLBODY@ + + <br /><hr /> + <small>Deze mail is gegenereerd door DokuWiki op @DOKUWIKIURL@.</small> + </body> + </html> \ No newline at end of file diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 94af441b7b8dffd5ffcce8dfb50300c4b0f3d4bf..4c3d26b1d2c553fb4887a2a6c7bcdf886082d1bf 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -55,6 +55,7 @@ $lang['btn_backtomedia'] = 'ВернутьÑÑ Ðº выбору медиа $lang['btn_subscribe'] = 'ПодпиÑатьÑÑ (вÑе правки)'; $lang['btn_profile'] = 'Профиль'; $lang['btn_reset'] = 'СброÑ'; +$lang['btn_resendpwd'] = 'УÑтановить новый пароль'; $lang['btn_draft'] = 'Править черновик'; $lang['btn_recover'] = 'ВоÑÑтановить черновик'; $lang['btn_draftdel'] = 'Удалить черновик'; @@ -91,6 +92,7 @@ $lang['profnoempty'] = 'Логин и Ð°Ð´Ñ€ÐµÑ Ñлектронно $lang['profchanged'] = 'Профиль Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ ÑƒÑпешно обновлён.'; $lang['pwdforget'] = 'Забыли пароль? Получите новый'; $lang['resendna'] = 'Ð”Ð°Ð½Ð½Ð°Ñ Ð²Ð¸ÐºÐ¸ не поддерживает повторную отправку паролÑ.'; +$lang['resendpwd'] = 'УÑтановить новый пароль длÑ'; $lang['resendpwdmissing'] = 'Ð’Ñ‹ должны заполнить вÑе Ð¿Ð¾Ð»Ñ Ñ„Ð¾Ñ€Ð¼Ñ‹.'; $lang['resendpwdnouser'] = 'Пользователь Ñ Ñ‚Ð°ÐºÐ¸Ð¼ логином не обнаружен в нашей базе данных.'; $lang['resendpwdbadauth'] = 'Извините, неверный код авторизации. УбедитеÑÑŒ, что вы полноÑтью Ñкопировали ÑÑылку. '; @@ -103,6 +105,7 @@ $lang['searchmedia_in'] = 'ПоиÑк в %s'; $lang['txt_upload'] = 'Выберите файл Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸'; $lang['txt_filename'] = 'Введите Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° в вики (необÑзательно)'; $lang['txt_overwrt'] = 'ПерезапиÑать ÑущеÑтвующий файл'; +$lang['maxuploadsize'] = 'МакÑимальный размер загружаемого файла %s'; $lang['lockedby'] = 'Ð’ данный момент заблокирован'; $lang['lockexpire'] = 'Блокировка иÑтекает в'; $lang['js']['willexpire'] = 'Ваша блокировка Ñтой Ñтраницы на редактирование иÑтекает в течении минуты.\nЧтобы предотвратить конфликты иÑпользуйте кнопку "ПроÑмотр" Ð´Ð»Ñ ÑброÑа таймера блокировки.'; @@ -270,6 +273,7 @@ $lang['subscr_style_digest'] = 'Ñводка изменений по кажд $lang['subscr_style_list'] = 'перечиÑлÑÑ‚ÑŒ изменившиеÑÑ Ñтраницы Ñ Ð¿Ñ€Ð¾ÑˆÐ»Ð¾Ð³Ð¾ уведомлениÑ'; $lang['authmodfailed'] = 'ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¸ пользователÑ. ПожалуйÑта, Ñообщите об Ñтом Ñвоему админиÑтратору вики.'; $lang['authtempfail'] = 'ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ временно недоÑтупна. ЕÑли проблема продолжаетÑÑ ÐºÐ°ÐºÐ¾Ðµ-то времÑ, пожалуйÑта, Ñообщите об Ñтом Ñвоему админиÑтратору вики.'; +$lang['authpwdexpire'] = 'ДейÑтвие вашего Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð¸Ñтекает через %d дней. Ð’Ñ‹ должны изменить его как можно Ñкорее'; $lang['i_chooselang'] = 'Выберите Ñвой Ñзык/Choose your language'; $lang['i_installer'] = 'УÑтановка «ДокуВики»'; $lang['i_wikiname'] = 'Ðазвание вики'; diff --git a/inc/lang/ru/resetpwd.txt b/inc/lang/ru/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..81a46a7d35e580f9ea86f2063f885648e90e0a44 --- /dev/null +++ b/inc/lang/ru/resetpwd.txt @@ -0,0 +1,3 @@ +====== УÑтановка нового Ð¿Ð°Ñ€Ð¾Ð»Ñ ====== + +ПожалуйÑта введите новый пароль Ð´Ð»Ñ Ð²Ð°ÑˆÐµÐ¹ учетной запиÑи Ð´Ð»Ñ Ñтой вики. diff --git a/inc/lang/vi/backlinks.txt b/inc/lang/vi/backlinks.txt index 231ab5d8c43ff92ceeb2692e635406c9a93b7d20..eee624d964c5670191843d3fffd982934b45497e 100644 --- a/inc/lang/vi/backlinks.txt +++ b/inc/lang/vi/backlinks.txt @@ -1,3 +1,3 @@ -====== Nối vá» trÆ°á»›c ====== +====== Liên kết đến trang vừa xem ====== -Äây là danh sách các trang hình nhÆ° đã nối và o trang nà y. +Äây là danh sách các trang có liên kết đến trang vừa xem. diff --git a/inc/lang/vi/conflict.txt b/inc/lang/vi/conflict.txt index 0df1ddbe4015290c43577060d5fc8657fa7a1c75..646dcbc4526b06d93f4f18325490cf60ae84c3c6 100644 --- a/inc/lang/vi/conflict.txt +++ b/inc/lang/vi/conflict.txt @@ -2,4 +2,4 @@ Trang bạn Ä‘ang biên soạn có má»™t phiên bản má»›i hÆ¡n. Việc nà y xảy ra khi má»™t bạn đổi trang ấy khi bạn Ä‘ang biên soạn trang nà y. -Xem kỹ những thay đổi dÆ°á»›i đây, rồi quyết định giữ phiên bản nà o. Nếu chá»n ''bảo lÆ°u'', phiên bản của bạn được giữ lại. Bấm ''huá»·'' để giữ phiên bản kia. +Xem kỹ những thay đổi dÆ°á»›i đây, rồi quyết định giữ phiên bản nà o. Nếu chá»n ''LÆ°u'', phiên bản của bạn được giữ lại. Bấm ''huá»·'' để giữ phiên bản kia. diff --git a/inc/lang/vi/denied.txt b/inc/lang/vi/denied.txt index e70ed5d5f79c93a191e45683e056e7f158a91655..35acaeb62a36a6d456067a11bd9bee74c80c6467 100644 --- a/inc/lang/vi/denied.txt +++ b/inc/lang/vi/denied.txt @@ -1,3 +1,3 @@ ====== Không được phép và o ====== -Rất tiếc là bạn không được phép để tiếp tục. Bạn quen đăng nháºp hay sao? +Rất tiếc là bạn không được phép để tiếp tục. Bạn quên đăng nháºp hay sao? diff --git a/inc/lang/vi/edit.txt b/inc/lang/vi/edit.txt index b00316a7cb8a6a28db7af37230b9bdb6a626bd6f..1c16f903c91a1b8d5a59735314f1c94027939404 100644 --- a/inc/lang/vi/edit.txt +++ b/inc/lang/vi/edit.txt @@ -1 +1 @@ -Biên soạn trang nà y và bấm ''Bảo lÆ°u''. Xem [[wiki:syntax]] vá» cú pháp của Wiki. Xin bạn biên soạn trang nà y nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thà nghiệm, bạn có thể táºp những bÆ°á»›c đầu ở [[playground:playground]]. +Biên soạn trang nà y và bấm ''LÆ°u''. Xem [[wiki:syntax:vi|cú pháp của Wiki]] để biết cách soạn thảo. Xin bạn biên soạn trang nà y nếu bạn có thể **cải tiến** nó. Nếu bạn muốn thá» nghiệm, bạn có thể thỠở [[playground:playground| chá»— thá»]]. diff --git a/inc/lang/vi/editrev.txt b/inc/lang/vi/editrev.txt index 076466c0617e9c1a875cda6807bc476341e89c48..8a2031c4dfd67b0cad94f8f37de699beb5ea8a22 100644 --- a/inc/lang/vi/editrev.txt +++ b/inc/lang/vi/editrev.txt @@ -1,2 +1,2 @@ -**Bạn đã nạp má»™t phiên bản cÅ© của văn kiện!** Nếu bảo lÆ°u, bạn sẽ tạo phiên bản vá»›i dữ kiện nà y. +**Bạn đã nạp má»™t phiên bản cÅ© của văn bản!** Nếu lÆ°u nó, bạn sẽ tạo phiên bản má»›i vá»›i dữ kiện nà y. ---- diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 361e51e84cde00bca9b46de33aebbd6e17f82cb5..c9179f6b3fcfcc03356d533a6f750bbab4c74509 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -5,8 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author James Do <jdo@myrealbox.com> */ -$lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; + + + +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '“'; //“ +$lang['doublequoteclosing'] = 'â€'; //” +$lang['singlequoteopening'] = '‘'; //‘ +$lang['singlequoteclosing'] = '’'; //’ +$lang['apostrophe'] = '’'; //’ $lang['btn_edit'] = 'Biên soạn trang nà y'; $lang['btn_source'] = 'Xem mã nguồn'; @@ -16,6 +24,8 @@ $lang['btn_search'] = 'Tìm'; $lang['btn_save'] = 'LÆ°u'; $lang['btn_preview']= 'Duyệt trÆ°á»›c'; $lang['btn_top'] = 'Trở lên trên'; +$lang['btn_newer'] = '<< má»›i hÆ¡n'; +$lang['btn_older'] = 'cÅ© hÆ¡n >>'; $lang['btn_revs'] = 'Các phiên bản cÅ©'; $lang['btn_recent'] = 'Thay đổi gần đây'; $lang['btn_upload'] = 'Tải lên'; @@ -27,41 +37,126 @@ $lang['btn_logout'] = 'Thoát'; $lang['btn_admin'] = 'Quản lý'; $lang['btn_update'] = 'Cáºp nháºt'; $lang['btn_delete'] = 'Xoá'; +$lang['btn_back'] = 'Quay lại'; +$lang['btn_backlink'] = "Liên kết tá»›i đây"; +$lang['btn_profile'] = 'Cáºp nháºt hồ sÆ¡'; +$lang['btn_reset'] = 'Là m lại'; +$lang['btn_resendpwd'] = 'Gá»i máºt khẩu má»›i'; +$lang['btn_draft'] = 'Sá»a bản nháp'; +$lang['btn_recover'] = 'Phục hồi bản nháp'; +$lang['btn_draftdel'] = 'Xóa bản nháp'; +$lang['btn_revert'] = 'Phục hồi'; $lang['btn_register'] = 'Äăng ký'; +$lang['btn_apply'] = 'Chấp nháºn'; +$lang['btn_media'] = 'Quản lý tệp tin'; $lang['loggedinas'] = 'Username Ä‘ang dùng'; $lang['user'] = 'Username'; -$lang['pass'] = 'Password'; +$lang['pass'] = 'Máºt khẩu'; +$lang['newpass'] = 'Máºt khẩu má»›i'; +$lang['oldpass'] = 'Nháºp lại máºt khẩu hiện tại'; +$lang['passchk'] = 'lần nữa'; $lang['remember'] = 'LÆ°u username/password lại'; $lang['fullname'] = 'Há» và tên'; $lang['email'] = 'E-Mail'; +$lang['profile'] = 'Hồ sÆ¡ thà nh viên'; $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'; // full dformat date will be added +$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['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.'; +$lang['regsuccess2'] = 'Thà nh viên vừa được tạo.'; $lang['regmailfail']= 'Không gởi password được. Xin bạn liên hệ vá»›i ngÆ°á»i quản lý.'; $lang['regbadmail'] = 'Email hình nhÆ° không đúng. Xin bạn liên hệ vá»›i ngÆ°á»i quản lý.'; +$lang['regbadpass'] = 'Hai máºt khẩu Ä‘Æ°a ra là không giống nhau, xin vui lòng thá» lại.'; $lang['regpwmail'] = 'Password DokuWiki của bạn là '; -$lang['reghere'] = 'Xin bạn đăng ký username nếu chÆ°a có.'; +$lang['reghere'] = 'Xin bạn đăng ký username nếu chÆ°a có'; + +$lang['profna'] = 'Wiki nà y không há»— trợ sá»a đổi hồ sÆ¡ cá nhân'; +$lang['profnochange'] = 'Không có thay đổi, không có gì để là m.'; +$lang['profnoempty'] = 'Không được để trống tên hoặc địa chỉ email.'; +$lang['profchanged'] = 'Cáºp nháºt hồ sÆ¡ thà nh viên thà nh công.'; +$lang['pwdforget'] = 'Bạn quên máºt khẩu? Tạo lại máºt khẩu má»›i'; +$lang['resendna'] = 'Wiki nà y không há»— trợ gá»i lại máºt khẩu.'; +$lang['resendpwd'] = 'Gá»i máºt khẩu má»›i cho'; +$lang['resendpwdmissing'] = 'Xin lá»—i, bạn phải Ä‘iá»n và o tất cả các trÆ°á»ng.'; +$lang['resendpwdnouser'] = 'Xin lá»—i, chúng tôi không thể tìm thấy thà nh viên nà y trong cÆ¡ sở dữ liệu của chúng tôi.'; +$lang['resendpwdbadauth'] = 'Xin lá»—i, mã nà y xác thá»±c không hợp lệ. Hãy chắc chắn rằng bạn sá» dụng liên kết xác nháºn đầy đủ.'; +$lang['resendpwdconfirm'] = 'Má»™t liên kết xác nháºn đã được gá»i bằng email.'; +$lang['resendpwdsuccess'] = 'Máºt khẩu má»›i của bạn đã được gá»i bằng email.'; + +$lang['license'] = 'Trừ khi có ghi chú khác, ná»™i dung trên wiki nà y được cấp phép theo giấy phép sau đây:'; +$lang['licenseok'] = 'LÆ°u ý: Bằng cách chỉnh sá»a trang nà y, bạn đồng ý cấp giấy phép ná»™i dung của bạn theo giấy phép sau:'; + +$lang['searchmedia'] = 'Tìm tên file:'; +$lang['searchmedia_in'] = 'Tìm ở %s'; $lang['txt_upload'] = 'Chá»n tệp để tải lên'; $lang['txt_filename'] = 'Äiá»n wikiname (tuỳ ý)'; +$lang['txt_overwrt'] = 'Ghi đè file trùng'; $lang['lockedby'] = 'Äang khoá bởi'; -$lang['lockexpire'] = 'Khoá sẽ hết hạn và o lúc'; -$lang['js']['willexpire'] = 'Khoá của bạn để biên soạn trang nà y sẽ hết hạn trong vòng 1 phút.\nÄể tránh xung Ä‘á»™t, bạn nên bấm nút xem trÆ°á»›c để láºp lại thá»i gian khoá'; +$lang['lockexpire'] = 'Sẽ được mở khóa và o lúc'; +$lang['js']['willexpire'] = 'Trong má»™t phút nữa bà i viết sẽ được mở khóa để cho phép ngÆ°á»i khác chỉnh sá»a.\nÄể tránh xung Ä‘á»™t, bạn nên bấm nút Duyệt trÆ°á»›c để láºp lại thá»i gian khoá bà i'; $lang['js']['notsavedyet'] = "Hiện có những thay đổi chÆ°a được bảo lÆ°u, và sẽ mất.\nBạn tháºt sá»± muốn tiếp tục?"; -$lang['rssfailed'] = 'Rút nguồn nà y gặp phải lá»—i'; +$lang['js']['searchmedia'] = 'Tìm kiếm táºp tin'; +$lang['js']['keepopen'] = 'Giữ cá»a sổ Ä‘ang mở trên lá»±a chá»n'; +$lang['js']['hidedetails'] = 'Ẩn thông tin chi tiết'; +$lang['js']['mediatitle'] = 'Thiết láºp liên kết'; +$lang['js']['mediadisplay'] = 'Kiểu liên kết'; +$lang['js']['mediaalign'] = 'Sắp hà ng'; +$lang['js']['mediasize'] = 'Cỡ ảnh'; +$lang['js']['mediatarget'] = 'ÄÃch của liên kết'; +$lang['js']['mediaclose'] = 'Äóng'; +$lang['js']['mediainsert'] = 'Chèn'; +$lang['js']['mediadisplayimg'] = 'Hiển thị ảnh.'; +$lang['js']['mediadisplaylnk'] = 'Chỉ hiển thị liên kết.'; +$lang['js']['mediasmall'] = 'Nhá»'; +$lang['js']['mediamedium'] = 'Vừa'; +$lang['js']['medialarge'] = 'To'; +$lang['js']['mediaoriginal'] = 'KÃch cỡ gốc'; +$lang['js']['medialnk'] = 'Liên kết tá»›i trang chi tiết'; +$lang['js']['mediadirect'] = 'Liên kết trá»±c tiếp tá»›i ảnh gốc'; +$lang['js']['medianolnk'] = 'Không liên kết'; +$lang['js']['medianolink'] = 'Không liên kết tá»›i ảnh'; +$lang['js']['medialeft'] = 'Căn ảnh sang trái.'; +$lang['js']['mediaright'] = 'Căn ảnh sang phải.'; +$lang['js']['mediacenter'] = 'Cản ảnh ra giữa.'; +$lang['js']['medianoalign'] = 'Không căn.'; +$lang['js']['nosmblinks'] = "Nối vá»›i các Windows shares chỉ có hiệu lá»±c vá»›i Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['js']['linkwiz'] = 'Há»™p thoại liên kết'; +$lang['js']['linkto'] = 'Liên kết tá»›i:'; +$lang['js']['del_confirm']= 'Xoá mục nà y?'; +$lang['js']['restore_confirm'] = 'Sẵn sà ng phục hồi phiên bản nà y?'; +$lang['js']['media_diff'] = 'So sánh:'; +$lang['js']['media_select'] = 'Chá»n nhiá»u file…'; +$lang['js']['media_upload_btn'] = 'Tải lên'; +$lang['js']['media_done_btn'] = 'Xong'; +$lang['js']['media_drop'] = 'Kéo các file và o đây để tải lên'; +$lang['js']['media_overwrt'] = 'Ghi đè các file trùng'; + +$lang['rssfailed'] = 'Nguồn nà y gặp phải lá»—i'; $lang['nothingfound']= 'Không tìm được gì'; -$lang['mediaselect'] = 'Chá»n tệp media'; +$lang['mediaselect'] = 'Xem'; $lang['fileupload'] = 'Tải lên tệp media'; $lang['uploadsucc'] = 'Tải lên thà nh công'; -$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ phép?'; +$lang['uploadfail'] = 'Tải lên thất bại. Có thể vì không đủ quyá»n?'; $lang['uploadwrong'] = 'Tải lên bị từ chối. Cấm tải loại tệp nà y'; -$lang['namespaces'] = 'Äá» tà i'; +$lang['uploadexist'] = 'Tệp tin bị trùng. ChÆ°a có gì xảy ra.'; +$lang['namespaces'] = 'ThÆ° mục'; $lang['mediafiles'] = 'Tệp có sẵn ở'; +$lang['accessdenied'] = 'Bạn không được phép xem trang nà y.'; +$lang['mediausage'] = 'Sá» dụng cú pháp sau đây để dẫn đến táºp tin nà y:'; +$lang['mediaview'] = 'Xem tệp gốc'; +$lang['mediaroot'] = 'thÆ° mục gốc'; +$lang['mediaupload'] = 'Tải má»™t táºp tin lên thÆ° mục hiện tại ở đây. Äể tạo thÆ° mục con, thêm nó và o trÆ°á»›c tên táºp tin của bạn, phân cách bằng dấu hai chấm sau khi bạn chá»n các táºp tin. File còn có thể được lá»±a chá»n bằng cách kéo và thả.'; +$lang['mediaextchange'] = 'Phần mở rá»™ng thay đổi từ .%s thà nh .%s!'; +$lang['ref_inuse'] = 'Không thể xóa táºp tin vì nó Ä‘ang được sá» dụng cho các trang sau:'; +$lang['ref_hidden'] = 'Má»™t số tà i liệu sá» dụng cho trang nà y bạn không được cấp phép truy cáºp.'; $lang['hits'] = 'Trùng'; $lang['quickhits'] = 'Trang trùng hợp'; @@ -69,24 +164,36 @@ $lang['toc'] = 'Ná»™i dung'; $lang['current'] = 'hiện tại'; $lang['yours'] = 'Phiên bản hiện tại'; $lang['diff'] = 'cho xem khác biệt vá»›i phiên bản hiện tại'; +$lang['diff2'] = 'Sá»± khác biệt giữa các bản được lá»±a chá»n'; +$lang['difflink'] = 'Liên kết để xem bản so sánh nà y'; +$lang['diff_type'] = 'Xem sá»± khác biệt:'; +$lang['diff_inline'] = 'Ná»™i tuyến'; +$lang['diff_side'] = 'Xếp cạnh nhau'; $lang['line'] = 'Dòng'; $lang['breadcrumb'] = 'Trang đã xem'; +$lang['youarehere'] = 'Bạn Ä‘ang ở đây'; $lang['lastmod'] = 'Thá»i Ä‘iểm thay đổi'; $lang['by'] = 'do'; $lang['deleted'] = 'bị xoá'; $lang['created'] = 'được tạo ra'; $lang['restored'] = 'phiên bản cÅ© đã được khôi phục'; +$lang['external_edit'] = 'external edit'; $lang['summary'] = 'Tóm tắt biên soạn'; +$lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> cần được cà i để có thể xem ná»™i dung nà y.'; $lang['mail_newpage'] = 'Trang được thêm:'; $lang['mail_changed'] = 'Trang thay đổi:'; -$lang['js']['nosmblinks'] = "Nối vá»›i các Windows shares chỉ có hiệu lá»±c vá»›i Microsoft Internet Explorer.\nBạn vẫn có thể sao và chép các mốc nối."; +$lang['changes_type'] = 'Xem thay đổi của'; +$lang['pages_changes'] = 'Trang'; +$lang['media_changes'] = 'Tệp media'; +$lang['both_changes'] = 'Cả trang và các táºp tin media'; $lang['qb_bold'] = 'Chữ Ä‘áºm'; $lang['qb_italic'] = 'Chữ nghiêng'; $lang['qb_underl'] = 'Chữ gạch dÆ°á»›i'; $lang['qb_code'] = 'Chữ mã nguồn'; +$lang['qb_strike'] = 'Strike-through Text'; $lang['qb_h1'] = 'Äầu Ä‘á» cấp 1'; $lang['qb_h2'] = 'Äầu Ä‘á» cấp 2'; $lang['qb_h3'] = 'Äầu Ä‘á» cấp 3'; @@ -100,7 +207,62 @@ $lang['qb_ul'] = 'Äiểm trong danh sách không đánh số'; $lang['qb_media'] = 'Thêm ảnh và tệp khác'; $lang['qb_sig'] = 'Äặt chữ ký'; -$lang['js']['del_confirm']= 'Xoá mục nà y?'; +$lang['metaedit'] = 'Sá»a Metadata'; +$lang['metasaveerr'] = 'Thất bại khi viết metadata'; +$lang['metasaveok'] = 'Metadata đã được lÆ°u'; +$lang['img_backto'] = 'Quay lại'; +$lang['img_title'] = 'Tiêu Ä‘á»'; +$lang['img_caption'] = 'Ghi chú'; +$lang['img_date'] = 'Ngà y'; +$lang['img_fname'] = 'Tên file'; +$lang['img_fsize'] = 'KÃch cỡ'; +$lang['img_artist'] = 'NgÆ°á»i chụp'; +$lang['img_copyr'] = 'Bản quyá»n'; +$lang['img_format'] = 'Äịnh dạng'; +$lang['img_camera'] = 'Camera'; +$lang['img_keywords'] = 'Từ khóa'; +$lang['img_width'] = 'Rá»™ng'; +$lang['img_height'] = 'Cao'; +$lang['img_manager'] = 'Xem trong trình quản lý tệp media'; + +/* installer strings */ +$lang['i_chooselang'] = 'Chá»n ngôn ngữ'; +$lang['i_retry'] = 'Thá» lại'; + +$lang['years'] = 'cách đây %d năm'; +$lang['months'] = 'cách đây %d tháng'; +$lang['weeks'] = 'cách đây %d tuần'; +$lang['days'] = 'cách đây %d ngà y'; +$lang['hours'] = 'cách đây %d giá»'; +$lang['minutes'] = 'cách đây %d phút'; +$lang['seconds'] = 'cách đây %d giây'; + +$lang['wordblock'] = 'Thay đổi của bạn đã không được lÆ°u lại bởi vì nó có chứa văn bản bị chặn (spam).'; + +$lang['media_uploadtab'] = 'Tải lên'; +$lang['media_searchtab'] = 'Tìm'; +$lang['media_file'] = 'Tệp'; +$lang['media_viewtab'] = 'Xem'; +$lang['media_edittab'] = 'Sá»a'; +$lang['media_historytab'] = 'Lịch sá»'; +$lang['media_list_thumbs'] = 'Ảnh thu nhá»'; +$lang['media_list_rows'] = 'Dòng'; +$lang['media_sort_name'] = 'Tên'; +$lang['media_sort_date'] = 'Ngà y'; +$lang['media_namespaces'] = 'Chá»n thÆ° mục'; +$lang['media_files'] = 'Các tệp trong %s'; +$lang['media_upload'] = 'Tải lên %s'; +$lang['media_search'] = 'Tìm ở %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s ở %s'; +$lang['media_edit'] = 'Sá»a %s'; +$lang['media_history'] = 'Lịch sá» của %s'; +$lang['media_meta_edited'] = 'đã sá»a metadata'; +$lang['media_perm_read'] = 'Sorry, bạn không đủ quyá»n truy cáºp.'; +$lang['media_perm_upload'] = 'Xin lá»—i, bạn không đủ quyá»n để upload file lên.'; +$lang['media_update'] = 'Tải lên phiên bản má»›i'; +$lang['media_restore'] = 'Phục hồi phiên bản nà y'; +$lang['plugin_install_err'] = "Plugin không được cà i đặt chÃnh xác.Äổi tên thÆ° mục plugin '%s' thà nh '%s'."; //Setup VIM: ex: et ts=2 : diff --git a/inc/lang/vi/login.txt b/inc/lang/vi/login.txt index 4265a79dfa65a4e09a81a674d230a11af4375d20..71a8b1a01e6a0bc539d2c813af691899dc08e8c5 100644 --- a/inc/lang/vi/login.txt +++ b/inc/lang/vi/login.txt @@ -1,3 +1,3 @@ ====== Äăng nháºp ====== -Hiện bạn chÆ°a đăng nháºp! Äiá»n và o những chi tiết chứng minh ở phÃa dÆ°á»›i. Máy của bạn cần đặt chế Ä‘á»™ nháºn cookies để đăng nháºp. +Hiện bạn chÆ°a đăng nháºp! Hãy khai báo thông tin đăng nháºp và o ô ở phÃa dÆ°á»›i. Máy của bạn cần đặt chế Ä‘á»™ nháºn cookies để đăng nháºp. diff --git a/inc/lang/vi/mailtext.txt b/inc/lang/vi/mailtext.txt index 3fcdf5595ff67863a2981beae57f68f45b9c2a33..836e02d24cfe7d623d51f3805489ebab5c9bc955 100644 --- a/inc/lang/vi/mailtext.txt +++ b/inc/lang/vi/mailtext.txt @@ -12,5 +12,5 @@ User : @USER@ @DIFF@ -- -This mail was generated by DokuWiki at +Äiện thÆ° nà y tạo bởi DokuWiki ở @DOKUWIKIURL@ diff --git a/inc/lang/vi/newpage.txt b/inc/lang/vi/newpage.txt index b03bb522432260ef8bb7228aa1d7018eea292725..93f474b18c8d15b8947fcd78c1f67f9f351fae73 100644 --- a/inc/lang/vi/newpage.txt +++ b/inc/lang/vi/newpage.txt @@ -1,3 +1,3 @@ ====== ChÆ°a có Ä‘á» tà i nà y ====== -Bạn vừa nối và o má»™t Ä‘á» tà i chÆ°a có. Bạn có tạo Ä‘á» tà i nà y bằng cách bấm và o nút ''Tạo trang nà y''. +Bạn kết nối và o má»™t Ä‘á» tà i chÆ°a có. Bạn có tạo Ä‘á» tà i nà y bằng cách bấm và o nút ''Tạo trang nà y'' ở góc trên, bên trái cá»a sổ nà y. Nếu bạn không thấy nút nà y, thay và o đó là nút ''Xem mã nguồn'' chứng tá» bạn không có quyá»n biên táºp trang nà y, hãy đăng nháºp thá» xem bạn có quyá»n biên táºp trang không. Nếu bạn nghÄ© đây là má»™t lá»—i, hãy báo cho ngÆ°á»i quản trị. diff --git a/inc/lang/vi/norev.txt b/inc/lang/vi/norev.txt index 0fa27d8986da17b499d0621df8a01e7d6657f784..224bd1db0eab9811ca6db33e555a7a7d7d912925 100644 --- a/inc/lang/vi/norev.txt +++ b/inc/lang/vi/norev.txt @@ -1,3 +1,3 @@ ====== Phiên bản chÆ°a có ====== -ChÆ°a có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cÅ©'' để xem danh sách các phiên bản của văn kiện nà y. +ChÆ°a có phiên bản được chỉ định. Xin bấm nút ''Phiên bản cÅ©'' để xem danh sách các phiên bản của văn bản nà y. diff --git a/inc/lang/vi/password.txt b/inc/lang/vi/password.txt index 589bbf0677f9044b46da29230140f2098e331038..798a20d3307628e93194d85548938da7920bf67e 100644 --- a/inc/lang/vi/password.txt +++ b/inc/lang/vi/password.txt @@ -6,4 +6,4 @@ Username: @LOGIN@ Password: @PASSWORD@ -- -Äiện thÆ° nà y xuất phát từ DokuWiki tại @DOKUWIKIURL@. +Äiện thÆ° nà y xuất phát từ @DOKUWIKIURL@. diff --git a/inc/lang/vi/preview.txt b/inc/lang/vi/preview.txt index 81069a2c438c4a2c03cfe663c68e1fd24fed2dc1..f02a25142369ab4d3ad1ce8d2d9da4f3c2a989dc 100644 --- a/inc/lang/vi/preview.txt +++ b/inc/lang/vi/preview.txt @@ -1,3 +1,3 @@ ====== Xem trÆ°á»›c ====== -Văn kiện của bạn sẽ thể hiện nhÆ° sau. Nên nhá»›: Văn kiện nà y **chÆ°a được bảo lÆ°u**! +Văn bản của bạn sẽ thể hiện nhÆ° sau. Nên nhá»›: Văn bản nà y **chÆ°a được lÆ°u**! diff --git a/inc/lang/vi/read.txt b/inc/lang/vi/read.txt index ffeffc7bf5b983801100d2d8b55142a608a7e868..eec69966b278a0fc70b8cd4ed7ecf50f8b15fb4e 100644 --- a/inc/lang/vi/read.txt +++ b/inc/lang/vi/read.txt @@ -1 +1 @@ -Trang nà y chỉ được Ä‘á»c thôi. Bạn có thể xem mã nguồn, nhÆ°ng không được thay đổi. Xin bạn há»i ngÆ°á»i quản lý nếu không đúng. +Trang nà y chỉ được Ä‘á»c thôi. Bạn có thể xem mã nguồn, nhÆ°ng không được thay đổi. Hãy báo lại ngÆ°á»i quản lý nếu hệ thống hoạt Ä‘á»™ng không đúng. diff --git a/inc/lang/vi/revisions.txt b/inc/lang/vi/revisions.txt index 943e3fff1804f0b53a64eb2da6ed67ba3fe564ff..b9e9779ee8009b5d4e7d43f75e4937f196da8bc5 100644 --- a/inc/lang/vi/revisions.txt +++ b/inc/lang/vi/revisions.txt @@ -1,3 +1,3 @@ ====== Phiên bản cÅ© ====== -Sau đây là các phiên bản cÅ© của văn kiện nà y. Äể quây vá» má»™t phiên bản cÅ©, chá»n ở phÃa dÆ°á»›i, bấm và o ''Biên soạn trang nà y'' để bảo lÆ°u. +Sau đây là các phiên bản cÅ© của văn bản nà y. Äể quay vá» má»™t phiên bản cÅ©, bạn hãy chá»n nó từ danh sách dÆ°á»›i đây, sau đó bấm và o nút ''Phục hồi'' hoặc nhấp nút ''Biên soạn trang nà y'' và lÆ°u nó lại. diff --git a/inc/lang/vi/searchpage.txt b/inc/lang/vi/searchpage.txt index 821ca9f7b005dc90fae02ce278633015fdd32c7c..7ded7a808c430a9937ccee76c11075b38defd47f 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ả của câu há»i của bạn. Nếu bạn không thấy được những gì bạn Ä‘ang tìm, bạn có thể má»™t trang má»›i, cùng tên câu há»i của bạn, bằng cách bấm và o nút ''Biên soạn trang nà y''. +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. ===== Kết quả ===== diff --git a/inc/load.php b/inc/load.php index 7a410e452d94e3cdef0ca52267549c82c0d48097..b676518e73574dec305b0bc885577843d0a9b059 100644 --- a/inc/load.php +++ b/inc/load.php @@ -62,6 +62,7 @@ function load_autoload($name){ 'Doku_Event' => DOKU_INC.'inc/events.php', 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', + 'Input' => DOKU_INC.'inc/Input.class.php', 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 'FeedParser' => DOKU_INC.'inc/FeedParser.php', diff --git a/inc/media.php b/inc/media.php index 2462a1debfbedd158a3b3943cdb6602b05daaf28..43bbd25603726d8c981d0e44529b7703a2c56b3a 100644 --- a/inc/media.php +++ b/inc/media.php @@ -226,8 +226,9 @@ function media_delete($id,$auth){ */ function media_upload_xhr($ns,$auth){ if(!checkSecurityToken()) return false; + global $INPUT; - $id = $_GET['qqfile']; + $id = $INPUT->get->str('qqfile'); list($ext,$mime,$dl) = mimetype($id); $input = fopen("php://input", "r"); if (!($tmp = io_mktmpdir())) return false; @@ -247,7 +248,7 @@ function media_upload_xhr($ns,$auth){ 'mime' => $mime, 'ext' => $ext), $ns.':'.$id, - (($_REQUEST['ow'] == 'checked') ? true : false), + (($INPUT->get->str('ow') == 'checked') ? true : false), $auth, 'copy' ); @@ -270,9 +271,10 @@ function media_upload_xhr($ns,$auth){ function media_upload($ns,$auth,$file=false){ if(!checkSecurityToken()) return false; global $lang; + global $INPUT; // get file and id - $id = $_POST['mediaid']; + $id = $INPUT->post->str('mediaid'); if (!$file) $file = $_FILES['upload']; if(empty($id)) $id = $file['name']; @@ -294,7 +296,7 @@ function media_upload($ns,$auth,$file=false){ $res = media_save(array('name' => $file['tmp_name'], 'mime' => $imime, 'ext' => $iext), $ns.':'.$id, - $_REQUEST['ow'], $auth, 'move_uploaded_file'); + $INPUT->post->bool('ow'), $auth, 'move_uploaded_file'); if (is_array($res)) { msg($res[0], $res[1]); return false; @@ -641,7 +643,9 @@ function media_tabs_details($image, $selected_tab = ''){ * @author Kate Arzamastseva <pshns@ukr.net> */ function media_tab_files_options(){ - global $lang, $NS; + global $lang; + global $NS; + global $INPUT; $form = new Doku_Form(array('class' => 'options', 'method' => 'get', 'action' => wl($ID))); $media_manager_params = media_managerURL(array(), '', false, true); @@ -649,8 +653,8 @@ function media_tab_files_options(){ $form->addHidden($pKey, $pVal); } $form->addHidden('sectok', null); - if (isset($_REQUEST['q'])) { - $form->addHidden('q', $_REQUEST['q']); + if ($INPUT->has('q')) { + $form->addHidden('q', $INPUT->str('q')); } $form->addElement('<ul>'.NL); foreach(array('list' => array('listType', array('thumbs', 'rows')), @@ -694,9 +698,10 @@ function _media_get_list_type() { } function _media_get_display_param($param, $values) { - if (isset($_REQUEST[$param]) && in_array($_REQUEST[$param], $values)) { + global $INPUT; + if (in_array($INPUT->str($param), $values)) { // FIXME: Set cookie - return $_REQUEST[$param]; + return $INPUT->str($param); } else { $val = get_doku_pref($param, $values['default']); if (!in_array($val, $values)) { @@ -746,10 +751,10 @@ function media_tab_upload($ns,$auth=null,$jump='') { */ function media_tab_search($ns,$auth=null) { global $lang; + global $INPUT; - $do = $_REQUEST['mediado']; - $query = $_REQUEST['q']; - if (!$query) $query = ''; + $do = $INPUT->str('mediado'); + $query = $INPUT->str('q'); echo '<div class="search">'.NL; media_searchform($ns, $query, true); @@ -801,14 +806,16 @@ function media_tab_edit($image, $ns, $auth=null) { */ function media_tab_history($image, $ns, $auth=null) { global $lang; + global $INPUT; + if(is_null($auth)) $auth = auth_quickaclcheck("$ns:*"); - $do = $_REQUEST['mediado']; + $do = $INPUT->str('mediado'); if ($auth >= AUTH_READ && $image) { if ($do == 'diff'){ media_diff($image, $ns, $auth); } else { - $first = isset($_REQUEST['first']) ? intval($_REQUEST['first']) : 0; + $first = $INPUT->int('first'); html_revisions($first, $image); } } else { @@ -1002,21 +1009,23 @@ function media_details($image, $auth, $rev=false, $meta=false) { function media_diff($image, $ns, $auth, $fromajax = false) { global $lang; global $conf; + global $INPUT; if ($auth < AUTH_READ || !$image || !$conf['mediarevisions']) return ''; - $rev1 = (int) $_REQUEST['rev']; + $rev1 = $INPUT->int('rev'); - if(is_array($_REQUEST['rev2'])){ - $rev1 = (int) $_REQUEST['rev2'][0]; - $rev2 = (int) $_REQUEST['rev2'][1]; + $rev2 = $INPUT->ref('rev2'); + if(is_array($rev2)){ + $rev1 = (int) $rev2[0]; + $rev2 = (int) $rev2[1]; if(!$rev1){ $rev1 = $rev2; unset($rev2); } }else{ - $rev2 = (int) $_REQUEST['rev2']; + $rev2 = $INPUT->int('rev2'); } if ($rev1 && !file_exists(mediaFN($image, $rev1))) $rev1 = false; @@ -1071,7 +1080,9 @@ function _media_file_diff($data) { * @author Kate Arzamastseva <pshns@ukr.net> */ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){ - global $lang, $config_cascade; + global $lang; + global $config_cascade; + global $INPUT; $l_meta = new JpegMeta(mediaFN($image, $l_rev)); $r_meta = new JpegMeta(mediaFN($image, $r_rev)); @@ -1082,7 +1093,7 @@ function media_file_diff($image, $l_rev, $r_rev, $ns, $auth, $fromajax){ $r_size = media_image_preview_size($image, $r_rev, $r_meta); $is_img = ($l_size && $r_size && ($l_size[0] >= 30 || $r_size[0] >= 30)); - $difftype = $_REQUEST['difftype']; + $difftype = $INPUT->str('difftype'); if (!$fromajax) { $form = new Doku_Form(array( @@ -1442,7 +1453,7 @@ function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false $size .= (int) $item['meta']->getField('File.Height'); echo '<dd class="size">'.$size.'</dd>'.NL; } else { - echo '<dd class="size"> </dd>'.NL; + echo '<dd class="size"> </dd>'.NL; } $date = dformat($item['mtime']); echo '<dd class="date">'.$date.'</dd>'.NL; @@ -1527,11 +1538,12 @@ function media_printimgdetail($item, $fullscreen=false){ function media_managerURL($params=false, $amp='&', $abs=false, $params_array=false) { global $conf; global $ID; + global $INPUT; $gets = array('do' => 'media'); $media_manager_params = array('tab_files', 'tab_details', 'image', 'ns', 'list', 'sort'); foreach ($media_manager_params as $x) { - if (isset($_REQUEST[$x])) $gets[$x] = $_REQUEST[$x]; + if ($INPUT->has($x)) $gets[$x] = $INPUT->str($x); } if ($params) { @@ -1555,7 +1567,9 @@ function media_managerURL($params=false, $amp='&', $abs=false, $params_array * @author Kate Arzamastseva <pshns@ukr.net> */ function media_uploadform($ns, $auth, $fullscreen = false){ - global $lang, $conf; + global $lang; + global $conf; + global $INPUT; if($auth < AUTH_UPLOAD) { echo '<div class="nothing">'.$lang['media_perm_upload'].'</div>'.NL; @@ -1565,9 +1579,9 @@ function media_uploadform($ns, $auth, $fullscreen = false){ $update = false; $id = ''; - if ($auth >= $auth_ow && $fullscreen && $_REQUEST['mediado'] == 'update') { + if ($auth >= $auth_ow && $fullscreen && $INPUT->str('mediado') == 'update') { $update = true; - $id = cleanID($_REQUEST['image']); + $id = cleanID($INPUT->str('image')); } // The default HTML upload form @@ -1697,12 +1711,13 @@ function media_nstree($ns){ * @author Andreas Gohr <andi@splitbrain.org> */ function media_nstree_item($item){ + global $INPUT; $pos = strrpos($item['id'], ':'); $label = substr($item['id'], $pos > 0 ? $pos + 1 : 0); if(!$item['label']) $item['label'] = $label; $ret = ''; - if (!($_REQUEST['do'] == 'media')) + if (!($INPUT->str('do') == 'media')) $ret .= '<a href="'.DOKU_BASE.'lib/exe/mediamanager.php?ns='.idfilter($item['id']).'" class="idx_dir">'; else $ret .= '<a href="'.media_managerURL(array('ns' => idfilter($item['id'], false), 'tab_files' => 'files')) .'" class="idx_dir">'; @@ -1723,7 +1738,7 @@ function media_nstree_li($item){ if($item['open']){ $class .= ' open'; $img = DOKU_BASE.'lib/images/minus.gif'; - $alt = '−'; + $alt = '−'; }else{ $class .= ' closed'; $img = DOKU_BASE.'lib/images/plus.gif'; diff --git a/inc/pageutils.php b/inc/pageutils.php index c94d14624857c7d0fe3166fbc43640b4ad01e22a..5e741c491b42b50c76b2b123697e9305d8ef27d8 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -19,9 +19,10 @@ * @author Andreas Gohr <andi@splitbrain.org> */ function getID($param='id',$clean=true){ + global $INPUT; global $conf; - $id = isset($_REQUEST[$param]) ? $_REQUEST[$param] : null; + $id = $INPUT->str($param); //construct page id from request URI if(empty($id) && $conf['userewrite'] == 2){ @@ -622,3 +623,27 @@ function utf8_decodeFN($file){ return urldecode($file); } +/** + * Find a page in the current namespace (determined from $ID) or any + * higher namespace + * + * 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 + */ +function page_findnearest($page){ + global $ID; + + $ns = $ID; + do { + $ns = getNS($ns); + $pageid = ltrim("$ns:$page",':'); + if(page_exists($pageid)){ + return $pageid; + } + } while($ns); + + return false; +} diff --git a/inc/parser/code.php b/inc/parser/code.php index 4d94dcf4ec4e36b1d9d1abcac8f2963a569f429a..ff44a4e1ed060e38eb7afb4d49f0befab3097afb 100644 --- a/inc/parser/code.php +++ b/inc/parser/code.php @@ -16,11 +16,12 @@ class Doku_Renderer_code extends Doku_Renderer { * When the correct block was found it exits the script. */ function code($text, $language = NULL, $filename='' ) { + global $INPUT; if(!$language) $language = 'txt'; if(!$filename) $filename = 'snippet.'.$language; $filename = basename($filename); - if($this->_codeblock == $_REQUEST['codeblock']){ + if($this->_codeblock == $INPUT->str('codeblock')){ header("Content-Type: text/plain; charset=utf-8"); header("Content-Disposition: attachment; filename=$filename"); header("X-Robots-Tag: noindex"); diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 4345b494fb3a6fa091ea5976778b32c314dab6dc..2f09dbd4f977eb01a0eb835afff8854e66c42652 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -109,7 +109,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // open the footnote and set the anchor and backlink $this->doc .= '<div class="fn">'; - $this->doc .= '<sup><a href="#fnt__'.$id.'" id="fn__'.$id.'" name="fn__'.$id.'" class="fn_bot">'; + $this->doc .= '<sup><a href="#fnt__'.$id.'" id="fn__'.$id.'" class="fn_bot">'; $this->doc .= $id.')</a></sup> '.DOKU_LF; // get any other footnotes that use the same markup @@ -118,7 +118,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if (count($alt)) { foreach ($alt as $ref) { // set anchor and backlink for the other footnotes - $this->doc .= ', <sup><a href="#fnt__'.($ref+1).'" id="fn__'.($ref+1).'" name="fn__'.($ref+1).'" class="fn_bot">'; + $this->doc .= ', <sup><a href="#fnt__'.($ref+1).'" id="fn__'.($ref+1).'" class="fn_bot">'; $this->doc .= ($ref+1).')</a></sup> '.DOKU_LF; } } @@ -181,9 +181,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if ($level <= $conf['maxseclevel']) { $this->doc .= ' class="' . $this->startSectionEdit($pos, 'section', $text) . '"'; } - $this->doc .= '><a name="'.$hid.'" id="'.$hid.'">'; + $this->doc .= ' id="'.$hid.'">'; $this->doc .= $this->_xmlEntities($text); - $this->doc .= "</a></h$level>".DOKU_LF; + $this->doc .= "</h$level>".DOKU_LF; } function section_open($level) { @@ -316,7 +316,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // output the footnote reference and link - $this->doc .= '<sup><a href="#fn__'.$id.'" name="fnt__'.$id.'" id="fnt__'.$id.'" class="fn_top">'.$id.')</a></sup>'; + $this->doc .= '<sup><a href="#fn__'.$id.'" id="fnt__'.$id.'" class="fn_top">'.$id.')</a></sup>'; } function listu_open() { @@ -471,8 +471,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $title = $this->_xmlEntities($this->acronyms[$acronym]); - $this->doc .= '<acronym title="'.$title - .'">'.$this->_xmlEntities($acronym).'</acronym>'; + $this->doc .= '<abbr title="'.$title + .'">'.$this->_xmlEntities($acronym).'</abbr>'; } else { $this->doc .= $this->_xmlEntities($acronym); @@ -483,7 +483,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if ( array_key_exists($smiley, $this->smileys) ) { $title = $this->_xmlEntities($this->smileys[$smiley]); $this->doc .= '<img src="'.DOKU_BASE.'lib/images/smileys/'.$this->smileys[$smiley]. - '" class="middle" alt="'. + '" class="icon" alt="'. $this->_xmlEntities($smiley).'" />'; } else { $this->doc .= $this->_xmlEntities($smiley); @@ -549,7 +549,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $ID; $name = $this->_getLinkTitle($name, $hash, $isImage); $hash = $this->_headerToLink($hash); - $title = $ID.' ↵'; + $title = $ID.' ↵'; $this->doc .= '<a href="#'.$hash.'" title="'.$title.'" class="wikilink1">'; $this->doc .= $name; $this->doc .= '</a>'; @@ -1075,10 +1075,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret .= '<img src="'.ml($src,array('w'=>$width,'h'=>$height,'cache'=>$cache)).'"'; $ret .= ' class="media'.$align.'"'; - // make left/right alignment for no-CSS view work (feeds) - if($align == 'right') $ret .= ' align="right"'; - if($align == 'left') $ret .= ' align="left"'; - if ($title) { $ret .= ' title="' . $title . '"'; $ret .= ' alt="' . $title .'"'; diff --git a/inc/parserutils.php b/inc/parserutils.php index 9384929bfb7fad133e396e6bbfde1f9c79b7ed61..25d7cf131d727835b147c54a7611f04812ef6771 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -739,7 +739,7 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){ * @author Andreas Gohr <andi@splitbrain.org> */ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { - global $conf, $config_cascade; + global $conf, $config_cascade, $INPUT; $language = strtolower($language); // remove any leading or trailing blank lines @@ -747,7 +747,7 @@ function p_xhtml_cached_geshi($code, $language, $wrapper='pre') { $cache = getCacheName($language.$code,".code"); $ctime = @filemtime($cache); - if($ctime && !$_REQUEST['purge'] && + if($ctime && !$INPUT->bool('purge') && $ctime > filemtime(DOKU_INC.'inc/geshi.php') && // geshi changed $ctime > @filemtime(DOKU_INC.'inc/geshi/'.$language.'.php') && // language syntax definition changed $ctime > filemtime(reset($config_cascade['main']['default']))){ // dokuwiki changed diff --git a/inc/template.php b/inc/template.php index d007f47efa5f4fbd90da15d80a52676603dd5564..76d4d4bbe3e836a0f375dbc763a62e7574e38d20 100644 --- a/inc/template.php +++ b/inc/template.php @@ -354,12 +354,8 @@ function tpl_metaheaders($alt=true){ } // load stylesheets - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'screen', 'type'=>'text/css', + $head['link'][] = array('rel'=>'stylesheet', 'type'=>'text/css', 'href'=>DOKU_BASE.'lib/exe/css.php?t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'all', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=all&t='.$conf['template'].'&tseed='.$tseed); - $head['link'][] = array('rel'=>'stylesheet', 'media'=>'print', 'type'=>'text/css', - 'href'=>DOKU_BASE.'lib/exe/css.php?s=print&t='.$conf['template'].'&tseed='.$tseed); // make $INFO and other vars available to JavaScripts $json = new JSON(); @@ -596,7 +592,7 @@ function tpl_get_action($type) { $accesskey = 'x'; break; case 'top': - $accesskey = 'x'; + $accesskey = 't'; $params = array(); $id = '#dokuwiki__top'; break; @@ -718,7 +714,7 @@ function tpl_searchform($ajax=true,$autocomplete=true){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function tpl_breadcrumbs($sep='•'){ +function tpl_breadcrumbs($sep='•'){ global $lang; global $conf; @@ -761,7 +757,7 @@ function tpl_breadcrumbs($sep='•'){ * @author <fredrik@averpil.com> * @todo May behave strangely in RTL languages */ -function tpl_youarehere($sep=' » '){ +function tpl_youarehere($sep=' » '){ global $conf; global $ID; global $lang; @@ -847,7 +843,7 @@ function tpl_pageinfo($ret=false){ if($INFO['exists']){ $out = ''; $out .= $fn; - $out .= ' · '; + $out .= ' · '; $out .= $lang['lastmod']; $out .= ': '; $out .= $date; @@ -858,7 +854,7 @@ function tpl_pageinfo($ret=false){ $out .= ' ('.$lang['external_edit'].')'; } if($INFO['locked']){ - $out .= ' · '; + $out .= ' · '; $out .= $lang['lockedby']; $out .= ': '; $out .= editorinfo($INFO['locked']); @@ -1398,6 +1394,18 @@ function tpl_include_page($pageid,$print=true){ if(!$print) return $html; echo $html; + return $html; +} + +/** + * Include the sidebar, will check current namespaces first + */ +function tpl_sidebar($print=true){ + global $conf; + + $sidebar = page_findnearest($conf['sidebar']); + if($sidebar) return tpl_include_page($sidebar, $print); + return ''; } /** diff --git a/inc/utf8.php b/inc/utf8.php index 54986e14e160348214f1ca98775ad3e084121a34..7b7c19c6b3be3d157b1b641262db0ab36ccd2045 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -103,9 +103,9 @@ if(!function_exists('utf8_substr')){ * * @author Harry Fuecks <hfuecks@gmail.com> * @author Chris Smith <chris@jalakai.co.uk> - * @param string - * @param integer number of UTF-8 characters offset (from left) - * @param integer (optional) length in UTF-8 characters from offset + * @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 */ function utf8_substr($str, $offset, $length = null) { @@ -221,6 +221,8 @@ if(!function_exists('utf8_ltrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see ltrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_ltrim($str,$charlist=''){ @@ -239,6 +241,8 @@ if(!function_exists('utf8_rtrim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see rtrim() + * @param string $str + * @param string $charlist * @return string */ function utf8_rtrim($str,$charlist=''){ @@ -257,6 +261,8 @@ if(!function_exists('utf8_trim')){ * * @author Andreas Gohr <andi@splitbrain.org> * @see trim() + * @param string $str + * @param string $charlist * @return string */ function utf8_trim($str,$charlist='') { @@ -348,7 +354,7 @@ if(!function_exists('utf8_ucwords')){ * You don't need to call this yourself * * @author Harry Fuecks - * @param array of matches corresponding to a single word + * @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 @@ -408,9 +414,9 @@ if(!function_exists('utf8_stripspecials')){ * @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) + * @return string */ function utf8_stripspecials($string,$repl='',$additional=''){ - global $UTF8_SPECIAL_CHARS; global $UTF8_SPECIAL_CHARS2; static $specials = null; @@ -493,7 +499,7 @@ if(!function_exists('utf8_unhtml')){ * @author Tom N Harris <tnharris@whoopdedo.org> * @param string $str UTF-8 encoded string * @param boolean $entities Flag controlling decoding of named entities. - * @return UTF-8 encoded string with numeric (and named) entities replaced. + * @return string UTF-8 encoded string with numeric (and named) entities replaced. */ function utf8_unhtml($str, $entities=null) { static $decoder = null; @@ -509,6 +515,12 @@ if(!function_exists('utf8_unhtml')){ } if(!function_exists('utf8_decode_numeric')){ + /** + * Decodes numeric HTML entities to their correct UTF-8 characters + * + * @param $ent string A numeric entity + * @return string + */ function utf8_decode_numeric($ent) { switch ($ent[2]) { case 'X': @@ -524,16 +536,37 @@ if(!function_exists('utf8_decode_numeric')){ } if(!class_exists('utf8_entity_decoder')){ + /** + * Encapsulate HTML entity decoding tables + */ class utf8_entity_decoder { var $table; + + /** + * Initializes the decoding tables + */ function __construct() { $table = get_html_translation_table(HTML_ENTITIES); $table = array_flip($table); $this->table = array_map(array(&$this,'makeutf8'), $table); } + + /** + * Wrapper aorund unicode_to_utf8() + * + * @param $c string + * @return mixed + */ function makeutf8($c) { return unicode_to_utf8(array(ord($c))); } + + /** + * Decodes any HTML entity to it's correct UTF-8 char equivalent + * + * @param $ent string An entity + * @return string + */ function decode($ent) { if ($ent[1] == '#') { return utf8_decode_numeric($ent); @@ -562,8 +595,8 @@ if(!function_exists('utf8_to_unicode')){ * * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> - * @param string UTF-8 encoded string - * @param boolean Check for invalid sequences? + * @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/ @@ -735,8 +768,8 @@ if(!function_exists('unicode_to_utf8')){ * output buffering to concatenate the UTF-8 string (faster) as well as * reference the array by it's keys * - * @param array of unicode code points representing a string - * @param boolean Check for invalid sequences? + * @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 * @author <hsivonen@iki.fi> * @author Harry Fuecks <hfuecks@gmail.com> @@ -855,8 +888,8 @@ 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 to search - * @param string to replace bad bytes with (defaults to '?') - use ASCII + * @param string $str to search + * @param string $replace to replace bad bytes with (defaults to '?') - use ASCII * @return string */ function utf8_bad_replace($str, $replace = '') { @@ -1000,7 +1033,7 @@ if(!UTF8_MBSTRING){ /** * UTF-8 Case lookup table * - * This lookuptable defines the lower case letters to their correspponding + * This lookuptable defines the lower case letters to their corresponding * upper case letter in UTF-8 * * @author Andreas Gohr <andi@splitbrain.org> diff --git a/install.php b/install.php index bd43c6f994d936c125f78b784df987e885640a11..3d9fddbb242067fe5b6c07646f9b2fde3b38fe5c 100644 --- a/install.php +++ b/install.php @@ -9,6 +9,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/'); if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/'); if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/'); +require_once(DOKU_INC.'inc/PassHash.class.php'); + // check for error reporting override or set error reporting to sane values if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); } else { error_reporting(DOKU_E_LEVEL); } @@ -27,8 +29,10 @@ if (get_magic_quotes_gpc() && !defined('MAGIC_QUOTES_STRIPPED')) { // language strings require_once(DOKU_INC.'inc/lang/en/lang.php'); -$LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']); -if(!$LC) $LC = 'en'; +if(isset($_REQUEST['l']) && !is_array($_REQUEST['l'])) { + $LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']); +} +if(empty($LC)) $LC = 'en'; if($LC && $LC != 'en' ) { require_once(DOKU_INC.'inc/lang/'.$LC.'/lang.php'); } @@ -50,10 +54,10 @@ $dokuwiki_hash = array( '2011-05-25' => '4241865472edb6fa14a1227721008072', '2011-11-10' => 'b46ff19a7587966ac4df61cbab1b8b31', '2012-01-25' => '72c083c73608fc43c586901fd5dabb74', + 'devel' => 'eb0b3fc90056fbc12bac6f49f7764df3' ); - // begin output header('Content-Type: text/html; charset=utf-8'); ?> @@ -74,7 +78,7 @@ header('Content-Type: text/html; charset=utf-8'); select.text, input.text { width: 30em; margin: 0 0.5em; } a {text-decoration: none} </style> - <script type="text/javascript" language="javascript"> + <script type="text/javascript"> function acltoggle(){ var cb = document.getElementById('acl'); var fs = document.getElementById('acldep'); @@ -128,17 +132,16 @@ header('Content-Type: text/html; charset=utf-8'); }elseif(!check_configs()){ echo '<p>'.$lang['i_modified'].'</p>'; print_errors(); - }elseif($_REQUEST['submit']){ - if(!check_data($_REQUEST['d'])){ - print_errors(); - print_form($_REQUEST['d']); - }elseif(!store_data($_REQUEST['d'])){ + }elseif(check_data($_REQUEST['d'])){ + // check_data has sanitized all input parameters + if(!store_data($_REQUEST['d'])){ echo '<p>'.$lang['i_failure'].'</p>'; print_errors(); }else{ echo '<p>'.$lang['i_success'].'</p>'; } }else{ + print_errors(); print_form($_REQUEST['d']); } ?> @@ -210,7 +213,7 @@ function print_form($d){ <p><?php echo $lang['i_license']?></p> <?php array_unshift($license,array('name' => 'None', 'url'=>'')); - if(!isset($d['license'])) $d['license'] = 'cc-by-sa'; + if(empty($d['license'])) $d['license'] = 'cc-by-sa'; foreach($license as $key => $lic){ echo '<label for="lic_'.$key.'">'; echo '<input type="radio" name="d[license]" value="'.htmlspecialchars($key).'" id="lic_'.$key.'"'. @@ -249,41 +252,65 @@ function print_retry() { * @author Andreas Gohr */ function check_data(&$d){ + static $form_default = array( + 'title' => '', + 'acl' => '1', + 'superuser' => '', + 'fullname' => '', + 'email' => '', + 'password' => '', + 'confirm' => '', + 'policy' => '0', + 'license' => 'cc-by-sa' + ); global $lang; global $error; + if(!is_array($d)) $d = array(); + foreach($d as $k => $v) { + if(is_array($v)) + unset($d[$k]); + else + $d[$k] = (string)$v; + } + //autolowercase the username - $d['superuser'] = strtolower($d['superuser']); + $d['superuser'] = isset($d['superuser']) ? strtolower($d['superuser']) : ""; - $ok = true; + $ok = false; - // check input - if(empty($d['title'])){ - $error[] = sprintf($lang['i_badval'],$lang['i_wikiname']); - $ok = false; - } - if($d['acl']){ - if(!preg_match('/^[a-z0-9_]+$/',$d['superuser'])){ - $error[] = sprintf($lang['i_badval'],$lang['i_superuser']); - $ok = false; - } - if(empty($d['password'])){ - $error[] = sprintf($lang['i_badval'],$lang['pass']); - $ok = false; - } - if($d['confirm'] != $d['password']){ - $error[] = sprintf($lang['i_badval'],$lang['passchk']); - $ok = false; - } - if(empty($d['fullname']) || strstr($d['fullname'],':')){ - $error[] = sprintf($lang['i_badval'],$lang['fullname']); + if(isset($_REQUEST['submit'])) { + $ok = true; + + // check input + if(empty($d['title'])){ + $error[] = sprintf($lang['i_badval'],$lang['i_wikiname']); $ok = false; } - if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){ - $error[] = sprintf($lang['i_badval'],$lang['email']); - $ok = false; + if(isset($d['acl'])){ + if(!preg_match('/^[a-z0-9_]+$/',$d['superuser'])){ + $error[] = sprintf($lang['i_badval'],$lang['i_superuser']); + $ok = false; + } + if(empty($d['password'])){ + $error[] = sprintf($lang['i_badval'],$lang['pass']); + $ok = false; + } + elseif(!isset($d['confirm']) || $d['confirm'] != $d['password']){ + $error[] = sprintf($lang['i_badval'],$lang['passchk']); + $ok = false; + } + if(empty($d['fullname']) || strstr($d['fullname'],':')){ + $error[] = sprintf($lang['i_badval'],$lang['fullname']); + $ok = false; + } + if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){ + $error[] = sprintf($lang['i_badval'],$lang['email']); + $ok = false; + } } } + $d = array_merge($form_default, $d); return $ok; } @@ -318,9 +345,13 @@ EOT; $ok = $ok && fileWrite(DOKU_LOCAL.'local.php',$output); if ($d['acl']) { + // hash the password + $phash = new PassHash(); + $pass = $phash->hash_smd5($d['password']); + // create users.auth.php - // --- user:MD5password:Real Name:email:groups,comma,seperated - $output = join(":",array($d['superuser'], md5($d['password']), $d['fullname'], $d['email'], 'admin,user')); + // --- user:SMD5password:Real Name:email:groups,comma,seperated + $output = join(":",array($d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,user')); $output = @file_get_contents(DOKU_CONF.'users.auth.php.dist')."\n$output\n"; $ok = $ok && fileWrite(DOKU_LOCAL.'users.auth.php', $output); @@ -524,11 +555,13 @@ function langsel(){ */ function print_errors(){ global $error; - echo '<ul>'; - foreach ($error as $err){ - echo "<li>$err</li>"; + if(!empty($error)) { + echo '<ul>'; + foreach ($error as $err){ + echo "<li>$err</li>"; + } + echo '</ul>'; } - echo '</ul>'; } /** diff --git a/lib/exe/css.php b/lib/exe/css.php index 69b512205e3e5090f0a6ba73d9b9a1746d73c9a8..8de3db11bc79c8c69e29d337a7395e0cc08e9a02 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -9,6 +9,7 @@ if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT',1); // we gzip ourself here +if(!defined('NL')) define('NL',"\n"); require_once(DOKU_INC.'inc/init.php'); // Main (don't run when UNIT test) @@ -29,14 +30,17 @@ function css_out(){ global $conf; global $lang; global $config_cascade; - - $mediatype = 'screen'; - if (isset($_REQUEST['s']) && - in_array($_REQUEST['s'], array('all', 'print', 'feed'))) { - $mediatype = $_REQUEST['s']; + global $INPUT; + + if ($INPUT->str('s') == 'feed') { + $mediatypes = array('feed'); + $type = 'feed'; + } else { + $mediatypes = array('screen', 'all', 'print'); + $type = ''; } - $tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['t'])); + $tpl = trim(preg_replace('/[^\w-]+/','',$INPUT->str('t'))); if($tpl){ $tplinc = DOKU_INC.'lib/tpl/'.$tpl.'/'; $tpldir = DOKU_BASE.'lib/tpl/'.$tpl.'/'; @@ -46,7 +50,7 @@ function css_out(){ } // The generated script depends on some dynamic options - $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$mediatype,'.css'); + $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$type,'.css'); // load template styles $tplstyles = array(); @@ -57,57 +61,79 @@ function css_out(){ } } - // Array of needed files and their web locations, the latter ones - // are needed to fix relative paths in the stylesheets - $files = array(); - // load core styles - $files[DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; - // load jQuery-UI theme - $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; - // load plugin styles - $files = array_merge($files, css_pluginstyles($mediatype)); - // load template styles - if (isset($tplstyles[$mediatype])) { - $files = array_merge($files, $tplstyles[$mediatype]); - } - // 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']; - } - // load user styles - if(isset($config_cascade['userstyle'][$mediatype])){ - $files[$config_cascade['userstyle'][$mediatype]] = DOKU_BASE; - } - // load rtl styles - // @todo: this currently adds the rtl styles only to the 'screen' media type - // but 'print' and 'all' should also be supported - if ($mediatype=='screen') { - if($lang['direction'] == 'rtl'){ - if (isset($tplstyles['rtl'])) $files = array_merge($files, $tplstyles['rtl']); + // start output buffering + ob_start(); + + foreach($mediatypes as $mediatype) { + // Array of needed files and their web locations, the latter ones + // are needed to fix relative paths in the stylesheets + $files = array(); + // load core styles + $files[DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; + // load jQuery-UI theme + if ($mediatype == 'screen') { + $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; + } + // load plugin styles + $files = array_merge($files, css_pluginstyles($mediatype)); + // load template styles + if (isset($tplstyles[$mediatype])) { + $files = array_merge($files, $tplstyles[$mediatype]); + } + // 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']; + } + // load user styles + if(isset($config_cascade['userstyle'][$mediatype])){ + $files[$config_cascade['userstyle'][$mediatype]] = DOKU_BASE; + } + // load rtl styles + // note: this adds the rtl styles only to the 'screen' media type + // @deprecated 2012-04-09: rtl will cease to be a mode of its own, + // please use "[dir=rtl]" in any css file in all, screen or print mode instead + if ($mediatype=='screen') { + if($lang['direction'] == 'rtl'){ + if (isset($tplstyles['rtl'])) $files = array_merge($files, $tplstyles['rtl']); + } } - } - $cache_files = array_merge(array_keys($files), getConfigFiles('main')); - $cache_files[] = $tplinc.'style.ini'; - $cache_files[] = __FILE__; + $cache_files = array_merge(array_keys($files), getConfigFiles('main')); + $cache_files[] = $tplinc.'style.ini'; + $cache_files[] = __FILE__; - // check cache age & handle conditional request - // This may exit if a cache can be used - http_cached($cache->cache, - $cache->useCache(array('files' => $cache_files))); + // check cache age & handle conditional request + // This may exit if a cache can be used + http_cached($cache->cache, + $cache->useCache(array('files' => $cache_files))); - // start output buffering and build the stylesheet - ob_start(); + // build the stylesheet - // print the default classes for interwiki links and file downloads - css_interwiki(); - css_filetypes(); + // print the default classes for interwiki links and file downloads + if ($mediatype == 'screen') { + css_interwiki(); + css_filetypes(); + } - // load files - foreach($files as $file => $location){ - print css_loadfile($file, $location); + // load files + $css_content = ''; + foreach($files as $file => $location){ + $css_content .= css_loadfile($file, $location); + } + switch ($mediatype) { + case 'screen': + print NL.'@media screen { /* START screen styles */'.NL.$css_content.NL.'} /* /@media END screen styles */'.NL; + break; + case 'print': + print NL.'@media print { /* START print styles */'.NL.$css_content.NL.'} /* /@media END print styles */'.NL; + break; + case 'all': + case 'feed': + default: + print NL.'/* START rest styles */ '.NL.$css_content.NL.'/* END rest styles */'.NL; + break; + } } - // end output buffering and get contents $css = ob_get_contents(); ob_end_clean(); @@ -275,6 +301,8 @@ function css_pluginstyles($mediatype='screen'){ if ($mediatype=='screen') { $list[DOKU_PLUGIN."$p/style.css"] = DOKU_BASE."lib/plugins/$p/"; } + // @deprecated 2012-04-09: rtl will cease to be a mode of its own, + // please use "[dir=rtl]" in any css file in all, screen or print mode instead if($lang['direction'] == 'rtl'){ $list[DOKU_PLUGIN."$p/rtl.css"] = DOKU_BASE."lib/plugins/$p/"; } diff --git a/lib/exe/detail.php b/lib/exe/detail.php index 35186f5dd13255e21cea288847b180c3bc393616..ea46bc037c71e162d459c86031214dd22e838389 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -6,9 +6,9 @@ require_once(DOKU_INC.'inc/init.php'); session_write_close(); $IMG = getID('media'); -$ID = cleanID($_REQUEST['id']); +$ID = cleanID($INPUT->str('id')); -if($conf['allowdebug'] && $_REQUEST['debug']){ +if($conf['allowdebug'] && $INPUT->has('debug')){ print '<pre>'; foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ print '$'."conf['$x'] = '".$conf[$x]."';\n"; diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 143d40f227c8230468421f5ff54b243413d2a2b9..60843460e140abb8e293d941c78ebd4c44252e0c 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -17,10 +17,10 @@ //get input $MEDIA = stripctl(getID('media',false)); // no cleaning except control chars - maybe external - $CACHE = calc_cache($_REQUEST['cache']); - $WIDTH = (int) $_REQUEST['w']; - $HEIGHT = (int) $_REQUEST['h']; - $REV = (int) @$_REQUEST['rev']; + $CACHE = calc_cache($INPUT->str('cache')); + $WIDTH = $INPUT->int('w'); + $HEIGHT = $INPUT->int('h'); + $REV = &$INPUT->ref('rev'); //sanitize revision $REV = preg_replace('/[^0-9]/','',$REV); diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 738a2950390f51fe014c2d40761f42a39beb2a79..e149770c0e8507b99d428cd4db59e43d0077be7d 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -20,10 +20,10 @@ if(!$defer){ sendGIF(); // send gif } -$ID = cleanID($_REQUEST['id']); +$ID = cleanID($INPUT->str('id')); // Catch any possible output (e.g. errors) -$output = isset($_REQUEST['debug']) && $conf['allowdebug']; +$output = $INPUT->has('debug') && $conf['allowdebug']; if(!$output) ob_start(); // run one of the jobs @@ -261,7 +261,8 @@ function sendDigest() { * @author Harry Fuecks <fuecks@gmail.com> */ function sendGIF(){ - if(isset($_REQUEST['debug'])){ + global $INPUT; + if($INPUT->has('debug')){ header('Content-Type: text/plain'); return; } diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 5f09fe1f8dab79d5b9dca060719fedd59712f058..04dd178cc82a81ac2c242bf102d53d34f0896424 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -10,25 +10,25 @@ trigger_event('MEDIAMANAGER_STARTED',$tmp=array()); session_write_close(); //close session + global $INPUT; // handle passed message - if($_REQUEST['msg1']) msg(hsc($_REQUEST['msg1']),1); - if($_REQUEST['err']) msg(hsc($_REQUEST['err']),-1); + if($INPUT->str('msg1')) msg(hsc($INPUT->str('msg1')),1); + if($INPUT->str('err')) msg(hsc($INPUT->str('err')),-1); // get namespace to display (either direct or from deletion order) - if($_REQUEST['delete']){ - $DEL = cleanID($_REQUEST['delete']); + if($INPUT->str('delete')){ + $DEL = cleanID($INPUT->str('delete')); $IMG = $DEL; $NS = getNS($DEL); - }elseif($_REQUEST['edit']){ - $IMG = cleanID($_REQUEST['edit']); + }elseif($INPUT->str('edit')){ + $IMG = cleanID($INPUT->str('edit')); $NS = getNS($IMG); - }elseif($_REQUEST['img']){ - $IMG = cleanID($_REQUEST['img']); + }elseif($INPUT->str('img')){ + $IMG = cleanID($INPUT->str('img')); $NS = getNS($IMG); }else{ - $NS = $_REQUEST['ns']; - $NS = cleanID($NS); + $NS = cleanID($INPUT->str('ns')); } // check auth @@ -76,18 +76,18 @@ } // handle meta saving - if($IMG && @array_key_exists('save', $_REQUEST['do'])){ - $JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']); + if($IMG && @array_key_exists('save', $INPUT->arr('do'))){ + $JUMPTO = media_metasave($IMG,$AUTH,$INPUT->arr('meta')); } - if($IMG && ($_REQUEST['mediado'] == 'save' || @array_key_exists('save', $_REQUEST['mediado']))) { - $JUMPTO = media_metasave($IMG,$AUTH,$_REQUEST['meta']); + if($IMG && ($INPUT->str('mediado') == 'save' || @array_key_exists('save', $INPUT->arr('mediado')))) { + $JUMPTO = media_metasave($IMG,$AUTH,$INPUT->arr('meta')); } - if ($_REQUEST['rev'] && $conf['mediarevisions']) $REV = (int) $_REQUEST['rev']; + if ($INPUT->int('rev') && $conf['mediarevisions']) $REV = $INPUT->int('rev'); - if($_REQUEST['mediado'] == 'restore' && $conf['mediarevisions']){ - $JUMPTO = media_restore($_REQUEST['image'], $REV, $AUTH); + if($INPUT->str('mediado') == 'restore' && $conf['mediarevisions']){ + $JUMPTO = media_restore($INPUT->str('image'), $REV, $AUTH); } // handle deletion @@ -101,7 +101,7 @@ if ($res & DOKU_MEDIA_EMPTY_NS && !$fullscreen) { // current namespace was removed. redirecting to root ns passing msg along send_redirect(DOKU_URL.'lib/exe/mediamanager.php?msg1='. - rawurlencode($msg).'&edid='.$_REQUEST['edid']); + rawurlencode($msg).'&edid='.$INPUT->str('edid')); } msg($msg,1); } elseif ($res & DOKU_MEDIA_INUSE) { diff --git a/lib/images/interwiki/amazon.de.gif b/lib/images/interwiki/amazon.de.gif index 6e36a051a73632e57294186110a61baf55a70a2a..a0d2cd4cb52fe29803addbb13bd19baa74e8d833 100644 Binary files a/lib/images/interwiki/amazon.de.gif and b/lib/images/interwiki/amazon.de.gif differ diff --git a/lib/images/interwiki/amazon.gif b/lib/images/interwiki/amazon.gif index 6e36a051a73632e57294186110a61baf55a70a2a..a0d2cd4cb52fe29803addbb13bd19baa74e8d833 100644 Binary files a/lib/images/interwiki/amazon.gif and b/lib/images/interwiki/amazon.gif differ diff --git a/lib/images/interwiki/amazon.uk.gif b/lib/images/interwiki/amazon.uk.gif index 6e36a051a73632e57294186110a61baf55a70a2a..a0d2cd4cb52fe29803addbb13bd19baa74e8d833 100644 Binary files a/lib/images/interwiki/amazon.uk.gif and b/lib/images/interwiki/amazon.uk.gif differ diff --git a/lib/images/interwiki/callto.gif b/lib/images/interwiki/callto.gif index f6d42455412be607a6a69855bcd1ebf971641774..60158c5652e9ea5ca6e47abd5e9c668e439c5ce2 100644 Binary files a/lib/images/interwiki/callto.gif and b/lib/images/interwiki/callto.gif differ diff --git a/lib/images/interwiki/paypal.gif b/lib/images/interwiki/paypal.gif index 1d2834062af2ebfb6aaa8410d49a681b2176ae60..a2dc894315cdf8927ae4d124a4007bcd5682f26f 100644 Binary files a/lib/images/interwiki/paypal.gif and b/lib/images/interwiki/paypal.gif differ diff --git a/lib/images/interwiki/skype.gif b/lib/images/interwiki/skype.gif new file mode 100644 index 0000000000000000000000000000000000000000..2c900a8b2fe64f81ff1fee49dda65dbec11425b1 Binary files /dev/null and b/lib/images/interwiki/skype.gif differ diff --git a/lib/images/interwiki/skype.png b/lib/images/interwiki/skype.png deleted file mode 100644 index c70216702b21067eb154a0a965c672782a5dcea0..0000000000000000000000000000000000000000 Binary files a/lib/images/interwiki/skype.png and /dev/null differ diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index c3461b78b2d494808e1b6239409d045694f79c19..a0d2e430eca85e6667b7051048d098b242799501 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -84,7 +84,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $this->who = '@'.ltrim($auth->cleanGroup($who),'@'); }elseif($_REQUEST['acl_t'] == '__u__' && $who){ $this->who = ltrim($who,'@'); - if($this->who != '%USER%'){ #keep wildcard as is + if($this->who != '%USER%' && $this->who != '%GROUP%'){ #keep wildcard as is $this->who = $auth->cleanUser($this->who); } }elseif($_REQUEST['acl_t'] && @@ -140,7 +140,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if ($who!='@ALL') { $who = '@'.ltrim($auth->cleanGroup($who),'@'); } - } elseif ($who != '%USER%'){ #keep wildcard as is + } elseif ($who != '%USER%' && $who != '%GROUP%'){ #keep wildcard as is $who = $auth->cleanUser($who); } $who = auth_nameencode($who,true); @@ -507,7 +507,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { if($item['type']=='d'){ if($item['open']){ $img = DOKU_BASE.'lib/images/minus.gif'; - $alt = '−'; + $alt = '−'; }else{ $img = DOKU_BASE.'lib/images/plus.gif'; $alt = '+'; @@ -747,7 +747,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { //build code $ret .= '<label for="pbox'.$label.'" title="'.$this->getLang('acl_perm'.$perm).'"'.$class.'>'; - $ret .= '<input '.buildAttributes($atts).' /> '; + $ret .= '<input '.buildAttributes($atts).' /> '; $ret .= $this->getLang('acl_perm'.$perm); $ret .= '</label>'.NL; } @@ -783,7 +783,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' <option value="__g__" class="aclgroup"'.$gsel.'>'.$this->getLang('acl_group').':</option>'.NL; echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').':</option>'.NL; if (!empty($this->specials)) { - echo ' <optgroup label=" ">'.NL; + echo ' <optgroup label=" ">'.NL; foreach($this->specials as $ug){ if($ug == $this->who){ $sel = ' selected="selected"'; @@ -801,7 +801,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' </optgroup>'.NL; } if (!empty($this->usersgroups)) { - echo ' <optgroup label=" ">'.NL; + echo ' <optgroup label=" ">'.NL; foreach($this->usersgroups as $ug){ if($ug == $this->who){ $sel = ' selected="selected"'; diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index e260be918eada86082d0a9cb66c8c40e4cec7c3d..95201750e15e0374fd77507f469f4a1461553651 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -20,9 +20,9 @@ $lang['p_group_id'] = 'Членовете на групата <b clas $lang['p_group_ns'] = 'Членовете на групата <b class="aclgroup">%s</b> в момента имат Ñледните права за именното проÑтранÑтво <b class="aclns">%s</b>: <i>%s</i>.'; $lang['p_choose_id'] = 'МолÑ, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за Ñтраницата <b class="aclpage">%s</b>.'; $lang['p_choose_ns'] = 'МолÑ, <b>въведете потребител или група</b> в полето отгоре, за да видите или промените правата за именното проÑтранÑтво <b class="aclns">%s</b>.'; -$lang['p_inherited'] = 'Бележка: Тези Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ðµ Ñа зададени директно, а Ñа наÑледени от други групи или именни проÑтранÑтва.'; +$lang['p_inherited'] = 'Бележка: Тези права не Ñа зададени директно, а Ñа наÑледени от други групи или именни проÑтранÑтва.'; $lang['p_isadmin'] = 'Бележка: Избраната група или потребител има вÑички права, защото е определен за Ñупер потребител.'; -$lang['p_include'] = 'ВиÑши права включват по-ниÑшите такива. Правата за Ñъздаване, качване и изтриване Ñа приложими Ñамо за именни проÑтранÑтва, но не за Ñтраници.'; +$lang['p_include'] = 'ВиÑшите права включват по-ниÑши такива. Правата за Ñъздаване, качване и изтриване Ñа приложими Ñамо за именни проÑтранÑтва, но не за Ñтраници.'; $lang['current'] = 'Текущи ACL права'; $lang['where'] = 'Страница/Именно проÑтранÑтво'; $lang['who'] = 'Потребител/Група'; @@ -34,4 +34,4 @@ $lang['acl_perm4'] = 'Създаване'; $lang['acl_perm8'] = 'Качване'; $lang['acl_perm16'] = 'Изтриване'; $lang['acl_new'] = 'ДобавÑне на право'; -$lang['acl_mod'] = 'ПромÑна на запиÑа'; +$lang['acl_mod'] = 'ПромÑна на правата'; diff --git a/lib/plugins/acl/lang/de-informal/lang.php b/lib/plugins/acl/lang/de-informal/lang.php index 3f4b08c2ad26c74b66078737ee2667fa74382235..05f7df0371dc000c154a4920b43eda19518772cd 100644 --- a/lib/plugins/acl/lang/de-informal/lang.php +++ b/lib/plugins/acl/lang/de-informal/lang.php @@ -5,11 +5,11 @@ * @author Alexander Fischer <tbanus@os-forge.net> * @author Juergen Schwarzer <jschwarzer@freenet.de> * @author Marcel Metz <marcel_metz@gmx.de> - * @author Matthias Schulte <post@lupo49.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Christian Wichmann <nospam@zone0.de> * @author Pierre Corell <info@joomla-praxis.de> */ -$lang['admin_acl'] = 'Zugriffskontrollsystem Management'; +$lang['admin_acl'] = 'Zugangsverwaltung'; $lang['acl_group'] = 'Gruppe'; $lang['acl_user'] = 'Benutzer'; $lang['acl_perms'] = 'Rechte für'; diff --git a/lib/plugins/acl/lang/ko/help.txt b/lib/plugins/acl/lang/ko/help.txt index d022a09137b56686d3f953a9eef17281c8aa8de1..377636682a5b25861969a3215f91a82d2a6937cb 100644 --- a/lib/plugins/acl/lang/ko/help.txt +++ b/lib/plugins/acl/lang/ko/help.txt @@ -6,6 +6,6 @@ 위쪽 ìž…ë ¥ ì–‘ì‹ì—ì„œ ì„ íƒëœ 사용ìžì™€ ê·¸ë£¹ì˜ ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ 바꿀 수 있습니다. -아래 í…Œì´ë¸”ì—ì„œ 현재 ì„¤ì •ëœ ëª¨ë“ ì ‘ê·¼ ì œì–´ ê·œì¹™ë“¤ì„ ë³¼ 수 있으며, 즉시 여러 ê·œì¹™ë“¤ì„ ì‚ì œí•˜ê±°ë‚˜ 바꿀 수 있습니다. +아래 í…Œì´ë¸”ì—ì„œ 현재 ì„¤ì •ëœ ëª¨ë“ ì ‘ê·¼ ì œì–´ ê·œì¹™ì„ ë³¼ 수 있으며, 즉시 여러 ê·œì¹™ì„ ì‚ì œí•˜ê±°ë‚˜ 바꿀 수 있습니다. -DokuWikiì—ì„œ ì ‘ê·¼ ì œì–´ê°€ 어떻게 ë™ìž‘ë˜ëŠ”지 ì•Œë ¤ë©´ [[doku>acl|ACL ê³µì‹ ë¬¸ì„œ]]를 ì½ì–´ë³´ê¸° ë°”ëžë‹ˆë‹¤. \ No newline at end of file +DokuWikiì—ì„œ ì ‘ê·¼ ì œì–´ê°€ 어떻게 ë™ìž‘ë˜ëŠ”지 ì•Œì•„ë³´ë ¤ë©´ [[doku>acl|ACL ê³µì‹ ë¬¸ì„œ]]를 ì½ì–´ë³´ê¸° ë°”ëžë‹ˆë‹¤. \ No newline at end of file diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php index 5465461fa46922512d9cfdd0e5ebba67ef52af9d..c8e1ce5cc6d8bce5ac1466928be5fc7d924e6055 100644 --- a/lib/plugins/acl/lang/ko/lang.php +++ b/lib/plugins/acl/lang/ko/lang.php @@ -27,7 +27,7 @@ $lang['p_group_id'] = '<b class="aclgroup">%s</b> 그룹 구성ì›ì€ $lang['p_group_ns'] = '<b class="aclgroup">%s</b> 그룹 구성ì›ì€ 현재 <b class="aclns">%s</b>: <i>%s</i> ì´ë¦„공간 ì ‘ê·¼ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤.'; $lang['p_choose_id'] = '<b class="aclpage">%s</b> 문서 ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë°”ê¾¸ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; $lang['p_choose_ns'] = '<b class="aclns">%s</b> ì´ë¦„공간 ì ‘ê·¼ ê¶Œí•œì„ ë³´ê±°ë‚˜ ë°”ê¾¸ë ¤ë©´ <b>사용ìž</b>나 <b>그룹</b>ì„ ìœ„ ì–‘ì‹ì— ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤.'; -$lang['p_inherited'] = 'ì°¸ê³ : ê¶Œí•œì´ ëª…ì‹œì 으로 ì„¤ì •ë˜ì§€ 않았으므로 다른 그룹들ì´ë‚˜ ìƒìœ„ ì´ë¦„공간으로부터 ê°€ì ¸ì™”ìŠµë‹ˆë‹¤.'; +$lang['p_inherited'] = 'ì°¸ê³ : ê¶Œí•œì´ ëª…ì‹œì 으로 ì„¤ì •ë˜ì§€ 않았으므로 다른 그룹ì´ë‚˜ ìƒìœ„ ì´ë¦„공간으로부터 ê°€ì ¸ì™”ìŠµë‹ˆë‹¤.'; $lang['p_isadmin'] = 'ì°¸ê³ : 슈í¼ìœ ì €ë¡œ ì„¤ì •ë˜ì–´ 있으므로 ì„ íƒëœ 그룹ì´ë‚˜ 사용ìžëŠ” ì–¸ì œë‚˜ ëª¨ë“ ì ‘ê·¼ ê¶Œí•œì„ ê°€ì§‘ë‹ˆë‹¤.'; $lang['p_include'] = 'ë” ë†’ì€ ì ‘ê·¼ ê¶Œí•œì€ í•˜ìœ„ë¥¼ í¬í•¨í•©ë‹ˆë‹¤. 문서가 ì•„ë‹Œ ì´ë¦„공간ì—는 만들기, 올리기, ì‚ì œ 권한만 ì ìš©ë©ë‹ˆë‹¤.'; $lang['current'] = '현재 ACL 규칙'; diff --git a/lib/plugins/acl/lang/vi/help.txt b/lib/plugins/acl/lang/vi/help.txt new file mode 100644 index 0000000000000000000000000000000000000000..23e258678a7c89d7e77b024a86c41357d47af41b --- /dev/null +++ b/lib/plugins/acl/lang/vi/help.txt @@ -0,0 +1,12 @@ +=== Trợ giúp nhanh: === + +Trang nà y giúp bạn thêm hoặc xóa quyá»n được cấp cho 1 thÆ° mục hoặc trang wiki của bạn. + +Của sổ bên trái hiển thị tất cả các thÆ° mục và trang văn bản. + +Khung trên đây cho phép bạn xem và sá»a quyá»n của má»™t nhóm hoặc thà nh viên đã chá»n. + +Bảng bên dÆ°á»›i hiển thị tất cả các quyá»n được cấp. Bạn có thể sá»a hoặc hóa các quyá»n đó má»™t cách nhanh chóng. + +Äá»c [[doku>acl|tà i liệu chÃnh thức vá» ACL]] sẽ giúp bạn hiểu hÆ¡n vá» cách phân quyá»n ở DokuWiki. + diff --git a/lib/plugins/acl/lang/vi/lang.php b/lib/plugins/acl/lang/vi/lang.php index 6237f79ba6221e8cd7a7c03769bd0557c1827a5e..ddf764dcab910c594a8fa1cd2cfe228756251e6c 100644 --- a/lib/plugins/acl/lang/vi/lang.php +++ b/lib/plugins/acl/lang/vi/lang.php @@ -3,19 +3,42 @@ * vietnamese language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author James Do <jdo@myrealbox.com> + * @author NukeViet <admin@nukeviet.vn> */ -$lang['admin_acl'] = 'Quản lý phép truy nháºt {Access Control List}'; +$lang['admin_acl'] = 'Quản lý danh sách quyá»n truy cáºp'; $lang['acl_group'] = 'Nhóm'; -$lang['acl_user'] = 'NgÆ°á»i'; -$lang['acl_perms'] = 'Phép truy nháºp cho'; +$lang['acl_user'] = 'Thà nh viên'; +$lang['acl_perms'] = 'Cấp phép cho'; $lang['page'] = 'Trang'; -$lang['namespace'] = 'Không gian tên'; +$lang['namespace'] = 'ThÆ° mục'; +$lang['btn_select'] = 'Chá»n'; + +$lang['p_user_id'] = 'Thà nh viên <b class="acluser">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'Thà nh viên <b class="acluser">%s</b> hiện tại được cấp phép cho thÆ° mục <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_group_id'] = 'Thà nh viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_group_ns'] = 'Thà nh viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho thÆ° mục <b class="aclns">%s</b>: <i>%s</i>.'; + +$lang['p_choose_id'] = 'Hãy <b>nháºp tên thà nh viên hoặc nhóm</b> và o ô trên đây để xem hoặc sá»a quyá»n đã thiết đặt cho trang <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Hãy <b>nháºp tên thà nh viên hoặc nhóm</b> và o ô trên đây để xem hoặc sá»a quyá»n đã thiết đặt cho thÆ° mục <b class="aclns">%s</b>.'; + + +$lang['p_inherited'] = 'Ghi chú: Có những quyá»n không được thể hiện ở đây nhÆ°ng nó được cấp phép từ những nhóm hoặc thÆ° mục cấp cao.'; +$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thà nh viên nà y luôn được cấp đủ quyá»n vì há» là Quản trị tối cao'; +$lang['p_include'] = 'Má»™t số quyá»n thấp được thể hiện ở mức cao hÆ¡n. Quyá»n tạo, tải lên và xóa chỉ dà nh cho thÆ° mục, không dà nh cho trang.'; + +$lang['current'] = 'Danh sách quyá»n truy cáºp hiện tại'; +$lang['where'] = 'Trang/ThÆ° mục'; +$lang['who'] = 'Thà nh viên/Nhóm'; +$lang['perm'] = 'Quyá»n'; + +$lang['acl_perm0'] = 'Không'; $lang['acl_perm1'] = 'Äá»c'; -$lang['acl_perm2'] = 'Biên soạn'; +$lang['acl_perm2'] = 'Sá»a'; $lang['acl_perm4'] = 'Tạo'; $lang['acl_perm8'] = 'Tải lên'; +$lang['acl_perm16'] = 'Xóa'; $lang['acl_new'] = 'Thêm mục má»›i'; +$lang['acl_mod'] = 'Sá»a'; //Setup VIM: ex: et ts=2 : diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 9a9bb5329943aeb7b3e5a7f75d034d44aaedd412..c5f7ee5325fb5d364ec5a73e974471b949698691 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -118,6 +118,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // config setting group if ($in_fieldset) { ptln(' </table>'); + ptln(' </div>'); ptln(' </fieldset>'); } else { $in_fieldset = true; diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index 0bc25a8e57b9edeb96efdd0eb3fa188047a00a0e..43c961bfce3616d5fecd9983806e31075aa4bf78 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -10,41 +10,44 @@ // for admin plugins, the menu prompt to be displayed in the admin menu // if set here, the plugin doesn't need to override the getMenuText() method -$lang['menu'] = 'ÐаÑтройки'; +$lang['menu'] = 'ÐаÑтройки'; -$lang['error'] = 'ОбновÑването на наÑтройките не е възможно, поради невалидна ÑтойноÑÑ‚, молÑ, прегледайте промените Ñи и пробвайте отново. +$lang['error'] = 'ОбновÑването на наÑтройките не е възможно, поради невалидна ÑтойноÑÑ‚, молÑ, прегледайте промените Ñи и пробвайте отново. <br />Ðеверните ÑтойноÑти ще бъдат обградени Ñ Ñ‡ÐµÑ€Ð²ÐµÐ½Ð° рамка.'; -$lang['updated'] = 'ОбновÑването на наÑтройките е уÑпешно.'; -$lang['nochoice'] = '(нÑма друг възможен избор)'; -$lang['locked'] = 'ОбновÑването на файла Ñ Ð½Ð°Ñтройките не е възможно, ако това не е нарочно, проверете,<br /> +$lang['updated'] = 'ОбновÑването на наÑтройките е уÑпешно.'; +$lang['nochoice'] = '(нÑма друг възможен избор)'; +$lang['locked'] = 'ОбновÑването на файла Ñ Ð½Ð°Ñтройките не е възможно, ако това не е нарочно, проверете,<br /> дали името на Ð»Ð¾ÐºÐ°Ð»Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð» Ñ Ð½Ð°Ñтройки и правата Ñа верни.'; -$lang['danger'] = 'Внимание: промÑна на опциÑта може да направи Wiki-то и менюто за наÑтройване недоÑтъпни.'; -$lang['warning'] = 'Предупреждение: промÑна на опциÑта може предизвика нежелани поÑледици.'; -$lang['security'] = 'Предупреждение: промÑна на опциÑта може да предÑтавлÑва риÑк за ÑигурноÑтта.'; + +$lang['danger'] = 'Внимание: промÑна на опциÑта може да направи Wiki-то и менюто за наÑтройване недоÑтъпни.'; +$lang['warning'] = 'Предупреждение: промÑна на опциÑта може предизвика нежелани поÑледици.'; +$lang['security'] = 'Предупреждение: промÑна на опциÑта може да предÑтавлÑва риÑк за ÑигурноÑтта.'; /* --- Config Setting Headers --- */ $lang['_configuration_manager'] = 'ДиÑпечер на наÑтройките'; //same as heading in intro.txt -$lang['_header_dokuwiki'] = 'ÐаÑтройки на DokuWiki'; -$lang['_header_plugin'] = 'ÐаÑтройки на приÑтавки'; -$lang['_header_template'] = 'ÐаÑтройки на шаблони'; +$lang['_header_dokuwiki'] = 'ÐаÑтройки на DokuWiki'; +$lang['_header_plugin'] = 'ÐаÑтройки на приÑтавки'; +$lang['_header_template'] = 'ÐаÑтройки на шаблона'; +$lang['_header_undefined'] = 'Ðеопределени наÑтройки'; /* --- Config Setting Groups --- */ -$lang['_header_undefined'] = 'Ðеопределени наÑтройки'; -$lang['_basic'] = 'ОÑновни наÑтройки'; -$lang['_display'] = 'ÐаÑтройки за изобразÑване'; -$lang['_authentication'] = 'ÐаÑтройки за удоÑтоверÑване'; -$lang['_anti_spam'] = 'ÐаÑтройки за борба ÑÑŠÑ SPAM-ма'; -$lang['_editing'] = 'ÐаÑтройки за редактиране'; -$lang['_links'] = 'ÐаÑтройки на препратките'; -$lang['_media'] = 'ÐаÑтройки на медиÑта'; -$lang['_advanced'] = 'Допълнителни наÑтройки'; -$lang['_network'] = 'Мрежови наÑтройки'; +$lang['_basic'] = 'ОÑновни наÑтройки'; +$lang['_display'] = 'ÐаÑтройки за изобразÑване'; +$lang['_authentication'] = 'ÐаÑтройки за удоÑтоверÑване'; +$lang['_anti_spam'] = 'ÐаÑтройки за борба ÑÑŠÑ SPAM-ма'; +$lang['_editing'] = 'ÐаÑтройки за редактиране'; +$lang['_links'] = 'ÐаÑтройки на препратките'; +$lang['_media'] = 'ÐаÑтройки на медиÑта'; +$lang['_notifications'] = 'ÐаÑтройки за извеÑÑ‚Ñване'; +$lang['_syndication'] = 'ÐаÑтройки на RSS емиÑиите'; +$lang['_advanced'] = 'Допълнителни наÑтройки'; +$lang['_network'] = 'Мрежови наÑтройки'; // The settings group name for plugins and templates can be set with // plugin_settings_name and template_settings_name respectively. If one // of these lang properties is not set, the group name will be generated // from the plugin or template name and the localized suffix. -$lang['_plugin_sufix'] = ' - наÑтройки на приÑтавката'; -$lang['_template_sufix'] = ' - наÑтройки на шаблона'; +$lang['_plugin_sufix'] = ' (приÑтавка)'; +$lang['_template_sufix'] = ' (шаблон)'; /* --- Undefined Setting Messages --- */ $lang['_msg_setting_undefined'] = 'ÐÑма метаданни за наÑтройките.'; @@ -53,167 +56,183 @@ $lang['_msg_setting_no_default'] = 'ÐÑма Ñтандартна ÑÑ‚Ð¾Ð¹Ð½Ð¾Ñ /* -------------------- Config Options --------------------------- */ -$lang['fmode'] = 'Режим (права) за Ñъздаване на файлове'; -$lang['dmode'] = 'Режим (права) за Ñъздаване на директории'; -$lang['lang'] = 'Език'; -$lang['basedir'] = 'Главна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (напр. <code>/dokuwiki/</code>). ОÑтавете празно, за да бъде заÑечена автоматично.'; -$lang['baseurl'] = 'URL Ð°Ð´Ñ€ÐµÑ (напр. <code>http://www.yourserver.com</code>). ОÑтавете празно, за да бъде заÑечен автоматично.'; -$lang['savedir'] = 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð·Ð° запиÑване на данните'; -$lang['cookiedir'] = 'Път за биÑквитките. ОÑтавите ли полето празно ще Ñе ползва Ð³Ð¾Ñ€Ð½Ð¸Ñ URL адреÑ.'; -$lang['start'] = 'Име на началната Ñтраница'; -$lang['title'] = 'Име на Wiki-то'; -$lang['template'] = 'Шаблон'; -$lang['tagline'] = 'Подзаглавие - изобразÑва Ñе под името на Wiki Ñтраницата (ако Ñе поддържа от шаблона)'; -$lang['sidebar'] = 'Име на Ñтраницата за Ñтраничната лента (ако Ñе поддържа от шаблона). Ðко оÑтавите полето празно лентата ще бъде изключена'; -$lang['license'] = 'Под какъв лиценз да бъде публикувано Ñъдържанието?'; -$lang['fullpath'] = 'Показване на Ð¿ÑŠÐ»Ð½Ð¸Ñ Ð¿ÑŠÑ‚ до Ñтраниците в Ð´Ð¾Ð»Ð½Ð¸Ñ ÐºÐ¾Ð»Ð¾Ð½Ñ‚Ð¸Ñ‚ÑƒÐ».'; -$lang['recent'] = 'Скорошни промени'; -$lang['breadcrumbs'] = 'Брой на Ñледите'; -$lang['youarehere'] = 'Йерархични Ñледи'; -$lang['typography'] = 'ЗамÑна на поÑледователноÑÑ‚ от Ñимволи Ñ Ñ‚Ð¸Ð¿Ð¾Ð³Ñ€Ð°Ñ„Ñки еквивалент'; -$lang['htmlok'] = 'Разрешаване вграждането на HTML код'; -$lang['phpok'] = 'Разрешаване вграждането на PHP код'; -$lang['dformat'] = 'Формат на датата (виж. <a href="http://www.php.net/strftime">strftime</a> функциÑта на PHP)'; -$lang['signature'] = 'ПодпиÑ'; -$lang['toptoclevel'] = 'Главно ниво (заглавие) за Ñъдържанието'; -$lang['tocminheads'] = 'Минимален брой заглавиÑ, определÑщ дали да бъде Ñъздадено Ñъдържание'; -$lang['maxtoclevel'] = 'МакÑимален брой нива (заглавиÑ) за включване в Ñъдържанието'; -$lang['maxseclevel'] = 'МакÑимален брой нива предоÑтавÑни за ÑамоÑтоÑтелно редактиране'; -$lang['camelcase'] = 'Ползване на CamelCase за линкове'; -$lang['deaccent'] = 'ПочиÑтване имената на Ñтраниците (на файловете)'; -$lang['useheading'] = 'Ползване на първото заглавие за име на Ñтраница'; -$lang['refcheck'] = 'Проверка за препратка към медиÑ, преди да бъде изтрита'; -$lang['refshow'] = 'Брой на показваните медийни препратки'; -$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>'; -$lang['mediarevisions'] = 'Да Ñе пазÑÑ‚ ли Ñтари верÑии на качените файлове (Mediarevisions)?'; - -$lang['usewordblock'] = 'Блокиране на SPAM въз оÑнова на на ÑпиÑък от думи'; -$lang['indexdelay'] = 'ЗабавÑне преди индекÑиране (Ñек)'; -$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки'; -$lang['mailguard'] = 'ПромÑна на адреÑите на ел. поща (във форма непозволÑваща пращането на SPAM)'; -$lang['iexssprotect'] = 'ПроверÑване на качените файлове за вероÑтен зловреден JavaScript и HTML код'; -$lang['showuseras'] = 'Какво да Ñе показва за потребителÑ, който поÑледно е променил Ñтраницата'; - -/* Authentication Options */ -$lang['useacl'] = 'Ползване на ÑпиÑъци за доÑтъп'; -$lang['autopasswd'] = 'Ðвтоматично генериране на пароли, на нови потребители и пращане по пощата'; -$lang['authtype'] = 'Метод за удоÑтоверÑване'; -$lang['passcrypt'] = 'Метод за криптиране на паролите'; -$lang['defaultgroup'] = 'Стандартна група'; -$lang['superuser'] = 'Супер потребител - група, потребител или ÑпиÑък ÑÑŠÑ ÑтойноÑти разделени чрез Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ (user1,@group1,user2) Ñ Ð¿ÑŠÐ»ÐµÐ½ доÑтъп до вÑички Ñтраници и функции без значение от наÑтройките на ÑпиÑъците за доÑтъп (ACL)'; -$lang['manager'] = 'Управител - група, потребител или ÑпиÑък ÑÑŠÑ ÑтойноÑти разделени чрез Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ (user1,@group1,user2) Ñ Ð´Ð¾Ñтъп до определени управленÑки функции '; -$lang['profileconfirm'] = 'Потвърждаване на промени в профила Ñ Ð¿Ð°Ñ€Ð¾Ð»Ð°'; -$lang['disableactions'] = 'Изключване функции на DokuWiki'; -$lang['disableactions_check'] = 'Проверка'; +/* Basic Settings */ +$lang['title'] = 'Заглавие за Wiki-то, тоеÑÑ‚ името'; +$lang['start'] = 'Име на началната Ñтраница'; +$lang['lang'] = 'Език на интерфейÑа'; +$lang['template'] = 'Шаблон (Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ Ð²Ð¸Ð´Ð° на Ñтраниците)'; +$lang['tagline'] = 'Подзаглавие - изобразÑва Ñе под името на Wiki-то (ако Ñе поддържа от шаблона)'; +$lang['sidebar'] = 'Име на Ñтраницата за Ñтраничната лента (ако Ñе поддържа от шаблона). ОÑтавите ли полето празно лентата ще бъде изключена'; +$lang['license'] = 'Под какъв лиценз да бъде публикувано Ñъдържанието?'; +$lang['savedir'] = 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð·Ð° запиÑване на данните'; +$lang['basedir'] = 'Главна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (напр. <code>/dokuwiki/</code>). ОÑтавете празно, за да бъде заÑечена автоматично.'; +$lang['baseurl'] = 'URL Ð°Ð´Ñ€ÐµÑ (напр. <code>http://www.yourserver.com</code>). ОÑтавете празно, за да бъде заÑечен автоматично.'; +$lang['cookiedir'] = 'Път за биÑквитките. ОÑтавите ли полето празно ще Ñе ползва Ð³Ð¾Ñ€Ð½Ð¸Ñ URL адреÑ.'; +$lang['dmode'] = 'Режим (права) за Ñъздаване на директории'; +$lang['fmode'] = 'Режим (права) за Ñъздаване на файлове'; +$lang['allowdebug'] = 'Включване на режи debug - <b>изключете, ако не е нужен!</b>'; + +/* Display Settings */ +$lang['recent'] = 'Скорошни промени - брой еленти на Ñтраница'; +$lang['recent_days'] = 'Колко от Ñкорошните промени да Ñе пазÑÑ‚ (дни)'; +$lang['breadcrumbs'] = 'Брой на Ñледите. За изключване на функциÑта задайте 0.'; +$lang['youarehere'] = 'Йерархични Ñледи (в този Ñлучай можете да изключите горната опциÑ)'; +$lang['fullpath'] = 'Показване на Ð¿ÑŠÐ»Ð½Ð¸Ñ Ð¿ÑŠÑ‚ до Ñтраниците в Ð´Ð¾Ð»Ð½Ð¸Ñ ÐºÐ¾Ð»Ð¾Ð½Ñ‚Ð¸Ñ‚ÑƒÐ».'; +$lang['typography'] = 'ЗамÑна на поÑледователноÑÑ‚ от Ñимволи Ñ Ñ‚Ð¸Ð¿Ð¾Ð³Ñ€Ð°Ñ„Ñки еквивалент'; +$lang['dformat'] = 'Формат на датата (виж. <a href="http://www.php.net/strftime">strftime</a> функциÑта на PHP)'; +$lang['signature'] = 'ÐŸÐ¾Ð´Ð¿Ð¸Ñ - какво да внаÑÑ Ð±ÑƒÑ‚Ð¾Ð½Ð° "Вмъкване на подпиÑ" от редактора'; +$lang['showuseras'] = 'Какво да Ñе показва за потребителÑ, който поÑледно е променил дадена Ñтраницата'; +$lang['toptoclevel'] = 'Главно ниво (заглавие) за Ñъдържанието'; +$lang['tocminheads'] = 'Минимален брой заглавиÑ, определÑщ дали да бъде Ñъздадено Ñъдържание'; +$lang['maxtoclevel'] = 'МакÑимален брой нива (заглавиÑ) за включване в Ñъдържанието'; +$lang['maxseclevel'] = 'МакÑимален брой нива предоÑтавÑни за ÑамоÑтоÑтелно редактиране'; +$lang['camelcase'] = 'Ползване на CamelCase за линкове'; +$lang['deaccent'] = 'ПочиÑтване имената на Ñтраниците (на файловете)'; +$lang['useheading'] = 'Ползване на първото заглавие за име на Ñтраница'; +$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва вÑички именни проÑтранÑтва в индекÑа. ОпциÑта Ñкрива тези, за които потребителÑÑ‚ нÑма права за четене. Това може да доведе и до Ñкриване на иначе доÑтъпни подименни проÑтранÑтва. С определени наÑтройки на ÑпиÑъците за контрол на доÑтъпа (ACL) може да направи индекÑа неизползваем. '; +$lang['hidepages'] = 'Скриване на Ñтраниците Ñъвпадащи Ñ Ñ‚Ð¾Ð·Ð¸ регулÑрен израз(regular expressions)'; + +/* Authentication Settings */ +$lang['useacl'] = 'Ползване на ÑпиÑъци за доÑтъп'; +$lang['autopasswd'] = 'Ðвтоматично генериране на пароли, на нови потребители и пращане по пощата'; +$lang['authtype'] = 'Метод за удоÑтоверÑване'; +$lang['passcrypt'] = 'Метод за криптиране на паролите'; +$lang['defaultgroup']= 'Стандартна група'; +$lang['superuser'] = 'Супер потребител - група, потребител или ÑпиÑък ÑÑŠÑ ÑтойноÑти разделени чрез Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ (user1,@group1,user2) Ñ Ð¿ÑŠÐ»ÐµÐ½ доÑтъп до вÑички Ñтраници и функции без значение от наÑтройките на ÑпиÑъците за доÑтъп (ACL)'; +$lang['manager'] = 'Управител - група, потребител или ÑпиÑък ÑÑŠÑ ÑтойноÑти разделени чрез Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ (user1,@group1,user2) Ñ Ð´Ð¾Ñтъп до определени управленÑки функции '; +$lang['profileconfirm'] = 'Потвърждаване на промени в профила Ñ Ð¿Ð°Ñ€Ð¾Ð»Ð°'; +$lang['rememberme'] = 'Ползване на поÑтоÑнни биÑквитки за впиÑване (за функциÑта "Запомни ме")'; +$lang['disableactions'] = 'Изключване функции на DokuWiki'; +$lang['disableactions_check'] = 'Проверка'; $lang['disableactions_subscription'] = 'Ðбониране/ОтпиÑване'; $lang['disableactions_wikicode'] = 'Преглед на кода/ЕкÑпортиране на оригинална верÑиÑ'; -$lang['disableactions_other'] = 'Други дейÑÑ‚Ð²Ð¸Ñ (разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ)'; -$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва вÑички именни проÑтранÑтва в индекÑа. ОпциÑта Ñкрива тези, за които потребителÑÑ‚ нÑма права за четене. Това може да доведе и до Ñкриване на иначе доÑтъпни подименни проÑтранÑтва. С определени наÑтройки на ÑпиÑъците за контрол на доÑтъпа (ACL) може да направи индекÑа неизползваем. '; +$lang['disableactions_other'] = 'Други дейÑÑ‚Ð²Ð¸Ñ (разделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ)'; $lang['auth_security_timeout'] = 'Ðвтоматично проверÑване на удоÑтоверÑването вÑеки (Ñек)'; -$lang['securecookie'] = 'Да Ñе изпращат ли биÑквитките зададени чрез HTTPS, Ñамо чрез HTTPS от браузъра? Изключете опциÑта, когато SSL Ñе ползва Ñамо за впиÑване, а четенето е без SSL.'; -$lang['remote'] = 'Включване на ÑиÑтемата за отдалечен API доÑтъп. Това ще позволи на Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð´Ð° Ñе Ñвързват Ñ DokuWiki чрез XML-RPC или друг механизъм.'; -$lang['remoteuser'] = 'Ограничаване на Ð¾Ñ‚Ð´Ð°Ð»ÐµÑ‡ÐµÐ½Ð¸Ñ API доÑтъп - активиране Ñамо за Ñледните групи и потребители (отделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ). Ðко оÑтавите полето празно вÑеки ще има доÑтъп доÑтъп.'; +$lang['securecookie'] = 'Да Ñе изпращат ли биÑквитките зададени чрез HTTPS, Ñамо чрез HTTPS от браузъра? Изключете опциÑта, когато SSL Ñе ползва Ñамо за впиÑване, а четенето е без SSL.'; +$lang['remote'] = 'Включване на ÑиÑтемата за отдалечен API доÑтъп. Това ще позволи на Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð´Ð° Ñе Ñвързват Ñ DokuWiki чрез XML-RPC или друг механизъм.'; +$lang['remoteuser'] = 'Ограничаване на Ð¾Ñ‚Ð´Ð°Ð»ÐµÑ‡ÐµÐ½Ð¸Ñ API доÑтъп - активиране Ñамо за Ñледните групи и потребители (отделени ÑÑŠÑ Ð·Ð°Ð¿ÐµÑ‚Ð°Ñ). Ðко оÑтавите полето празно вÑеки ще има доÑтъп доÑтъп.'; + +/* Anti-Spam Settings */ +$lang['usewordblock'] = 'Блокиране на SPAM въз оÑнова на на ÑпиÑък от думи'; +$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки'; +$lang['indexdelay'] = 'ЗабавÑне преди индекÑиране (Ñек)'; +$lang['mailguard'] = 'ПромÑна на адреÑите на ел. поща (във форма непозволÑваща пращането на SPAM)'; +$lang['iexssprotect'] = 'ПроверÑване на качените файлове за вероÑтен зловреден JavaScript и HTML код'; + +/* Editing Settings */ +$lang['usedraft'] = 'Ðвтоматично запазване на чернова по време на редактиране'; +$lang['htmlok'] = 'Разрешаване вграждането на HTML код'; +$lang['phpok'] = 'Разрешаване вграждането на PHP код'; +$lang['locktime'] = 'МакÑ. период за ÑъхранÑване на заключените файлове (Ñек)'; +$lang['cachetime'] = 'МакÑ. период за ÑъхранÑване на кеша (Ñек)'; + +/* Link settings */ +$lang['target____wiki'] = 'Прозорец за вътрешни препратки'; +$lang['target____interwiki'] = 'Прозорец за препратки към други Wiki Ñайтове'; +$lang['target____extern'] = 'Прозорец за външни препратки'; +$lang['target____media'] = 'Прозорец за медийни препратки'; +$lang['target____windows'] = 'Прозорец за препратки към Windows'; + +/* Media Settings */ +$lang['mediarevisions'] = 'Да Ñе пазÑÑ‚ ли Ñтари верÑии на качените файлове (Mediarevisions)?'; +$lang['refcheck'] = 'Проверка за препратка към медиÑ, преди да бъде изтрита'; +$lang['refshow'] = 'Брой на показваните медийни препратки'; +$lang['gdlib'] = 'ВерÑÐ¸Ñ Ð½Ð° GD Lib'; +$lang['im_convert'] = 'Път до инÑтрумента за транÑÑ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð° ImageMagick'; +$lang['jpg_quality'] = 'КачеÑтво на JPG компреÑиÑта (0-100)'; +$lang['fetchsize'] = 'МакÑимален размер (байтове), който fetch.php може да ÑвалÑ'; + +/* Notification Settings */ +$lang['subscribers'] = 'Включване на поддръжката за абониране към Ñтраници'; +$lang['subscribe_time'] = 'Време Ñлед което абонаментните ÑпиÑъци и Ð¾Ð±Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñе изпращат (Ñек); ТрÑбва да е по-малко от времето определено в recent_days.'; +$lang['notify'] = 'Пращане на ÑÑŠÐ¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð·Ð° промени по Ñтраниците на Ñледната eл. поща'; +$lang['registernotify'] = 'Пращане на Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° нови потребители на Ñледната ел. поща'; +$lang['mailfrom'] = 'Ел. поща, коÑто да Ñе ползва за автоматично изпращане на ел. пиÑма'; +$lang['mailprefix'] = 'ПредÑтавка за темите (поле subject) на автоматично изпращаните ел. пиÑма'; +$lang['htmlmail'] = 'Изпращане на по-добре изглеждащи, но по-големи по-размер HTML ел. пиÑма. Изключете ако желаете пиÑмата да Ñе изпращат като чиÑÑ‚ текÑÑ‚.'; + +/* Syndication Settings */ +$lang['sitemap'] = 'Генериране на Google sitemap (дни)'; +$lang['rss_type'] = 'Тип на XML емиÑиÑта'; +$lang['rss_linkto'] = 'XML емиÑиÑта препраща към'; +$lang['rss_content'] = 'Какво да показват елементите на XML емиÑиÑта?'; +$lang['rss_update'] = 'Интервал на актуализиране на XML емиÑиÑта (Ñек)'; +$lang['rss_show_summary'] = 'Показване на обобщение в заглавието на XML емиÑиÑта'; +$lang['rss_media'] = 'Кой тип промени да Ñе включват в XML миÑиÑта?'; /* Advanced Options */ -$lang['updatecheck'] = 'ПроверÑване за за нови верÑии и Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñ Ð·Ð° ÑигурноÑтта? Ðеобходимо е Dokiwiki да може да Ñе Ñвързва ÑÑŠÑ update.dokuwiki.org за тази функционалноÑÑ‚.'; -$lang['userewrite'] = 'Ползване на nice URL адреÑи'; -$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните проÑтранÑтва в URL'; -$lang['usedraft'] = 'Ðвтоматично запазване на чернова по време на редактиране'; -$lang['sepchar'] = 'Разделител между думите в имената на Ñтраници'; -$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреÑи (абÑолютни адреÑи - http://server/path)'; -$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; -$lang['autoplural'] = 'ПроверÑване за множеÑтвено чиÑло в препратките'; -$lang['compression'] = 'Метод за компреÑÐ¸Ñ Ð½Ð° attic файлове'; -$lang['cachetime'] = 'МакÑ. период за ÑъхранÑване на кеша (Ñек)'; -$lang['locktime'] = 'МакÑ. период за ÑъхранÑване на заключените файлове (Ñек)'; -$lang['fetchsize'] = 'МакÑимален размер (байтове), който fetch.php може да ÑвалÑ'; -$lang['notify'] = 'Пращане на ÑÑŠÐ¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð·Ð° промени по Ñтраниците на Ñледната eл. поща'; -$lang['registernotify'] = 'Пращане на Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° нови потребители на Ñледната ел. поща'; -$lang['mailfrom'] = 'Ел. поща, коÑто да Ñе ползва за автоматично изпращане на ел. пиÑма'; -$lang['mailprefix'] = 'ПредÑтавка за темите (поле subject) на автоматично изпращаните ел. пиÑма'; -$lang['gzip_output'] = 'Кодиране на Ñъдържанието Ñ gzip за xhtml'; -$lang['gdlib'] = 'ВерÑÐ¸Ñ Ð½Ð° GD Lib'; -$lang['im_convert'] = 'Път до инÑтрумента за транÑÑ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð½Ð° ImageMagick'; -$lang['jpg_quality'] = 'КачеÑтво на JPG компреÑиÑта (0-100)'; -$lang['subscribers'] = 'Включване на поддръжката за абониране към Ñтраници'; -$lang['subscribe_time'] = 'Време Ñлед което абонаментните ÑпиÑъци и Ð¾Ð±Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñе изпращат (Ñек); ТрÑбва да е по-малко от времето определено в recent_days.'; -$lang['compress'] = 'Компактен CSS и javascript изглед'; -$lang['cssdatauri'] = 'МакÑимален размер, в байтове, до който изображениÑта поÑочени в .CSS файл ще бъдат вграждани в Ñтила (stylesheet), за да Ñе намали Ð±Ñ€Ð¾Ñ Ð½Ð° HTTP заÑвките. Техниката не работи за верÑиите на IE преди 8! Препоръчителни ÑтойноÑти: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.'; -$lang['hidepages'] = 'Скриване на Ñъвпадащите Ñтраници (regular expressions)'; -$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за неÑъщеÑтвуващи Ñтраници'; -$lang['sitemap'] = 'Генериране на Google sitemap (дни)'; -$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функциÑта не работи. Може да попречи на Ñ‚ÑŠÑ€Ñенето в Ñтраниците. Знае Ñе, че комбинациÑта IIS+PHP/CGI е лоша. Вижте <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Грешка 852</a> за повече информациÑ.'; -$lang['xsendfile'] = 'Ползване на Ð¥-Sendfile header, за да може уебÑървъра да дава Ñтатични файлове? ВашиÑÑ‚ уебÑървър Ñ‚Ñ€Ñбва да го поддържа.'; -$lang['renderer_xhtml'] = 'ПредÑтавÑне на оÑновните изходни данни (xhtml) от Wiki-то Ñ'; -$lang['renderer__core'] = '%s (Ñдрото на DokuWiki)'; -$lang['renderer__plugin'] = '%s (приÑтавка)'; -$lang['rememberme'] = 'Ползване на поÑтоÑнни биÑквитки за впиÑване (за функциÑта "Запомни ме")'; - -$lang['rss_type'] = 'Тип на XML емиÑиÑта'; -$lang['rss_linkto'] = 'XML емиÑиÑта препраща към'; -$lang['rss_content'] = 'Какво да показват елементите на XML емиÑиÑта?'; -$lang['rss_update'] = 'Интервал на актуализиране на XML емиÑиÑта (Ñек)'; -$lang['recent_days'] = 'Колко от Ñкорошните промени да Ñе пазÑÑ‚ (дни)'; -$lang['rss_show_summary'] = 'Показване на обобщение в заглавието на XML емиÑиÑта'; -$lang['rss_media'] = 'Кой тип промени да Ñе включват в XML миÑиÑта?'; - -/* Target options */ -$lang['target____wiki'] = 'Прозорец за вътрешни препратки'; -$lang['target____interwiki'] = 'Прозорец за препратки към други Wiki Ñайтове'; -$lang['target____extern'] = 'Прозорец за външни препратки'; -$lang['target____media'] = 'Прозорец за медийни препратки'; -$lang['target____windows'] = 'Прозорец за препратки към Windows'; +$lang['updatecheck'] = 'ПроверÑване за за нови верÑии и Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñ Ð·Ð° ÑигурноÑтта? Ðеобходимо е Dokiwiki да може да Ñе Ñвързва ÑÑŠÑ update.dokuwiki.org за тази функционалноÑÑ‚.'; +$lang['userewrite'] = 'Ползване на nice URL адреÑи'; +$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните проÑтранÑтва в URL'; +$lang['sepchar'] = 'Разделител между думите в имената на Ñтраници'; +$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреÑи (абÑолютни адреÑи - http://server/path)'; +$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; +$lang['autoplural'] = 'ПроверÑване за множеÑтвено чиÑло в препратките'; +$lang['compression'] = 'Метод за компреÑÐ¸Ñ Ð½Ð° attic файлове'; +$lang['gzip_output'] = 'Кодиране на Ñъдържанието Ñ gzip за xhtml'; +$lang['compress'] = 'Компактен CSS и javascript изглед'; +$lang['cssdatauri'] = 'МакÑимален размер, в байтове, до който изображениÑта поÑочени в .CSS файл ще бъдат вграждани в Ñтила (stylesheet), за да Ñе намали Ð±Ñ€Ð¾Ñ Ð½Ð° HTTP заÑвките. Техниката не работи за верÑиите на IE преди 8! Препоръчителни ÑтойноÑти: <code>400</code> до <code>600</code> байта. Въведете <code>0</code> за изключване.'; +$lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за неÑъщеÑтвуващи Ñтраници'; +$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функциÑта не работи. Може да попречи на Ñ‚ÑŠÑ€Ñенето в Ñтраниците. Знае Ñе, че комбинациÑта IIS+PHP/CGI е лоша. Вижте <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Грешка 852</a> за повече информациÑ.'; +$lang['xsendfile'] = 'Ползване на Ð¥-Sendfile header, за да може уебÑървъра да дава Ñтатични файлове? ВашиÑÑ‚ уебÑървър Ñ‚Ñ€Ñбва да го поддържа.'; +$lang['renderer_xhtml'] = 'ПредÑтавÑне на оÑновните изходни данни (xhtml) от Wiki-то Ñ'; +$lang['renderer__core'] = '%s (Ñдрото на DokuWiki)'; +$lang['renderer__plugin'] = '%s (приÑтавка)'; + +/* Network Options */ +$lang['dnslookups'] = 'DokuWiki ще Ñ‚ÑŠÑ€Ñи имената на хоÑтовете, на отдалечени IP адреÑи, от които потребители редактират Ñтраници. ÐЕ е желателно да ползвате опциÑта ако имате бавен или неработещ DNS Ñървър.'; /* Proxy Options */ -$lang['proxy____host'] = 'Име на прокÑи Ñървър'; -$lang['proxy____port'] = 'Порт за прокÑито'; -$lang['proxy____user'] = 'Потребител за прокÑито'; -$lang['proxy____pass'] = 'Парола за прокÑито'; -$lang['proxy____ssl'] = 'Ползване на SSL при Ñвързване Ñ Ð¿Ñ€Ð¾ÐºÑито'; -$lang['proxy____except'] = 'РегулÑрен израз определÑщ за кои URL адреÑи да не Ñе ползва прокÑи Ñървър.'; +$lang['proxy____host'] = 'Име на прокÑи Ñървър'; +$lang['proxy____port'] = 'Порт за прокÑито'; +$lang['proxy____user'] = 'Потребител за прокÑито'; +$lang['proxy____pass'] = 'Парола за прокÑито'; +$lang['proxy____ssl'] = 'Ползване на SSL при Ñвързване Ñ Ð¿Ñ€Ð¾ÐºÑито'; +$lang['proxy____except'] = 'РегулÑрен израз определÑщ за кои URL адреÑи да не Ñе ползва прокÑи Ñървър.'; /* Safemode Hack */ -$lang['safemodehack'] = 'Ползване на хака safemode'; -$lang['ftp____host'] = 'FTP Ñървър за хака safemode'; -$lang['ftp____port'] = 'FTP порт за хака safemode'; -$lang['ftp____user'] = 'FTP потребител за хака safemode'; -$lang['ftp____pass'] = 'FTP парола за хака safemode'; -$lang['ftp____root'] = 'FTP главна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð·Ð° хака safemode'; +$lang['safemodehack'] = 'Ползване на хака safemode'; +$lang['ftp____host'] = 'FTP Ñървър за хака safemode'; +$lang['ftp____port'] = 'FTP порт за хака safemode'; +$lang['ftp____user'] = 'FTP потребител за хака safemode'; +$lang['ftp____pass'] = 'FTP парола за хака safemode'; +$lang['ftp____root'] = 'FTP главна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð·Ð° хака safemode'; -$lang['license_o_'] = 'Ðищо не е избрано'; +/* License Options */ +$lang['license_o_'] = 'Ðищо не е избрано'; /* typography options */ -$lang['typography_o_0'] = 'без'; -$lang['typography_o_1'] = 'Ñ Ð¸Ð·ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ на единични кавички'; -$lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; +$lang['typography_o_0'] = 'без'; +$lang['typography_o_1'] = 'Ñ Ð¸Ð·ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ на единични кавички'; +$lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; /* userewrite options */ -$lang['userewrite_o_0'] = 'без'; -$lang['userewrite_o_1'] = 'файлът .htaccess'; -$lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; +$lang['userewrite_o_0'] = 'без'; +$lang['userewrite_o_1'] = 'файлът .htaccess'; +$lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; /* deaccent options */ -$lang['deaccent_o_0'] = 'изключено'; -$lang['deaccent_o_1'] = 'премахване на акценти'; -$lang['deaccent_o_2'] = 'транÑлитерациÑ'; +$lang['deaccent_o_0'] = 'изключено'; +$lang['deaccent_o_1'] = 'премахване на акценти'; +$lang['deaccent_o_2'] = 'транÑлитерациÑ'; /* gdlib options */ -$lang['gdlib_o_0'] = 'GD Lib не е доÑтъпна'; -$lang['gdlib_o_1'] = 'ВерÑÐ¸Ñ 1.x'; -$lang['gdlib_o_2'] = 'Ðвтоматично разпознаване'; +$lang['gdlib_o_0'] = 'GD Lib не е доÑтъпна'; +$lang['gdlib_o_1'] = 'ВерÑÐ¸Ñ 1.x'; +$lang['gdlib_o_2'] = 'Ðвтоматично разпознаване'; /* rss_type options */ -$lang['rss_type_o_rss'] = 'RSS верÑÐ¸Ñ 0.91'; -$lang['rss_type_o_rss1'] = 'RSS верÑÐ¸Ñ 1.0'; -$lang['rss_type_o_rss2'] = 'RSS верÑÐ¸Ñ 2.0'; -$lang['rss_type_o_atom'] = 'Atom верÑÐ¸Ñ 0.3'; -$lang['rss_type_o_atom1'] = 'Atom верÑÐ¸Ñ 1.0'; +$lang['rss_type_o_rss'] = 'RSS верÑÐ¸Ñ 0.91'; +$lang['rss_type_o_rss1'] = 'RSS верÑÐ¸Ñ 1.0'; +$lang['rss_type_o_rss2'] = 'RSS верÑÐ¸Ñ 2.0'; +$lang['rss_type_o_atom'] = 'Atom верÑÐ¸Ñ 0.3'; +$lang['rss_type_o_atom1'] = 'Atom верÑÐ¸Ñ 1.0'; /* rss_content options */ $lang['rss_content_o_abstract'] = 'Извлечение'; -$lang['rss_content_o_diff'] = 'Обединени разлики'; +$lang['rss_content_o_diff'] = 'Обединени разлики'; $lang['rss_content_o_htmldiff'] = 'Таблица Ñ Ñ€Ð°Ð·Ð»Ð¸ÐºÐ¸Ñ‚Ðµ в HTML формат'; -$lang['rss_content_o_html'] = 'ЦÑлото Ñъдържание на HTML Ñтраницата'; +$lang['rss_content_o_html'] = 'ЦÑлото Ñъдържание на HTML Ñтраницата'; /* rss_linkto options */ $lang['rss_linkto_o_diff'] = 'изглед на разликите'; @@ -222,26 +241,26 @@ $lang['rss_linkto_o_rev'] = 'ÑпиÑък на верÑиите'; $lang['rss_linkto_o_current'] = 'текущата Ñтраница'; /* compression options */ -$lang['compression_o_0'] = 'без'; -$lang['compression_o_gz'] = 'gzip'; -$lang['compression_o_bz2'] = 'bz2'; +$lang['compression_o_0'] = 'без'; +$lang['compression_o_gz'] = 'gzip'; +$lang['compression_o_bz2'] = 'bz2'; /* xsendfile header */ -$lang['xsendfile_o_0'] = 'не използвайте'; -$lang['xsendfile_o_1'] = 'Специфичен lighttpd header (преди верÑÐ¸Ñ 1.5)'; -$lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; -$lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренаÑочване'; +$lang['xsendfile_o_0'] = 'без'; +$lang['xsendfile_o_1'] = 'Специфичен lighttpd header (преди верÑÐ¸Ñ 1.5)'; +$lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; +$lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренаÑочване'; /* Display user info */ -$lang['showuseras_o_loginname'] = 'Име за впиÑване'; -$lang['showuseras_o_username'] = 'Пълно потребителÑко име'; -$lang['showuseras_o_email'] = 'Ел, поща (променени Ñпоред наÑтройките на mailguard)'; +$lang['showuseras_o_loginname'] = 'Име за впиÑване'; +$lang['showuseras_o_username'] = 'Пълно потребителÑко име'; +$lang['showuseras_o_email'] = 'Ел, поща (променени Ñпоред наÑтройките на mailguard)'; $lang['showuseras_o_email_link'] = 'Ел. поща под формата на връзка тип mailto:'; /* useheading options */ -$lang['useheading_o_0'] = 'Ðикога'; +$lang['useheading_o_0'] = 'Ðикога'; $lang['useheading_o_navigation'] = 'Само за навигациÑ'; -$lang['useheading_o_content'] = 'Само за Ñъдържанието на Wiki-то'; -$lang['useheading_o_1'] = 'Винаги'; +$lang['useheading_o_content'] = 'Само за Ñъдържанието на Wiki-то'; +$lang['useheading_o_1'] = 'Винаги'; -$lang['readdircache'] = 'МакÑимален период за ÑъхранÑване кеша на readdir (Ñек)'; +$lang['readdircache'] = 'МакÑимален период за ÑъхранÑване кеша на readdir (Ñек)'; diff --git a/lib/plugins/config/lang/de-informal/intro.txt b/lib/plugins/config/lang/de-informal/intro.txt index 7ac1b47d9eaf511627548a71052e553081311033..df9845ebc0610e1d8508da0ec967f4e3289013dd 100644 --- a/lib/plugins/config/lang/de-informal/intro.txt +++ b/lib/plugins/config/lang/de-informal/intro.txt @@ -1,4 +1,4 @@ -===== Einstellungs-Manager ===== +===== Konfigurations-Manager ===== Benutze diese Seite zur Kontrolle der Einstellungen deiner DokuWiki-Installation. Für Hilfe zu individuellen Einstellungen gehe zu [[doku>config]]. Für mehr Details über diese Erweiterungen siehe [[doku>plugin:config]]. diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index 52c705b4f112bb89052016cdbf7acb782bbd162c..d86c2d8093aaf2ad236bb0f26eb31804d9c9b615 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -5,7 +5,7 @@ * @author Alexander Fischer <tbanus@os-forge.net> * @author Juergen Schwarzer <jschwarzer@freenet.de> * @author Marcel Metz <marcel_metz@gmx.de> - * @author Matthias Schulte <post@lupo49.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Christian Wichmann <nospam@zone0.de> * @author Pierre Corell <info@joomla-praxis.de> */ @@ -29,6 +29,8 @@ $lang['_anti_spam'] = 'Anti-Spam-Einstellungen'; $lang['_editing'] = 'Bearbeitungseinstellungen'; $lang['_links'] = 'Link-Einstellungen'; $lang['_media'] = 'Media-Einstellungen'; +$lang['_notifications'] = 'Benachrichtigungs-Konfiguration'; +$lang['_syndication'] = 'Syndication-Konfiguration (RSS)'; $lang['_advanced'] = 'erweiterte Einstellungen'; $lang['_network'] = 'Netzwerk-Einstellungen'; $lang['_plugin_sufix'] = 'Plugin-Einstellungen'; @@ -46,6 +48,8 @@ $lang['cookiedir'] = 'Cookie Pfad. Leer lassen, um die Standard-Url $lang['start'] = 'Name der Startseite'; $lang['title'] = 'Wiki Titel'; $lang['template'] = 'Vorlage'; +$lang['tagline'] = 'Tag-Linie (nur, wenn vom Template unterstützt)'; +$lang['sidebar'] = 'Name der Sidebar-Seite (nur, wenn vom Template unterstützt)), ein leeres Feld deaktiviert die Sidebar'; $lang['license'] = 'Unter welcher Lizenz sollte Ihr Inhalt veröffentlicht werden?'; $lang['fullpath'] = 'Zeige vollen Pfad der Datei in Fußzeile an'; $lang['recent'] = 'letzte Änderungen'; @@ -89,6 +93,8 @@ $lang['disableactions_other'] = 'Weitere Aktionen (durch Komma getrennt)'; $lang['sneaky_index'] = 'Standardmäßig zeigt DokuWiki alle Namensräume in der Indexansicht an. Bei Aktivierung dieser Einstellung werden alle Namensräume versteckt, in welchen der Benutzer keine Leserechte hat. Dies könnte dazu führen, dass lesbare Unternamensräume versteckt werden. Dies kann die Indexansicht bei bestimmten Zugangskontrolleinstellungen unbenutzbar machen.'; $lang['auth_security_timeout'] = 'Zeitüberschreitung bei der Authentifizierung (Sekunden)'; $lang['securecookie'] = 'Sollen Cookies, die via HTTPS gesetzt wurden nur per HTTPS versendet werden? Deaktiviere diese Option, wenn nur der Login deines Wikis mit SSL gesichert ist, aber das Betrachten des Wikis ungesichert geschieht.'; +$lang['remote'] = 'Aktiviert den externen API-Zugang. Diese Option erlaubt es externen Anwendungen von außen auf die XML-RPC-Schnittstelle oder anderweitigen Schnittstellen zuzugreifen.'; +$lang['remoteuser'] = 'Zugriff auf die externen Schnittstellen durch kommaseparierte Angabe von Benutzern oder Gruppen einschränken. Ein leeres Feld erlaubt Zugriff für jeden.'; $lang['updatecheck'] = 'Automatisch auf Updates und Sicherheitswarnungen prüfen? DokuWiki muss sich dafür mit update.dokuwiki.org verbinden.'; $lang['userewrite'] = 'Benutze schöne URLs'; $lang['useslash'] = 'Benutze Schrägstrich als Namensraumtrenner in URLs'; @@ -105,6 +111,7 @@ $lang['notify'] = 'Sende Änderungsbenachrichtigungen an diese E- $lang['registernotify'] = 'Sende Information bei neu registrierten Benutzern an diese E-Mail-Adresse.'; $lang['mailfrom'] = 'Absenderadresse für automatisch erzeugte E-Mails'; $lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen'; +$lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.'; $lang['gzip_output'] = 'Seiten mit gzip komprimiert ausliefern'; $lang['gdlib'] = 'GD Lib Version'; $lang['im_convert'] = 'Pfad zu ImageMagicks-Konvertierwerkzeug'; @@ -128,11 +135,13 @@ $lang['rss_content'] = 'Was soll in XML-Feedinhalten angezeigt werden? $lang['rss_update'] = 'Aktualisierungsintervall für XML-Feeds (Sekunden)'; $lang['recent_days'] = 'Wie viele Änderungen sollen vorgehalten werden? (Tage)'; $lang['rss_show_summary'] = 'Bearbeitungs-Zusammenfassung im XML-Feed anzeigen'; +$lang['rss_media'] = 'Welche Änderungen sollen im XML-Feed angezeigt werden?'; $lang['target____wiki'] = 'Zielfenstername für interne Links'; $lang['target____interwiki'] = 'Zielfenstername für InterWiki-Links'; $lang['target____extern'] = 'Zielfenstername für externe Links'; $lang['target____media'] = 'Zielfenstername für Medienlinks'; $lang['target____windows'] = 'Zielfenstername für Windows-Freigaben-Links'; +$lang['dnslookups'] = 'DokuWiki löst die IP-Adressen von Benutzern zu deren Hostnamen auf. Wenn du einen langsamen, unbrauchbaren DNS-Server verwendest oder die Funktion nicht benötigst, dann sollte diese Option deaktivert sein.'; $lang['proxy____host'] = 'Proxyadresse'; $lang['proxy____port'] = 'Proxyport'; $lang['proxy____user'] = 'Benutzername für den Proxy'; diff --git a/lib/plugins/config/lang/de/intro.txt b/lib/plugins/config/lang/de/intro.txt index efb80773887241b11825db917f2f72278a83b5f3..b79b5f871c05c9087754b4eea33a750b979b5d89 100644 --- a/lib/plugins/config/lang/de/intro.txt +++ b/lib/plugins/config/lang/de/intro.txt @@ -1,4 +1,4 @@ -====== Konfiguration ====== +====== Konfigurations-Manager ====== Dieses Plugin hilft Ihnen bei der Konfiguration von DokuWiki. Hilfe zu den einzelnen Einstellungen finden Sie unter [[doku>config]]. Mehr Information zu diesem Plugin ist unter [[doku>plugin:config]] erhältlich. diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index 1cc4e0a8afba01be4b3c8eff5f920a092f5fbd97..bcbc061a310cd09fb10ee54cde4adf5aab6113d0 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -11,12 +11,12 @@ * @author Arne Pelka <mail@arnepelka.de> * @author Dirk Einecke <dirk@dirkeinecke.de> * @author Blitzi94@gmx.de - * @author Robert Bogenschneider <robog@GMX.de> * @author Robert Bogenschneider <robog@gmx.de> * @author Niels Lange <niels@boldencursief.nl> * @author Christian Wichmann <nospam@zone0.de> * @author Paul Lachewsky <kaeptn.haddock@gmail.com> * @author Pierre Corell <info@joomla-praxis.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> */ $lang['menu'] = 'Konfiguration'; $lang['error'] = 'Die Einstellungen wurden wegen einer fehlerhaften Eingabe nicht gespeichert. @@ -40,6 +40,8 @@ $lang['_anti_spam'] = 'Anti-Spam-Konfiguration'; $lang['_editing'] = 'Bearbeitungs-Konfiguration'; $lang['_links'] = 'Link-Konfiguration'; $lang['_media'] = 'Medien-Konfiguration'; +$lang['_notifications'] = 'Benachrichtigungs-Konfiguration'; +$lang['_syndication'] = 'Syndication-Konfiguration (RSS)'; $lang['_advanced'] = 'Erweiterte Konfiguration'; $lang['_network'] = 'Netzwerk-Konfiguration'; $lang['_plugin_sufix'] = 'Plugin-Konfiguration'; @@ -57,6 +59,8 @@ $lang['cookiedir'] = 'Cookiepfad. Frei lassen, um den gleichen Pfad $lang['start'] = 'Startseitenname'; $lang['title'] = 'Titel des Wikis'; $lang['template'] = 'Designvorlage (Template)'; +$lang['tagline'] = 'Tag-Linie (nur, wenn vom Template unterstützt)'; +$lang['sidebar'] = 'Name der Sidebar-Seite (nur, wenn vom Template unterstützt)), ein leeres Feld deaktiviert die Sidebar'; $lang['license'] = 'Unter welcher Lizenz sollen Ihre Inhalte veröffentlicht werden?'; $lang['fullpath'] = 'Den kompletten Dateipfad im Footer anzeigen'; $lang['recent'] = 'Anzahl der Einträge in der Änderungsliste'; @@ -100,6 +104,8 @@ $lang['disableactions_other'] = 'Andere Aktionen (durch Komma getrennt)'; $lang['sneaky_index'] = 'Standardmäßig zeigt DokuWiki alle Namensräume in der Ãœbersicht. Wenn diese Option aktiviert wird, werden alle Namensräume, für die der Benutzer keine Lese-Rechte hat, nicht angezeigt. Dies kann unter Umständen dazu führen, das lesbare Unter-Namensräume nicht angezeigt werden und macht die Ãœbersicht evtl. unbrauchbar in Kombination mit bestimmten ACL Einstellungen.'; $lang['auth_security_timeout'] = 'Authentifikations-Timeout (Sekunden)'; $lang['securecookie'] = 'Sollen Cookies, die via HTTPS gesetzt wurden nur per HTTPS versendet werden? Deaktivieren Sie diese Option, wenn nur der Login Ihres Wikis mit SSL gesichert ist, aber das Betrachten des Wikis ungesichert geschieht.'; +$lang['remote'] = 'Aktiviert den externen API-Zugang. Diese Option erlaubt es externen Anwendungen von außen auf die XML-RPC-Schnittstelle oder anderweitigen Schnittstellen zuzugreifen.'; +$lang['remoteuser'] = 'Zugriff auf die externen Schnittstellen durch kommaseparierte Angabe von Benutzern oder Gruppen einschränken. Ein leeres Feld erlaubt Zugriff für jeden.'; $lang['updatecheck'] = 'Automatisch auf Updates und Sicherheitswarnungen prüfen? DokuWiki muss sich dafür mit update.dokuwiki.org verbinden.'; $lang['userewrite'] = 'URL rewriting'; $lang['useslash'] = 'Schrägstrich (/) als Namensraumtrenner in URLs verwenden'; @@ -116,6 +122,7 @@ $lang['notify'] = 'Änderungsmitteilungen an diese E-Mail-Adresse $lang['registernotify'] = 'Information über neu registrierte Nutzer an diese E-Mail-Adresse senden'; $lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mails'; $lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen'; +$lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.'; $lang['gzip_output'] = 'Seiten mit gzip komprimiert ausliefern'; $lang['gdlib'] = 'GD Lib Version'; $lang['im_convert'] = 'Pfad zu ImageMagicks-Konvertierwerkzeug'; @@ -139,11 +146,13 @@ $lang['rss_content'] = 'Welche Inhalte sollen im XML-Feed dargestellt $lang['rss_update'] = 'XML-Feed Aktualisierungsintervall (Sekunden)'; $lang['recent_days'] = 'Wieviele letzte Änderungen sollen einsehbar bleiben? (Tage)'; $lang['rss_show_summary'] = 'Bearbeitungs-Zusammenfassung im XML-Feed anzeigen'; +$lang['rss_media'] = 'Welche Änderungen sollen im XML-Feed angezeigt werden?'; $lang['target____wiki'] = 'Zielfenster für interne Links (target Attribut)'; $lang['target____interwiki'] = 'Zielfenster für InterWiki-Links (target Attribut)'; $lang['target____extern'] = 'Zielfenster für Externe Links (target Attribut)'; $lang['target____media'] = 'Zielfenster für (Bild-)Dateien (target Attribut)'; $lang['target____windows'] = 'Zielfenster für Windows Freigaben (target Attribut)'; +$lang['dnslookups'] = 'DokuWiki löst die IP-Adressen von Benutzern zu deren Hostnamen auf. Wenn du einen langsamen, unbrauchbaren DNS-Server verwendest oder die Funktion nicht benötigst, dann sollte diese Option deaktivert sein.'; $lang['proxy____host'] = 'Proxy-Server'; $lang['proxy____port'] = 'Proxy-Port'; $lang['proxy____user'] = 'Proxy Nutzername'; diff --git a/lib/plugins/config/lang/ko/intro.txt b/lib/plugins/config/lang/ko/intro.txt index 895a8c79e55b8d7f8014a5229b5dd29385c8f1c3..f6b76ecfcf8c27fd871b2fc93131cf16e513b1c2 100644 --- a/lib/plugins/config/lang/ko/intro.txt +++ b/lib/plugins/config/lang/ko/intro.txt @@ -1,8 +1,7 @@ ====== 환경 ì„¤ì • 관리 ====== -DokuWiki ì„¤ì¹˜í• ë•Œ ì„¤ì •ì„ ë³€ê²½í•˜ê¸° 위해 사용하는 페ì´ì§€ìž…니다. ê° ì„¤ì •ì— ëŒ€í•œ ìžì„¸í•œ ë„움ë§ì´ 필요하다면 [[doku>ko:config|ì„¤ì • 문서 (í•œêµì–´)]]와 [[doku>config|ì„¤ì • 문서(ì˜ì–´)]]를 ì°¸ê³ í•˜ì„¸ìš”. +DokuWiki ì„¤ì¹˜í• ë•Œ ì„¤ì •ì„ ë³€ê²½í•˜ê¸° 위해 사용하는 페ì´ì§€ìž…니다. ê° ì„¤ì •ì— ëŒ€í•œ ìžì„¸í•œ ë„움ë§ì´ 필요하다면 [[doku>ko:config|ì„¤ì • 문서 (í•œêµì–´)]]와 [[doku>config|ì„¤ì • 문서 (ì˜ì–´)]]를 ì°¸ê³ í•˜ì„¸ìš”. -플러그ì¸ì— 대한 ìžì„¸í•œ ì •ë³´ê°€ 필요하다면 [[doku>plugin:config|í”ŒëŸ¬ê·¸ì¸ ì„¤ì •]] 문서를 ì°¸ê³ í•˜ì„¸ìš”. ë¶‰ì€ ë°°ê²½ìƒ‰ìœ¼ë¡œ ë³´ì´ëŠ” ì„¤ì •ì€ ì´ í”ŒëŸ¬ê·¸ì¸ì—ì„œ 변경하지 못하ë„ë¡ ë˜ì–´ìžˆìŠµë‹ˆë‹¤. 파란 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ ê¸°ë³¸ ì„¤ì •ê°’ì„ ê°€ì§€ê³ ìžˆìŠµë‹ˆë‹¤. 하얀색 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ íŠ¹ë³„í•œ 설치를 위해 ì„¤ì •ë˜ì–´ 있습니다. 파란색과 하얀색 배경으로 ëœ ì„¤ì •ì€ ìˆ˜ì • 가능합니다. - -ì´ íŽ˜ì´ì§€ë¥¼ ë내기 ì „ì— **ì €ìž¥**ë²„íŠ¼ì„ ëˆ„ë¥´ì§€ 않으면 ì„¤ì •ê°’ì€ ì ìš©ë˜ì§€ 않습니다. +플러그ì¸ì— 대한 ìžì„¸í•œ ì •ë³´ê°€ 필요하다면 [[doku>plugin:config|í”ŒëŸ¬ê·¸ì¸ ì„¤ì •]] 문서를 ì°¸ê³ í•˜ì„¸ìš”. 빨간 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ ì´ í”ŒëŸ¬ê·¸ì¸ì—ì„œ 변경하지 못하ë„ë¡ ë˜ì–´ìžˆìŠµë‹ˆë‹¤. 파란 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ ê¸°ë³¸ ì„¤ì •ê°’ì„ ê°€ì§€ê³ ìžˆìŠµë‹ˆë‹¤. 하얀 배경색으로 ë³´ì´ëŠ” ì„¤ì •ì€ íŠ¹ë³„í•œ 설치를 위해 ì„¤ì •ë˜ì–´ 있습니다. 파란색과 하얀색 배경으로 ëœ ì„¤ì •ì€ ìˆ˜ì •ì´ ê°€ëŠ¥í•©ë‹ˆë‹¤. +ì´ íŽ˜ì´ì§€ë¥¼ ë내기 ì „ì— **ì €ìž¥** ë²„íŠ¼ì„ ëˆ„ë¥´ì§€ 않으면 ì„¤ì •ê°’ì€ ì ìš©ë˜ì§€ 않습니다. diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index 191c08de6933c893ad5a49108c2ea5652963bf1c..5f90044e4c0ba891364b7ad106b332e6b7a799c5 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -13,7 +13,7 @@ */ $lang['menu'] = '환경 ì„¤ì •'; $lang['error'] = 'ìž˜ëª»ëœ ê°’ ë•Œë¬¸ì— ì„¤ì •ì„ ë³€ê²½í• ìˆ˜ 없습니다. ìˆ˜ì •í•œ ê°’ì„ ê²€í† í•˜ê³ í™•ì¸ì„ 누르세요. -<br />ìž˜ëª»ëœ ê°’ì€ ë¶‰ì€ ì„ ìœ¼ë¡œ 둘러싸여 있습니다.'; +<br />ìž˜ëª»ëœ ê°’ì€ ë¹¨ê°„ ì„ ìœ¼ë¡œ 둘러싸여 있습니다.'; $lang['updated'] = 'ì„¤ì •ì´ ì„±ê³µì 으로 변경ë˜ì—ˆìŠµë‹ˆë‹¤.'; $lang['nochoice'] = '(다른 ì„ íƒì´ 불가능합니다.)'; $lang['locked'] = '환경 ì„¤ì • 파ì¼ì„ ìˆ˜ì •í• ìˆ˜ 없습니다. ì˜ë„í•œ í–‰ë™ì´ 아니ë¼ë©´,<br /> @@ -42,22 +42,22 @@ $lang['_template_sufix'] = '템플릿 ì„¤ì •'; $lang['_msg_setting_undefined'] = 'ì„¤ì •ë˜ì§€ ì•Šì€ ë©”íƒ€ë°ì´í„°.'; $lang['_msg_setting_no_class'] = 'ì„¤ì •ë˜ì§€ ì•Šì€ í´ëž˜ìŠ¤.'; $lang['_msg_setting_no_default'] = '기본값 ì—†ìŒ.'; -$lang['title'] = '위키 ì œëª©(위키 ì´ë¦„)'; +$lang['title'] = '위키 ì œëª© (위키 ì´ë¦„)'; $lang['start'] = 'ê° ì´ë¦„공간ì—ì„œ ì‚¬ìš©í• ì‹œìž‘ 문서 ì´ë¦„'; $lang['lang'] = 'ì¸í„°íŽ˜ì´ìŠ¤ 언어'; -$lang['template'] = '템플릿(위키 ë””ìžì¸)'; -$lang['tagline'] = '태그 ë¼ì¸(í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨)'; -$lang['sidebar'] = '사ì´ë“œë°” 문서 ì´ë¦„(í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨). 비워ë‘ë©´ 사ì´ë“œë°”를 비활성화함'; -$lang['license'] = '컨í…íŠ¸ì— ì–´ë–¤ ë¼ì´ì„ 스를 ì ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'; +$lang['template'] = '템플릿 (위키 ë””ìžì¸)'; +$lang['tagline'] = '태그 ë¼ì¸ (í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨)'; +$lang['sidebar'] = '사ì´ë“œë°” 문서 ì´ë¦„ (í…œí”Œë¦¿ì´ ì§€ì›í• ë•Œì— í•œí•¨). 비워ë‘ë©´ 사ì´ë“œë°”를 비활성화'; +$lang['license'] = '콘í…ì¸ ì— ì–´ë–¤ ë¼ì´ì„ 스를 ì ìš©í•˜ê² ìŠµë‹ˆê¹Œ?'; $lang['savedir'] = 'ë°ì´íƒ€ ì €ìž¥ ë””ë ‰í† ë¦¬'; -$lang['basedir'] = '서버 경로(예를 들어 <code>/dokuwiki/</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; -$lang['baseurl'] = '서버 URL(예를 들어 <code>http://www.yourserver.com</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; -$lang['cookiedir'] = 'ì¿ í‚¤ 위치. 비워ë‘ë©´ 기본 url 위치로 ì§€ì •ë©ë‹ˆë‹¤.'; +$lang['basedir'] = '서버 경로 (예를 들어 <code>/dokuwiki/</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; +$lang['baseurl'] = '서버 URL (예를 들어 <code>http://www.yourserver.com</code>). ìžë™ ê°ì§€ë¥¼ í•˜ë ¤ë©´ 비우세요.'; +$lang['cookiedir'] = 'ì¿ í‚¤ 위치. 비워ë‘ë©´ 기본 URL 위치로 ì§€ì •ë©ë‹ˆë‹¤.'; $lang['dmode'] = 'ë””ë ‰í† ë¦¬ ìƒì„± 모드'; $lang['fmode'] = 'íŒŒì¼ ìƒì„± 모드'; $lang['allowdebug'] = '디버그 허용 <b>필요하지 않으면 금지!</b>'; $lang['recent'] = '최근 ë°”ë€ ë¬¸ì„œë‹¹ í•ëª© 수'; -$lang['recent_days'] = '최근 ë°”ë€ ë¬¸ì„œ 기준 시간(ë‚ ì§œ)'; +$lang['recent_days'] = '최근 ë°”ë€ ë¬¸ì„œ 기준 시간 (ë‚ ì§œ)'; $lang['breadcrumbs'] = '위치 "추ì " 수. 0으로 ì„¤ì •í•˜ë©´ 비활성화함.'; $lang['youarehere'] = '계층형 위치 추ì (ë‹¤ìŒ ìœ„ì˜ ì˜µì…˜ì„ ë¹„í™œì„±í™”í•˜ê³ ì‹¶ìŠµë‹ˆë‹¤)'; $lang['fullpath'] = '문서 í•˜ë‹¨ì— ì „ì²´ 경로 보여주기'; @@ -75,7 +75,7 @@ $lang['useheading'] = '문서 ì´ë¦„으로 첫 문단 ì œëª© 사용'; $lang['sneaky_index'] = '기본ì 으로 DokuWiki는 ìƒ‰ì¸ ëª©ë¡ì— ëª¨ë“ ì´ë¦„ê³µê°„ì„ ë³´ì—¬ì¤ë‹ˆë‹¤. ì´ ì˜µì…˜ì„ ì„¤ì •í•˜ë©´ 사용ìžê°€ ì½ê¸° ê¶Œí•œì„ ê°€ì§€ê³ ìžˆì§€ ì•Šì€ ì´ë¦„ê³µê°„ì€ ë³´ì—¬ì£¼ì§€ 않습니다. ì ‘ê·¼ 가능한 하위 ì´ë¦„ê³µê°„ì„ ë³´ì´ì§€ 않게 ì„¤ì •í•˜ë©´ ìžë™ìœ¼ë¡œ ì„¤ì •ë©ë‹ˆë‹¤. íŠ¹ì • ACL ì„¤ì •ì€ ìƒ‰ì¸ ì‚¬ìš©ì´ ë¶ˆê°€ëŠ¥í•˜ê²Œ í• ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤.'; $lang['hidepages'] = '사ì´íŠ¸ë§µê³¼ 기타 ìžë™ 색ì¸ê³¼ ê°™ì€ ì°¾ê¸°ì—ì„œ ì •ê·œ 표현ì‹ê³¼ ì¼ì¹˜í•˜ëŠ” 문서 숨기기'; -$lang['useacl'] = 'ì ‘ê·¼ ì œì–´ 목ë¡(ACL) 사용'; +$lang['useacl'] = 'ì ‘ê·¼ ì œì–´ ëª©ë¡ (ACL) 사용'; $lang['autopasswd'] = 'ìžë™ìœ¼ë¡œ 만들어진 비밀번호'; $lang['authtype'] = 'ì¸ì¦ ë°±-엔드'; $lang['passcrypt'] = '비밀번호 암호화 방법'; @@ -84,25 +84,25 @@ $lang['superuser'] = 'ìŠˆí¼ ìœ ì € - ACL ì„¤ì •ê³¼ ìƒê´€ì—†ì´ 모 $lang['manager'] = 'ê´€ë¦¬ìž - 관리 ê¸°ëŠ¥ì„ ì‚¬ìš©í• ìˆ˜ 있는 그룹ì´ë‚˜ 사용ìž. 사용ìž1,@그룹1,사용ìž2 쉼표로 구분한 목ë¡'; $lang['profileconfirm'] = 'ê°œì¸ ì •ë³´ë¥¼ 바꿀 ë•Œ 비밀번호 다시 확ì¸'; $lang['rememberme'] = 'í•ìƒ ë¡œê·¸ì¸ ì •ë³´ ì €ìž¥ 허용 (기억하기)'; -$lang['disableactions'] = 'DokuWiki í™œë™ ê¸ˆì§€'; +$lang['disableactions'] = 'DokuWiki í™œë™ ë¹„í™œì„±í™”'; $lang['disableactions_check'] = '검사'; $lang['disableactions_subscription'] = 'êµ¬ë… ì‹ ì²/해지'; $lang['disableactions_wikicode'] = 'ë‚´ìš© 보기/ì›ì‹œ 내보대기'; -$lang['disableactions_other'] = '다른 활ë™(쉼표로 구분)'; -$lang['auth_security_timeout'] = 'ì¸ì¦ 보안 초과 시간(ì´ˆ)'; +$lang['disableactions_other'] = '다른 í™œë™ (쉼표로 구분)'; +$lang['auth_security_timeout'] = 'ì¸ì¦ 보안 초과 시간 (ì´ˆ)'; $lang['securecookie'] = 'HTTPSë¡œ 보내진 ì¿ í‚¤ëŠ” HTTPSì—만 ì ìš© í• ê¹Œìš”? ìœ„í‚¤ì˜ ë¡œê·¸ì¸ íŽ˜ì´ì§€ë§Œ SSLë¡œ ì•”í˜¸í™”í•˜ê³ ìœ„í‚¤ 문서는 ê·¸ë ‡ì§€ ì•Šì€ ê²½ìš° 비활성화 합니다.'; $lang['remote'] = 'ì›ê²© API를 활성화 합니다. ì´ í•ëª©ì„ 허용하면 XML-RPC ë° ê¸°íƒ€ ë©”ì¹´ë‹ˆì¦˜ì„ í†µí•´ 다른 어플리케ì´ì…˜ìœ¼ë¡œ ì ‘ê·¼ê°€ëŠ¥í•©ë‹ˆë‹¤.'; $lang['remoteuser'] = 'ì´ í•ëª©ì— ìž…ë ¥ëœ ì‰¼í‘œë¡œ ë‚˜ëˆ ì§„ 그룹ì´ë‚˜ 사용ìžì—게 ì›ê²© API ì ‘ê·¼ì„ ì œí•œí•©ë‹ˆë‹¤. 빈칸으로 ë‘ë©´ 모ë‘ì—게 허용합니다.'; $lang['usewordblock'] = '금지 단어를 사용해 스팸 막기'; $lang['relnofollow'] = '외부 ë§í¬ì— rel="nofollow" 사용'; -$lang['indexdelay'] = 'ìƒ‰ì¸ ì—°ê¸° 시간(ì´ˆ)'; +$lang['indexdelay'] = 'ìƒ‰ì¸ ì—°ê¸° 시간 (ì´ˆ)'; $lang['mailguard'] = 'ì´ë©”ì¼ ì£¼ì†Œë¥¼ 알아볼 수 없게 하기'; $lang['iexssprotect'] = '올린 파ì¼ì˜ 악성 ìžë°”스í¬ë¦½íŠ¸, HTML 코드 가능성 여부를 검사'; $lang['usedraft'] = '편집하는 ë™ì•ˆ ìžë™ìœ¼ë¡œ 문서 초안 ì €ìž¥'; $lang['htmlok'] = 'HTML 내장 허용'; $lang['phpok'] = 'PHP 내장 허용'; -$lang['locktime'] = '쵀대 íŒŒì¼ ìž ê¸ˆ 시간(ì´ˆ)'; -$lang['cachetime'] = '최대 ìºì‰¬ ìƒì¡´ 시간(ì´ˆ)'; +$lang['locktime'] = '최대 íŒŒì¼ ìž ê¸ˆ 시간(ì´ˆ)'; +$lang['cachetime'] = '최대 ìºì‹œ ìƒì¡´ 시간 (ì´ˆ)'; $lang['target____wiki'] = '내부 ë§í¬ì— 대한 타겟 ì°½'; $lang['target____interwiki'] = 'ì¸í„°ìœ„키 ë§í¬ì— 대한 타겟 ì°½'; $lang['target____extern'] = '외부 ë§í¬ì— 대한 타겟 ì°½'; @@ -114,7 +114,7 @@ $lang['refshow'] = 'ìœ„ì˜ ì„¤ì •ì´ í™œì„±í™”ë˜ì—ˆì„ ë•Œ ë³´ì—¬ $lang['gdlib'] = 'GD ë¼ì´ë¸ŒëŸ¬ë¦¬ ë²„ì „'; $lang['im_convert'] = 'ImageMagick 변환 ë„구 위치'; $lang['jpg_quality'] = 'JPG 압축 품질 (0-100)'; -$lang['fetchsize'] = 'fetch.phpê°€ 외부ì—ì„œ ë‹¤ìš´ë¡œë“œí• ìˆ˜ë„ ìžˆëŠ” 최대 í¬ê¸°(ë°”ì´íŠ¸)'; +$lang['fetchsize'] = 'fetch.phpê°€ 외부ì—ì„œ ë‹¤ìš´ë¡œë“œí• ìˆ˜ë„ ìžˆëŠ” 최대 í¬ê¸° (ë°”ì´íŠ¸)'; $lang['subscribers'] = '사용ìžê°€ ì´ë©”ì¼ë¡œ 문서 ë°”ë€œì— êµ¬ë…하ë„ë¡ í—ˆìš©'; $lang['subscribe_time'] = 'êµ¬ë… ëª©ë¡ê³¼ ìš”ì•½ì´ ë³´ë‚´ì§ˆ 경과 시간 (ì´ˆ); ì´ ê²ƒì€ recent_daysì—ì„œ ì„¤ì •ëœ ì‹œê°„ë³´ë‹¤ 작아야 합니다.'; $lang['notify'] = 'í•ìƒ ì´ ì´ë©”ì¼ ì£¼ì†Œë¡œ 바뀜 ì•Œë¦¼ì„ ë³´ëƒ„'; @@ -122,15 +122,15 @@ $lang['registernotify'] = 'í•ìƒ 새 사용ìží•œí…Œ ì´ ì´ë©”ì¼ ì£¼ $lang['mailfrom'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ ë°œì‹ ìž'; $lang['mailprefix'] = 'ìžë™ìœ¼ë¡œ 보내지는 ë©”ì¼ì˜ ì œëª© ë§ë¨¸ë¦¬ ë‚´ìš©. ë¹„ì› ì„ ê²½ìš° 위키 ì œëª© 사용'; $lang['htmlmail'] = 'ìš©ëŸ‰ì€ ì¡°ê¸ˆ ë” í¬ì§€ë§Œ 보기 ì¢‹ì€ HTML 태그가 í¬í•¨ëœ ë©”ì¼ì„ 발송합니다. í…ìŠ¤íŠ¸ë§Œì˜ ë©”ì¼ì„ ë³´ë‚´ê³ ìží•˜ë©´ 비활성화하세요.'; -$lang['sitemap'] = '구글 사ì´íŠ¸ë§µ ìƒì„±(ë‚ ì§œ). 0ì¼ ê²½ìš° 비활성화'; -$lang['rss_type'] = 'XML 피드 타잎'; +$lang['sitemap'] = '구글 사ì´íŠ¸ë§µ ìƒì„± (ë‚ ì§œ). 0ì¼ ê²½ìš° 비활성화'; +$lang['rss_type'] = 'XML 피드 타입'; $lang['rss_linkto'] = 'XML 피드 ë§í¬ ì •ë³´'; $lang['rss_content'] = 'XML 피드 í•ëª©ì— 표시ë˜ëŠ” ë‚´ìš©ì€?'; -$lang['rss_update'] = 'XML 피드 ê°±ì‹ ì£¼ê¸°(ì´ˆ)'; +$lang['rss_update'] = 'XML 피드 ì—…ë°ì´íŠ¸ 주기 (ì´ˆ)'; $lang['rss_show_summary'] = 'XML 피드 ì œëª©ì—ì„œ ìš”ì•½ì •ë³´ 보여주기'; $lang['rss_media'] = 'ì–´ë–¤ 규격으로 XML 피드를 ë°›ì•„ë³´ì‹œê² ìŠµë‹ˆê¹Œ?'; $lang['updatecheck'] = 'ì—…ë°ì´íŠ¸ì™€ 보안 ë¬¸ì œë¥¼ ê²€ì‚¬í• ê¹Œìš”? ì´ ê¸°ëŠ¥ì„ ì‚¬ìš©í•˜ë ¤ë©´ DokuWiki를 update.dokuwiki.orgì— ì—°ê²°í•´ì•¼ 합니다.'; -$lang['userewrite'] = 'URL rewriting기능 사용'; +$lang['userewrite'] = '멋진 URL 사용'; $lang['useslash'] = 'URLì—ì„œ ì´ë¦„ 구분ìžë¡œ 슬래시 ë¬¸ìž ì‚¬ìš©'; $lang['sepchar'] = '문서 ì´ë¦„ 단어 구분ìž'; $lang['canonical'] = 'ì™„ì „í•œ canonical URL 사용'; @@ -179,10 +179,10 @@ $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; $lang['rss_content_o_abstract'] = '개요'; -$lang['rss_content_o_diff'] = '통합 ì°¨ì´ì 목ë¡'; -$lang['rss_content_o_htmldiff'] = 'HTML ì°¨ì´ì ëª©ë¡ í˜•ì‹'; -$lang['rss_content_o_html'] = '최대로 HTML 페ì´ì§€ ë‚´ìš©'; -$lang['rss_linkto_o_diff'] = 'ì°¨ì´ì 보기'; +$lang['rss_content_o_diff'] = '통합 ì°¨ì´ ëª©ë¡'; +$lang['rss_content_o_htmldiff'] = 'HTML ì°¨ì´ ëª©ë¡ í˜•ì‹'; +$lang['rss_content_o_html'] = '최대 HTML 페ì´ì§€ ë‚´ìš©'; +$lang['rss_linkto_o_diff'] = 'ì°¨ì´ ë³´ê¸°'; $lang['rss_linkto_o_page'] = 'ë°”ë€ ë¬¸ì„œ 보기'; $lang['rss_linkto_o_rev'] = 'ë°”ë€ ëª©ë¡ ë³´ê¸°'; $lang['rss_linkto_o_current'] = '현재 문서 보기'; @@ -195,10 +195,10 @@ $lang['xsendfile_o_2'] = '표준 X-Sendfile í—¤ë”'; $lang['xsendfile_o_3'] = '비공개 Nginx X-Accel-Redirect í—¤ë”'; $lang['showuseras_o_loginname'] = 'ë¡œê·¸ì¸ ì´ë¦„'; $lang['showuseras_o_username'] = 'ì‚¬ìš©ìž ì´ë¦„'; -$lang['showuseras_o_email'] = 'ì‚¬ìš©ìž ì´ë©”ì¼ ì£¼ì†Œ(ë©”ì¼ ì£¼ì†Œ 보호 ì„¤ì •ì— ë”°ë¼ ì•ˆë³´ì¼ ìˆ˜ 있ìŒ)'; +$lang['showuseras_o_email'] = 'ì‚¬ìš©ìž ì´ë©”ì¼ ì£¼ì†Œ (ë©”ì¼ ì£¼ì†Œ 보호 ì„¤ì •ì— ë”°ë¼ ì•ˆë³´ì¼ ìˆ˜ 있ìŒ)'; $lang['showuseras_o_email_link'] = 'mailto: linkë¡œ 표현ë ì‚¬ìš©ìž ì´ë©”ì¼ ì£¼ì†Œ'; $lang['useheading_o_0'] = '아니오'; $lang['useheading_o_navigation'] = '둘러보기ì—만'; $lang['useheading_o_content'] = '위키 ë‚´ìš©ì—만'; $lang['useheading_o_1'] = 'í•ìƒ'; -$lang['readdircache'] = 'readdir ìºì‰¬ë¥¼ 위한 최대 시간 (ì´ˆ)'; +$lang['readdircache'] = 'readdir ìºì‹œë¥¼ 위한 최대 시간 (ì´ˆ)'; diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php index 77b8d6a1a1d51e1fc292927258492ef863b5a0cb..e0c9d7d7c8e84c0c1f0b0278c5e1543f5e9cbe5a 100644 --- a/lib/plugins/config/lang/nl/lang.php +++ b/lib/plugins/config/lang/nl/lang.php @@ -36,6 +36,8 @@ $lang['_anti_spam'] = 'Anti-spaminstellingen'; $lang['_editing'] = 'Pagina-wijzigingsinstellingen'; $lang['_links'] = 'Link-instellingen'; $lang['_media'] = 'Media-instellingen'; +$lang['_notifications'] = 'Meldingsinstellingen'; +$lang['_syndication'] = 'Syndication-instellingen'; $lang['_advanced'] = 'Geavanceerde instellingen'; $lang['_network'] = 'Netwerkinstellingen'; $lang['_plugin_sufix'] = 'Plugin-instellingen'; @@ -43,26 +45,29 @@ $lang['_template_sufix'] = 'Sjabloon-instellingen'; $lang['_msg_setting_undefined'] = 'Geen metadata voor deze instelling.'; $lang['_msg_setting_no_class'] = 'Geen class voor deze instelling.'; $lang['_msg_setting_no_default'] = 'Geen standaard waarde.'; -$lang['fmode'] = 'Bestandaanmaak-modus (file creation mode)'; -$lang['dmode'] = 'Directory-aanmaak-modus (directory creation mode)'; +$lang['title'] = 'Titel van de wiki'; +$lang['start'] = 'Naam startpagina'; $lang['lang'] = 'Taal'; +$lang['template'] = 'Sjabloon ofwel het design van de wiki.'; +$lang['tagline'] = 'Ondertitel (als het sjabloon dat ondersteunt)'; +$lang['sidebar'] = 'Zijbalk-paginanaam (als het sjabloon dat ondersteunt), leeg veld betekent geen zijbalk'; +$lang['license'] = 'Onder welke licentie zou je tekst moeten worden gepubliceerd?'; +$lang['savedir'] = 'Directory om data op te slaan'; $lang['basedir'] = 'Basisdirectory'; $lang['baseurl'] = 'Basis-URL'; -$lang['savedir'] = 'Directory om data op te slaan'; $lang['cookiedir'] = 'Cookie pad. Laat leeg om de basis URL te gebruiken.'; -$lang['start'] = 'Naam startpagina'; -$lang['title'] = 'Titel van de wiki'; -$lang['template'] = 'Sjabloon'; -$lang['license'] = 'Onder welke licentie zou je tekst moeten worden gepubliceerd?'; -$lang['fullpath'] = 'Volledig pad van pagina\'s in de footer weergeven'; +$lang['dmode'] = 'Directory-aanmaak-modus (directory creation mode)'; +$lang['fmode'] = 'Bestandaanmaak-modus (file creation mode)'; +$lang['allowdebug'] = 'Debug toestaan <b>uitzetten indien niet noodzakelijk!</b>'; $lang['recent'] = 'Recente wijzigingen'; +$lang['recent_days'] = 'Hoeveel recente wijzigingen bewaren (dagen)'; $lang['breadcrumbs'] = 'Aantal broodkruimels'; $lang['youarehere'] = 'Hierarchische broodkruimels'; +$lang['fullpath'] = 'Volledig pad van pagina\'s in de footer weergeven'; $lang['typography'] = 'Breng typografische wijzigingen aan'; -$lang['htmlok'] = 'Embedded HTML toestaan'; -$lang['phpok'] = 'Embedded PHP toestaan'; $lang['dformat'] = 'Datum formaat (zie de PHP <a href="http://www.php.net/strftime">strftime</a> functie)'; $lang['signature'] = 'Ondertekening'; +$lang['showuseras'] = 'Hoe de gebruiker die de pagina het laatst wijzigde weergeven'; $lang['toptoclevel'] = 'Bovenste niveau voor inhoudsopgave'; $lang['tocminheads'] = 'Minimum aantal koppen dat bepaald of een index gemaakt wordt'; $lang['maxtoclevel'] = 'Laagste niveau voor inhoudsopgave'; @@ -70,16 +75,8 @@ $lang['maxseclevel'] = 'Laagste sectiewijzigingsniveau'; $lang['camelcase'] = 'CamelCase gebruiken voor links'; $lang['deaccent'] = 'Paginanamen ontdoen van vreemde tekens'; $lang['useheading'] = 'Eerste kopje voor paginanaam gebruiken'; -$lang['refcheck'] = 'Controleer verwijzingen naar media'; -$lang['refshow'] = 'Aantal te tonen mediaverwijzingen'; -$lang['allowdebug'] = 'Debug toestaan <b>uitzetten indien niet noodzakelijk!</b>'; -$lang['mediarevisions'] = 'Media revisies activeren?'; -$lang['usewordblock'] = 'Blokkeer spam op basis van woordenlijst'; -$lang['indexdelay'] = 'Uitstel voor indexeren (sec)'; -$lang['relnofollow'] = 'Gebruik rel="nofollow" voor externe links'; -$lang['mailguard'] = 'E-mailadressen onherkenbaar maken'; -$lang['iexssprotect'] = 'Controleer geüploade bestanden op mogelijk schadelijke JavaScript of HTML code'; -$lang['showuseras'] = 'Hoe de gebruiker die de pagina het laatst wijzigde weergeven'; +$lang['sneaky_index'] = 'Met de standaardinstellingen zal DokuWiki alle namespaces laten zien in de index. Het inschakelen van deze optie zorgt ervoor dat de namespaces waar de gebruiker geen leestoegang tot heeft, verborgen worden. Dit kan resulteren in het verbergen van subnamespaces waar de gebruiker wel toegang to heeft. Dit kan de index onbruikbaar maken met bepaalde ACL-instellingen.'; +$lang['hidepages'] = 'Verberg deze pagina\'s (regular expressions)'; $lang['useacl'] = 'Gebruik access control lists'; $lang['autopasswd'] = 'Zelf wachtwoorden genereren'; $lang['authtype'] = 'Authenticatiemechanisme'; @@ -88,64 +85,76 @@ $lang['defaultgroup'] = 'Standaardgroep'; $lang['superuser'] = 'Superuser - een groep of gebruiker of kommalijst (gebruiker1,@groep1,gebruiker2) met volledige toegang tot alle pagina\'s en functies, ongeacht de ACL instellingen'; $lang['manager'] = 'Beheerder - een groep of gebruiker of kommalijst (gebruiker1,@groep1,gebruiker2) met toegang tot bepaalde beheersfunctionaliteit'; $lang['profileconfirm'] = 'Bevestig profielwijzigingen met wachtwoord'; +$lang['rememberme'] = 'Permanente login cookie toestaan (onthoud mij)'; $lang['disableactions'] = 'Aangevinkte DokuWiki-akties uitschakelen'; $lang['disableactions_check'] = 'Controleer'; $lang['disableactions_subscription'] = 'Inschrijven/opzeggen'; $lang['disableactions_wikicode'] = 'Bron bekijken/exporteer rauw'; $lang['disableactions_other'] = 'Andere akties (gescheiden door komma\'s)'; -$lang['sneaky_index'] = 'Met de standaardinstellingen zal DokuWiki alle namespaces laten zien in de index. Het inschakelen van deze optie zorgt ervoor dat de namespaces waar de gebruiker geen leestoegang tot heeft, verborgen worden. Dit kan resulteren in het verbergen van subnamespaces waar de gebruiker wel toegang to heeft. Dit kan de index onbruikbaar maken met bepaalde ACL-instellingen.'; $lang['auth_security_timeout'] = 'Authenticatiebeveiligings-timeout (seconden)'; $lang['securecookie'] = 'Moeten cookies die via HTTPS gezet zijn alleen via HTTPS verzonden worden door de browser? Zet deze optie uit als alleen het inloggen op de wiki beveiligd is, maar het gebruik verder niet.'; +$lang['remote'] = 'Activeer het remote API-systeem. Hiermee kunnen andere applicaties de wiki benaderen via XML-RPC of andere mechanismen.'; +$lang['remoteuser'] = 'Beperk toegang tot de remote API tot deze komma-lijst van groepen of gebruikers. Leeg betekent toegang voor iedereen.'; +$lang['usewordblock'] = 'Blokkeer spam op basis van woordenlijst'; +$lang['relnofollow'] = 'Gebruik rel="nofollow" voor externe links'; +$lang['indexdelay'] = 'Uitstel voor indexeren (sec)'; +$lang['mailguard'] = 'E-mailadressen onherkenbaar maken'; +$lang['iexssprotect'] = 'Controleer geüploade bestanden op mogelijk schadelijke JavaScript of HTML code'; +$lang['usedraft'] = 'Sla automatisch een concept op tijdens het wijzigen'; +$lang['htmlok'] = 'Embedded HTML toestaan'; +$lang['phpok'] = 'Embedded PHP toestaan'; +$lang['locktime'] = 'Maximum leeftijd voor lockbestanden (sec)'; +$lang['cachetime'] = 'Maximum leeftijd voor cache (sec)'; +$lang['target____wiki'] = 'Doelvenster voor interne links'; +$lang['target____interwiki'] = 'Doelvenster voor interwiki-links'; +$lang['target____extern'] = 'Doelvenster voor externe links'; +$lang['target____media'] = 'Doelvenster voor medialinks'; +$lang['target____windows'] = 'Doelvenster voor windows links'; +$lang['mediarevisions'] = 'Media revisies activeren?'; +$lang['refcheck'] = 'Controleer verwijzingen naar media'; +$lang['refshow'] = 'Aantal te tonen mediaverwijzingen'; +$lang['gdlib'] = 'Versie GD Lib '; +$lang['im_convert'] = 'Path naar ImageMagick\'s convert tool'; +$lang['jpg_quality'] = 'JPG compressiekwaliteit (0-100)'; +$lang['fetchsize'] = 'Maximum grootte (bytes) die fetch.php mag downloaden van buiten'; +$lang['subscribers'] = 'Ondersteuning pagina-inschrijving aanzetten'; +$lang['subscribe_time'] = 'Inschrijvingsmeldingen en samenvattingen worden na deze tijdsduur (in seconden) verzonden. Deze waarde dient kleiner te zijn dan de tijd ingevuld bij "Hoeveel recente wijzigingen bewaren (dagen)"'; +$lang['notify'] = 'Stuur e-mailnotificaties naar dit adres'; +$lang['registernotify'] = 'Stuur informatie over nieuw aangemelde gebruikers naar dit e-mailadres'; +$lang['mailfrom'] = 'E-mailadres voor automatische e-mail'; +$lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email'; +$lang['htmlmail'] = 'Zend multipart HTML e-mail. Dit ziet er beter uit, maar is groter. Uitschakelen betekent e-mail in platte tekst.'; +$lang['sitemap'] = 'Genereer Google sitemap (dagen). 0 betekent uitschakelen.'; +$lang['rss_type'] = 'XML feed type'; +$lang['rss_linkto'] = 'XML feed linkt naar'; +$lang['rss_content'] = 'Wat moet er in de XML feed items weergegeven worden?'; +$lang['rss_update'] = 'XML feed verversingsinterval (sec)'; +$lang['rss_show_summary'] = 'XML feed samenvatting in titel weergeven'; +$lang['rss_media'] = 'Welk type verandering moet in de XML feed worden weergegeven?'; $lang['updatecheck'] = 'Controleer op nieuwe versies en beveiligingswaarschuwingen? DokuWiki moet hiervoor contact opnemen met update.dokuwiki.org.'; $lang['userewrite'] = 'Gebruik nette URL\'s'; $lang['useslash'] = 'Gebruik slash (/) als scheiding tussen namepaces in URL\'s'; -$lang['usedraft'] = 'Sla automatisch een concept op tijdens het wijzigen'; $lang['sepchar'] = 'Woordscheider in paginanamen'; $lang['canonical'] = 'Herleid URL\'s tot hun basisvorm'; $lang['fnencode'] = 'Methode om niet-ASCII bestandsnamen te coderen.'; $lang['autoplural'] = 'Controleer op meervoudsvormen in links'; $lang['compression'] = 'Compressiemethode voor attic-bestanden'; -$lang['cachetime'] = 'Maximum leeftijd voor cache (sec)'; -$lang['locktime'] = 'Maximum leeftijd voor lockbestanden (sec)'; -$lang['fetchsize'] = 'Maximum grootte (bytes) die fetch.php mag downloaden van buiten'; -$lang['notify'] = 'Stuur e-mailnotificaties naar dit adres'; -$lang['registernotify'] = 'Stuur informatie over nieuw aangemelde gebruikers naar dit e-mailadres'; -$lang['mailfrom'] = 'E-mailadres voor automatische e-mail'; -$lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email'; $lang['gzip_output'] = 'Gebruik gzip Content-Encoding voor xhtml'; -$lang['gdlib'] = 'Versie GD Lib '; -$lang['im_convert'] = 'Path naar ImageMagick\'s convert tool'; -$lang['jpg_quality'] = 'JPG compressiekwaliteit (0-100)'; -$lang['subscribers'] = 'Ondersteuning pagina-inschrijving aanzetten'; -$lang['subscribe_time'] = 'Inschrijvingsmeldingen en samenvattingen worden na deze tijdsduur (in seconden) verzonden. Deze waarde dient kleiner te zijn dan de tijd ingevuld bij "Hoeveel recente wijzigingen bewaren (dagen)"'; $lang['compress'] = 'Compacte CSS en javascript output'; $lang['cssdatauri'] = 'Maximale omvang in bytes van in CSS gelinkte afbeeldingen die bij de stylesheet moeten worden ingesloten ter reductie van de HTTP request header overhead. Deze techniek werkt niet in IE7 en ouder! <code>400</code> tot <code>600</code> is een geschikte omvang. Stel de omvang in op <code>0</code> om deze functionaliteit uit te schakelen.'; -$lang['hidepages'] = 'Verberg deze pagina\'s (regular expressions)'; $lang['send404'] = 'Stuur "HTTP 404/Page Not Found" voor niet-bestaande pagina\'s'; -$lang['sitemap'] = 'Genereer Google sitemap (dagen)'; $lang['broken_iua'] = 'Is de ignore_user_abort functie onbruikbaar op uw systeem? Dit kan een onbruikbare zoekindex tot gevolg hebben. IIS+PHP/CGI staat hier bekend om. Zie <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a> voor meer informatie.'; $lang['xsendfile'] = 'Gebruik de X-Sendfile header om de webserver statische content te laten versturen? De webserver moet dit wel ondersteunen.'; $lang['renderer_xhtml'] = 'Weergavesysteem voor de standaard (xhtml) wiki-uitvoer'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; -$lang['rememberme'] = 'Permanente login cookie toestaan (onthoud mij)'; -$lang['rss_type'] = 'XML feed type'; -$lang['rss_linkto'] = 'XML feed linkt naar'; -$lang['rss_content'] = 'Wat moet er in de XML feed items weergegeven worden?'; -$lang['rss_update'] = 'XML feed verversingsinterval (sec)'; -$lang['recent_days'] = 'Hoeveel recente wijzigingen bewaren (dagen)'; -$lang['rss_show_summary'] = 'XML feed samenvatting in titel weergeven'; -$lang['target____wiki'] = 'Doelvenster voor interne links'; -$lang['target____interwiki'] = 'Doelvenster voor interwiki-links'; -$lang['target____extern'] = 'Doelvenster voor externe links'; -$lang['target____media'] = 'Doelvenster voor medialinks'; -$lang['target____windows'] = 'Doelvenster voor windows links'; +$lang['dnslookups'] = 'DokuWiki zoekt de hostnamen van IP-adressen van gebruikers die pagina wijzigen op. Schakel deze optie uit als je geen of een langzame DNS server hebt.'; $lang['proxy____host'] = 'Proxy server'; $lang['proxy____port'] = 'Proxy port'; $lang['proxy____user'] = 'Proxy gebruikersnaam'; $lang['proxy____pass'] = 'Proxy wachtwoord'; -$lang['proxy____ssl'] = 'Gebruik SSL om een connectie te maken met de proxy'; -$lang['proxy____except'] = 'Reguliere expressie om URL\'s te bepalen waarvoor de proxy overgeslaan moet worden.'; +$lang['proxy____ssl'] = 'Gebruik SSL om een verbinding te maken met de proxy'; +$lang['proxy____except'] = 'Reguliere expressie om URL\'s te bepalen waarvoor de proxy overgeslagen moet worden.'; $lang['safemodehack'] = 'Safemode hack aanzetten'; $lang['ftp____host'] = 'FTP server voor safemode hack'; $lang['ftp____port'] = 'FTP port voor safemode hack'; @@ -185,7 +194,7 @@ $lang['xsendfile_o_0'] = 'niet gebruiken'; $lang['xsendfile_o_1'] = 'Eigen lighttpd header (voor release 1.5)'; $lang['xsendfile_o_2'] = 'Standaard X-Sendfile header'; $lang['xsendfile_o_3'] = 'Propritary Nginx X-Accel-Redirect header'; -$lang['showuseras_o_loginname'] = 'loginnaam'; +$lang['showuseras_o_loginname'] = 'Loginnaam'; $lang['showuseras_o_username'] = 'Volledige naam'; $lang['showuseras_o_email'] = 'E-mailadres (onherkenbaar gemaakt volgens mailguard-instelling)'; $lang['showuseras_o_email_link'] = 'E-mailadres als mailto: link'; diff --git a/lib/plugins/config/lang/no/lang.php b/lib/plugins/config/lang/no/lang.php index ec97fe96622085cf03495e5c5128b3b41894fb24..b01637dd19a7190cbd50e3254d0ccb8b42037aa4 100644 --- a/lib/plugins/config/lang/no/lang.php +++ b/lib/plugins/config/lang/no/lang.php @@ -43,8 +43,8 @@ $lang['_links'] = 'Innstillinger for lenker'; $lang['_media'] = 'Innstillinger for mediafiler'; $lang['_advanced'] = 'Avanserte innstillinger'; $lang['_network'] = 'Nettverksinnstillinger'; -$lang['_plugin_sufix'] = '– innstillinger for tillegg'; -$lang['_template_sufix'] = '– innstillinger for mal'; +$lang['_plugin_sufix'] = '– innstillinger for tillegg'; +$lang['_template_sufix'] = '– innstillinger for mal'; $lang['_msg_setting_undefined'] = 'Ingen innstillingsmetadata'; $lang['_msg_setting_no_class'] = 'Ingen innstillingsklasse'; $lang['_msg_setting_no_default'] = 'Ingen standard verdi'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index 098cff534d4f3063072bb513ce83cf52c50103f2..84dce4a677fe6907f0d940e600cb0815be07388d 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -38,6 +38,7 @@ $lang['_anti_spam'] = 'Параметры блокировки Ñпа $lang['_editing'] = 'Параметры правки'; $lang['_links'] = 'Параметры ÑÑылок'; $lang['_media'] = 'Параметры медиафайлов'; +$lang['_notifications'] = 'Параметры уведомлений'; $lang['_advanced'] = 'Ð¢Ð¾Ð½ÐºÐ°Ñ Ð½Ð°Ñтройка'; $lang['_network'] = 'Параметры Ñети'; $lang['_plugin_sufix'] = 'Параметры плагина'; @@ -45,28 +46,29 @@ $lang['_template_sufix'] = 'Параметры шаблона'; $lang['_msg_setting_undefined'] = 'Ðе найдены метаданные наÑтроек.'; $lang['_msg_setting_no_class'] = 'Ðе найден клаÑÑ Ð½Ð°Ñтроек.'; $lang['_msg_setting_no_default'] = 'Ðе задано значение по умолчанию.'; -$lang['fmode'] = 'Права Ð´Ð»Ñ Ñоздаваемых файлов'; -$lang['dmode'] = 'Права Ð´Ð»Ñ Ñоздаваемых директорий'; -$lang['lang'] = 'Язык'; -$lang['basedir'] = 'ÐšÐ¾Ñ€Ð½ÐµÐ²Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (например, <code>/dokuwiki/</code>). ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; -$lang['baseurl'] = 'Корневой Ð°Ð´Ñ€ÐµÑ (URL) (например, <code>http://www.yourserver.ru</code>). ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; -$lang['savedir'] = 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…'; -$lang['cookiedir'] = 'Cookie директориÑ. ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; -$lang['start'] = 'Ð˜Ð¼Ñ Ñтартовой Ñтраницы'; $lang['title'] = 'Ðазвание вики'; +$lang['start'] = 'Ð˜Ð¼Ñ Ñтартовой Ñтраницы'; +$lang['lang'] = 'Язык'; $lang['template'] = 'Шаблон'; $lang['tagline'] = 'Слоган (еÑли поддерживаетÑÑ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¾Ð¼)'; $lang['sidebar'] = 'Ð‘Ð¾ÐºÐ¾Ð²Ð°Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ, пуÑтое поле отключает боковую панель.'; $lang['license'] = 'Ðа уÑловиÑÑ… какой лицензии будет предоÑтавлÑÑ‚ÑŒÑÑ Ñодержимое вики?'; -$lang['fullpath'] = 'Полный путь к документу'; +$lang['savedir'] = 'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…'; +$lang['basedir'] = 'ÐšÐ¾Ñ€Ð½ÐµÐ²Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (например, <code>/dokuwiki/</code>). ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; +$lang['baseurl'] = 'Корневой Ð°Ð´Ñ€ÐµÑ (URL) (например, <code>http://www.yourserver.ru</code>). ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; +$lang['cookiedir'] = 'Cookie директориÑ. ОÑтавьте пуÑтым Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ.'; +$lang['dmode'] = 'Права Ð´Ð»Ñ Ñоздаваемых директорий'; +$lang['fmode'] = 'Права Ð´Ð»Ñ Ñоздаваемых файлов'; +$lang['allowdebug'] = 'Включить отладку (отключите!)'; $lang['recent'] = 'Ðедавние Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ (кол-во)'; +$lang['recent_days'] = 'Ðа Ñколько дней назад ÑохранÑÑ‚ÑŒ недавние изменениÑ'; $lang['breadcrumbs'] = 'Ð’Ñ‹ поÑетили (кол-во)'; $lang['youarehere'] = 'Показывать «Вы находитеÑÑŒ здеÑь»'; +$lang['fullpath'] = 'Полный путь к документу'; $lang['typography'] = 'ТипографÑкие Ñимволы'; -$lang['htmlok'] = 'Разрешить HTML'; -$lang['phpok'] = 'Разрешить PHP'; $lang['dformat'] = 'Формат даты и времени'; $lang['signature'] = 'Шаблон подпиÑи'; +$lang['showuseras'] = 'Что отображать при показе пользователÑ, редактировавшего Ñтраницу поÑледним'; $lang['toptoclevel'] = 'Мин. уровень в Ñодержании'; $lang['tocminheads'] = 'Мин. количеÑтво заголовков, при котором будет ÑоÑтавлено Ñодержание'; $lang['maxtoclevel'] = 'МакÑ. уровень в Ñодержании'; @@ -74,16 +76,8 @@ $lang['maxseclevel'] = 'МакÑ. уровень Ð´Ð»Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸'; $lang['camelcase'] = 'ИÑпользовать ВикиРегиÑÑ‚Ñ€ Ð´Ð»Ñ ÑÑылок'; $lang['deaccent'] = 'ТранÑÐ»Ð¸Ñ‚ÐµÑ€Ð°Ñ†Ð¸Ñ Ð² именах Ñтраниц'; $lang['useheading'] = 'Первый заголовок вмеÑто имени'; -$lang['refcheck'] = 'ПроверÑÑ‚ÑŒ ÑÑылки на медиафайлы'; -$lang['refshow'] = 'Показывать ÑÑылок на медиафайлы'; -$lang['allowdebug'] = 'Включить отладку (отключите!)'; -$lang['mediarevisions'] = 'Включение верÑий медиафайлов'; -$lang['usewordblock'] = 'Блокировать Ñпам по ключевым Ñловам'; -$lang['indexdelay'] = 'Задержка перед индекÑированием'; -$lang['relnofollow'] = 'rel="nofollow" Ð´Ð»Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ñ… ÑÑылок'; -$lang['mailguard'] = 'Кодировать адреÑа Ñлектронной почты'; -$lang['iexssprotect'] = 'ПроверÑÑ‚ÑŒ закачанные файлы на наличие потенциально опаÑного кода JavaScript или HTML'; -$lang['showuseras'] = 'Что отображать при показе пользователÑ, редактировавшего Ñтраницу поÑледним'; +$lang['sneaky_index'] = 'По умолчанию, «ДокуВики» показывает в индекÑе Ñтраниц вÑе проÑтранÑтва имён. Включение Ñтой опции Ñкроет проÑтранÑтва имён, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… пользователь не имеет прав чтениÑ. Ðто может привеÑти к Ñкрытию доÑтупных вложенных проÑтранÑтв имён и потере функциональноÑти индекÑа Ñтраниц при некоторых конфигурациÑÑ… прав доÑтупа.'; +$lang['hidepages'] = 'Скрыть Ñтраницы (рег. выражение)'; $lang['useacl'] = 'ИÑпользовать ÑпиÑки прав доÑтупа'; $lang['autopasswd'] = 'ÐÐ²Ñ‚Ð¾Ð³ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»ÐµÐ¹'; $lang['authtype'] = 'Механизм аутентификации'; @@ -92,58 +86,66 @@ $lang['defaultgroup'] = 'Группа по умолчанию'; $lang['superuser'] = 'Суперпользователь — группа или пользователь Ñ Ð¿Ð¾Ð»Ð½Ñ‹Ð¼ доÑтупом ко вÑем Ñтраницам и функциÑм админиÑтрированиÑ, незавиÑимо от уÑтановок ACL. Перечень разделÑйте запÑтыми: user1,@group1,user2'; $lang['manager'] = 'Менеджер — группа или пользователь Ñ Ð´Ð¾Ñтупом к определённым функциÑм управлениÑ. Перечень разделÑйте запÑтыми: user1,@group1,user2'; $lang['profileconfirm'] = 'Пароль Ð´Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ'; +$lang['rememberme'] = 'Разрешить перманентные куки (cookies) Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° («запомнить менÑ»)'; $lang['disableactions'] = 'Заблокировать операции «ДокуВики»'; $lang['disableactions_check'] = 'Проверка'; $lang['disableactions_subscription'] = 'ПодпиÑка/Отмена подпиÑки'; $lang['disableactions_wikicode'] = 'Показ/ÑкÑпорт иÑходного текÑта'; $lang['disableactions_other'] = 'Другие операции (через запÑтую)'; -$lang['sneaky_index'] = 'По умолчанию, «ДокуВики» показывает в индекÑе Ñтраниц вÑе проÑтранÑтва имён. Включение Ñтой опции Ñкроет проÑтранÑтва имён, Ð´Ð»Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ñ… пользователь не имеет прав чтениÑ. Ðто может привеÑти к Ñкрытию доÑтупных вложенных проÑтранÑтв имён и потере функциональноÑти индекÑа Ñтраниц при некоторых конфигурациÑÑ… прав доÑтупа.'; $lang['auth_security_timeout'] = 'Интервал Ð´Ð»Ñ Ð±ÐµÐ·Ð¾Ð¿Ð°ÑноÑти авторизации (Ñек.)'; $lang['securecookie'] = 'Должны ли куки (cookies), выÑтавленные через HTTPS, отправлÑÑ‚ÑŒÑÑ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð¾Ð¼ только через HTTPS. Отключите Ñту опцию в Ñлучае, когда только логин вашей вики передаётÑÑ Ñ‡ÐµÑ€ÐµÐ· SSL, а обычный проÑмотр оÑущеÑтвлÑетÑÑ Ð² небезопаÑном режиме.'; +$lang['remote'] = 'Включить ÑиÑтему API Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ð¹. Ðто позволит другим приложениÑм получить доÑтуп к вики через XML-RPC или другие механизмы.'; +$lang['usewordblock'] = 'Блокировать Ñпам по ключевым Ñловам'; +$lang['relnofollow'] = 'rel="nofollow" Ð´Ð»Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ñ… ÑÑылок'; +$lang['indexdelay'] = 'Задержка перед индекÑированием'; +$lang['mailguard'] = 'Кодировать адреÑа Ñлектронной почты'; +$lang['iexssprotect'] = 'ПроверÑÑ‚ÑŒ закачанные файлы на наличие потенциально опаÑного кода JavaScript или HTML'; +$lang['usedraft'] = 'ÐвтоматичеÑки ÑохранÑÑ‚ÑŒ черновик во Ð²Ñ€ÐµÐ¼Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸'; +$lang['htmlok'] = 'Разрешить HTML'; +$lang['phpok'] = 'Разрешить PHP'; +$lang['locktime'] = 'Ð’Ñ€ÐµÐ¼Ñ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ¸ Ñтраницы (Ñек.)'; +$lang['cachetime'] = 'Ð’Ñ€ÐµÐ¼Ñ Ð¶Ð¸Ð·Ð½Ð¸ кÑш-файла (Ñек.)'; +$lang['target____wiki'] = 'target Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ñ… ÑÑылок'; +$lang['target____interwiki'] = 'target Ð´Ð»Ñ ÑÑылок между вики'; +$lang['target____extern'] = 'target Ð´Ð»Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ñ… ÑÑылок'; +$lang['target____media'] = 'target Ð´Ð»Ñ ÑÑылок на медиафайлы'; +$lang['target____windows'] = 'target Ð´Ð»Ñ ÑÑылок на Ñетевые каталоги'; +$lang['mediarevisions'] = 'Включение верÑий медиафайлов'; +$lang['refcheck'] = 'ПроверÑÑ‚ÑŒ ÑÑылки на медиафайлы'; +$lang['refshow'] = 'Показывать ÑÑылок на медиафайлы'; +$lang['gdlib'] = 'ВерÑÐ¸Ñ LibGD'; +$lang['im_convert'] = 'Путь к ImageMagick'; +$lang['jpg_quality'] = 'КачеÑтво ÑÐ¶Ð°Ñ‚Ð¸Ñ JPG (0–100). Значение по умолчанию — 70.'; +$lang['fetchsize'] = 'МакÑимальный размер файла (в байтах), который fetch.php может Ñкачивать Ñ Ð²Ð½ÐµÑˆÐ½ÐµÐ³Ð¾ иÑточника'; +$lang['subscribers'] = 'Разрешить подпиÑку на изменениÑ'; +$lang['subscribe_time'] = 'Интервал раÑÑылки подпиÑок и Ñводок (Ñек.). Должен быть меньше, чем значение, указанное в recent_days.'; +$lang['notify'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð¸Ð·Ð²ÐµÑ‰ÐµÐ½Ð¸Ð¹'; +$lang['registernotify'] = 'ПоÑылать информацию о новых зарегиÑтрированных пользователÑÑ… на Ñтот Ñлектронный адреÑ'; +$lang['mailfrom'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð²Ð¸ÐºÐ¸ (От:)'; +$lang['mailprefix'] = 'ÐŸÑ€ÐµÑ„Ð¸ÐºÑ Ð¸Ñпользуемый Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого пиÑьма Ñтанет темой Ñообщений'; +$lang['sitemap'] = 'ЧиÑло дней, через которое нужно Ñоздавать (обновлÑÑ‚ÑŒ) карту Ñайта Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñковиков (Гугл, Ð¯Ð½Ð´ÐµÐºÑ Ð¸ др.)'; +$lang['rss_type'] = 'Тип RSS'; +$lang['rss_linkto'] = 'СÑылки в RSS'; +$lang['rss_content'] = 'Что отображать в Ñтроках XML-ленты?'; +$lang['rss_update'] = 'Интервал Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ XML-ленты (Ñек.)'; +$lang['rss_show_summary'] = 'Показывать краткую выдержку в заголовках XML-ленты'; $lang['updatecheck'] = 'ПроверÑÑ‚ÑŒ наличие обновлений и предупреждений о безопаÑноÑти? Ð”Ð»Ñ Ñтого «ДокуВики» потребуетÑÑ ÑвÑзыватьÑÑ Ñ Ñайтом <a href="http://www.splitbrain.org/">splitbrain.org</a>.'; $lang['userewrite'] = 'Удобочитаемые адреÑа (URL)'; $lang['useslash'] = 'ИÑпользовать ÑлÑш'; -$lang['usedraft'] = 'ÐвтоматичеÑки ÑохранÑÑ‚ÑŒ черновик во Ð²Ñ€ÐµÐ¼Ñ Ð¿Ñ€Ð°Ð²ÐºÐ¸'; $lang['sepchar'] = 'Разделитель Ñлов в имени Ñтраницы'; $lang['canonical'] = 'Полные каноничеÑкие адреÑа (URL)'; $lang['fnencode'] = 'Метод ÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸Ð¼Ñ‘Ð½ файлов, запиÑанных не ASCII-Ñимволами.'; $lang['autoplural'] = 'ÐвтоматичеÑкое мн. чиÑло'; $lang['compression'] = 'Метод ÑÐ¶Ð°Ñ‚Ð¸Ñ Ð´Ð»Ñ Ð°Ñ€Ñ…Ð¸Ð²Ð½Ñ‹Ñ… файлов'; -$lang['cachetime'] = 'Ð’Ñ€ÐµÐ¼Ñ Ð¶Ð¸Ð·Ð½Ð¸ кÑш-файла (Ñек.)'; -$lang['locktime'] = 'Ð’Ñ€ÐµÐ¼Ñ Ð±Ð»Ð¾ÐºÐ¸Ñ€Ð¾Ð²ÐºÐ¸ Ñтраницы (Ñек.)'; -$lang['fetchsize'] = 'МакÑимальный размер файла (в байтах), который fetch.php может Ñкачивать Ñ Ð²Ð½ÐµÑˆÐ½ÐµÐ³Ð¾ иÑточника'; -$lang['notify'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð´Ð»Ñ Ð¸Ð·Ð²ÐµÑ‰ÐµÐ½Ð¸Ð¹'; -$lang['registernotify'] = 'ПоÑылать информацию о новых зарегиÑтрированных пользователÑÑ… на Ñтот Ñлектронный адреÑ'; -$lang['mailfrom'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð²Ð¸ÐºÐ¸ (От:)'; -$lang['mailprefix'] = 'ÐŸÑ€ÐµÑ„Ð¸ÐºÑ Ð¸Ñпользуемый Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого пиÑьма Ñтанет темой Ñообщений'; $lang['gzip_output'] = 'ИÑпользовать gzip-Ñжатие Ð´Ð»Ñ xhtml'; -$lang['gdlib'] = 'ВерÑÐ¸Ñ LibGD'; -$lang['im_convert'] = 'Путь к ImageMagick'; -$lang['jpg_quality'] = 'КачеÑтво ÑÐ¶Ð°Ñ‚Ð¸Ñ JPG (0–100). Значение по умолчанию — 70.'; -$lang['subscribers'] = 'Разрешить подпиÑку на изменениÑ'; -$lang['subscribe_time'] = 'Интервал раÑÑылки подпиÑок и Ñводок (Ñек.). Должен быть меньше, чем значение, указанное в recent_days.'; $lang['compress'] = 'Сжимать файлы CSS и javascript'; $lang['cssdatauri'] = 'Размер в байтах до которого изображениÑ, указанные в CSS-файлах, должны быть вÑтроены прÑмо в таблицу Ñтилей, Ð´Ð»Ñ ÑƒÐ¼ÐµÐ½ÑŒÑˆÐµÐ½Ð¸Ñ Ð¸Ð·Ð±Ñ‹Ñ‡Ñ‚Ð¾Ð½Ñ‹Ñ… HTTP-запроÑов. Ðтот метод не будет работать в IE верÑии 7 и ниже! УÑтановка от <code>400</code> до <code>600</code> байт ÑвлÑетÑÑ Ñ…Ð¾Ñ€Ð¾ÑˆÐ¸Ð¼ показателем. УÑтановите <code>0</code>, чтобы отключить.'; -$lang['hidepages'] = 'Скрыть Ñтраницы (рег. выражение)'; $lang['send404'] = 'ПоÑылать «HTTP404/Page Not Found»'; -$lang['sitemap'] = 'ЧиÑло дней, через которое нужно Ñоздавать (обновлÑÑ‚ÑŒ) карту Ñайта Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñковиков (Гугл, Ð¯Ð½Ð´ÐµÐºÑ Ð¸ др.)'; $lang['broken_iua'] = 'Возможно, Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ ignore_user_abort не работает в вашей ÑиÑтеме? Ðто может привеÑти к потере функциональноÑти индекÑÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ð¸Ñка. Ðта проблема приÑутÑтвует, например, в IIS+PHP/CGI. Ð”Ð»Ñ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ информации Ñмотрите <a href="http://bugs.splitbrain.org/?do=details&task_id=852">баг 852</a>.'; $lang['xsendfile'] = 'ИÑпользуете заголовок X-Sendfile Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ файлов на веб-Ñервер? Ваш веб-Ñервер должен поддерживать Ñто.'; $lang['renderer_xhtml'] = 'Обработчик оÑновного (xhtml) вывода вики'; $lang['renderer__core'] = '%s (Ñдро dokuwiki)'; $lang['renderer__plugin'] = '%s (плагин)'; -$lang['rememberme'] = 'Разрешить перманентные куки (cookies) Ð´Ð»Ñ Ð²Ñ…Ð¾Ð´Ð° («запомнить менÑ»)'; -$lang['rss_type'] = 'Тип RSS'; -$lang['rss_linkto'] = 'СÑылки в RSS'; -$lang['rss_content'] = 'Что отображать в Ñтроках XML-ленты?'; -$lang['rss_update'] = 'Интервал Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ XML-ленты (Ñек.)'; -$lang['recent_days'] = 'Ðа Ñколько дней назад ÑохранÑÑ‚ÑŒ недавние изменениÑ'; -$lang['rss_show_summary'] = 'Показывать краткую выдержку в заголовках XML-ленты'; -$lang['target____wiki'] = 'target Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ñ… ÑÑылок'; -$lang['target____interwiki'] = 'target Ð´Ð»Ñ ÑÑылок между вики'; -$lang['target____extern'] = 'target Ð´Ð»Ñ Ð²Ð½ÐµÑˆÐ½Ð¸Ñ… ÑÑылок'; -$lang['target____media'] = 'target Ð´Ð»Ñ ÑÑылок на медиафайлы'; -$lang['target____windows'] = 'target Ð´Ð»Ñ ÑÑылок на Ñетевые каталоги'; $lang['proxy____host'] = 'proxy-адреÑ'; $lang['proxy____port'] = 'proxy-порт'; $lang['proxy____user'] = 'proxy-Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ'; diff --git a/lib/plugins/config/lang/vi/lang.php b/lib/plugins/config/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/config/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 1cdab607f3c04b3ace4f0863adaf0426cc0bfdd1..a1430016ef1d39a5941073105c2e8c5d6271545a 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -452,8 +452,8 @@ if (!class_exists('setting')) { function _out_key($pretty=false,$url=false) { if($pretty){ - $out = str_replace(CM_KEYMARKER,"»",$this->_key); - if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc. + $out = str_replace(CM_KEYMARKER,"»",$this->_key); + if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc. if ($out == 'start') //one exception return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>'; else diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php index 9e1fbfcae0929b866d4b59f8ed4aeb9b6530c13c..4fc6fd1d9e22d01820d1e90e8d6da79ce411b235 100644 --- a/lib/plugins/plugin/lang/ko/lang.php +++ b/lib/plugins/plugin/lang/ko/lang.php @@ -22,18 +22,18 @@ $lang['btn_download'] = '다운로드'; $lang['btn_enable'] = 'ì €ìž¥'; $lang['url'] = 'URL'; $lang['installed'] = '설치ë¨:'; -$lang['lastupdate'] = '최근 ì—…ë°ì´íŠ¸ë¨:'; +$lang['lastupdate'] = '가장 ë‚˜ì¤‘ì— ì—…ë°ì´íŠ¸ë¨:'; $lang['source'] = 'ë‚´ìš©:'; $lang['unknown'] = 'ì•Œ 수 ì—†ìŒ'; $lang['updating'] = 'ì—…ë°ì´íŠ¸ 중 ...'; -$lang['updated'] = '%s 플러그ì¸ì´ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤.'; -$lang['updates'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ë“¤ì´ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤:'; +$lang['updated'] = '%s 플러그ì¸ì„ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤'; +$lang['updates'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ì„ 성공ì 으로 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤'; $lang['update_none'] = 'ì—…ë°ì´íŠ¸ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.'; $lang['deleting'] = 'ì‚ì œ 중 ...'; $lang['deleted'] = '%s 플러그ì¸ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; $lang['downloading'] = '다운로드 중 ...'; $lang['downloaded'] = '%s 플러그ì¸ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; -$lang['downloads'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ë“¤ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤:'; +$lang['downloads'] = 'ë‹¤ìŒ í”ŒëŸ¬ê·¸ì¸ì´ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤:'; $lang['download_none'] = '플러그ì¸ì´ 없거나 다운로드 ë˜ëŠ” 설치 ì¤‘ì— ì•Œ 수 없는 ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤.'; $lang['plugin'] = '플러그ì¸:'; $lang['components'] = '구성 요소'; @@ -46,7 +46,7 @@ $lang['author'] = 'ë§Œë“ ì´:'; $lang['www'] = '웹:'; $lang['error'] = 'ì•Œ 수 없는 ë¬¸ì œê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤.'; $lang['error_download'] = 'í”ŒëŸ¬ê·¸ì¸ íŒŒì¼ì„ 다운로드 í• ìˆ˜ 없습니다: %s'; -$lang['error_badurl'] = 'ìž˜ëª»ëœ URL 같습니다. - URLì—ì„œ íŒŒì¼ ì´ë¦„ì„ ì•Œ 수 없습니다.'; +$lang['error_badurl'] = 'ìž˜ëª»ëœ URL 같습니다 - URLì—ì„œ íŒŒì¼ ì´ë¦„ì„ ì•Œ 수 없습니다.'; $lang['error_dircreate'] = '다운로드를 받기 위한 ìž„ì‹œ ë””ë ‰í† ë¦¬ë¥¼ 만들 수 없습니다.'; $lang['error_decompress'] = 'í”ŒëŸ¬ê·¸ì¸ ê´€ë¦¬ìžê°€ 다운로드 ë°›ì€ íŒŒì¼ì„ ì••ì¶•ì„ í’€ 수 없습니다. 잘못 다운로드 ë°›ì•˜ì„ ìˆ˜ë„ ìžˆìœ¼ë‹ˆ 다시 한번 ì‹œë„해보기 ë°”ëžë‹ˆë‹¤. ë˜ëŠ” 압축 í¬ë§·ì„ ì•Œ 수 없는 경우ì—는 다운로드한 후 수ë™ìœ¼ë¡œ ì§ì ‘ 설치하기 ë°”ëžë‹ˆë‹¤.'; $lang['error_copy'] = '플러그ì¸ì„ 설치하는 ë™ì•ˆ íŒŒì¼ ë³µì‚¬í•˜ëŠ” ë° ì˜¤ë¥˜ê°€ ë°œìƒí–ˆìŠµë‹ˆë‹¤. <em>%s</em>: 디스í¬ê°€ 꽉 찼거나 íŒŒì¼ ì ‘ê·¼ ê¶Œí•œì´ ìž˜ëª»ëœ ê²½ìš°ìž…ë‹ˆë‹¤. í”ŒëŸ¬ê·¸ì¸ ì„¤ì¹˜ê°€ 부분ì 으로만 ì´ë£¨ì–´ì¡Œì„ 것입니다. 설치가 ë¶ˆì™„ì „í•©ë‹ˆë‹¤.'; @@ -55,4 +55,4 @@ $lang['enabled'] = '%s 플러그ì¸ì„ 활성화했습니다.'; $lang['notenabled'] = '%s 플러그ì¸ì„ í™œì„±í™”í• ìˆ˜ 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; $lang['disabled'] = '%s 플러그ì¸ì„ 비활성화했습니다.'; $lang['notdisabled'] = '%s 플러그ì¸ì„ ë¹„í™œì„±í™”í• ìˆ˜ 없습니다. íŒŒì¼ ê¶Œí•œì„ í™•ì¸í•˜ì‹ì‹œì˜¤.'; -$lang['packageinstalled'] = 'í”ŒëŸ¬ê·¸ì¸ íŒ¨í‚¤ì§€(%d ê°œì˜ í”ŒëŸ¬ê·¸ì¸: %s)ê°€ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; +$lang['packageinstalled'] = 'í”ŒëŸ¬ê·¸ì¸ íŒ¨í‚¤ì§€(í”ŒëŸ¬ê·¸ì¸ %dê°œ: %s)ê°€ 성공ì 으로 설치ë˜ì—ˆìŠµë‹ˆë‹¤.'; diff --git a/lib/plugins/plugin/lang/vi/lang.php b/lib/plugins/plugin/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/plugin/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/popularity/lang/ko/intro.txt b/lib/plugins/popularity/lang/ko/intro.txt index 79841fb2b667c73161789a24c0d79f0b82e3ff44..0af7ee2cccd328ce46498736d03603ad4d25395c 100644 --- a/lib/plugins/popularity/lang/ko/intro.txt +++ b/lib/plugins/popularity/lang/ko/intro.txt @@ -1,6 +1,6 @@ ====== ì¸ê¸°ë„ 조사 ====== -ì„¤ì¹˜ëœ ìœ„í‚¤ì˜ ìµëª… ì •ë³´ë¥¼ DokuWiki 개발ìžë“¤ì—게 보냅니다. ì´ [[doku>popularity|기능]]ì€ DokuWikiê°€ ì‹¤ì œ 사용ìžë“¤ì—게 어떻게 사용ë˜ëŠ”지 DokuWiki 개발ìžë“¤ì—게 ì•Œë ¤ì¤Œìœ¼ë¡œì¨ ì´ í›„ 개발 ì‹œ ì°¸ê³ ê°€ ë©ë‹ˆë‹¤. +ì„¤ì¹˜ëœ ìœ„í‚¤ì˜ ìµëª… ì •ë³´ë¥¼ DokuWiki 개발ìžì—게 보냅니다. ì´ [[doku>popularity|기능]]ì€ DokuWikiê°€ ì‹¤ì œ 사용ìžì—게 어떻게 사용ë˜ëŠ”지 DokuWiki 개발ìžì—게 ì•Œë ¤ì¤Œìœ¼ë¡œì¨ ì´ í›„ 개발 ì‹œ ì°¸ê³ ê°€ ë©ë‹ˆë‹¤. ì„¤ì¹˜ëœ ìœ„í‚¤ê°€ 커ì§ì— ë”°ë¼ì„œ ì´ ê³¼ì •ì„ ë°˜ë³µí• í•„ìš”ê°€ 있습니다. ë°˜ë³µëœ ë°ì´íƒ€ëŠ” ìµëª… IDë¡œ 구별ë˜ì–´ì§‘니다. diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php index 33a0c88f7afbd894a2b5d5e4bc22a10f7136b806..5e6966402a688e20a7a446360cdce74b71796bb5 100644 --- a/lib/plugins/popularity/lang/ko/lang.php +++ b/lib/plugins/popularity/lang/ko/lang.php @@ -13,7 +13,7 @@ $lang['name'] = 'ì¸ê¸°ë„ 조사 (ë¶ˆëŸ¬ì˜¤ëŠ”ë° ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다.)'; $lang['submit'] = 'ìžë£Œ 보내기'; $lang['autosubmit'] = 'ìžë£Œë¥¼ ìžë™ìœ¼ë¡œ 매달 한번씩 보내기'; -$lang['submissionFailed'] = '다ìŒê³¼ ê°™ì€ ì´ìœ ë¡œ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤ :'; +$lang['submissionFailed'] = '다ìŒê³¼ ê°™ì€ ì´ìœ ë¡œ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤:'; $lang['submitDirectly'] = 'ì•„ëž˜ì˜ ì–‘ì‹ì— 맞춰 수ë™ìœ¼ë¡œ ìž‘ì„±ëœ ìžë£Œë¥¼ 보낼 수 있습니다'; -$lang['autosubmitError'] = '다ìŒê³¼ ê°™ì€ ì´ìœ ë¡œ ìžë™ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤ :'; +$lang['autosubmitError'] = '다ìŒê³¼ ê°™ì€ ì´ìœ ë¡œ ìžë™ ìžë£Œ ì „ì†¡ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤:'; $lang['lastSent'] = 'ìžë£Œê°€ ì „ì†¡ë˜ì—ˆìŠµë‹ˆë‹¤'; diff --git a/lib/plugins/popularity/lang/vi/lang.php b/lib/plugins/popularity/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/popularity/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 2aaf1395f6f6bbac99fbf32fbad904f61bf0e526..ff5fa69bac61de2a4bbc7028a80ba6fa3df30640 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -159,7 +159,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo '</a> '; echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?NULL:$recent['id']); - echo ' – '.htmlspecialchars($recent['sum']); + echo ' – '.htmlspecialchars($recent['sum']); echo ' <span class="user">'; echo $recent['user'].' '.$recent['ip']; diff --git a/lib/plugins/revert/lang/ko/intro.txt b/lib/plugins/revert/lang/ko/intro.txt index 7fc310eee879b097be91573275d55fcddecb78a7..30813fe49d7758162e1a8c4acf6954a0390a6886 100644 --- a/lib/plugins/revert/lang/ko/intro.txt +++ b/lib/plugins/revert/lang/ko/intro.txt @@ -1,3 +1,3 @@ ====== 복구 ê´€ë¦¬ìž ====== -스팸 공격으로 부터 ìžë™ìœ¼ë¡œ ë³µêµ¬í•˜ëŠ”ë° ì´ íŽ˜ì´ì§€ê°€ ë„ì›€ì´ ë 수 있습니다. 스팸 ê³µê²©ë°›ì€ ë¬¸ì„œ 목ë¡ì„ ì°¾ìœ¼ë ¤ë©´ 문ìžì—´ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤(예를 들어 스팸 URL), ê·¸ 후 ì°¾ì€ ë¬¸ì„œê°€ 스팸 ê³µê²©ì„ ë°›ì•˜ëŠ”ì§€ 확ì¸í•˜ê³ 복구합니다. +스팸 공격으로 부터 ìžë™ìœ¼ë¡œ ë³µêµ¬í•˜ëŠ”ë° ì´ íŽ˜ì´ì§€ê°€ ë„ì›€ì´ ë 수 있습니다. 스팸 ê³µê²©ë°›ì€ ë¬¸ì„œ 목ë¡ì„ ì°¾ìœ¼ë ¤ë©´ 문ìžì—´ì„ ìž…ë ¥í•˜ê¸° ë°”ëžë‹ˆë‹¤ (예를 들어 스팸 URL), ê·¸ 후 ì°¾ì€ ë¬¸ì„œê°€ 스팸 ê³µê²©ì„ ë°›ì•˜ëŠ”ì§€ 확ì¸í•˜ê³ 복구합니다. diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index c51af470eddebb06f2a2e6f313bdef66a6e8dfd9..90cba9bcef9cb330a5f944486716026d3234dbfc 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -13,9 +13,9 @@ $lang['menu'] = '복구 관리ìž'; $lang['filter'] = '스팸 문서 찾기'; $lang['revert'] = 'ì„ íƒí•œ 문서 복구'; -$lang['reverted'] = '%s를 %s ë²„ì „ìœ¼ë¡œ 복구'; +$lang['reverted'] = '%s ë²„ì „ì„ %s ë²„ì „ìœ¼ë¡œ 복구'; $lang['removed'] = '%s ì‚ì œ'; -$lang['revstart'] = '복구 ìž‘ì—…ì„ ì‹œìž‘í•©ë‹ˆë‹¤. 오랜 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다. 완료ë˜ê¸° ì „ì— ìŠ¤í¬ë¦½íŠ¸ 시간 초과가 ë°œìƒí•œë‹¤ë©´ ë” ìž‘ì€ ìž‘ì—…ë“¤ë¡œ 나누어서 복구하기 ë°”ëžë‹ˆë‹¤.'; +$lang['revstart'] = '복구 ìž‘ì—…ì„ ì‹œìž‘í•©ë‹ˆë‹¤. 오랜 ì‹œê°„ì´ ê±¸ë¦´ 수 있습니다. 완료ë˜ê¸° ì „ì— ìŠ¤í¬ë¦½íŠ¸ 시간 초과가 ë°œìƒí•œë‹¤ë©´ ë” ìž‘ì€ ìž‘ì—…ìœ¼ë¡œ 나누어서 복구하기 ë°”ëžë‹ˆë‹¤.'; $lang['revstop'] = '복구 ìž‘ì—…ì´ ì„±ê³µì 으로 ë났습니다.'; $lang['note1'] = 'ì°¸ê³ : ëŒ€ì†Œë¬¸ìž êµ¬ë³„í•˜ì—¬ 찾습니다.'; $lang['note2'] = 'ì°¸ê³ : ì´ ë¬¸ì„œëŠ” <i>%s</i> 스팸 단어를 í¬í•¨í•˜ì§€ ì•Šì€ ìµœê·¼ ì´ì „ ë²„ì „ìœ¼ë¡œ 복구ë©ë‹ˆë‹¤. '; diff --git a/lib/plugins/revert/lang/vi/lang.php b/lib/plugins/revert/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/revert/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 8b646b426257dda70565c6e0ed359921281dd878..2bb0a863d9a8e45d71701c4e14dccca4d5f6a2fe 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -153,7 +153,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" <table class=\"inline\">"); ptln(" <thead>"); ptln(" <tr>"); - ptln(" <th> </th><th>".$this->lang["user_id"]."</th><th>".$this->lang["user_name"]."</th><th>".$this->lang["user_mail"]."</th><th>".$this->lang["user_groups"]."</th>"); + ptln(" <th> </th><th>".$this->lang["user_id"]."</th><th>".$this->lang["user_name"]."</th><th>".$this->lang["user_mail"]."</th><th>".$this->lang["user_groups"]."</th>"); ptln(" </tr>"); ptln(" <tr>"); diff --git a/lib/plugins/usermanager/lang/de-informal/lang.php b/lib/plugins/usermanager/lang/de-informal/lang.php index dbdce1fbff2fd52412ac769e8a37df3e01e874aa..e53781c77e9d05f957de91b5766077ea9c687e03 100644 --- a/lib/plugins/usermanager/lang/de-informal/lang.php +++ b/lib/plugins/usermanager/lang/de-informal/lang.php @@ -5,11 +5,11 @@ * @author Alexander Fischer <tbanus@os-forge.net> * @author Juergen Schwarzer <jschwarzer@freenet.de> * @author Marcel Metz <marcel_metz@gmx.de> - * @author Matthias Schulte <post@lupo49.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Christian Wichmann <nospam@zone0.de> * @author Pierre Corell <info@joomla-praxis.de> */ -$lang['menu'] = 'Benutzerverwalter'; +$lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Benutzeranmeldung ist nicht verfügbar)'; $lang['nosupport'] = '(Benutzerverwaltung wird nicht unterstützt)'; $lang['badauth'] = 'Ungültige Authentifizierung'; @@ -22,7 +22,7 @@ $lang['field'] = 'Feld'; $lang['value'] = 'Wert'; $lang['add'] = 'Zufügen'; $lang['delete'] = 'Löschen'; -$lang['delete_selected'] = 'Lösche ausgewähltes'; +$lang['delete_selected'] = 'Lösche Ausgewähltes'; $lang['edit'] = 'Bearbeiten'; $lang['edit_prompt'] = 'Bearbeite diesen Benutzer'; $lang['modify'] = 'Änderungen speichern'; @@ -43,10 +43,10 @@ $lang['next'] = 'nächste'; $lang['last'] = 'letzte'; $lang['edit_usermissing'] = 'Der gewählte Benutzer wurde nicht gefunden. Der angegebene Benutzername könnte gelöscht oder an anderer Stelle geändert worden sein.'; $lang['user_notify'] = 'Benutzer benachrichtigen'; -$lang['note_notify'] = 'Benachrichtigungsemails werden nur versandt, wenn der Benutzer ein neues Kennwort erhält.'; +$lang['note_notify'] = 'Benachrichtigungsmails werden nur versandt, wenn der Benutzer ein neues Kennwort erhält.'; $lang['note_group'] = 'Neue Benutzer werden zur Standardgruppe (%s) hinzugefügt, wenn keine Gruppe angegeben wird.'; $lang['note_pass'] = 'Das Passwort wird automatisch erzeugt, wenn das Feld freigelassen wird und der Benutzer Benachrichtigungen aktiviert hat.'; $lang['add_ok'] = 'Benutzer erfolgreich hinzugefügt'; $lang['add_fail'] = 'Hinzufügen des Benutzers fehlgeschlagen'; -$lang['notify_ok'] = 'Benachrichtigungs-Mail wurde versendet'; -$lang['notify_fail'] = 'Benachrichtigungse-Mail konnte nicht gesendet werden'; +$lang['notify_ok'] = 'Benachrichtigungsmail wurde versendet'; +$lang['notify_fail'] = 'Benachrichtigungsemail konnte nicht gesendet werden'; diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php index 507fe1f7cb56679db579bb1412457c19afebce0b..0dd90cc68e9888ce3a118315e5362b995a097236 100644 --- a/lib/plugins/usermanager/lang/de/lang.php +++ b/lib/plugins/usermanager/lang/de/lang.php @@ -12,11 +12,11 @@ * @author Dirk Einecke <dirk@dirkeinecke.de> * @author Blitzi94@gmx.de * @author Robert Bogenschneider <robog@GMX.de> - * @author Robert Bogenschneider <robog@gmx.de> * @author Niels Lange <niels@boldencursief.nl> * @author Christian Wichmann <nospam@zone0.de> * @author Paul Lachewsky <kaeptn.haddock@gmail.com> * @author Pierre Corell <info@joomla-praxis.de> + * @author Matthias Schulte <dokuwiki@lupo49.de> */ $lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)'; @@ -57,5 +57,5 @@ $lang['note_group'] = 'Neue Nutzer werden der Standard-Gruppe (%s) hi $lang['note_pass'] = 'Das Passwort wird automatisch generiert, wenn das entsprechende Feld leergelassen wird und die Benachrichtigung des Nutzers aktiviert ist.'; $lang['add_ok'] = 'Nutzer erfolgreich angelegt'; $lang['add_fail'] = 'Nutzer konnte nicht angelegt werden'; -$lang['notify_ok'] = 'Benachrichtigungs-Mail wurde versandt'; -$lang['notify_fail'] = 'Benachrichtigungs-Mail konnte nicht versandt werden'; +$lang['notify_ok'] = 'Benachrichtigungsmail wurde versandt'; +$lang['notify_fail'] = 'Benachrichtigungsmail konnte nicht versandt werden'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index cae81798f75b1333ea77fdb8114371a9ee6454e6..3754fea909ce159bfe313c92ade9679944bbf9c4 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -13,7 +13,7 @@ $lang['menu'] = 'ì‚¬ìš©ìž ê´€ë¦¬ìž'; $lang['noauth'] = '(ì‚¬ìš©ìž ì¸ì¦ì´ 불가능합니다.)'; $lang['nosupport'] = '(ì‚¬ìš©ìž ê´€ë¦¬ê°€ 지ì›ë˜ì§€ 않습니다.)'; -$lang['badauth'] = 'ìœ íš¨í•˜ì§€ ì•Šì€ ì¸ì¦ 메카니즘입니다.'; +$lang['badauth'] = 'ìž˜ëª»ëœ ì¸ì¦ 메카니즘'; $lang['user_id'] = '사용ìž'; $lang['user_pass'] = '비밀번호'; $lang['user_name'] = 'ì‹¤ì œ ì´ë¦„'; @@ -23,7 +23,7 @@ $lang['field'] = 'í•ëª©'; $lang['value'] = 'ê°’'; $lang['add'] = '추가'; $lang['delete'] = 'ì‚ì œ'; -$lang['delete_selected'] = 'ì‚ì œ ì„ íƒ'; +$lang['delete_selected'] = 'ì„ íƒ ì‚ì œ'; $lang['edit'] = 'ìˆ˜ì •'; $lang['edit_prompt'] = 'ì´ ì‚¬ìš©ìž ìˆ˜ì •'; $lang['modify'] = '바뀜 ì €ìž¥'; @@ -31,9 +31,9 @@ $lang['search'] = '찾기'; $lang['search_prompt'] = '찾기 실행'; $lang['clear'] = '찾기 í•„í„° 초기화'; $lang['filter'] = 'í•„í„°'; -$lang['summary'] = 'ì°¾ì€ ì‚¬ìš©ìž ë³´ê¸°(%1$d-%2$d 중 %3$d). ì „ì²´ ì‚¬ìš©ìž %4$d 명.'; -$lang['nonefound'] = 'ì°¾ì€ ì‚¬ìš©ìžê°€ 없습니다. ì „ì²´ ì‚¬ìš©ìž %d 명.'; -$lang['delete_ok'] = 'ì‚¬ìš©ìž %dëª…ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤.'; +$lang['summary'] = 'ì°¾ì€ ì‚¬ìš©ìž %3$d 중 %1$d-%2$d 보기. ì „ì²´ ì‚¬ìš©ìž %4$d명.'; +$lang['nonefound'] = 'ì°¾ì€ ì‚¬ìš©ìžê°€ 없습니다. ì „ì²´ ì‚¬ìš©ìž %d명.'; +$lang['delete_ok'] = 'ì‚¬ìš©ìž %dëª…ì´ ì‚ì œë˜ì—ˆìŠµë‹ˆë‹¤'; $lang['delete_fail'] = 'ì‚¬ìš©ìž %dëª…ì˜ ì‚ì œê°€ 실패했습니다.'; $lang['update_ok'] = 'ì‚¬ìš©ìž ë³€ê²½ì„ ì„±ê³µí–ˆìŠµë‹ˆë‹¤.'; $lang['update_fail'] = 'ì‚¬ìš©ìž ë³€ê²½ì„ ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤.'; diff --git a/lib/plugins/usermanager/lang/vi/lang.php b/lib/plugins/usermanager/lang/vi/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..2933d88752a2d2de929afffb9037ed069e4033a9 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/lang.php @@ -0,0 +1,5 @@ +<?php +/** + * Vietnamese language file + * + */ diff --git a/lib/scripts/page.js b/lib/scripts/page.js index 5da4a9cc0a2403ab29f87a5864995721c560666d..74aca9c06028967ab632420088ef45bf699affb8 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -10,7 +10,7 @@ dw_page = { init: function(){ dw_page.sectionHighlight(); jQuery('a.fn_top').mouseover(dw_page.footnoteDisplay); - dw_page.initTocToggle(); + dw_page.makeToggle('#dw__toc h3','#dw__toc > div'); }, /** @@ -93,48 +93,76 @@ dw_page = { }, /** - * Adds the toggle switch to the TOC + * Makes an element foldable by clicking its handle + * + * This is used for the TOC toggling, but can be used for other elements + * as well. A state indicator is inserted into the handle and can be styled + * by CSS. + * + * @param selector handle What should be clicked to toggle + * @param selector content This element will be toggled */ - initTocToggle: function() { - var $header, $clicky, $toc, $tocul, setClicky; - $header = jQuery('#toc__header'); - if(!$header.length) { - return; - } - $toc = jQuery('#toc__inside'); - $tocul = $toc.children('ul.toc'); + makeToggle: function(handle, content, state){ + var $handle, $content, $clicky, $child, setClicky; + $handle = jQuery(handle); + if(!$handle.length) return; + $content = jQuery(content); + if(!$content.length) return; + + // we animate the children + $child = $content.children(); + // class/display toggling setClicky = function(hiding){ if(hiding){ $clicky.html('<span>+</span>'); - $clicky[0].className = 'toc_open'; + $handle.addClass('closed'); + $handle.removeClass('open'); }else{ - $clicky.html('<span>−</span>'); - $clicky[0].className = 'toc_close'; + $clicky.html('<span>−</span>'); + $handle.addClass('open'); + $handle.removeClass('closed'); } }; - $clicky = jQuery(document.createElement('span')) - .attr('id','toc__toggle'); - $header.css('cursor','pointer') - .click(function () { - var hidden; + $handle[0].setState = function(state){ + var hidden; + if(!state) state = 1; + + // Assert that content instantly takes the whole space + $content.css('min-height', $content.height()).show(); - // Assert that $toc instantly takes the whole TOC space - $toc.css('height', $toc.height()).show(); + // stop any running animation + $child.stop(true, true); - hidden = $tocul.stop(true, true).is(':hidden'); + // was a state given or do we toggle? + if(state === -1) { + hidden = false; + } else if(state === 1) { + hidden = true; + } else { + hidden = $child.is(':hidden'); + } + + // update the state + setClicky(!hidden); + + // Start animation and assure that $toc is hidden/visible + $child.dw_toggle(hidden, function () { + $content.toggle(hidden); + }); + }; - setClicky(!hidden); + // the state indicator + $clicky = jQuery(document.createElement('strong')); - // Start animation and assure that $toc is hidden/visible - $tocul.dw_toggle(hidden, function () { - $toc.toggle(hidden); - }); - }) + // click function + $handle.css('cursor','pointer') + .click($handle[0].setState) .prepend($clicky); - setClicky(); + // initial state + $handle[0].setState(state); } }; diff --git a/lib/tpl/default/_mediamanager.css b/lib/tpl/default/_mediamanager.css index 68fa2e97f06b58ed68db5873cdc8455ee2d0e5ba..8c605f69a3af42e5a2cccf923b3194de14289565 100644 --- a/lib/tpl/default/_mediamanager.css +++ b/lib/tpl/default/_mediamanager.css @@ -343,18 +343,18 @@ /*____________ Revisions form ____________*/ -#mediamanager__page #page__revisions ul { +#mediamanager__page form.changes ul { margin-left: 10px; list-style-type: none; } -#mediamanager__page #page__revisions ul li div.li div { +#mediamanager__page form.changes ul li div.li div { font-size: 90%; color: __text_neu__; padding-left: 18px; } -#mediamanager__page #page__revisions ul li div.li input { +#mediamanager__page form.changes ul li div.li input { position: relative; top: 1px; } diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index a94f814aae2286703b418afd84db966906a6730a..3405ec258355b0b0411afd5c5d035b744292493d 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -265,11 +265,6 @@ div.dokuwiki a:active { text-decoration: underline; } -div.dokuwiki h1 a, -div.dokuwiki h2 a, -div.dokuwiki h3 a, -div.dokuwiki h4 a, -div.dokuwiki h5 a, div.dokuwiki a.nolink { color: __text__ !important; text-decoration: none !important; @@ -383,11 +378,11 @@ div.dokuwiki img.mediacenter { } /* smileys */ -div.dokuwiki img.middle { +div.dokuwiki img.icon { vertical-align: middle; } -div.dokuwiki acronym { +div.dokuwiki abbr { cursor: help; border-bottom: 1px dotted __text__; } @@ -552,7 +547,7 @@ div.dokuwiki table.inline td { /* ---------- table of contents ------------------- */ -div.dokuwiki div.toc { +div.dokuwiki #dw__toc { margin: 1.2em 0 0 2em; float: right; width: 200px; @@ -560,46 +555,45 @@ div.dokuwiki div.toc { clear: both; } -div.dokuwiki div.tocheader { +div.dokuwiki #dw__toc h3 { border: 1px solid __border__; background-color: __background_alt__; text-align: left; font-weight: bold; padding: 3px; - margin-bottom: 2px; + margin: 0 0 2px 0; + font-size: 1em; } -div.dokuwiki span.toc_open, -div.dokuwiki span.toc_close { +div.dokuwiki .toggle strong { border: 0.4em solid __background_alt__; float: right; display: block; margin: 0.4em 3px 0 0; } -div.dokuwiki span.toc_open span, -div.dokuwiki span.toc_close span { +div.dokuwiki .toggle span { display: none; } -div.dokuwiki span.toc_open { +div.dokuwiki .toggle.closed strong { margin-top: 0.4em; border-top: 0.4em solid __text__; } -div.dokuwiki span.toc_close { +div.dokuwiki .toggle.open strong { margin-top: 0; border-bottom: 0.4em solid __text__; } -div.dokuwiki #toc__inside { +div.dokuwiki #dw__toc > div { border: 1px solid __border__; background-color: __background__; text-align: left; padding: 0.5em 0 0.7em 0; } -div.dokuwiki ul.toc { +div.dokuwiki #dw__toc ul { list-style-type: none; list-style-image: none; line-height: 1.2em; @@ -607,23 +601,23 @@ div.dokuwiki ul.toc { margin: 0; } -div.dokuwiki ul.toc li { +div.dokuwiki #dw__toc ul li { background: transparent url(images/tocdot2.gif) 0 0.6em no-repeat; padding-left: 0.4em; } -div.dokuwiki ul.toc li.clear { +div.dokuwiki #dw__toc ul li.clear { background-image: none; padding-left: 0.4em; } -div.dokuwiki a.toc:link, -div.dokuwiki a.toc:visited { +div.dokuwiki #dw__toc a:link, +div.dokuwiki #dw__toc a:visited { color: __extern__; } -div.dokuwiki a.toc:hover, -div.dokuwiki a.toc:active { +div.dokuwiki #dw__toc a:hover, +div.dokuwiki #dw__toc a:active { color: __text__; } @@ -712,12 +706,20 @@ div.insitu-footnote { } /* --------------- search result formating --------------- */ -div.dokuwiki .search_result { - margin-bottom: 6px; +#dw__loading { + text-align: center; + margin-bottom: 1em; +} + +div.dokuwiki .search_results { padding: 0 10px 0 30px; } -div.dokuwiki .search_snippet { +div.dokuwiki .search_results dt { + margin-bottom: 3px; +} +div.dokuwiki .search_results dd { + margin-bottom: 6px; color: __text_other__; font-size: 12px; margin-left: 20px; diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 3e85c58f2833e91cebaba3bfd2ebae2bb6b301b7..9a14f29a2047bc5b3c9e980a4f8fdbd063194972 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -61,7 +61,7 @@ if (!defined('DOKU_INC')) die(); <div class="bar-right" id="bar__topright"> <?php tpl_button('recent')?> - <?php tpl_searchform()?> + <?php tpl_searchform()?>  </div> <div class="clearer"></div> @@ -121,7 +121,7 @@ if (!defined('DOKU_INC')) die(); <?php tpl_button('profile')?> <?php tpl_button('login')?> <?php tpl_button('index')?> - <?php tpl_button('top')?> + <?php tpl_button('top')?>  </div> <div class="clearer"></div> </div> diff --git a/lib/tpl/default/print.css b/lib/tpl/default/print.css index 45b60aad210c9acb8d708e9efb050f68ac59a899..f83e8c97c6c021cfd1a039fdf0596082d5109720 100644 --- a/lib/tpl/default/print.css +++ b/lib/tpl/default/print.css @@ -200,7 +200,7 @@ a.fn_bot { font-weight: bold; } -acronym { +abbr { border: 0; } @@ -224,5 +224,5 @@ table.inline td { border: 1px solid #000000; } -.toc, .footerinc, .header, .bar, .user { display: none; } +#dw__toc, .footerinc, .header, .bar, .user { display: none; } diff --git a/lib/tpl/default/rtl.css b/lib/tpl/default/rtl.css index 82c85839b28758920824f491ba0a332468f50828..8b28378744a6c6b50df0fb5064a010353c69d457 100644 --- a/lib/tpl/default/rtl.css +++ b/lib/tpl/default/rtl.css @@ -89,30 +89,36 @@ div.dokuwiki div.level4 { margin-left: 0px; margin-right: 63px; } div.dokuwiki div.level5 { margin-left: 0px; margin-right: 83px; } /* TOC control */ -div.dokuwiki div.toc { +div.dokuwiki #dw__toc { float: left; + margin: 1.2em 2em 0 0; } -div.dokuwiki div.tocheader { +div.dokuwiki #dw__toc h3 { text-align: right; } -div.dokuwiki #toc__inside { +div.dokuwiki .toggle strong { + float: left; + margin: 0.4em 0 0 3px; +} + +div.dokuwiki #dw__toc > div { text-align: right; } -div.dokuwiki ul.toc { +div.dokuwiki #dw__toc ul { padding: 0; padding-right: 1em; } -div.dokuwiki ul.toc li { +div.dokuwiki #dw__toc ul li { background-position: right 0.6em; padding-right: 0.4em; direction: rtl; } -div.dokuwiki ul.toc li.clear { +div.dokuwiki #dw__toc ul li.clear { padding-right: 0.4em; } diff --git a/lib/tpl/dokuwiki/css/_admin.css b/lib/tpl/dokuwiki/css/_admin.css index e4664367cf67b005521843dcf6485f870a4c2fba..c8f3694b5b387028e1bdfe4e56bb75e239057633 100644 --- a/lib/tpl/dokuwiki/css/_admin.css +++ b/lib/tpl/dokuwiki/css/_admin.css @@ -9,6 +9,9 @@ list-style-type: none; font-size: 1.125em; } +[dir=rtl] .dokuwiki ul.admin_tasks { + float: right; +} .dokuwiki ul.admin_tasks li { padding-left: 35px; @@ -18,6 +21,11 @@ background: transparent none no-repeat scroll 0 0; color: inherit; } +[dir=rtl] .dokuwiki ul.admin_tasks li { + padding-left: 0; + padding-right: 35px; + background-position: right 0; +} .dokuwiki ul.admin_tasks li.admin_acl { background-image: url(../../images/admin/acl.png); @@ -45,3 +53,7 @@ color: __text_neu__; background-color: inherit; } +[dir=rtl] .dokuwiki #admin__version { + clear: right; + float: left; +} diff --git a/lib/tpl/dokuwiki/css/_edit.css b/lib/tpl/dokuwiki/css/_edit.css index 5a3952c9010b8b55167e0cc8ae4c80d776daca95..374ddeb960be53b1296a7d462e436e79521a95ab 100644 --- a/lib/tpl/dokuwiki/css/_edit.css +++ b/lib/tpl/dokuwiki/css/_edit.css @@ -6,18 +6,24 @@ /* edit view ********************************************************************/ +.dokuwiki div.editBox { +} + /*____________ toolbar ____________*/ .dokuwiki div.toolbar { margin-bottom: .5em; overflow: hidden; } -.dokuwiki div.toolbar #draft__status { +#draft__status { float: right; color: __text_alt__; background-color: inherit; } -.dokuwiki div.toolbar #tool__bar { +[dir=rtl] #draft__status { + float: left; +} +#tool__bar { float: left; } @@ -55,42 +61,49 @@ div.picker button.toolbutton { /*____________ below the textarea ____________*/ -.dokuwiki #wiki__editbar { +.dokuwiki div.editBar { overflow: hidden; margin-bottom: .5em; } /* size and wrap controls */ -.dokuwiki #wiki__editbar #size__ctl { +#size__ctl { float: right; } -.dokuwiki #wiki__editbar #size__ctl img { +[dir=rtl] #size__ctl { + float: left; +} +#size__ctl img { cursor: pointer; } /* edit buttons */ -.dokuwiki #wiki__editbar .editButtons { +.dokuwiki .editBar .editButtons { display: inline; margin-right: 1em; } -.dokuwiki #wiki__editbar .editButtons input { +[dir=rtl] .dokuwiki .editBar .editButtons { + margin-right: 0; + margin-left: 1em; +} +.dokuwiki .editBar .editButtons input { } /* summary input and minor changes checkbox */ -.dokuwiki #wiki__editbar .summary { +.dokuwiki .editBar .summary { display: inline; } -.dokuwiki #wiki__editbar .summary label { +.dokuwiki .editBar .summary label { vertical-align: middle; white-space: nowrap; } -.dokuwiki #wiki__editbar .summary label span { +.dokuwiki .editBar .summary label span { vertical-align: middle; } -.dokuwiki #wiki__editbar .summary input { +.dokuwiki .editBar .summary input { } /* change background colour if summary is missing */ -.dokuwiki #wiki__editbar .summary input.missing { +.dokuwiki .editBar .summary input.missing { color: __text__; background-color: #ffcccc; } @@ -112,6 +125,9 @@ div.picker button.toolbutton { float: right; margin-top: -1.4em; } +[dir=rtl] .dokuwiki .secedit { + float: left; +} .dokuwiki .secedit input.button { font-size: 75%; } diff --git a/lib/tpl/dokuwiki/css/_forms.css b/lib/tpl/dokuwiki/css/_forms.css index 0c82f5f8c213433c72320a3942c8fc0e5009f0c3..fb07e989ada3aec5fb7c7a7006b0025e8eb33d7c 100644 --- a/lib/tpl/dokuwiki/css/_forms.css +++ b/lib/tpl/dokuwiki/css/_forms.css @@ -23,12 +23,18 @@ text-align: right; font-weight: bold; } +[dir=rtl] .dokuwiki label.block { + text-align: left; +} .dokuwiki label.simple { display: block; text-align: left; font-weight: normal; } +[dir=rtl] .dokuwiki label.simple { + text-align: right; +} .dokuwiki label.block input.edit { width: 50%; @@ -75,6 +81,9 @@ text-align: left; margin: 0.5em 0; } +[dir=rtl] #subscribe__form fieldset { + text-align: right; +} #subscribe__form label { display: block; diff --git a/lib/tpl/dokuwiki/css/_imgdetail.css b/lib/tpl/dokuwiki/css/_imgdetail.css index a3e0f55f55b8936fb828944a13fe62964d21cc27..a074000281cc576946fc74f0c45eb9fd028cf9ad 100644 --- a/lib/tpl/dokuwiki/css/_imgdetail.css +++ b/lib/tpl/dokuwiki/css/_imgdetail.css @@ -12,9 +12,17 @@ float: left; margin: 0 1.5em .5em 0; } +[dir=rtl] #dokuwiki__detail div.content img { + float: right; + margin-right: 0; + margin-left: 1.5em; +} #dokuwiki__detail div.img_detail { float: left; } +[dir=rtl] #dokuwiki__detail div.content div.img_detail { + float: right +} #dokuwiki__detail div.img_detail h2 { } diff --git a/lib/tpl/dokuwiki/css/_links.css b/lib/tpl/dokuwiki/css/_links.css index 58b611635574139cb8317fe49bf903c4e6de3414..22502f6a9dd180ff3b85e1f52ed4847b57ac2023 100644 --- a/lib/tpl/dokuwiki/css/_links.css +++ b/lib/tpl/dokuwiki/css/_links.css @@ -39,12 +39,11 @@ .dokuwiki a.interwiki { background-repeat: no-repeat; background-position: 0 center; - padding: 0 0 0 20px; + padding: 0 0 0 18px; } /* external link */ .dokuwiki a.urlextern { background-image: url(images/external-link.png); - padding: 0 0 0 17px; } /* windows share */ .dokuwiki a.windows { @@ -61,5 +60,14 @@ } /* interwiki link */ .dokuwiki a.interwiki { - padding: 0 0 0 17px; +} + +/* RTL corrections; if link icons don't work as expected, remove the following lines */ +[dir=rtl] .dokuwiki a.urlextern, +[dir=rtl] .dokuwiki a.windows, +[dir=rtl] .dokuwiki a.mail, +[dir=rtl] .dokuwiki a.interwiki, +[dir=rtl] .dokuwiki a.mediafile { + background-position: right center; + padding: 0 18px 0 0; } diff --git a/lib/tpl/dokuwiki/css/_media_popup.css b/lib/tpl/dokuwiki/css/_media_popup.css index 0469c8e60ac5041c0cdbe358b1aaee050b94d49b..c776e6b8a929e8d8a024bee039213f1987255663 100644 --- a/lib/tpl/dokuwiki/css/_media_popup.css +++ b/lib/tpl/dokuwiki/css/_media_popup.css @@ -22,6 +22,12 @@ html.popup { left: 0; border-right: 1px solid __border__; } +[dir=rtl] #mediamgr__aside { + left: auto; + right: 0; + border-right-width: 0; + border-left: 1px solid __border__; +} #mediamgr__aside .pad { padding: .5em; } @@ -33,6 +39,10 @@ html.popup { position: absolute; right: 0; } +[dir=rtl] #mediamgr__content { + right: auto; + left: 0; +} #mediamgr__content .pad { padding: .5em; } @@ -57,6 +67,10 @@ html.popup { #media__opts input { margin-right: .3em; } +[dir=rtl] #media__opts input { + margin-right: 0; + margin-left: .3em; +} #media__opts label { } @@ -65,22 +79,38 @@ html.popup { #media__tree ul { padding-left: .2em; } +[dir=rtl] #media__tree ul { + padding-left: 0; + padding-right: .2em; +} #media__tree ul li { clear: left; list-style-type: none; list-style-image: none; margin-left: 0; } +[dir=rtl] #media__tree ul li { + clear: right; + margin-right: 0; +} #media__tree ul li img { float: left; padding: .5em .3em 0 0; } +[dir=rtl] #media__tree ul li img { + float: right; + padding: .5em 0 0 .3em; +} #media__tree ul li div.li { display: inline; } #media__tree ul li li { margin-left: 1.5em; } +[dir=rtl] #media__tree ul li li { + margin-left: 0; + margin-right: 1.5em; +} /* right side ********************************************************************/ @@ -125,6 +155,10 @@ html.popup { margin-right: 1.5em; font-weight: bold; } +[dir=rtl] #media__content a.mediafile { + margin-right: 0; + margin-left: 1.5em; +} #media__content span.info { } #media__content img.btn { @@ -144,6 +178,10 @@ html.popup { float: left; margin: 0 .5em 0 18px; } +[dir=rtl] #media__content div.detail div.thumb { + float: right; + margin: 0 18px 0 .5em; +} #media__content div.detail div.thumb a { display: block; cursor: pointer; @@ -155,17 +193,17 @@ html.popup { /*____________ media search ____________*/ -form#dw__mediasearch { +#dw__mediasearch { } -form#dw__mediasearch p { +#dw__mediasearch p { } -form#dw__mediasearch label { +#dw__mediasearch label { } -form#dw__mediasearch label span { +#dw__mediasearch label span { } -form#dw__mediasearch input.edit { +#dw__mediasearch input.edit { } -form#dw__mediasearch input.button { +#dw__mediasearch input.button { } @@ -180,6 +218,9 @@ form#dw__mediasearch input.button { margin-bottom: .5em; overflow: hidden; } +[dir=rtl] #media__content form.meta div.metafield { + clear: right; +} #media__content form.meta label { display: block; @@ -188,11 +229,18 @@ form#dw__mediasearch input.button { font-weight: bold; clear: left; } +[dir=rtl] #media__content form.meta label { + float: right; + clear: right; +} #media__content form.meta .edit { float: left; width: 70%; margin: 0; } +[dir=rtl] #media__content form.meta .edit { + float: right; +} #media__content form.meta textarea.edit { /* needed because of IE8 hack in _edit.css for textarea.edit: */ max-width: 70%; @@ -203,3 +251,7 @@ form#dw__mediasearch input.button { clear: left; margin: .2em 0 0 25%; } +[dir=rtl] #media__content form.meta div.buttons { + clear: right; + margin: .2em 25% 0 0; +} diff --git a/lib/tpl/dokuwiki/css/_modal.css b/lib/tpl/dokuwiki/css/_modal.css index 125f702a81bdf2b2d883bb6dd37440e8fdc11b95..a3d3be1943110819e2ca0d3a00a7a02a77081904 100644 --- a/lib/tpl/dokuwiki/css/_modal.css +++ b/lib/tpl/dokuwiki/css/_modal.css @@ -13,6 +13,10 @@ #link__wiz { } +[dir=rtl] #link__wiz_close { + float: left; +} + #link__wiz_result { background-color: __background__; width: 293px; @@ -23,6 +27,9 @@ text-align: left; line-height: 1; } +[dir=rtl] #link__wiz_result { + text-align: right; +} #link__wiz_result div { padding: 3px 3px 3px 0; @@ -34,6 +41,10 @@ min-height: 16px; background: transparent 3px center no-repeat; } +[dir=rtl] #link__wiz_result div a { + padding: 3px 22px 3px 3px; + background-position: 257px 3px; +} #link__wiz_result div.type_u a { background-image: url(../../images/up.png); diff --git a/lib/tpl/dokuwiki/css/_recent.css b/lib/tpl/dokuwiki/css/_recent.css index 68f0e5826e58b256b1d8a31a182e6cbb84c7f112..d73bb9463c432b7934a47c4dff412aaea35785b4 100644 --- a/lib/tpl/dokuwiki/css/_recent.css +++ b/lib/tpl/dokuwiki/css/_recent.css @@ -5,54 +5,44 @@ /*____________ list of revisions / recent changes ____________*/ -/* select type of revisions (media/pages), should have a class on it's own, but hasn't */ -.dokuwiki #dw__recent label { +/* select type of revisions (media/pages) */ +.dokuwiki .changeType { margin-bottom: .5em; - display: block; } -.dokuwiki #dw__recent ul li, -.dokuwiki #page__revisions ul li { +.dokuwiki form.changes ul li { list-style: none; margin-left: 0; } -.dokuwiki #dw__recent ul li span, -.dokuwiki #dw__recent ul li a, -.dokuwiki #page__revisions ul li span, -.dokuwiki #page__revisions ul li a { +[dir=rtl] .dokuwiki form.changes ul li { + margin-right: 0; +} +.dokuwiki form.changes ul li span, +.dokuwiki form.changes ul li a { vertical-align: middle; } -.dokuwiki #dw__recent ul li span.user a, -.dokuwiki #page__revisions ul li span.user a { +.dokuwiki form.changes ul li span.user a { vertical-align: bottom; } -.dokuwiki #dw__recent ul li.minor, -.dokuwiki #page__revisions ul li.minor { +.dokuwiki form.changes ul li.minor { opacity: .7; } -.dokuwiki #dw__recent li span.date, -.dokuwiki #page__revisions li span.date { +.dokuwiki form.changes li span.date { } -.dokuwiki #dw__recent li a.diff_link, -.dokuwiki #page__revisions li a.diff_link { +.dokuwiki form.changes li a.diff_link { vertical-align: baseline; } -.dokuwiki #dw__recent li a.revisions_link, -.dokuwiki #page__revisions li a.revisions_link { +.dokuwiki form.changes li a.revisions_link { vertical-align: baseline; } -.dokuwiki #dw__recent li a.wikilink1, -.dokuwiki #dw__recent li a.wikilink2, -.dokuwiki #page__revisions li a.wikilink1, -.dokuwiki #page__revisions li a.wikilink2 { +.dokuwiki form.changes li a.wikilink1, +.dokuwiki form.changes li a.wikilink2 { } -.dokuwiki #dw__recent li span.sum, -.dokuwiki #page__revisions li span.sum { +.dokuwiki form.changes li span.sum { font-weight: bold; } -.dokuwiki #dw__recent li span.user, -.dokuwiki #page__revisions li span.user { +.dokuwiki form.changes li span.user { } diff --git a/lib/tpl/dokuwiki/css/_search.css b/lib/tpl/dokuwiki/css/_search.css index c124c1e861175c31c1da3bab4b383d26999bba1a..0090308c933384cb23ea07d64df382e866b6afbc 100644 --- a/lib/tpl/dokuwiki/css/_search.css +++ b/lib/tpl/dokuwiki/css/_search.css @@ -8,6 +8,8 @@ /* loading gif */ #dw__loading { + text-align: center; + margin-bottom: 1.4em; } /*____________ matching pagenames ____________*/ @@ -25,17 +27,26 @@ width: 12em; margin: 0 1.5em; } +[dir=rtl] .dokuwiki div.search_quickresult ul li { + float: right; +} /*____________ search results ____________*/ -/* container for one search result */ -.dokuwiki div.search_result { - margin-bottom: 1.4em; +.dokuwiki dl.search_results { + margin-bottom: 1.2em; +} + +/* search heading */ +.dokuwiki dl.search_results dt { + font-weight: normal; + margin-bottom: .2em; } /* search snippet */ -.dokuwiki div.search_result div.search_snippet { +.dokuwiki dl.search_results dd { color: __text_alt__; background-color: inherit; + margin: 0 0 1.2em 0; } /* search hit in normal text */ @@ -44,11 +55,11 @@ background-color: __highlight__; } /* search hit in search results */ -.dokuwiki div.search_result strong.search_hit { +.dokuwiki .search_results strong.search_hit { font-weight: normal; } /* ellipsis separating snippets */ -.dokuwiki div.search_result .search_sep { +.dokuwiki .search_results .search_sep { color: __text__; background-color: inherit; } @@ -78,6 +89,11 @@ text-align: left; display: none; } +[dir=rtl] .dokuwiki form.search div.ajax_qsearch { + left: auto; + right: -13.5em; + text-align: right; +} .dokuwiki form.search div.ajax_qsearch strong { display: block; margin-bottom: .3em; diff --git a/lib/tpl/dokuwiki/css/_toc.css b/lib/tpl/dokuwiki/css/_toc.css index b788175231ef5b1a17c2599b004a2fc0129f9f62..0d1b976d177ea68d1d8f5fd15522052c59cb5cda 100644 --- a/lib/tpl/dokuwiki/css/_toc.css +++ b/lib/tpl/dokuwiki/css/_toc.css @@ -7,56 +7,66 @@ ********************************************************************/ /* toc container */ -.dokuwiki div.toc { +#dw__toc { float: right; margin: 0 0 1.4em 1.4em; width: 12em; background-color: __background_alt__; color: inherit; } +[dir=rtl] #dw__toc { + float: left; + margin: 0 1.4em 1.4em 0; +} /*____________ toc header ____________*/ -.dokuwiki div.tocheader { +.dokuwiki h3.toggle { padding: .2em .5em; font-weight: bold; } -.dokuwiki .toc span.toc_open, -.dokuwiki .toc span.toc_close { +.dokuwiki .toggle strong { float: right; margin: 0 .2em; } +[dir=rtl] .dokuwiki .toggle strong { + float: left; +} /*____________ toc list ____________*/ -.dokuwiki #toc__inside { +#dw__toc > div { padding: .2em .5em; } -.dokuwiki #toc__inside ul { +#dw__toc ul { padding: 0; margin: 0; } -.dokuwiki #toc__inside ul li { +#dw__toc ul li { list-style: none; padding: 0; margin: 0; line-height: 1.1; } -.dokuwiki #toc__inside ul li div.li { +#dw__toc ul li div.li { padding: .15em 0; } -.dokuwiki #toc__inside ul ul { +#dw__toc ul ul { padding-left: 1em; } -.dokuwiki #toc__inside ul ul li { +[dir=rtl] #dw__toc ul ul { + padding-left: 0; + padding-right: 1em; +} +#dw__toc ul ul li { } -.dokuwiki #toc__inside ul li a { +#dw__toc ul li a { } /* in case of toc list jumping one level (e.g. if heading level 3 follows directly after heading level 1) */ -.dokuwiki #toc__inside ul li.clear { +#dw__toc ul li.clear { } @@ -66,6 +76,9 @@ .dokuwiki ul.idx { padding-left: 0; } +[dir=rtl] .dokuwiki ul.idx { + padding-right: 0; +} .dokuwiki ul.idx li { list-style-image: url(images/bullet.png); } @@ -75,3 +88,6 @@ .dokuwiki ul.idx li.closed { list-style-image: url(images/closed.png); } +[dir=rtl] .dokuwiki ul.idx li.closed { + list-style-image: url(images/closed-rtl.png); +} diff --git a/lib/tpl/dokuwiki/css/basic.css b/lib/tpl/dokuwiki/css/basic.css index 0c8b0c13f1d3b6290717a10dbfd7229e3c13c875..21bc9b25e73fa8b4c78c3bae69a8da91df627e46 100644 --- a/lib/tpl/dokuwiki/css/basic.css +++ b/lib/tpl/dokuwiki/css/basic.css @@ -15,15 +15,7 @@ html { html, body { color: __text__; - background-color: __background_site__; - background-image: url(images/page-background.svg); - /*background-image: -moz-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); see FS#2447*/ - background-image: -webkit-linear-gradient(top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); - background-image: -o-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); - background-image: -ms-linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); - background-image: linear-gradient( top, __background_neu__ 0%, __background_alt__ 1em, __background_site__ 4em); - background-size: 1px 10em; - background-repeat: repeat-x; + background: __background_site__ url(images/page-gradient.png) top left repeat-x; margin: 0; padding: 0; } @@ -53,7 +45,7 @@ legend { h1 { font-size: 2em; - margin: -.222em 0 0.444em; + margin: 0 0 0.444em; } h2 { font-size: 1.5em; @@ -383,3 +375,38 @@ button[readonly] { cursor: auto; } +/*____________ rtl corrections ____________*/ + +[dir=rtl] caption, +[dir=rtl] td, +[dir=rtl] th { + text-align: right; +} + +[dir=rtl] ul, +[dir=rtl] ol { + padding: 0 1.5em 0 0; +} +[dir=rtl] li, +[dir=rtl] dd { + margin: 0 1.5em 0 0; +} +[dir=rtl] blockquote { + border-width: 0 .25em 0 0; +} + +[dir=rtl] h1, +[dir=rtl] h2, +[dir=rtl] h3, +[dir=rtl] h4, +[dir=rtl] h5, +[dir=rtl] h6, +[dir=rtl] caption, +[dir=rtl] legend { + clear: right; +} + +[dir=rtl] .a11y { + left: auto; + right: -9000px; +} diff --git a/lib/tpl/dokuwiki/css/content.css b/lib/tpl/dokuwiki/css/content.css index 7cb7c6edf934db43800c4dbf3b93a6285ee2138d..ebeb4e17e922096d8d1213ba802a8042640fd6b1 100644 --- a/lib/tpl/dokuwiki/css/content.css +++ b/lib/tpl/dokuwiki/css/content.css @@ -19,6 +19,17 @@ .dokuwiki.page div.level3 {margin-left: 2em;} .dokuwiki.page div.level4 {margin-left: 3em;} .dokuwiki.page div.level5 {margin-left: 4em;} + +[dir=rtl] .dokuwiki .page h1 {margin-left: 0; margin-right: 0;} +[dir=rtl] .dokuwiki .page h2 {margin-left: 0; margin-right: .666em;} +[dir=rtl] .dokuwiki .page h3 {margin-left: 0; margin-right: 1.776em;} +[dir=rtl] .dokuwiki .page h4 {margin-left: 0; margin-right: 3em;} +[dir=rtl] .dokuwiki .page h5 {margin-left: 0; margin-right: 4.5712em;} +[dir=rtl] .dokuwiki .page div.level1 {margin-left: 0; margin-right: 0;} +[dir=rtl] .dokuwiki .page div.level2 {margin-left: 0; margin-right: 1em;} +[dir=rtl] .dokuwiki .page div.level3 {margin-left: 0; margin-right: 2em;} +[dir=rtl] .dokuwiki .page div.level4 {margin-left: 0; margin-right: 3em;} +[dir=rtl] .dokuwiki .page div.level5 {margin-left: 0; margin-right: 4em;} */ /* hx margin-left = (1 / font-size) * .levelx-margin */ @@ -133,6 +144,11 @@ margin-bottom: -1px; float: left; } +[dir=rtl] .dokuwiki dl.code dt, +[dir=rtl] .dokuwiki dl.file dt { + margin-left: 0; + margin-right: 1em; +} .dokuwiki dl.code dt a, .dokuwiki dl.file dt a { background-color: transparent; diff --git a/lib/tpl/dokuwiki/css/design.css b/lib/tpl/dokuwiki/css/design.css index c64ccc71031bf7bca841d61feadcb3e77f0c95b5..d1a00ce0a3743f118fc8a73a509a12fdb7a9b334 100644 --- a/lib/tpl/dokuwiki/css/design.css +++ b/lib/tpl/dokuwiki/css/design.css @@ -23,6 +23,11 @@ float: left; margin-right: .5em; } +[dir=rtl] #dokuwiki__header h1 img { + float: right; + margin-left: .5em; + margin-right: 0; +} #dokuwiki__header h1 span { display: block; padding-top: 10px; @@ -78,6 +83,10 @@ list-style: none; display: inline; } +[dir=rtl] #dokuwiki__header .tools li { + margin-right: 1em; + margin-left: 0; +} #dokuwiki__header .tools form.search div.ajax_qsearch li { font-size: 1em; margin-left: 0; @@ -86,13 +95,11 @@ text-overflow: ellipsis; } -#dokuwiki__usertools a.action, -#dokuwiki__sitetools a.action { +#dokuwiki__usertools a.action { padding-left: 20px; - background: transparent url(images/sitetools.png) no-repeat 0 0; + background: transparent url(images/usertools.png) no-repeat 0 0; } -[dir=rtl] #dokuwiki__usertools a.action, -[dir=rtl] #dokuwiki__sitetools a.action { +[dir=rtl] #dokuwiki__usertools a.action { padding-left: 0; padding-right: 20px; } @@ -110,6 +117,11 @@ text-align: right; width: 100%; } +[dir=rtl] #dokuwiki__usertools { + text-align: left; + left: 40px; + right: auto; +} #dokuwiki__usertools ul { margin: 0 auto; padding: 0; @@ -119,34 +131,34 @@ } #dokuwiki__usertools a.action.admin { - background-position: left -96px; + background-position: left 0; } [dir=rtl] #dokuwiki__usertools a.action.admin { - background-position: right -96px; + background-position: right 0; } #dokuwiki__usertools a.action.profile { - background-position: left -128px; + background-position: left -32px; } [dir=rtl] #dokuwiki__usertools a.action.profile { - background-position: right -128px; + background-position: right -32px; } #dokuwiki__usertools a.action.register { - background-position: left -160px; + background-position: left -64px; } [dir=rtl] #dokuwiki__usertools a.action.register { - background-position: right -160px; + background-position: right -64px; } #dokuwiki__usertools a.action.login { - background-position: left -192px; + background-position: left -96px; } [dir=rtl] #dokuwiki__usertools a.action.login { - background-position: right -192px; + background-position: right -96px; } #dokuwiki__usertools a.action.logout { - background-position: left -224px; + background-position: left -128px; } [dir=rtl] #dokuwiki__usertools a.action.logout { - background-position: right -224px; + background-position: right -128px; } @@ -155,6 +167,9 @@ #dokuwiki__sitetools { text-align: right; } +[dir=rtl] #dokuwiki__sitetools { + text-align: left; +} #dokuwiki__sitetools form.search { display: block; @@ -165,6 +180,9 @@ width: 18em; padding: .35em 22px .35em .1em; } +[dir=rtl] #dokuwiki__sitetools form.search input.edit { + padding: .35em .1em .35em 22px; +} #dokuwiki__sitetools form.search input.button { background: transparent url(images/search.png) no-repeat 0 0; border-width: 0; @@ -175,6 +193,11 @@ box-shadow: none; padding: 0; } +[dir=rtl] #dokuwiki__sitetools form.search input.button { + background-position: 5px 0; + margin-left: 0; + margin-right: -20px; +} #dokuwiki__sitetools ul { margin-top: 0.5em; @@ -182,25 +205,6 @@ #dokuwiki__sitetools li { } -#dokuwiki__sitetools a.action.recent { - background-position: left 0; -} -[dir=rtl] #dokuwiki__sitetools a.action.recent { - background-position: right 0; -} -#dokuwiki__sitetools a.action.media { - background-position: left -32px; -} -[dir=rtl] #dokuwiki__sitetools a.action.media { - background-position: right -32px; -} -#dokuwiki__sitetools a.action.index { - background-position: left -64px; -} -[dir=rtl] #dokuwiki__sitetools a.action.index { - background-position: right -64px; -} - /*____________ breadcrumbs ____________*/ .dokuwiki div.breadcrumbs { @@ -284,6 +288,10 @@ #dokuwiki__aside ol { padding-left: 0; } +[dir=rtl] #dokuwiki__aside ul, +[dir=rtl] #dokuwiki__aside ol { + padding-right: 0; +} #dokuwiki__aside li ul, #dokuwiki__aside li ol { margin-bottom: 0; @@ -309,6 +317,10 @@ overflow: hidden; padding: 1em 1em 0; } +[dir=rtl] .dokuwiki .pageId { + right: auto; + left: -1em; +} .dokuwiki .pageId span { font-size: 0.875em; border: solid __background_alt__; @@ -328,7 +340,7 @@ border: 1px solid #eee; box-shadow: 0 0 .5em #999; border-radius: 2px; - padding: 2em; + padding: 1.556em 2em 2em; margin-bottom: .5em; overflow: hidden; word-wrap: break-word; @@ -338,6 +350,9 @@ font-size: 0.875em; text-align: right; } +[dir=rtl] .dokuwiki .docInfo { + text-align: left; +} /*____________ misc ____________*/ @@ -375,16 +390,35 @@ border-bottom-left-radius: 4px; border-left-width: 1px; } +[dir=rtl] .dokuwiki div.toolbar button.toolbutton:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-left-width: 0; + border-right-width: 1px; +} .dokuwiki div.toolbar button.toolbutton:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } +[dir=rtl] .dokuwiki div.toolbar button.toolbutton:last-child { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-left-width: 1px; +} .dokuwiki div.section_highlight { margin: -3em -2em -.01em -2em; padding: 3em 1em .01em 1em; border-width: 0 1em; } +[dir=rtl] .dokuwiki div.section_highlight { + margin-right: -2em; + border-right-width: 1em; +} .dokuwiki textarea.edit { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Liberation Mono", Monaco, "Courier New", monospace; @@ -392,58 +426,77 @@ .dokuwiki div.preview { margin: 0 -2em; - padding: 2em; + padding: 0 2em; +} +.dokuwiki.hasSidebar div.preview { + border-right: __sidebar_width__ solid __background_alt__; +} +[dir=rtl] .dokuwiki.hasSidebar div.preview { + border-right-width: 0; + border-left: __sidebar_width__ solid __background_alt__; +} +.dokuwiki div.preview div.pad { + padding: 1.556em 0 2em; } /*____________ changes to _toc ____________*/ -.dokuwiki div.toc { - margin: -2em -2em .5em 1.4em; +#dw__toc { + margin: -1.556em -2em .5em 1.4em; width: __sidebar_width__; border-left: 1px solid __border__; background: __background__; color: inherit; } +[dir=rtl] #dw__toc { + margin: -1.556em 1.4em .5em -2em; + border-left-width: 0; + border-right: 1px solid __border__; +} -.dokuwiki div.tocheader { +.dokuwiki h3.toggle { padding: .5em 1em; margin-bottom: 0; font-size: .875em; letter-spacing: .1em; } +#dokuwiki__aside h3.toggle { + display: none; +} -.dokuwiki .toc span.toc_open, -.dokuwiki .toc span.toc_close { +.dokuwiki .toggle strong { background: transparent url(images/toc-arrows.png) 0 0; width: 8px; height: 5px; margin: .4em 0 0; } -.dokuwiki .toc span.toc_open { +.dokuwiki .toggle.closed strong { background-position: 0 -5px; } -.dokuwiki .toc span.toc_open span, -.dokuwiki .toc span.toc_close span { +.dokuwiki .toggle strong span { display: none; } -.dokuwiki #toc__inside { +#dw__toc > div { font-size: 0.875em; padding: .5em 1em 1em; } -.dokuwiki #toc__inside ul { +#dw__toc ul { padding: 0 0 0 1.2em; } -.dokuwiki #toc__inside ul li { +[dir=rtl] #dw__toc ul { + padding: 0 1.5em 0 0; +} +#dw__toc ul li { list-style-image: url(images/toc-bullet.png); } -.dokuwiki #toc__inside ul li.clear { +#dw__toc ul li.clear { list-style: none; } -.dokuwiki #toc__inside ul li div.li { +#dw__toc ul li div.li { padding: .2em 0; } @@ -470,9 +523,18 @@ text-align: right; clear: left; } +[dir=rtl] #dokuwiki__detail div.img_detail dl dt { + float: right; + text-align: left; + clear: right; +} #dokuwiki__detail div.img_detail dl dd { margin-left: 9.5em; } +[dir=rtl] #dokuwiki__detail div.img_detail dl dd { + margin-left: 0; + margin-right: 9.5em; +} /*____________ JS popup ____________*/ @@ -496,6 +558,10 @@ .JSpopup ol { padding-left: 0; } +[dir=rtl] .JSpopup ul, +[dir=rtl] .JSpopup ol { + padding-right: 0; +} /* footer @@ -518,6 +584,10 @@ font-size: 100%; } +[dir=rtl] #dokuwiki__footer .license img { + margin: 0 0 0 .5em; +} + #dokuwiki__footer div.buttons a img { opacity: 0.5; } diff --git a/lib/tpl/dokuwiki/css/mobile.css b/lib/tpl/dokuwiki/css/mobile.css index e1052f43773654815a564d9390ae183a9a093628..9138f8031dcc9a7709ca5090af540425154aa423 100644 --- a/lib/tpl/dokuwiki/css/mobile.css +++ b/lib/tpl/dokuwiki/css/mobile.css @@ -5,40 +5,73 @@ * @author Anika Henke <anika@selfthinker.org> */ -/* up to 768px screen widths +/* up to 979px screen widths ********************************************************************/ -@media only screen and (max-width: 768px), only screen and (max-device-width: 960px) { +@media only screen and (max-width: 979px) { /* structure */ #dokuwiki__aside { width: 100%; float: none; } -#dokuwiki__aside > .pad { + +#dokuwiki__aside > .pad, +[dir=rtl] #dokuwiki__aside > .pad { margin: 0 0 .5em; + /* style like .page */ + background: __background__; + color: inherit; + border: 1px solid #eee; + box-shadow: 0 0 .5em #999; + border-radius: 2px; + padding: 1em; + margin-bottom: .5em; +} + +#dokuwiki__aside h3.toggle { + font-size: 1em; +} +#dokuwiki__aside h3.toggle.closed { + margin-bottom: 0; + padding-bottom: 0; +} +#dokuwiki__aside h3.toggle.open { + border-bottom: 1px solid __border__; } -.hasSidebar #dokuwiki__content { +.showSidebar #dokuwiki__content { float: none; margin-left: 0; width: 100%; } -.hasSidebar #dokuwiki__content > .pad { +.showSidebar #dokuwiki__content > .pad { margin-left: 0; } +[dir=rtl] .showSidebar #dokuwiki__content, +[dir=rtl] .showSidebar #dokuwiki__content > .pad { + margin-right: 0; +} + /* toc */ -.dokuwiki div.toc { +#dw__toc { float: none; margin: 0 0 1em 0; width: auto; border-left-width: 0; border-bottom: 1px solid __border__; } -.dokuwiki div.tocheader { - padding: 0 0 .5em; +[dir=rtl] #dw__toc { + float: none; + margin: 0 0 1em 0; + border-right-width: 0; +} + +.dokuwiki h3.toggle { + padding: 0 .5em .5em 0; } -.dokuwiki #toc__inside { +#dw__toc > div, +#dokuwiki__aside div.content { padding: .2em 0 .5em; } @@ -46,12 +79,6 @@ .dokuwiki div.page { padding: 1em; } -.dokuwiki .pageId span { - border-width: 0; - background-color: __background_site__; - color: __text_alt__; - box-shadow: 0 0 0; -} /* _edit */ .dokuwiki div.section_highlight { @@ -65,10 +92,12 @@ } /* _recent */ -.dokuwiki #dw__recent ul, -.dokuwiki #page__revisions ul { +.dokuwiki form.changes ul { padding-left: 0; } +[dir=rtl] .dokuwiki form.changes ul { + padding-right: 0; +} } /* /@media */ @@ -76,7 +105,7 @@ /* up to 480px screen widths ********************************************************************/ -@media only screen and (max-width: 480px), only screen and (max-device-width: 960px) { +@media only screen and (max-width: 480px) { /*____________ structure ____________*/ @@ -90,6 +119,7 @@ padding: .5em 0; } + /*____________ header ____________*/ #dokuwiki__header ul.a11y.skip { @@ -103,10 +133,19 @@ padding-left: 0; margin: 0; } +[dir=rtl] #dokuwiki__header ul.a11y.skip { + left: auto !important; + right: 0 !important; + float: left; + padding-right: 0; +} #dokuwiki__header ul.a11y.skip li { margin-left: .35em; display: inline; } +[dir=rtl] #dokuwiki__header ul.a11y.skip li { + margin: 0 .35em 0 0; +} #dokuwiki__header .headings, #dokuwiki__header .tools { @@ -115,9 +154,18 @@ width: auto; margin-bottom: .5em; } +[dir=rtl] #dokuwiki__header .headings, +[dir=rtl] #dokuwiki__header .tools { + float: none; + text-align: right; + width: auto; +} #dokuwiki__sitetools { text-align: left; } +[dir=rtl] #dokuwiki__sitetools { + text-align: right; +} #dokuwiki__usertools, #dokuwiki__sitetools ul, #dokuwiki__sitetools h3, @@ -133,6 +181,11 @@ margin: 0 .2em .2em 0; width: 49%; } +[dir=rtl] #dokuwiki__sitetools form.search { + float: right; + margin: 0 0 .2em .2em; +} + #dokuwiki__sitetools form.search input.edit { width: 100% !important; } @@ -148,6 +201,9 @@ float: right; width: 49%; } +[dir=rtl] #dokuwiki__header .mobileTools { + float: left; +} #dokuwiki__header .mobileTools select { padding: .3em .1em; width: 100% !important; @@ -156,6 +212,7 @@ /*____________ content ____________*/ +#dokuwiki__aside > .pad, .dokuwiki div.page { padding: .5em; } @@ -178,6 +235,9 @@ .dokuwiki label.block { text-align: left; } +[dir=rtl] .dokuwiki label.block { + text-align: right; +} .dokuwiki label.block span { display: block; } diff --git a/lib/tpl/dokuwiki/css/pagetools.css b/lib/tpl/dokuwiki/css/pagetools.css index bfa22cb2e784e02e1339031f068747c2d01d4a74..a40d525b3028cc5efd461db51a9aa22b52a39caf 100644 --- a/lib/tpl/dokuwiki/css/pagetools.css +++ b/lib/tpl/dokuwiki/css/pagetools.css @@ -22,6 +22,10 @@ /* move the tools just outside of the site */ right: 40px; } +[dir=rtl] #dokuwiki__usertools { + right: auto; + left: 40px; +} #dokuwiki__pagetools { @@ -31,6 +35,10 @@ top: 2em; width: 40px; } +[dir=rtl] #dokuwiki__pagetools { + right: auto; + left: -40px; +} #dokuwiki__pagetools div.tools { position: fixed; @@ -46,6 +54,11 @@ /* add transparent border to prevent jumping when proper border is added on hover */ border: 1px solid transparent; } +[dir=rtl] #dokuwiki__pagetools ul { + right: auto; + left: 0; + text-align: left; +} #dokuwiki__pagetools ul li { padding: 0; @@ -66,6 +79,10 @@ border: 1px solid transparent; white-space: nowrap; } +[dir=rtl] #dokuwiki__pagetools ul li a { + padding: 5px 5px 5px 40px; + background-position: left 0; +} /* hide labels accessibly when neither on hover nor on focus */ #dokuwiki__pagetools ul li a span { @@ -82,6 +99,10 @@ border-radius: 2px; box-shadow: 2px 2px 2px __text_alt__; } +[dir=rtl] #dokuwiki__pagetools:hover ul, +[dir=rtl] #dokuwiki__pagetools ul li a:focus { + box-shadow: -2px 2px 2px __text_alt__; +} #dokuwiki__pagetools:hover ul li a span, #dokuwiki__pagetools ul li a:focus span { @@ -108,6 +129,14 @@ #dokuwiki__pagetools ul li a.edit:focus { background-position: right -45px; } +[dir=rtl] #dokuwiki__pagetools ul li a.edit { + background-position: left 0; +} +[dir=rtl] #dokuwiki__pagetools ul li a.edit:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.edit:active, +[dir=rtl] #dokuwiki__pagetools ul li a.edit:focus { + background-position: left -45px; +} #dokuwiki__pagetools ul li a.create { background-position: right -90px; @@ -117,6 +146,14 @@ #dokuwiki__pagetools ul li a.create:focus { background-position: right -135px; } +[dir=rtl] #dokuwiki__pagetools ul li a.create { + background-position: left -90px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.create:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.create:active, +[dir=rtl] #dokuwiki__pagetools ul li a.create:focus { + background-position: left -135px; +} #dokuwiki__pagetools ul li a.show { background-position: right -270px; @@ -126,6 +163,14 @@ #dokuwiki__pagetools ul li a.show:focus { background-position: right -315px; } +[dir=rtl] #dokuwiki__pagetools ul li a.show { + background-position: left -270px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.show:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.show:active, +[dir=rtl] #dokuwiki__pagetools ul li a.show:focus { + background-position: left -315px; +} #dokuwiki__pagetools ul li a.source { background-position: right -360px; @@ -135,6 +180,14 @@ #dokuwiki__pagetools ul li a.source:focus { background-position: right -405px; } +[dir=rtl] #dokuwiki__pagetools ul li a.source { + background-position: left -360px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.source:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.source:active, +[dir=rtl] #dokuwiki__pagetools ul li a.source:focus { + background-position: left -405px; +} #dokuwiki__pagetools ul li a.draft { background-position: right -180px; @@ -144,6 +197,14 @@ #dokuwiki__pagetools ul li a.draft:focus { background-position: right -225px; } +[dir=rtl] #dokuwiki__pagetools ul li a.draft { + background-position: left -180px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.draft:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.draft:active, +[dir=rtl] #dokuwiki__pagetools ul li a.draft:focus { + background-position: left -225px; +} #dokuwiki__pagetools ul li a.revs { background-position: right -540px; @@ -154,6 +215,15 @@ .mode_revisions #dokuwiki__pagetools ul li a.revs { background-position: right -585px; } +[dir=rtl] #dokuwiki__pagetools ul li a.revs { + background-position: left -540px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.revs:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.revs:active, +[dir=rtl] #dokuwiki__pagetools ul li a.revs:focus, +.mode_revisions [dir=rtl] #dokuwiki__pagetools ul li a.revs { + background-position: left -585px; +} #dokuwiki__pagetools ul li a.backlink { background-position: right -630px; @@ -164,6 +234,15 @@ .mode_backlink #dokuwiki__pagetools ul li a.backlink { background-position: right -675px; } +[dir=rtl] #dokuwiki__pagetools ul li a.backlink { + background-position: left -630px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.backlink:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.backlink:active, +[dir=rtl] #dokuwiki__pagetools ul li a.backlink:focus, +.mode_backlink [dir=rtl] #dokuwiki__pagetools ul li a.backlink { + background-position: left -675px; +} #dokuwiki__pagetools ul li a.top { background-position: right -810px; @@ -173,6 +252,14 @@ #dokuwiki__pagetools ul li a.top:focus { background-position: right -855px; } +[dir=rtl] #dokuwiki__pagetools ul li a.top { + background-position: left -810px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.top:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.top:active, +[dir=rtl] #dokuwiki__pagetools ul li a.top:focus { + background-position: left -855px; +} #dokuwiki__pagetools ul li a.revert { background-position: right -450px; @@ -183,6 +270,15 @@ .mode_revert #dokuwiki__pagetools ul li a.revert { background-position: right -495px; } +[dir=rtl] #dokuwiki__pagetools ul li a.revert { + background-position: left -450px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.revert:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.revert:active, +[dir=rtl] #dokuwiki__pagetools ul li a.revert:focus, +.mode_revert [dir=rtl] #dokuwiki__pagetools ul li a.revert { + background-position: left -495px; +} #dokuwiki__pagetools ul li a.subscribe { background-position: right -720px; @@ -193,6 +289,15 @@ .mode_subscribe #dokuwiki__pagetools ul li a.subscribe { background-position: right -765px; } +[dir=rtl] #dokuwiki__pagetools ul li a.subscribe { + background-position: left -720px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:active, +[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:focus, +.mode_subscribe [dir=rtl] #dokuwiki__pagetools ul li a.subscribe { + background-position: left -765px; +} #dokuwiki__pagetools ul li a.mediaManager { background-position: right -900px; @@ -202,6 +307,14 @@ #dokuwiki__pagetools ul li a.mediaManager:focus { background-position: right -945px; } +[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager { + background-position: left -900px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:active, +[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:focus { + background-position: left -945px; +} #dokuwiki__pagetools ul li a.back { background-position: right -990px; @@ -211,3 +324,11 @@ #dokuwiki__pagetools ul li a.back:focus { background-position: right -1035px; } +[dir=rtl] #dokuwiki__pagetools ul li a.back { + background-position: left -990px; +} +[dir=rtl] #dokuwiki__pagetools ul li a.back:hover, +[dir=rtl] #dokuwiki__pagetools ul li a.back:active, +[dir=rtl] #dokuwiki__pagetools ul li a.back:focus { + background-position: left -1035px; +} diff --git a/lib/tpl/dokuwiki/css/print.css b/lib/tpl/dokuwiki/css/print.css index 58b8a5f0d8ee14fde4281512267a70083b80af19..191d50c28491f00af97cb2356f0f4c919b1d22a7 100644 --- a/lib/tpl/dokuwiki/css/print.css +++ b/lib/tpl/dokuwiki/css/print.css @@ -21,7 +21,8 @@ div.error, #dokuwiki__header .tools, #dokuwiki__aside, .dokuwiki .breadcrumbs, -.dokuwiki .toc, +#dw__toc, +h3.toggle, .dokuwiki .secedit, #dokuwiki__pagetools, #dokuwiki__footer { diff --git a/lib/tpl/dokuwiki/css/rtl.css b/lib/tpl/dokuwiki/css/rtl.css deleted file mode 100644 index e0f81bb214b404eeacdf5f8d4577f575ed1dc3be..0000000000000000000000000000000000000000 --- a/lib/tpl/dokuwiki/css/rtl.css +++ /dev/null @@ -1,593 +0,0 @@ -/** - * This file provides layout and design corrections for right-to-left - * languages. - * - * @author Anika Henke <anika@selfthinker.org> - */ - -/*____________ basic ____________*/ - -[dir=rtl] caption, -[dir=rtl] td, -[dir=rtl] th { - text-align: right; -} - -[dir=rtl] ul, -[dir=rtl] ol { - padding: 0 1.5em 0 0; -} -[dir=rtl] li, -[dir=rtl] dd { - margin: 0 1.5em 0 0; -} -[dir=rtl] blockquote { - border-width: 0 .25em 0 0; -} - -[dir=rtl] h1, -[dir=rtl] h2, -[dir=rtl] h3, -[dir=rtl] h4, -[dir=rtl] h5, -[dir=rtl] h6, -[dir=rtl] caption, -[dir=rtl] legend { - clear: right; -} - -[dir=rtl] .a11y { - left: auto; - right: -9000px; -} - - -/*____________ _imgdetail ____________*/ - -[dir=rtl] #dokuwiki__detail div.content img { - float: right; - margin-right: 0; - margin-left: 1.5em; -} -[dir=rtl] #dokuwiki__detail div.content div.img_detail { - float: right -} - - -/*____________ _mediamanager ____________*/ - -[dir=rtl] #mediamgr__aside { - left: auto; - right: 0; - border-right-width: 0; - border-left: 1px solid __border__; -} -[dir=rtl] #mediamgr__content { - right: auto; - left: 0; -} - -[dir=rtl] #media__opts input { - margin-right: 0; - margin-left: .3em; -} - -[dir=rtl] #media__tree ul { - padding-left: 0; - padding-right: .2em; -} -[dir=rtl] #media__tree ul li { - clear: right; - margin-right: 0; -} -[dir=rtl] #media__tree ul li img { - float: right; - padding: .5em 0 0 .3em; -} -[dir=rtl] #media__tree ul li li { - margin-left: 0; - margin-right: 1.5em; -} - -[dir=rtl] #media__content a.mediafile { - margin-right: 0; - margin-left: 1.5em; -} -[dir=rtl] #media__content div.detail div.thumb { - float: right; - margin: 0 18px 0 .5em; -} -[dir=rtl] #media__content form.meta div.metafield { - clear: right; -} -[dir=rtl] #media__content form.meta label { - float: right; - clear: right; -} -[dir=rtl] #media__content form.meta .edit { - float: right; -} -[dir=rtl] #media__content form.meta div.buttons { - clear: right; - margin: .2em 25% 0 0; -} - - -/*____________ _links ____________*/ - -/* if link icons don't work as expected, remove the following lines */ -[dir=rtl] .dokuwiki a.urlextern, -[dir=rtl] .dokuwiki a.windows, -[dir=rtl] .dokuwiki a.mail, -[dir=rtl] .dokuwiki a.interwiki, -[dir=rtl] .dokuwiki a.mediafile { - background-position: right center; - padding: 0 17px 0 0; -} - - -/*____________ _toc ____________*/ - -[dir=rtl] .dokuwiki div.toc { - float: left; - margin: 0 1.4em 1.4em 0; -} -[dir=rtl] .dokuwiki .toc span.toc_open, -[dir=rtl] .dokuwiki .toc span.toc_close { - float: left; -} -[dir=rtl] .dokuwiki #toc__inside ul ul { - padding-left: 0; - padding-right: 1em; -} - -[dir=rtl] .dokuwiki ul.idx { - padding-right: 0; -} -[dir=rtl] .dokuwiki ul.idx li.closed { - list-style-image: url(images/closed-rtl.png); -} - - -/*____________ _footnotes ____________*/ - - -/*____________ _search ____________*/ - -[dir=rtl] .dokuwiki div.search_quickresult ul li { - float: right; -} -[dir=rtl] .dokuwiki form.search div.ajax_qsearch { - left: auto; - right: -13.5em; - text-align: right; -} - - -/*____________ _recent ____________*/ - -[dir=rtl] .dokuwiki #dw__recent ul li, -[dir=rtl] .dokuwiki #page__revisions ul li { - margin-right: 0; -} - - -/*____________ _diff ____________*/ - - -/*____________ _edit ____________*/ - -[dir=rtl] .dokuwiki div.toolbar #draft__status { - float: left; -} -[dir=rtl] .dokuwiki #wiki__editbar #size__ctl { - float: left; -} -[dir=rtl] .dokuwiki #wiki__editbar #size__ctl img { - cursor: pointer; -} -[dir=rtl] .dokuwiki #wiki__editbar .editButtons { - margin-right: 0; - margin-left: 1em; -} - -[dir=rtl] .dokuwiki .secedit { - float: left; -} - - -/*____________ _modal ____________*/ - -[dir=rtl] #link__wiz_close { - float: left; -} -[dir=rtl] #link__wiz_result { - text-align: right; -} -[dir=rtl] #link__wiz_result div.type_u, -[dir=rtl] #link__wiz_result div.type_f, -[dir=rtl] #link__wiz_result div.type_d { - padding: 3px 22px 3px 3px; - background-position: 257px 3px; -} - - -/*____________ _forms ____________*/ - -[dir=rtl] .dokuwiki label.block { - text-align: left; -} -[dir=rtl] .dokuwiki label.simple { - text-align: right; -} - -[dir=rtl] form#subscribe__form fieldset { - text-align: right; -} - - -/*____________ _admin ____________*/ - -[dir=rtl] .dokuwiki ul.admin_tasks { - float: right; -} -[dir=rtl] .dokuwiki ul.admin_tasks li { - padding-left: 0; - padding-right: 35px; - background-position: right 0; -} - -[dir=rtl] .dokuwiki #admin__version { - clear: right; - float: left; -} - - -/*____________ includes ____________*/ - - -/*____________ structure ____________*/ - -[dir=rtl] #dokuwiki__header .headings { - float: right; - text-align: right; -} -[dir=rtl] #dokuwiki__header .tools { - float: left; - text-align: left; -} - -[dir=rtl] #dokuwiki__aside { - float: right; -} -[dir=rtl] #dokuwiki__aside > .pad { - margin: 0 0 0 1.5em; -} - -[dir=rtl] .hasSidebar #dokuwiki__content { - float: left; - margin-left: 0; - margin-right: -__sidebar_width__; -} -[dir=rtl] .hasSidebar #dokuwiki__content > .pad { - margin-left: 0; - margin-right: __sidebar_width__; -} - -/*____________ design ____________*/ - -[dir=rtl] #dokuwiki__header h1 img { - float: right; - margin-left: .5em; - margin-right: 0; -} - -[dir=rtl] #dokuwiki__sitetools form.search input.edit { - padding: .35em .1em .35em 22px; -} -[dir=rtl] #dokuwiki__sitetools form.search input.button { - background-position: 5px 0; - margin-left: 0; - margin-right: -20px; -} - -[dir=rtl] #dokuwiki__usertools { - text-align: left; - left: 40px; - right: auto; -} - -[dir=rtl] #dokuwiki__sitetools { - text-align: left; -} - -[dir=rtl] #dokuwiki__aside ul, #dokuwiki__aside ol { - padding-right: 0; -} - -[dir=rtl] .dokuwiki .pageId { - right: auto; - left: -1em; -} - -[dir=rtl] .dokuwiki .docInfo { - text-align: left; -} - -[dir=rtl] .dokuwiki div.toolbar button.toolbutton:first-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-left-width: 0; - border-right-width: 1px; -} -[dir=rtl] .dokuwiki div.toolbar button.toolbutton:last-child { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-left-width: 1px; -} - -[dir=rtl] .dokuwiki div.section_highlight { - margin-right: -2em; - border-right-width: 1em; -} - -[dir=rtl] #dokuwiki__footer .license img { - margin: 0 0 0 .5em; -} - -[dir=rtl] .dokuwiki div.toc { - margin: -2em 1.4em .5em -2em; - border-left-width: 0; - border-right: 1px solid __border__; -} -[dir=rtl] .dokuwiki #toc__inside ul { - padding: 0 1.5em 0 0; -} - -[dir=rtl] #dokuwiki__detail div.img_detail dl dt { - float: right; - text-align: left; - clear: right; -} -[dir=rtl] #dokuwiki__detail div.img_detail dl dd { - margin-left: 0; - margin-right: 9.5em; -} - - -/*____________ pagetools ____________*/ - -[dir=rtl] #dokuwiki__usertools { - right: auto; - left: 40px; -} - -[dir=rtl] #dokuwiki__pagetools { - right: auto; - left: -40px; -} - -[dir=rtl] #dokuwiki__pagetools ul { - right: auto; - left: 0; - text-align: left; -} - -[dir=rtl] #dokuwiki__pagetools ul li a { - padding: 5px 5px 5px 40px; - background-position: left 0; -} - -[dir=rtl] #dokuwiki__pagetools:hover ul, -[dir=rtl] #dokuwiki__pagetools ul li a:focus { - box-shadow: -2px 2px 2px __text_alt__; -} - -/* all available icons in sprite */ -[dir=rtl] #dokuwiki__pagetools ul li a.edit { - background-position: left 0; -} -[dir=rtl] #dokuwiki__pagetools ul li a.edit:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.edit:active, -[dir=rtl] #dokuwiki__pagetools ul li a.edit:focus { - background-position: left -45px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.create { - background-position: left -90px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.create:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.create:active, -[dir=rtl] #dokuwiki__pagetools ul li a.create:focus { - background-position: left -135px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.show { - background-position: left -270px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.show:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.show:active, -[dir=rtl] #dokuwiki__pagetools ul li a.show:focus { - background-position: left -315px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.source { - background-position: left -360px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.source:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.source:active, -[dir=rtl] #dokuwiki__pagetools ul li a.source:focus { - background-position: left -405px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.draft { - background-position: left -180px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.draft:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.draft:active, -[dir=rtl] #dokuwiki__pagetools ul li a.draft:focus { - background-position: left -225px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.revs { - background-position: left -540px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.revs:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.revs:active, -[dir=rtl] #dokuwiki__pagetools ul li a.revs:focus, -.mode_revisions [dir=rtl] #dokuwiki__pagetools ul li a.revs { - background-position: left -585px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.backlink { - background-position: left -630px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.backlink:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.backlink:active, -[dir=rtl] #dokuwiki__pagetools ul li a.backlink:focus, -.mode_backlink [dir=rtl] #dokuwiki__pagetools ul li a.backlink { - background-position: left -675px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.top { - background-position: left -810px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.top:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.top:active, -[dir=rtl] #dokuwiki__pagetools ul li a.top:focus { - background-position: left -855px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.revert { - background-position: left -450px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.revert:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.revert:active, -[dir=rtl] #dokuwiki__pagetools ul li a.revert:focus, -.mode_revert [dir=rtl] #dokuwiki__pagetools ul li a.revert { - background-position: left -495px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.subscribe { - background-position: left -720px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:active, -[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:focus, -.mode_subscribe [dir=rtl] #dokuwiki__pagetools ul li a.subscribe { - background-position: left -765px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager { - background-position: left -900px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:active, -[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:focus { - background-position: left -945px; -} - -[dir=rtl] #dokuwiki__pagetools ul li a.back { - background-position: left -990px; -} -[dir=rtl] #dokuwiki__pagetools ul li a.back:hover, -[dir=rtl] #dokuwiki__pagetools ul li a.back:active, -[dir=rtl] #dokuwiki__pagetools ul li a.back:focus { - background-position: left -1035px; -} - - -/*____________ content ____________*/ - -/* section indenting -[dir=rtl] .dokuwiki .page h1 {margin-left: 0; margin-right: 0;} -[dir=rtl] .dokuwiki .page h2 {margin-left: 0; margin-right: .666em;} -[dir=rtl] .dokuwiki .page h3 {margin-left: 0; margin-right: 1.776em;} -[dir=rtl] .dokuwiki .page h4 {margin-left: 0; margin-right: 3em;} -[dir=rtl] .dokuwiki .page h5 {margin-left: 0; margin-right: 4.5712em;} -[dir=rtl] .dokuwiki .page div.level1 {margin-left: 0; margin-right: 0;} -[dir=rtl] .dokuwiki .page div.level2 {margin-left: 0; margin-right: 1em;} -[dir=rtl] .dokuwiki .page div.level3 {margin-left: 0; margin-right: 2em;} -[dir=rtl] .dokuwiki .page div.level4 {margin-left: 0; margin-right: 3em;} -[dir=rtl] .dokuwiki .page div.level5 {margin-left: 0; margin-right: 4em;} -*/ - -[dir=rtl] .dokuwiki dl.code dt, -[dir=rtl] .dokuwiki dl.file dt { - margin-left: 0; - margin-right: 1em; -} - -[dir=rtl] .JSpopup ul, -[dir=rtl] .JSpopup ol { - padding-right: 0; -} - - -/*____________ mobile ____________*/ - -@media only screen and (max-width: 768px), only screen and (max-device-width: 960px) { - - -[dir=rtl] .hasSidebar #dokuwiki__content, -[dir=rtl] .hasSidebar #dokuwiki__content > .pad { - margin-right: 0; -} - -[dir=rtl] .dokuwiki div.toc { - float: none; - margin: 0 0 1em 0; - border-right-width: 0; -} - -[dir=rtl] .dokuwiki #dw__recent ul, -[dir=rtl] .dokuwiki #page__revisions ul { - padding-right: 0; -} - - -} /* /@media */ - -@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) { - - -[dir=rtl] #dokuwiki__header ul.a11y.skip { - left: auto !important; - right: 0 !important; - float: left; - padding-right: 0; -} -[dir=rtl] #dokuwiki__header ul.a11y.skip li { - margin: 0 .35em 0 0; -} - -[dir=rtl] #dokuwiki__header .headings, -[dir=rtl] #dokuwiki__header .tools { - float: none; - text-align: right; - width: auto; -} -[dir=rtl] #dokuwiki__sitetools { - text-align: right; -} - -[dir=rtl] #dokuwiki__sitetools form.search { - float: right; - margin: 0 0 .2em .2em; -} - -[dir=rtl] #dokuwiki__header .mobileTools { - float: left; -} - -[dir=rtl] .dokuwiki label.block { - text-align: right; -} - - - -} /* /@media */ diff --git a/lib/tpl/dokuwiki/css/structure.css b/lib/tpl/dokuwiki/css/structure.css index 9cca1aa3b5ec8bc1f36f67c3bf64db5196ecf7e4..00642e90b505b3a73c13008335c88a1c3baffcfc 100644 --- a/lib/tpl/dokuwiki/css/structure.css +++ b/lib/tpl/dokuwiki/css/structure.css @@ -23,10 +23,18 @@ body { #dokuwiki__header .headings { float: left; } + [dir=rtl] #dokuwiki__header .headings { + float: right; + text-align: right; + } #dokuwiki__header .tools { float: right; text-align: right; } + [dir=rtl] #dokuwiki__header .tools { + float: left; + text-align: left; + } #dokuwiki__site .wrapper { position: relative; @@ -38,18 +46,33 @@ body { position: relative; display: block; } + [dir=rtl] #dokuwiki__aside { + float: right; + } #dokuwiki__aside > .pad { margin: 0 1.5em 0 0; } + [dir=rtl] #dokuwiki__aside > .pad { + margin: 0 0 0 1.5em; + } - .hasSidebar #dokuwiki__content { + .showSidebar #dokuwiki__content { float: right; margin-left: -__sidebar_width__; width: 100%; } - .hasSidebar #dokuwiki__content > .pad { + [dir=rtl] .showSidebar #dokuwiki__content { + float: left; + margin-left: 0; + margin-right: -__sidebar_width__; + } + .showSidebar #dokuwiki__content > .pad { margin-left: __sidebar_width__; } + [dir=rtl] .showSidebar #dokuwiki__content > .pad { + margin-left: 0; + margin-right: __sidebar_width__; + } #dokuwiki__footer { clear: both; diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index a3516a7eda19f03d6f787ab9118d63e5cbcc1c31..bb64b42cb91ec29e666d1fede905ee7d99f76bcd 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -10,11 +10,8 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); -$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show'); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" - lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>"> +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> @@ -22,6 +19,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> [<?php echo strip_tags($conf['title'])?>] </title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders()?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> @@ -31,7 +29,7 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> + class="dokuwiki site mode_<?php echo $ACT ?>"> <?php include('tpl_header.php') ?> diff --git a/lib/tpl/dokuwiki/images/apple-touch-icon.png b/lib/tpl/dokuwiki/images/apple-touch-icon.png index 45fa4e7b081d35277b8d6f86a3e2a3f16aa3295e..fb5f108c06b9822b995e9658025456ddd41625a1 100644 Binary files a/lib/tpl/dokuwiki/images/apple-touch-icon.png and b/lib/tpl/dokuwiki/images/apple-touch-icon.png differ diff --git a/lib/tpl/dokuwiki/images/bullet.png b/lib/tpl/dokuwiki/images/bullet.png index 5da53744304e2101e279193fb1b352566d1ab49e..5e557b334a36b3f1274edd6c7b9d70ff24347c02 100644 Binary files a/lib/tpl/dokuwiki/images/bullet.png and b/lib/tpl/dokuwiki/images/bullet.png differ diff --git a/lib/tpl/dokuwiki/images/button-dw.png b/lib/tpl/dokuwiki/images/button-dw.png index 97272d96841ff4488878a3c8908a1a32b58776ef..8d6aea898634683b381f03903c824449f9e22985 100644 Binary files a/lib/tpl/dokuwiki/images/button-dw.png and b/lib/tpl/dokuwiki/images/button-dw.png differ diff --git a/lib/tpl/dokuwiki/images/button-rss.png b/lib/tpl/dokuwiki/images/button-rss.png index f2438043f4801a97122a2816f7f1fd47da4d91b9..b7cddadec707d93233e3f2c72db8bbdcd6c552ab 100644 Binary files a/lib/tpl/dokuwiki/images/button-rss.png and b/lib/tpl/dokuwiki/images/button-rss.png differ diff --git a/lib/tpl/dokuwiki/images/closed-rtl.png b/lib/tpl/dokuwiki/images/closed-rtl.png index 85ebd59e132a17b345e5b0d83d23443ed73f6970..caa027e341541f00572a80f103413950e731a37b 100644 Binary files a/lib/tpl/dokuwiki/images/closed-rtl.png and b/lib/tpl/dokuwiki/images/closed-rtl.png differ diff --git a/lib/tpl/dokuwiki/images/closed.png b/lib/tpl/dokuwiki/images/closed.png index 3691ebc17538c95ad5f6b7964c4bf45642c2fe93..e3bd0f9e94cb25e2fe5db97ce4ff9743cbf3e06f 100644 Binary files a/lib/tpl/dokuwiki/images/closed.png and b/lib/tpl/dokuwiki/images/closed.png differ diff --git a/lib/tpl/dokuwiki/images/email.png b/lib/tpl/dokuwiki/images/email.png index 4ba4aad2f6a5dd5eb5ce12f8b7a958d80685defb..d1d4a5fd5db9f90c4f07dd98cb774cbc3a45db9f 100644 Binary files a/lib/tpl/dokuwiki/images/email.png and b/lib/tpl/dokuwiki/images/email.png differ diff --git a/lib/tpl/dokuwiki/images/external-link.png b/lib/tpl/dokuwiki/images/external-link.png index 60fc8716bb602a0bf3849aec611f56faef2d538b..a4d5de17c3ba2a00e4cd79fe10dc165044682148 100644 Binary files a/lib/tpl/dokuwiki/images/external-link.png and b/lib/tpl/dokuwiki/images/external-link.png differ diff --git a/lib/tpl/dokuwiki/images/logo.png b/lib/tpl/dokuwiki/images/logo.png index 8b794dd6428a216661610c80294de907a3f6fb1e..35640279c228d702aefbc0932f6edb0eea292caa 100644 Binary files a/lib/tpl/dokuwiki/images/logo.png and b/lib/tpl/dokuwiki/images/logo.png differ diff --git a/lib/tpl/dokuwiki/images/open.png b/lib/tpl/dokuwiki/images/open.png index 40ff129be9b52d25ed8351a6b9f313f746702006..5f2d408c53819c8d9519ea9230c119ae0303093f 100644 Binary files a/lib/tpl/dokuwiki/images/open.png and b/lib/tpl/dokuwiki/images/open.png differ diff --git a/lib/tpl/dokuwiki/images/page-gradient.png b/lib/tpl/dokuwiki/images/page-gradient.png new file mode 100644 index 0000000000000000000000000000000000000000..8e16a28052af469ecf10b0d513f4dc814e94a61d Binary files /dev/null and b/lib/tpl/dokuwiki/images/page-gradient.png differ diff --git a/lib/tpl/dokuwiki/images/pagetools-sprite.png b/lib/tpl/dokuwiki/images/pagetools-sprite.png index bbd7fd361b260c082e7f9c46cc3a3a3b3e7f90ef..898f0f4a697c36ba8c9d87606ee3a01c3be2b9d8 100644 Binary files a/lib/tpl/dokuwiki/images/pagetools-sprite.png and b/lib/tpl/dokuwiki/images/pagetools-sprite.png differ diff --git a/lib/tpl/dokuwiki/images/resizecol.png b/lib/tpl/dokuwiki/images/resizecol.png index f0111507c56e87e1b2369d083b2c99c726224137..b5aeec0043800139c75cb212e0c31d5c14c62b3f 100644 Binary files a/lib/tpl/dokuwiki/images/resizecol.png and b/lib/tpl/dokuwiki/images/resizecol.png differ diff --git a/lib/tpl/dokuwiki/images/search.png b/lib/tpl/dokuwiki/images/search.png index 2adfc73571231390322fe02b2dfe4800593cab45..1ab7866fb0410158619d8a793c3a04ac186b4fdf 100644 Binary files a/lib/tpl/dokuwiki/images/search.png and b/lib/tpl/dokuwiki/images/search.png differ diff --git a/lib/tpl/dokuwiki/images/sitetools.png b/lib/tpl/dokuwiki/images/sitetools.png deleted file mode 100644 index 62a17a0c304342758f1fe88decc2d9cc9bdadd18..0000000000000000000000000000000000000000 Binary files a/lib/tpl/dokuwiki/images/sitetools.png and /dev/null differ diff --git a/lib/tpl/dokuwiki/images/toc-arrows.png b/lib/tpl/dokuwiki/images/toc-arrows.png index 9f441eb264e555a86002e35e76add55a57069d9c..4a353e4f6fd46416e4c26ae33460e36a7c981b63 100644 Binary files a/lib/tpl/dokuwiki/images/toc-arrows.png and b/lib/tpl/dokuwiki/images/toc-arrows.png differ diff --git a/lib/tpl/dokuwiki/images/toc-bullet.png b/lib/tpl/dokuwiki/images/toc-bullet.png index a6f0169c31aa514f10bbb128e03d64d272db0184..fc771b97e0dc8ecb788d5d345388a2e72e723155 100644 Binary files a/lib/tpl/dokuwiki/images/toc-bullet.png and b/lib/tpl/dokuwiki/images/toc-bullet.png differ diff --git a/lib/tpl/dokuwiki/images/unc.png b/lib/tpl/dokuwiki/images/unc.png index 6dd3d365c7f1b919519152f6d2318a9521677382..a552d6e6fafea438226730804df7095021f640ac 100644 Binary files a/lib/tpl/dokuwiki/images/unc.png and b/lib/tpl/dokuwiki/images/unc.png differ diff --git a/lib/tpl/dokuwiki/images/usertools.png b/lib/tpl/dokuwiki/images/usertools.png new file mode 100644 index 0000000000000000000000000000000000000000..e99b6596e81bc58e314ae996826efcfb3c925a8d Binary files /dev/null and b/lib/tpl/dokuwiki/images/usertools.png differ diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 57c94f174da1488d6124c26e552bfb9ee801aa16..563d9c94960fbda5e0d99456781ac72642ed0419 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -10,15 +10,15 @@ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ -$showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show'); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>" - lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> +$hasSidebar = page_findnearest($conf['sidebar']); +$showSidebar = $hasSidebar && ($ACT=='show'); +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders() ?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> @@ -28,7 +28,8 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <body> <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]--> <div id="dokuwiki__site"><div id="dokuwiki__top" - class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>"> + class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'showSidebar' : ''; + ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>"> <?php include('tpl_header.php') ?> @@ -37,10 +38,13 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <?php if($showSidebar): ?> <!-- ********** ASIDE ********** --> <div id="dokuwiki__aside"><div class="pad include group"> - <?php tpl_flush() ?> - <?php tpl_includeFile('sidebarheader.html') ?> - <?php tpl_include_page($conf['sidebar']) ?> - <?php tpl_includeFile('sidebarfooter.html') ?> + <h3 class="toggle"><?php echo hsc(ucfirst($conf['sidebar'])) ?></h3> + <div class="content"> + <?php tpl_flush() ?> + <?php tpl_includeFile('sidebarheader.html') ?> + <?php tpl_sidebar() ?> + <?php tpl_includeFile('sidebarfooter.html') ?> + </div> </div></div><!-- /aside --> <?php endif; ?> diff --git a/lib/tpl/dokuwiki/mediamanager.php b/lib/tpl/dokuwiki/mediamanager.php index 1f3b9661b3c1b53b04a94c1246fe4bfcbac9bef4..4919632c9ff7ec80dd4bfea7f25f4c6952f8bd45 100644 --- a/lib/tpl/dokuwiki/mediamanager.php +++ b/lib/tpl/dokuwiki/mediamanager.php @@ -8,10 +8,8 @@ // must be run from within DokuWiki if (!defined('DOKU_INC')) die(); -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" - lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup"> +?><!DOCTYPE html> +<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="popup no-js"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]--> @@ -19,6 +17,7 @@ if (!defined('DOKU_INC')) die(); <?php echo hsc($lang['mediaselect'])?> [<?php echo strip_tags($conf['title'])?>] </title> + <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> <?php tpl_metaheaders()?> <meta name="viewport" content="width=device-width,initial-scale=1" /> <?php echo tpl_favicon(array('favicon', 'mobile')) ?> diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js new file mode 100644 index 0000000000000000000000000000000000000000..d858bda89df652bc19af963e290fee29aa706fc4 --- /dev/null +++ b/lib/tpl/dokuwiki/script.js @@ -0,0 +1,75 @@ +/** + * We handle several device classes based on browser width. + * see http://twitter.github.com/bootstrap/scaffolding.html#responsive + * + * - desktop: 980+ + * - mobile: < 980 + * - tablet 481 - 979 (ostensibly for tablets in portrait mode) + * - phone <= 480 + */ +var device_class = ''; // not yet known +var device_classes = 'desktop mobile tablet phone'; + +function tpl_dokuwiki_mobile(){ + + // determine our device pattern + // TODO: consider moving into dokuwiki core + var w = document.body.clientWidth; + if (w > 979) { + if (device_class == 'desktop') return; + device_class = 'desktop'; + } else if (w > 480) { + if (device_class.match(/tablet/)) return; + device_class = 'mobile tablet'; + } else { + if (device_class.match(/phone/)) return; + device_class = 'mobile phone'; + } + + jQuery('html').removeClass(device_classes).addClass(device_class); + + // handle some layout changes based on change in device + var $handle = jQuery('#dokuwiki__aside h3.toggle'); + var $toc = jQuery('#dw__toc h3'); + + if (device_class == 'desktop') { + // reset for desktop mode + if($handle.length) { + $handle[0].setState(1); + $handle.hide(); + } + if($toc.length) { + $toc[0].setState(1); + } + } + if (device_class.match(/mobile/)){ + // toc and sidebar hiding + if($handle.length) { + $handle.show(); + $handle[0].setState(-1); + } + if($toc.length) { + $toc[0].setState(-1); + } + } +} + +jQuery(function(){ + var resizeTimer; + dw_page.makeToggle('#dokuwiki__aside h3.toggle','#dokuwiki__aside div.content'); + + tpl_dokuwiki_mobile(); + jQuery(window).bind('resize', + function(){ + if (resizeTimer) clearTimeout(resizeTimer); + resizeTimer = setTimeout(tpl_dokuwiki_mobile,200); + } + ); + + // increase sidebar length to match content (desktop mode only) + var $sidebar = jQuery('.desktop #dokuwiki__aside'); + if($sidebar.length) { + var $content = jQuery('#dokuwiki__content div.page'); + $content.css('min-height', $sidebar.height()); + } +}); diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini index b8e55bcc8381d9d3dbd836b5b4edc20984cc3184..08d1a4273eded98abd0aef64bc531e72f4c7936b 100644 --- a/lib/tpl/dokuwiki/style.ini +++ b/lib/tpl/dokuwiki/style.ini @@ -29,10 +29,9 @@ css/design.css = screen css/pagetools.css = screen css/content.css = screen css/includes.css = screen -css/mobile.css = screen -css/rtl.css = screen -css/print.css = print +css/mobile.css = all +css/print.css = print ; This section is used to configure some placeholder values used in diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php index 1d2517ee1ebbe974ad126aa59d3da5db62a1953c..f2e720308fac8ca6115a05568bdb39f7bdb6ca4d 100644 --- a/lib/tpl/dokuwiki/tpl_header.php +++ b/lib/tpl/dokuwiki/tpl_header.php @@ -1,7 +1,6 @@ <!-- ********** HEADER ********** --> <div id="dokuwiki__header"><div class="pad group"> - <?php html_msgarea() ?> <?php tpl_includeFile('header.html') ?> <div class="headings group"> @@ -77,5 +76,7 @@ </div> <?php endif ?> + <?php html_msgarea() ?> + <hr class="a11y" /> </div></div><!-- /header --> diff --git a/lib/tpl/index.php b/lib/tpl/index.php index 0273e567803fb59bf0d1dffe6432b6a912e5f21f..4570f70f5e70194176c993e6da50782cb0586f0c 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -54,7 +54,7 @@ if ($ini) { echo '<td>'.htmlspecialchars($val).'</td>'; echo '<td>'; if(preg_match('/^#[0-f]{3,6}$/i',$val)){ - echo '<div class="color" style="background-color:'.$val.';"> </div>'; + echo '<div class="color" style="background-color:'.$val.';"> </div>'; } echo '</td>'; echo '</tr>';