diff --git a/.gitattributes b/.gitattributes index 6beb1fb7a7b4a9e58415a5d82f6ab073654e51a3..40fb1f5520b7b8e79ab99bbc77ef8333f93ef4b1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ .gitignore export-ignore .editorconfig export-ignore .travis.yml export-ignore +appveyor.yml export-ignore composer.json export-ignore composer.lock export-ignore _test export-ignore diff --git a/.gitignore b/.gitignore index 758d216359984bea13b41ab6ea5232fc1a95da72..18a21abff0ea6334aefcc499ce8251cda263dfb3 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,8 @@ vendor/paragonie/random_compat/build-phar.sh vendor/paragonie/random_compat/dist/* vendor/paragonie/random_compat/other/* vendor/simplepie/simplepie/db.sql +vendor/marcusschwarz/lesserphp/package.sh +vendor/marcusschwarz/lesserphp/lessify* +vendor/marcusschwarz/lesserphp/Makefile +vendor/marcusschwarz/lesserphp/plessc + diff --git a/.htaccess.dist b/.htaccess.dist index 1d2bd418e61468fc3bf1c07186f5af5379d6ea87..d8845e781bb58b004d38ac174088a87fc267a14e 100644 --- a/.htaccess.dist +++ b/.htaccess.dist @@ -1,5 +1,3 @@ -## Enable this to restrict editing to logged in users only - ## You should disable Indexes and MultiViews either here or in the ## global config. Symlinks maybe needed for URL rewriting. #Options -Indexes -MultiViews +FollowSymLinks diff --git a/.travis.yml b/.travis.yml index 32b8bb49ad539373684ec70a5b8331f422be2093..44affc5eee4eb6489913620785991b0ea141438c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: php sudo: false php: - "nightly" + - "7.2" - "7.1" - "7.0" - "5.6" diff --git a/README b/README index e57384799ec954ad8fe350d152e9ceecd5a33438..3e7cb62ad274d67ef4ca369ffb9e897c90f08904 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ at http://www.dokuwiki.org/ For Installation Instructions see http://www.dokuwiki.org/install -DokuWiki - 2004-2017 (c) Andreas Gohr <andi@splitbrain.org> +DokuWiki - 2004-2018 (c) Andreas Gohr <andi@splitbrain.org> and the DokuWiki Community See COPYING and file headers for license info diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index dad2060e5cafb7f05e4db672774462a1030fd862..fcc80328c1006910eab0ad9124b180f070be1eba 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -4,46 +4,122 @@ * runtime inspection. */ -// output buffering -$output_buffer = ''; - -function ob_start_callback($buffer) { - global $output_buffer; - $output_buffer .= $buffer; -} - - /** * Helper class to execute a fake request */ class TestRequest { - private $valid_scripts = array('/doku.php', '/lib/exe/fetch.php', '/lib/exe/detail.php'); - private $script; + protected $valid_scripts = array('/doku.php', '/lib/exe/fetch.php', '/lib/exe/detail.php', '/lib/exe/ajax.php'); + protected $script; + + protected $server = array(); + protected $session = array(); + protected $get = array(); + protected $post = array(); + protected $data = array(); + + /** @var string stores the output buffer, even when it's flushed */ + protected $output_buffer = ''; + + /** @var null|TestRequest the currently running request */ + static protected $running = null; + + /** + * Get a $_SERVER var + * + * @param string $key + * @return mixed + */ + public function getServer($key) { + return $this->server[$key]; + } + + /** + * Get a $_SESSION var + * + * @param string $key + * @return mixed + */ + public function getSession($key) { + return $this->session[$key]; + } + + /** + * Get a $_GET var + * + * @param string $key + * @return mixed + */ + public function getGet($key) { + return $this->get[$key]; + } + + /** + * Get a $_POST var + * + * @param string $key + * @return mixed + */ + public function getPost($key) { + return $this->post[$key]; + } + + /** + * Get the script that will execute the request + * + * @return string + */ + public function getScript() { + return $this->script; + } + + /** + * Set a $_SERVER var + * + * @param string $key + * @param mixed $value + */ + public function setServer($key, $value) { + $this->server[$key] = $value; + } - private $server = array(); - private $session = array(); - private $get = array(); - private $post = array(); + /** + * Set a $_SESSION var + * + * @param string $key + * @param mixed $value + */ + public function setSession($key, $value) { + $this->session[$key] = $value; + } - public function getServer($key) { return $this->server[$key]; } - public function getSession($key) { return $this->session[$key]; } - public function getGet($key) { return $this->get[$key]; } - public function getPost($key) { return $this->post[$key]; } - public function getScript() { return $this->script; } + /** + * Set a $_GET var + * + * @param string $key + * @param mixed $value + */ + public function setGet($key, $value) { + $this->get[$key] = $value; + } - public function setServer($key, $value) { $this->server[$key] = $value; } - public function setSession($key, $value) { $this->session[$key] = $value; } - public function setGet($key, $value) { $this->get[$key] = $value; } - public function setPost($key, $value) { $this->post[$key] = $value; } + /** + * Set a $_POST var + * + * @param string $key + * @param mixed $value + */ + public function setPost($key, $value) { + $this->post[$key] = $value; + } /** * Executes the request * - * @param string $url end URL to simulate, needs to start with /doku.php currently + * @param string $uri end URL to simulate, needs to be one of the testable scripts * @return TestResponse the resulting output of the request */ - public function execute($uri='/doku.php') { + public function execute($uri = '/doku.php') { global $INPUT; // save old environment @@ -53,12 +129,12 @@ class TestRequest { $post = $_POST; $request = $_REQUEST; $input = $INPUT; - + // prepare the right URI $this->setUri($uri); // import all defined globals into the function scope - foreach(array_keys($GLOBALS) as $glb){ + foreach(array_keys($GLOBALS) as $glb) { global $$glb; } @@ -71,20 +147,23 @@ class TestRequest { $_REQUEST = array_merge($_GET, $_POST); // reset output buffer - global $output_buffer; - $output_buffer = ''; + $this->output_buffer = ''; // now execute dokuwiki and grep the output + self::$running = $this; header_remove(); - ob_start('ob_start_callback'); + ob_start(array($this, 'ob_start_callback')); $INPUT = new Input(); - include(DOKU_INC.$this->script); + include(DOKU_INC . $this->script); ob_end_flush(); + self::$running = null; // create the response object $response = new TestResponse( - $output_buffer, - (function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list()) // cli sapi doesn't do headers, prefer xdebug_get_headers() which works under cli + $this->output_buffer, + // cli sapi doesn't do headers, prefer xdebug_get_headers() which works under cli + (function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list()), + $this->data ); // reset environment @@ -107,28 +186,28 @@ class TestRequest { * 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 + * @param string $uri end URL to simulate + * @throws Exception when an invalid script is passed */ - protected function setUri($uri){ - if(!preg_match('#^('.join('|',$this->valid_scripts).')#',$uri)){ - throw new Exception("$uri \n--- only ".join(', ',$this->valid_scripts)." are supported currently"); + protected function setUri($uri) { + if(!preg_match('#^(' . join('|', $this->valid_scripts) . ')#', $uri)) { + throw new Exception("$uri \n--- only " . join(', ', $this->valid_scripts) . " are supported currently"); } $params = array(); - list($uri, $query) = explode('?',$uri,2); + list($uri, $query) = explode('?', $uri, 2); if($query) parse_str($query, $params); - $this->script = substr($uri,1); - $this->get = array_merge($params, $this->get); - if(count($this->get)){ - $query = '?'.http_build_query($this->get, '', '&'); + $this->script = substr($uri, 1); + $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; + $uri = $uri . $query; } $this->setServer('QUERY_STRING', $query); @@ -138,11 +217,11 @@ class TestRequest { /** * 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, /lib/exe/fetch.php or /lib/exe/detail.php currently - * @param return TestResponse + * @param array $post all the POST parameters to use + * @param string $uri end URL to simulate + * @return TestResponse */ - public function post($post=array(), $uri='/doku.php') { + public function post($post = array(), $uri = '/doku.php') { $this->post = array_merge($this->post, $post); $this->setServer('REQUEST_METHOD', 'POST'); return $this->execute($uri); @@ -151,15 +230,51 @@ class TestRequest { /** * Simulate a GET request with the given variables * - * @param array $GET all the GET parameters to use - * @param string $url end URL to simulate, needs to start with /doku.php, /lib/exe/fetch.php or /lib/exe/detail.php currently - * @param return TestResponse + * @param array $get all the GET parameters to use + * @param string $uri end URL to simulate + * @return TestResponse */ - public function get($get=array(), $uri='/doku.php') { - $this->get = array_merge($this->get, $get); + public function get($get = array(), $uri = '/doku.php') { + $this->get = array_merge($this->get, $get); $this->setServer('REQUEST_METHOD', 'GET'); return $this->execute($uri); } + /** + * Callback for ob_start + * + * This continues to fill our own buffer, even when some part + * of the code askes for flushing the buffers + * + * @param string $buffer + */ + public function ob_start_callback($buffer) { + $this->output_buffer .= $buffer; + } + + /** + * Access the TestRequest from the executed code + * + * This allows certain functions to access the TestRequest that is accessing them + * to add additional info. + * + * @return null|TestRequest the currently executed request if any + */ + public static function getRunning() { + return self::$running; + } + /** + * Store data to be read in the response later + * + * When called multiple times with the same key, the data is appended to this + * key's array + * + * @param string $key the identifier for this information + * @param mixed $value arbitrary data to store + */ + public function addData($key, $value) { + if(!isset($this->data[$key])) $this->data[$key] = array(); + $this->data[$key][] = $value; + } } diff --git a/_test/core/TestResponse.php b/_test/core/TestResponse.php index 7cc50ee4fcea61f05be97de1235d2b34e0ef68ae..55225a54ee6b557fcbb163b9f7fa05b3fb9bbe9a 100644 --- a/_test/core/TestResponse.php +++ b/_test/core/TestResponse.php @@ -1,33 +1,37 @@ <?php + /** * holds a copy of all produced outputs of a TestRequest */ class TestResponse { - /** - * @var string - */ - private $content; + /** @var string */ + protected $content; - /** - * @var array - */ - private $headers; + /** @var array */ + protected $headers; - /** - * @var phpQueryObject - */ - private $pq = null; + /** @var phpQueryObject */ + protected $pq = null; + + /** @var array */ + protected $data = array(); /** - * @param $content string - * @param $headers array + * Constructor + * + * @param $content string the response body + * @param $headers array the headers sent in the response + * @param array $data any optional data passed back to the test system */ - function __construct($content, $headers) { + function __construct($content, $headers, $data = array()) { $this->content = $content; $this->headers = $headers; + $this->data = $data; } /** + * Returns the response body + * * @return string */ public function getContent() { @@ -35,6 +39,8 @@ class TestResponse { } /** + * Returns the headers set in the response + * * @return array */ public function getHeaders() { @@ -42,13 +48,15 @@ class TestResponse { } /** + * Return a single header + * * @param $name string, the name of the header without the ':', e.g. 'Content-Type', 'Pragma' * @return mixed if exactly one header, the header (string); otherwise an array of headers, empty when no headers */ public function getHeader($name) { $result = array(); - foreach ($this->headers as $header) { - if (substr($header,0,strlen($name)+1) == $name.':') { + foreach($this->headers as $header) { + if(substr($header, 0, strlen($name) + 1) == $name . ':') { $result[] = $header; } } @@ -57,26 +65,28 @@ class TestResponse { } /** - * @return int http status code + * Access the http status code * * in the test environment, only status codes explicitly set by dokuwiki are likely to be returned * this means succcessful status codes (e.g. 200 OK) will not be present, but error codes will be + * + * @return int http status code */ public function getStatusCode() { $headers = $this->getHeader('Status'); $code = null; - if ($headers) { + if($headers) { // if there is more than one status header, use the last one $status = is_array($headers) ? array_pop($headers) : $headers; $matches = array(); - preg_match('/^Status: ?(\d+)/',$status,$matches); - if ($matches){ + preg_match('/^Status: ?(\d+)/', $status, $matches); + if($matches) { $code = $matches[1]; } - } + } - return $code; + return $code; } /** @@ -86,8 +96,19 @@ class TestResponse { * @param $selector string * @return phpQueryObject */ - public function queryHTML($selector){ + public function queryHTML($selector) { if(is_null($this->pq)) $this->pq = phpQuery::newDocument($this->content); return $this->pq->find($selector); } + + /** + * Returns all collected data for the given key + * + * @param string $key + * @return array + */ + public function getData($key) { + if(!isset($this->data[$key])) return array(); + return $this->data[$key]; + } } diff --git a/_test/core/TestUtils.php b/_test/core/TestUtils.php index 2750a3edf1972690913e31f75eb23ae6a802ffc7..e855cb00798bbded6a94b1cf123979d3b3a6c38b 100644 --- a/_test/core/TestUtils.php +++ b/_test/core/TestUtils.php @@ -5,6 +5,15 @@ */ class TestUtils { + /** + * converts path to unix-like on windows OS + * @param string $path UNIX-like path to be converted + * @return string + */ + public static function w2u($path) { + return isWindows() ? str_replace('\\', '/', $path) : $path; + } + /** * helper for recursive copy() * diff --git a/_test/data/pages/int/editandsavetest.txt b/_test/data/pages/int/editandsavetest.txt new file mode 100644 index 0000000000000000000000000000000000000000..f1e0655df1f26749d205ea3cec45f3c265c535ed --- /dev/null +++ b/_test/data/pages/int/editandsavetest.txt @@ -0,0 +1,16 @@ +This is a test page for testing the redirect happening on the ''edit and save'' workflow. +This page is required for the tests in **_tests/test/test/edit_and_save.test.php**. Do not edit this file. + +====== Headline1 ====== +Headline 1 content. + +====== Headline2 ====== +Headline 2a content. + +====== Headline2 ====== +Headline 2b content. + +====== Headline3 ====== +Headline 3 content. + +It is essential for the tests that there are two headlines with the title **Headline2**! diff --git a/_test/tests/inc/Action/general.test.php b/_test/tests/inc/Action/general.test.php new file mode 100644 index 0000000000000000000000000000000000000000..5e6402836f9a386cb9f4b0d493c0e833c49c6f5b --- /dev/null +++ b/_test/tests/inc/Action/general.test.php @@ -0,0 +1,182 @@ +<?php + +use dokuwiki\Action\AbstractAclAction; +use dokuwiki\Action\AbstractUserAction; +use dokuwiki\Action\Exception\ActionAclRequiredException; +use dokuwiki\Action\Exception\ActionDisabledException; +use dokuwiki\Action\Exception\ActionUserRequiredException; + +class action_general extends DokuWikiTest { + + public function dataProvider() { + return array( + array('Login', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Logout', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Search', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Recent', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Profile', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('ProfileDelete', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Index', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Sitemap', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Denied', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Register', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Resendpwd', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Backlink', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + + array('Revert', AUTH_ADMIN, array('exists' => true, 'ismanager' => false)), + array('Revert', AUTH_EDIT, array('exists' => true, 'ismanager' => true)), + + array('Admin', AUTH_ADMIN, array('exists' => true, 'ismanager' => false)), + array('Admin', AUTH_READ, array('exists' => true, 'ismanager' => true)), // let in, check later again + + array('Check', AUTH_READ, array('exists' => true, 'ismanager' => false)), // sensible? + array('Diff', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Show', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Subscribe', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Locked', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Source', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Export', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Media', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Revisions', AUTH_READ, array('exists' => true, 'ismanager' => false)), + + array('Draftdel', AUTH_EDIT, array('exists' => true, 'ismanager' => false)), + + // aliases + array('Cancel', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + array('Recover', AUTH_NONE, array('exists' => true, 'ismanager' => false)), + + // EDITING existing page + array('Save', AUTH_EDIT, array('exists' => true, 'ismanager' => false)), + array('Conflict', AUTH_EDIT, array('exists' => true, 'ismanager' => false)), + array('Draft', AUTH_EDIT, array('exists' => true, 'ismanager' => false)), + //the edit function will check again and do a source show + //when no AUTH_EDIT available: + array('Edit', AUTH_READ, array('exists' => true, 'ismanager' => false)), + array('Preview', AUTH_READ, array('exists' => true, 'ismanager' => false)), + + // EDITING new page + array('Save', AUTH_CREATE, array('exists' => false, 'ismanager' => false)), + array('Conflict', AUTH_CREATE, array('exists' => false, 'ismanager' => false)), + array('Draft', AUTH_CREATE, array('exists' => false, 'ismanager' => false)), + array('Edit', AUTH_CREATE, array('exists' => false, 'ismanager' => false)), + array('Preview', AUTH_CREATE, array('exists' => false, 'ismanager' => false)), + ); + } + + /** + * @dataProvider dataProvider + * @param $name + * @param $expected + * @param $info + */ + public function testMinimumPermissions($name, $expected, $info) { + global $INFO; + $INFO = $info; + + $classname = 'dokuwiki\\Action\\' . $name; + /** @var \dokuwiki\Action\AbstractAction $class */ + $class = new $classname(); + + $this->assertSame($expected, $class->minimumPermission()); + } + + /** + * All actions should handle the disableactions setting + * + * @dataProvider dataProvider + * @param $name + */ + public function testBaseClassActionOkPermission($name) { + $this->assertTrue(true); // mark as not risky + if($name == 'Show') return; // disabling show does not work + + $classname = 'dokuwiki\\Action\\' . $name; + /** @var \dokuwiki\Action\AbstractAction $class */ + $class = new $classname(); + + global $conf; + $conf['useacl'] = 1; + $conf['subscribers'] = 1; + $conf['disableactions'] = ''; + $_SERVER['REMOTE_USER'] = 'someone'; + + try { + \dokuwiki\ActionRouter::getInstance(true)->checkAction($class); + } catch(\Exception $e) { + $this->assertNotSame(ActionDisabledException::class, get_class($e)); + } + + $conf['disableactions'] = $class->getActionName(); + + try { + \dokuwiki\ActionRouter::getInstance(true)->checkAction($class); + } catch(\Exception $e) { + $this->assertSame(ActionDisabledException::class, get_class($e), $e); + } + } + + /** + * Actions inheriting from AbstractAclAction should have an ACL enabled check + * + * @dataProvider dataProvider + * @param $name + */ + public function testBaseClassAclPermission($name) { + $classname = 'dokuwiki\\Action\\' . $name; + /** @var \dokuwiki\Action\AbstractAction $class */ + $class = new $classname(); + $this->assertTrue(true); // mark as not risky + if(!is_a($class, AbstractAclAction::class)) return; + + global $conf; + $conf['useacl'] = 1; + $conf['subscribers'] = 1; + + try { + $class->checkPermissions(); + } catch(\Exception $e) { + $this->assertNotSame(ActionAclRequiredException::class, get_class($e)); + } + + $conf['useacl'] = 0; + + try { + $class->checkPermissions(); + } catch(\Exception $e) { + $this->assertSame(ActionAclRequiredException::class, get_class($e)); + } + } + + /** + * Actions inheriting from AbstractUserAction should have user check + * + * @dataProvider dataProvider + * @param $name + */ + public function testBaseClassUserPermission($name) { + $classname = 'dokuwiki\\Action\\' . $name; + /** @var \dokuwiki\Action\AbstractAction $class */ + $class = new $classname(); + $this->assertTrue(true); // mark as not risky + if(!is_a($class, AbstractUserAction::class)) return; + + global $conf; + $conf['useacl'] = 1; + $conf['subscribers'] = 1; + $_SERVER['REMOTE_USER'] = 'test'; + + try { + $class->checkPermissions(); + } catch(\Exception $e) { + $this->assertNotSame(ActionUserRequiredException::class, get_class($e)); + } + + unset($_SERVER['REMOTE_USER']); + + try { + $class->checkPermissions(); + } catch(\Exception $e) { + $this->assertSame(ActionUserRequiredException::class, get_class($e)); + } + } +} diff --git a/_test/tests/inc/difference_engine.test.php b/_test/tests/inc/difference_engine.test.php new file mode 100644 index 0000000000000000000000000000000000000000..cd0c9c0317a4e03fe2bc80d8a1ae8494544d52e2 --- /dev/null +++ b/_test/tests/inc/difference_engine.test.php @@ -0,0 +1,85 @@ +<?php + +require_once DOKU_INC.'inc/DifferenceEngine.php'; + +/** + * Class difference_engine_test + */ +class difference_engine_test extends DokuWikiTest { + public $x = "zzz\n\naaa\n\nbbb\n\nccc\n\nddd\n\nddd\n\nddd\n\neee\n\nfff"; + public $y = "ddd\n\naaa\n\nbbb\n\nbbb\n\nccc\n\nccc\n\neee"; + + function test_render_table(){ + $diff = new Diff(explode("\n", $this->x), explode("\n", $this->y)); + $diffformatter = new TableDiffFormatter(); + $actual = $diffformatter->format($diff); + $expected = '<tr><td class="diff-blockheader" colspan="2">Line 1:</td> +<td class="diff-blockheader" colspan="2">Line 1:</td> +</tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark">zzz</strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"><strong class="diff-mark">ddd</strong></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">aaa</td><td class="diff-lineheader"> </td><td class="diff-context">aaa</td></tr> +<tr><td colspan="2"> </td><td class="diff-lineheader">+</td><td class="diff-addedline"></td></tr> +<tr><td colspan="2"> </td><td class="diff-lineheader">+</td><td class="diff-addedline">bbb</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">bbb</td><td class="diff-lineheader"> </td><td class="diff-context">bbb</td></tr> +<tr><td class="diff-blockheader" colspan="2">Line 7:</td> +<td class="diff-blockheader" colspan="2">Line 9:</td> +</tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">ccc</td><td class="diff-lineheader"> </td><td class="diff-context">ccc</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark">ddd </strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"><strong class="diff-mark">ccc</strong></td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark"> </strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"></td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark">ddd </strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"></td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark"> </strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"></td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"><strong class="diff-mark">ddd</strong></td><td class="diff-lineheader">+</td><td class="diff-addedline"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">eee</td><td class="diff-lineheader"> </td><td class="diff-context">eee</td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline"></td><td colspan="2"> </td></tr> +<tr><td class="diff-lineheader">-</td><td class="diff-deletedline">fff</td><td colspan="2"> </td></tr> +'; + $this->assertEquals($expected, $actual); + } + + function test_render_inline(){ + $diff = new Diff(explode("\n", $this->x), explode("\n", $this->y)); + $diffformatter = new InlineDiffFormatter(); + $actual = $diffformatter->format($diff); + $expected = '<tr><td colspan="2" class="diff-blockheader">@@ Line -1,5 +1,7 @@ <span class="diff-deletedline"><del>removed</del></span> <span class="diff-addedline">created</span></td></tr> + +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del>zzz</del></span><span class="diff-addedline">ddd</span></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">aaa</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-addedline"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-addedline">bbb</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">bbb</td></tr> +<tr><td colspan="2" class="diff-blockheader">@@ Line -7,11 +9,5 @@ <span class="diff-deletedline"><del>removed</del></span> <span class="diff-addedline">created</span></td></tr> + +<tr><td class="diff-lineheader"> </td><td class="diff-context">ccc</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del>ddd </del></span></td></tr> +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del> </del></span></td></tr> +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del>ddd </del></span></td></tr> +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del> </del></span></td></tr> +<tr><td class="diff-lineheader"> </td><td><span class="diff-deletedline"><del>ddd</del></span><span class="diff-addedline">ccc</span></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context"></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-context">eee</td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-deletedline"><del></del></td></tr> +<tr><td class="diff-lineheader"> </td><td class="diff-deletedline"><del>fff</del></td></tr> +'; + $this->assertEquals($expected, $actual); + } + + function test_engine_diag(){ + // initialize + $eng = new _DiffEngine; + $eng->diff(explode("\n", $this->x), explode("\n", $this->y)); + // check + $this->assertEquals( + array(9, array(array(0,0),array(1,2),array(3,4),array(4,5),array(5,7),array(6,9),array(7,10),array(9,12),array(15,13))), + $eng->_diag(0, 15, 0, 13, 8) + ); + } +} +//Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/form/dropdownelement.test.php b/_test/tests/inc/form/dropdownelement.test.php index 3aa0f16e4be1d10dfae4e1e7c6e223dd4e570c64..5f6b35e7521d450f3c8f9caab1e2f7c719aab670 100644 --- a/_test/tests/inc/form/dropdownelement.test.php +++ b/_test/tests/inc/form/dropdownelement.test.php @@ -129,6 +129,21 @@ class form_dropdownelement_test extends DokuWikiTest { $this->assertEquals('label of third option', $selected->text()); } + /** + * Prevent double select that might occur because `'Auto' == 0` is true + */ + public function test_doubleselect() { + $form = new Form\Form(); + $form->addDropdown('foo', ['Auto', 0, 1]); + + $html = $form->toHTML(); + + $pq = phpQuery::newDocumentXHTML($html); + $selected = $pq->find('option[selected=selected]'); + $this->assertEquals(1, $selected->length); + $this->assertEquals('Auto', $selected->text()); + } + /** * Ensure that there is always only a single one selected option */ diff --git a/_test/tests/inc/html_secedit_pattern.test.php b/_test/tests/inc/html_secedit_pattern.test.php new file mode 100644 index 0000000000000000000000000000000000000000..1c0107801463ff6627ee291ca4eacd366bc05473 --- /dev/null +++ b/_test/tests/inc/html_secedit_pattern.test.php @@ -0,0 +1,58 @@ +<?php + +class html_scedit_pattern_test extends DokuWikiTest { + + + public function dataProviderForTestSecEditPattern() { + return [ + [ + '<!-- EDIT5 SECTION "Plugins" "plugins" [1406-] -->', + [ + 'secid' => '5', + 'target' => 'SECTION', + 'name' => 'Plugins', + 'hid' => 'plugins', + 'range' => '1406-', + ], + 'basic section edit', + ], + [ + '<!-- EDIT10 TABLE "" "table4" [11908-14014] -->', + [ + 'secid' => '10', + 'target' => 'TABLE', + 'name' => '', + 'hid' => 'table4', + 'range' => '11908-14014', + ], + 'table edit' + ], + [ + '<!-- EDIT2 PLUGIN_DATA [27-432] -->', + [ + 'secid' => '2', + 'target' => 'PLUGIN_DATA', + 'name' => '', + 'hid' => '', + 'range' => '27-432', + ], + 'data plugin' + ], + ]; + } + + /** + * @dataProvider dataProviderForTestSecEditPattern + * + * @param $text + * @param $expectedMatches + * @param $msg + */ + public function testSecEditPattern($text, $expectedMatches, $msg) { + preg_match(SEC_EDIT_PATTERN, $text, $matches); + foreach ($expectedMatches as $key => $expected_value) { + $this->assertSame($expected_value, $matches[$key], $msg); + } + } + +} diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php index f496507d0deca08e9a225b8ded458883e58f77a2..6cc783b2ba319e684f11fd1cf6a36163c36d82f9 100644 --- a/_test/tests/inc/httpclient_http.test.php +++ b/_test/tests/inc/httpclient_http.test.php @@ -16,7 +16,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('args',$resp); @@ -33,7 +33,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('args',$resp); @@ -50,7 +50,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('gzipped',$resp); @@ -67,7 +67,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('form',$resp); @@ -84,7 +84,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('url',$resp); @@ -101,7 +101,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('url',$resp); @@ -118,7 +118,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data === false, 'HTTP response '.$http->error); + $this->assertTrue($data === false, $http->errorInfo()); $this->assertEquals('Maximum number of redirects exceeded',$http->error); } @@ -138,7 +138,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('cookies',$resp); @@ -155,7 +155,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data === false, 'HTTP response '.$http->error); + $this->assertTrue($data === false, $http->errorInfo()); $this->assertEquals(418,$http->status); } @@ -172,7 +172,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data === false, 'HTTP response '.$http->error); + $this->assertTrue($data === false, $http->errorInfo()); // this should read just the needed bytes $http->max_bodysize_abort = false; @@ -182,7 +182,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); /* should read no more than max_bodysize+1 */ $this->assertLessThanOrEqual(251,strlen($data)); } @@ -198,14 +198,14 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data !== false, 'HTTP response '.$http->error); + $this->assertTrue($data !== false, $http->errorInfo()); $http->max_bodysize_abort = false; $data = $http->get($this->server.'/stream/5'); if($http->noconnection()) { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data !== false, 'HTTP response '.$http->error); + $this->assertTrue($data !== false, $http->errorInfo()); } /** @@ -220,7 +220,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertEquals(array('authenticated'=>true,'user'=>'user'), $resp); @@ -238,7 +238,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data === false, 'HTTP response '.$http->error); + $this->assertTrue($data === false, $http->errorInfo()); $this->assertEquals(401,$http->status); } @@ -249,7 +249,7 @@ class httpclient_http_test extends DokuWikiTest { $http = new HTTPMockClient(); $http->timeout = 5; $data = $http->get($this->server.'/delay/10'); - $this->assertTrue($data === false, 'HTTP response '.$http->error); + $this->assertTrue($data === false, $http->errorInfo()); $this->assertEquals(-100,$http->status); } @@ -263,7 +263,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $resp = json_decode($data, true); $this->assertTrue(is_array($resp), 'JSON response'); $this->assertArrayHasKey('baz',$http->resp_headers); @@ -281,7 +281,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertFalse($data === false, 'HTTP response '.$http->error); + $this->assertFalse($data === false, $http->errorInfo()); $this->assertEquals(2550,strlen($data)); } @@ -298,7 +298,7 @@ class httpclient_http_test extends DokuWikiTest { $this->markTestSkipped('connection timed out'); return; } - $this->assertTrue($data !== false, 'HTTP response '.$http->error); + $this->assertTrue($data !== false, $http->errorInfo()); } function test_postencode(){ diff --git a/_test/tests/inc/httpclient_http_proxy.test.php b/_test/tests/inc/httpclient_http_proxy.test.php index 4b95b5d6e3c9e79e90901c7d7691257aa4905587..615eebb4f05cbb5db150e840bf698daaec8596ab 100644 --- a/_test/tests/inc/httpclient_http_proxy.test.php +++ b/_test/tests/inc/httpclient_http_proxy.test.php @@ -15,7 +15,7 @@ class httpclient_http_proxy_test extends DokuWikiTest { $http->proxy_port = 8080; $data = $http->get($this->url); - $this->assertFalse($data === false, 'HTTP response: '.$http->error.' ['.$this->url.']'); + $this->assertFalse($data === false, $http->errorInfo($this->url)); $this->assertTrue(strpos($data,'DokuWiki') !== false, 'response content'); } } diff --git a/_test/tests/inc/httpclient_mock.php b/_test/tests/inc/httpclient_mock.php index 038045c8bb1cc91319a90c6ba0e3de6587d5183d..b66b907755f73c75a16df5ec34edcbc089b15538 100644 --- a/_test/tests/inc/httpclient_mock.php +++ b/_test/tests/inc/httpclient_mock.php @@ -7,11 +7,12 @@ */ class HTTPMockClient extends HTTPClient { protected $tries; + protected $lasturl; /** * Sets shorter timeout */ - function __construct() { + public function __construct() { parent::__construct(); $this->timeout = 8; // slightly faster timeouts } @@ -21,7 +22,7 @@ class HTTPMockClient extends HTTPClient { * * @return bool */ - function noconnection() { + public function noconnection() { return ($this->tries === 0); } @@ -33,14 +34,34 @@ class HTTPMockClient extends HTTPClient { * @param string $method * @return bool */ - function sendRequest($url, $data = '', $method = 'GET') { + public function sendRequest($url, $data = '', $method = 'GET') { + $this->lasturl = $url; $this->tries = 2; // configures the number of retries $return = false; while($this->tries) { $return = parent::sendRequest($url, $data, $method); - if($this->status != -100) break; + if($this->status != -100 && $this->status != 408) break; + usleep((3 - $this->tries) * 250000); $this->tries--; } return $return; } -} \ No newline at end of file + + /** + * Return detailed error data + * + * @param string $info optional additional info + * @return string + */ + public function errorInfo($info = '') { + return json_encode( + array( + 'URL' => $this->lasturl, + 'Error' => $this->error, + 'Status' => $this->status, + 'Body' => $this->resp_body, + 'Info' => $info + ), JSON_PRETTY_PRINT + ); + } +} diff --git a/_test/tests/inc/mailer.test.php b/_test/tests/inc/mailer.test.php index 6100ef1bf9c048868027f4a348c0ba2181536bac..6f35863c2afd8b9d84c0a74948bf6a7c5ff61e7a 100644 --- a/_test/tests/inc/mailer.test.php +++ b/_test/tests/inc/mailer.test.php @@ -73,6 +73,10 @@ class mailer_test extends DokuWikiTest { } function test_addresses(){ + if (isWindows()) { + $this->markTestSkipped(); + } + $mail = new TestMailer(); $mail->to('andi@splitbrain.org'); diff --git a/_test/tests/inc/media_searchlist.test.php b/_test/tests/inc/media_searchlist.test.php new file mode 100644 index 0000000000000000000000000000000000000000..c038d3a20996d6222a09f06dab71185194eb7f03 --- /dev/null +++ b/_test/tests/inc/media_searchlist.test.php @@ -0,0 +1,258 @@ +<?php + +class media_searchlist_test extends DokuWikiTest { + + /** + * @var string namespace used for testing + */ + protected $upload_ns = 'media_searchlist_test'; + + /** + * Save the file + * + * @param $name name of saving file + * @param $copy file used as a content of uploaded file + */ + protected function save($name, $copy) { + $media_id = $this->upload_ns.':'.$name; + media_save(array('name' => $copy), $media_id, true, AUTH_UPLOAD, 'copy'); + } + + /** + * Called for each test + * + * @throws Exception + */ + function setUp() { + //create some files to search + $png = mediaFN('wiki:kind_zu_katze.png'); + $ogv = mediaFN('wiki:kind_zu_katze.ogv'); + $webm = mediaFN('wiki:kind_zu_katze.webm'); + + $this->save('a.png', $png); + $this->save('aa.png', $png); + $this->save('ab.png', $png); + + $this->save('a.ogv', $ogv); + $this->save('aa.ogv', $ogv); + $this->save('ab.ogv', $ogv); + + $this->save('a:a.png', $png); + $this->save('b:a.png', $png); + + $this->save('0.webm', $webm); + + } + + /* + * Reset media_printfile static variable $twibble to stat state + */ + protected function reset_media_printfile() { + $reflect = new ReflectionFunction('media_printfile'); + $static = $reflect->getStaticVariables(); + if ($static['twibble'] == -1) { + ob_start(); + @media_printfile(array(), 0, ''); + ob_end_clean(); + } + } + + /** + * Build search result header as in media_searchlist() with $fullscreen = false + * + * @param $query search query + * @param $ns namespece where we search + * + * @return string + */ + protected function media_searchlist_header($query, $ns) { + global $lang; + + $header = '<h1 id="media__ns">'.sprintf($lang['searchmedia_in'],hsc($ns).':*').'</h1>'.NL; + ob_start(); + media_searchform($ns,$query); + $header .= ob_get_contents(); + ob_end_clean(); + + return $header; + } + + /** + * Wrap around media_printfile: return the result. + * + * @param $item + * @return string + */ + protected function media_printfile($item) { + ob_start(); + media_printfile($item,$item['perm'],'',true); + $out = ob_get_contents(); + ob_end_clean(); + + return $out; + } + + /** + * Wrap around media_searchlist: return the result + * Reset media_printfile static variables afterwards + * + * @param $query + * @param $ns + * @return string + */ + protected function media_searchlist($query, $ns) { + ob_start(); + media_searchlist($query, $ns); + $out = ob_get_contents(); + ob_end_clean(); + + //reset media_printfile static variables + $this->reset_media_printfile(); + + return $out; + } + + /** + * + * @param array[string] $rel_ids media ids relative to $this->upload_ns + * @return array $items as required by media_printfile + */ + protected function create_media_items($rel_ids) { + $items = array(); + foreach ($rel_ids as $rel_id){ + $file = mediaFN($this->upload_ns . ':' . $rel_id); + $info = array(); + $info['id'] = $this->upload_ns . ':' . $rel_id; + $info['perm'] = auth_quickaclcheck(getNS($info['id']).':*'); + $info['file'] = utf8_basename($file); + $info['size'] = filesize($file); + $info['mtime'] = filemtime($file); + $info['writable'] = is_writable($file); + if(preg_match("/\.(jpe?g|gif|png)$/",$file)){ + $info['isimg'] = true; + $info['meta'] = new JpegMeta($file); + }else{ + $info['isimg'] = false; + } + $info['hash'] = md5(io_readFile(mediaFN($info['id']),false)); + + $items[] = $info; + } + return $items; + } + + /** + * Output result as in 'media_searchlist' but use an arbitrary media IDs list instead of actual searching + * Reset media_printfile static variables afterwards + * + * @param array[string] $rel_ids media ids relative to $this->upload_ns + * @param string $query actual seqrch query (used for filling search filed input) + * @param string $ns + * @return string + */ + protected function media_searchlist_except($rel_ids, $query, $ns) { + //build a search result header + $expect = $this->media_searchlist_header($query, $ns); + + //get the items list + $items = $this->create_media_items($rel_ids); + foreach ($items as $item) { + $expect .= $this->media_printfile($item); + } + + //reset media_printfile static variables + $this->reset_media_printfile(); + + return $expect; + } + + public function test_noglobbing(){ + $query = 'a.png'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('a:a.png', 'b:a.png', 'a.png', 'aa.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_asterisk(){ + $query = 'a*.png'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('a:a.png', 'b:a.png', 'a.png', 'aa.png', 'ab.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_find_by_ext(){ + $query = '*.ogv'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('a.ogv', 'aa.ogv', 'ab.ogv'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_question_mark(){ + $query = 'a?.png'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('aa.png', 'ab.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_question_mark_and_asterisk(){ + $query = 'a?.*'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('aa.ogv', 'aa.png', 'ab.ogv', 'ab.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_question_mark_on_the_begining(){ + $query = '?.png'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('a:a.png', 'b:a.png', 'a.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_two_question_marks_on_the_begining(){ + $query = '??.png'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('aa.png', 'ab.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_globbing_two_letter_file_names(){ + $query = '??.*'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('aa.ogv', 'aa.png', 'ab.ogv', 'ab.png'), $query, $ns); + + $this->assertEquals($expect, $result); + } + + public function test_zero_search(){ + $query = '0'; + $ns = $this->upload_ns; + + $result = $this->media_searchlist($query, $ns); + $expect = $this->media_searchlist_except(array('0.webm'), $query, $ns); + + $this->assertEquals($expect, $result); + } +} diff --git a/_test/tests/inc/pageutils_wikiFN.test.php b/_test/tests/inc/pageutils_wikiFN.test.php index 6d9b73e2263b1e38ccf4cf7650abb54240f0e580..664aa64272cfb07bd5683ba0d1c923d05f9b7edb 100644 --- a/_test/tests/inc/pageutils_wikiFN.test.php +++ b/_test/tests/inc/pageutils_wikiFN.test.php @@ -4,13 +4,13 @@ class wikifn_test extends DokuWikiTest { function test_cache_cleaning_cleanToUnclean(){ - $this->assertEquals(wikiFN('wiki:',null,false),DOKU_TMP_DATA.'pages/wiki/.txt'); - $this->assertEquals(wikiFN('wiki:',null,true),DOKU_TMP_DATA.'pages/wiki.txt'); + $this->assertEquals(wikiFN('wiki:',null,false), TestUtils::w2u(DOKU_TMP_DATA.'pages/wiki/.txt')); + $this->assertEquals(wikiFN('wiki:',null,true), TestUtils::w2u(DOKU_TMP_DATA.'pages/wiki.txt')); } function test_cache_cleaning_uncleanToClean(){ - $this->assertEquals(wikiFN('wiki:',null,true),DOKU_TMP_DATA.'pages/wiki.txt'); - $this->assertEquals(wikiFN('wiki:',null,false),DOKU_TMP_DATA.'pages/wiki/.txt'); + $this->assertEquals(wikiFN('wiki:',null,true), TestUtils::w2u(DOKU_TMP_DATA.'pages/wiki.txt')); + $this->assertEquals(wikiFN('wiki:',null,false), TestUtils::w2u(DOKU_TMP_DATA.'pages/wiki/.txt')); } } diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php index f1207b11970484a327ec40f10c3517c15bad7c75..c73f8d13750b75eca9ffcfc74075a3287d69083a 100644 --- a/_test/tests/inc/parser/parser.inc.php +++ b/_test/tests/inc/parser/parser.inc.php @@ -5,14 +5,16 @@ require_once DOKU_INC . 'inc/parser/handler.php'; abstract class TestOfDoku_Parser extends DokuWikiTest { - var $P; - var $H; + /** @var Doku_Parser */ + protected $P; + /** @var Doku_Handler */ + protected $H; function setUp() { parent::setUp(); $this->P = new Doku_Parser(); $this->H = new Doku_Handler(); - $this->P->Handler = & $this->H; + $this->P->Handler = $this->H; } function tearDown() { diff --git a/_test/tests/inc/parser/parser_links.test.php b/_test/tests/inc/parser/parser_links.test.php index 529efac6e6141936db37cfc6fc3900681a7bcf3f..ee001e73af04cd69432cecf4b9be580d7d48398e 100644 --- a/_test/tests/inc/parser/parser_links.test.php +++ b/_test/tests/inc/parser/parser_links.test.php @@ -1,6 +1,11 @@ <?php require_once 'parser.inc.php'; +/** + * Tests for the implementation of link syntax + * + * @group parser_links +*/ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { function testExternalLinkSimple() { @@ -139,6 +144,35 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } + function testExternalWWWLinkInPath() { + $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); + // See issue #936. Should NOT generate a link! + $this->P->parse("Foo /home/subdir/www/www.something.de/somedir/ Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo /home/subdir/www/www.something.de/somedir/ Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testExternalWWWLinkFollowingPath() { + $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); + $this->P->parse("Foo /home/subdir/www/ www.something.de/somedir/ Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo /home/subdir/www/ ')), + array('externallink',array('http://www.something.de/somedir/', 'www.something.de/somedir/')), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testExternalFTPLink() { $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); $this->P->parse("Foo ftp.sunsite.com Bar"); @@ -153,6 +187,36 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { ); $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } + + function testExternalFTPLinkInPath() { + $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); + // See issue #936. Should NOT generate a link! + $this->P->parse("Foo /home/subdir/www/ftp.something.de/somedir/ Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo /home/subdir/www/ftp.something.de/somedir/ Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testExternalFTPLinkFollowingPath() { + $this->P->addMode('externallink',new Doku_Parser_Mode_ExternalLink()); + $this->P->parse("Foo /home/subdir/www/ ftp.something.de/somedir/ Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo /home/subdir/www/ ')), + array('externallink',array('ftp://ftp.something.de/somedir/', 'ftp.something.de/somedir/')), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testEmail() { $this->P->addMode('emaillink',new Doku_Parser_Mode_Emaillink()); $this->P->parse("Foo <bugs@php.net> Bar"); @@ -274,6 +338,36 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } + function testInternalLinkCodeFollows() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[wiki:internal:link|Test]] Bar <code>command [arg1 [arg2 [arg3]]]</code>"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('wiki:internal:link','Test')), + array('cdata',array(' Bar <code>command [arg1 [arg2 [arg3]]]</code>')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testInternalLinkCodeFollows2() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[wiki:internal:link|[Square brackets in title] Test]] Bar <code>command [arg1 [arg2 [arg3]]]</code>"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('wiki:internal:link','[Square brackets in title] Test')), + array('cdata',array(' Bar <code>command [arg1 [arg2 [arg3]]]</code>')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testExternalInInternalLink() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[http://www.google.com|Google]] Bar"); @@ -289,6 +383,54 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } + function testExternalInInternalLink2() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[http://www.google.com?test[]=squarebracketsinurl|Google]] Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('externallink',array('http://www.google.com?test[]=squarebracketsinurl','Google')), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testExternalInInternalLink2CodeFollows() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[http://www.google.com?test[]=squarebracketsinurl|Google]] Bar <code>command [arg1 [arg2 [arg3]]]</code>"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('externallink',array('http://www.google.com?test[]=squarebracketsinurl','Google')), + array('cdata',array(' Bar <code>command [arg1 [arg2 [arg3]]]</code>')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testTwoInternalLinks() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[foo:bar|one]] and [[bar:foo|two]] Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('foo:bar','one')), + array('cdata',array(' and ')), + array('internallink',array('bar:foo','two')), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); + } + + function testInterwikiLink() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[iw>somepage|Some Page]] Bar"); @@ -393,7 +535,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { ); $this->assertEquals(array_map('stripByteIndex',$this->H->calls),$calls); } - + function testWindowsShareLinkHyphen() { $this->P->addMode('windowssharelink',new Doku_Parser_Mode_WindowsShareLink()); $this->P->parse('Foo \\\server\share-hyphen Bar'); diff --git a/_test/tests/inc/parserutils_set_metadata.test.php b/_test/tests/inc/parserutils_set_metadata.test.php new file mode 100644 index 0000000000000000000000000000000000000000..c31010ce880e98834354133089627a6240b9802b --- /dev/null +++ b/_test/tests/inc/parserutils_set_metadata.test.php @@ -0,0 +1,83 @@ +<?php + +/** + * Class parserutils_set_metadata_test + */ +class parserutils_set_metadata_test extends DokuWikiTest { + // the id used for this test case + private $id; + + /** + * Set up fake user environment with for the gieven user + * + * @param string $user + */ + function helper_prepare_user($user = '1') { + global $INFO, $USERINFO; + + // prepare fake users + static $users = [ + '1' => [ + 'pass' => '179ad45c6ce2cb97cf1029e212046e81', + 'name' => 'Tester1', + 'mail' => 'tester1@example.com', + 'grps' => array('admin', 'user'), + ] + , + 'tester2' => [ + 'pass' => '179ad45c6ce2cb97cf1029e212046e81', + 'name' => 'Tester2', + 'mail' => 'tester2@example.com', + 'grps' => array('user'), + ] + ]; + if(!isset($users[$user])) throw new RuntimeException('requested non-existing user'); + + // set up globals + $_SERVER['REMOTE_ADDR'] = '1.2.3.4'; + $USERINFO = $users[$user]; + $INFO['userinfo'] = $USERINFO; + $_SERVER['REMOTE_USER'] = $user; + } + + /** + * test array merge, including contributors with numeric keys and array data overwritting + */ + function test_array_replace(){ + // prepare user + $this->helper_prepare_user('1'); + + // prepare page + $this->id = 'test:set_metadata_array_replace'; + saveWikiText($this->id, 'Test', 'Test data setup'); + $meta = p_get_metadata($this->id); + + $this->assertEquals('1', $meta['user'], 'Initial page has wrong user ID'); + // $this->assertEquals(empty($meta['contributor']), true, 'Initial page should have no contributors'); + + // first revision with numeric user + $this->waitForTick(); + saveWikiText($this->id, 'Test1', 'Test first edit'); + $meta = p_get_metadata($this->id); + + $last_edit_date = $meta['date']['modified']; + $this->assertEquals(array('1'=>'Tester1'), $meta['contributor'], 'First edit contributors error'); + + // second revision with alphabetic user + $this->waitForTick(); + $this->helper_prepare_user('tester2'); + saveWikiText($this->id, 'Test2', 'Test second edit'); + $meta = p_get_metadata($this->id); + + $this->assertNotEquals($last_edit_date, $meta['date']['modified'], 'First edit date merge error'); + $this->assertEquals(array('tester2'=>'Tester2', '1'=>'Tester1'), $meta['contributor'], 'Second edit contributors error'); + + // third revision with the first user + $this->waitForTick(); + $this->helper_prepare_user('1'); + saveWikiText($this->id, 'Test3', 'Test third edit'); + $meta = p_get_metadata($this->id); + + $this->assertEquals(array('tester2'=>'Tester2', '1'=>'Tester1'), $meta['contributor'], 'Third edit contributors error'); + } +} diff --git a/_test/tests/inc/template_tpl_get_action.php b/_test/tests/inc/template_tpl_get_action.php new file mode 100644 index 0000000000000000000000000000000000000000..b18fe552d25893d06cf6764060d92616ebccc539 --- /dev/null +++ b/_test/tests/inc/template_tpl_get_action.php @@ -0,0 +1,483 @@ +<?php + +class template_tpl_get_action_test extends DokuWikiTest { + + public function setUp() { + parent::setUp(); + global $ID; + $ID = 'start'; // run all tests on the start page + + } + + public function test_edit_edit() { + global $ACT; + global $INFO; + global $REV; + + $ACT = 'show'; + $REV = ''; + $INFO['writable'] = true; + $INFO['exists'] = true; + $INFO['draft'] = ''; + + $expect = array( + 'accesskey' => 'e', + 'type' => 'edit', + 'id' => 'start', + 'method' => 'post', + 'params' => array( + 'do' => 'edit', + 'rev' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('edit')); + } + + public function test_edit_edit_rev() { + global $ACT; + global $INFO; + global $REV; + + $ACT = 'show'; + $REV = '1234'; + $INFO['writable'] = true; + $INFO['exists'] = true; + $INFO['draft'] = ''; + + $expect = array( + 'accesskey' => 'e', + 'type' => 'edit', + 'id' => 'start', + 'method' => 'post', + 'params' => array( + 'do' => 'edit', + 'rev' => '1234', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('edit')); + } + + public function test_edit_create() { + global $ACT; + global $INFO; + global $REV; + + $ACT = 'show'; + $REV = ''; + $INFO['writable'] = true; + $INFO['exists'] = false; + $INFO['draft'] = ''; + + $expect = array( + 'accesskey' => 'e', + 'type' => 'create', + 'id' => 'start', + 'method' => 'post', + 'params' => array( + 'do' => 'edit', + 'rev' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('edit')); + } + + public function test_edit_draft() { + global $ACT; + global $INFO; + global $REV; + + $ACT = 'show'; + $REV = ''; + $INFO['writable'] = true; + $INFO['exists'] = true; + $INFO['draft'] = 'foobar'; + + $expect = array( + 'accesskey' => 'e', + 'type' => 'draft', + 'id' => 'start', + 'method' => 'post', + 'params' => array( + 'do' => 'draft', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('edit')); + } + + public function test_edit_show() { + global $ACT; + global $INFO; + global $REV; + + $ACT = 'edit'; + $REV = ''; + $INFO['writable'] = true; + $INFO['exists'] = true; + $INFO['draft'] = ''; + + $expect = array( + 'accesskey' => 'v', + 'type' => 'show', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('edit')); + } + + public function test_revisions() { + $expect = array( + 'accesskey' => 'o', + 'type' => 'revs', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'revisions', + ), + 'nofollow' => true, + 'replacement' => '', + ); + + $this->assertEquals($expect, tpl_get_action('history')); + $this->assertEquals($expect, tpl_get_action('revisions')); + } + + public function test_recent() { + $expect = array( + 'accesskey' => 'r', + 'type' => 'recent', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'recent', + ), + 'nofollow' => true, + 'replacement' => '', + + ); + $this->assertEquals($expect, tpl_get_action('recent')); + } + + public function test_login() { + $expect = array( + 'accesskey' => null, + 'type' => 'login', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'login', + 'sectok' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('login')); + + $_SERVER['REMOTE_USER'] = 'someone'; // logged in user + + $expect = array( + 'accesskey' => null, + 'type' => 'logout', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'logout', + 'sectok' => getSecurityToken(), + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('login')); + } + + public function test_profile() { + $expect = false; + $this->assertEquals($expect, tpl_get_action('profile')); + + $_SERVER['REMOTE_USER'] = 'someone'; // logged in user + + $expect = array( + 'accesskey' => null, + 'type' => 'profile', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'profile', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('profile')); + } + + public function test_index() { + $expect = array( + 'accesskey' => 'x', + 'type' => 'index', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'index', + ), + 'nofollow' => false, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('index')); + + global $ID; + $ID = 'wiki:syntax'; // change to different page + + $expect = array( + 'accesskey' => 'x', + 'type' => 'index', + 'id' => 'wiki:syntax', + 'method' => 'get', + 'params' => array( + 'do' => 'index', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('index')); + } + + public function test_admin() { + $expect = false; + $this->assertEquals($expect, tpl_get_action('admin')); + + // logged in super user + global $INFO; + $_SERVER['REMOTE_USER'] = 'testuser'; + $INFO['ismanager'] = true; + + $expect = array( + 'accesskey' => null, + 'type' => 'admin', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'admin', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('admin')); + } + + public function test_top() { + $expect = array( + 'accesskey' => 't', + 'type' => 'top', + 'id' => '#dokuwiki__top', + 'method' => 'get', + 'params' => array( + 'do' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('top')); + } + + public function test_back() { + $expect = false; + $this->assertEquals($expect, tpl_get_action('back')); + + global $ID; + $ID = 'wiki:syntax'; + + $expect = array( + 'accesskey' => 'b', + 'type' => 'back', + 'id' => 'wiki:start', + 'method' => 'get', + 'params' => array( + 'do' => '', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('back')); + } + + public function test_backlink() { + $expect = array( + 'accesskey' => null, + 'type' => 'backlink', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'backlink', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('backlink')); + } + + public function test_subscribe() { + $expect = false; + $this->assertEquals($expect, tpl_get_action('subscribe')); + $this->assertEquals($expect, tpl_get_action('subscription')); + + $_SERVER['REMOTE_USER'] = 'someone'; // logged in user + + $expect = false; + $this->assertEquals($expect, tpl_get_action('subscribe')); + $this->assertEquals($expect, tpl_get_action('subscription')); + + // enable subscriptions + global $conf; + $conf['subscribers'] = true; + + $expect = array( + 'accesskey' => null, + 'type' => 'subscribe', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'subscribe', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('subscribe')); + $this->assertEquals($expect, tpl_get_action('subscription')); + } + + public function test_register() { + $expect = array( + 'accesskey' => null, + 'type' => 'register', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'register', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('register')); + + $_SERVER['REMOTE_USER'] = 'somebody'; // logged in user + + $expect = false; + $this->assertEquals($expect, tpl_get_action('register')); + } + + public function test_resendpwd() { + $expect = array( + 'accesskey' => null, + 'type' => 'resendpwd', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'resendpwd', + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('resendpwd')); + + $_SERVER['REMOTE_USER'] = 'somebody'; // logged in user + + $expect = false; + $this->assertEquals($expect, tpl_get_action('resendpwd')); + } + + public function test_revert() { + $expect = false; + $this->assertEquals($expect, tpl_get_action('revert')); + + global $REV; + global $INFO; + $REV = '1234'; + $INFO['writable'] = true; + $INFO['ismanager'] = true; + + $expect = array( + 'accesskey' => null, + 'type' => 'revert', + 'id' => 'start', + 'method' => 'get', // FIXME should this be post? + 'params' => array( + 'do' => 'revert', + 'rev' => '1234', + 'sectok' => '' // FIXME is this correct? + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('revert')); + } + + public function test_media() { + global $ID; + $ID = 'wiki:syntax'; + + $expect = array( + 'accesskey' => null, + 'type' => 'media', + 'id' => 'wiki:syntax', + 'method' => 'get', + 'params' => array( + 'do' => 'media', + 'ns' => 'wiki' + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('media')); + } + + public function test_mediaManager() { + global $IMG; + $IMG = 'wiki:dokuwiki.png'; + + $expect = array( + 'accesskey' => null, + 'type' => 'mediaManager', + 'id' => 'start', + 'method' => 'get', + 'params' => array( + 'do' => 'media', + 'ns' => 'wiki', + 'image' => 'wiki:dokuwiki.png' + ), + 'nofollow' => true, + 'replacement' => '', + ); + $this->assertEquals($expect, tpl_get_action('mediaManager')); + } + + public function test_img_backto() { + $expect = array( + 'accesskey' => 'b', + 'type' => 'img_backto', + 'id' => 'start', + 'method' => 'get', + 'params' => array(), + 'nofollow' => true, + 'replacement' => 'start', + ); + $this->assertEquals($expect, tpl_get_action('img_backto')); + } + + public function test_unknown() { + $expect = '[unknown %s type]'; + $this->assertEquals($expect, tpl_get_action('unknown')); + } + +} diff --git a/_test/tests/lib/exe/ajax_requests.test.php b/_test/tests/lib/exe/ajax_requests.test.php new file mode 100644 index 0000000000000000000000000000000000000000..e65a7eab5fe76a2081da333a219c5b0bb3b8a338 --- /dev/null +++ b/_test/tests/lib/exe/ajax_requests.test.php @@ -0,0 +1,123 @@ +<?php + +/** + * @group ajax + */ +class ajax_requests_test extends DokuWikiTest { + + /** + * DataProvider for the builtin Ajax calls + * + * @return array + */ + public function defaultCalls() { + return [ + // TODO: better logic and DOM walks + // Call | POST | regexp pattern to match + [ 'linkwiz', ['q' => ''], '/^<div class="odd type_d/' ], + [ 'suggestions', ['q' => ''], null ], + [ 'lock', ['id' => ''], null ], + [ 'draftdel', ['id' => ''], null ], + [ 'medians', ['ns' => 'some:ns'], null ], + [ 'medialist', ['ns' => '', 'recent' => '', 'do' => ''], null ], + [ 'mediadetails', ['image' => ''], null ], + [ 'mediadiff', ['image' => ''], null ], + [ 'mediaupload', ['mediaid' => '', 'qqfile' => '' ], null ], // $_FILES + [ 'index', ['idx' => ''], null ], + [ 'linkwiz', ['q' => ''], null ], + ]; + } + + /** + * @dataProvider defaultCalls + * @param string $call + * @param array $post + * @param string $regexp + */ + public function test_defaultCallsExist($call, $post, $regexp) { + + $request = new TestRequest(); + $response = $request->post(['call'=> $call]+$post, '/lib/exe/ajax.php'); + $this->assertNotEquals("AJAX call '$call' unknown!\n", $response->getContent()); + + if (!empty($regexp)) { + $this->assertRegExp($regexp, $response->getContent()); + } + } + + public function test_CallNotProvided() { + $request = new TestRequest(); + $response = $request->post([], '/lib/exe/ajax.php'); + $this->assertEquals('', $response->getContent()); + } + + public function test_UnknownCall() { + $call = 'unknownCALL'; + $request = new TestRequest(); + $response = $request->post(['call'=> $call], '/lib/exe/ajax.php'); + $this->assertEquals("AJAX call '$call' unknown!\n", $response->getContent()); + } + + + public function test_EventOnUnknownCall() { + global $EVENT_HANDLER; + $call = 'unknownCALL'; + $request = new TestRequest(); + + // referenced data from event hook + $hookTriggered = false; + $eventDataTriggered = ''; + $dataTriggered = ''; + $postTriggered = ''; + + $hookTriggered_AFTER = false; + $eventDataTriggered_AFTER = ''; + $dataTriggered_AFTER = ''; + $postTriggered_AFTER = ''; + + $EVENT_HANDLER->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', null, + function($event, $data) use (&$hookTriggered, &$dataTriggered, &$eventDataTriggered, &$postTriggered) { + /** @var Doku_Event $event */ + $hookTriggered = true; + $dataTriggered = $data; + $eventDataTriggered = $event->data; + $postTriggered = $GLOBALS['INPUT']->post->str('q'); + $event->preventDefault(); + $event->stopPropagation(); + echo "captured event BEFORE\n"; + }, 'some passed data' + ); + + $EVENT_HANDLER->register_hook('AJAX_CALL_UNKNOWN', 'AFTER', null, + function($event, $data) use (&$hookTriggered_AFTER , &$dataTriggered_AFTER , &$eventDataTriggered_AFTER , &$postTriggered_AFTER ) { + /** @var Doku_Event $event */ + $hookTriggered_AFTER = true; + $dataTriggered_AFTER = $data; + $eventDataTriggered_AFTER = $event->data; + $postTriggered_AFTER = $GLOBALS['INPUT']->post->str('q'); + $event->preventDefault(); + $event->stopPropagation(); + echo "captured event AFTER"; + }, 'some passed data AFTER' + ); + + + $response = $request->post(['call'=> $call, 'q' => 'some-post-param'], '/lib/exe/ajax.php'); + + // BEFORE + $this->assertEquals(true, $hookTriggered, 'Testing plugin did not trigger!'); + $this->assertEquals('some passed data', $dataTriggered); + $this->assertEquals($call, $eventDataTriggered, 'Must pass call name as event data'); + $this->assertEquals('some-post-param', $postTriggered); + + // AFTER + $this->assertEquals(true, $hookTriggered_AFTER, 'Testing plugin did not trigger!'); + $this->assertEquals('some passed data AFTER', $dataTriggered_AFTER); + $this->assertEquals($call, $eventDataTriggered_AFTER, 'Must pass call name as event data'); + $this->assertEquals('some-post-param', $postTriggered_AFTER); + + //output + $this->assertEquals("captured event BEFORE\ncaptured event AFTER", $response->getContent()); + + } +} diff --git a/_test/tests/lib/exe/css_at_import_less.test.php b/_test/tests/lib/exe/css_at_import_less.test.php index 4a6efcf44d3e9c5b48211d53f9cad2401aec97f5..759272ebfa12b4f4ee7458f810efa8b2c506d87d 100644 --- a/_test/tests/lib/exe/css_at_import_less.test.php +++ b/_test/tests/lib/exe/css_at_import_less.test.php @@ -38,10 +38,22 @@ class css_at_import_less_test extends DokuWikiTest { $this->assertEquals($expected_less, $less); } + /** + * makes proper relative path to be used in CSS @import + * @param string $path + * @return string + */ + private function importPath($path) { + if (isWindows()) { + return preg_replace('#(^.*[\\\\])#','', $path); + } + return preg_replace('#(^.*[/])#','', $path); + } + public function test_basic() { $this->setUpFiles(); - $import = preg_replace('#(^.*[/])#','',$this->import); + $import = $this->importPath($this->import); $in_css = '@import "'.$import.'";'; $in_less = '@foo: "bar"; content: @foo;'; @@ -56,12 +68,12 @@ content: @foo;'; public function test_subdirectory() { $this->setUpFiles('/foo/bar'); - $import = preg_replace('#(^.*[/])#','',$this->import); + $import = $this->importPath($this->import); $in_css = '@import "'.$import.'";'; $in_less = '@foo: "bar"; content: @foo;'; - $expected_css = '@import "/foo/bar/'.$import.'";'; + $expected_css = isWindows() ? '@import "\\foo\\bar/'.$import.'";' : '@import "/foo/bar/'.$import.'";'; $expected_less = 'content: "bar";'; io_saveFile($this->import, $in_less); diff --git a/_test/tests/lib/exe/css_css_loadfile.test.php b/_test/tests/lib/exe/css_css_loadfile.test.php index 624becd2927997acd03c31e50d0fb281ade11f43..2b9d1fd2abd5d75f4e6538e8dd28c39f11ef7c61 100644 --- a/_test/tests/lib/exe/css_css_loadfile.test.php +++ b/_test/tests/lib/exe/css_css_loadfile.test.php @@ -77,11 +77,17 @@ class css_css_loadfile_test extends DokuWikiTest { $this->file = tempnam($dir, 'css'); - $this->csstest('@import "test.less"', '@import "/foo/bar/test.less"'); - $this->csstest('@import \'test.less\'', '@import \'/foo/bar/test.less\''); - $this->csstest('@import url(test.less)', '@import url(/foo/bar/test.less)'); - - $this->csstest('@import "abc/test.less"', '@import "/foo/bar/abc/test.less"'); + if (isWindows()) { + $this->csstest('@import "test.less"', '@import "\foo\bar/test.less"'); + $this->csstest('@import \'test.less\'', '@import \'\foo\bar/test.less\''); + $this->csstest('@import url(test.less)', '@import url(\foo\bar/test.less)'); + $this->csstest('@import "abc/test.less"', '@import "\foo\bar/abc/test.less"'); + } else { + $this->csstest('@import "test.less"', '@import "/foo/bar/test.less"'); + $this->csstest('@import \'test.less\'', '@import \'/foo/bar/test.less\''); + $this->csstest('@import url(test.less)', '@import url(/foo/bar/test.less)'); + $this->csstest('@import "abc/test.less"', '@import "/foo/bar/abc/test.less"'); + } } public function tearDown() { diff --git a/_test/tests/test/edit_and_save.test.php b/_test/tests/test/edit_and_save.test.php new file mode 100644 index 0000000000000000000000000000000000000000..fdf86a541439b61b2dc2e5c66cf8d912026f5e29 --- /dev/null +++ b/_test/tests/test/edit_and_save.test.php @@ -0,0 +1,173 @@ +<?php + +/** + * @group integration + */ +class EditAndSaveTest extends DokuWikiTest { + + /** + * Execute the following requests: + * - Section edit a page (headline 2, first occurrence) + * - Save a page + * - Redirect + * Check if the header id is transmitted and if the final redirect + * points to the correct header. + */ + function testEditSaveRedirect_Headline2_A() { + $request = new TestRequest(); + + $input = array( + 'id' => 'int:editandsavetest' + ); + + // Show page + $response = $request->post($input); + $content = $response->getContent(); + $this->assertTrue(!empty($content)); + + // If the test page has got the right content for our test it should have + // two headlines with the title "Headline2" + preg_match_all('#<h1[^>]*>Headline2</h1[^>]*>#', $content, $matches, PREG_SET_ORDER); + $this->assertEquals(2, count($matches)); + + // Get the header ids + $result = preg_match('/id="(.*)"/', $matches [0][0], $idA); + $this->assertEquals(1, $result); + $result = preg_match('/id="(.*)"/', $matches [1][0], $idB); + $this->assertEquals(1, $result); + $this->assertTrue($idA != $idB); + + // Search the section edit form/button for the second id + $pattern = '/<form class="button btn_secedit".*>.*'; + $pattern .= '<input type="hidden" name="hid" value="'; + $pattern .= $idA[1]; + $pattern .= '" \/>.*<\/form>/'; + $result = preg_match($pattern, $content, $formA); + $this->assertEquals(1, $result); + + // Extract all inputs from the form + $result = preg_match_all('/<input type="hidden" name="([^"]*)" value="([^"]*)" \/>/', $formA[0], $matches, PREG_SET_ORDER); + $input = array(); + foreach ($matches as $match) { + $input[$match[1]] = $match[2]; + } + $this->assertEquals($input['hid'], $idA[1]); + + // Post the input fields (= do a section edit) + $response = $request->post($input, '/doku.php'); + $content = $response->getContent(); + + // Our header id should have been sent back to us in the edit + // form as an hidden input field + $content = str_replace("\n", " ", $content); + $pattern = '/<form id="dw__editform"[^>]*>.*'; + $pattern .= '<input type="hidden" name="hid" value="'; + $pattern .= $idA[1]; + $pattern .= '" \/>.*<\/form>/'; + $result = preg_match($pattern, $content, $editForm); + $this->assertEquals(1, $result); + + // Extract all inputs from the edit form + $result = preg_match_all('/<input type="hidden" name="([^"]*)" value="([^"]*)" \/>/', $editForm[0], $matches, PREG_SET_ORDER); + $input = array(); + foreach ($matches as $match) { + $input[$match[1]] = $match[2]; + } + $this->assertEquals($input['hid'], $idA[1]); + $input['do'] = 'save'; + + // Post the input fields (= save page) + $response = $request->post($input, '/doku.php'); + + // The response should carry a notification that a redirect + // was executed to our header ID + $found = $response->getData('send_redirect'); + $this->assertCount(1, $found); + $hash = strpos($found[0], '#'); + $headerID = substr($found[0], $hash); + $this->assertEquals($headerID, '#'.$idA[1]); + } + + /** + * Execute the following requests: + * - Section edit a page (headline 2, second occurrence) + * - Save a page + * - Redirect + * Check if the header id is transmitted and if the final redirect + * points to the correct header. + */ + function testEditSaveRedirect_Headline2_B() { + $request = new TestRequest(); + + $input = array( + 'id' => 'int:editandsavetest' + ); + + // Show page + $response = $request->post($input); + $content = $response->getContent(); + $this->assertTrue(!empty($content)); + + // If the test page has got the right content for our test it should have + // two headlines with the title "Headline2" + preg_match_all('#<h1[^>]*>Headline2</h1[^>]*>#', $content, $matches, PREG_SET_ORDER); + $this->assertEquals(2, count($matches)); + + // Get the header ids + $result = preg_match('/id="(.*)"/', $matches [0][0], $idA); + $this->assertEquals(1, $result); + $result = preg_match('/id="(.*)"/', $matches [1][0], $idB); + $this->assertEquals(1, $result); + $this->assertTrue($idA != $idB); + + // Search the section edit form/button for the second id + $pattern = '/<form class="button btn_secedit".*>.*'; + $pattern .= '<input type="hidden" name="hid" value="'; + $pattern .= $idB[1]; + $pattern .= '" \/>.*<\/form>/'; + $result = preg_match($pattern, $content, $formB); + $this->assertEquals(1, $result); + + // Extract all inputs from the form + $result = preg_match_all('/<input type="hidden" name="([^"]*)" value="([^"]*)" \/>/', $formB[0], $matches, PREG_SET_ORDER); + $input = array(); + foreach ($matches as $match) { + $input[$match[1]] = $match[2]; + } + $this->assertEquals($input['hid'], $idB[1]); + + // Post the input fields (= do a section edit) + $response = $request->post($input, '/doku.php'); + $content = $response->getContent(); + + // Our header id should have been sent back to us in the edit + // form as an hidden input field + $content = str_replace("\n", " ", $content); + $pattern = '/<form id="dw__editform"[^>]*>.*'; + $pattern .= '<input type="hidden" name="hid" value="'; + $pattern .= $idB[1]; + $pattern .= '" \/>.*<\/form>/'; + $result = preg_match($pattern, $content, $editForm); + $this->assertEquals(1, $result); + + // Extract all inputs from the edit form + $result = preg_match_all('/<input type="hidden" name="([^"]*)" value="([^"]*)" \/>/', $editForm[0], $matches, PREG_SET_ORDER); + $input = array(); + foreach ($matches as $match) { + $input[$match[1]] = $match[2]; + } + $this->assertEquals($input['hid'], $idB[1]); + $input['do'] = 'save'; + + // Post the input fields (= save page) + $response = $request->post($input, '/doku.php'); + + // The response should carry a notification that a redirect + // was executed to our header ID + $found = $response->getData('send_redirect'); + $this->assertCount(1, $found); + $hash = strpos($found[0], '#'); + $headerID = substr($found[0], $hash); + $this->assertEquals($headerID, '#'.$idB[1]); + } +} diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000000000000000000000000000000000000..dd1140a559a1c94fccc1979bbe0f131ffdf52579 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,47 @@ +build: false +clone_folder: c:\dokuwiki +max_jobs: 3 +platform: x86 +pull_requests: + do_not_increment_build_number: true +version: '{build}.{branch}' + +environment: + matrix: + - PHP_VERSION: '7.0.21' + VC: 'VC14' + PHPUNIT: '6.3' + - PHP_VERSION: '5.6.30' + VC: 'VC11' + PHPUNIT: '5.7' + +cache: + - c:\php -> appveyor.yml + +init: + - SET PATH=c:\php\%PHP_VERSION%;%PATH% + +install: + - echo %PHP_VERSION% + - IF NOT EXIST c:\php mkdir c:\php + - IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION% + - cd c:\php\%PHP_VERSION% + - IF NOT EXIST php-installed.txt appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-%PHP_VERSION%-Win32-%VC%-x86.zip + - IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%-Win32-%VC%-x86.zip -y >nul + - IF NOT EXIST php-installed.txt del /Q *.zip + - IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini + - IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini + - IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini + - IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini + - IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini + - IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini + - IF NOT EXIST php-installed.txt echo extension=php_gd2.dll >> php.ini + - IF NOT EXIST php-installed.txt echo extension=php_bz2.dll >> php.ini + - IF NOT EXIST php-installed.txt echo extension=php_pdo_sqlite.dll >> php.ini + - IF NOT EXIST php-installed.txt appveyor DownloadFile https://phar.phpunit.de/phpunit-%PHPUNIT%.phar -FileName phpunit.phar + - IF NOT EXIST php-installed.txt type nul >> php-installed.txt + +test_script: + - php -v + - cd c:\dokuwiki\_test + - php c:\php\%PHP_VERSION%\phpunit.phar diff --git a/composer.json b/composer.json index 51e359824f4a159a0a9e0b2a91b948e12cac2857..95d401e24e46278bc51ce8eeb820525255214316 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,13 @@ "simplepie/simplepie": "^1.4", "geshi/geshi": "^1.0", "openpsa/universalfeedcreator": "^1.8", - "aziraphale/email-address-validator": "^2" + "aziraphale/email-address-validator": "^2", + "marcusschwarz/lesserphp": "^0.5.1" + }, + "config": { + "platform": { + "php": "5.6" + } }, "suggest": { "squizlabs/php_codesniffer": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", diff --git a/composer.lock b/composer.lock index f3971f9827dd8d40b294ead098b7403c02efaaa7..306facf68e4d164f96ec2338b6ea28a054adceb0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "67e5a8bb8a3d52ab872761fe66bd5f26", + "content-hash": "149ef96a4cadb6765aac9e7c6a2b5b17", "packages": [ { "name": "aziraphale/email-address-validator", @@ -87,6 +87,58 @@ "homepage": "http://qbnz.com/highlighter/", "time": "2017-05-05T05:51:25+00:00" }, + { + "name": "marcusschwarz/lesserphp", + "version": "v0.5.1", + "source": { + "type": "git", + "url": "https://github.com/MarcusSchwarz/lesserphp.git", + "reference": "e9e3d53980c0e486b07c75e12f2bae5e10bdee44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/e9e3d53980c0e486b07c75e12f2bae5e10bdee44", + "reference": "e9e3d53980c0e486b07c75e12f2bae5e10bdee44", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, + "bin": [ + "plessc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.1-dev" + } + }, + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + }, + { + "name": "Marcus Schwarz", + "email": "github@maswaba.de", + "homepage": "https://www.maswaba.de" + } + ], + "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", + "homepage": "http://leafo.net/lessphp/", + "time": "2016-09-30T11:13:18+00:00" + }, { "name": "openpsa/universalfeedcreator", "version": "v1.8.3", @@ -185,16 +237,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.4", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa", "shasum": "" }, "require": { @@ -273,20 +325,20 @@ "x.509", "x509" ], - "time": "2016-10-04T00:57:04+00:00" + "time": "2017-06-05T06:31:10+00:00" }, { "name": "simplepie/simplepie", - "version": "1.4.3", + "version": "1.5", "source": { "type": "git", "url": "https://github.com/simplepie/simplepie.git", - "reference": "2a24b6e74aa9bf33243020f52895fe77efe94ccf" + "reference": "5de5551953f95feef12cf355a7a26a70f94aa3ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplepie/simplepie/zipball/2a24b6e74aa9bf33243020f52895fe77efe94ccf", - "reference": "2a24b6e74aa9bf33243020f52895fe77efe94ccf", + "url": "https://api.github.com/repos/simplepie/simplepie/zipball/5de5551953f95feef12cf355a7a26a70f94aa3ab", + "reference": "5de5551953f95feef12cf355a7a26a70f94aa3ab", "shasum": "" }, "require": { @@ -333,20 +385,20 @@ "feeds", "rss" ], - "time": "2016-11-27T01:39:18+00:00" + "time": "2017-04-17T07:29:31+00:00" }, { "name": "splitbrain/php-archive", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/splitbrain/php-archive.git", - "reference": "6b1c1746fa0a6f9f68f0bc832892ddeda8db905c" + "reference": "2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/6b1c1746fa0a6f9f68f0bc832892ddeda8db905c", - "reference": "6b1c1746fa0a6f9f68f0bc832892ddeda8db905c", + "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76", + "reference": "2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76", "shasum": "" }, "require": { @@ -384,7 +436,7 @@ "unzip", "zip" ], - "time": "2017-03-19T09:10:53+00:00" + "time": "2017-06-11T06:11:38+00:00" } ], "packages-dev": [], diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 5b725063de3c6862208d2163d0b5b0fb7e8c8264..c87a7cd0cf678cea41af8d6acb0727758c7d9ceb 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -108,6 +108,7 @@ $conf['subscribe_time'] = 24*60*60; //Time after which digests / lists are $conf['notify'] = ''; //send change info to this email (leave blank for nobody) $conf['registernotify'] = ''; //send info about newly registered users to this email (leave blank for nobody) $conf['mailfrom'] = ''; //use this email when sending mails +$conf['mailreturnpath'] = ''; //use this email as returnpath for bounce mails $conf['mailprefix'] = ''; //use this as prefix of outgoing mails $conf['htmlmail'] = 1; //send HTML multipart mails diff --git a/conf/mime.conf b/conf/mime.conf index c2e03b775de1a2f2b93dce41f9eaa7d3414fe93f..56b72a42cfe140323c726bc89e30a6a46a51a3a3 100644 --- a/conf/mime.conf +++ b/conf/mime.conf @@ -15,6 +15,7 @@ wav audio/wav webm video/webm ogv video/ogg mp4 video/mp4 +vtt text/vtt tgz !application/octet-stream tar !application/x-gtar diff --git a/data/security.png b/data/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png similarity index 100% rename from data/security.png rename to data/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png diff --git a/data/security.xcf b/data/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.xcf similarity index 100% rename from data/security.xcf rename to data/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.xcf diff --git a/doku.php b/doku.php index 42624fd2e8d908ec1fdec72b87e603a8c0c9e24f..d02a4320019d492e5a319fa93f2bd35276bc47e1 100644 --- a/doku.php +++ b/doku.php @@ -9,7 +9,7 @@ */ // update message version - always use a string to avoid localized floats! -$updateVersion = "49.2"; +$updateVersion = "50"; // xdebug_start_profiling(); @@ -62,7 +62,7 @@ if($DATE_AT) { } else { // check for UNIX Timestamp $date_parse = @date('Ymd',$DATE_AT); if(!$date_parse || $date_parse === '19700101') { - msg(sprintf($lang['unable_to_parse_date'], $DATE_AT)); + msg(sprintf($lang['unable_to_parse_date'], hsc($DATE_AT))); $DATE_AT = null; } } diff --git a/feed.php b/feed.php index ea4ed7c600a92c81e53af071fb6277db763cc75d..65d751b3ebab22375e853e1ec0a292469a522822 100644 --- a/feed.php +++ b/feed.php @@ -402,34 +402,30 @@ 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 - $item->author = ''; - if($user && $conf['useacl'] && $auth) { - $userInfo = $auth->getUserData($user); - if($userInfo) { - switch($conf['showuseras']) { - case 'username': - case 'username_link': - $item->author = $userInfo['name']; - break; - default: - $item->author = $user; - break; + if(blank($user)) { + $item->author = 'Anonymous'; + $item->authorEmail = 'anonymous@undisclosed.example.com'; + } else { + $item->author = $user; + $item->authorEmail = $user . '@undisclosed.example.com'; + + // get real user name if configured + if($conf['useacl'] && $auth) { + $userInfo = $auth->getUserData($user); + if($userInfo) { + switch($conf['showuseras']) { + case 'username': + case 'username_link': + $item->author = $userInfo['name']; + break; + default: + $item->author = $user; + break; + } + } else { + $item->author = $user; } - } else { - $item->author = $user; } - if($userInfo && !$opt['guardmail']) { - $item->authorEmail = $userInfo['mail']; - } else { - //cannot obfuscate because some RSS readers may check validity - $item->authorEmail = $user.'@'.$ditem['ip']; - } - } elseif($user) { - // this happens when no ACL but some Apache auth is used - $item->author = $user; - $item->authorEmail = $user.'@'.$ditem['ip']; - } else { - $item->authorEmail = 'anonymous@'.$ditem['ip']; } // add category diff --git a/inc/Action/AbstractAclAction.php b/inc/Action/AbstractAclAction.php new file mode 100644 index 0000000000000000000000000000000000000000..76639b066da392b7f623327b51bc2a22505641f1 --- /dev/null +++ b/inc/Action/AbstractAclAction.php @@ -0,0 +1,25 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAclRequiredException; + +/** + * Class AbstractAclAction + * + * An action that requires the ACL subsystem to be enabled (eg. useacl=1) + * + * @package dokuwiki\Action + */ +abstract class AbstractAclAction extends AbstractAction { + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + global $conf; + global $auth; + if(!$conf['useacl']) throw new ActionAclRequiredException(); + if(!$auth) throw new ActionAclRequiredException(); + } + +} diff --git a/inc/Action/AbstractAction.php b/inc/Action/AbstractAction.php new file mode 100644 index 0000000000000000000000000000000000000000..8c2467f86d54e1222419613d843bda388331f208 --- /dev/null +++ b/inc/Action/AbstractAction.php @@ -0,0 +1,88 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionDisabledException; +use dokuwiki\Action\Exception\ActionException; +use dokuwiki\Action\Exception\FatalException; + +/** + * Class AbstractAction + * + * Base class for all actions + * + * @package dokuwiki\Action + */ +abstract class AbstractAction { + + /** @var string holds the name of the action (lowercase class name, no namespace) */ + protected $actionname; + + /** + * AbstractAction constructor. + * + * @param string $actionname the name of this action (see getActionName() for caveats) + */ + public function __construct($actionname = '') { + if($actionname !== '') { + $this->actionname = $actionname; + } else { + // http://stackoverflow.com/a/27457689/172068 + $this->actionname = strtolower(substr(strrchr(get_class($this), '\\'), 1)); + } + } + + /** + * Return the minimum permission needed + * + * This needs to return one of the AUTH_* constants. It will be checked against + * the current user and page after checkPermissions() ran through. If it fails, + * the user will be shown the Denied action. + * + * @return int + */ + abstract public function minimumPermission(); + + /** + * Check permissions are correct to run this action + * + * @throws ActionException + * @return void + */ + public function checkPermissions() { + } + + /** + * Process data + * + * This runs before any output is sent to the browser. + * + * Throw an Exception if a different action should be run after this step. + * + * @throws ActionException + * @return void + */ + public function preProcess() { + } + + /** + * Output whatever content is wanted within tpl_content(); + * + * @fixme we may want to return a Ui class here + */ + public function tplContent() { + throw new FatalException('No content for Action ' . $this->actionname); + } + + /** + * Returns the name of this action + * + * This is usually the lowercased class name, but may differ for some actions. + * eg. the export_ modes or for the Plugin action. + * + * @return string + */ + public function getActionName() { + return $this->actionname; + } +} diff --git a/inc/Action/AbstractAliasAction.php b/inc/Action/AbstractAliasAction.php new file mode 100644 index 0000000000000000000000000000000000000000..7240f5edf0f11ba6d89d48db162dde9bf54f1506 --- /dev/null +++ b/inc/Action/AbstractAliasAction.php @@ -0,0 +1,28 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\FatalException; + +/** + * Class AbstractAliasAction + * + * An action that is an alias for another action. Skips the minimumPermission check + * + * Be sure to implement preProcess() and throw an ActionAbort exception + * with the proper action. + * + * @package dokuwiki\Action + */ +abstract class AbstractAliasAction extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + public function preProcess() { + throw new FatalException('Alias Actions need to implement preProcess to load the aliased action'); + } + +} diff --git a/inc/Action/AbstractUserAction.php b/inc/Action/AbstractUserAction.php new file mode 100644 index 0000000000000000000000000000000000000000..8a3a19f75c4f6d888b81bd2eac050f70aad65b2d --- /dev/null +++ b/inc/Action/AbstractUserAction.php @@ -0,0 +1,25 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionUserRequiredException; + +/** + * Class AbstractUserAction + * + * An action that requires a logged in user + * + * @package dokuwiki\Action + */ +abstract class AbstractUserAction extends AbstractAclAction { + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + global $INPUT; + if(!$INPUT->server->str('REMOTE_USER')) { + throw new ActionUserRequiredException(); + } + } + +} diff --git a/inc/Action/Admin.php b/inc/Action/Admin.php new file mode 100644 index 0000000000000000000000000000000000000000..b1f9095ee59c0d345801cabb1a5ae7d3cab2107f --- /dev/null +++ b/inc/Action/Admin.php @@ -0,0 +1,56 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Admin + * + * Action to show the admin interface or admin plugins + * + * @package dokuwiki\Action + */ +class Admin extends AbstractUserAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + + if($INFO['ismanager']) { + return AUTH_READ; // let in check later + } else { + return AUTH_ADMIN; + } + } + + public function checkPermissions() { + parent::checkPermissions(); + + global $INFO; + if(!$INFO['ismanager']) { + throw new ActionException('denied'); + } + } + + public function preProcess() { + global $INPUT; + global $INFO; + + // retrieve admin plugin name from $_REQUEST['page'] + if(($page = $INPUT->str('page', '', true)) != '') { + /** @var $plugin \DokuWiki_Admin_Plugin */ + if($plugin = plugin_getRequestAdminPlugin()) { // FIXME this method does also permission checking + if($plugin->forAdminOnly() && !$INFO['isadmin']) { + throw new ActionException('denied'); + } + $plugin->handle(); + } + } + } + + public function tplContent() { + tpl_admin(); + } + +} diff --git a/inc/Action/Backlink.php b/inc/Action/Backlink.php new file mode 100644 index 0000000000000000000000000000000000000000..0337917b35b363ab7145cf54d5dfa1cff389072f --- /dev/null +++ b/inc/Action/Backlink.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Backlink + * + * Shows which pages link to the current page + * + * @package dokuwiki\Action + */ +class Backlink extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function tplContent() { + html_backlinks(); + } + +} diff --git a/inc/Action/Cancel.php b/inc/Action/Cancel.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e185534d94f97ad7e75e9138b135a7f75cacfe --- /dev/null +++ b/inc/Action/Cancel.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Cancel + * + * Alias for show. Aborts editing + * + * @package dokuwiki\Action + */ +class Cancel extends AbstractAliasAction { + + public function preProcess() { + // continue with draftdel -> redirect -> show + throw new ActionAbort('draftdel'); + } + +} diff --git a/inc/Action/Check.php b/inc/Action/Check.php new file mode 100644 index 0000000000000000000000000000000000000000..36ae8e8bd279da7f4581ca3f0b385b32e1097a03 --- /dev/null +++ b/inc/Action/Check.php @@ -0,0 +1,26 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Check + * + * Adds some debugging info before aborting to show + * + * @package dokuwiki\Action + */ +class Check extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + public function preProcess() { + check(); + throw new ActionAbort(); + } + +} diff --git a/inc/Action/Conflict.php b/inc/Action/Conflict.php new file mode 100644 index 0000000000000000000000000000000000000000..d880b5b28f48d2ad7180eef33e0a7a8eb0e16b3c --- /dev/null +++ b/inc/Action/Conflict.php @@ -0,0 +1,34 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Conflict + * + * Show the conflict resolution screen + * + * @package dokuwiki\Action + */ +class Conflict extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + if($INFO['exists']) { + return AUTH_EDIT; + } else { + return AUTH_CREATE; + } + } + + public function tplContent() { + global $PRE; + global $TEXT; + global $SUF; + global $SUM; + + html_conflict(con($PRE, $TEXT, $SUF), $SUM); + html_diff(con($PRE, $TEXT, $SUF), false); + } + +} diff --git a/inc/Action/Denied.php b/inc/Action/Denied.php new file mode 100644 index 0000000000000000000000000000000000000000..c8e01926265cb86dd3b373cb2c69c4830b966dca --- /dev/null +++ b/inc/Action/Denied.php @@ -0,0 +1,23 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Denied + * + * Show the access denied screen + * + * @package dokuwiki\Action + */ +class Denied extends AbstractAclAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + public function tplContent() { + html_denied(); + } + +} diff --git a/inc/Action/Diff.php b/inc/Action/Diff.php new file mode 100644 index 0000000000000000000000000000000000000000..b14b1d04ed91c4bb47fc739b4c339080a9d4143c --- /dev/null +++ b/inc/Action/Diff.php @@ -0,0 +1,35 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Diff + * + * Show the differences between two revisions + * + * @package dokuwiki\Action + */ +class Diff extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function preProcess() { + global $INPUT; + + // store the selected diff type in cookie + $difftype = $INPUT->str('difftype'); + if(!empty($difftype)) { + set_doku_pref('difftype', $difftype); + } + } + + /** @inheritdoc */ + public function tplContent() { + html_diff(); + } + +} diff --git a/inc/Action/Draft.php b/inc/Action/Draft.php new file mode 100644 index 0000000000000000000000000000000000000000..ab678c2942eda21c13ddfe763cc3d1e78dfb8feb --- /dev/null +++ b/inc/Action/Draft.php @@ -0,0 +1,39 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Draft + * + * Screen to see and recover a draft + * + * @package dokuwiki\Action + * @fixme combine with Recover? + */ +class Draft extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + if($INFO['exists']) { + return AUTH_EDIT; + } else { + return AUTH_CREATE; + } + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + global $INFO; + if(!file_exists($INFO['draft'])) throw new ActionException('edit'); + } + + /** @inheritdoc */ + public function tplContent() { + html_draft(); + } + +} diff --git a/inc/Action/Draftdel.php b/inc/Action/Draftdel.php new file mode 100644 index 0000000000000000000000000000000000000000..77378f7cb8086ee0e5c65508585bc70326e2f698 --- /dev/null +++ b/inc/Action/Draftdel.php @@ -0,0 +1,36 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Draftdel + * + * Delete a draft + * + * @package dokuwiki\Action + */ +class Draftdel extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_EDIT; + } + + /** + * Delete an existing draft if any + * + * Reads draft information from $INFO. Redirects to show, afterwards. + * + * @throws ActionAbort + */ + public function preProcess() { + global $INFO; + @unlink($INFO['draft']); + $INFO['draft'] = null; + + throw new ActionAbort('redirect'); + } + +} diff --git a/inc/Action/Edit.php b/inc/Action/Edit.php new file mode 100644 index 0000000000000000000000000000000000000000..7483516811ccd85e9315846921540a0aae19a2c9 --- /dev/null +++ b/inc/Action/Edit.php @@ -0,0 +1,91 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Edit + * + * Handle editing + * + * @package dokuwiki\Action + */ +class Edit extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + if($INFO['exists']) { + return AUTH_READ; // we check again below + } else { + return AUTH_CREATE; + } + } + + /** + * @inheritdoc falls back to 'source' if page not writable + */ + public function checkPermissions() { + parent::checkPermissions(); + global $INFO; + + // no edit permission? view source + if($INFO['exists'] && !$INFO['writable']) { + throw new ActionAbort('source'); + } + } + + /** @inheritdoc */ + public function preProcess() { + global $ID; + global $INFO; + + global $TEXT; + global $RANGE; + global $PRE; + global $SUF; + global $REV; + global $SUM; + global $lang; + global $DATE; + + if(!isset($TEXT)) { + if($INFO['exists']) { + if($RANGE) { + list($PRE, $TEXT, $SUF) = rawWikiSlices($RANGE, $ID, $REV); + } else { + $TEXT = rawWiki($ID, $REV); + } + } else { + $TEXT = pageTemplate($ID); + } + } + + //set summary default + if(!$SUM) { + if($REV) { + $SUM = sprintf($lang['restored'], dformat($REV)); + } elseif(!$INFO['exists']) { + $SUM = $lang['created']; + } + } + + // Use the date of the newest revision, not of the revision we edit + // This is used for conflict detection + if(!$DATE) $DATE = @filemtime(wikiFN($ID)); + + //check if locked by anyone - if not lock for my self + $lockedby = checklock($ID); + if($lockedby) { + throw new ActionAbort('locked'); + }; + lock($ID); + } + + /** @inheritdoc */ + public function tplContent() { + html_edit(); + } + +} diff --git a/inc/Action/Exception/ActionAbort.php b/inc/Action/Exception/ActionAbort.php new file mode 100644 index 0000000000000000000000000000000000000000..9c188bb4b30ea0ac7ffddd3956fe5efd4cb74eac --- /dev/null +++ b/inc/Action/Exception/ActionAbort.php @@ -0,0 +1,20 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class ActionAbort + * + * Strictly speaking not an Exception but an expected execution path. Used to + * signal when one action is done and another should take over. + * + * If you want to signal the same but under some error condition use ActionException + * or one of it's decendants. + * + * The message will NOT be shown to the enduser + * + * @package dokuwiki\Action\Exception + */ +class ActionAbort extends ActionException { + +} diff --git a/inc/Action/Exception/ActionAclRequiredException.php b/inc/Action/Exception/ActionAclRequiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..64a2c61e3e156da01873eed41bfaefe891240067 --- /dev/null +++ b/inc/Action/Exception/ActionAclRequiredException.php @@ -0,0 +1,17 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class ActionAclRequiredException + * + * Thrown by AbstractACLAction when an action requires that the ACL subsystem is + * enabled but it isn't. You should not use it + * + * The message will NOT be shown to the enduser + * + * @package dokuwiki\Action\Exception + */ +class ActionAclRequiredException extends ActionException { + +} diff --git a/inc/Action/Exception/ActionDisabledException.php b/inc/Action/Exception/ActionDisabledException.php new file mode 100644 index 0000000000000000000000000000000000000000..40a0c7dd70fdc1f3c8a6c2066ec6ce3e83e15ae9 --- /dev/null +++ b/inc/Action/Exception/ActionDisabledException.php @@ -0,0 +1,17 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class ActionDisabledException + * + * Thrown when the requested action has been disabled. Eg. through the 'disableactions' + * config setting. You should probably not use it. + * + * The message will NOT be shown to the enduser, but a generic information will be shown. + * + * @package dokuwiki\Action\Exception + */ +class ActionDisabledException extends ActionException { + +} diff --git a/inc/Action/Exception/ActionException.php b/inc/Action/Exception/ActionException.php new file mode 100644 index 0000000000000000000000000000000000000000..381584c15b483c7901ba2efd07d156c7e5d74eaf --- /dev/null +++ b/inc/Action/Exception/ActionException.php @@ -0,0 +1,66 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class ActionException + * + * This exception and its subclasses signal that the current action should be + * aborted and a different action should be used instead. The new action can + * be given as parameter in the constructor. Defaults to 'show' + * + * The message will NOT be shown to the enduser + * + * @package dokuwiki\Action\Exception + */ +class ActionException extends \Exception { + + /** @var string the new action */ + protected $newaction; + + /** @var bool should the exception's message be shown to the user? */ + protected $displayToUser = false; + + /** + * ActionException constructor. + * + * When no new action is given 'show' is assumed. For requests that originated in a POST, + * a 'redirect' is used which will cause a redirect to the 'show' action. + * + * @param string|null $newaction the action that should be used next + * @param string $message optional message, will not be shown except for some dub classes + */ + public function __construct($newaction = null, $message = '') { + global $INPUT; + parent::__construct($message); + if(is_null($newaction)) { + if(strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post') { + $newaction = 'redirect'; + } else { + $newaction = 'show'; + } + } + + $this->newaction = $newaction; + } + + /** + * Returns the action to use next + * + * @return string + */ + public function getNewAction() { + return $this->newaction; + } + + /** + * Should this Exception's message be shown to the user? + * + * @param null|bool $set when null is given, the current setting is not changed + * @return bool + */ + public function displayToUser($set = null) { + if(!is_null($set)) $this->displayToUser = $set; + return $set; + } +} diff --git a/inc/Action/Exception/ActionUserRequiredException.php b/inc/Action/Exception/ActionUserRequiredException.php new file mode 100644 index 0000000000000000000000000000000000000000..aab06cca11fd4f6be10bc59cdd4ae2ac407df329 --- /dev/null +++ b/inc/Action/Exception/ActionUserRequiredException.php @@ -0,0 +1,17 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class ActionUserRequiredException + * + * Thrown by AbstractUserAction when an action requires that a user is logged + * in but it isn't. You should not use it. + * + * The message will NOT be shown to the enduser + * + * @package dokuwiki\Action\Exception + */ +class ActionUserRequiredException extends ActionException { + +} diff --git a/inc/Action/Exception/FatalException.php b/inc/Action/Exception/FatalException.php new file mode 100644 index 0000000000000000000000000000000000000000..5f2516fa2edd0304a98b41dd1a3dbe7d6dbc3bbe --- /dev/null +++ b/inc/Action/Exception/FatalException.php @@ -0,0 +1,29 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class FatalException + * + * A fatal exception during handling the action + * + * Will abort all handling and display some info to the user. The HTTP status code + * can be defined. + * + * @package dokuwiki\Action\Exception + */ +class FatalException extends \Exception { + + protected $status; + + /** + * FatalException constructor. + * + * @param string $message the message to send + * @param int $status the HTTP status to send + * @param null|\Exception $previous previous exception + */ + public function __construct($message = 'A fatal error occured', $status = 500, $previous = null) { + parent::__construct($message, $status, $previous); + } +} diff --git a/inc/Action/Exception/NoActionException.php b/inc/Action/Exception/NoActionException.php new file mode 100644 index 0000000000000000000000000000000000000000..1c4e4d0944ebe6402b573ae5198dd5d75f8e59c0 --- /dev/null +++ b/inc/Action/Exception/NoActionException.php @@ -0,0 +1,15 @@ +<?php + +namespace dokuwiki\Action\Exception; + +/** + * Class NoActionException + * + * Thrown in the ActionRouter when a wanted action can not be found. Triggers + * the unknown action event + * + * @package dokuwiki\Action\Exception + */ +class NoActionException extends \Exception { + +} diff --git a/inc/Action/Export.php b/inc/Action/Export.php new file mode 100644 index 0000000000000000000000000000000000000000..1eec27ec3a260e5677cfe684cce59b7f80d79526 --- /dev/null +++ b/inc/Action/Export.php @@ -0,0 +1,112 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Export + * + * Handle exporting by calling the appropriate renderer + * + * @package dokuwiki\Action + */ +class Export extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** + * Export a wiki page for various formats + * + * Triggers ACTION_EXPORT_POSTPROCESS + * + * Event data: + * data['id'] -- page id + * data['mode'] -- requested export mode + * data['headers'] -- export headers + * data['output'] -- export output + * + * @author Andreas Gohr <andi@splitbrain.org> + * @author Michael Klier <chi@chimeric.de> + * @inheritdoc + */ + public function preProcess() { + global $ID; + global $REV; + global $conf; + global $lang; + + $pre = ''; + $post = ''; + $headers = array(); + + // search engines: never cache exported docs! (Google only currently) + $headers['X-Robots-Tag'] = 'noindex'; + + $mode = substr($this->actionname, 7); + switch($mode) { + case 'raw': + $headers['Content-Type'] = 'text/plain; charset=utf-8'; + $headers['Content-Disposition'] = 'attachment; filename=' . noNS($ID) . '.txt'; + $output = rawWiki($ID, $REV); + break; + case 'xhtml': + $pre .= '<!DOCTYPE html>' . DOKU_LF; + $pre .= '<html lang="' . $conf['lang'] . '" dir="' . $lang['direction'] . '">' . DOKU_LF; + $pre .= '<head>' . DOKU_LF; + $pre .= ' <meta charset="utf-8" />' . DOKU_LF; // FIXME improve wrapper + $pre .= ' <title>' . $ID . '</title>' . DOKU_LF; + + // get metaheaders + ob_start(); + tpl_metaheaders(); + $pre .= ob_get_clean(); + + $pre .= '</head>' . DOKU_LF; + $pre .= '<body>' . DOKU_LF; + $pre .= '<div class="dokuwiki export">' . DOKU_LF; + + // get toc + $pre .= tpl_toc(true); + + $headers['Content-Type'] = 'text/html; charset=utf-8'; + $output = p_wiki_xhtml($ID, $REV, false); + + $post .= '</div>' . DOKU_LF; + $post .= '</body>' . DOKU_LF; + $post .= '</html>' . DOKU_LF; + break; + case 'xhtmlbody': + $headers['Content-Type'] = 'text/html; charset=utf-8'; + $output = p_wiki_xhtml($ID, $REV, false); + break; + default: + $output = p_cached_output(wikiFN($ID, $REV), $mode, $ID); + $headers = p_get_metadata($ID, "format $mode"); + break; + } + + // prepare event data + $data = array(); + $data['id'] = $ID; + $data['mode'] = $mode; + $data['headers'] = $headers; + $data['output'] =& $output; + + trigger_event('ACTION_EXPORT_POSTPROCESS', $data); + + if(!empty($data['output'])) { + if(is_array($data['headers'])) foreach($data['headers'] as $key => $val) { + header("$key: $val"); + } + print $pre . $data['output'] . $post; + exit; + } + + throw new ActionAbort(); + } + +} diff --git a/inc/Action/Index.php b/inc/Action/Index.php new file mode 100644 index 0000000000000000000000000000000000000000..c87a3f89cd97ace23baffae2d5d83346084b25d6 --- /dev/null +++ b/inc/Action/Index.php @@ -0,0 +1,25 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Index + * + * Show the human readable sitemap. Do not confuse with Sitemap + * + * @package dokuwiki\Action + */ +class Index extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function tplContent() { + global $IDX; + html_index($IDX); + } + +} diff --git a/inc/Action/Locked.php b/inc/Action/Locked.php new file mode 100644 index 0000000000000000000000000000000000000000..3ff2c5b8016be2977978d8dcdefd6f94a2ffe73d --- /dev/null +++ b/inc/Action/Locked.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Locked + * + * Show a locked screen when a page is locked + * + * @package dokuwiki\Action + */ +class Locked extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function tplContent() { + html_locked(); + } + +} diff --git a/inc/Action/Login.php b/inc/Action/Login.php new file mode 100644 index 0000000000000000000000000000000000000000..6e4aeb01ab2900515fb6331f65f9ac7e571852a2 --- /dev/null +++ b/inc/Action/Login.php @@ -0,0 +1,36 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Login + * + * The login form. Actual logins are handled in inc/auth.php + * + * @package dokuwiki\Action + */ +class Login extends AbstractAclAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + global $INPUT; + parent::checkPermissions(); + if($INPUT->server->has('REMOTE_USER')) { + // nothing to do + throw new ActionException(); + } + } + + /** @inheritdoc */ + public function tplContent() { + html_login(); + } + +} diff --git a/inc/Action/Logout.php b/inc/Action/Logout.php new file mode 100644 index 0000000000000000000000000000000000000000..2abf968f6203952d52c9fa0f7b14c2f4c5ee24aa --- /dev/null +++ b/inc/Action/Logout.php @@ -0,0 +1,50 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionDisabledException; +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Logout + * + * Log out a user + * + * @package dokuwiki\Action + */ +class Logout extends AbstractUserAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + /** @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + if(!$auth->canDo('logout')) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + global $ID; + global $INPUT; + + // when logging out during an edit session, unlock the page + $lockedby = checklock($ID); + if($lockedby == $INPUT->server->str('REMOTE_USER')) { + unlock($ID); + } + + // do the logout stuff and redirect to login + auth_logoff(); + send_redirect(wl($ID, array('do' => 'login'))); + + // should never be reached + throw new ActionException('login'); + } + +} diff --git a/inc/Action/Media.php b/inc/Action/Media.php new file mode 100644 index 0000000000000000000000000000000000000000..77a2a6f0d45cbd3d21c0d0d60dca2c166fac70c3 --- /dev/null +++ b/inc/Action/Media.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Media + * + * The full screen media manager + * + * @package dokuwiki\Action + */ +class Media extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function tplContent() { + tpl_media(); + } + +} diff --git a/inc/Action/Plugin.php b/inc/Action/Plugin.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e16bf875520e10df3bff225a7b76f1e78a041c --- /dev/null +++ b/inc/Action/Plugin.php @@ -0,0 +1,32 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Plugin + * + * Used to run action plugins + * + * @package dokuwiki\Action + */ +class Plugin extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** + * Outputs nothing but a warning unless an action plugin overwrites it + * + * @inheritdoc + * @triggers TPL_ACT_UNKNOWN + */ + public function tplContent() { + $evt = new \Doku_Event('TPL_ACT_UNKNOWN', $this->actionname); + if($evt->advise_before()) { + msg('Failed to handle action: ' . hsc($this->actionname), -1); + } + $evt->advise_after(); + } +} diff --git a/inc/Action/Preview.php b/inc/Action/Preview.php new file mode 100644 index 0000000000000000000000000000000000000000..850b2049afed7197a7884e6c648d346c2ab3334f --- /dev/null +++ b/inc/Action/Preview.php @@ -0,0 +1,58 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Preview + * + * preview during editing + * + * @package dokuwiki\Action + */ +class Preview extends Edit { + + /** @inheritdoc */ + public function preProcess() { + header('X-XSS-Protection: 0'); + $this->savedraft(); + parent::preProcess(); + } + + /** @inheritdoc */ + public function tplContent() { + global $TEXT; + html_edit(); + html_show($TEXT); + } + + /** + * Saves a draft on preview + */ + protected function savedraft() { + global $INFO; + global $ID; + global $INPUT; + global $conf; + + if(!$conf['usedraft']) return; + if(!$INPUT->post->has('wikitext')) return; + + // ensure environment (safeguard when used via AJAX) + assert(isset($INFO['client']), 'INFO.client should have been set'); + assert(isset($ID), 'ID should have been set'); + + $draft = array( + 'id' => $ID, + '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'); + if(io_saveFile($cname, serialize($draft))) { + $INFO['draft'] = $cname; + } + } + +} diff --git a/inc/Action/Profile.php b/inc/Action/Profile.php new file mode 100644 index 0000000000000000000000000000000000000000..1ebe51fec700a7f0d3db52b28ab1935609671e78 --- /dev/null +++ b/inc/Action/Profile.php @@ -0,0 +1,45 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionDisabledException; + +/** + * Class Profile + * + * Handle the profile form + * + * @package dokuwiki\Action + */ +class Profile extends AbstractUserAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + /** @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + if(!$auth->canDo('Profile')) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + global $lang; + if(updateprofile()) { + msg($lang['profchanged'], 1); + throw new ActionAbort('show'); + } + } + + /** @inheritdoc */ + public function tplContent() { + html_updateprofile(); + } + +} diff --git a/inc/Action/ProfileDelete.php b/inc/Action/ProfileDelete.php new file mode 100644 index 0000000000000000000000000000000000000000..5be5ff57870660f06e5c0ed5ae97edbe2b2eb269 --- /dev/null +++ b/inc/Action/ProfileDelete.php @@ -0,0 +1,42 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionDisabledException; + +/** + * Class ProfileDelete + * + * Delete a user account + * + * @package dokuwiki\Action + */ +class ProfileDelete extends AbstractUserAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + /** @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + if(!$auth->canDo('delUser')) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + global $lang; + if(auth_deleteprofile()) { + msg($lang['profdeleted'], 1); + throw new ActionAbort('show'); + } else { + throw new ActionAbort('profile'); + } + } + +} diff --git a/inc/Action/Recent.php b/inc/Action/Recent.php new file mode 100644 index 0000000000000000000000000000000000000000..4fb3e41544aed46413fa5967bef9c32450a2b8df --- /dev/null +++ b/inc/Action/Recent.php @@ -0,0 +1,34 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Recent + * + * The recent changes view + * + * @package dokuwiki\Action + */ +class Recent extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function preProcess() { + global $INPUT; + $show_changes = $INPUT->str('show_changes'); + if(!empty($show_changes)) { + set_doku_pref('show_changes', $show_changes); + } + } + + /** @inheritdoc */ + public function tplContent() { + global $INPUT; + html_recent((int) $INPUT->extract('first')->int('first')); + } + +} diff --git a/inc/Action/Recover.php b/inc/Action/Recover.php new file mode 100644 index 0000000000000000000000000000000000000000..7966396b90bb28ed94b2dea95660f91ee80b5c1f --- /dev/null +++ b/inc/Action/Recover.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Recover + * + * Recover a draft + * + * @package dokuwiki\Action + */ +class Recover extends AbstractAliasAction { + + /** @inheritdoc */ + public function preProcess() { + throw new ActionAbort('edit'); + } + +} diff --git a/inc/Action/Redirect.php b/inc/Action/Redirect.php new file mode 100644 index 0000000000000000000000000000000000000000..2e28f45508a4822867d893dd112ff72a5b3b72a9 --- /dev/null +++ b/inc/Action/Redirect.php @@ -0,0 +1,64 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Redirect + * + * Used to redirect to the current page with the last edited section as a target if found + * + * @package dokuwiki\Action + */ +class Redirect extends AbstractAliasAction { + + /** + * Redirect to the show action, trying to jump to the previously edited section + * + * @triggers ACTION_SHOW_REDIRECT + * @throws ActionAbort + */ + public function preProcess() { + global $PRE; + global $TEXT; + global $INPUT; + global $ID; + global $ACT; + + $opts = array( + 'id' => $ID, + 'preact' => $ACT + ); + //get section name when coming from section edit + if($INPUT->has('hid')) { + // Use explicitly transmitted header id + $opts['fragment'] = $INPUT->str('hid'); + } else if($PRE && preg_match('/^\s*==+([^=\n]+)/', $TEXT, $match)) { + // Fallback to old mechanism + $check = false; //Byref + $opts['fragment'] = sectionID($match[0], $check); + } + + // execute the redirect + trigger_event('ACTION_SHOW_REDIRECT', $opts, array($this, 'redirect')); + + // should never be reached + throw new ActionAbort('show'); + } + + /** + * Execute the redirect + * + * Default action for ACTION_SHOW_REDIRECT + * + * @param array $opts id and fragment for the redirect and the preact + */ + public function redirect($opts) { + $go = wl($opts['id'], '', true); + if(isset($opts['fragment'])) $go .= '#' . $opts['fragment']; + + //show it + send_redirect($go); + } +} diff --git a/inc/Action/Register.php b/inc/Action/Register.php new file mode 100644 index 0000000000000000000000000000000000000000..c97d3f8582d0f0f6c6f9467c17476a1fe47e3051 --- /dev/null +++ b/inc/Action/Register.php @@ -0,0 +1,45 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionDisabledException; + +/** + * Class Register + * + * Self registering a new user + * + * @package dokuwiki\Action + */ +class Register extends AbstractAclAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + /** @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + global $conf; + if(isset($conf['openregister']) && !$conf['openregister']) throw new ActionDisabledException(); + if(!$auth->canDo('addUser')) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + if(register()) { // FIXME could be moved from auth to here + throw new ActionAbort('login'); + } + } + + /** @inheritdoc */ + public function tplContent() { + html_register(); + } + +} diff --git a/inc/Action/Resendpwd.php b/inc/Action/Resendpwd.php new file mode 100644 index 0000000000000000000000000000000000000000..80f05e05625ed1eb0df841c51a5e7f3b7266b22b --- /dev/null +++ b/inc/Action/Resendpwd.php @@ -0,0 +1,172 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionDisabledException; + +/** + * Class Resendpwd + * + * Handle password recovery + * + * @package dokuwiki\Action + */ +class Resendpwd extends AbstractAclAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + /** @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + global $conf; + if(isset($conf['resendpasswd']) && !$conf['resendpasswd']) throw new ActionDisabledException(); //legacy option + if(!$auth->canDo('modPass')) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + if($this->resendpwd()) { + throw new ActionAbort('login'); + } + } + + /** + * Send a new password + * + * This function handles both phases of the password reset: + * + * - handling the first request of password reset + * - validating the password reset auth token + * + * @author Benoit Chesneau <benoit@bchesneau.info> + * @author Chris Smith <chris@jalakai.co.uk> + * @author Andreas Gohr <andi@splitbrain.org> + * @fixme this should be split up into multiple methods + * @return bool true on success, false on any error + */ + protected function resendpwd() { + global $lang; + global $conf; + /* @var \DokuWiki_Auth_Plugin $auth */ + global $auth; + global $INPUT; + + if(!actionOK('resendpwd')) { + msg($lang['resendna'], -1); + return false; + } + + $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth')); + + 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); + $INPUT->remove('pwauth'); + return false; + } + // token is only valid for 3 days + if((time() - filemtime($tfile)) > (3 * 60 * 60 * 24)) { + msg($lang['resendpwdbadauth'], -1); + $INPUT->remove('pwauth'); + @unlink($tfile); + return false; + } + + $user = io_readfile($tfile); + $userinfo = $auth->getUserData($user, $requireGroups = false); + if(!$userinfo['mail']) { + msg($lang['resendpwdnouser'], -1); + return false; + } + + if(!$conf['autopasswd']) { // we let the user choose a password + $pass = $INPUT->str('pass'); + + // password given correctly? + if(!$pass) return false; + if($pass != $INPUT->str('passchk')) { + msg($lang['regbadpass'], -1); + return false; + } + + // change it + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg($lang['proffail'], -1); + return false; + } + + } else { // autogenerate the password and send by mail + + $pass = auth_pwgen($user); + if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) { + msg($lang['proffail'], -1); + return false; + } + + if(auth_sendPassword($user, $pass)) { + msg($lang['resendpwdsuccess'], 1); + } else { + msg($lang['regmailfail'], -1); + } + } + + @unlink($tfile); + return true; + + } else { + // we're in request phase + + if(!$INPUT->post->bool('save')) return false; + + if(!$INPUT->post->str('login')) { + msg($lang['resendpwdmissing'], -1); + return false; + } else { + $user = trim($auth->cleanUser($INPUT->post->str('login'))); + } + + $userinfo = $auth->getUserData($user, $requireGroups = false); + if(!$userinfo['mail']) { + msg($lang['resendpwdnouser'], -1); + return false; + } + + // generate auth token + $token = md5(auth_randombytes(16)); // random secret + $tfile = $conf['cachedir'] . '/' . $token{0} . '/' . $token . '.pwauth'; + $url = wl('', array('do' => 'resendpwd', 'pwauth' => $token), true, '&'); + + io_saveFile($tfile, $user); + + $text = rawLocale('pwconfirm'); + $trep = array( + '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); + } + return true; + } + // never reached + } + +} diff --git a/inc/Action/Revert.php b/inc/Action/Revert.php new file mode 100644 index 0000000000000000000000000000000000000000..ca35374f251858ae3e7148f4b8cefecafd403034 --- /dev/null +++ b/inc/Action/Revert.php @@ -0,0 +1,65 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Revert + * + * Quick revert to an old revision + * + * @package dokuwiki\Action + */ +class Revert extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + if($INFO['ismanager']) { + return AUTH_EDIT; + } else { + return AUTH_ADMIN; + } + } + + /** + * + * @inheritdoc + * @throws ActionAbort + * @throws ActionException + * @todo check for writability of the current page ($INFO might do it wrong and check the attic version) + */ + public function preProcess() { + if(!checkSecurityToken()) throw new ActionException(); + + global $ID; + global $REV; + global $lang; + + // when no revision is given, delete current one + // FIXME this feature is not exposed in the GUI currently + $text = ''; + $sum = $lang['deleted']; + if($REV) { + $text = rawWiki($ID, $REV); + if(!$text) throw new ActionException(); //something went wrong + $sum = sprintf($lang['restored'], dformat($REV)); + } + + // spam check + if(checkwordblock($text)) { + msg($lang['wordblock'], -1); + throw new ActionException('edit'); + } + + saveWikiText($ID, $text, $sum, false); + msg($sum, 1); + $REV = ''; + + // continue with draftdel -> redirect -> show + throw new ActionAbort('draftdel'); + } + +} diff --git a/inc/Action/Revisions.php b/inc/Action/Revisions.php new file mode 100644 index 0000000000000000000000000000000000000000..b8db531c78ae88d69dbfd5b12c68ee717ef872aa --- /dev/null +++ b/inc/Action/Revisions.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Revisions + * + * Show the list of old revisions of the current page + * + * @package dokuwiki\Action + */ +class Revisions extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function tplContent() { + global $INPUT; + html_revisions($INPUT->int('first')); + } +} diff --git a/inc/Action/Save.php b/inc/Action/Save.php new file mode 100644 index 0000000000000000000000000000000000000000..0b247298303e67d422914458b3dabd929113d7cc --- /dev/null +++ b/inc/Action/Save.php @@ -0,0 +1,60 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionException; + +/** + * Class Save + * + * Save at the end of an edit session + * + * @package dokuwiki\Action + */ +class Save extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + global $INFO; + if($INFO['exists']) { + return AUTH_EDIT; + } else { + return AUTH_CREATE; + } + } + + /** @inheritdoc */ + public function preProcess() { + if(!checkSecurityToken()) throw new ActionException('preview'); + + global $ID; + global $DATE; + global $PRE; + global $TEXT; + global $SUF; + global $SUM; + global $lang; + global $INFO; + global $INPUT; + + //spam check + if(checkwordblock()) { + msg($lang['wordblock'], -1); + throw new ActionException('edit'); + } + //conflict check + if($DATE != 0 && $INFO['meta']['date']['modified'] > $DATE) { + throw new ActionException('conflict'); + } + + //save it + saveWikiText($ID, con($PRE, $TEXT, $SUF, true), $SUM, $INPUT->bool('minor')); //use pretty mode for con + //unlock it + unlock($ID); + + // continue with draftdel -> redirect -> show + throw new ActionAbort('draftdel'); + } + +} diff --git a/inc/Action/Search.php b/inc/Action/Search.php new file mode 100644 index 0000000000000000000000000000000000000000..d4833f4539c7e828fc4b79003e596cb7a6a2bdde --- /dev/null +++ b/inc/Action/Search.php @@ -0,0 +1,37 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; + +/** + * Class Search + * + * Search for pages and content + * + * @package dokuwiki\Action + */ +class Search extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** + * we only search if a search word was given + * + * @inheritdoc + */ + public function checkPermissions() { + parent::checkPermissions(); + global $QUERY; + $s = cleanID($QUERY); + if($s === '') throw new ActionAbort(); + } + + /** @inheritdoc */ + public function tplContent() { + html_search(); + } +} diff --git a/inc/Action/Show.php b/inc/Action/Show.php new file mode 100644 index 0000000000000000000000000000000000000000..6dbe9a15c253755484c7fc384bd4e1e660f46374 --- /dev/null +++ b/inc/Action/Show.php @@ -0,0 +1,30 @@ +<?php +/** + * Created by IntelliJ IDEA. + * User: andi + * Date: 2/10/17 + * Time: 4:32 PM + */ + +namespace dokuwiki\Action; + +/** + * Class Show + * + * The default action of showing a page + * + * @package dokuwiki\Action + */ +class Show extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function tplContent() { + html_show(); + } + +} diff --git a/inc/Action/Sitemap.php b/inc/Action/Sitemap.php new file mode 100644 index 0000000000000000000000000000000000000000..025c5153c9d59a4f7bad216fc5554f8114ef08b4 --- /dev/null +++ b/inc/Action/Sitemap.php @@ -0,0 +1,65 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\FatalException; + +/** + * Class Sitemap + * + * Generate an XML sitemap for search engines. Do not confuse with Index + * + * @package dokuwiki\Action + */ +class Sitemap extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_NONE; + } + + /** + * Handle sitemap delivery + * + * @author Michael Hamann <michael@content-space.de> + * @throws FatalException + * @inheritdoc + */ + public function preProcess() { + global $conf; + + if($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) { + throw new FatalException(404, 'Sitemap generation is disabled'); + } + + $sitemap = \Sitemapper::getFilePath(); + if(\Sitemapper::sitemapIsCompressed()) { + $mime = 'application/x-gzip'; + } else { + $mime = 'application/xml; charset=utf-8'; + } + + // Check if sitemap file exists, otherwise create it + if(!is_readable($sitemap)) { + \Sitemapper::generate(); + } + + if(is_readable($sitemap)) { + // Send headers + header('Content-Type: ' . $mime); + header('Content-Disposition: attachment; filename=' . utf8_basename($sitemap)); + + http_conditionalRequest(filemtime($sitemap)); + + // Send file + //use x-sendfile header to pass the delivery to compatible webservers + http_sendfile($sitemap); + + readfile($sitemap); + exit; + } + + throw new FatalException(500, 'Could not read the sitemap file - bad permissions?'); + } + +} diff --git a/inc/Action/Source.php b/inc/Action/Source.php new file mode 100644 index 0000000000000000000000000000000000000000..9b03fe98bfd523fa37877b00a032a1b9d70608e1 --- /dev/null +++ b/inc/Action/Source.php @@ -0,0 +1,36 @@ +<?php + +namespace dokuwiki\Action; + +/** + * Class Source + * + * Show the source of a page + * + * @package dokuwiki\Action + */ +class Source extends AbstractAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function preProcess() { + global $TEXT; + global $INFO; + global $ID; + global $REV; + + if($INFO['exists']) { + $TEXT = rawWiki($ID, $REV); + } + } + + /** @inheritdoc */ + public function tplContent() { + html_edit(); + } + +} diff --git a/inc/Action/Subscribe.php b/inc/Action/Subscribe.php new file mode 100644 index 0000000000000000000000000000000000000000..94920c428784dc332abf2d557da296647eec6ece --- /dev/null +++ b/inc/Action/Subscribe.php @@ -0,0 +1,166 @@ +<?php + +namespace dokuwiki\Action; + +use dokuwiki\Action\Exception\ActionAbort; +use dokuwiki\Action\Exception\ActionDisabledException; + +/** + * Class Subscribe + * + * E-Mail subscription handling + * + * @package dokuwiki\Action + */ +class Subscribe extends AbstractUserAction { + + /** @inheritdoc */ + public function minimumPermission() { + return AUTH_READ; + } + + /** @inheritdoc */ + public function checkPermissions() { + parent::checkPermissions(); + + global $conf; + if(isset($conf['subscribers']) && !$conf['subscribers']) throw new ActionDisabledException(); + } + + /** @inheritdoc */ + public function preProcess() { + try { + $this->handleSubscribeData(); + } catch(ActionAbort $e) { + throw $e; + } catch(\Exception $e) { + msg($e->getMessage(), -1); + } + } + + /** @inheritdoc */ + public function tplContent() { + tpl_subscribe(); + } + + /** + * Handle page 'subscribe' + * + * @author Adrian Lang <lang@cosmocode.de> + * @throws \Exception if (un)subscribing fails + * @throws ActionAbort when (un)subscribing worked + */ + protected function handleSubscribeData() { + global $lang; + global $INFO; + global $INPUT; + + // get and preprocess data. + $params = array(); + foreach(array('target', 'style', 'action') as $param) { + if($INPUT->has("sub_$param")) { + $params[$param] = $INPUT->str("sub_$param"); + } + } + + // any action given? if not just return and show the subscription page + if(empty($params['action']) || !checkSecurityToken()) return; + + // Handle POST data, may throw exception. + trigger_event('ACTION_HANDLE_SUBSCRIBE', $params, array($this, 'handlePostData')); + + $target = $params['target']; + $style = $params['style']; + $action = $params['action']; + + // Perform action. + $sub = new \Subscription(); + if($action == 'unsubscribe') { + $ok = $sub->remove($target, $INPUT->server->str('REMOTE_USER'), $style); + } else { + $ok = $sub->add($target, $INPUT->server->str('REMOTE_USER'), $style); + } + + if($ok) { + msg( + sprintf( + $lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']), + prettyprint_id($target) + ), 1 + ); + throw new ActionAbort('redirect'); + } else { + throw new \Exception( + sprintf( + $lang["subscr_{$action}_error"], + hsc($INFO['userinfo']['name']), + prettyprint_id($target) + ) + ); + } + } + + /** + * Validate POST data + * + * Validates POST data for a subscribe or unsubscribe request. This is the + * default action for the event ACTION_HANDLE_SUBSCRIBE. + * + * @author Adrian Lang <lang@cosmocode.de> + * + * @param array &$params the parameters: target, style and action + * @throws \Exception + */ + public function handlePostData(&$params) { + global $INFO; + global $lang; + global $INPUT; + + // Get and validate parameters. + if(!isset($params['target'])) { + throw new \Exception('no subscription target given'); + } + $target = $params['target']; + $valid_styles = array('every', 'digest'); + if(substr($target, -1, 1) === ':') { + // Allow “list†subscribe style since the target is a namespace. + $valid_styles[] = 'list'; + } + $style = valid_input_set( + 'style', $valid_styles, $params, + 'invalid subscription style given' + ); + $action = valid_input_set( + 'action', array('subscribe', 'unsubscribe'), + $params, 'invalid subscription action given' + ); + + // Check other conditions. + if($action === 'subscribe') { + if($INFO['userinfo']['mail'] === '') { + throw new \Exception($lang['subscr_subscribe_noaddress']); + } + } elseif($action === 'unsubscribe') { + $is = false; + foreach($INFO['subscribed'] as $subscr) { + if($subscr['target'] === $target) { + $is = true; + } + } + if($is === false) { + throw new \Exception( + sprintf( + $lang['subscr_not_subscribed'], + $INPUT->server->str('REMOTE_USER'), + prettyprint_id($target) + ) + ); + } + // subscription_set deletes a subscription if style = null. + $style = null; + } + + $params = compact('target', 'style', 'action'); + } + +} diff --git a/inc/ActionRouter.php b/inc/ActionRouter.php new file mode 100644 index 0000000000000000000000000000000000000000..7e6fddd16ec10a3925e1b68db75c8cd75703892c --- /dev/null +++ b/inc/ActionRouter.php @@ -0,0 +1,228 @@ +<?php + +namespace dokuwiki; + +use dokuwiki\Action\AbstractAction; +use dokuwiki\Action\Exception\ActionDisabledException; +use dokuwiki\Action\Exception\ActionException; +use dokuwiki\Action\Exception\FatalException; +use dokuwiki\Action\Exception\NoActionException; +use dokuwiki\Action\Plugin; + +/** + * Class ActionRouter + * @package dokuwiki + */ +class ActionRouter { + + /** @var AbstractAction */ + protected $action; + + /** @var ActionRouter */ + protected static $instance = null; + + /** @var int transition counter */ + protected $transitions = 0; + + /** maximum loop */ + const MAX_TRANSITIONS = 5; + + /** @var string[] the actions disabled in the configuration */ + protected $disabled; + + /** + * ActionRouter constructor. Singleton, thus protected! + * + * Sets up the correct action based on the $ACT global. Writes back + * the selected action to $ACT + */ + protected function __construct() { + global $ACT; + global $conf; + + $this->disabled = explode(',', $conf['disableactions']); + $this->disabled = array_map('trim', $this->disabled); + $this->transitions = 0; + + $ACT = act_clean($ACT); + $this->setupAction($ACT); + $ACT = $this->action->getActionName(); + } + + /** + * Get the singleton instance + * + * @param bool $reinit + * @return ActionRouter + */ + public static function getInstance($reinit = false) { + if((self::$instance === null) || $reinit) { + self::$instance = new ActionRouter(); + } + return self::$instance; + } + + /** + * Setup the given action + * + * Instantiates the right class, runs permission checks and pre-processing and + * sets $action + * + * @param string $actionname this is passed as a reference to $ACT, for plugin backward compatibility + * @triggers ACTION_ACT_PREPROCESS + */ + protected function setupAction(&$actionname) { + $presetup = $actionname; + + try { + // give plugins an opportunity to process the actionname + $evt = new \Doku_Event('ACTION_ACT_PREPROCESS', $actionname); + if ($evt->advise_before()) { + $this->action = $this->loadAction($actionname); + $this->checkAction($this->action); + $this->action->preProcess(); + } else { + // event said the action should be kept, assume action plugin will handle it later + $this->action = new Plugin($actionname); + } + $evt->advise_after(); + + } catch(ActionException $e) { + // we should have gotten a new action + $actionname = $e->getNewAction(); + + // this one should trigger a user message + if(is_a($e, ActionDisabledException::class)) { + msg('Action disabled: ' . hsc($presetup), -1); + } + + // some actions may request the display of a message + if($e->displayToUser()) { + msg(hsc($e->getMessage()), -1); + } + + // do setup for new action + $this->transitionAction($presetup, $actionname); + + } catch(NoActionException $e) { + msg('Action unknown: ' . hsc($actionname), -1); + $actionname = 'show'; + $this->transitionAction($presetup, $actionname); + } catch(\Exception $e) { + $this->handleFatalException($e); + } + } + + /** + * Transitions from one action to another + * + * Basically just calls setupAction() again but does some checks before. + * + * @param string $from current action name + * @param string $to new action name + * @param null|ActionException $e any previous exception that caused the transition + */ + protected function transitionAction($from, $to, $e = null) { + $this->transitions++; + + // no infinite recursion + if($from == $to) { + $this->handleFatalException(new FatalException('Infinite loop in actions', 500, $e)); + } + + // larger loops will be caught here + if($this->transitions >= self::MAX_TRANSITIONS) { + $this->handleFatalException(new FatalException('Maximum action transitions reached', 500, $e)); + } + + // do the recursion + $this->setupAction($to); + } + + /** + * Aborts all processing with a message + * + * When a FataException instanc is passed, the code is treated as Status code + * + * @param \Exception|FatalException $e + * @throws FatalException during unit testing + */ + protected function handleFatalException(\Exception $e) { + if(is_a($e, FatalException::class)) { + http_status($e->getCode()); + } else { + http_status(500); + } + if(defined('DOKU_UNITTEST')) { + throw $e; + } + $msg = 'Something unforseen has happened: ' . $e->getMessage(); + nice_die(hsc($msg)); + } + + /** + * Load the given action + * + * This translates the given name to a class name by uppercasing the first letter. + * Underscores translate to camelcase names. For actions with underscores, the different + * parts are removed beginning from the end until a matching class is found. The instatiated + * Action will always have the full original action set as Name + * + * Example: 'export_raw' -> ExportRaw then 'export' -> 'Export' + * + * @param $actionname + * @return AbstractAction + * @throws NoActionException + */ + public function loadAction($actionname) { + $actionname = strtolower($actionname); // FIXME is this needed here? should we run a cleanup somewhere else? + $parts = explode('_', $actionname); + while(!empty($parts)) { + $load = join('_', $parts); + $class = 'dokuwiki\\Action\\' . str_replace('_', '', ucwords($load, '_')); + if(class_exists($class)) { + return new $class($actionname); + } + array_pop($parts); + } + + throw new NoActionException(); + } + + /** + * Execute all the checks to see if this action can be executed + * + * @param AbstractAction $action + * @throws ActionDisabledException + * @throws ActionException + */ + public function checkAction(AbstractAction $action) { + global $INFO; + global $ID; + + if(in_array($action->getActionName(), $this->disabled)) { + throw new ActionDisabledException(); + } + + $action->checkPermissions(); + + if(isset($INFO)) { + $perm = $INFO['perm']; + } else { + $perm = auth_quickaclcheck($ID); + } + + if($perm < $action->minimumPermission()) { + throw new ActionException('denied'); + } + } + + /** + * Returns the action handling the current request + * + * @return AbstractAction + */ + public function getAction() { + return $this->action; + } +} diff --git a/inc/Ajax.php b/inc/Ajax.php new file mode 100644 index 0000000000000000000000000000000000000000..191d8f8ba98ccce1f17aa3eeac684d62720e6332 --- /dev/null +++ b/inc/Ajax.php @@ -0,0 +1,446 @@ +<?php + +namespace dokuwiki; + +/** + * Manage all builtin AJAX calls + * + * @todo The calls should be refactored out to their own proper classes + * @package dokuwiki + */ +class Ajax { + + /** + * Execute the given call + * + * @param string $call name of the ajax call + */ + public function __construct($call) { + $callfn = 'call_' . $call; + if(method_exists($this, $callfn)) { + $this->$callfn(); + } else { + $evt = new \Doku_Event('AJAX_CALL_UNKNOWN', $call); + if($evt->advise_before()) { + print "AJAX call '" . hsc($call) . "' unknown!\n"; + } else { + $evt->advise_after(); + unset($evt); + } + } + } + + /** + * Searches for matching pagenames + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + protected function call_qsearch() { + global $lang; + global $INPUT; + + $maxnumbersuggestions = 50; + + $query = $INPUT->post->str('q'); + if(empty($query)) $query = $INPUT->get->str('q'); + if(empty($query)) return; + + $query = urldecode($query); + + $data = ft_pageLookup($query, true, useHeading('navigation')); + + if(!count($data)) return; + + print '<strong>' . $lang['quickhits'] . '</strong>'; + print '<ul>'; + $counter = 0; + foreach($data as $id => $title) { + if(useHeading('navigation')) { + $name = $title; + } else { + $ns = getNS($id); + if($ns) { + $name = noNS($id) . ' (' . $ns . ')'; + } else { + $name = $id; + } + } + echo '<li>' . html_wikilink(':' . $id, $name) . '</li>'; + + $counter++; + if($counter > $maxnumbersuggestions) { + echo '<li>...</li>'; + break; + } + } + print '</ul>'; + } + + /** + * Support OpenSearch suggestions + * + * @link http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.0 + * @author Mike Frysinger <vapier@gentoo.org> + */ + protected function call_suggestions() { + global $INPUT; + + $query = cleanID($INPUT->post->str('q')); + if(empty($query)) $query = cleanID($INPUT->get->str('q')); + if(empty($query)) return; + + $data = ft_pageLookup($query); + if(!count($data)) return; + $data = array_keys($data); + + // limit results to 15 hits + $data = array_slice($data, 0, 15); + $data = array_map('trim', $data); + $data = array_map('noNS', $data); + $data = array_unique($data); + sort($data); + + /* now construct a json */ + $suggestions = array( + $query, // the original query + $data, // some suggestions + array(), // no description + array() // no urls + ); + $json = new \JSON(); + + header('Content-Type: application/x-suggestions+json'); + print $json->encode($suggestions); + } + + /** + * Refresh a page lock and save draft + * + * Andreas Gohr <andi@splitbrain.org> + */ + protected function call_lock() { + global $conf; + global $lang; + global $ID; + global $INFO; + global $INPUT; + + $ID = cleanID($INPUT->post->str('id')); + if(empty($ID)) return; + + $INFO = pageinfo(); + + if(!$INFO['writable']) { + echo 'Permission denied'; + return; + } + + if(!checklock($ID)) { + lock($ID); + echo 1; + } + + if($conf['usedraft'] && $INPUT->post->str('wikitext')) { + $client = $_SERVER['REMOTE_USER']; + if(!$client) $client = clientIP(true); + + $draft = array( + 'id' => $ID, + 'prefix' => substr($INPUT->post->str('prefix'), 0, -1), + 'text' => $INPUT->post->str('wikitext'), + 'suffix' => $INPUT->post->str('suffix'), + 'date' => $INPUT->post->int('date'), + 'client' => $client, + ); + $cname = getCacheName($draft['client'] . $ID, '.draft'); + if(io_saveFile($cname, serialize($draft))) { + echo $lang['draftdate'] . ' ' . dformat(); + } + } + + } + + /** + * Delete a draft + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + protected function call_draftdel() { + global $INPUT; + $id = cleanID($INPUT->str('id')); + if(empty($id)) return; + + $client = $_SERVER['REMOTE_USER']; + if(!$client) $client = clientIP(true); + + $cname = getCacheName($client . $id, '.draft'); + @unlink($cname); + } + + /** + * Return subnamespaces for the Mediamanager + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + protected function call_medians() { + global $conf; + global $INPUT; + + // wanted namespace + $ns = cleanID($INPUT->post->str('ns')); + $dir = utf8_encodeFN(str_replace(':', '/', $ns)); + + $lvl = count(explode(':', $ns)); + + $data = array(); + search($data, $conf['mediadir'], 'search_index', array('nofiles' => true), $dir); + foreach(array_keys($data) as $item) { + $data[$item]['level'] = $lvl + 1; + } + echo html_buildlist($data, 'idx', 'media_nstree_item', 'media_nstree_li'); + } + + /** + * Return list of files for the Mediamanager + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + protected function call_medialist() { + global $NS; + global $INPUT; + + $NS = cleanID($INPUT->post->str('ns')); + $sort = $INPUT->post->bool('recent') ? 'date' : 'natural'; + if($INPUT->post->str('do') == 'media') { + tpl_mediaFileList(); + } else { + tpl_mediaContent(true, $sort); + } + } + + /** + * Return the content of the right column + * (image details) for the Mediamanager + * + * @author Kate Arzamastseva <pshns@ukr.net> + */ + protected function call_mediadetails() { + global $IMG, $JUMPTO, $REV, $fullscreen, $INPUT; + $fullscreen = true; + require_once(DOKU_INC . 'lib/exe/mediamanager.php'); + + $image = ''; + if($INPUT->has('image')) $image = cleanID($INPUT->str('image')); + if(isset($IMG)) $image = $IMG; + if(isset($JUMPTO)) $image = $JUMPTO; + $rev = false; + if(isset($REV) && !$JUMPTO) $rev = $REV; + + html_msgarea(); + tpl_mediaFileDetails($image, $rev); + } + + /** + * Returns image diff representation for mediamanager + * + * @author Kate Arzamastseva <pshns@ukr.net> + */ + protected function call_mediadiff() { + global $NS; + global $INPUT; + + $image = ''; + if($INPUT->has('image')) $image = cleanID($INPUT->str('image')); + $NS = getNS($image); + $auth = auth_quickaclcheck("$NS:*"); + media_diff($image, $NS, $auth, true); + } + + /** + * Manages file uploads + * + * @author Kate Arzamastseva <pshns@ukr.net> + */ + protected function call_mediaupload() { + global $NS, $MSG, $INPUT; + + $id = ''; + if($_FILES['qqfile']['tmp_name']) { + $id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']); + } elseif($INPUT->get->has('qqfile')) { + $id = $INPUT->get->str('qqfile'); + } + + $id = cleanID($id); + + $NS = $INPUT->str('ns'); + $ns = $NS . ':' . getNS($id); + + $AUTH = auth_quickaclcheck("$ns:*"); + if($AUTH >= AUTH_UPLOAD) { + io_createNamespace("$ns:xxx", 'media'); + } + + if($_FILES['qqfile']['error']) unset($_FILES['qqfile']); + + $res = false; + if($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']); + if($INPUT->get->has('qqfile')) $res = media_upload_xhr($NS, $AUTH); + + if($res) { + $result = array( + 'success' => true, + 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS . ':' . $id), '&'), + 'id' => $NS . ':' . $id, + 'ns' => $NS + ); + } else { + $error = ''; + if(isset($MSG)) { + foreach($MSG as $msg) { + $error .= $msg['msg']; + } + } + $result = array( + 'error' => $error, + 'ns' => $NS + ); + } + $json = new \JSON; + header('Content-Type: application/json'); + echo $json->encode($result); + } + + /** + * Return sub index for index view + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + protected function call_index() { + global $conf; + global $INPUT; + + // wanted namespace + $ns = cleanID($INPUT->post->str('idx')); + $dir = utf8_encodeFN(str_replace(':', '/', $ns)); + + $lvl = count(explode(':', $ns)); + + $data = array(); + search($data, $conf['datadir'], 'search_index', array('ns' => $ns), $dir); + foreach(array_keys($data) as $item) { + $data[$item]['level'] = $lvl + 1; + } + echo html_buildlist($data, 'idx', 'html_list_index', 'html_li_index'); + } + + /** + * List matching namespaces and pages for the link wizard + * + * @author Andreas Gohr <gohr@cosmocode.de> + */ + protected function call_linkwiz() { + global $conf; + global $lang; + global $INPUT; + + $q = ltrim(trim($INPUT->post->str('q')), ':'); + $id = noNS($q); + $ns = getNS($q); + + $ns = cleanID($ns); + $id = cleanID($id); + + $nsd = utf8_encodeFN(str_replace(':', '/', $ns)); + + $data = array(); + if($q && !$ns) { + + // use index to lookup matching pages + $pages = ft_pageLookup($id, true); + + // result contains matches in pages and namespaces + // we now extract the matching namespaces to show + // them seperately + $dirs = array(); + + foreach($pages as $pid => $title) { + if(strpos(noNS($pid), $id) === false) { + // match was in the namespace + $dirs[getNS($pid)] = 1; // assoc array avoids dupes + } else { + // it is a matching page, add it to the result + $data[] = array( + 'id' => $pid, + 'title' => $title, + 'type' => 'f', + ); + } + unset($pages[$pid]); + } + foreach($dirs as $dir => $junk) { + $data[] = array( + 'id' => $dir, + 'type' => 'd', + ); + } + + } else { + + $opts = array( + 'depth' => 1, + 'listfiles' => true, + 'listdirs' => true, + 'pagesonly' => true, + 'firsthead' => true, + 'sneakyacl' => $conf['sneaky_index'], + ); + if($id) $opts['filematch'] = '^.*\/' . $id; + if($id) $opts['dirmatch'] = '^.*\/' . $id; + search($data, $conf['datadir'], 'search_universal', $opts, $nsd); + + // add back to upper + if($ns) { + array_unshift( + $data, array( + 'id' => getNS($ns), + 'type' => 'u', + ) + ); + } + } + + // fixme sort results in a useful way ? + + if(!count($data)) { + echo $lang['nothingfound']; + exit; + } + + // output the found data + $even = 1; + foreach($data as $item) { + $even *= -1; //zebra + + if(($item['type'] == 'd' || $item['type'] == 'u') && $item['id']) $item['id'] .= ':'; + $link = wl($item['id']); + + echo '<div class="' . (($even > 0) ? 'even' : 'odd') . ' type_' . $item['type'] . '">'; + + if($item['type'] == 'u') { + $name = $lang['upperns']; + } else { + $name = hsc($item['id']); + } + + echo '<a href="' . $link . '" title="' . hsc($item['id']) . '" class="wikilink1">' . $name . '</a>'; + + if(!blank($item['title'])) { + echo '<span>' . hsc($item['title']) . '</span>'; + } + echo '</div>'; + } + + } + +} diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 37b55e10daa8939b1be92102f6e97ceaccc41e5a..70877a4f2dee180a16e9a636175a0a958b6b8675 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -270,16 +270,9 @@ class _DiffEngine { if (empty($ymatches[$line])) continue; $matches = $ymatches[$line]; - reset($matches); - while (list ($junk, $y) = each($matches)) - if (empty($this->in_seq[$y])) { - $k = $this->_lcs_pos($y); - USE_ASSERTS && assert($k > 0); - $ymids[$k] = $ymids[$k-1]; - break; - } - while (list ($junk, $y) = each($matches)) { - if ($y > $this->seq[$k-1]) { + $switch = false; + foreach ($matches as $y) { + if ($switch && $y > $this->seq[$k-1]) { USE_ASSERTS && assert($y < $this->seq[$k]); // Optimization: this is a common case: // next match is just replacing previous match. @@ -291,6 +284,7 @@ class _DiffEngine { $k = $this->_lcs_pos($y); USE_ASSERTS && assert($k > 0); $ymids[$k] = $ymids[$k-1]; + $switch = true; } } } @@ -414,7 +408,7 @@ class _DiffEngine { $i = 0; $j = 0; - USE_ASSERTS && assert('count($lines) == count($changed)'); + USE_ASSERTS && assert(count($lines) == count($changed)); $len = count($lines); $other_len = count($other_changed); @@ -434,7 +428,7 @@ class _DiffEngine { $j++; while ($i < $len && ! $changed[$i]) { - USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]'); + USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]); $i++; $j++; while ($j < $other_len && $other_changed[$j]) @@ -467,10 +461,10 @@ class _DiffEngine { $changed[--$i] = false; while ($start > 0 && $changed[$start - 1]) $start--; - USE_ASSERTS && assert('$j > 0'); + USE_ASSERTS && assert($j > 0); while ($other_changed[--$j]) continue; - USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]'); + USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]); } /* @@ -493,7 +487,7 @@ class _DiffEngine { while ($i < $len && $changed[$i]) $i++; - USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]'); + USE_ASSERTS && assert($j < $other_len && ! $other_changed[$j]); $j++; if ($j < $other_len && $other_changed[$j]) { $corresponding = $i; @@ -510,10 +504,10 @@ class _DiffEngine { while ($corresponding < $i) { $changed[--$start] = 1; $changed[--$i] = 0; - USE_ASSERTS && assert('$j > 0'); + USE_ASSERTS && assert($j > 0); while ($other_changed[--$j]) continue; - USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]'); + USE_ASSERTS && assert($j >= 0 && !$other_changed[$j]); } } } @@ -876,10 +870,10 @@ class DiffFormatter { /** * Escape string - * + * * Override this method within other formatters if escaping required. * Base class requires $str to be returned WITHOUT escaping. - * + * * @param $str string Text string to escape * @return string The escaped string. */ diff --git a/inc/Form/OptGroup.php b/inc/Form/OptGroup.php index fa0b516db458f0a8dc25c373b6a60dee0e0ab5c1..791f0b3f6616885e198afed6e0d2216744b6cd40 100644 --- a/inc/Form/OptGroup.php +++ b/inc/Form/OptGroup.php @@ -52,6 +52,9 @@ class OptGroup extends Element { foreach($options as $key => $val) { if (is_array($val)) { if (!key_exists('label', $val)) throw new \InvalidArgumentException('If option is given as array, it has to have a "label"-key!'); + if (key_exists('attrs', $val) && is_array($val['attrs']) && key_exists('selected', $val['attrs'])) { + throw new \InvalidArgumentException('Please use function "DropdownElement::val()" to set the selected option'); + } $this->options[$key] = $val; } elseif(is_int($key)) { $this->options[$val] = array('label' => (string) $val); @@ -85,7 +88,7 @@ class OptGroup extends Element { protected function renderOptions() { $html = ''; foreach($this->options as $key => $val) { - $selected = ($key == $this->value) ? ' selected="selected"' : ''; + $selected = ((string)$key === (string)$this->value) ? ' selected="selected"' : ''; $attrs = ''; if (!empty($val['attrs']) && is_array($val['attrs'])) { $attrs = buildAttributes($val['attrs']); diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 88a86c6bc26e2e4c6b2c5d37a096fe7768d12d0f..7737878bd6c6e0a5859bfb3e43167487fa028217 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -9,77 +9,6 @@ define('HTTP_NL',"\r\n"); - -/** - * Adds DokuWiki specific configs to the HTTP client - * - * @author Andreas Goetz <cpuidle@gmx.de> - */ -class DokuHTTPClient extends HTTPClient { - - /** - * Constructor. - * - * @author Andreas Gohr <andi@splitbrain.org> - */ - function __construct(){ - global $conf; - - // call parent constructor - parent::__construct(); - - // set some values from the config - $this->proxy_host = $conf['proxy']['host']; - $this->proxy_port = $conf['proxy']['port']; - $this->proxy_user = $conf['proxy']['user']; - $this->proxy_pass = conf_decodeString($conf['proxy']['pass']); - $this->proxy_ssl = $conf['proxy']['ssl']; - $this->proxy_except = $conf['proxy']['except']; - - // allow enabling debugging via URL parameter (if debugging allowed) - if($conf['allowdebug']) { - if( - isset($_REQUEST['httpdebug']) || - ( - isset($_SERVER['HTTP_REFERER']) && - strpos($_SERVER['HTTP_REFERER'], 'httpdebug') !== false - ) - ) { - $this->debug = true; - } - } - } - - - /** - * Wraps an event around the parent function - * - * @triggers HTTPCLIENT_REQUEST_SEND - * @author Andreas Gohr <andi@splitbrain.org> - */ - /** - * @param string $url - * @param string|array $data the post data either as array or raw data - * @param string $method - * @return bool - */ - function sendRequest($url,$data='',$method='GET'){ - $httpdata = array('url' => $url, - 'data' => $data, - 'method' => $method); - $evt = new Doku_Event('HTTPCLIENT_REQUEST_SEND',$httpdata); - if($evt->advise_before()){ - $url = $httpdata['url']; - $data = $httpdata['data']; - $method = $httpdata['method']; - } - $evt->advise_after(); - unset($evt); - return parent::sendRequest($url,$data,$method); - } - -} - /** * Class HTTPClientException */ @@ -297,10 +226,15 @@ class HTTPClient { if($method == 'POST'){ if(is_array($data)){ - if($headers['Content-Type'] == 'multipart/form-data'){ - $headers['Content-Type'] = 'multipart/form-data; boundary='.$this->boundary; + if (empty($headers['Content-Type'])) { + $headers['Content-Type'] = null; + } + switch ($headers['Content-Type']) { + case 'multipart/form-data': + $headers['Content-Type'] = 'multipart/form-data; boundary=' . $this->boundary; $data = $this->_postMultipartEncode($data); - }else{ + break; + default: $headers['Content-Type'] = 'application/x-www-form-urlencoded'; $data = $this->_postEncode($data); } @@ -599,18 +533,16 @@ class HTTPClient { // set correct peer name for verification (enabled since PHP 5.6) stream_context_set_option($socket, 'ssl', 'peer_name', $requestinfo['host']); - // because SSLv3 is mostly broken, we try TLS connections here first. - // according to https://github.com/splitbrain/dokuwiki/commit/c05ef534 we had problems with certain - // setups with this solution before, but we have no usable test for that and TLS should be the more - // common crypto by now - if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { - $requesturl = $requestinfo['path']. - (!empty($requestinfo['query'])?'?'.$requestinfo['query']:''); - return true; + // SSLv3 is broken, use only TLS connections. + // @link https://bugs.php.net/69195 + if (PHP_VERSION_ID >= 50600 && PHP_VERSION_ID <= 50606) { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLS_CLIENT; + } else { + // actually means neither SSLv2 nor SSLv3 + $cryptoMethod = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; } - // if the above failed, this will most probably not work either, but we can try - if (@stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) { + if (@stream_socket_enable_crypto($socket, true, $cryptoMethod)) { $requesturl = $requestinfo['path']. (!empty($requestinfo['query'])?'?'.$requestinfo['query']:''); return true; @@ -935,4 +867,75 @@ class HTTPClient { } } + +/** + * Adds DokuWiki specific configs to the HTTP client + * + * @author Andreas Goetz <cpuidle@gmx.de> + */ +class DokuHTTPClient extends HTTPClient { + + /** + * Constructor. + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + function __construct(){ + global $conf; + + // call parent constructor + parent::__construct(); + + // set some values from the config + $this->proxy_host = $conf['proxy']['host']; + $this->proxy_port = $conf['proxy']['port']; + $this->proxy_user = $conf['proxy']['user']; + $this->proxy_pass = conf_decodeString($conf['proxy']['pass']); + $this->proxy_ssl = $conf['proxy']['ssl']; + $this->proxy_except = $conf['proxy']['except']; + + // allow enabling debugging via URL parameter (if debugging allowed) + if($conf['allowdebug']) { + if( + isset($_REQUEST['httpdebug']) || + ( + isset($_SERVER['HTTP_REFERER']) && + strpos($_SERVER['HTTP_REFERER'], 'httpdebug') !== false + ) + ) { + $this->debug = true; + } + } + } + + + /** + * Wraps an event around the parent function + * + * @triggers HTTPCLIENT_REQUEST_SEND + * @author Andreas Gohr <andi@splitbrain.org> + */ + /** + * @param string $url + * @param string|array $data the post data either as array or raw data + * @param string $method + * @return bool + */ + function sendRequest($url,$data='',$method='GET'){ + $httpdata = array('url' => $url, + 'data' => $data, + 'method' => $method); + $evt = new Doku_Event('HTTPCLIENT_REQUEST_SEND',$httpdata); + if($evt->advise_before()){ + $url = $httpdata['url']; + $data = $httpdata['data']; + $method = $httpdata['method']; + } + $evt->advise_after(); + unset($evt); + return parent::sendRequest($url,$data,$method); + } + +} + //Setup VIM: ex: et ts=4 : diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index d667ce303d88dd53fb429d6edc3f28412a6e90f0..94c276cfa7af94d0c6dbbd05567c17bc18921fb4 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -2522,13 +2522,13 @@ class JpegMeta { $pos = 14; reset($this->_info['adobe']['raw']); - while (list($key) = each($this->_info['adobe']['raw'])) { + foreach ($this->_info['adobe']['raw'] as $value){ $pos = $this->_write8BIM( $data, $pos, - $this->_info['adobe']['raw'][$key]['type'], - $this->_info['adobe']['raw'][$key]['header'], - $this->_info['adobe']['raw'][$key]['data'] ); + $value['type'], + $value['header'], + $value['data'] ); } } diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index b8b95a5b449d5b2ea682f54e4d6b4044d64aa4bf..7968ce9fcbd63b10bc45e49fe9f75c6e8d0f0cff 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -54,6 +54,9 @@ class Mailer { $this->allowhtml = (bool)$conf['htmlmail']; // add some default headers for mailfiltering FS#2247 + if(!empty($conf['mailreturnpath'])) { + $this->setHeader('Return-Path', $conf['mailreturnpath']); + } $this->setHeader('X-Mailer', 'DokuWiki'); $this->setHeader('X-DokuWiki-User', $INPUT->server->str('REMOTE_USER')); $this->setHeader('X-DokuWiki-Title', $conf['title']); @@ -331,9 +334,6 @@ class Mailer { * @return false|string the prepared header (can contain multiple lines) */ public function cleanAddress($addresses) { - // No named recipients for To: in Windows (see FS#652) - $names = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? false : true; - $headers = ''; if(!is_array($addresses)){ $addresses = explode(',', $addresses); @@ -357,17 +357,17 @@ class Mailer { // 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); + msg(hsc("E-Mail address <$addr> is not ASCII"), -1); continue; } if(!mail_isvalid($addr)) { - msg(htmlspecialchars("E-Mail address <$addr> is not valid"), -1); + msg(hsc("E-Mail address <$addr> is not valid"), -1); continue; } // text was given - if(!empty($text) && $names) { + if(!empty($text) && !isWindows()) { // No named recipients for To: in Windows (see FS#652) // add address quotes $addr = "<$addr>"; diff --git a/inc/Menu/AbstractMenu.php b/inc/Menu/AbstractMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..ce021ab64711f702166efa95e734200541e32a0c --- /dev/null +++ b/inc/Menu/AbstractMenu.php @@ -0,0 +1,95 @@ +<?php + +namespace dokuwiki\Menu; + +use dokuwiki\Menu\Item\AbstractItem; + +/** + * Class AbstractMenu + * + * Basic menu functionality. A menu defines a list of AbstractItem that shall be shown. + * It contains convenience functions to display the menu in HTML, but template authors can also + * just accesst the items via getItems() and create the HTML as however they see fit. + */ +abstract class AbstractMenu implements MenuInterface { + + /** @var string[] list of Item classes to load */ + protected $types = array(); + + /** @var int the context this menu is used in */ + protected $context = AbstractItem::CTX_DESKTOP; + + /** @var string view identifier to be set in the event */ + protected $view = ''; + + /** + * AbstractMenu constructor. + * + * @param int $context the context this menu is used in + */ + public function __construct($context = AbstractItem::CTX_DESKTOP) { + $this->context = $context; + } + + /** + * Get the list of action items in this menu + * + * @return AbstractItem[] + * @triggers MENU_ITEMS_ASSEMBLY + */ + public function getItems() { + $data = array( + 'view' => $this->view, + 'items' => array(), + ); + trigger_event('MENU_ITEMS_ASSEMBLY', $data, array($this, 'loadItems')); + return $data['items']; + } + + /** + * Default action for the MENU_ITEMS_ASSEMBLY event + * + * @see getItems() + * @param array $data The plugin data + */ + public function loadItems(&$data) { + foreach($this->types as $class) { + try { + $class = "\\dokuwiki\\Menu\\Item\\$class"; + /** @var AbstractItem $item */ + $item = new $class(); + if(!$item->visibleInContext($this->context)) continue; + $data['items'][] = $item; + } catch(\RuntimeException $ignored) { + // item not available + } + } + } + + /** + * Generate HTML list items for this menu + * + * This is a convenience method for template authors. If you need more fine control over the + * output, use getItems() and build the HTML yourself + * + * @param string|false $classprefix create a class from type with this prefix, false for no class + * @param bool $svg add the SVG link + * @return string + */ + public function getListItems($classprefix = '', $svg = true) { + $html = ''; + foreach($this->getItems() as $item) { + if($classprefix !== false) { + $class = ' class="' . $classprefix . $item->getType() . '"'; + } else { + $class = ''; + } + + $html .= "<li$class>"; + $html .= $item->asHtmlLink(false, $svg); + $html .= '</li>'; + } + return $html; + } + +} diff --git a/inc/Menu/DetailMenu.php b/inc/Menu/DetailMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..27c0c6fce3e6fd249986a421d3eb88f7ff947c6f --- /dev/null +++ b/inc/Menu/DetailMenu.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Menu; + +/** + * Class DetailMenu + * + * This menu offers options on an image detail view. It usually displayed similar to + * the PageMenu. + */ +class DetailMenu extends AbstractMenu { + + protected $view = 'detail'; + + protected $types = array( + 'MediaManager', + 'ImgBackto', + 'Top', + ); + +} diff --git a/inc/Menu/Item/AbstractItem.php b/inc/Menu/Item/AbstractItem.php new file mode 100644 index 0000000000000000000000000000000000000000..45ead5562e564e91eb84f34dfa229969e74e92e7 --- /dev/null +++ b/inc/Menu/Item/AbstractItem.php @@ -0,0 +1,253 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class AbstractItem + * + * This class defines a single Item to be displayed in one of DokuWiki's menus. Plugins + * can extend those menus through action plugins and add their own instances of this class, + * overwriting some of its properties. + * + * Items may be shown multiple times in different contexts. Eg. for the default template + * all menus are shown in a Dropdown list on mobile, but are split into several places on + * desktop. The item's $context property can be used to hide the item depending on the current + * context. + * + * Children usually just need to overwrite the different properties, but for complex things + * the accessors may be overwritten instead. + */ +abstract class AbstractItem { + + /** menu item is to be shown on desktop screens only */ + const CTX_DESKTOP = 1; + /** menu item is to be shown on mobile screens only */ + const CTX_MOBILE = 2; + /** menu item is to be shown in all contexts */ + const CTX_ALL = 3; + + /** @var string name of the action, usually the lowercase class name */ + protected $type = ''; + /** @var string optional keyboard shortcut */ + protected $accesskey = ''; + /** @var string the page id this action links to */ + protected $id = ''; + /** @var string the method to be used when this action is used in a form */ + protected $method = 'get'; + /** @var array parameters for the action (should contain the do parameter) */ + protected $params = array(); + /** @var bool when true, a rel=nofollow should be used */ + protected $nofollow = true; + /** @var string this item's label may contain a placeholder, which is replaced with this */ + protected $replacement = ''; + /** @var string the full path to the SVG icon of this menu item */ + protected $svg = DOKU_INC . 'lib/images/menu/00-default_checkbox-blank-circle-outline.svg'; + /** @var string can be set to overwrite the default lookup in $lang.btn_* */ + protected $label = ''; + /** @var string the tooltip title, defaults to $label */ + protected $title = ''; + /** @var int the context this titme is shown in */ + protected $context = self::CTX_ALL; + + /** + * AbstractItem constructor. + * + * Sets the dynamic properties + * + * Children should always call the parent constructor! + * + * @throws \RuntimeException when the action is disabled + */ + public function __construct() { + global $ID; + $this->id = $ID; + $this->type = $this->getType(); + $this->params['do'] = $this->type; + + if(!actionOK($this->type)) throw new \RuntimeException("action disabled: {$this->type}"); + } + + /** + * Return this item's label + * + * When the label property was set, it is simply returned. Otherwise, the action's type + * is used to look up the translation in the main language file and, if used, the replacement + * is applied. + * + * @return string + */ + public function getLabel() { + if($this->label !== '') return $this->label; + + /** @var array $lang */ + global $lang; + $label = $lang['btn_' . $this->type]; + if(strpos($label, '%s')) { + $label = sprintf($label, $this->replacement); + } + if($label === '') $label = '[' . $this->type . ']'; + return $label; + } + + /** + * Return this item's title + * + * This title should be used to display a tooltip (using the HTML title attribute). If + * a title property was not explicitly set, the label will be returned. + * + * @return string + */ + public function getTitle() { + if($this->title === '') return $this->getLabel(); + return $this->title; + } + + /** + * Return the link this item links to + * + * Basically runs wl() on $id and $params. However if the ID is a hash it is used directly + * as the link + * + * Please note that the generated URL is *not* XML escaped. + * + * @see wl() + * @return string + */ + public function getLink() { + if($this->id[0] == '#') { + return $this->id; + } else { + return wl($this->id, $this->params, false, '&'); + } + } + + /** + * Convenience method to get the attributes for constructing an <a> element + * + * @see buildAttributes() + * @param string|false $classprefix create a class from type with this prefix, false for no class + * @return array + */ + public function getLinkAttributes($classprefix = 'menuitem ') { + $attr = array( + 'href' => $this->getLink(), + 'title' => $this->getTitle(), + ); + if($this->isNofollow()) $attr['rel'] = 'nofollow'; + if($this->getAccesskey()) { + $attr['accesskey'] = $this->getAccesskey(); + $attr['title'] .= ' [' . $this->getAccesskey() . ']'; + } + if($classprefix !== false) $attr['class'] = $classprefix . $this->getType(); + + return $attr; + } + + /** + * Convenience method to create a full <a> element + * + * Wraps around the label and SVG image + * + * @param string|false $classprefix create a class from type with this prefix, false for no class + * @param bool $svg add SVG icon to the link + * @return string + */ + public function asHtmlLink($classprefix = 'menuitem ', $svg = true) { + $attr = buildAttributes($this->getLinkAttributes($classprefix)); + $html = "<a $attr>"; + if($svg) { + $html .= '<span>' . hsc($this->getLabel()) . '</span>'; + $html .= inlineSVG($this->getSvg()); + } else { + $html .= hsc($this->getLabel()); + } + $html .= "</a>"; + + return $html; + } + + /** + * Convenience method to create a <button> element inside it's own form element + * + * Uses html_btn() + * + * @return string + */ + public function asHtmlButton() { + return html_btn( + $this->getType(), + $this->id, + $this->getAccesskey(), + $this->getParams(), + $this->method, + $this->getTitle(), + $this->getLabel(), + $this->getSvg() + ); + } + + /** + * Should this item be shown in the given context + * + * @param int $ctx the current context + * @return bool + */ + public function visibleInContext($ctx) { + return (bool) ($ctx & $this->context); + } + + /** + * @return string the name of this item + */ + public function getType() { + if($this->type === '') { + $this->type = strtolower(substr(strrchr(get_class($this), '\\'), 1)); + } + return $this->type; + } + + /** + * @return string + */ + public function getAccesskey() { + return $this->accesskey; + } + + /** + * @return array + */ + public function getParams() { + return $this->params; + } + + /** + * @return bool + */ + public function isNofollow() { + return $this->nofollow; + } + + /** + * @return string + */ + public function getSvg() { + return $this->svg; + } + + /** + * Return this Item's settings as an array as used in tpl_get_action() + * + * @return array + */ + public function getLegacyData() { + return array( + 'accesskey' => $this->accesskey ?: null, + 'type' => $this->type, + 'id' => $this->id, + 'method' => $this->method, + 'params' => $this->params, + 'nofollow' => $this->nofollow, + 'replacement' => $this->replacement + ); + } +} diff --git a/inc/Menu/Item/Admin.php b/inc/Menu/Item/Admin.php new file mode 100644 index 0000000000000000000000000000000000000000..7302f0f34fd42eabc96f886668d8efb691c8a0a1 --- /dev/null +++ b/inc/Menu/Item/Admin.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Admin + * + * Opens the Admin screen. Only shown to managers or above + */ +class Admin extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INFO; + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/settings.svg'; + + if(!$INFO['ismanager']) { + throw new \RuntimeException("admin is for managers only"); + } + } + +} diff --git a/inc/Menu/Item/Back.php b/inc/Menu/Item/Back.php new file mode 100644 index 0000000000000000000000000000000000000000..a7cc1d976dbc82da820c8cad0e45b500dc982ceb --- /dev/null +++ b/inc/Menu/Item/Back.php @@ -0,0 +1,29 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Back + * + * Navigates back up one namepspace. This is currently not used in any menu. Templates + * would need to add this item manually. + */ +class Back extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $ID; + parent::__construct(); + + $parent = tpl_getparent($ID); + if(!$parent) { + throw new \RuntimeException("No parent for back action"); + } + + $this->id = $parent; + $this->params = array('do' => ''); + $this->accesskey = 'b'; + $this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg'; + } + +} diff --git a/inc/Menu/Item/Backlink.php b/inc/Menu/Item/Backlink.php new file mode 100644 index 0000000000000000000000000000000000000000..6dc242bdd76a480ea87f7b1c43d7f25c53e3dee8 --- /dev/null +++ b/inc/Menu/Item/Backlink.php @@ -0,0 +1,18 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Backlink + * + * Shows the backlinks for the current page + */ +class Backlink extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + $this->svg = DOKU_INC . 'lib/images/menu/08-backlink_link-variant.svg'; + } + +} diff --git a/inc/Menu/Item/Edit.php b/inc/Menu/Item/Edit.php new file mode 100644 index 0000000000000000000000000000000000000000..05467674d5cb8ff6c9c1f073add301da38344ea6 --- /dev/null +++ b/inc/Menu/Item/Edit.php @@ -0,0 +1,65 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Edit + * + * Most complex item. Shows the edit button but mutates to show, draft and create based on + * current state. + */ +class Edit extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $ACT; + global $INFO; + global $REV; + + parent::__construct(); + + if($ACT == 'show' || $ACT == 'search') { + $this->method = 'post'; + if($INFO['writable']) { + $this->accesskey = 'e'; + if(!empty($INFO['draft'])) { + $this->type = 'draft'; + $this->params['do'] = 'draft'; + } else { + $this->params['rev'] = $REV; + if(!$INFO['exists']) { + $this->type = 'create'; + } + } + } else { + if(!actionOK($this->type)) throw new \RuntimeException("action disabled: source"); + $params['rev'] = $REV; + $this->type = 'source'; + $this->accesskey = 'v'; + } + } else { + $this->params = array('do' => ''); + $this->type = 'show'; + $this->accesskey = 'v'; + } + + $this->setIcon(); + } + + /** + * change the icon according to what type the edit button has + */ + protected function setIcon() { + $icons = array( + 'edit' => '01-edit_pencil.svg', + 'create' => '02-create_pencil.svg', + 'draft' => '03-draft_android-studio.svg', + 'show' => '04-show_file-document.svg', + 'source' => '05-source_file-xml.svg', + ); + if(isset($icons[$this->type])) { + $this->svg = DOKU_INC . 'lib/images/menu/' . $icons[$this->type]; + } + } + +} diff --git a/inc/Menu/Item/ImgBackto.php b/inc/Menu/Item/ImgBackto.php new file mode 100644 index 0000000000000000000000000000000000000000..72820a53a5cc8424554c07e7991fbae1a141a303 --- /dev/null +++ b/inc/Menu/Item/ImgBackto.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class ImgBackto + * + * Links back to the originating page from a detail image view + */ +class ImgBackto extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $ID; + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg'; + $this->type = 'img_backto'; + $this->params = array(); + $this->accesskey = 'b'; + $this->replacement = $ID; + } + +} diff --git a/inc/Menu/Item/Index.php b/inc/Menu/Item/Index.php new file mode 100644 index 0000000000000000000000000000000000000000..41326738b5ed0909070dca95338d1726873b825d --- /dev/null +++ b/inc/Menu/Item/Index.php @@ -0,0 +1,27 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Index + * + * Shows the sitemap + */ +class Index extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $conf; + global $ID; + parent::__construct(); + + $this->accesskey = 'x'; + $this->svg = DOKU_INC . 'lib/images/menu/file-tree.svg'; + + // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml) + if($conf['start'] == $ID && !$conf['sitemap']) { + $this->nofollow = false; + } + } + +} diff --git a/inc/Menu/Item/Login.php b/inc/Menu/Item/Login.php new file mode 100644 index 0000000000000000000000000000000000000000..671f6a78a3cb4441f13d37f75baf4e9ccaeb3974 --- /dev/null +++ b/inc/Menu/Item/Login.php @@ -0,0 +1,29 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Login + * + * Show a login or logout item, based on the current state + */ +class Login extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INPUT; + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/login.svg'; + $this->params['sectok'] = getSecurityToken(); + if($INPUT->server->has('REMOTE_USER')) { + if(!actionOK('logout')) { + throw new \RuntimeException("logout disabled"); + } + $this->params['do'] = 'logout'; + $this->type = 'logout'; + $this->svg = DOKU_INC . 'lib/images/menu/logout.svg'; + } + } + +} diff --git a/inc/Menu/Item/Media.php b/inc/Menu/Item/Media.php new file mode 100644 index 0000000000000000000000000000000000000000..0e5f47bae4bdce00a71f11375bcabb355cac5979 --- /dev/null +++ b/inc/Menu/Item/Media.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Media + * + * Opens the media manager + */ +class Media extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $ID; + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/folder-multiple-image.svg'; + $this->params['ns'] = getNS($ID); + } + +} diff --git a/inc/Menu/Item/MediaManager.php b/inc/Menu/Item/MediaManager.php new file mode 100644 index 0000000000000000000000000000000000000000..8549d20053d57fbdd46f7487ec0fc6448d976ded --- /dev/null +++ b/inc/Menu/Item/MediaManager.php @@ -0,0 +1,32 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class MediaManager + * + * Opens the current image in the media manager. Used on image detail view. + */ +class MediaManager extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $IMG; + parent::__construct(); + + $imgNS = getNS($IMG); + $authNS = auth_quickaclcheck("$imgNS:*"); + if($authNS < AUTH_UPLOAD) { + throw new \RuntimeException("media manager link only with upload permissions"); + } + + $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; + $this->type = 'mediaManager'; + $this->params = array( + 'ns' => $imgNS, + 'image' => $IMG, + 'do' => 'media' + ); + } + +} diff --git a/inc/Menu/Item/Profile.php b/inc/Menu/Item/Profile.php new file mode 100644 index 0000000000000000000000000000000000000000..2b4ceeb77187223b129d239c12a6b9e2c1651190 --- /dev/null +++ b/inc/Menu/Item/Profile.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Profile + * + * Open the user's profile + */ +class Profile extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INPUT; + parent::__construct(); + + if(!$INPUT->server->str('REMOTE_USER')) { + throw new \RuntimeException("profile is only for logged in users"); + } + + $this->svg = DOKU_INC . 'lib/images/menu/account-card-details.svg'; + } + +} diff --git a/inc/Menu/Item/Recent.php b/inc/Menu/Item/Recent.php new file mode 100644 index 0000000000000000000000000000000000000000..ff90ce605cd1146fc2121a59cf9680040e94b8ba --- /dev/null +++ b/inc/Menu/Item/Recent.php @@ -0,0 +1,20 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Recent + * + * Show the site wide recent changes + */ +class Recent extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + + $this->accesskey = 'r'; + $this->svg = DOKU_INC . 'lib/images/menu/calendar-clock.svg'; + } + +} diff --git a/inc/Menu/Item/Register.php b/inc/Menu/Item/Register.php new file mode 100644 index 0000000000000000000000000000000000000000..615146ea60289fd0b8208a22e682be6dcd8e9701 --- /dev/null +++ b/inc/Menu/Item/Register.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Register + * + * Open the view to register a new account + */ +class Register extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INPUT; + parent::__construct(); + + if($INPUT->server->str('REMOTE_USER')) { + throw new \RuntimeException("no register when already logged in"); + } + + $this->svg = DOKU_INC . 'lib/images/menu/account-plus.svg'; + } + +} diff --git a/inc/Menu/Item/Resendpwd.php b/inc/Menu/Item/Resendpwd.php new file mode 100644 index 0000000000000000000000000000000000000000..7ddc6b02f34133f5ae12ed77d2d9379a7bd165c5 --- /dev/null +++ b/inc/Menu/Item/Resendpwd.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Resendpwd + * + * Access the "forgot password" dialog + */ +class Resendpwd extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INPUT; + parent::__construct(); + + if($INPUT->server->str('REMOTE_USER')) { + throw new \RuntimeException("no resendpwd when already logged in"); + } + + $this->svg = DOKU_INC . 'lib/images/menu/lock-reset.svg'; + } + +} diff --git a/inc/Menu/Item/Revert.php b/inc/Menu/Item/Revert.php new file mode 100644 index 0000000000000000000000000000000000000000..a360c68424346f425374c4e31bac01ed1e87c52f --- /dev/null +++ b/inc/Menu/Item/Revert.php @@ -0,0 +1,26 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Revert + * + * Quick revert to the currently shown page revision + */ +class Revert extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $REV; + global $INFO; + parent::__construct(); + + if(!$INFO['ismanager'] || !$REV || !$INFO['writable']) { + throw new \RuntimeException('revert not available'); + } + $this->params['rev'] = $REV; + $this->params['sectok'] = getSecurityToken(); + $this->svg = DOKU_INC . 'lib/images/menu/06-revert_replay.svg'; + } + +} diff --git a/inc/Menu/Item/Revisions.php b/inc/Menu/Item/Revisions.php new file mode 100644 index 0000000000000000000000000000000000000000..3009a7924e35c7699379b26666f69c2d1d431e64 --- /dev/null +++ b/inc/Menu/Item/Revisions.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Revisions + * + * Access the old revisions of the current page + */ +class Revisions extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + + $this->accesskey = 'o'; + $this->type = 'revs'; + $this->svg = DOKU_INC . 'lib/images/menu/07-revisions_history.svg'; + } + +} diff --git a/inc/Menu/Item/Subscribe.php b/inc/Menu/Item/Subscribe.php new file mode 100644 index 0000000000000000000000000000000000000000..1c9d335f8c428c1cd41110effecd45a09ed5430a --- /dev/null +++ b/inc/Menu/Item/Subscribe.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Subscribe + * + * Access the subscription management view + */ +class Subscribe extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + global $INPUT; + parent::__construct(); + + if(!$INPUT->server->str('REMOTE_USER')) { + throw new \RuntimeException("subscribe is only for logged in users"); + } + + $this->svg = DOKU_INC . 'lib/images/menu/09-subscribe_email-outline.svg'; + } + +} diff --git a/inc/Menu/Item/Top.php b/inc/Menu/Item/Top.php new file mode 100644 index 0000000000000000000000000000000000000000..a05c4f11964af9867120a53b1e92324dd50c7a0c --- /dev/null +++ b/inc/Menu/Item/Top.php @@ -0,0 +1,36 @@ +<?php + +namespace dokuwiki\Menu\Item; + +/** + * Class Top + * + * Scroll back to the top. Uses a hash as $id which is handled special in getLink(). + * Not shown in mobile context + */ +class Top extends AbstractItem { + + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg'; + $this->accesskey = 't'; + $this->params = array('do' => ''); + $this->id = '#dokuwiki__top'; + $this->context = self::CTX_DESKTOP; + } + + /** + * Convenience method to create a <button> element + * + * Uses html_topbtn() + * + * @todo this does currently not support the SVG icon + * @return string + */ + public function asHtmlButton() { + return html_topbtn(); + } + +} diff --git a/inc/Menu/MenuInterface.php b/inc/Menu/MenuInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..91dde9db6946faa27fcdd350cf2e45d332476c80 --- /dev/null +++ b/inc/Menu/MenuInterface.php @@ -0,0 +1,20 @@ +<?php + +namespace dokuwiki\Menu; + +use dokuwiki\Menu\Item\AbstractItem; + +/** + * Interface MenuInterface + * + * Defines what a Menu provides + */ +Interface MenuInterface { + + /** + * Get the list of action items in this menu + * + * @return AbstractItem[] + */ + public function getItems(); +} diff --git a/inc/Menu/MobileMenu.php b/inc/Menu/MobileMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..29e17d163942f026b75a087dfaed16db45a01558 --- /dev/null +++ b/inc/Menu/MobileMenu.php @@ -0,0 +1,91 @@ +<?php + +namespace dokuwiki\Menu; + +use dokuwiki\Menu\Item\AbstractItem; + +/** + * Class MobileMenu + * + * Note: this does not inherit from AbstractMenu because it is not working like the other + * menus. This is a meta menu, aggregating the items from the other menus and offering a combined + * view. The idea is to use this on mobile devices, thus the context is fixed to CTX_MOBILE + */ +class MobileMenu implements MenuInterface { + + /** + * Returns all items grouped by view + * + * @return AbstractItem[][] + */ + public function getGroupedItems() { + $pagemenu = new PageMenu(AbstractItem::CTX_MOBILE); + $sitemenu = new SiteMenu(AbstractItem::CTX_MOBILE); + $usermenu = new UserMenu(AbstractItem::CTX_MOBILE); + + return array( + 'page' => $pagemenu->getItems(), + 'site' => $sitemenu->getItems(), + 'user' => $usermenu->getItems() + ); + } + + /** + * Get all items in a flat array + * + * This returns the same format as AbstractMenu::getItems() + * + * @return AbstractItem[] + */ + public function getItems() { + $menu = $this->getGroupedItems(); + return call_user_func_array('array_merge', array_values($menu)); + } + + /** + * Print a dropdown menu with all DokuWiki actions + * + * Note: this will not use any pretty URLs + * + * @param string $empty empty option label + * @param string $button submit button label + * @return string + */ + public function getDropdown($empty = '', $button = '>') { + global $ID; + global $REV; + /** @var string[] $lang */ + global $lang; + global $INPUT; + + $html = '<form action="' . script() . '" method="get" accept-charset="utf-8">'; + $html .= '<div class="no">'; + $html .= '<input type="hidden" name="id" value="' . $ID . '" />'; + if($REV) $html .= '<input type="hidden" name="rev" value="' . $REV . '" />'; + if($INPUT->server->str('REMOTE_USER')) { + $html .= '<input type="hidden" name="sectok" value="' . getSecurityToken() . '" />'; + } + + $html .= '<select name="do" class="edit quickselect" title="' . $lang['tools'] . '">'; + $html .= '<option value="">' . $empty . '</option>'; + + foreach($this->getGroupedItems() as $tools => $items) { + $html .= '<optgroup label="' . $lang[$tools . '_tools'] . '">'; + foreach($items as $item) { + $params = $item->getParams(); + $html .= '<option value="' . $params['do'] . '">'; + $html .= hsc($item->getLabel()); + $html .= '</option>'; + } + $html .= '</optgroup>'; + } + + $html .= '</select>'; + $html .= '<button type="submit">' . $button . '</button>'; + $html .= '</div>'; + $html .= '</form>'; + + return $html; + } + +} diff --git a/inc/Menu/PageMenu.php b/inc/Menu/PageMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..9c0a55e2d634aaebc3eb5e6492b2721768da2918 --- /dev/null +++ b/inc/Menu/PageMenu.php @@ -0,0 +1,23 @@ +<?php + +namespace dokuwiki\Menu; + +/** + * Class PageMenu + * + * Actions manipulating the current page. Shown as a floating menu in the dokuwiki template + */ +class PageMenu extends AbstractMenu { + + protected $view = 'page'; + + protected $types = array( + 'Edit', + 'Revert', + 'Revisions', + 'Backlink', + 'Subscribe', + 'Top', + ); + +} diff --git a/inc/Menu/SiteMenu.php b/inc/Menu/SiteMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..dba6888c7f0169d6c972452c2995afb198a2314d --- /dev/null +++ b/inc/Menu/SiteMenu.php @@ -0,0 +1,20 @@ +<?php + +namespace dokuwiki\Menu; + +/** + * Class SiteMenu + * + * Actions that are not bound to an individual page but provide toolsfor the whole wiki. + */ +class SiteMenu extends AbstractMenu { + + protected $view = 'site'; + + protected $types = array( + 'Recent', + 'Media', + 'Index' + ); + +} diff --git a/inc/Menu/UserMenu.php b/inc/Menu/UserMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..01028d3ccbb4b6cb4b38debde12a2962d871bc45 --- /dev/null +++ b/inc/Menu/UserMenu.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\Menu; + +/** + * Class UserMenu + * + * Actions related to the current user + */ +class UserMenu extends AbstractMenu { + + protected $view = 'user'; + + protected $types = array( + 'Profile', + 'Admin', + 'Register', + 'Login', + ); + +} diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index d24cc75e52110660c1b142dde1102b7713b441a1..3d03c1e057969704e3397c0eeed8f0e2eb646e5a 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -91,7 +91,7 @@ class PassHash { //crypt and compare $call = 'hash_'.$method; $newhash = $this->$call($clear, $salt, $magic); - if($newhash === $hash) { + if(\hash_equals($newhash, $hash)) { return true; } return false; @@ -530,7 +530,7 @@ class PassHash { * @throws Exception * @return string Hashed password */ - public function hash_bcrypt($clear, $salt = null, $compute = 8) { + public function hash_bcrypt($clear, $salt = null, $compute = 10) { if(!defined('CRYPT_BLOWFISH') || CRYPT_BLOWFISH != 1) { throw new Exception('This PHP installation has no bcrypt support'); } diff --git a/inc/Ui/Admin.php b/inc/Ui/Admin.php index ed2fa2564ab836971455704c41003e19898e659a..aa3b8b99e281c17e5c20b0a5b7159b495acc3e4c 100644 --- a/inc/Ui/Admin.php +++ b/inc/Ui/Admin.php @@ -104,7 +104,7 @@ class Admin extends Ui { if(substr($conf['savedir'], 0, 2) !== './') return; echo '<a style="border:none; float:right;" href="http://www.dokuwiki.org/security#web_access_security"> - <img src="' . DOKU_URL . $conf['savedir'] . '/security.png" alt="Your data directory seems to be protected properly." + <img src="' . DOKU_URL . $conf['savedir'] . '/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png" alt="Your data directory seems to be protected properly." onerror="this.parentNode.style.display=\'none\'" /></a>'; } diff --git a/inc/actions.php b/inc/actions.php index adba2aa3233108d2ea4b3044067e1d24f5a77ca9..9ba8878603ae9924102d902f46cf146866f84d03 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -9,193 +9,21 @@ if(!defined('DOKU_INC')) die('meh.'); /** - * Call the needed action handlers - * - * @author Andreas Gohr <andi@splitbrain.org> - * @triggers ACTION_ACT_PREPROCESS - * @triggers ACTION_HEADERS_SEND + * All action processing starts here */ function act_dispatch(){ - global $ACT; - global $ID; - global $INFO; - global $QUERY; - /* @var Input $INPUT */ - global $INPUT; - global $lang; - global $conf; - - $preact = $ACT; - - // give plugins an opportunity to process the action - $evt = new Doku_Event('ACTION_ACT_PREPROCESS',$ACT); - - $headers = array(); - if ($evt->advise_before()) { - - //sanitize $ACT - $ACT = act_validate($ACT); - - //check if searchword was given - else just show - $s = cleanID($QUERY); - if($ACT == 'search' && empty($s)){ - $ACT = 'show'; - } - - //login stuff - if(in_array($ACT,array('login','logout'))){ - $ACT = act_auth($ACT); - } - - //check if user is asking to (un)subscribe a page - if($ACT == 'subscribe') { - try { - $ACT = act_subscription($ACT); - } catch (Exception $e) { - msg($e->getMessage(), -1); - } - } - - //display some info - if($ACT == 'check'){ - check(); - $ACT = 'show'; - } - - //check permissions - $ACT = act_permcheck($ACT); - - //sitemap - if ($ACT == 'sitemap'){ - act_sitemap($ACT); - } - - //recent changes - if ($ACT == 'recent'){ - $show_changes = $INPUT->str('show_changes'); - if (!empty($show_changes)) { - set_doku_pref('show_changes', $show_changes); - } - } - - //diff - if ($ACT == 'diff'){ - $difftype = $INPUT->str('difftype'); - if (!empty($difftype)) { - set_doku_pref('difftype', $difftype); - } - } - - //register - if($ACT == 'register' && $INPUT->post->bool('save') && register()){ - $ACT = 'login'; - } - - if ($ACT == 'resendpwd' && act_resendpwd()) { - $ACT = 'login'; - } - - // user profile changes - if (in_array($ACT, array('profile','profile_delete'))) { - if(!$INPUT->server->str('REMOTE_USER')) { - $ACT = 'login'; - } else { - switch ($ACT) { - case 'profile' : - if(updateprofile()) { - msg($lang['profchanged'],1); - $ACT = 'show'; - } - break; - case 'profile_delete' : - if(auth_deleteprofile()){ - msg($lang['profdeleted'],1); - $ACT = 'show'; - } else { - $ACT = 'profile'; - } - break; - } - } - } - - //revert - if($ACT == 'revert'){ - if(checkSecurityToken()){ - $ACT = act_revert($ACT); - }else{ - $ACT = 'show'; - } - } - - //save - if($ACT == 'save'){ - if(checkSecurityToken()){ - $ACT = act_save($ACT); - }else{ - $ACT = 'preview'; - } - } - - //cancel conflicting edit - if($ACT == 'cancel') - $ACT = 'show'; - - //draft deletion - if($ACT == 'draftdel') - $ACT = act_draftdel($ACT); - - //draft saving on preview - if($ACT == 'preview') { - $headers[] = "X-XSS-Protection: 0"; - $ACT = act_draftsave($ACT); - } - - //edit - if(in_array($ACT, array('edit', 'preview', 'recover'))) { - $ACT = act_edit($ACT); - }else{ - unlock($ID); //try to unlock - } - - //handle export - if(substr($ACT,0,7) == 'export_') - $ACT = act_export($ACT); - - //handle admin tasks - if($ACT == 'admin'){ - // retrieve admin plugin name from $_REQUEST['page'] - if (($page = $INPUT->str('page', '', true)) != '') { - /** @var $plugin DokuWiki_Admin_Plugin */ - if ($plugin = plugin_getRequestAdminPlugin()){ - $plugin->handle(); - } - } - } - - // check permissions again - the action may have changed - $ACT = act_permcheck($ACT); - } // end event ACTION_ACT_PREPROCESS default action - $evt->advise_after(); - // Make sure plugs can handle 'denied' - if($conf['send404'] && $ACT == 'denied') { - http_status(403); - } - unset($evt); - - // when action 'show', the intial not 'show' and POST, do a redirect - if($ACT == 'show' && $preact != 'show' && strtolower($INPUT->server->str('REQUEST_METHOD')) == 'post'){ - act_redirect($ID,$preact); - } - - global $INFO; - global $conf; - global $license; + // always initialize on first dispatch (test request may dispatch mutliple times on one request) + $router = \dokuwiki\ActionRouter::getInstance(true); - //call template FIXME: all needed vars available? - $headers[] = 'Content-Type: text/html; charset=utf-8'; + $headers = array('Content-Type: text/html; charset=utf-8'); trigger_event('ACTION_HEADERS_SEND',$headers,'act_sendheaders'); + // clear internal variables + unset($router); + unset($headers); + // make all globals available to the template + extract($GLOBALS); + include(template('main.php')); // output for the commands is now handled in inc/templates.php // in function tpl_content() @@ -234,628 +62,3 @@ function act_clean($act){ if($act === '') $act = 'show'; return $act; } - -/** - * Sanitize and validate action commands. - * - * Add all allowed commands here. - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param array|string $act - * @return string - */ -function act_validate($act) { - global $conf; - global $INFO; - - $act = act_clean($act); - - // check if action is disabled - if(!actionOK($act)){ - msg('Command disabled: '.htmlspecialchars($act),-1); - return 'show'; - } - - //disable all acl related commands if ACL is disabled - if(!$conf['useacl'] && in_array($act,array('login','logout','register','admin', - 'subscribe','unsubscribe','profile','revert', - 'resendpwd','profile_delete'))){ - msg('Command unavailable: '.htmlspecialchars($act),-1); - return 'show'; - } - - //is there really a draft? - if($act == 'draft' && !file_exists($INFO['draft'])) return 'edit'; - - if(!in_array($act,array('login','logout','register','save','cancel','edit','draft', - 'preview','search','show','check','index','revisions', - 'diff','recent','backlink','admin','subscribe','revert', - 'unsubscribe','profile','profile_delete','resendpwd','recover', - 'draftdel','sitemap','media')) && substr($act,0,7) != 'export_' ) { - msg('Command unknown: '.htmlspecialchars($act),-1); - return 'show'; - } - return $act; -} - -/** - * Run permissionchecks - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $act action command - * @return string action command - */ -function act_permcheck($act){ - global $INFO; - - if(in_array($act,array('save','preview','edit','recover'))){ - if($INFO['exists']){ - if($act == 'edit'){ - //the edit function will check again and do a source show - //when no AUTH_EDIT available - $permneed = AUTH_READ; - }else{ - $permneed = AUTH_EDIT; - } - }else{ - $permneed = AUTH_CREATE; - } - }elseif(in_array($act,array('login','search','recent','profile','profile_delete','index', 'sitemap'))){ - $permneed = AUTH_NONE; - }elseif($act == 'revert'){ - $permneed = AUTH_ADMIN; - if($INFO['ismanager']) $permneed = AUTH_EDIT; - }elseif($act == 'register'){ - $permneed = AUTH_NONE; - }elseif($act == 'resendpwd'){ - $permneed = AUTH_NONE; - }elseif($act == 'admin'){ - if($INFO['ismanager']){ - // if the manager has the needed permissions for a certain admin - // action is checked later - $permneed = AUTH_READ; - }else{ - $permneed = AUTH_ADMIN; - } - }else{ - $permneed = AUTH_READ; - } - if($INFO['perm'] >= $permneed) return $act; - - return 'denied'; -} - -/** - * Handle 'draftdel' - * - * Deletes the draft for the current page and user - * - * @param string $act action command - * @return string action command - */ -function act_draftdel($act){ - global $INFO; - @unlink($INFO['draft']); - $INFO['draft'] = null; - return 'show'; -} - -/** - * Saves a draft on preview - * - * @todo this currently duplicates code from ajax.php :-/ - * - * @param string $act action command - * @return string action command - */ -function act_draftsave($act){ - global $INFO; - global $ID; - global $INPUT; - global $conf; - if($conf['usedraft'] && $INPUT->post->has('wikitext')) { - $draft = array('id' => $ID, - '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'); - if(io_saveFile($cname,serialize($draft))){ - $INFO['draft'] = $cname; - } - } - return $act; -} - -/** - * Handle 'save' - * - * Checks for spam and conflicts and saves the page. - * Does a redirect to show the page afterwards or - * returns a new action. - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $act action command - * @return string action command - */ -function act_save($act){ - global $ID; - global $DATE; - global $PRE; - global $TEXT; - global $SUF; - global $SUM; - global $lang; - global $INFO; - global $INPUT; - - //spam check - if(checkwordblock()) { - msg($lang['wordblock'], -1); - return 'edit'; - } - //conflict check - if($DATE != 0 && $INFO['meta']['date']['modified'] > $DATE ) - return 'conflict'; - - //save it - saveWikiText($ID,con($PRE,$TEXT,$SUF,true),$SUM,$INPUT->bool('minor')); //use pretty mode for con - //unlock it - unlock($ID); - - //delete draft - act_draftdel($act); - session_write_close(); - - // when done, show page - return 'show'; -} - -/** - * Revert to a certain revision - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $act action command - * @return string action command - */ -function act_revert($act){ - global $ID; - global $REV; - global $lang; - /* @var Input $INPUT */ - global $INPUT; - // FIXME $INFO['writable'] currently refers to the attic version - // global $INFO; - // if (!$INFO['writable']) { - // return 'show'; - // } - - // when no revision is given, delete current one - // FIXME this feature is not exposed in the GUI currently - $text = ''; - $sum = $lang['deleted']; - if($REV){ - $text = rawWiki($ID,$REV); - if(!$text) return 'show'; //something went wrong - $sum = sprintf($lang['restored'], dformat($REV)); - } - - // spam check - - if (checkwordblock($text)) { - msg($lang['wordblock'], -1); - return 'edit'; - } - - saveWikiText($ID,$text,$sum,false); - msg($sum,1); - - //delete any draft - act_draftdel($act); - session_write_close(); - - // when done, show current page - $INPUT->server->set('REQUEST_METHOD','post'); //should force a redirect - $REV = ''; - return 'show'; -} - -/** - * Do a redirect after receiving post data - * - * Tries to add the section id as hash mark after section editing - * - * @param string $id page id - * @param string $preact action command before redirect - */ -function act_redirect($id,$preact){ - global $PRE; - global $TEXT; - - $opts = array( - 'id' => $id, - 'preact' => $preact - ); - //get section name when coming from section edit - if($PRE && preg_match('/^\s*==+([^=\n]+)/',$TEXT,$match)){ - $check = false; //Byref - $opts['fragment'] = sectionID($match[0], $check); - } - - trigger_event('ACTION_SHOW_REDIRECT',$opts,'act_redirect_execute'); -} - -/** - * Execute the redirect - * - * @param array $opts id and fragment for the redirect and the preact - */ -function act_redirect_execute($opts){ - $go = wl($opts['id'],'',true); - if(isset($opts['fragment'])) $go .= '#'.$opts['fragment']; - - //show it - send_redirect($go); -} - -/** - * Handle 'login', 'logout' - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $act action command - * @return string action command - */ -function act_auth($act){ - global $ID; - global $INFO; - /* @var Input $INPUT */ - global $INPUT; - - //already logged in? - if($INPUT->server->has('REMOTE_USER') && $act=='login'){ - return 'show'; - } - - //handle logout - if($act=='logout'){ - $lockedby = checklock($ID); //page still locked? - if($lockedby == $INPUT->server->str('REMOTE_USER')){ - unlock($ID); //try to unlock - } - - // do the logout stuff - auth_logoff(); - - // rebuild info array - $INFO = pageinfo(); - - act_redirect($ID,'login'); - } - - return $act; -} - -/** - * Handle 'edit', 'preview', 'recover' - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $act action command - * @return string action command - */ -function act_edit($act){ - global $ID; - global $INFO; - - global $TEXT; - global $RANGE; - global $PRE; - global $SUF; - global $REV; - global $SUM; - global $lang; - global $DATE; - - if (!isset($TEXT)) { - if ($INFO['exists']) { - if ($RANGE) { - list($PRE,$TEXT,$SUF) = rawWikiSlices($RANGE,$ID,$REV); - } else { - $TEXT = rawWiki($ID,$REV); - } - } else { - $TEXT = pageTemplate($ID); - } - } - - //set summary default - if(!$SUM){ - if($REV){ - $SUM = sprintf($lang['restored'], dformat($REV)); - }elseif(!$INFO['exists']){ - $SUM = $lang['created']; - } - } - - // Use the date of the newest revision, not of the revision we edit - // This is used for conflict detection - if(!$DATE) $DATE = @filemtime(wikiFN($ID)); - - //check if locked by anyone - if not lock for my self - //do not lock when the user can't edit anyway - if ($INFO['writable']) { - $lockedby = checklock($ID); - if($lockedby) return 'locked'; - - lock($ID); - } - - return $act; -} - -/** - * Export a wiki page for various formats - * - * Triggers ACTION_EXPORT_POSTPROCESS - * - * Event data: - * data['id'] -- page id - * data['mode'] -- requested export mode - * data['headers'] -- export headers - * data['output'] -- export output - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Michael Klier <chi@chimeric.de> - * - * @param string $act action command - * @return string action command - */ -function act_export($act){ - global $ID; - global $REV; - global $conf; - global $lang; - - $pre = ''; - $post = ''; - $headers = array(); - - // search engines: never cache exported docs! (Google only currently) - $headers['X-Robots-Tag'] = 'noindex'; - - $mode = substr($act,7); - switch($mode) { - case 'raw': - $headers['Content-Type'] = 'text/plain; charset=utf-8'; - $headers['Content-Disposition'] = 'attachment; filename='.noNS($ID).'.txt'; - $output = rawWiki($ID,$REV); - break; - case 'xhtml': - $pre .= '<!DOCTYPE html>' . DOKU_LF; - $pre .= '<html lang="'.$conf['lang'].'" dir="'.$lang['direction'].'">' . DOKU_LF; - $pre .= '<head>' . DOKU_LF; - $pre .= ' <meta charset="utf-8" />' . DOKU_LF; - $pre .= ' <title>'.$ID.'</title>' . DOKU_LF; - - // get metaheaders - ob_start(); - tpl_metaheaders(); - $pre .= ob_get_clean(); - - $pre .= '</head>' . DOKU_LF; - $pre .= '<body>' . DOKU_LF; - $pre .= '<div class="dokuwiki export">' . DOKU_LF; - - // get toc - $pre .= tpl_toc(true); - - $headers['Content-Type'] = 'text/html; charset=utf-8'; - $output = p_wiki_xhtml($ID,$REV,false); - - $post .= '</div>' . DOKU_LF; - $post .= '</body>' . DOKU_LF; - $post .= '</html>' . DOKU_LF; - break; - case 'xhtmlbody': - $headers['Content-Type'] = 'text/html; charset=utf-8'; - $output = p_wiki_xhtml($ID,$REV,false); - break; - default: - $output = p_cached_output(wikiFN($ID,$REV), $mode, $ID); - $headers = p_get_metadata($ID,"format $mode"); - break; - } - - // prepare event data - $data = array(); - $data['id'] = $ID; - $data['mode'] = $mode; - $data['headers'] = $headers; - $data['output'] =& $output; - - trigger_event('ACTION_EXPORT_POSTPROCESS', $data); - - if(!empty($data['output'])){ - if(is_array($data['headers'])) foreach($data['headers'] as $key => $val){ - header("$key: $val"); - } - print $pre.$data['output'].$post; - exit; - } - return 'show'; -} - -/** - * Handle sitemap delivery - * - * @author Michael Hamann <michael@content-space.de> - * - * @param string $act action command - */ -function act_sitemap($act) { - global $conf; - - if ($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) { - http_status(404); - print "Sitemap generation is disabled."; - exit; - } - - $sitemap = Sitemapper::getFilePath(); - if (Sitemapper::sitemapIsCompressed()) { - $mime = 'application/x-gzip'; - }else{ - $mime = 'application/xml; charset=utf-8'; - } - - // Check if sitemap file exists, otherwise create it - if (!is_readable($sitemap)) { - Sitemapper::generate(); - } - - if (is_readable($sitemap)) { - // Send headers - header('Content-Type: '.$mime); - header('Content-Disposition: attachment; filename='.utf8_basename($sitemap)); - - http_conditionalRequest(filemtime($sitemap)); - - // Send file - //use x-sendfile header to pass the delivery to compatible webservers - http_sendfile($sitemap); - - readfile($sitemap); - exit; - } - - http_status(500); - print "Could not read the sitemap file - bad permissions?"; - exit; -} - -/** - * Handle page 'subscribe' - * - * Throws exception on error. - * - * @author Adrian Lang <lang@cosmocode.de> - * - * @param string $act action command - * @return string action command - * @throws Exception if (un)subscribing fails - */ -function act_subscription($act){ - global $lang; - global $INFO; - global $ID; - /* @var Input $INPUT */ - global $INPUT; - - // subcriptions work for logged in users only - if(!$INPUT->server->str('REMOTE_USER')) return 'show'; - - // get and preprocess data. - $params = array(); - foreach(array('target', 'style', 'action') as $param) { - if ($INPUT->has("sub_$param")) { - $params[$param] = $INPUT->str("sub_$param"); - } - } - - // any action given? if not just return and show the subscription page - if(empty($params['action']) || !checkSecurityToken()) return $act; - - // Handle POST data, may throw exception. - trigger_event('ACTION_HANDLE_SUBSCRIBE', $params, 'subscription_handle_post'); - - $target = $params['target']; - $style = $params['style']; - $action = $params['action']; - - // Perform action. - $sub = new Subscription(); - if($action == 'unsubscribe'){ - $ok = $sub->remove($target, $INPUT->server->str('REMOTE_USER'), $style); - }else{ - $ok = $sub->add($target, $INPUT->server->str('REMOTE_USER'), $style); - } - - if($ok) { - msg(sprintf($lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']), - prettyprint_id($target)), 1); - act_redirect($ID, $act); - } else { - throw new Exception(sprintf($lang["subscr_{$action}_error"], - hsc($INFO['userinfo']['name']), - prettyprint_id($target))); - } - - // Assure that we have valid data if act_redirect somehow fails. - $INFO['subscribed'] = $sub->user_subscription(); - return 'show'; -} - -/** - * Validate POST data - * - * Validates POST data for a subscribe or unsubscribe request. This is the - * default action for the event ACTION_HANDLE_SUBSCRIBE. - * - * @author Adrian Lang <lang@cosmocode.de> - * - * @param array &$params the parameters: target, style and action - * @throws Exception - */ -function subscription_handle_post(&$params) { - global $INFO; - global $lang; - /* @var Input $INPUT */ - global $INPUT; - - // Get and validate parameters. - if (!isset($params['target'])) { - throw new Exception('no subscription target given'); - } - $target = $params['target']; - $valid_styles = array('every', 'digest'); - if (substr($target, -1, 1) === ':') { - // Allow “list†subscribe style since the target is a namespace. - $valid_styles[] = 'list'; - } - $style = valid_input_set('style', $valid_styles, $params, - 'invalid subscription style given'); - $action = valid_input_set('action', array('subscribe', 'unsubscribe'), - $params, 'invalid subscription action given'); - - // Check other conditions. - if ($action === 'subscribe') { - if ($INFO['userinfo']['mail'] === '') { - throw new Exception($lang['subscr_subscribe_noaddress']); - } - } elseif ($action === 'unsubscribe') { - $is = false; - foreach($INFO['subscribed'] as $subscr) { - if ($subscr['target'] === $target) { - $is = true; - } - } - if ($is === false) { - throw new Exception(sprintf($lang['subscr_not_subscribed'], - $INPUT->server->str('REMOTE_USER'), - prettyprint_id($target))); - } - // subscription_set deletes a subscription if style = null. - $style = null; - } - - $params = compact('target', 'style', 'action'); -} - -//Setup VIM: ex: et ts=2 : diff --git a/inc/common.php b/inc/common.php index 9a1da79075cd016ad371dd276aac49e306306bd7..4f8e684bf46c191fba3864e292ee542e894afed9 100644 --- a/inc/common.php +++ b/inc/common.php @@ -382,9 +382,9 @@ function breadcrumbs() { //first visit? $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); - //we only save on show and existing wiki documents + //we only save on show and existing visible wiki documents $file = wikiFN($ID); - if($ACT != 'show' || !file_exists($file)) { + if($ACT != 'show' || isHiddenPage($ID) || !file_exists($file)) { $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } @@ -1111,6 +1111,7 @@ function parsePageTemplate(&$data) { array( '@ID@', '@NS@', + '@CURNS@', '@FILE@', '@!FILE@', '@!FILE!@', @@ -1126,6 +1127,7 @@ function parsePageTemplate(&$data) { array( $id, getNS($id), + curNS($id), $file, utf8_ucfirst($file), utf8_strtoupper($file), @@ -1924,7 +1926,16 @@ function send_redirect($url) { header('Location: '.$url); } - if(defined('DOKU_UNITTEST')) return; // no exits during unit tests + // no exits during unit tests + if(defined('DOKU_UNITTEST')) { + // pass info about the redirect back to the test suite + $testRequest = TestRequest::getRunning(); + if($testRequest !== null) { + $testRequest->addData('send_redirect', $url); + } + return; + } + exit; } diff --git a/inc/confutils.php b/inc/confutils.php index fb9a3edd7a5b66cdb70cbcf82f8dc6e474258249..f753b18c2a81e96be17a0bd51161d6a01c3ccd3e 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -208,22 +208,23 @@ function getSchemes() { * * @return array */ -function linesToHash($lines, $lower=false) { +function linesToHash($lines, $lower = false) { $conf = array(); // remove BOM - if (isset($lines[0]) && substr($lines[0],0,3) == pack('CCC',0xef,0xbb,0xbf)) - $lines[0] = substr($lines[0],3); - foreach ( $lines as $line ) { + if(isset($lines[0]) && substr($lines[0], 0, 3) == pack('CCC', 0xef, 0xbb, 0xbf)) + $lines[0] = substr($lines[0], 3); + foreach($lines as $line) { //ignore comments (except escaped ones) - $line = preg_replace('/(?<![&\\\\])#.*$/','',$line); - $line = str_replace('\\#','#',$line); + $line = preg_replace('/(?<![&\\\\])#.*$/', '', $line); + $line = str_replace('\\#', '#', $line); $line = trim($line); - if(empty($line)) continue; - $line = preg_split('/\s+/',$line,2); + if($line === '') continue; + $line = preg_split('/\s+/', $line, 2); + $line = array_pad($line, 2, ''); // Build the associative array - if($lower){ + if($lower) { $conf[strtolower($line[0])] = $line[1]; - }else{ + } else { $conf[$line[0]] = $line[1]; } } diff --git a/inc/html.php b/inc/html.php index 1454edbf82b0df985ac29239d3e5d0ac8225c3d9..ca72934f5b21d8509eb2617a0d39d85029d2c311 100644 --- a/inc/html.php +++ b/inc/html.php @@ -8,6 +8,10 @@ if(!defined('DOKU_INC')) die('meh.'); if(!defined('NL')) define('NL',"\n"); +if (!defined('SEC_EDIT_PATTERN')) { + define('SEC_EDIT_PATTERN', '#<!-- EDIT(?<secid>\d+) (?<target>[A-Z_]+) (?:"(?<name>[^"]*)" )?(?:"(?<hid>[^"]*)" )?\[(?<range>\d+-\d*)\] -->#'); +} + /** * Convenience function to quickly build a wikilink @@ -32,8 +36,10 @@ function html_wikilink($id,$name=null,$search=''){ * The loginform * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param bool $svg Whether to show svg icons in the register and resendpwd links or not */ -function html_login(){ +function html_login($svg = false){ global $lang; global $conf; global $ID; @@ -54,11 +60,13 @@ function html_login(){ $form->endFieldset(); if(actionOK('register')){ - $form->addElement('<p>'.$lang['reghere'].': '.tpl_actionlink('register','','','',true).'</p>'); + $registerLink = (new \dokuwiki\Menu\Item\Register())->asHtmlLink('', $svg); + $form->addElement('<p>'.$lang['reghere'].': '. $registerLink .'</p>'); } if (actionOK('resendpwd')) { - $form->addElement('<p>'.$lang['pwdforget'].': '.tpl_actionlink('resendpwd','','','',true).'</p>'); + $resendPwLink = (new \dokuwiki\Menu\Item\Resendpwd())->asHtmlLink('', $svg); + $form->addElement('<p>'.$lang['pwdforget'].': '. $resendPwLink .'</p>'); } html_form('login', $form); @@ -91,13 +99,11 @@ function html_denied() { function html_secedit($text,$show=true){ global $INFO; - $regexp = '#<!-- EDIT(\d+) ([A-Z_]+) (?:"([^"]*)" )?\[(\d+-\d*)\] -->#'; - if(!$INFO['writable'] || !$show || $INFO['rev']){ - return preg_replace($regexp,'',$text); + return preg_replace(SEC_EDIT_PATTERN,'',$text); } - return preg_replace_callback($regexp, + return preg_replace_callback(SEC_EDIT_PATTERN, 'html_secedit_button', $text); } @@ -112,11 +118,16 @@ function html_secedit($text,$show=true){ * @triggers HTML_SECEDIT_BUTTON */ function html_secedit_button($matches){ - $data = array('secid' => $matches[1], - 'target' => strtolower($matches[2]), - 'range' => $matches[count($matches) - 1]); - if (count($matches) === 5) { - $data['name'] = $matches[3]; + $data = array('secid' => $matches['secid'], + 'target' => strtolower($matches['target']), + 'range' => $matches['range']); + + if (!empty($matches['hid'])) { + $data['hid'] = strtolower($matches['hid']); + } + + if (!empty($matches['name'])) { + $data['name'] = $matches['name']; } return trigger_event('HTML_SECEDIT_BUTTON', $data, @@ -163,7 +174,7 @@ function html_secedit_get_button($data) { function html_topbtn(){ global $lang; - $ret = '<a class="nolink" href="#dokuwiki__top"><input type="button" class="button" value="'.$lang['btn_top'].'" onclick="window.scrollTo(0, 0)" title="'.$lang['btn_top'].'" /></a>'; + $ret = '<a class="nolink" href="#dokuwiki__top"><button class="button" onclick="window.scrollTo(0, 0)" title="'.$lang['btn_top'].'">'.$lang['btn_top'].'</button></a>'; return $ret; } @@ -181,9 +192,10 @@ function html_topbtn(){ * @param string $method * @param string $tooltip * @param bool|string $label label text, false: lookup btn_$name in localization + * @param string $svg (optional) svg code, inserted into the button * @return string */ -function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label=false){ +function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label=false, $svg=null){ global $conf; global $lang; @@ -210,14 +222,14 @@ function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label if(is_array($params)){ foreach($params as $key => $val) { $ret .= '<input type="hidden" name="'.$key.'" '; - $ret .= 'value="'.htmlspecialchars($val).'" />'; + $ret .= 'value="'.hsc($val).'" />'; } } if ($tooltip!='') { - $tip = htmlspecialchars($tooltip); + $tip = hsc($tooltip); }else{ - $tip = htmlspecialchars($label); + $tip = hsc($label); } $ret .= '<button type="submit" '; @@ -226,7 +238,12 @@ function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label $ret .= 'accesskey="'.$akey.'" '; } $ret .= 'title="'.$tip.'">'; - $ret .= hsc($label); + if ($svg) { + $ret .= '<span>' . hsc($label) . '</span>'; + $ret .= inlineSVG($svg); + } else { + $ret .= hsc($label); + } $ret .= '</button>'; $ret .= '</div></form>'; @@ -368,15 +385,6 @@ function html_search(){ $intro ); echo $intro; - flush(); - - //show progressbar - print '<div id="dw__loading">'.NL; - print '<script type="text/javascript">/*<![CDATA[*/'.NL; - print 'showLoadBar();'.NL; - print '/*!]]>*/</script>'.NL; - print '</div>'.NL; - flush(); //do quick pagesearch $data = ft_pageLookup($QUERY,true,useHeading('navigation')); @@ -404,7 +412,6 @@ function html_search(){ print '<div class="clearer"></div>'; print '</div>'; } - flush(); //do fulltext search $regex = array(); @@ -425,18 +432,11 @@ function html_search(){ } $num++; } - flush(); } print '</dl>'; }else{ print '<div class="nothing">'.$lang['nothingfound'].'</div>'; } - - //hide progressbar - print '<script type="text/javascript">/*<![CDATA[*/'.NL; - print 'hideLoadBar("dw__loading");'.NL; - print '/*!]]>*/</script>'.NL; - flush(); } /** @@ -582,7 +582,7 @@ function html_revisions($first=0, $media_id = false){ if($summary) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); if(!$media_id) $form->addElement(' – '); - $form->addElement('<bdi>' . htmlspecialchars($summary) . '</bdi>'); + $form->addElement('<bdi>' . hsc($summary) . '</bdi>'); $form->addElement(form_makeCloseTag('span')); } @@ -665,7 +665,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(' – '); - $form->addElement('<bdi>'.htmlspecialchars($info['sum']).'</bdi>'); + $form->addElement('<bdi>'.hsc($info['sum']).'</bdi>'); $form->addElement(form_makeCloseTag('span')); } @@ -876,7 +876,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(' – ' . hsc($recent['sum'])); $form->addElement(form_makeCloseTag('span')); $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); @@ -949,7 +949,7 @@ function html_index($ns){ $ns = utf8_encodeFN(str_replace(':','/',$ns)); echo p_locale_xhtml('index'); - echo '<div id="index__tree">'; + echo '<div id="index__tree" class="index__tree">'; $data = array(); search($data,$conf['datadir'],'search_index',array('ns' => $ns)); @@ -1062,7 +1062,8 @@ function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapp return ''; } - $start_level = $data[0]['level']; + $firstElement = reset($data); + $start_level = $firstElement['level']; $level = $start_level; $ret = ''; $open = 0; @@ -1866,6 +1867,9 @@ function html_edit(){ } $form->addHidden('target', $data['target']); + if ($INPUT->has('hid')) { + $form->addHidden('hid', $INPUT->str('hid')); + } $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')); @@ -1901,8 +1905,8 @@ function html_edit(){ <div class="editBox" role="application"> <div class="toolbar group"> - <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']?>" + <div id="draft__status" class="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div> + <div id="tool__bar" class="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 @@ -2109,7 +2113,7 @@ function html_TOC($toc){ if(!count($toc)) return ''; global $lang; $out = '<!-- TOC START -->'.DOKU_LF; - $out .= '<div id="dw__toc">'.DOKU_LF; + $out .= '<div id="dw__toc" class="dw__toc">'.DOKU_LF; $out .= '<h3 class="toggle">'; $out .= $lang['toc']; $out .= '</h3>'.DOKU_LF; diff --git a/inc/infoutils.php b/inc/infoutils.php index 933eb7cceec02c8a79d7840cd3c9c3d583a24b0b..57f89e508c56663155b183c93bb54b60f8fbad58 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -6,7 +6,14 @@ * @author Andreas Gohr <andi@splitbrain.org> */ if(!defined('DOKU_INC')) die('meh.'); -if(!defined('DOKU_MESSAGEURL')) define('DOKU_MESSAGEURL','http://update.dokuwiki.org/check/'); + +if(!defined('DOKU_MESSAGEURL')){ + if(in_array('ssl', stream_get_transports())) { + define('DOKU_MESSAGEURL','https://update.dokuwiki.org/check/'); + }else{ + define('DOKU_MESSAGEURL','http://update.dokuwiki.org/check/'); + } +} /** * Check for new messages from upstream @@ -22,11 +29,12 @@ function checkUpdateMessages(){ $cf = getCacheName($updateVersion, '.updmsg'); $lm = @filemtime($cf); + $is_http = substr(DOKU_MESSAGEURL, 0, 5) != 'https'; // check if new messages needs to be fetched if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){ @touch($cf); - dbglog("checkUpdateMessages(): downloading messages to ".$cf); + dbglog("checkUpdateMessages(): downloading messages to ".$cf.($is_http?' (without SSL)':' (with SSL)')); $http = new DokuHTTPClient(); $http->timeout = 12; $resp = $http->get(DOKU_MESSAGEURL.$updateVersion); diff --git a/inc/init.php b/inc/init.php index 4e4cd6450f6f158ac633aa060bf8242a59b3a9ca..ba6743f95f891ad2b79d1c745936c088cbf10728 100644 --- a/inc/init.php +++ b/inc/init.php @@ -3,6 +3,7 @@ * Initialize some defaults needed for DokuWiki */ + /** * timing Dokuwiki execution * @@ -41,6 +42,9 @@ if (!defined('DOKU_E_LEVEL')) { error_reporting(DOKU_E_LEVEL); } +// avoid caching issues #1594 +header('Vary: Cookie'); + // init memory caches global $cache_revinfo; $cache_revinfo = array(); @@ -479,23 +483,31 @@ function getBaseURL($abs=null){ * * @returns bool true when SSL is active */ -function is_ssl(){ +function is_ssl() { // check if we are behind a reverse proxy - if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { - if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { - return true; - } else { - return false; - } + if(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { + return true; + } else { + return false; + } } - if (!isset($_SERVER['HTTPS']) || - preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){ + if(!isset($_SERVER['HTTPS']) || + preg_match('/^(|off|false|disabled)$/i', $_SERVER['HTTPS'])) { return false; - }else{ + } else { return true; } } +/** + * checks it is windows OS + * @return bool + */ +function isWindows() { + return (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false; +} + /** * print a nice message even if no styles are loaded yet. * @@ -515,6 +527,9 @@ function nice_die($msg){ </body> </html> EOT; + if(defined('DOKU_UNITTEST')) { + throw new RuntimeException('nice_die: '.$msg); + } exit(1); } diff --git a/inc/lang/be/admin.txt b/inc/lang/be/admin.txt new file mode 100644 index 0000000000000000000000000000000000000000..40fc5fbcd581f0fcb018dd0e9351e4b4e400ae69 --- /dev/null +++ b/inc/lang/be/admin.txt @@ -0,0 +1,3 @@ +====== Кіраванне ====== + +ÐіжÑй вы зможаце знайÑці ÑÐ¿Ñ–Ñ Ð°Ð´Ð¼Ñ–Ð½Ñ–Ñтрацыйных аперацый, даÑтупных у «ДокуВікі». \ No newline at end of file diff --git a/inc/lang/be/adminplugins.txt b/inc/lang/be/adminplugins.txt new file mode 100644 index 0000000000000000000000000000000000000000..c5aa5d70dbdb8d766d21b435bf549a67825a8e18 --- /dev/null +++ b/inc/lang/be/adminplugins.txt @@ -0,0 +1 @@ +===== Ð”Ð°Ð´Ð°Ñ‚ÐºÐ¾Ð²Ñ‹Ñ ÑžÐ±ÑƒÐ´Ð¾Ð²Ñ‹ ===== \ No newline at end of file diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index fe2f893660196391d948a422936fbf7542799995..11620f8259456787ea1849704d98c82c60621ab2 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -358,4 +358,3 @@ $lang['page_nonexist_rev'] = 'Stránka neexistovala na %s. Byla vytvoÅ™ena d $lang['unable_to_parse_date'] = 'Nelze rozebrat parametr "%s".'; $lang['email_signature_text'] = 'Tento e-mail byl automaticky vygenerován systémem DokuWiki @DOKUWIKIURL@'; -$lang['email_signature_html'] = ' '; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 00f027045a251d7ce8799bfdc4c0801a4205d922..b0e72c2856ec3454822f8bb4049274d31b3e0b64 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kenneth Schack Banner <kescba@gmail.com> + * @author Jon Theil Nielsen <jontheil@gmail.com> * @author koeppe <koeppe@kazur.dk> * @author Jon Bendtsen <bendtsen@diku.dk> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> @@ -11,14 +13,12 @@ * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> * @author Soren Birk <soer9648@hotmail.com> * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> * @author Søren Birk <sbi@eucl.dk> - * @author Søren Birk <soer9648@eucl.dk> * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index fb5fe9b3d7813541ad4d962a42496aa45ad4efec..c3f742e89b21e5ff207a30e87af724c5175f51d2 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author F. Mueller-Donath <j.felix@mueller-donath.de> * @author Andreas Gohr <andi@splitbrain.org> * @author Christof <gagi@fin.de> * @author Anika Henke <anika@selfthinker.org> @@ -23,8 +24,6 @@ * @author Volker Bödker <volker@boedker.de> * @author Janosch <janosch@moinzen.de> * @author rnck <dokuwiki@rnck.de> - * @author Felix <j.felix@mueller-donath.de> - * @author Felix Müller-Donath <j.felix@mueller-donath.de> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -156,7 +155,7 @@ $lang['js']['linkto'] = 'Link zu:'; $lang['js']['del_confirm'] = 'Die ausgewählten Dateien wirklich löschen?'; $lang['js']['restore_confirm'] = 'Wirklich diese Version wiederherstellen?'; $lang['js']['media_diff'] = 'Unterschiede anzeigen:'; -$lang['js']['media_diff_both'] = 'Seite für Seite'; +$lang['js']['media_diff_both'] = 'Nebeneinander'; $lang['js']['media_diff_opacity'] = 'Überblenden'; $lang['js']['media_diff_portions'] = 'Übergang'; $lang['js']['media_select'] = 'Dateien auswählen…'; @@ -200,7 +199,7 @@ $lang['diff2'] = 'Zeige Unterschiede der ausgewählten Versionen $lang['difflink'] = 'Link zu der Vergleichsansicht'; $lang['diff_type'] = 'Unterschiede anzeigen:'; $lang['diff_inline'] = 'Inline'; -$lang['diff_side'] = 'Side by Side'; +$lang['diff_side'] = 'Nebeneinander'; $lang['diffprevrev'] = 'Vorherige Überarbeitung'; $lang['diffnextrev'] = 'Nächste Überarbeitung'; $lang['difflastrev'] = 'Letzte Überarbeitung'; @@ -355,5 +354,6 @@ $lang['searchresult'] = 'Suchergebnis'; $lang['plainhtml'] = 'Reines HTML'; $lang['wikimarkup'] = 'Wiki Markup'; $lang['page_nonexist_rev'] = 'Seite existierte nicht an der Stelle %s. Sie wurde an folgende Stelle erstellt: <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.'; $lang['email_signature_text'] = 'Diese E-Mail wurde erzeugt vom DokuWiki unter @DOKUWIKIURL@'; diff --git a/inc/lang/de/conflict.txt b/inc/lang/de/conflict.txt index dc44f71c0c5247418f19628971156eacd2f7241b..0d0283bf3ba8b1b1583baea97d5a212f379222fe 100644 --- a/inc/lang/de/conflict.txt +++ b/inc/lang/de/conflict.txt @@ -1,6 +1,6 @@ ====== Es gibt eine neuere Version ====== -Eine neuere Version des aktuell in Bearbeitung befindlichen Dokuments existiert. Das heißt, jemand hat parallel an der selben Seite gearbeitet und zuerst gespeichert. +Es existiert eine neuere Version des aktuell in Bearbeitung befindlichen Dokumentes. Das heißt, jemand hat parallel an der selben Seite gearbeitet und zuerst gespeichert. Die unten aufgeführten Unterschiede können bei der Entscheidung helfen, welchem Dokument Vorrang gewährt wird. Wählen Sie **''[Speichern]''** zum Sichern Ihrer Version oder **''[Abbrechen]''**, um Ihre Version zu verwerfen und die zuerst gespeicherte Seite zu behalten. diff --git a/inc/lang/de/diff.txt b/inc/lang/de/diff.txt index 82fbbc25294ed49e96febfb42f82be927d125c5e..3747da85ee309b3da1ceb4956211cd86b2a7aab6 100644 --- a/inc/lang/de/diff.txt +++ b/inc/lang/de/diff.txt @@ -1,5 +1,5 @@ ====== Unterschiede ====== -Hier werden die Unterschiede zwischen zwei Versionen gezeigt. +Hier werden die Unterschiede zwischen zwei Versionen angezeigt. diff --git a/inc/lang/de/draft.txt b/inc/lang/de/draft.txt index 77a55b1651c8c727d2a69810ce413045b17bc5ea..17d5d318efde84021248c4765cd72bffbb66df97 100644 --- a/inc/lang/de/draft.txt +++ b/inc/lang/de/draft.txt @@ -2,5 +2,5 @@ Ihre letzte Bearbeitungssitzung wurde nicht ordnungsgemäß abgeschlossen. DokuWiki hat während Ihrer Arbeit automatisch einen Zwischenentwurf gespeichert, den Sie jetzt nutzen können, um Ihre Arbeit fortzusetzen. Unten sehen Sie die Daten, die bei Ihrer letzten Sitzung gespeichert wurden. -Bitte entscheiden Sie, ob Sie den Entwurf //wiederherstellen// oder //löschen// wollen oder ob Sie die Bearbeitung abbrechen möchten. +Bitte entscheiden Sie, ob Sie den Entwurf //wiederherstellen// oder //löschen// wollen, oder ob Sie die Bearbeitung abbrechen möchten. diff --git a/inc/lang/de/edit.txt b/inc/lang/de/edit.txt index 15e02c61ab314ab8fe8e1a35ce7407c2386734ff..6e56d25cb095f30493a4f0dccb376630a064d8f9 100644 --- a/inc/lang/de/edit.txt +++ b/inc/lang/de/edit.txt @@ -1,4 +1,4 @@ -Bitte nur editieren, falls das Dokument **verbessert** werden kann. - -Nach dem Bearbeiten den **''[Speichern]''**-Knopf drücken. Siehe [[wiki:syntax]] zur Wiki-Syntax. Zum Testen bitte erst im [[playground:playground|Spielplatz]] üben. +Seite Bearbeiten und **''[Speichern]''** drücken. Siehe [[wiki:syntax]] zur Wiki-Syntax. +Bitte nur editieren, falls das Dokument tatsächlich **verbessert** werden kann. +Zum Testen bitte erst im [[playground:playground|Spielplatz]] üben. diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index b77ef75adb947bb4548b1577005f792754a59dd3..7ae6940e8935f834992b4980f77231236ff35d9d 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -3,6 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Joel Strasser <strasser999@gmail.com> + * @author Robert Riebisch <robert.riebisch@googlemail.com> + * @author Joerg <scooter22@gmx.de> * @author Andreas Gohr <andi@splitbrain.org> * @author Christof <gagi@fin.de> * @author Anika Henke <anika@selfthinker.org> @@ -23,7 +26,6 @@ * @author Pierre Corell <info@joomla-praxis.de> * @author Mateng Schimmerlos <mateng@firemail.de> * @author Benedikt Fey <spam@lifeisgoooood.de> - * @author Joerg <scooter22@gmx.de> * @author Simon <st103267@stud.uni-stuttgart.de> * @author Hoisl <hoisl@gmx.at> * @author Marcel Eickhoff <eickhoff.marcel@gmail.com> @@ -58,7 +60,7 @@ $lang['btn_secedit'] = 'Bearbeiten'; $lang['btn_login'] = 'Anmelden'; $lang['btn_logout'] = 'Abmelden'; $lang['btn_admin'] = 'Admin'; -$lang['btn_update'] = 'Updaten'; +$lang['btn_update'] = 'Aktualisieren'; $lang['btn_delete'] = 'Löschen'; $lang['btn_back'] = 'Zurück'; $lang['btn_backlink'] = 'Links hierher'; @@ -106,11 +108,11 @@ $lang['profna'] = 'Änderung des Benutzerprofils in diesem Wiki n $lang['profnochange'] = 'Keine Änderungen, nichts zu tun.'; $lang['profnoempty'] = 'Es muss ein Name und eine E-Mail-Adresse angegeben werden.'; $lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.'; -$lang['profnodelete'] = 'Dieses Wiki unterstützt nicht das Löschen von Benutzern.'; +$lang['profnodelete'] = 'Dieses Wiki unterstützt kein Löschen von Benutzern.'; $lang['profdeleteuser'] = 'Benutzerprofil löschen'; $lang['profdeleted'] = 'Ihr Benutzerprofil wurde im Wiki gelöscht.'; -$lang['profconfdelete'] = 'Ich möchte mein Benutzerprofil löschen.<br/> Diese Aktion ist nicht umkehrbar.'; -$lang['profconfdeletemissing'] = 'Bestätigung im Ankreuzkästchen fehlt'; +$lang['profconfdelete'] = 'Ich möchte mein Benutzerprofil löschen.<br/> Diese Aktion lässt sich nicht rückgängig machen,'; +$lang['profconfdeletemissing'] = 'Bestätigung in Kontrollkästchen fehlt'; $lang['proffail'] = 'Das Benutzerkonto konnte nicht aktualisiert werden.'; $lang['pwdforget'] = 'Passwort vergessen? Fordern Sie ein neues an'; $lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 2e7d368e228749a8fe4a461a4ba54a0c6dbe666e..5bb0e5eaf96f97f1517d2edc24b8aa4aa3d6e42b 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -370,5 +370,5 @@ $lang['page_nonexist_rev'] = 'Page did not exist at %s. It was subsequently $lang['unable_to_parse_date'] = 'Unable to parse at parameter "%s".'; $lang['email_signature_text'] = 'This mail was generated by DokuWiki at @DOKUWIKIURL@'; -$lang['email_signature_html'] = ''; -//Setup VIM: ex: et ts=2 : +#$lang['email_signature_html'] = ''; # the empty default will copy the text signature, you can override it in a local lang file + diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index fdccb899dd22280e8ca1e9a268364cc82152a156..b48efe5cf811e3361bad07bf9ce9517dd8324619 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -3,13 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> * @author Antono Vasiljev <esperanto.minsk ĈE tut.by> * @author Felipe Castro <fefcas@yahoo.com.br> - * @author Felipe Castro <fefcas@uol.com.br> - * @author Felipe Castro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -75,6 +73,7 @@ $lang['regmissing'] = 'Pardonu, vi devas plenigi ĉiujn kampojn.'; $lang['reguexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; $lang['regsuccess'] = 'La uzanto kreiÄis kaj la pasvorto sendiÄis per retpoÅto.'; $lang['regsuccess2'] = 'La uzanto kreiÄis.'; +$lang['regfail'] = 'Ne eblis krei uzanton.'; $lang['regmailfail'] = 'Åœajne okazis eraro dum elsendo de la pasvorto. Bonvolu informi administranton pri tio!'; $lang['regbadmail'] = 'Entajpita retpoÅta adreso Åajnas ne valida. Se vi pensas, ke tio estas eraro, kontaktu la administranton.'; $lang['regbadpass'] = 'La du pasvortoj ne samas, bonvolu provi refoje.'; @@ -89,6 +88,7 @@ $lang['profdeleteuser'] = 'Forigi aliÄon'; $lang['profdeleted'] = 'Via uzant-aliÄo estis forigata de tiu ĉi vikio'; $lang['profconfdelete'] = 'Mi deziras forigi mian aliÄon de tiu ĉi vikio. <br/> Tiu ĉi ago ne povos esti malfarata.'; $lang['profconfdeletemissing'] = 'Konfirmilo ne estas markita'; +$lang['proffail'] = 'La uzantokonto ne estis aktualigita.'; $lang['pwdforget'] = 'Ĉu vi forgesis vian pasvorton? Prenu novan'; $lang['resendna'] = 'Tiu ĉi vikio ne ebligas resendon de la pasvortoj.'; $lang['resendpwd'] = 'Sendi novan pasvorton al'; @@ -337,5 +337,5 @@ $lang['currentns'] = 'Aktuala nomspaco'; $lang['searchresult'] = 'Serĉrezulto'; $lang['plainhtml'] = 'Plena HTML'; $lang['wikimarkup'] = 'Vikiteksto'; -$lang['email_signature_text'] = 'Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe +$lang['email_signature_text'] = 'Tiu ĉi mesaÄo kreiÄis de DokuWiki ĉe @DOKUWIKIURL@'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 9f14918d2d759a7ea0232860707f892f5e7c17c1..f7f9dd80991e48532d8a432b322a5f096f451e22 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Michael Bohn <mjbohn@gmail.com> + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author Sébastien Bauer <sebastien.bauer@advalvas.be> * @author Antoine Fixary <antoine.fixary@freesbee.fr> * @author cumulus <pta-n56@myamail.com> @@ -21,8 +23,6 @@ * @author Florian Gaub <floriang@floriang.net> * @author Samuel Dorsaz <samuel.dorsaz@novelion.net> * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author schplurtz@laposte.net - * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> @@ -33,7 +33,6 @@ * @author ggallon <gwenael.gallon@mac.com> * @author David VANTYGHEM <david.vantyghem@free.fr> * @author Caillot <remicaillot5@gmail.com> - * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author YoBoY <yoboy@ubuntu-fr.org> * @author james <j.mccann@celcat.com> * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 49f17c3e4306cfd566511e011baa068f520ee460..7c7f52f531eea5929c795a24776e71da87d5edd2 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Guy Yakobovitch <guy.yakobovitch@gmail.com> * @author ×’×™× ×©×¤×¨ <guysoft@ort.org.il> * @author Denis Simakov <akinoame1@gmail.com> * @author Dotan Kamber <kamberd@yahoo.com> @@ -349,5 +350,5 @@ $lang['searchresult'] = 'תוצ×ות חיפוש'; $lang['plainhtml'] = 'HTML פשוט'; $lang['page_nonexist_rev'] = 'העמוד ×œ× ×§×™×™× ×‘%s. העמוד × ×•×¦×¨ ×‘×ž×§×•× ×–×ת ב<a href="%s">%s</a>.'; $lang['unable_to_parse_date'] = '×œ× × ×™×ª×Ÿ ×œ×¤×¢× ×— פרמטר "%s".'; -$lang['email_signature_text'] = 'הודעת דו×״ל זו × ×•×¦×¨×” על ידי ×”Ö¾DokuWiki הזמין בכתובת +$lang['email_signature_text'] = 'הודעת דו×״ל זו × ×•×¦×¨×” על ידי ×”Ö¾DokuWiki הזמין בכתובת @DOKUWIKIURL@'; diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index ce86b945784d873779d7e33711c44944289faa81..b30e6f04eeb36fa383addebc29be30312aec731b 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -3,11 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Davor Turkalj <turki.bsc@gmail.com> * @author Tomo Krajina <aaa@puzz.info> * @author Branko Rihtman <theney@gmail.com> * @author Dražen OdobaÅ¡ić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com - * @author Davor Turkalj <turki.bsc@gmail.com> + * @author Dejan Igrec <dejan.igrec@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 3792c615938971553083ea350be633007180ed0b..17195ac03d33212f2521ce4fc531c480c3e563b2 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -3,24 +3,22 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Torpedo <dgtorpedo@gmail.com> * @author Giorgio Vecchiocattivi <giorgio@vecchio.it> * @author Roberto Bolli [http://www.rbnet.it/] * @author Silvia Sargentoni <polinnia@tin.it> * @author Diego Pierotto <ita.translations@tiscali.it> * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> * @author Matteo Carnevali <rekstorm@gmail.com> * @author Osman Tekin <osman.tekin93@hotmail.it> * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com * @author Edmondo Di Tucci <snarchio@gmail.com> * @author Claudio Lanconelli <lancos@libero.it> * @author Mirko <malisan.mirko@gmail.com> * @author Francesco <francesco.cavalli@hotmail.com> * @author Fabio <fabioslurp@yahoo.it> - * @author Torpedo <dgtorpedo@gmail.com> * @author Maurizio <mcannavo@katamail.com> * @author Riccardo <riccardofila@gmail.com> * @author Paolo <paolopoz12@gmail.com> diff --git a/inc/lang/ka/lang.php b/inc/lang/ka/lang.php index 72594efe3a8f10cd1a3a04d85ed986937f8a5c87..4ebb56a34619e23508803c4e2380cd54afdca4de 100644 --- a/inc/lang/ka/lang.php +++ b/inc/lang/ka/lang.php @@ -215,8 +215,6 @@ $lang['img_width'] = 'სიგáƒáƒœáƒ”:'; $lang['img_height'] = 'სიმáƒáƒ¦áƒšáƒ”:'; $lang['subscr_m_receive'] = 'მიღებáƒ'; $lang['subscr_style_every'] = 'ფáƒáƒ¡áƒ¢áƒ ყáƒáƒ•ელ ცვლილებáƒáƒ–ე'; -$lang['subscr_style_digest'] = 'ფáƒáƒ¡áƒ¢áƒ ყáƒáƒ•ელი გვერდის შეცვლáƒáƒ–ე '; -$lang['subscr_style_list'] = 'ფáƒáƒ¡áƒ¢áƒ ყáƒáƒ•ელი გვერდის შეცვლáƒáƒ–ე '; $lang['i_chooselang'] = 'ენსი áƒáƒ ჩევáƒ'; $lang['i_installer'] = 'DokuWiki დáƒáƒ›áƒ§áƒ”ნებელი'; $lang['i_wikiname'] = 'Wiki სáƒáƒ®áƒ”ლი'; diff --git a/inc/lang/kn/admin.txt b/inc/lang/kn/admin.txt new file mode 100644 index 0000000000000000000000000000000000000000..2897218da365c05f2fb1602e1db0bc22fbf95974 --- /dev/null +++ b/inc/lang/kn/admin.txt @@ -0,0 +1,2 @@ +====== ಆಡಳಿತಾತà³à²®à²• ====== +ಈ ಕೆಳಗೆ ಡಾಕà³à²µà²¿à²•ಿ(DokuWiki)ಯಲà³à²²à²¿à²°à³à²µ ಆಡಳಿತಾತà³à²®à²• ಕಾರà³à²¯à²—ಳ ಪಟà³à²Ÿà²¿à²¯à²¨à³à²¨à³ ನೋಡಬಹà³à²¦à³. \ No newline at end of file diff --git a/inc/lang/kn/adminplugins.txt b/inc/lang/kn/adminplugins.txt new file mode 100644 index 0000000000000000000000000000000000000000..0b00527fbc4b17cd6d1df5c23459c103cf87b207 --- /dev/null +++ b/inc/lang/kn/adminplugins.txt @@ -0,0 +1 @@ +===== ಹೆಚà³à²šà³à²µà²°à²¿ ಪà³à²²à²—ೠಇನೠಗಳೠ===== \ No newline at end of file diff --git a/inc/lang/kn/backlinks.txt b/inc/lang/kn/backlinks.txt new file mode 100644 index 0000000000000000000000000000000000000000..68ef78bc792a023dcab3ff3712653ba03c2b234b --- /dev/null +++ b/inc/lang/kn/backlinks.txt @@ -0,0 +1,2 @@ +====== ಹಿಂಕೊಂಡಿಗಳೠ====== +ಹಾಲಿ ಪà³à²Ÿà²•à³à²•ೆ ಹಿಂದಕà³à²•ೆ ಕೊಂಡಿಯಿರಬಹà³à²¦à²¾à²¦à²‚ತಹ ಪà³à²Ÿà²—ಳ ಪಟà³à²Ÿà²¿à²¯à²¿à²¦à³. \ No newline at end of file diff --git a/inc/lang/kn/conflict.txt b/inc/lang/kn/conflict.txt new file mode 100644 index 0000000000000000000000000000000000000000..880639f0666cb7aaf34786d98d40981419fc7389 --- /dev/null +++ b/inc/lang/kn/conflict.txt @@ -0,0 +1,4 @@ +====== ಹೊಸ ಅವತರಣಿಕೆ ಅಸà³à²¤à²¿à²¤à³à²µà²¦à²²à³à²²à²¿à²¦à³† ====== +ನೀವೠಸಂಪಾದಿಸಿದ ಕಡತದ ಇನà³à²¨à³‚ ಹೊಸ ಆವೃತà³à²¤à²¿ ಅಸà³à²¤à²¿à²¤à³à²µà²¦à²²à³à²²à²¿à²¦à³†. ನೀವೠಸಂಪಾದಿಸà³à²¤à³à²¤à²¿à²°à³à²µà²¾à²— ಬೇರೊಬà³à²¬à²°à³ ಅದೇ ಕಡತವನà³à²¨à³ ಮಾರà³à²ªà²¡à²¿à²¸à²¿à²¦à²°à³† ಹೀಗಾಗà³à²¤à³à²¤à²¦à³†. + +ಕೆಳಗೆ ತೋರಿಸಿರà³à²µ ವà³à²¯à²¤à³à²¯à²¾à²¸à²—ಳನà³à²¨à³ ಕೂಲಂಕà³à²¶à²µà²¾à²—ಿ ಪರಿಶೀಲಿಸಿ, ನಂತರ ಯಾವ ಆವೃತà³à²¤à²¿à²¯à²¨à³à²¨à³ ಇಟà³à²Ÿà³à²•ೊಳà³à²³à²¬à³‡à²•ೆಂದೠನಿರà³à²§à²°à²¿à²¸à²¿. ನೀವೠ"ಉಳಿಸà³" ಅನà³à²¨à³ ಆಯà³à²•ೆ ಮಾಡಿಕೊಂಡರೆ ನಿಮà³à²® ಆವೃತà³à²¤à²¿ ಉಳಿದà³à²•ೊಳà³à²³à³à²¤à³à²¤à²¦à³†. ನೀವೠ"ರದà³à²¦à³ ಮಾಡà³" ಅನà³à²¨à³ ಆಯà³à²•ೆ ಮಾಡಿಕೊಂಡರೆ ಹಾಲಿ ಆವೃತà³à²¤à²¿ ಉಳಿಯà³à²¤à³à²¤à²¦à³†. \ No newline at end of file diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 88f8e5f94348f4b3c2485644b06fb635cac91963..bdf67cd9e2af2f3dd14f6a36cb7715d928e1a616 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Oskars Pakers <oskars.pakers@gmail.com> * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['encoding'] = 'utf-8'; @@ -69,6 +70,7 @@ $lang['regmissing'] = 'Atvaino, jÄaizpilda visas ailes.'; $lang['reguexists'] = 'Atvaino, tÄds lietotÄjs jau ir.'; $lang['regsuccess'] = 'LietotÄjs izveidots. Parole nosÅ«tÄ«ta pa pastu.'; $lang['regsuccess2'] = 'LietotÄjs izveidots.'; +$lang['regfail'] = 'NeizdevÄs izveidot lietotÄju.'; $lang['regmailfail'] = 'Å Ä·iet, ka ir problÄ“mas nosÅ«tÄ«t pastu. LÅ«dzu sazinies ar administratoru!'; $lang['regbadmail'] = 'UzdotÄ epasta adrese izskatÄs aplama. Ja tas nav tiesa, sazinies ar administratoru.'; $lang['regbadpass'] = 'Abas ierakstÄ«tÄs paroles nav vienÄdas, lÅ«dzu atkÄrto.'; @@ -83,6 +85,7 @@ $lang['profdeleteuser'] = 'DzÄ“st kontu'; $lang['profdeleted'] = 'JÅ«su lietotÄja konts ir izdzÄ“sts'; $lang['profconfdelete'] = 'Es vÄ“los dzÄ“st savu kontu no viki. <br/> Å o darbÄ«bu vairs nevarÄ“s atsaukt.'; $lang['profconfdeletemissing'] = 'Nav atzÄ«mÄ“ta apstiprinÄjuma rÅ«tiņa.'; +$lang['proffail'] = 'NeizdevÄs atjaunot profilu.'; $lang['pwdforget'] = 'Aizmirsi paroli? Saņem jaunu'; $lang['resendna'] = 'Paroļu izsÅ«tīšanu nepiedÄvÄju.'; $lang['resendpwd'] = 'UzstÄdÄ«t jaunu paroli lietotÄjam'; @@ -333,5 +336,5 @@ $lang['currentns'] = 'PaÅ¡reizÄ“jÄ sadaļa'; $lang['searchresult'] = 'Meklēšanas rezultÄti'; $lang['plainhtml'] = 'TÄ«rs HTML'; $lang['wikimarkup'] = 'Viki iezÄ«mēšana valoda'; -$lang['email_signature_text'] = 'VÄ“stuli nosÅ«tÄ«jusi DokuWiki programma no +$lang['email_signature_text'] = 'VÄ“stuli nosÅ«tÄ«jusi DokuWiki programma no @DOKUWIKIURL@'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 76c99bc061c8be22d8962f1b64799c7ca2b4a513..2f6000be7c1526090bd867e239584bf0ada9afbe 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author mark prins <mprins@users.sf.net> * @author François Kooman <fkooman.tuxed.net> * @author Jack van Klaren <dokuwiki@afentoe.xs4all.nl> * @author Riny Heijdendael <riny@heijdendael.nl> @@ -17,9 +18,6 @@ * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> - * @author mprins <mprins@users.sf.net> - * @author Gerrit Uitslag <klapinklapin@gmail.com> - * @author Klap-in <klapinklapin@gmail.com> * @author Remon <no@email.local> * @author gicalle <gicalle@hotmail.com> * @author Rene <wllywlnt@yahoo.com> @@ -27,11 +25,9 @@ * @author Mijndert <mijndert@mijndertstuij.nl> * @author Johan Wijnker <johan@wijnker.eu> * @author Hugo Smet <hugo.smet@scarlet.be> - * @author Mark C. Prins <mprins@users.sf.net> * @author Wesley de Weerd <wesleytiel@gmail.com> * @author Sjoerd <sjoerd@sjomar.eu> * @author Joachim David <joa_david@hotmail.com> - * @author mark prins <mprins@users.sf.net> * @author stafmans <dokuwiki@stafmans.net> */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 6d96b1dc0a33f91c4465896a268d6068cab88ac8..e2302e5d84a19289e8e2155e0d3a3a7e98b69da5 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -3,11 +3,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 721785ae4f4a69a61f08703ed2f87f5d6ee559c6..b5fa379dd075e212b68f77e6fc5b30c50f382904 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -107,7 +107,7 @@ $lang['searchmedia_in'] = 'Caută în %s'; $lang['txt_upload'] = 'Selectează fiÈ™ierul de încărcat:'; $lang['txt_filename'] = 'ÃŽncarcă fiÈ™ierul ca (opÈ›ional):'; $lang['txt_overwrt'] = 'Suprascrie fiÈ™ierul existent'; -$lang['maxuploadsize'] = 'Incarcare maxima % per fisier.'; +$lang['maxuploadsize'] = 'Incarcare maxima %s per fisier.'; $lang['lockedby'] = 'Momentan blocat de:'; $lang['lockexpire'] = 'Blocarea expiră la:'; $lang['js']['willexpire'] = 'Blocarea pentru editarea paginii expiră intr-un minut.\nPentru a preveni conflictele foloseÈ™te butonul de previzualizare pentru resetarea blocării.'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index fec19c859ff1de9aa3652f0ed42441da959ec0ee..6aa10aec0fb6d01af78d49ce87d90bdf64da99a8 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Zhassulan <zyesmukanov@gmail.com> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Yuri Pimenov <up@ftpsearch.lv> * @author Igor Tarasov <tigr@mail15.com> * @author Denis Simakov <akinoame1@gmail.com> @@ -16,7 +18,6 @@ * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> * @author Aleksey Osadchiy <rfc@nm.ru> - * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> @@ -24,7 +25,6 @@ * @author Pavel <ivanovtsk@mail.ru> * @author Artur <ncuxxx@gmail.com> * @author Erli Moen <evseev.jr@gmail.com> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Владимир <id37736@yandex.ru> * @author Igor Degraf <igordegraf@gmail.com> * @author Type-kun <workwork-1@yandex.ru> @@ -143,8 +143,7 @@ $lang['js']['keepopen'] = 'Ðе закрывать окно поÑле в $lang['js']['hidedetails'] = 'Скрыть детали'; $lang['js']['mediatitle'] = 'ÐаÑтройка ÑÑылки'; $lang['js']['mediadisplay'] = 'Тип ÑÑылки'; -$lang['js']['mediaalign'] = 'Выравнивание -'; +$lang['js']['mediaalign'] = 'Выравнивание'; $lang['js']['mediasize'] = 'Размер'; $lang['js']['mediatarget'] = 'Ð¦ÐµÐ»ÐµÐ²Ð°Ñ ÑÑылка'; $lang['js']['mediaclose'] = 'Закрыть'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 55f7633a7ba823fdc1f474a0909acc2193d84abf..a30c20355c5f2d1cab361e1cce9ef0a876aed929 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -7,6 +7,7 @@ * @author Иван Петровић (Ivan Petrovic) <petrovicivan@ubuntusrbija.org> * @author Miroslav Å olti <solti.miroslav@gmail.com> * @author Жељко Тодоровић <zeljko_todorovic@mail.com> + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -41,13 +42,17 @@ $lang['btn_backlink'] = 'Повратне везе'; $lang['btn_subscribe'] = 'Пријави Ñе на измене'; $lang['btn_profile'] = 'Ðжурирај профил'; $lang['btn_reset'] = 'Поништи'; +$lang['btn_resendpwd'] = 'ПоÑтавите нови лозинку'; $lang['btn_draft'] = 'Измени нацрт'; $lang['btn_recover'] = 'Опорави нацрт'; $lang['btn_draftdel'] = 'Обриши нацрт'; $lang['btn_revert'] = 'Врати на пређашњу верзију'; $lang['btn_register'] = 'РегиÑтруј Ñе'; +$lang['btn_apply'] = 'Примени'; +$lang['btn_media'] = 'Управник мултимедије'; $lang['btn_deleteuser'] = 'Уклони мој налог'; $lang['btn_img_backto'] = 'Ðатраг на %s'; +$lang['btn_mediaManager'] = 'Погледај у управнику мултимедије'; $lang['loggedinas'] = 'Пријављен као:'; $lang['user'] = 'КориÑничко име'; $lang['pass'] = 'Лозинка'; @@ -58,7 +63,8 @@ $lang['remember'] = 'Запамти ме'; $lang['fullname'] = 'Име и презиме'; $lang['email'] = 'Е-адреÑа'; $lang['profile'] = 'КориÑнички профил'; -$lang['badlogin'] = 'Извините, није добро кориÑничко име или шифра.'; +$lang['badlogin'] = 'ÐажалоÑÑ‚, није добро кориÑничко име или лозинка.'; +$lang['badpassconfirm'] = 'ÐажалоÑÑ‚, лозинка је била погрешна'; $lang['minoredit'] = 'Мала измена'; $lang['draftdate'] = 'Ðацрт је аутоматÑки Ñачуван'; $lang['nosecedit'] = 'Страна је у међувремену промењена, поглавље је заÑтарело и поново Ñе учитава цела Ñтрана.'; @@ -67,19 +73,25 @@ $lang['regmissing'] = 'Извините, морате да попун $lang['reguexists'] = 'Извините, кориÑник Ñа иÑтим именом већ поÑтоји.'; $lang['regsuccess'] = 'КориÑник је направљен и лозинка је поÑлата путем е-поште.'; $lang['regsuccess2'] = 'КориÑник је направљен.'; -$lang['regmailfail'] = 'Изгледа да је дошло до грешке приликом Ñлања лозинке е-поштом. Молим ВаÑ, контактирајте админиÑтратора!'; +$lang['regfail'] = 'ÐиÑам могао да направим кориÑника.'; +$lang['regmailfail'] = 'Изгледа да је дошло до грешке приликом Ñлања лозинке е-поштом. Контактирајте админиÑтратора!'; $lang['regbadmail'] = 'Дата е-адреÑа није у реду - ако миÑлите да је ово грешка, контактирајте админиÑтратора'; -$lang['regbadpass'] = 'Две задате лозинке ниÑу иÑте. Молим ВаÑ, пробајте поново.'; +$lang['regbadpass'] = 'Две унете лозинке ниÑу иÑте. Пробајте поново.'; $lang['regpwmail'] = 'Ваша DokuWiki лозинка'; $lang['reghere'] = 'Још увек немате налог? Само направите један'; $lang['profna'] = 'Овај вики не дозвољава измену профила'; $lang['profnochange'] = 'Ðема промена.'; $lang['profnoempty'] = 'Ðије дозвољено оÑтавити празно поље имена или е-адреÑе.'; $lang['profchanged'] = 'КориÑнички профил је ажуриран.'; +$lang['profnodelete'] = 'Овај вики не подржава бриÑање кориÑника'; $lang['profdeleteuser'] = 'Избриши налог'; $lang['profdeleted'] = 'Ваш кориÑнички налог је избриÑан Ñа овог викија'; +$lang['profconfdelete'] = 'Желим да уклоним Ñвој налог Ñа овог викија. <br/> Ова радња Ñе не може опозвати.'; +$lang['profconfdeletemissing'] = 'Ðије штиклирано поље за потврду'; +$lang['proffail'] = 'КориÑнички профил није ажуриран.'; $lang['pwdforget'] = 'Заборавили Ñте лозинку? Ðаправите нову'; $lang['resendna'] = 'Овај вики не дозвољава Ñлање лозинки.'; +$lang['resendpwd'] = 'ПоÑтавите нову лозинку за'; $lang['resendpwdmissing'] = 'Жао ми је, Ñва поља морају бити попуњена.'; $lang['resendpwdnouser'] = 'Жао ми је, овај кориÑник не поÑтоји у нашој бази.'; $lang['resendpwdbadauth'] = 'Жао ми је, потврдни код није иÑправан. Проверите да ли Ñте кориÑтили комплетан потврдни линк.'; @@ -92,6 +104,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Да би Ñте избегли конфликте, иÑкориÑтите дугме за преглед како би Ñте реÑетовали тајмер закључавања.'; @@ -126,6 +139,15 @@ $lang['js']['nosmblinks'] = 'Повезивање Ñа Windows дељени $lang['js']['linkwiz'] = 'Чаробњак за Ñтварање везе'; $lang['js']['linkto'] = 'Повежи ка:'; $lang['js']['del_confirm'] = 'Обриши овај уноÑ?'; +$lang['js']['restore_confirm'] = 'ЗаиÑта желите да вратите ово издање?'; +$lang['js']['media_diff'] = 'Погледај разлике:'; +$lang['js']['media_diff_both'] = 'Једно до другог'; +$lang['js']['media_select'] = 'Изабери датотеке…'; +$lang['js']['media_upload_btn'] = 'Отпреми'; +$lang['js']['media_done_btn'] = 'Готово'; +$lang['js']['media_drop'] = 'Превуците датотеке овде да биÑте их отпремили'; +$lang['js']['media_cancel'] = 'уклони'; +$lang['js']['media_overwrt'] = 'Препиши поÑтојеће датотеке'; $lang['rssfailed'] = 'Дошло је до грешке приликом преузимања овог довода: '; $lang['nothingfound'] = 'Ðишта није нађено.'; $lang['mediaselect'] = 'Избор медијÑке датотеке'; @@ -159,6 +181,14 @@ $lang['yours'] = 'Ваша верзија'; $lang['diff'] = 'прикажи разлике до тренутне верзије'; $lang['diff2'] = 'Прикажи разлике између одабраних ревизија'; $lang['difflink'] = 'ПоÑтави везу ка овом компаративном приказу'; +$lang['diff_type'] = 'Погледај разлике:'; +$lang['diff_inline'] = 'У линији'; +$lang['diff_side'] = 'Једно до другог'; +$lang['diffprevrev'] = 'Претходна ревизија'; +$lang['diffnextrev'] = 'Следећа ревизија'; +$lang['difflastrev'] = 'ПоÑледња ревизија'; +$lang['diffbothprevrev'] = 'Обе Ñтране поÑледње ревизије'; +$lang['diffbothnextrev'] = 'Обе Ñтране Ñледеће ревизије'; $lang['line'] = 'Линија'; $lang['breadcrumb'] = 'Траг:'; $lang['youarehere'] = 'Сада Ñте овде:'; @@ -171,6 +201,12 @@ $lang['external_edit'] = 'Ñпољна измена'; $lang['summary'] = 'Сажетак измене'; $lang['noflash'] = 'За приказивање ове врÑте материјала потребан вам је <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>.'; $lang['download'] = 'Преузми Ñнипет'; +$lang['tools'] = 'Ðлатке'; +$lang['user_tools'] = 'КориÑничке алатке'; +$lang['site_tools'] = 'Ðлатке Ñајта'; +$lang['page_tools'] = 'Ðлатке Ñтранице'; +$lang['skip_to_content'] = 'Ñкочи на Ñадржај'; +$lang['sidebar'] = 'Страничник'; $lang['mail_newpage'] = 'Ñтраница додата:'; $lang['mail_changed'] = 'Ñтраница измењена:'; $lang['mail_subscribe_list'] = 'Странице промењене у именÑком проÑтору:'; @@ -218,6 +254,8 @@ $lang['img_copyr'] = 'Права копирања:'; $lang['img_format'] = 'Формат:'; $lang['img_camera'] = 'Камера:'; $lang['img_keywords'] = 'Кључне речи:'; +$lang['img_width'] = 'Ширина:'; +$lang['img_height'] = 'ВиÑина:'; $lang['subscr_subscribe_success'] = '%s је додат на ÑпиÑак претплатника %s'; $lang['subscr_subscribe_error'] = 'Грешка приликом додавања %s на ÑпиÑак претплатника %s'; $lang['subscr_subscribe_noaddress'] = 'Ðе поÑтоји адреÑа повезана Ñа вашим подацима, Ñтога Ð²Ð°Ñ Ð½Ðµ можемо додати на ÑпиÑак претплатника.'; @@ -244,6 +282,7 @@ $lang['i_problems'] = 'ИнÑталација је наишла на $lang['i_modified'] = 'Из ÑигурноÑних разлога ова Ñкрипта ради Ñамо Ñа новом Dokuwiki инÑталацијом. Требало би или да опет раÑпакујете архиву преузету Ñа Ñајта или да погледате <a href="http://dokuwiki.org/install">Dokuwiki инÑтрукције за инÑталацију</a>'; $lang['i_funcna'] = 'ПХП функција <code>%s</code> није доÑтупна. Можда је Ваш хоÑтинг провајдер забранио из неког разлога?'; $lang['i_phpver'] = '<code>%s</code> Верзија Вашег ПХПа је нижа од неопходне <code>%s</code>. Требало би да надоградите ПХП инÑталацију.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload мора бити иÑкључен у датотеци php.ini да биÑте кориÑтили Докувики.'; $lang['i_permfail'] = 'DokuWiki нема дозволу пиÑања у <code>%s</code>. Потребно је да поправите дозволе за ову фаÑциклу!'; $lang['i_confexists'] = '<code>%s</code> већ поÑтоји'; $lang['i_writeerr'] = 'Ðе могу да направим <code>%s</code>. Проверите дозволе а затим ручно направите ову датотеку.'; @@ -255,8 +294,12 @@ $lang['i_policy'] = 'Иницијалне кориÑничке до $lang['i_pol0'] = 'Отворени вики (читање, пиÑање, Ñлање датотека за Ñве)'; $lang['i_pol1'] = 'Јавни вики (читање за Ñве, пиÑање и Ñлање датотека Ñамо за региÑтроване кориÑнике)'; $lang['i_pol2'] = 'Затворени вики (читање, пиÑање и Ñлање датотека Ñамо за региÑтроване кориÑнике)'; +$lang['i_allowreg'] = 'Дозволи кориÑницима да Ñе региÑтрују'; $lang['i_retry'] = 'Понови'; $lang['i_license'] = 'Молимо ваÑ, одаберите лиценцу под коју желите да Ñтавите Ñвој Ñадржај:'; +$lang['i_license_none'] = 'Ðе приказуј податке о лиценци'; +$lang['i_pop_field'] = 'Помозите нам да побољшамо Докувики:'; +$lang['i_pop_label'] = 'Једном меÑечно шаљи анонимне податке о коришћењу програмерима Докувикија'; $lang['recent_global'] = 'Тренутно пратите промене у именÑком проÑтору <b>%s</b>. Такође, можете пратити <a href="%s">прмене на целом викију</a>.'; $lang['years'] = 'Пре %d година'; $lang['months'] = 'Пре %d меÑеци'; @@ -266,5 +309,35 @@ $lang['hours'] = 'Пре %d Ñати'; $lang['minutes'] = 'Пре %d минута'; $lang['seconds'] = 'Пре %d Ñекунди'; $lang['wordblock'] = 'Ваше измене ниÑу Ñачуване јер Ñадрже забрањен текÑÑ‚ (Ñпам)'; +$lang['media_uploadtab'] = 'Отпреми'; +$lang['media_searchtab'] = 'Претрага'; +$lang['media_file'] = 'Датотека'; +$lang['media_viewtab'] = 'Погледај'; +$lang['media_edittab'] = 'Уреди'; +$lang['media_historytab'] = 'ИÑторијат'; +$lang['media_list_thumbs'] = 'Сличице'; +$lang['media_list_rows'] = 'Редови'; +$lang['media_sort_name'] = 'Име'; +$lang['media_sort_date'] = 'Датум'; +$lang['media_namespaces'] = 'Изабери именÑки проÑтор'; +$lang['media_files'] = 'Датотеке у %s'; +$lang['media_upload'] = 'Отпреми на %s'; +$lang['media_search'] = 'Претражи у %s'; +$lang['media_view'] = '%s'; +$lang['media_viewold'] = '%s у %s'; +$lang['media_edit'] = 'Уреди %s'; +$lang['media_history'] = 'ИÑторијат од %s'; +$lang['media_meta_edited'] = 'промењени мета-подаци'; +$lang['media_perm_read'] = 'ÐажалоÑÑ‚, немате довољно овлашћења за читање датотека.'; +$lang['media_perm_upload'] = 'ÐажалоÑÑ‚, немате довољно овлашћења за отпремање датотека.'; +$lang['media_update'] = 'Отпреми ново издање'; +$lang['media_restore'] = 'Поврати ово издање'; +$lang['media_acl_warning'] = 'Овај ÑпиÑак је можда непотпун због забрана на ÑпиÑку контроле приÑтупа и Ñкривених Ñтраница.'; +$lang['currentns'] = 'Тренутни именÑки проÑтор'; +$lang['searchresult'] = 'Резултати претраге'; +$lang['plainhtml'] = 'Обичан HTML'; +$lang['wikimarkup'] = 'Вики маркап'; +$lang['page_nonexist_rev'] = 'Страница не поÑтоји у %s. КаÑније је направљена у <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Ðе могу да обрадим код параметра "%s".'; $lang['email_signature_text'] = 'Ову поруку је генериÑао DokuWiki sa @DOKUWIKIURL@'; diff --git a/inc/lang/sr/password.txt b/inc/lang/sr/password.txt index 453b9b6870b9bbc26b2db6c642819afcbf786be1..bd2cf3202d876372ef6fdb42eb12505caf93e901 100644 --- a/inc/lang/sr/password.txt +++ b/inc/lang/sr/password.txt @@ -3,4 +3,4 @@ Ево Ваших података за @TITLE@ на @DOKUWIKIURL@ КориÑничко име : @LOGIN@ -Шифра : @PASSWORD@ +Лозинка : @PASSWORD@ diff --git a/inc/lang/sr/resetpwd.txt b/inc/lang/sr/resetpwd.txt new file mode 100644 index 0000000000000000000000000000000000000000..642de9882046efbc4a27422d96ddea528c1bd841 --- /dev/null +++ b/inc/lang/sr/resetpwd.txt @@ -0,0 +1,3 @@ +====== ПоÑтавите нову лозинку ====== + +УнеÑите нову лозинку за ваш налог на овом викију. \ No newline at end of file diff --git a/inc/lang/sv/adminplugins.txt b/inc/lang/sv/adminplugins.txt index 0af37c769e456a71eb119e8b5ad174502f641802..2429b932a0c3160462d17971990776e934155846 100644 --- a/inc/lang/sv/adminplugins.txt +++ b/inc/lang/sv/adminplugins.txt @@ -1,2 +1 @@ - ===== Ytterligare Tillägg ===== \ No newline at end of file diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 2541d1fb9e1a90299a5725ad64cbe3ed5a2c7622..e39f8487de15b19a61edeab9cda0019423b40e4b 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Joaquim Homrighausen <joho@webbplatsen.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> @@ -10,18 +11,13 @@ * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> * @author Tormod Johansson <tormod.otter.johansson@gmail.com> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com * @author Henrik <henrik@idealis.se> - * @author Tor Härnqvist <tor.harnqvist@gmail.com> * @author Hans Iwan Bratt <hibratt@gmail.com> * @author Mikael Bergström <krank23@gmail.com> - * @author Tor Härnqvist <tor@harnqvist.se> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 2fe447b0fbbbf2511bc6276e6905c099a099afb3..7b1f790e0c5bddafc46ae099ebd75e7924a891f2 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -3,16 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author ОлекÑій <alexey.furashev@gmail.com> + * @author Vitaly <vitaly.balashov@smuzzy.com.ua> * @author Oleksiy Voronin <ovoronin@gmail.com> - * @author serg_stetsuk@ukr.net + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> * @author Uko <uko@uar.net> * @author Ulrikhe Lukoie <lukoie@gmail.com> - * @author Kate Arzamastseva pshns@ukr.net * @author Egor Smkv <egorsmkv@gmail.com> * @author Max Lyashuk <m_lyashuk@ukr.net> * @author Pavel <pavelholovko@yandex.ru> * @author Maksim <nikropol@yandex.ru> + * @author Nina Zolotova <nina-z@i.ua> + * @author Roman <vsmemorial@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -88,8 +91,11 @@ $lang['profna'] = 'Ð¦Ñ Ð’Ñ–ÐºÑ– не підтримує змін $lang['profnochange'] = 'Ðемає змін, немає що робити.'; $lang['profnoempty'] = 'Ð†Ð¼â€™Ñ Ð°Ð±Ð¾ e-mail не можуть бути пуÑтими.'; $lang['profchanged'] = 'Профіль уÑпішно змінено.'; +$lang['profnodelete'] = 'Ð¦Ñ Ð²Ñ–ÐºÑ– не підтримує Ð²Ð¸Ð´Ð°Ð»ÐµÐ½Ð½Ñ ÐºÐ¾Ñ€Ð¸Ñтувачів.'; $lang['profdeleteuser'] = 'Видалити аккаунт'; $lang['profdeleted'] = 'Ваш профіль кориÑтувача буде видалено з цієї wiki.'; +$lang['profconfdelete'] = 'Я хочу видалити мій акаунт з цієї вікі.'; +$lang['profconfdeletemissing'] = 'Галочка на "Підтверджено" не поÑтавлена'; $lang['proffail'] = 'Профіль кориÑтувача не вдалоÑÑ Ð¿Ð¾Ð½Ð¾Ð²Ð¸Ñ‚Ð¸.'; $lang['pwdforget'] = 'Забули пароль? Отримайте новий'; $lang['resendna'] = 'Ð¦Ñ Ð’Ñ–ÐºÑ– не підтримує повторне Ð²Ñ–Ð´Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ.'; @@ -143,6 +149,7 @@ $lang['js']['linkto'] = 'ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð°:'; $lang['js']['del_confirm'] = 'ДійÑно знищити обрані елементи?'; $lang['js']['restore_confirm'] = 'ДійÑно відновити цю верÑÑ–ÑŽ?'; $lang['js']['media_diff'] = 'ПереглÑнути різницю:'; +$lang['js']['media_diff_both'] = 'Крок за кроком'; $lang['js']['media_diff_portions'] = 'Прогорнути'; $lang['js']['media_select'] = 'Оберіть файли'; $lang['js']['media_upload_btn'] = 'Завантажити'; @@ -192,7 +199,7 @@ $lang['difflastrev'] = 'ОÑÑ‚Ð°Ð½Ð½Ñ Ñ€ÐµÐ²Ñ–Ð·Ñ–Ñ'; $lang['line'] = 'Ð Ñдок'; $lang['breadcrumb'] = 'Відвідано:'; $lang['youarehere'] = 'Ви тут:'; -$lang['lastmod'] = 'Ð’ оÑтаннє змінено:'; +$lang['lastmod'] = 'ВоÑтаннє змінено:'; $lang['deleted'] = 'знищено'; $lang['created'] = 'Ñтворено'; $lang['restored'] = 'відновлено Ñтару ревізію (%s)'; @@ -204,6 +211,7 @@ $lang['tools'] = 'ÐалаштуваннÑ'; $lang['user_tools'] = 'КориÑтувальницькькі налаштуваннÑ'; $lang['site_tools'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñайту'; $lang['page_tools'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ñторінки'; +$lang['skip_to_content'] = 'Перейти до зміÑту'; $lang['sidebar'] = 'Сайдбар'; $lang['mail_newpage'] = 'Ñторінку додано:'; $lang['mail_changed'] = 'Ñторінку змінено:'; @@ -213,6 +221,7 @@ $lang['mail_upload'] = 'завантажено файл:'; $lang['changes_type'] = 'ПереглÑнути зміни '; $lang['pages_changes'] = 'Сторінок'; $lang['media_changes'] = 'Медіа-файли'; +$lang['both_changes'] = 'Сторінки та медіа-файли'; $lang['qb_bold'] = 'Ðапівжирний текÑÑ‚'; $lang['qb_italic'] = 'КурÑив'; $lang['qb_underl'] = 'ПідкреÑлений текÑÑ‚'; @@ -280,6 +289,7 @@ $lang['i_modified'] = 'З причин безпеки цей Ñкри Вам Ñлід або ще раз розпакувати файли із завантаженого пакету, або звернутиÑÑ Ð´Ð¾ повної <a href="http://dokuwiki.org/install">інÑтрукції з уÑтановки ДокуВікі</a>'; $lang['i_funcna'] = 'Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ PHP <code>%s</code> не доÑтупна. Можливо, хоÑтинг-провайдер відключив Ñ—Ñ— з ÑкихоÑÑŒ причин?'; $lang['i_phpver'] = 'ВерÑÑ–Ñ PHP <code>%s</code> менша, ніж необхідно - <code>%s</code>. Ðеобхідно оновити PHP.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload має бути вимкнена у php.ini щоб запуÑтити DokuWiki.'; $lang['i_permfail'] = 'ДокуВікі не має прав на Ð·Ð°Ð¿Ð¸Ñ <code>%s</code>. Ðеобхідно змінити права доÑтупа Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— папки!'; $lang['i_confexists'] = '<code>%s</code> вже Ñ–Ñнує'; $lang['i_writeerr'] = 'Ðеможливо Ñтворити <code>%s</code>. Ðеобхідно перевірити права доÑтупа Ð´Ð»Ñ Ñ„Ð°Ð¹Ð»Ñƒ/папки та Ñтворити файл вручну.'; @@ -293,9 +303,12 @@ $lang['i_policy'] = 'Початкова політика ACL'; $lang['i_pol0'] = 'Відкрита Вікі (читаннÑ, Ð·Ð°Ð¿Ð¸Ñ Ñ‚Ð° Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ñ–Ð² Ð´Ð»Ñ Ð²ÑÑ–Ñ…)'; $lang['i_pol1'] = 'Публічна Вікі (Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð²ÑÑ–Ñ…, Ð·Ð°Ð¿Ð¸Ñ Ñ‚Ð° Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÑ”Ñтрованих кориÑтувачів)'; $lang['i_pol2'] = 'Закрита Вікі (читаннÑ, Ð·Ð°Ð¿Ð¸Ñ Ñ‚Ð° Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ñ‚Ñ–Ð»ÑŒÐºÐ¸ Ð´Ð»Ñ Ð·Ð°Ñ€ÐµÑ”Ñтрованих кориÑтувачів)'; +$lang['i_allowreg'] = 'Дозволити кориÑтувачам реєÑтруватиÑÑ ÑамоÑтійно.'; $lang['i_retry'] = 'Повторити'; $lang['i_license'] = 'Будь лаÑка, виберіть тип ліцензії, під Ñкою Ð’Ñ– бажаєте опублікувати матеріал:'; $lang['i_license_none'] = 'Ðе показувати жодної інформації про ліцензії.'; +$lang['i_pop_field'] = 'Будь лаÑка, допоможіть нам покращити DokuWiki:'; +$lang['i_pop_label'] = 'Одного разу на міÑÑць надÑилати дані про викориÑÑ‚Ð°Ð½Ð½Ñ Ñ€Ð¾Ð·Ñ€Ð¾Ð±Ð½Ð¸ÐºÐ°Ð¼ DokuWiki.'; $lang['recent_global'] = 'Ви переглÑдаєте зміни в межах проÑтору імен <b>%s</b>. Також можна <a href="%s">переглÑнути зміни в межах уÑієї Вікі</a>.'; $lang['years'] = '%d років тому'; $lang['months'] = '%d міÑÑців тому'; @@ -305,20 +318,34 @@ $lang['hours'] = '%d годин тому'; $lang['minutes'] = '%d хвилин тому'; $lang['seconds'] = '%d Ñекунд тому'; $lang['wordblock'] = 'Ваші зміни не збережено, тому що вони розпізнані Ñк такі, що міÑÑ‚Ñть заблокований текÑÑ‚(Ñпам).'; -$lang['email_signature_text'] = 'Це Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð±ÑƒÐ»Ð¾ Ñтворене ДокуВікі з -@DOKUWIKIURL@'; +$lang['media_uploadtab'] = 'Завантажити'; $lang['media_searchtab'] = 'Пошук'; $lang['media_file'] = 'Файл'; $lang['media_viewtab'] = 'ОглÑд'; $lang['media_edittab'] = 'Редагувати'; $lang['media_historytab'] = 'ІÑторіÑ'; +$lang['media_list_thumbs'] = 'Іконки'; +$lang['media_list_rows'] = 'Ð Ñдки'; $lang['media_sort_name'] = 'Ім’Ñ'; $lang['media_sort_date'] = 'Дата'; +$lang['media_namespaces'] = 'Оберіть проÑтір назв'; +$lang['media_files'] = 'Файли у %s'; +$lang['media_upload'] = 'Завантажити до %s'; +$lang['media_search'] = 'Шукати у %s'; +$lang['media_view'] = '%s'; +$lang['media_edit'] = 'Редагувати %s'; +$lang['media_history'] = 'ІÑÑ‚Ð¾Ñ€Ñ–Ñ %s'; $lang['media_meta_edited'] = 'метаданні відредаговано'; $lang['media_perm_read'] = 'Вибачте, у Ð²Ð°Ñ Ð½Ðµ доÑтатньо прав Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ файлу.'; +$lang['media_perm_upload'] = 'Вибачте, у Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтатньо прав, щоб завантажувати файли.'; $lang['media_update'] = 'Завантажити нову верÑÑ–ÑŽ'; $lang['media_restore'] = 'Відновити цю верÑÑ–ÑŽ'; +$lang['media_acl_warning'] = 'СпиÑок може бути не повним через Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ ACL та приховані Ñторінки.'; $lang['currentns'] = 'Поточний діапазон імен'; $lang['searchresult'] = 'Результати пошуку'; $lang['plainhtml'] = 'ПроÑтий HTML'; $lang['wikimarkup'] = 'Wiki розмітка'; +$lang['page_nonexist_rev'] = 'Сторінка %s відÑутнÑ. Може бути Ñтворена Ñк <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Ðе можливо розібрати параметр "%s" '; +$lang['email_signature_text'] = 'Це Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð±ÑƒÐ»Ð¾ Ñтворене ДокуВікі з +@DOKUWIKIURL@'; diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index ca29231b52cce199d9013a2dc7ddebb535b70da5..b998946649e3c1faf89895598c39e830cedc720e 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -3,17 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author lempel <riverlempel@hotmail.com> * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html * @author George Sheraton <guxd@163.com> * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> * @author Rachel <rzhang0802@gmail.com> * @author Donald <donaldtcong@gmail.com> diff --git a/inc/load.php b/inc/load.php index b4004c57945fe5f6e379ef16ce562dfad3ae8d43..b6613d6980a12f022c94890c722f235023cd041b 100644 --- a/inc/load.php +++ b/inc/load.php @@ -73,8 +73,6 @@ function load_autoload($name){ 'IXR_Error' => DOKU_INC.'inc/IXR_Library.php', 'IXR_IntrospectionServer' => DOKU_INC.'inc/IXR_Library.php', 'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php', - 'Tar' => DOKU_INC.'inc/Tar.class.php', - 'ZipLib' => DOKU_INC.'inc/ZipLib.class.php', 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', 'Doku_Parser_Mode_Plugin' => DOKU_INC.'inc/parser/parser.php', 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', @@ -84,7 +82,6 @@ function load_autoload($name){ 'RemoteAPI' => DOKU_INC.'inc/remote.php', 'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php', 'Subscription' => DOKU_INC.'inc/subscription.php', - 'lessc' => DOKU_INC.'inc/lessc.inc.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', @@ -134,8 +131,11 @@ function load_autoload($name){ // our own namespace if(substr($name, 0, 9) == 'dokuwiki/') { - require substr($name, 9) . '.php'; - return true; + $file = DOKU_INC . 'inc/' . substr($name, 9) . '.php'; + if(file_exists($file)) { + require $file; + return true; + } } // Plugin loading diff --git a/inc/mail.php b/inc/mail.php index 511401ce305f5bd6a81069eb972d048b89dca1d2..f72dbdeec3519b454cbdad44aafedfff2ecb93d0 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -210,12 +210,12 @@ function mail_encode_address($string,$header='',$names=true){ // 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); + msg(hsc("E-Mail address <$addr> is not ASCII"),-1); continue; } if(!mail_isvalid($addr)){ - msg(htmlspecialchars("E-Mail address <$addr> is not valid"),-1); + msg(hsc("E-Mail address <$addr> is not valid"),-1); continue; } diff --git a/inc/media.php b/inc/media.php index 45565db083b7577b159c0f43f71e8a98111c045a..1284660612238036124208676005d5a47dfb61fd 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1486,11 +1486,18 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural 'data' => array(), 'query' => $query ); - if ($query) { + if (!blank($query)) { $evt = new Doku_Event('MEDIA_SEARCH', $evdata); if ($evt->advise_before()) { $dir = utf8_encodeFN(str_replace(':','/',$evdata['ns'])); - $pattern = '/'.preg_quote($evdata['query'],'/').'/i'; + $quoted = preg_quote($evdata['query'],'/'); + //apply globbing + $quoted = str_replace(array('\*', '\?'), array('.*', '.'), $quoted, $count); + + //if we use globbing file name must match entirely but may be preceded by arbitrary namespace + if ($count > 0) $quoted = '^([^:]*:)*'.$quoted.'$'; + + $pattern = '/'.$quoted.'/i'; search($evdata['data'], $conf['mediadir'], 'search_media', @@ -1734,9 +1741,9 @@ function media_printimgdetail($item, $fullscreen=false){ // print EXIF/IPTC data if($t || $d || $k ){ echo '<p>'; - if($t) echo '<strong>'.htmlspecialchars($t).'</strong><br />'; - if($d) echo htmlspecialchars($d).'<br />'; - if($t) echo '<em>'.htmlspecialchars($k).'</em>'; + if($t) echo '<strong>'.hsc($t).'</strong><br />'; + if($d) echo hsc($d).'<br />'; + if($t) echo '<em>'.hsc($k).'</em>'; echo '</p>'; } echo '</div>'; @@ -2453,4 +2460,39 @@ function media_supportedav($mime, $type=NULL){ return in_array($mime, $supportedAv); } +/** + * Return track media files with the same base name + * but extensions that indicate kind and lang. + * ie for foo.webm search foo.sub.lang.vtt, foo.cap.lang.vtt... + * + * @param string $src - ID of media file + * @return array - array(mediaID => array( kind, srclang )) + * + * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> + */ +function media_trackfiles($src){ + $kinds=array( + 'sub' => 'subtitles', + 'cap' => 'captions', + 'des' => 'descriptions', + 'cha' => 'chapters', + 'met' => 'metadata' + ); + + $files = array(); + $re='/\\.(sub|cap|des|cha|met)\\.([^.]+)\\.vtt$/'; + $baseid=pathinfo($src, PATHINFO_FILENAME); + $pattern=mediaFN($baseid).'.*.*.vtt'; + $list=glob($pattern); + foreach($list as $track) { + if(preg_match($re, $track, $matches)){ + $files[$baseid.'.'.$matches[1].'.'.$matches[2].'.vtt']=array( + $kinds[$matches[1]], + $matches[2], + ); + } + } + return $files; +} + /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ diff --git a/inc/parser/code.php b/inc/parser/code.php index fe93273e53968ae85d5950796a74c76460484735..f91f1d2289161ad0453970e4471bda0c6b2fba89 100644 --- a/inc/parser/code.php +++ b/inc/parser/code.php @@ -21,6 +21,7 @@ class Doku_Renderer_code extends Doku_Renderer { function code($text, $language = null, $filename = '') { global $INPUT; if(!$language) $language = 'txt'; + $language = preg_replace(PREG_PATTERN_VALID_LANGUAGE, '', $language); if(!$filename) $filename = 'snippet.'.$language; $filename = utf8_basename($filename); $filename = utf8_stripspecials($filename, '_'); diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 5ffb5cc009612536aa9c0004ad9f6aa223d9ce2f..6f26534d902ca5360bec3f5b1be98fa1302ba893 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -903,7 +903,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.*?)\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[.*?\]\](?!\])",$mode,'internallink'); } function getSort() { @@ -955,8 +955,8 @@ class Doku_Parser_Mode_externallink extends Doku_Parser_Mode { $this->patterns[] = '\b(?i)'.$scheme.'(?-i)://['.$any.']+?(?=['.$punc.']*[^'.$any.'])'; } - $this->patterns[] = '\b(?i)www?(?-i)\.['.$host.']+?\.['.$host.']+?['.$any.']+?(?=['.$punc.']*[^'.$any.'])'; - $this->patterns[] = '\b(?i)ftp?(?-i)\.['.$host.']+?\.['.$host.']+?['.$any.']+?(?=['.$punc.']*[^'.$any.'])'; + $this->patterns[] = '(?<=\s)(?i)www?(?-i)\.['.$host.']+?\.['.$host.']+?['.$any.']+?(?=['.$punc.']*[^'.$any.'])'; + $this->patterns[] = '(?<=\s)(?i)ftp?(?-i)\.['.$host.']+?\.['.$host.']+?['.$any.']+?(?=['.$punc.']*[^'.$any.'])'; } function connectTo($mode) { diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 8bf3f56448346756768eff305b4461f66c981f77..83b51d4b13ffbd12c85220bd0016f20066410adf 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -7,6 +7,12 @@ */ if(!defined('DOKU_INC')) die('meh.'); +/** + * Allowed chars in $language for code highlighting + * @see GeSHi::set_language() + */ +define('PREG_PATTERN_VALID_LANGUAGE', '#[^a-zA-Z0-9\-_]#'); + /** * An empty renderer, produces no output * @@ -857,7 +863,11 @@ class Doku_Renderer extends DokuWiki_Plugin { } //handle as wiki links if($url{0} === ':') { - list($id, $urlparam) = explode('?', $url, 2); + $urlparam = null; + $id = $url; + if (strpos($url, '?') !== false) { + list($id, $urlparam) = explode('?', $url, 2); + } $url = wl(cleanID($id), $urlparam); $exists = page_exists($id); } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 1a7a5a7d023de376a0c571c0c15911f70f585827..393ec8d10f6ec37ce4c2d0553aab784f3394f0ba 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -66,8 +66,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Adrian Lang <lang@cosmocode.de> */ - public function startSectionEdit($start, $type, $title = null) { - $this->sectionedits[] = array(++$this->lastsecid, $start, $type, $title); + public function startSectionEdit($start, $type, $title = null, $hid = null) { + $this->sectionedits[] = array(++$this->lastsecid, $start, $type, $title, $hid); return 'sectionedit'.$this->lastsecid; } @@ -78,8 +78,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Adrian Lang <lang@cosmocode.de> */ - public function finishSectionEdit($end = null) { - list($id, $start, $type, $title) = array_pop($this->sectionedits); + public function finishSectionEdit($end = null, $hid = null) { + list($id, $start, $type, $title, $hid) = array_pop($this->sectionedits); if(!is_null($end) && $end <= $start) { return; } @@ -87,6 +87,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if(!is_null($title)) { $this->doc .= '"'.str_replace('"', '', $title).'" '; } + if(!is_null($hid)) { + $this->doc .= '"'.$hid.'" '; + } $this->doc .= "[$start-".(is_null($end) ? '' : $end).'] -->'; } @@ -217,7 +220,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // write the header $this->doc .= DOKU_LF.'<h'.$level; if($level <= $conf['maxseclevel']) { - $this->doc .= ' class="'.$this->startSectionEdit($pos, 'section', $text).'"'; + $this->doc .= ' class="'.$this->startSectionEdit($pos, 'section', $text, $hid).'"'; } $this->doc .= ' id="'.$hid.'">'; $this->doc .= $this->_xmlEntities($text); @@ -630,6 +633,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { global $ID; global $lang; + $language = preg_replace(PREG_PATTERN_VALID_LANGUAGE, '', $language); + if($filename) { // add icon list($ext) = mimetype($filename, false); @@ -649,7 +654,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $text = substr($text, 0, -1); } - if(is_null($language)) { + if(empty($language)) { // empty is faster than is_null and can prevent '' string $this->doc .= '<pre class="'.$type.'">'.$this->_xmlEntities($text).'</pre>'.DOKU_LF; } else { $class = 'code'; //we always need the code class to make the syntax highlighting apply @@ -884,7 +889,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['more'] = ''; $link['class'] = $class; if($this->date_at) { - $params['at'] = $this->date_at; + $params = $params.'&at='.rawurlencode($this->date_at); } $link['url'] = wl($id, $params); $link['name'] = $name; @@ -1287,7 +1292,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if($author) { $name = $author->get_name(); if(!$name) $name = $author->get_email(); - if($name) $this->doc .= ' '.$lang['by'].' '.$name; + if($name) $this->doc .= ' '.$lang['by'].' '.hsc($name); } } if($params['date']) { @@ -1334,7 +1339,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $class .= ' ' . $classes; } if($pos !== null) { - $class .= ' '.$this->startSectionEdit($pos, 'table'); + $hid = $this->_headerToLink($class, true); + $class .= ' '.$this->startSectionEdit($pos, 'table', '', $hid); } $this->doc .= '<div class="'.$class.'"><table class="inline">'. DOKU_LF; @@ -1777,6 +1783,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * Embed video(s) in HTML * * @author Anika Henke <anika@selfthinker.org> + * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * * @param string $src - ID of video to embed * @param int $width - width of the video in pixels @@ -1794,6 +1801,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $posterUrl = ''; $files = array(); + $tracks = array(); $isExternal = media_isexternal($src); if ($isExternal) { @@ -1805,6 +1813,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $extensions = array('webm', 'ogv', 'mp4'); $files = media_alternativefiles($src, $extensions); $poster = media_alternativefiles($src, array('jpg', 'png')); + $tracks = media_trackfiles($src); if(!empty($poster)) { $posterUrl = ml(reset($poster), '', true, '&'); } @@ -1833,6 +1842,14 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $fallback .= $this->$linkType($file, $title, null, null, null, $cache = null, $linking = 'linkonly', $return = true); } + // output each track if any + foreach( $tracks as $trackid => $info ) { + list( $kind, $srclang ) = array_map( 'hsc', $info ); + $out .= "<track kind=\"$kind\" srclang=\"$srclang\" "; + $out .= "label=\"$srclang\" "; + $out .= 'src="'.ml($trackid, '', true).'">'.NL; + } + // finish $out .= $fallback; $out .= '</video>'.NL; diff --git a/inc/parserutils.php b/inc/parserutils.php index 92a5047730f31784be497484bf8b6df6e1ff9503..648b182602e13860543bbde0b3d82bb368658040 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -337,13 +337,13 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ foreach ($value as $subkey => $subvalue){ if(isset($meta['current'][$key][$subkey]) && is_array($meta['current'][$key][$subkey])) { - $meta['current'][$key][$subkey] = array_merge($meta['current'][$key][$subkey], (array)$subvalue); + $meta['current'][$key][$subkey] = array_replace($meta['current'][$key][$subkey], (array)$subvalue); } else { $meta['current'][$key][$subkey] = $subvalue; } if($persistent) { if(isset($meta['persistent'][$key][$subkey]) && is_array($meta['persistent'][$key][$subkey])) { - $meta['persistent'][$key][$subkey] = array_merge($meta['persistent'][$key][$subkey], (array)$subvalue); + $meta['persistent'][$key][$subkey] = array_replace($meta['persistent'][$key][$subkey], (array)$subvalue); } else { $meta['persistent'][$key][$subkey] = $subvalue; } @@ -355,10 +355,10 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ // these keys, must have subkeys - a legitimate value must be an array if (is_array($value)) { - $meta['current'][$key] = !empty($meta['current'][$key]) ? array_merge((array)$meta['current'][$key],$value) : $value; + $meta['current'][$key] = !empty($meta['current'][$key]) ? array_replace((array)$meta['current'][$key],$value) : $value; if ($persistent) { - $meta['persistent'][$key] = !empty($meta['persistent'][$key]) ? array_merge((array)$meta['persistent'][$key],$value) : $value; + $meta['persistent'][$key] = !empty($meta['persistent'][$key]) ? array_replace((array)$meta['persistent'][$key],$value) : $value; } } diff --git a/inc/template.php b/inc/template.php index 46767e1b3b36b3a13dc295776c84ea1db75c7f49..386f6a2bc2eda45c955e56a4d3ce62a243340c80 100644 --- a/inc/template.php +++ b/inc/template.php @@ -93,90 +93,13 @@ function tpl_content($prependTOC = true) { * @return bool */ function tpl_content_core() { - global $ACT; - global $TEXT; - global $PRE; - global $SUF; - global $SUM; - global $IDX; - global $INPUT; - - switch($ACT) { - case 'show': - html_show(); - break; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'locked': - html_locked(); - case 'edit': - case 'recover': - html_edit(); - break; - case 'preview': - html_edit(); - html_show($TEXT); - break; - case 'draft': - html_draft(); - break; - case 'search': - html_search(); - break; - case 'revisions': - html_revisions($INPUT->int('first')); - break; - case 'diff': - html_diff(); - break; - case 'recent': - $show_changes = $INPUT->str('show_changes'); - if (empty($show_changes)) { - $show_changes = get_doku_pref('show_changes', $show_changes); - } - html_recent($INPUT->extract('first')->int('first'), $show_changes); - break; - case 'index': - html_index($IDX); #FIXME can this be pulled from globals? is it sanitized correctly? - break; - case 'backlink': - html_backlinks(); - break; - case 'conflict': - html_conflict(con($PRE, $TEXT, $SUF), $SUM); - html_diff(con($PRE, $TEXT, $SUF), false); - break; - case 'login': - html_login(); - break; - case 'register': - html_register(); - break; - case 'resendpwd': - html_resendpwd(); - break; - case 'denied': - html_denied(); - break; - case 'profile' : - html_updateprofile(); - break; - case 'admin': - tpl_admin(); - break; - case 'subscribe': - tpl_subscribe(); - break; - case 'media': - tpl_media(); - break; - default: - $evt = new Doku_Event('TPL_ACT_UNKNOWN', $ACT); - if($evt->advise_before()) { - msg("Failed to handle command: ".hsc($ACT), -1); - } - $evt->advise_after(); - unset($evt); - return false; + $router = \dokuwiki\ActionRouter::getInstance(); + try { + $router->getAction()->tplContent(); + } catch(\dokuwiki\Action\Exception\FatalException $e) { + // there was no content for the action + msg(hsc($e->getMessage()), -1); + return false; } return true; } @@ -366,7 +289,7 @@ function tpl_metaheaders($alt = true) { if(($ACT == 'show' || $ACT == 'export_xhtml') && !$REV) { if($INFO['exists']) { //delay indexing: - if(!isHiddenPage($ID) && (time() - $INFO['lastmod']) >= $conf['indexdelay']) { + if((time() - $INFO['lastmod']) >= $conf['indexdelay'] && !isHiddenPage($ID) ) { $head['meta'][] = array('name'=> 'robots', 'content'=> 'index,follow'); } else { $head['meta'][] = array('name'=> 'robots', 'content'=> 'noindex,nofollow'); @@ -541,8 +464,10 @@ function tpl_getparent($id) { * @param string $type * @param bool $return * @return bool|string html, or false if no data, true if printed + * @deprecated 2017-09-01 see devel:menus */ function tpl_button($type, $return = false) { + dbg_deprecated('see devel:menus'); $data = tpl_get_action($type); if($data === false) { return false; @@ -579,8 +504,10 @@ function tpl_button($type, $return = false) { * @param string $inner innerHML of link * @param bool $return if true it returns html, otherwise prints * @return bool|string html or false if no data, true if printed + * @deprecated 2017-09-01 see devel:menus */ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = false) { + dbg_deprecated('see devel:menus'); global $lang; $data = tpl_get_action($type); if($data === false) { @@ -627,179 +554,44 @@ function tpl_actionlink($type, $pre = '', $suf = '', $inner = '', $return = fals /** * Check the actions and get data for buttons and links * - * Available actions are - * - * edit - edit/create/show/draft - * history - old revisions - * recent - recent changes - * login - login/logout - if ACL enabled - * profile - user profile (if logged in) - * index - The index - * admin - admin page - if enough rights - * top - back to top - * back - back to parent - if available - * backlink - links to the list of backlinks - * subscribe/subscription- subscribe/unsubscribe - * * @author Andreas Gohr <andi@splitbrain.org> * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * @author Adrian Lang <mail@adrianlang.de> * * @param string $type * @return array|bool|string + * @deprecated 2017-09-01 see devel:menus */ function tpl_get_action($type) { - global $ID; - global $INFO; - global $REV; - global $ACT; - global $conf; - /** @var Input $INPUT */ - global $INPUT; - - // check disabled actions and fix the badly named ones + dbg_deprecated('see devel:menus'); if($type == 'history') $type = 'revisions'; - if ($type == 'subscription') $type = 'subscribe'; - if(!actionOK($type)) return false; - - $accesskey = null; - $id = $ID; - $method = 'get'; - $params = array('do' => $type); - $nofollow = true; - $replacement = ''; - - $unknown = false; - switch($type) { - case 'edit': - // most complicated type - we need to decide on current action - if($ACT == 'show' || $ACT == 'search') { - $method = 'post'; - if($INFO['writable']) { - $accesskey = 'e'; - if(!empty($INFO['draft'])) { - $type = 'draft'; - $params['do'] = 'draft'; - } else { - $params['rev'] = $REV; - if(!$INFO['exists']) { - $type = 'create'; - } - } - } else { - if(!actionOK('source')) return false; //pseudo action - $params['rev'] = $REV; - $type = 'source'; - $accesskey = 'v'; - } - } else { - $params = array('do' => ''); - $type = 'show'; - $accesskey = 'v'; - } - break; - case 'revisions': - $type = 'revs'; - $accesskey = 'o'; - break; - case 'recent': - $accesskey = 'r'; - break; - case 'index': - $accesskey = 'x'; - // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml) - if ($conf['start'] == $ID && !$conf['sitemap']) { - $nofollow = false; - } - break; - case 'top': - $accesskey = 't'; - $params = array('do' => ''); - $id = '#dokuwiki__top'; - break; - case 'back': - $parent = tpl_getparent($ID); - if(!$parent) { - return false; - } - $id = $parent; - $params = array('do' => ''); - $accesskey = 'b'; - break; - case 'img_backto': - $params = array(); - $accesskey = 'b'; - $replacement = $ID; - break; - case 'login': - $params['sectok'] = getSecurityToken(); - if($INPUT->server->has('REMOTE_USER')) { - if(!actionOK('logout')) { - return false; - } - $params['do'] = 'logout'; - $type = 'logout'; - } - break; - case 'register': - if($INPUT->server->str('REMOTE_USER')) { - return false; - } - break; - case 'resendpwd': - if($INPUT->server->str('REMOTE_USER')) { - return false; - } - break; - case 'admin': - if(!$INFO['ismanager']) { - return false; - } - break; - case 'revert': - if(!$INFO['ismanager'] || !$REV || !$INFO['writable']) { - return false; - } - $params['rev'] = $REV; - $params['sectok'] = getSecurityToken(); - break; - case 'subscribe': - if(!$INPUT->server->str('REMOTE_USER')) { - return false; - } - break; - case 'backlink': - break; - case 'profile': - if(!$INPUT->server->has('REMOTE_USER')) { - return false; - } - break; - case 'media': - $params['ns'] = getNS($ID); - break; - case 'mediaManager': - // View image in media manager - global $IMG; - $imgNS = getNS($IMG); - $authNS = auth_quickaclcheck("$imgNS:*"); - if ($authNS < AUTH_UPLOAD) { - return false; - } - $params = array( - 'ns' => $imgNS, - 'image' => $IMG, - 'do' => 'media' - ); - //$type = 'media'; - break; - default: - //unknown type - $unknown = true; + if($type == 'subscription') $type = 'subscribe'; + if($type == 'img_backto') $type = 'imgBackto'; + + $class = '\\dokuwiki\\Menu\\Item\\' . ucfirst($type); + if(class_exists($class)) { + try { + /** @var \dokuwiki\Menu\Item\AbstractItem $item */ + $item = new $class; + $data = $item->getLegacyData(); + $unknown = false; + } catch(\RuntimeException $ignored) { + return false; + } + } else { + global $ID; + $data = array( + 'accesskey' => null, + 'type' => $type, + 'id' => $ID, + 'method' => 'get', + 'params' => array('do' => $type), + 'nofollow' => true, + 'replacement' => '', + ); + $unknown = true; } - $data = compact('accesskey', 'type', 'id', 'method', 'params', 'nofollow', 'replacement'); - $evt = new Doku_Event('TPL_ACTION_GET', $data); if($evt->advise_before()) { //handle unknown types @@ -826,8 +618,10 @@ function tpl_get_action($type) { * @param string $suf suffix for links * @param string $inner inner HTML for links * @return bool|string + * @deprecated 2017-09-01 see devel:menus */ function tpl_action($type, $link = false, $wrapper = false, $return = false, $pre = '', $suf = '', $inner = '') { + dbg_deprecated('see devel:menus'); $out = ''; if($link) { $out .= tpl_actionlink($type, $pre, $suf, $inner, true); @@ -1610,7 +1404,8 @@ function tpl_mediaFileDetails($image, $rev) { list($ext) = mimetype($image, false); $class = preg_replace('/[^_\-a-z0-9]+/i', '_', $ext); $class = 'select mediafile mf_'.$class; - $tabTitle = '<strong><a href="'.ml($image).'" class="'.$class.'" title="'.$lang['mediaview'].'">'.$image.'</a>'.'</strong>'; + $attributes = $rev ? ['rev' => $rev] : []; + $tabTitle = '<strong><a href="'.ml($image, $attributes).'" class="'.$class.'" title="'.$lang['mediaview'].'">'.$image.'</a>'.'</strong>'; if($opened_tab === 'view' && $rev) { printf($lang['media_viewold'], $tabTitle, dformat($rev)); } else { @@ -1657,44 +1452,12 @@ function tpl_mediaTree() { * * @param string $empty empty option label * @param string $button submit button label + * @deprecated 2017-09-01 see devel:menus */ -function tpl_actiondropdown($empty = ' ', $button = '>') { - global $ID; - global $REV; - global $lang; - /** @var Input $INPUT */ - global $INPUT; - - $action_structure = array( - 'page_tools' => array('edit', 'revert', 'revisions', 'backlink', 'subscribe'), - 'site_tools' => array('recent', 'media', 'index'), - 'user_tools' => array('login', 'register', 'profile', 'admin'), - ); - - echo '<form action="'.script().'" method="get" accept-charset="utf-8">'; - echo '<div class="no">'; - echo '<input type="hidden" name="id" value="'.$ID.'" />'; - if($REV) echo '<input type="hidden" name="rev" value="'.$REV.'" />'; - if ($INPUT->server->str('REMOTE_USER')) { - echo '<input type="hidden" name="sectok" value="'.getSecurityToken().'" />'; - } - - echo '<select name="do" class="edit quickselect" title="'.$lang['tools'].'">'; - echo '<option value="">'.$empty.'</option>'; - - foreach($action_structure as $tools => $actions) { - echo '<optgroup label="'.$lang[$tools].'">'; - foreach($actions as $action) { - $act = tpl_get_action($action); - if($act) echo '<option value="'.$act['params']['do'].'">'.$lang['btn_'.$act['type']].'</option>'; - } - echo '</optgroup>'; - } - - echo '</select>'; - echo '<button type="submit">'.$button.'</button>'; - echo '</div>'; - echo '</form>'; +function tpl_actiondropdown($empty = '', $button = '>') { + dbg_deprecated('see devel:menus'); + $menu = new \dokuwiki\Menu\MobileMenu(); + echo $menu->getDropdown($empty, $button); } /** @@ -2044,8 +1807,10 @@ function tpl_classes() { * @param string $toolsname name of menu * @param array $items * @param string $view e.g. 'main', 'detail', ... + * @deprecated 2017-09-01 see devel:menus */ function tpl_toolsevent($toolsname, $items, $view = 'main') { + dbg_deprecated('see devel:menus'); $data = array( 'view' => $view, 'items' => $items diff --git a/inc/utf8.php b/inc/utf8.php index f82a663e46af0904184776ac9d29a17e4dad0c32..4de28742923b1b2f05304c6b0bd64b11f579112f 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -148,8 +148,16 @@ if(!function_exists('utf8_strlen')){ * @param string $string * @return int */ - function utf8_strlen($string){ - return strlen(utf8_decode($string)); + function utf8_strlen($string) { + if (function_exists('utf8_decode')) { + return strlen(utf8_decode($string)); + } elseif (UTF8_MBSTRING) { + return mb_strlen($string, 'UTF-8'); + } elseif (function_exists('iconv_strlen')) { + return iconv_strlen($string, 'UTF-8'); + } else { + return strlen($string); + } } } @@ -204,7 +212,7 @@ if(!function_exists('utf8_substr')){ // normalise -ve offsets (we could use a tail anchored pattern, but they are horribly slow!) if ($offset < 0) { - $strlen = strlen(utf8_decode($str)); // see notes + $strlen = utf8_strlen($str); // see notes $offset = $strlen + $offset; if ($offset < 0) $offset = 0; } @@ -225,7 +233,7 @@ if(!function_exists('utf8_substr')){ $length_pattern = '(.*)$'; // the rest of the string } else { - if (!isset($strlen)) $strlen = strlen(utf8_decode($str)); // see notes + if (!isset($strlen)) $strlen = utf8_strlen($str); // see notes if ($offset > $strlen) return ''; // another trivial case if ($length > 0) { diff --git a/install.php b/install.php index 6398b199f986580dc4766496eae9f7f2f01d6ad0..d7e6c52459c5c17402004e5ee5d4bb2a1b7d31d3 100644 --- a/install.php +++ b/install.php @@ -110,7 +110,7 @@ header('Content-Type: text/html; charset=utf-8'); print "</div>\n"; } ?> - <a style="background: transparent url(data/security.png) left top no-repeat; + <a style="background: transparent url(data/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png) left top no-repeat; display: block; width:380px; height:73px; border:none; clear:both;" target="_blank" href="http://www.dokuwiki.org/security#web_access_security"></a> @@ -161,7 +161,7 @@ function print_form($d){ include(DOKU_CONF.'license.php'); if(!is_array($d)) $d = array(); - $d = array_map('htmlspecialchars',$d); + $d = array_map('hsc',$d); if(!isset($d['acl'])) $d['acl']=1; if(!isset($d['pop'])) $d['pop']=1; @@ -216,9 +216,9 @@ function print_form($d){ 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.'"'. + echo '<input type="radio" name="d[license]" value="'.hsc($key).'" id="lic_'.$key.'"'. (($d['license'] === $key)?' checked="checked"':'').'>'; - echo htmlspecialchars($lic['name']); + echo hsc($lic['name']); if($lic['url']) echo ' <a href="'.$lic['url'].'" target="_blank"><sup>[?]</sup></a>'; echo '</label>'; } diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 37ec6ea03b8cdc9b531fb8928458f0d9b258bce2..55f1c87c571bd0f5f75f4bfac6c1d3e4f3944a73 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -6,433 +6,20 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); -require_once(DOKU_INC.'inc/init.php'); +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../'); +require_once(DOKU_INC . 'inc/init.php'); + //close session session_write_close(); +// default header, ajax call may overwrite it later header('Content-Type: text/html; charset=utf-8'); //call the requested function +global $INPUT; if($INPUT->has('call')) { $call = $INPUT->filter('utf8_stripspecials')->str('call'); + new \dokuwiki\Ajax($call); } else { - exit; -} -$callfn = 'ajax_'.$call; - -if(function_exists($callfn)){ - $callfn(); -}else{ - $evt = new Doku_Event('AJAX_CALL_UNKNOWN', $call); - if ($evt->advise_before()) { - print "AJAX call '".htmlspecialchars($call)."' unknown!\n"; - exit; - } - $evt->advise_after(); - unset($evt); -} - -/** - * Searches for matching pagenames - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function ajax_qsearch(){ - global $lang; - global $INPUT; - - $maxnumbersuggestions = 50; - - $query = $INPUT->post->str('q'); - if(empty($query)) $query = $INPUT->get->str('q'); - if(empty($query)) return; - - $query = urldecode($query); - - $data = ft_pageLookup($query, true, useHeading('navigation')); - - if(!count($data)) return; - - print '<strong>'.$lang['quickhits'].'</strong>'; - print '<ul>'; - $counter = 0; - foreach($data as $id => $title){ - if (useHeading('navigation')) { - $name = $title; - } else { - $ns = getNS($id); - if($ns){ - $name = noNS($id).' ('.$ns.')'; - }else{ - $name = $id; - } - } - echo '<li>' . html_wikilink(':'.$id,$name) . '</li>'; - - $counter ++; - if($counter > $maxnumbersuggestions) { - echo '<li>...</li>'; - break; - } - } - print '</ul>'; -} - -/** - * Support OpenSearch suggestions - * - * @link http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.0 - * @author Mike Frysinger <vapier@gentoo.org> - */ -function ajax_suggestions() { - global $INPUT; - - $query = cleanID($INPUT->post->str('q')); - if(empty($query)) $query = cleanID($INPUT->get->str('q')); - if(empty($query)) return; - - $data = ft_pageLookup($query); - if(!count($data)) return; - $data = array_keys($data); - - // limit results to 15 hits - $data = array_slice($data, 0, 15); - $data = array_map('trim',$data); - $data = array_map('noNS',$data); - $data = array_unique($data); - sort($data); - - /* now construct a json */ - $suggestions = array( - $query, // the original query - $data, // some suggestions - array(), // no description - array() // no urls - ); - $json = new JSON(); - - header('Content-Type: application/x-suggestions+json'); - print $json->encode($suggestions); -} - -/** - * Refresh a page lock and save draft - * - * Andreas Gohr <andi@splitbrain.org> - */ -function ajax_lock(){ - global $conf; - global $lang; - global $ID; - global $INFO; - global $INPUT; - - $ID = cleanID($INPUT->post->str('id')); - if(empty($ID)) return; - - $INFO = pageinfo(); - - if (!$INFO['writable']) { - echo 'Permission denied'; - return; - } - - if(!checklock($ID)){ - lock($ID); - echo 1; - } - - if($conf['usedraft'] && $INPUT->post->str('wikitext')){ - $client = $_SERVER['REMOTE_USER']; - if(!$client) $client = clientIP(true); - - $draft = array('id' => $ID, - 'prefix' => substr($INPUT->post->str('prefix'), 0, -1), - 'text' => $INPUT->post->str('wikitext'), - 'suffix' => $INPUT->post->str('suffix'), - 'date' => $INPUT->post->int('date'), - 'client' => $client, - ); - $cname = getCacheName($draft['client'].$ID,'.draft'); - if(io_saveFile($cname,serialize($draft))){ - echo $lang['draftdate'].' '.dformat(); - } - } - -} - -/** - * Delete a draft - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function ajax_draftdel(){ - global $INPUT; - $id = cleanID($INPUT->str('id')); - if(empty($id)) return; - - $client = $_SERVER['REMOTE_USER']; - if(!$client) $client = clientIP(true); - - $cname = getCacheName($client.$id,'.draft'); - @unlink($cname); -} - -/** - * Return subnamespaces for the Mediamanager - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function ajax_medians(){ - global $conf; - global $INPUT; - - // wanted namespace - $ns = cleanID($INPUT->post->str('ns')); - $dir = utf8_encodeFN(str_replace(':','/',$ns)); - - $lvl = count(explode(':',$ns)); - - $data = array(); - search($data,$conf['mediadir'],'search_index',array('nofiles' => true),$dir); - foreach(array_keys($data) as $item){ - $data[$item]['level'] = $lvl+1; - } - echo html_buildlist($data, 'idx', 'media_nstree_item', 'media_nstree_li'); -} - -/** - * Return list of files for the Mediamanager - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function ajax_medialist(){ - global $NS; - global $INPUT; - - $NS = cleanID($INPUT->post->str('ns')); - $sort = $INPUT->post->bool('recent') ? 'date' : 'natural'; - if ($INPUT->post->str('do') == 'media') { - tpl_mediaFileList(); - } else { - tpl_mediaContent(true, $sort); - } -} - -/** - * Return the content of the right column - * (image details) for the Mediamanager - * - * @author Kate Arzamastseva <pshns@ukr.net> - */ -function ajax_mediadetails(){ - global $IMG, $JUMPTO, $REV, $fullscreen, $INPUT; - $fullscreen = true; - require_once(DOKU_INC.'lib/exe/mediamanager.php'); - - $image = ''; - if ($INPUT->has('image')) $image = cleanID($INPUT->str('image')); - if (isset($IMG)) $image = $IMG; - if (isset($JUMPTO)) $image = $JUMPTO; - $rev = false; - if (isset($REV) && !$JUMPTO) $rev = $REV; - - html_msgarea(); - tpl_mediaFileDetails($image, $rev); -} - -/** - * Returns image diff representation for mediamanager - * @author Kate Arzamastseva <pshns@ukr.net> - */ -function ajax_mediadiff(){ - global $NS; - global $INPUT; - - $image = ''; - if ($INPUT->has('image')) $image = cleanID($INPUT->str('image')); - $NS = getNS($image); - $auth = auth_quickaclcheck("$NS:*"); - media_diff($image, $NS, $auth, true); -} - -function ajax_mediaupload(){ - global $NS, $MSG, $INPUT; - - $id = ''; - if ($_FILES['qqfile']['tmp_name']) { - $id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']); - } elseif ($INPUT->get->has('qqfile')) { - $id = $INPUT->get->str('qqfile'); - } - - $id = cleanID($id); - - $NS = $INPUT->str('ns'); - $ns = $NS.':'.getNS($id); - - $AUTH = auth_quickaclcheck("$ns:*"); - if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$ns:xxx", 'media'); } - - if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']); - - $res = false; - if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']); - if ($INPUT->get->has('qqfile')) $res = media_upload_xhr($NS, $AUTH); - - if($res) { - $result = array( - 'success' => true, - 'link' => media_managerURL(array('ns' => $ns, 'image' => $NS . ':' . $id), '&'), - 'id' => $NS . ':' . $id, - 'ns' => $NS - ); - } else { - $error = ''; - if(isset($MSG)) { - foreach($MSG as $msg) { - $error .= $msg['msg']; - } - } - $result = array( - 'error' => $error, - 'ns' => $NS - ); - } - $json = new JSON; - header('Content-Type: application/json'); - echo $json->encode($result); -} - -/** - * Return sub index for index view - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function ajax_index(){ - global $conf; - global $INPUT; - - // wanted namespace - $ns = cleanID($INPUT->post->str('idx')); - $dir = utf8_encodeFN(str_replace(':','/',$ns)); - - $lvl = count(explode(':',$ns)); - - $data = array(); - search($data,$conf['datadir'],'search_index',array('ns' => $ns),$dir); - foreach(array_keys($data) as $item){ - $data[$item]['level'] = $lvl+1; - } - echo html_buildlist($data, 'idx', 'html_list_index', 'html_li_index'); -} - -/** - * List matching namespaces and pages for the link wizard - * - * @author Andreas Gohr <gohr@cosmocode.de> - */ -function ajax_linkwiz(){ - global $conf; - global $lang; - global $INPUT; - - $q = ltrim(trim($INPUT->post->str('q')),':'); - $id = noNS($q); - $ns = getNS($q); - - $ns = cleanID($ns); - $id = cleanID($id); - - $nsd = utf8_encodeFN(str_replace(':','/',$ns)); - - $data = array(); - if($q && !$ns){ - - // use index to lookup matching pages - $pages = ft_pageLookup($id,true); - - // result contains matches in pages and namespaces - // we now extract the matching namespaces to show - // them seperately - $dirs = array(); - - foreach($pages as $pid => $title){ - if(strpos(noNS($pid),$id) === false){ - // match was in the namespace - $dirs[getNS($pid)] = 1; // assoc array avoids dupes - }else{ - // it is a matching page, add it to the result - $data[] = array( - 'id' => $pid, - 'title' => $title, - 'type' => 'f', - ); - } - unset($pages[$pid]); - } - foreach($dirs as $dir => $junk){ - $data[] = array( - 'id' => $dir, - 'type' => 'd', - ); - } - - }else{ - - $opts = array( - 'depth' => 1, - 'listfiles' => true, - 'listdirs' => true, - 'pagesonly' => true, - 'firsthead' => true, - 'sneakyacl' => $conf['sneaky_index'], - ); - if($id) $opts['filematch'] = '^.*\/'.$id; - if($id) $opts['dirmatch'] = '^.*\/'.$id; - search($data,$conf['datadir'],'search_universal',$opts,$nsd); - - // add back to upper - if($ns){ - array_unshift($data,array( - 'id' => getNS($ns), - 'type' => 'u', - )); - } - } - - // fixme sort results in a useful way ? - - if(!count($data)){ - echo $lang['nothingfound']; - exit; - } - - // output the found data - $even = 1; - foreach($data as $item){ - $even *= -1; //zebra - - if(($item['type'] == 'd' || $item['type'] == 'u') && $item['id']) $item['id'] .= ':'; - $link = wl($item['id']); - - echo '<div class="'.(($even > 0)?'even':'odd').' type_'.$item['type'].'">'; - - if($item['type'] == 'u'){ - $name = $lang['upperns']; - }else{ - $name = htmlspecialchars($item['id']); - } - - echo '<a href="'.$link.'" title="'.htmlspecialchars($item['id']).'" class="wikilink1">'.$name.'</a>'; - - if(!blank($item['title'])){ - echo '<span>'.htmlspecialchars($item['title']).'</span>'; - } - echo '</div>'; - } - + http_status(404); } - -//Setup VIM: ex: et ts=2 : diff --git a/lib/exe/css.php b/lib/exe/css.php index fcb97f7cf0ffaeee00d71fe6a3a3be775444da82..ae51d9fc0a9bedf1a0b025c25a4994386955a228 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -36,7 +36,7 @@ function css_out(){ $mediatypes = array('feed'); $type = 'feed'; } else { - $mediatypes = array('screen', 'all', 'print'); + $mediatypes = array('screen', 'all', 'print', 'speech'); $type = ''; } @@ -44,10 +44,7 @@ function css_out(){ $tpl = trim(preg_replace('/[^\w-]+/','',$INPUT->str('t'))); if(!$tpl) $tpl = $conf['template']; - // The generated script depends on some dynamic options - $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$INPUT->int('preview').DOKU_BASE.$tpl.$type,'.css'); - - // load styl.ini + // load style.ini $styleini = css_styleini($tpl, $INPUT->bool('preview')); // cache influencers @@ -60,72 +57,92 @@ 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(); + $media_files = array(); foreach($mediatypes as $mediatype) { - $files[$mediatype] = array(); + $files = array(); + // load core styles - $files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; + $files[DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; // load jQuery-UI theme if ($mediatype == 'screen') { - $files[$mediatype][DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; + $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; } // load plugin styles - $files[$mediatype] = array_merge($files[$mediatype], css_pluginstyles($mediatype)); + $files = array_merge($files, css_pluginstyles($mediatype)); // load template styles if (isset($styleini['stylesheets'][$mediatype])) { - $files[$mediatype] = array_merge($files[$mediatype], $styleini['stylesheets'][$mediatype]); + $files = array_merge($files, $styleini['stylesheets'][$mediatype]); } // load user styles if(!empty($config_cascade['userstyle'][$mediatype])) { foreach($config_cascade['userstyle'][$mediatype] as $userstyle) { - $files[$mediatype][$userstyle] = DOKU_BASE; + $files[$userstyle] = DOKU_BASE; } } - $cache_files = array_merge($cache_files, array_keys($files[$mediatype])); + // Let plugins decide to either put more styles here or to remove some + $media_files[$mediatype] = css_filewrapper($mediatype, $files); + $CSSEvt = new Doku_Event('CSS_STYLES_INCLUDED', $media_files[$mediatype]); + + // Make it preventable. + if ( $CSSEvt->advise_before() ) { + $cache_files = array_merge($cache_files, array_keys($media_files[$mediatype]['files'])); + } else { + // unset if prevented. Nothing will be printed for this mediatype. + unset($media_files[$mediatype]); + } + + // finish event. + $CSSEvt->advise_after(); } + // The generated script depends on some dynamic options + $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$INPUT->bool('preview').DOKU_BASE.$tpl.$type,'.css'); + $cache->_event = 'CSS_CACHE_USE'; + // 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))); + $cache_ok = $cache->useCache(array('files' => $cache_files)); + http_cached($cache->cache, $cache_ok); // start output buffering ob_start(); + // Fire CSS_STYLES_INCLUDED for one last time to let the + // plugins decide whether to include the DW default styles. + // This can be done by preventing the Default. + $media_files['DW_DEFAULT'] = css_filewrapper('DW_DEFAULT'); + trigger_event('CSS_STYLES_INCLUDED', $media_files['DW_DEFAULT'], 'css_defaultstyles'); + // build the stylesheet foreach ($mediatypes as $mediatype) { - // print the default classes for interwiki links and file downloads - if ($mediatype == 'screen') { - print '@media screen {'; - css_interwiki(); - css_filetypes(); - print '}'; + // Check if there is a wrapper set for this type. + if ( !isset($media_files[$mediatype]) ) { + continue; } + $cssData = $media_files[$mediatype]; + + // Print the styles. + print NL; + if ( $cssData['encapsulate'] === true ) print $cssData['encapsulationPrefix'] . ' {'; + print '/* START '.$cssData['mediatype'].' styles */'.NL; + // load files - $css_content = ''; - foreach($files[$mediatype] as $file => $location){ + foreach($cssData['files'] as $file => $location){ $display = str_replace(fullpath(DOKU_INC), '', fullpath($file)); - $css_content .= "\n/* XXXXXXXXX $display XXXXXXXXX */\n"; - $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; + print "\n/* XXXXXXXXX $display XXXXXXXXX */\n"; + print css_loadfile($file, $location); } + + print NL; + if ( $cssData['encapsulate'] === true ) print '} /* /@media '; + else print '/*'; + print ' END '.$cssData['mediatype'].' styles */'.NL; } + // end output buffering and get contents $css = ob_get_contents(); ob_end_clean(); @@ -263,7 +280,18 @@ function css_styleini($tpl, $preview=false) { global $conf; $stylesheets = array(); // mode, file => base - $replacements = array(); // placeholder => value + // guaranteed placeholder => value + $replacements = array( + '__text__' => "#000", + '__background__' => "#fff", + '__text_alt__' => "#999", + '__background_alt__' => "#eee", + '__text_neu__' => "#666", + '__background_neu__' => "#ddd", + '__border__' => "#ccc", + '__highlight__' => "#ff9", + '__link__' => "#00f", + ); // load template's style.ini $incbase = tpl_incdir($tpl); @@ -336,6 +364,41 @@ function css_fixreplacementurls($replacements, $location) { return $replacements; } +/** + * Wrapper for the files, content and mediatype for the event CSS_STYLES_INCLUDED + * + * @author Gerry Weißbach <gerry.w@gammaproduction.de> + * + * @param string $mediatype type ofthe current media files/content set + * @param array $files set of files that define the current mediatype + * @return array + */ +function css_filewrapper($mediatype, $files=array()){ + return array( + 'files' => $files, + 'mediatype' => $mediatype, + 'encapsulate' => $mediatype != 'all', + 'encapsulationPrefix' => '@media '.$mediatype + ); +} + +/** + * Prints the @media encapsulated default styles of DokuWiki + * + * @author Gerry Weißbach <gerry.w@gammaproduction.de> + * + * This function is being called by a CSS_STYLES_INCLUDED event + * The event can be distinguished by the mediatype which is: + * DW_DEFAULT + */ +function css_defaultstyles(){ + // print the default classes for interwiki links and file downloads + print '@media screen {'; + css_interwiki(); + css_filetypes(); + print '}'; +} + /** * Prints classes for interwikilinks * diff --git a/lib/exe/opensearch.php b/lib/exe/opensearch.php index 98f5f52d5af154158c33d22c1b45f25c3e526ff3..b00b2b7710be98ef0ce9796c81b22563e1594d67 100644 --- a/lib/exe/opensearch.php +++ b/lib/exe/opensearch.php @@ -28,7 +28,7 @@ if(file_exists(DOKU_INC.'favicon.ico')){ header('Content-Type: application/opensearchdescription+xml; charset=utf-8'); echo '<?xml version="1.0"?>'.NL; echo '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">'.NL; -echo ' <ShortName>'.htmlspecialchars($conf['title']).'</ShortName>'.NL; +echo ' <ShortName>'.hsc($conf['title']).'</ShortName>'.NL; echo ' <Image width="16" height="16" type="image/x-icon">'.$ico.'</Image>'.NL; echo ' <Url type="text/html" template="'.DOKU_URL.DOKU_SCRIPT.'?do=search&id={searchTerms}" />'.NL; echo ' <Url type="application/x-suggestions+json" template="'. diff --git a/lib/images/loading.gif b/lib/images/loading.gif deleted file mode 100644 index 35058e20f0fa29fb426d56dc31cfb36fa2af417d..0000000000000000000000000000000000000000 Binary files a/lib/images/loading.gif and /dev/null differ diff --git a/lib/images/menu/00-default_checkbox-blank-circle-outline.svg b/lib/images/menu/00-default_checkbox-blank-circle-outline.svg new file mode 100644 index 0000000000000000000000000000000000000000..e8f8c07ec3961a88d9dee9f62a1ae1d98b92623b --- /dev/null +++ b/lib/images/menu/00-default_checkbox-blank-circle-outline.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 20a8 8 0 0 1-8-8 8 8 0 0 1 8-8 8 8 0 0 1 8 8 8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/01-edit_pencil.svg b/lib/images/menu/01-edit_pencil.svg new file mode 100644 index 0000000000000000000000000000000000000000..e3a4faa119c45adb8891af50c9c02972e709ab53 --- /dev/null +++ b/lib/images/menu/01-edit_pencil.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/02-create_pencil.svg b/lib/images/menu/02-create_pencil.svg new file mode 100644 index 0000000000000000000000000000000000000000..4c30b49a74c17aed1697eb5eebc415b9e130c0b9 --- /dev/null +++ b/lib/images/menu/02-create_pencil.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M13.118 16.118h3v-3h2v3h3v2h-3v3h-2v-3h-3zM20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/03-draft_android-studio.svg b/lib/images/menu/03-draft_android-studio.svg new file mode 100644 index 0000000000000000000000000000000000000000..589658d843a45764b8118b43f3bda98d6a2c7a98 --- /dev/null +++ b/lib/images/menu/03-draft_android-studio.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 2h2v2h.5A1.5 1.5 0 0 1 15 5.5V9l-.44.44 1.64 2.84C17.31 11.19 18 9.68 18 8h2c0 2.42-1.07 4.59-2.77 6.06l3.14 5.44.13 2.22-1.87-1.22-3.07-5.33c-1.06.53-2.28.83-3.56.83-1.28 0-2.5-.3-3.56-.83L5.37 20.5 3.5 21.72l.13-2.22L9.44 9.44 9 9V5.5A1.5 1.5 0 0 1 10.5 4h.5V2M9.44 13.43c.78.37 1.65.57 2.56.57.91 0 1.78-.2 2.56-.57L13.1 10.9h-.01c-.62.6-1.56.6-2.18 0h-.01l-1.46 2.53M12 6a1 1 0 0 0-1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0-1-1z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/04-show_file-document.svg b/lib/images/menu/04-show_file-document.svg new file mode 100644 index 0000000000000000000000000000000000000000..0eed2745faa6139d308a7d2179c4f2689426cadf --- /dev/null +++ b/lib/images/menu/04-show_file-document.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m9 16v-2H6v2h9m3-4v-2H6v2h12z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/05-source_file-xml.svg b/lib/images/menu/05-source_file-xml.svg new file mode 100644 index 0000000000000000000000000000000000000000..7e0034299e318f6f22c80e4887a12ade3470fc8c --- /dev/null +++ b/lib/images/menu/05-source_file-xml.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5l3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41-3.74 3.74m11.16 0l-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41 3.74-3.74z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/06-revert_replay.svg b/lib/images/menu/06-revert_replay.svg new file mode 100644 index 0000000000000000000000000000000000000000..0911e5bf2ea6c0d1c7db2378f3638f7f61bb16c5 --- /dev/null +++ b/lib/images/menu/06-revert_replay.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6H4a8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/07-revisions_history.svg b/lib/images/menu/07-revisions_history.svg new file mode 100644 index 0000000000000000000000000000000000000000..cedbc1b92a6445cd974751f956d3f947b3ef5188 --- /dev/null +++ b/lib/images/menu/07-revisions_history.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 7v5.11l4.71 2.79.79-1.28-4-2.37V7m0-5C8.97 2 5.91 3.92 4.27 6.77L2 4.5V11h6.5L5.75 8.25C6.96 5.73 9.5 4 12.5 4a7.5 7.5 0 0 1 7.5 7.5 7.5 7.5 0 0 1-7.5 7.5c-3.27 0-6.03-2.09-7.06-5h-2.1c1.1 4.03 4.77 7 9.16 7 5.24 0 9.5-4.25 9.5-9.5A9.5 9.5 0 0 0 12.5 2z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/08-backlink_link-variant.svg b/lib/images/menu/08-backlink_link-variant.svg new file mode 100644 index 0000000000000000000000000000000000000000..4d639a57cadbe6dea259b6f03e968ecf77789c07 --- /dev/null +++ b/lib/images/menu/08-backlink_link-variant.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/09-subscribe_email-outline.svg b/lib/images/menu/09-subscribe_email-outline.svg new file mode 100644 index 0000000000000000000000000000000000000000..3b23dacd0b23966b1d435db0b25cda096cf24560 --- /dev/null +++ b/lib/images/menu/09-subscribe_email-outline.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 14H4V8l8 5 8-5v10m0-12l-8 5-8-5h16z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/10-top_arrow-up.svg b/lib/images/menu/10-top_arrow-up.svg new file mode 100644 index 0000000000000000000000000000000000000000..61003a826611f1f670d25579b9997b55f1987d3b --- /dev/null +++ b/lib/images/menu/10-top_arrow-up.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/11-mediamanager_folder-image.svg b/lib/images/menu/11-mediamanager_folder-image.svg new file mode 100644 index 0000000000000000000000000000000000000000..4376fdfbded6cf783877cbb8a6e9d55516184a41 --- /dev/null +++ b/lib/images/menu/11-mediamanager_folder-image.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M5 17l4.5-6 3.5 4.5 2.5-3L19 17m1-11h-8l-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/12-back_arrow-left.svg b/lib/images/menu/12-back_arrow-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..d8011b10aab8168f0fd78f13aaad2cc10009db3e --- /dev/null +++ b/lib/images/menu/12-back_arrow-left.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/account-card-details.svg b/lib/images/menu/account-card-details.svg new file mode 100644 index 0000000000000000000000000000000000000000..ba742568b1e98229f751c063f99f36599209fd59 --- /dev/null +++ b/lib/images/menu/account-card-details.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M2 3h20c1.05 0 2 .95 2 2v14c0 1.05-.95 2-2 2H2c-1.05 0-2-.95-2-2V5c0-1.05.95-2 2-2m12 3v1h8V6h-8m0 2v1h8V8h-8m0 2v1h7v-1h-7m-6 3.91C6 13.91 2 15 2 17v1h12v-1c0-2-4-3.09-6-3.09M8 6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/account-plus.svg b/lib/images/menu/account-plus.svg new file mode 100644 index 0000000000000000000000000000000000000000..a978bf18cd6188ba3f4fcb3d96ff8b56043a32f7 --- /dev/null +++ b/lib/images/menu/account-plus.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 14c-2.67 0-8 1.33-8 4v2h16v-2c0-2.67-5.33-4-8-4m-9-4V7H4v3H1v2h3v3h2v-3h3v-2m6 2a4 4 0 0 0 4-4 4 4 0 0 0-4-4 4 4 0 0 0-4 4 4 4 0 0 0 4 4z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/calendar-clock.svg b/lib/images/menu/calendar-clock.svg new file mode 100644 index 0000000000000000000000000000000000000000..b19735dbb667bbfe5218915ab32d9a093aa2cf11 --- /dev/null +++ b/lib/images/menu/calendar-clock.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 13h1.5v2.82l2.44 1.41-.75 1.3L15 16.69V13m4-5H5v11h4.67c-.43-.91-.67-1.93-.67-3a7 7 0 0 1 7-7c1.07 0 2.09.24 3 .67V8M5 21a2 2 0 0 1-2-2V5c0-1.11.89-2 2-2h1V1h2v2h8V1h2v2h1a2 2 0 0 1 2 2v6.1c1.24 1.26 2 2.99 2 4.9a7 7 0 0 1-7 7c-1.91 0-3.64-.76-4.9-2H5m11-9.85A4.85 4.85 0 0 0 11.15 16c0 2.68 2.17 4.85 4.85 4.85A4.85 4.85 0 0 0 20.85 16c0-2.68-2.17-4.85-4.85-4.85z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/file-tree.svg b/lib/images/menu/file-tree.svg new file mode 100644 index 0000000000000000000000000000000000000000..0f261882f897aa41af1fb99c19c6f5d66e2aca96 --- /dev/null +++ b/lib/images/menu/file-tree.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 3h6v4H3V3m12 7h6v4h-6v-4m0 7h6v4h-6v-4m-2-4H7v5h6v2H5V9h2v2h6v2z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/folder-multiple-image.svg b/lib/images/menu/folder-multiple-image.svg new file mode 100644 index 0000000000000000000000000000000000000000..f66aaaddb2763f0fed938e181cf1a9d077783969 --- /dev/null +++ b/lib/images/menu/folder-multiple-image.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 15l4.5-6 3.5 4.5 2.5-3L21 15m1-11h-8l-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M2 6H0v14a2 2 0 0 0 2 2h18v-2H2V6z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/lock-reset.svg b/lib/images/menu/lock-reset.svg new file mode 100644 index 0000000000000000000000000000000000000000..49693c60999aef16a39fe756006f7a42e45b1358 --- /dev/null +++ b/lib/images/menu/lock-reset.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12.63 2c5.53 0 10.01 4.5 10.01 10s-4.48 10-10.01 10c-3.51 0-6.58-1.82-8.37-4.57l1.58-1.25C7.25 18.47 9.76 20 12.64 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8C8.56 4 5.2 7.06 4.71 11h2.76l-3.74 3.73L0 11h2.69c.5-5.05 4.76-9 9.94-9m2.96 8.24c.5.01.91.41.91.92v4.61c0 .5-.41.92-.92.92h-5.53c-.51 0-.92-.42-.92-.92v-4.61c0-.51.41-.91.91-.92V9.23c0-1.53 1.25-2.77 2.77-2.77 1.53 0 2.78 1.24 2.78 2.77v1.01m-2.78-2.38c-.75 0-1.37.61-1.37 1.37v1.01h2.75V9.23c0-.76-.62-1.37-1.38-1.37z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/login.svg b/lib/images/menu/login.svg new file mode 100644 index 0000000000000000000000000000000000000000..07a9896c0e77f08382e092d8b39956867b8fa539 --- /dev/null +++ b/lib/images/menu/login.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 17.25V14H3v-4h7V6.75L15.25 12 10 17.25M8 2h9a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-4h2v4h9V4H8v4H6V4a2 2 0 0 1 2-2z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/logout.svg b/lib/images/menu/logout.svg new file mode 100644 index 0000000000000000000000000000000000000000..97d3158e42164858b15b73daf3516495f0d71c43 --- /dev/null +++ b/lib/images/menu/logout.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17 17.25V14h-7v-4h7V6.75L22.25 12 17 17.25M13 2a2 2 0 0 1 2 2v4h-2V4H4v16h9v-4h2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9z"/></svg> \ No newline at end of file diff --git a/lib/images/menu/settings.svg b/lib/images/menu/settings.svg new file mode 100644 index 0000000000000000000000000000000000000000..ced98713eb51a961d37fa3fb76769e716aa5aacc --- /dev/null +++ b/lib/images/menu/settings.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 15.5A3.5 3.5 0 0 1 8.5 12 3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97 0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1 0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z"/></svg> \ No newline at end of file diff --git a/lib/plugins/acl/lang/da/lang.php b/lib/plugins/acl/lang/da/lang.php index 287356f1d453be627ace3b428dd060dee0a05e94..5209b7b10283789bc92f3059d2337e566ef4c464 100644 --- a/lib/plugins/acl/lang/da/lang.php +++ b/lib/plugins/acl/lang/da/lang.php @@ -11,8 +11,7 @@ * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> */ $lang['admin_acl'] = 'Rettighedsadministration'; diff --git a/lib/plugins/acl/lang/eo/lang.php b/lib/plugins/acl/lang/eo/lang.php index f65995408e5eca94d5d3258b45dd0145bbef04a4..b59f4656e2c9ee42884a9ecb23a03385dd6a1c05 100644 --- a/lib/plugins/acl/lang/eo/lang.php +++ b/lib/plugins/acl/lang/eo/lang.php @@ -2,14 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipe Castro <fefcas@uol.com.br> * @author Felipo Kastro <fefcas@gmail.com> - * @author Felipe Castro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> */ $lang['admin_acl'] = 'Administrado de Alirkontrola Listo (ACL)'; $lang['acl_group'] = 'Grupo:'; diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index 483b8b5c686f7ea959ff791038cf19a442d5f874..92c07e8158da219b94df5922fcde5599e2a75521 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -18,10 +18,7 @@ * @author Vincent Feltz <psycho@feltzv.fr> * @author Philippe Bajoit <philippe.bajoit@gmail.com> * @author Florian Gaub <floriang@floriang.net> - * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author schplurtz@laposte.net - * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> diff --git a/lib/plugins/acl/lang/he/lang.php b/lib/plugins/acl/lang/he/lang.php index 2369b80101b75a1674f2379eb2efa8c4b8700081..33ce761a97f47031a434d74df526c58745ee678b 100644 --- a/lib/plugins/acl/lang/he/lang.php +++ b/lib/plugins/acl/lang/he/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author DoK <kamberd@yahoo.com> - * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> * @author Yaron Shahrabani <sh.yaron@gmail.com> diff --git a/lib/plugins/acl/lang/hr/lang.php b/lib/plugins/acl/lang/hr/lang.php index 9b68c8a15800e52733d0946e851b0a8566eb3d70..d1881766f7eeaec7eb86c05fc41e0faf81f17188 100644 --- a/lib/plugins/acl/lang/hr/lang.php +++ b/lib/plugins/acl/lang/hr/lang.php @@ -5,7 +5,7 @@ * * @author Branko Rihtman <theney@gmail.com> * @author Dražen OdobaÅ¡ić <dodobasic@gmail.com> - * @author Dejan Igrec dejan.igrec@gmail.com + * @author Dejan Igrec <dejan.igrec@gmail.com> */ $lang['admin_acl'] = 'Upravljanje listom kontrole pristupa'; $lang['acl_group'] = 'Grupa:'; diff --git a/lib/plugins/acl/lang/it/lang.php b/lib/plugins/acl/lang/it/lang.php index c44ee8822159adeb35e2f7e1603bc8e95f12884f..4aef9aa46c37a5ddbc6acf2b70d49b8acff1846f 100644 --- a/lib/plugins/acl/lang/it/lang.php +++ b/lib/plugins/acl/lang/it/lang.php @@ -6,15 +6,10 @@ * @author Giorgio Vecchiocattivi <giorgio@vecchio.it> * @author Roberto Bolli <http://www.rbnet.it/> * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com */ $lang['admin_acl'] = 'Gestione Lista Controllo Accessi (ACL)'; $lang['acl_group'] = 'Gruppo:'; diff --git a/lib/plugins/acl/lang/lv/lang.php b/lib/plugins/acl/lang/lv/lang.php index c0acdd7331c8d8299e5d1a25814e1e9fc45690f9..e4ca49261a8e287faf8f10bdc360cc3c7049ccbb 100644 --- a/lib/plugins/acl/lang/lv/lang.php +++ b/lib/plugins/acl/lang/lv/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['admin_acl'] = 'Piekļuves tiesÄ«bu vadÄ«ba'; diff --git a/lib/plugins/acl/lang/nl/lang.php b/lib/plugins/acl/lang/nl/lang.php index e8b3b20dc27045d1d58964e568e5b4af7fa13f03..695022d0739abd727674a44e302dbb3d3b6a9576 100644 --- a/lib/plugins/acl/lang/nl/lang.php +++ b/lib/plugins/acl/lang/nl/lang.php @@ -13,13 +13,10 @@ * @author Dion Nicolaas <dion@nicolaas.net> * @author Danny Rotsaert <danny.rotsaert@edpnet.be> * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> - * @author Gerrit Uitslag <klapinklapin@gmail.com> * @author Remon <no@email.local> */ $lang['admin_acl'] = 'Toegangsrechten'; diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php index c840f449b64af4008b25b238f3bd964568e96f11..2d2f91eb99daee783b8de38695228bdf7c57971a 100644 --- a/lib/plugins/acl/lang/pl/lang.php +++ b/lib/plugins/acl/lang/pl/lang.php @@ -7,7 +7,7 @@ * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> diff --git a/lib/plugins/acl/lang/ru/lang.php b/lib/plugins/acl/lang/ru/lang.php index dc6744451a0126df7700851421a030256d785c7b..e35d1db2872f71d3758135734314b0a25ca0b36f 100644 --- a/lib/plugins/acl/lang/ru/lang.php +++ b/lib/plugins/acl/lang/ru/lang.php @@ -7,7 +7,6 @@ * @author Змей ÐтерийÑкий evil_snake@eternion.ru * @author Hikaru Nakajima <jisatsu@mail.ru> * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com * @author Alexander Sorkin <kibizoid@gmail.com> * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> @@ -16,7 +15,6 @@ * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) */ $lang['admin_acl'] = 'Управление ÑпиÑками ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»Ñ Ð´Ð¾Ñтупа'; $lang['acl_group'] = 'Группа:'; diff --git a/lib/plugins/acl/lang/sv/lang.php b/lib/plugins/acl/lang/sv/lang.php index 786a4e5b8ff41d70df45f6cff13e2a510f6c2989..176a93786723665035f6104d9f36b0dd90d2acf3 100644 --- a/lib/plugins/acl/lang/sv/lang.php +++ b/lib/plugins/acl/lang/sv/lang.php @@ -8,14 +8,10 @@ * @author HÃ¥kan Sandell <hakan.sandell@home.se> * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com */ $lang['admin_acl'] = 'Hantera behörighetslistan (ACL)'; $lang['acl_group'] = 'Grupp:'; diff --git a/lib/plugins/acl/lang/uk/lang.php b/lib/plugins/acl/lang/uk/lang.php index 4d8b52e1b0f77c8eb7e0e390b44a65f6e9a0d6ea..05c259601e0884361b3eee51f4782aaecbd23ad7 100644 --- a/lib/plugins/acl/lang/uk/lang.php +++ b/lib/plugins/acl/lang/uk/lang.php @@ -2,13 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Oleksiy Voronin <ovoronin@gmail.com> - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com */ $lang['admin_acl'] = 'ÐšÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ ÑпиÑками контролю доÑтупу'; $lang['acl_group'] = 'Група:'; diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php index 5a893a37fb8cebbf171c15cd0de3b03f3c6fcd0a..3191745817da6c023ef58791f2bd34d9eda73973 100644 --- a/lib/plugins/acl/lang/zh/lang.php +++ b/lib/plugins/acl/lang/zh/lang.php @@ -5,15 +5,11 @@ * * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> */ $lang['admin_acl'] = '访问控制列表(ACL)管ç†å™¨'; diff --git a/lib/plugins/authad/lang/eo/lang.php b/lib/plugins/authad/lang/eo/lang.php index e738323da067f9c70f583c50587bdf309cc82519..94580c6cf1549796548f0d9cae4c329b5222aaab 100644 --- a/lib/plugins/authad/lang/eo/lang.php +++ b/lib/plugins/authad/lang/eo/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Robert Bogenschneider <bogi@uea.org> */ $lang['domain'] = 'Ensaluta domajno'; diff --git a/lib/plugins/authad/lang/eo/settings.php b/lib/plugins/authad/lang/eo/settings.php index 11640ebb713a0a7f500e072ae5fdc13588c6369a..cf9cad0c28c195a67b4e8e0d51c826a6f35d2668 100644 --- a/lib/plugins/authad/lang/eo/settings.php +++ b/lib/plugins/authad/lang/eo/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Robert Bogenschneider <bogi@uea.org> */ $lang['account_suffix'] = 'Via konto-aldonaĵo, ekz. <code>@mia.domajno.lando</code>'; diff --git a/lib/plugins/authad/lang/he/lang.php b/lib/plugins/authad/lang/he/lang.php index 5b193ed5f91cb6f8a9e68d5e48eeb5c28f33a8af..ac8fbcb5c44ed666733acd883c304d9d7cda3f91 100644 --- a/lib/plugins/authad/lang/he/lang.php +++ b/lib/plugins/authad/lang/he/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author tomer <tomercarolldergicz@gmail.com> * @author Menashe Tomer <menashesite@gmail.com> */ diff --git a/lib/plugins/authad/lang/he/settings.php b/lib/plugins/authad/lang/he/settings.php index b1436813018bfe4b8c55ef1f9a0857422cb0a8ee..d0d459cc1a0f07581934f21be161c328566cb493 100644 --- a/lib/plugins/authad/lang/he/settings.php +++ b/lib/plugins/authad/lang/he/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Menashe Tomer <menashesite@gmail.com> */ $lang['admin_password'] = 'סיסמת המשתמש המוזכן'; diff --git a/lib/plugins/authad/lang/lv/lang.php b/lib/plugins/authad/lang/lv/lang.php index a208ac949f8391dd37c9b98147833fba0c17ca45..fd20d3410f7ea188c461151b3a1e4a046d8580ca 100644 --- a/lib/plugins/authad/lang/lv/lang.php +++ b/lib/plugins/authad/lang/lv/lang.php @@ -2,8 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Oskars Pakers <oskars.pakers@gmail.com> * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['domain'] = 'IežurnÄlēšanÄs domÄ“ns'; $lang['authpwdexpire'] = 'Tavai parolei pÄ“c %d dienÄm biegsies termiņš, tÄ drÄ«zumÄ jÄnomaina.'; +$lang['passchangefail'] = 'NeizdevÄs nomainÄ«t paroli. VarbÅ«t parole neatbilst noteikumiem?'; +$lang['userchangefail'] = 'NeizdevÄs labot lietotÄju. VarbÅ«t jÅ«su kontam nav nepiecieÅ¡amÄs atļaujas?'; +$lang['connectfail'] = 'NeizdevÄs savienotes ar aktÄ«vÄs direktorijas serveri.'; diff --git a/lib/plugins/authad/lang/lv/settings.php b/lib/plugins/authad/lang/lv/settings.php index 5272d27d0521fc62e1a8fc9bc52b52d197c16217..72b9cf25ecb6f2a49ce0fac92f05efb9acb84422 100644 --- a/lib/plugins/authad/lang/lv/settings.php +++ b/lib/plugins/authad/lang/lv/settings.php @@ -2,10 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Oskars Pakers <oskars.pakers@gmail.com> * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['account_suffix'] = 'JÅ«su konta sufikss. PiemÄ“ram, <code>@my.domain.org</code>'; +$lang['base_dn'] = 'JÅ«su bÄzes DN. PiemÄ“ram, <code>DC=my,DC=domain,DC=org</code>'; $lang['domain_controllers'] = 'Ar komatiem atdalÄ«ts domÄ“na kontroleru saraksts. PiemÄ“ram, <code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_password'] = 'MinÄ“tÄ lietotÄja parole.'; $lang['expirywarn'] = 'Cik dienas iepriekÅ¡ brÄ«dinÄt lietotÄju par paroles termiņa beigÄm. IerakstÄ«t 0, lai atspÄ“jotu.'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index da0d3af00019b978f8f91860fe6c785ac1c41521..003894ab35fb8ff485ab91fc4cc13e7e4807f657 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Tomasz Bosak <bosak.tomasz@gmail.com> * @author PaweÅ‚ Jan CzochaÅ„ski <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index 4e95d36f931f455d727989bcfa775dd2d90551f7..bdd57db219cc0cd88aa87248f2b89c4cfbad2953 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -8,7 +8,6 @@ * @author Artur <ncuxxx@gmail.com> * @author Erli Moen <evseev.jr@gmail.com> * @author Владимир <id37736@yandex.ru> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Type-kun <workwork-1@yandex.ru> * @author Vitaly Filatenko <kot@hacktest.net> * @author Radimir <radimir.shevchenko@gmail.com> diff --git a/lib/plugins/authad/lang/sr/lang.php b/lib/plugins/authad/lang/sr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..d5ac17b910161338c3b31c278f0fbd2e2eb4206a --- /dev/null +++ b/lib/plugins/authad/lang/sr/lang.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['domain'] = 'Домен пријаве'; +$lang['authpwdexpire'] = 'Ваша лозинка ће иÑтећи за %d дан(а), требало би да је промените уÑкоро.'; +$lang['passchangefail'] = 'ÐиÑам уÑпео да променим лозинку. Можда ниÑу иÑпоштована правила за промену лозинке.'; +$lang['userchangefail'] = 'ÐиÑам уÑпео да променим кориÑничке оÑобине. Можда ваш налог нема довољно овлашћења за прављење измена?'; +$lang['connectfail'] = 'ÐиÑам уÑпео да Ñе повежем на Active Directory Ñервер.'; diff --git a/lib/plugins/authad/lang/sr/settings.php b/lib/plugins/authad/lang/sr/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..5e4409cc373a42eeba4134cf2cf1b98d367310b5 --- /dev/null +++ b/lib/plugins/authad/lang/sr/settings.php @@ -0,0 +1,19 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['account_suffix'] = 'Ð¡ÑƒÑ„Ð¸ÐºÑ Ð½Ð° вашем налогу. Ðпр.: <code>@moj.domen.rs</code>'; +$lang['base_dn'] = 'Ваше оÑновно име домена. Ðпр.: <code>DC=moj,DC=domen,DC=org</code>'; +$lang['domain_controllers'] = 'СпиÑак доменÑких контролера, одвојених зарезима. Ðпр.: <code>srv1.domen.org,srv2.domen.org</code>'; +$lang['admin_username'] = 'Повлашћени Active Directory кориÑник Ñа приÑтупом подацима Ñвих кориÑника. Изборно али је потребно за одређене радње као што је Ñлање мејлова о претплаћивању.'; +$lang['admin_password'] = 'Лозинка за кориÑника изнад.'; +$lang['sso'] = 'Да ли треба да Ñе кориÑти Single-Sign-On преко КербероÑа или NTLM-а?'; +$lang['use_ssl'] = 'КориÑтити SSL везу? Ðко Ñе кориÑти, не омогућујте TLS иÑпод.'; +$lang['use_tls'] = 'КориÑтити TLS везу? Ðко Ñе кориÑти, не омогућујте SSL иÑпод.'; +$lang['debug'] = 'Приказати додатан излаз за поправљање грешака код наÑтанка грешака?'; +$lang['expirywarn'] = 'Дана унапред за које треба упозорити кориÑника на иÑтицање лозинке. 0 за иÑкључивање.'; +$lang['update_name'] = 'Дозволити кориÑницима да ажурирају њихово AD приказно име?'; +$lang['update_mail'] = 'Дозволити кориÑницима да ажурирају њихове мејл адрÑе?'; diff --git a/lib/plugins/authad/lang/sv/lang.php b/lib/plugins/authad/lang/sv/lang.php index 0a6e62cbb87e2cc0d5956d53b422b0f5c948baa3..8c6397552688431d4b507a2d9e5e4d3773c0d95f 100644 --- a/lib/plugins/authad/lang/sv/lang.php +++ b/lib/plugins/authad/lang/sv/lang.php @@ -3,9 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Smorkster Andersson smorkster@gmail.com * @author Tor Härnqvist <tor@harnqvist.se> + * @author Smorkster Andersson smorkster@gmail.com */ +$lang['domain'] = 'Inloggningsdomän'; $lang['authpwdexpire'] = 'Ditt lösenord kommer att bli ogiltigt om %d dagar, du bör ändra det snart.'; $lang['passchangefail'] = 'Kunde inte ändra lösenord. Kanske var inte lösenordspolicyn uppfylld?'; $lang['userchangefail'] = 'Kunde inte ändra användaregenskaper. Kanske har ditt konto inte behörighet att göra ändringar?'; diff --git a/lib/plugins/authad/lang/sv/settings.php b/lib/plugins/authad/lang/sv/settings.php index 2dd1455f5b0883af8f481a69fd8b7ded38088012..249eb33acdb7fdfad72598fdb3a58349f4b44126 100644 --- a/lib/plugins/authad/lang/sv/settings.php +++ b/lib/plugins/authad/lang/sv/settings.php @@ -3,13 +3,18 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Smorkster Andersson smorkster@gmail.com * @author Tor Härnqvist <tor@harnqvist.se> + * @author Smorkster Andersson smorkster@gmail.com */ $lang['account_suffix'] = 'Ditt konto suffix. T.ex. <code>min.domän.org</code>'; +$lang['base_dn'] = 'Din bas-DN. T ex <code>DC=min,DC=domän,DC=org</code>'; $lang['domain_controllers'] = 'En kommaseparerad lista av Domain controllers. T ex <code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_password'] = 'Lösenord för användare ovan.'; $lang['sso'] = 'Ska Single-Sign-On via Kerberos eller NTLM användas?'; $lang['use_ssl'] = 'Använda SSL anslutning? Om använd, möjliggör inte TLS nedan.'; $lang['use_tls'] = 'Använda TLS anslutning? Om använd, möjliggör inte SSL ovan.'; +$lang['debug'] = 'Visa utökad avlusningsinformation för fel?'; $lang['expirywarn'] = 'Antakl dagar i förväg att varna användare om utgÃ¥ende lösenord. 0 för att inaktivera.'; +$lang['additional'] = 'En komma-separerad lista pÃ¥ extra AT-attibut att hämta frÃ¥n användardata. Används av vissa plugin.'; +$lang['update_name'] = 'TillÃ¥t användare att uppdatera deras AD-visningsnamn?'; +$lang['update_mail'] = 'TillÃ¥t användare att uppdatera deras e-postadresser?'; diff --git a/lib/plugins/authad/lang/uk/lang.php b/lib/plugins/authad/lang/uk/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..7e685a9cea58b4cf7ee547b470fad897d860d1f0 --- /dev/null +++ b/lib/plugins/authad/lang/uk/lang.php @@ -0,0 +1,14 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author ОлекÑій <alexey.furashev@gmail.com> + * @author Vitaly <vitaly.balashov@smuzzy.com.ua> + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['domain'] = 'Домен'; +$lang['authpwdexpire'] = 'Ð”Ñ–Ñ Ð²Ð°ÑˆÐ¾Ð³Ð¾ паролю завершитÑÑ Ñ‡ÐµÑ€ÐµÐ· %d днів, вам необхідно змінити його щонайвшидше.'; +$lang['passchangefail'] = 'Ðе вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ пароль. Можливо, політика Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ була заÑтоÑована?'; +$lang['userchangefail'] = 'Ðе вийшло змінити атрибути кориÑтувача. Можливо, у вашого акаунту немає дозволу на внеÑÐµÐ½Ð½Ñ Ð·Ð¼Ñ–Ð½?'; +$lang['connectfail'] = 'Ðе вийшло з\'єднатиÑÑ Ñ Ñервером Active Directory.'; diff --git a/lib/plugins/authad/lang/uk/settings.php b/lib/plugins/authad/lang/uk/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..9cf156f58e448ceeecc07a1ff3871f485123d65c --- /dev/null +++ b/lib/plugins/authad/lang/uk/settings.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author ОлекÑій <alexey.furashev@gmail.com> + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['admin_password'] = 'Пароль вказаного кориÑтувача.'; +$lang['use_ssl'] = 'ВикориÑтовуєте SSL-з\'єднаннÑ? Якщо так, не вмикайте TLS нижче.'; +$lang['use_tls'] = 'ВикориÑтовуєте TLS-з\'єднаннÑ? Якщо так, не вмикайте SSL нижче.'; +$lang['debug'] = 'Показати додаткові відомоÑті щодо помилок?'; +$lang['expirywarn'] = 'КількіÑть днів за Ñких попереджати про Ð·Ð°ÐºÑ–Ð½Ñ‡ÐµÐ½Ð½Ñ Ð´Ñ–Ñ— Ð¿Ð°Ñ€Ð¾Ð»Ñ ÐºÐ¾Ñ€Ð¸Ñтувача. 0 - не попереджати.'; +$lang['update_name'] = 'Дозволити кориÑтувачам оновлювати ім\'Ñ AD, Ñке відображаєтьÑÑ?'; +$lang['update_mail'] = 'Дозволити кориÑтувачам оновлювати Ñ—Ñ… адреÑи електронної пошлти?'; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 9dece24279cc740805339991b9ed8d701ee841fa..52f9ba50dc073fd8185b3bc84193b364554f8de5 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -184,10 +184,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { $info = array(); $info['user'] = $user; $this->_debug('LDAP user to find: '.htmlspecialchars($info['user']), 0, __LINE__, __FILE__); - + $info['server'] = $this->getConf('server'); $this->_debug('LDAP Server: '.htmlspecialchars($info['server']), 0, __LINE__, __FILE__); - + //get info for given user $base = $this->_makeFilter($this->getConf('usertree'), $info); @@ -198,20 +198,20 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } $this->_debug('LDAP Filter: '.htmlspecialchars($filter), 0, __LINE__, __FILE__); - + $this->_debug('LDAP user search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__); $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('userscope')); - + $result = @ldap_get_entries($this->con, $sr); // if result is not an array if(!is_array($result)) { // no objects found $this->_debug('LDAP search returned non-array result: '.htmlspecialchars(print($result)), -1, __LINE__, __FILE__); - return false; + return false; } - + // Don't accept more or less than one response if ($result['count'] != 1) { $this->_debug('LDAP search returned '.htmlspecialchars($result['count']).' results while it should return 1!', -1, __LINE__, __FILE__); @@ -220,10 +220,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { //} return false; } - - + + $this->_debug('LDAP search found single result !', 0, __LINE__, __FILE__); - + $user_result = $result[0]; ldap_free_result($sr); @@ -239,7 +239,9 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { foreach($this->getConf('mapping') as $localkey => $key) { if(is_array($key)) { // use regexp to clean up user_result - list($key, $regexp) = each($key); + // $key = array($key=>$regexp), only handles the first key-value + $regexp = current($key); + $key = key($key); if($user_result[$key]) foreach($user_result[$key] as $grpkey => $grp) { if($grpkey !== 'count' && preg_match($regexp, $grp, $match)) { if($localkey == 'grps') { diff --git a/lib/plugins/authldap/lang/da/lang.php b/lib/plugins/authldap/lang/da/lang.php index 03ae2eb351654e16429c050597cbf1734ddd0473..35249dfa014ff7e4407e115d8cd173a6bb4a4df8 100644 --- a/lib/plugins/authldap/lang/da/lang.php +++ b/lib/plugins/authldap/lang/da/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['connectfail'] = 'LDAP kan ikke forbinde: %s'; +$lang['domainfail'] = 'LDAP kan ikke finde dit bruger dn'; diff --git a/lib/plugins/authldap/lang/da/settings.php b/lib/plugins/authldap/lang/da/settings.php index 777b5e3e9a4c5aca972484f9cf5ddd5ae00d1437..7a1384db6e0b642d3e55dd276d7fbf464808d518 100644 --- a/lib/plugins/authldap/lang/da/settings.php +++ b/lib/plugins/authldap/lang/da/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> * @author Jacob Palm <mail@jacobpalm.dk> @@ -15,6 +16,14 @@ $lang['userfilter'] = 'LDAP filter der benyttes til at søge efter br $lang['groupfilter'] = 'LDAP filter tder benyttes til at søge efter grupper. F.eks. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'Protokol version der skal benyttes. Det er muligvis nødvendigt at sætte denne til <code>3</code>'; $lang['starttls'] = 'Benyt TLS forbindelser?'; +$lang['binddn'] = 'DN af en valgfri <bindings-bruger, hvis ikke anonym binding er tilstrækkeligt. Fx <code>cn=admin,dc=my,dc=home</code>'; $lang['bindpw'] = 'Kodeord til ovenstÃ¥ende bruger'; +$lang['userscope'] = 'Begræns søgekriterier for brugersøgning'; +$lang['groupscope'] = 'Begræns søgekriterier for gruppesøgning'; +$lang['userkey'] = 'Attribut der betegner brugernavnet; skal være i overensstemmelse med brugerfilteret.'; +$lang['groupkey'] = 'Gruppemedlemskab fra hvilken som helst brugerattribut (i stedet for standard AD-grupper), fx gruppe fra afdeling eller telefonnummer'; $lang['modPass'] = 'Kan LDAP adgangskoden skiftes via DokuWiki?'; $lang['debug'] = 'Vis yderligere debug output ved fejl'; +$lang['referrals_o_-1'] = 'brug standardindstilling'; +$lang['referrals_o_0'] = 'følg ikke henvisninger'; +$lang['referrals_o_1'] = 'følg henvisninger'; diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php index a17cf356d238eee9cf6e8aece96af764fd128d47..716b92ee6175c6ff665d32e8ec23ae7ddade9f54 100644 --- a/lib/plugins/authldap/lang/de-informal/settings.php +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -6,6 +6,7 @@ * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Volker Bödker <volker@boedker.de> * @author rnck <dokuwiki@rnck.de> + * @author F. Mueller-Donath <j.felix@mueller-donath.de> */ $lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (<code>localhost</code>) oder als FQDN (<code>ldap://server.tld:389</code>).'; $lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; @@ -21,6 +22,7 @@ $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonym $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; +$lang['userkey'] = 'Attribut, das den Benutzernamen enthält; muss konsistent zum userfilter sein.'; $lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; $lang['modPass'] = 'Kann das LDAP Passwort via dokuwiki geändert werden?'; $lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; diff --git a/lib/plugins/authldap/lang/eo/settings.php b/lib/plugins/authldap/lang/eo/settings.php index 07b46c84a5113aca3da65791c7cd7a83a6035731..ca20f675a911aea459012fc3ad248a7849d1b6c3 100644 --- a/lib/plugins/authldap/lang/eo/settings.php +++ b/lib/plugins/authldap/lang/eo/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipe Castro <fefcas@yahoo.com.br> */ $lang['server'] = 'Via LDAP-servilo. AÅ servila nomo (<code>localhost</code>) aÅ plene detala URL (<code>ldap://servilo.lando:389</code>)'; diff --git a/lib/plugins/authldap/lang/es/settings.php b/lib/plugins/authldap/lang/es/settings.php index 6ed46b0cd3ab37e9ac58227a87e0634856ebc079..ba8f41e599b9656dbe58a03a24a0e2684b343131 100644 --- a/lib/plugins/authldap/lang/es/settings.php +++ b/lib/plugins/authldap/lang/es/settings.php @@ -7,6 +7,7 @@ * @author Eloy <ej.perezgomez@gmail.com> * @author Alejandro Nunez <nunez.alejandro@gmail.com> * @author Enny Rodriguez <aquilez.4@gmail.com> + * @author Domingo Redal <docxml@gmail.com> */ $lang['server'] = 'Tu servidor LDAP. Puede ser el nombre del host (<code>localhost</code>) o una URL completa (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'Servidor LDAP en caso de que no se diera la URL completa anteriormente.'; @@ -18,6 +19,7 @@ $lang['version'] = 'La versión del protocolo a usar. Puede que ne $lang['starttls'] = 'Usar conexiones TLS?'; $lang['referrals'] = '¿Deben ser seguidas las referencias?'; $lang['deref'] = '¿Cómo desreferenciar los alias?'; +$lang['binddn'] = 'DN de un usuario de enlace opcional si el enlace anónimo no es suficiente. P. ej. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Contraseña del usuario de arriba.'; $lang['userscope'] = 'Limitar ámbito de búsqueda para búsqueda de usuarios'; $lang['groupscope'] = 'Limitar ámbito de búsqueda para búsqueda de grupos'; diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php index 49279f47f9b8c7db316f6a6206a0270bd8c2db41..be363670831a3eae06cff2f055667c0d12c32ccf 100644 --- a/lib/plugins/authldap/lang/fr/settings.php +++ b/lib/plugins/authldap/lang/fr/settings.php @@ -5,7 +5,6 @@ * * @author Bruno Veilleux <bruno.vey@gmail.com> * @author schplurtz <Schplurtz@laposte.net> - * @author Schplurtz le Déboulonné <schplurtz@laposte.net> */ $lang['server'] = 'Votre serveur LDAP. Soit le nom d\'hôte (<code>localhost</code>) ou l\'URL complète (<code>ldap://serveur.dom:389</code>)'; $lang['port'] = 'Port du serveur LDAP si l\'URL complète n\'a pas été indiquée ci-dessus'; diff --git a/lib/plugins/authldap/lang/he/settings.php b/lib/plugins/authldap/lang/he/settings.php index 10af7010d21177312d329f9be591a16ca352a257..88864467a587d22776ab87e591cf89a948d425de 100644 --- a/lib/plugins/authldap/lang/he/settings.php +++ b/lib/plugins/authldap/lang/he/settings.php @@ -2,11 +2,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Guy Yakobovitch <guy.yakobovitch@gmail.com> * @author matt carroll <matt.carroll@gmail.com> * @author Menashe Tomer <menashesite@gmail.com> */ $lang['starttls'] = 'השתמש בחיבורי TLS'; +$lang['bindpw'] = 'סיסמה של המשתמש לעיל'; $lang['modPass'] = '×”×× dokuwiki יכול ליצור סיסמ×ות LDAP?'; $lang['debug'] = 'הצג מידע × ×•×¡×£ על שגי×ות'; $lang['referrals_o_-1'] = 'ברירת מחדל'; diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php index 90986e4f130b6531a42e6f23b5b6ff9c4571defc..9ffb4e81ba6bc6b2b1d78cee1eb65fae4d7e79df 100644 --- a/lib/plugins/authldap/lang/lv/settings.php +++ b/lib/plugins/authldap/lang/lv/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['starttls'] = 'Lietot TLS savienojumus?'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 973584e7fd9c76b0524e86afb06827e95d5e49c8..916d9a2d2ee83221e410462bdbf4f608f8b0aaa1 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -6,7 +6,6 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Erli Moen <evseev.jr@gmail.com> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Владимир <id37736@yandex.ru> * @author Vitaly Filatenko <kot@hacktest.net> * @author Alex P <alexander@lanos.co.uk> diff --git a/lib/plugins/authldap/lang/sr/lang.php b/lib/plugins/authldap/lang/sr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..9b78602877c22015213797a6588ddf231c483525 --- /dev/null +++ b/lib/plugins/authldap/lang/sr/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['connectfail'] = 'LDAP - немогуће повезивање: %s'; +$lang['domainfail'] = 'LDAP - не могу наћи ваш кориÑнички dn'; diff --git a/lib/plugins/authldap/lang/sr/settings.php b/lib/plugins/authldap/lang/sr/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..3aec5c38a9251836bee37dcfe8eda189bd84ee72 --- /dev/null +++ b/lib/plugins/authldap/lang/sr/settings.php @@ -0,0 +1,17 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['starttls'] = 'КориÑтити TLS везе?'; +$lang['referrals'] = 'Да ли треба пратити реферале?'; +$lang['bindpw'] = 'Лозинка кориÑника изнад'; +$lang['userscope'] = 'Ограничи опÑег претраживања за кориÑничке претраге'; +$lang['groupscope'] = 'Ограничи опÑег претраживања за групне претраге'; +$lang['modPass'] = 'Омогућити измену LDAP лозинке преко докувикија?'; +$lang['debug'] = 'Прикажи додатне податке за поправљање грешака приликом наÑтанка грешака'; +$lang['referrals_o_-1'] = 'кориÑти подразумевано'; +$lang['referrals_o_0'] = 'не прати реферале'; +$lang['referrals_o_1'] = 'прати реферале'; diff --git a/lib/plugins/authldap/lang/sv/lang.php b/lib/plugins/authldap/lang/sv/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..cdc6c338b842895cab5f2a5f9d2797a0590f4559 --- /dev/null +++ b/lib/plugins/authldap/lang/sv/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tor Härnqvist <tor@harnqvist.se> + */ +$lang['connectfail'] = 'LDAP kan inte ansluta: %s'; +$lang['domainfail'] = 'LDAP kan inte hitta din användar-dn'; diff --git a/lib/plugins/authldap/lang/sv/settings.php b/lib/plugins/authldap/lang/sv/settings.php index 21d169c398a0f6fb503a1af3f2de0f5504b9bb90..07fc574269abf13ef3c55a72846ac34ab53f81d4 100644 --- a/lib/plugins/authldap/lang/sv/settings.php +++ b/lib/plugins/authldap/lang/sv/settings.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Smorkster Andersson smorkster@gmail.com - * @author Tor Härnqvist <tor.harnqvist@gmail.com> */ $lang['server'] = 'Din LDAO server. Antingen värdnamn (<code>localhost</code>) eller giltig full URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'LDAP server port, om det inte angavs full URL ovan'; @@ -15,5 +15,9 @@ $lang['groupfilter'] = 'LDAP filter för att söka efter grupper. T.ex $lang['version'] = 'Version av protokoll att använda. Du kan behöva sätta detta till <code>3</code>'; $lang['starttls'] = 'Använd TLS-anslutningar'; $lang['bindpw'] = 'Lösenord för användare ovan'; +$lang['userscope'] = 'Begränsa sökomfattning för användarsökning'; +$lang['groupscope'] = 'Begränsa sökomfattning för gruppsökning'; $lang['groupkey'] = 'Gruppmedlemskap frÃ¥n nÃ¥got användarattribut (istället för standard AD grupp) t.ex. grupp frÃ¥n avdelning eller telefonnummer'; +$lang['modPass'] = 'FÃ¥r LDAP-lösenordet ändras via DokuWiki?'; $lang['debug'] = 'Visa ytterligare felsökningsinformation vid fel'; +$lang['referrals_o_-1'] = 'använd standard'; diff --git a/lib/plugins/authldap/lang/uk/lang.php b/lib/plugins/authldap/lang/uk/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..3d5893ba09478fe121c8a0c482868258442ad812 --- /dev/null +++ b/lib/plugins/authldap/lang/uk/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['connectfail'] = 'LDAP не може вÑтановити з\'єднаннÑ: %s'; diff --git a/lib/plugins/authldap/lang/uk/settings.php b/lib/plugins/authldap/lang/uk/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..4adfdd74f81eb2c2b3dd7e34dbce3415ddac806d --- /dev/null +++ b/lib/plugins/authldap/lang/uk/settings.php @@ -0,0 +1,14 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author ОлекÑій <alexey.furashev@gmail.com> + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['version'] = 'ВикориÑтовувати верÑÑ–ÑŽ протоколу. Можливо Вам доведетьÑÑ Ð²ÐºÐ°Ð·Ð°Ñ‚Ð¸ <code>3</code>.'; +$lang['starttls'] = 'ВикориÑтовуєте TLS з\'єднаннÑ?'; +$lang['deref'] = 'Як Ñкинути пÑевдоніми?'; +$lang['bindpw'] = 'Пароль вказаного кориÑтувача'; +$lang['userscope'] = 'Обмежити облаÑть пошуку кориÑтувачів'; +$lang['referrals_o_-1'] = 'ВикориÑтовувати за замовчуваннÑм'; diff --git a/lib/plugins/authmysql/lang/da/lang.php b/lib/plugins/authmysql/lang/da/lang.php index 286bf7e8be0f0be75e642ab0d5652f4f4fe509b6..9806e16752729b232a861da95d450845bc248e47 100644 --- a/lib/plugins/authmysql/lang/da/lang.php +++ b/lib/plugins/authmysql/lang/da/lang.php @@ -3,8 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['connectfail'] = 'Kunne ikke forbinde til databasen.'; $lang['userexists'] = 'Beklager, en bruger med dette login findes allerede.'; $lang['usernotexists'] = 'Beklager, brugeren eksisterer ikke.'; +$lang['writefail'] = 'Kan ikke ændre brugerdata. Informér venligst wiki-administratoren'; diff --git a/lib/plugins/authmysql/lang/eo/lang.php b/lib/plugins/authmysql/lang/eo/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..818c392b2a7880112e27cd30aef111f8dfd1bd25 --- /dev/null +++ b/lib/plugins/authmysql/lang/eo/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> + */ +$lang['usernotexists'] = 'Pardonu, tiu uzanto ne ekzistas.'; diff --git a/lib/plugins/authmysql/lang/eo/settings.php b/lib/plugins/authmysql/lang/eo/settings.php index 92e97339698cdc26c041c54da270954e15f7982a..b85f81248f5a69370bd9285037ce4d52469b041e 100644 --- a/lib/plugins/authmysql/lang/eo/settings.php +++ b/lib/plugins/authmysql/lang/eo/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['server'] = 'Via MySQL-servilo'; $lang['user'] = 'MySQL uzantonomo'; diff --git a/lib/plugins/authmysql/lang/he/settings.php b/lib/plugins/authmysql/lang/he/settings.php index 3671b1bb9c86a996577ef3be6f3de642e0ec58df..22c30e52a3c73eb28976dded3aeebb881f146128 100644 --- a/lib/plugins/authmysql/lang/he/settings.php +++ b/lib/plugins/authmysql/lang/he/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Menashe Tomer <menashesite@gmail.com> */ $lang['getUserID'] = 'ש×ילתת SQL לקבלת מפתח ר×שי של המשתמש'; diff --git a/lib/plugins/authmysql/lang/lv/settings.php b/lib/plugins/authmysql/lang/lv/settings.php index 8550363c9a15fc78afed6ecee125ce77daba1062..008ef344a2c52ca336ac99d4a476b63ac158015f 100644 --- a/lib/plugins/authmysql/lang/lv/settings.php +++ b/lib/plugins/authmysql/lang/lv/settings.php @@ -2,9 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Oskars Pakers <oskars.pakers@gmail.com> * @author Aivars MiÅ¡ka <allefm@gmail.com> */ +$lang['server'] = 'JÅ«su MySQL serveris'; $lang['user'] = 'MySQL lietotÄja vÄrds'; $lang['password'] = 'LietotÄja parole'; $lang['delUser'] = 'SQL pieprasÄ«jums lietotÄja dzēšanai'; diff --git a/lib/plugins/authmysql/lang/ru/settings.php b/lib/plugins/authmysql/lang/ru/settings.php index 054580a50030facd9fc9992f01293c415dbd91a4..b56cf4b3eda65b0e03bd7f0b69d814471badfdfc 100644 --- a/lib/plugins/authmysql/lang/ru/settings.php +++ b/lib/plugins/authmysql/lang/ru/settings.php @@ -6,7 +6,6 @@ * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Type-kun <workwork-1@yandex.ru> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ $lang['server'] = 'Ваш MySQL-Ñервер'; $lang['user'] = 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ MySQL'; diff --git a/lib/plugins/authmysql/lang/sr/lang.php b/lib/plugins/authmysql/lang/sr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..7ec2fb6a58223112b6c91e0de85a450e4333091c --- /dev/null +++ b/lib/plugins/authmysql/lang/sr/lang.php @@ -0,0 +1,11 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['connectfail'] = 'ÐиÑам уÑпео да Ñе повежем на базу.'; +$lang['userexists'] = 'ÐажалоÑÑ‚, кориÑник Ñа таквом пријавом већ поÑтоји.'; +$lang['usernotexists'] = 'ÐажалоÑÑ‚, тај кориÑник не поÑтоји.'; +$lang['writefail'] = 'Ðе могу да променим кориÑничке податке. ОбавеÑтите админа викија'; diff --git a/lib/plugins/authmysql/lang/sr/settings.php b/lib/plugins/authmysql/lang/sr/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..eabdfbc24859aee00063b563ec0f6e54d1424acf --- /dev/null +++ b/lib/plugins/authmysql/lang/sr/settings.php @@ -0,0 +1,42 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['server'] = 'Ваш MySQL Ñервер'; +$lang['user'] = 'MySQL кориÑничко име'; +$lang['password'] = 'Лозинка кориÑника изнад'; +$lang['database'] = 'База коју треба кориÑтити'; +$lang['charset'] = 'Кодни раÑпоред коришћен у бази'; +$lang['debug'] = 'Прикажи додатне податке за поправљање грешака'; +$lang['forwardClearPass'] = 'ПренеÑи кориÑничке лозинке као чиÑÑ‚ текÑÑ‚ у SQL изјавама иÑпод умеÑто коришћења passcrypt опције'; +$lang['TablesToLock'] = 'СпиÑак табела одвојених размаком које треба закључати приликом упиÑивања'; +$lang['checkPass'] = 'SQL упит за проверу лозинки'; +$lang['getUserInfo'] = 'SQL упит за добављање података о кориÑнику'; +$lang['getGroups'] = 'SQL за добављање кориÑничких учлањења у групе'; +$lang['getUsers'] = 'SQL упит за излиÑтавање Ñвих кориÑника'; +$lang['FilterLogin'] = 'SQL уÑлов за филтрирање кориÑника по имену за пријаву'; +$lang['FilterName'] = 'SQL уÑлов за филтрирање кориÑника по пуном имену'; +$lang['FilterEmail'] = 'SQL уÑлов за филтрирање кориÑника по мејл адреÑи'; +$lang['FilterGroup'] = 'SQL уÑлов за филтрирање кориÑника по чланÑтву у групама'; +$lang['SortOrder'] = 'SQL уÑлов за Ñортирање кориÑника'; +$lang['addUser'] = 'SQL упит за додавање новог кориÑника'; +$lang['addGroup'] = 'SQL упит за додавање нове групе'; +$lang['addUserGroup'] = 'SQL упит за додавање кориÑника у поÑтојећу групу'; +$lang['delGroup'] = 'SQL упит за уклањање групе'; +$lang['getUserID'] = 'SQL упит за добављање примарног кључа кориÑника'; +$lang['delUser'] = 'SQL упит за бриÑање кориÑника'; +$lang['delUserRefs'] = 'SQL упит за бриÑање кориÑника из Ñвих група'; +$lang['updateUser'] = 'SQL упит за ажурирање кориÑничког профила'; +$lang['UpdateLogin'] = 'УÑлов за ажурирање кориÑничког имена за пријаву'; +$lang['UpdatePass'] = 'УÑлов за ажурирање кориÑничке лозинке'; +$lang['UpdateEmail'] = 'УÑлов за ажурирање кориÑничке мејл адреÑе'; +$lang['UpdateName'] = 'УÑлов за ажурирање кориÑничког пуног имена'; +$lang['UpdateTarget'] = 'Ограничи уÑлов да би Ñе утврдио кориÑник приликом ажурирања'; +$lang['delUserGroup'] = 'SQL упит за уклањање кориÑника из дате групе'; +$lang['getGroupID'] = 'SQL упит за добављање примарног кључа дате групе'; +$lang['debug_o_0'] = 'ништа'; +$lang['debug_o_1'] = 'Ñамо на грешкама'; +$lang['debug_o_2'] = 'Ñви SQL упити'; diff --git a/lib/plugins/authmysql/lang/sv/lang.php b/lib/plugins/authmysql/lang/sv/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..9c97bd7bb8d6bd4f547f545e0481584d0c7c545f --- /dev/null +++ b/lib/plugins/authmysql/lang/sv/lang.php @@ -0,0 +1,11 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tor Härnqvist <tor@harnqvist.se> + */ +$lang['connectfail'] = 'Kunde inte ansluta till databas.'; +$lang['userexists'] = 'Tyvärr, en användare med denna inloggning existerar redan.'; +$lang['usernotexists'] = 'Tyvärr, den användaren existerar inte.'; +$lang['writefail'] = 'Kunde inte ändra användardata. Var god inormera Wiki-administratören.'; diff --git a/lib/plugins/authmysql/lang/sv/settings.php b/lib/plugins/authmysql/lang/sv/settings.php index 255b711fc89623961cd388d37e7e931facf34a00..aa76b898f00e6476831c2f396536f8d65c808e81 100644 --- a/lib/plugins/authmysql/lang/sv/settings.php +++ b/lib/plugins/authmysql/lang/sv/settings.php @@ -3,12 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Smorkster Andersson smorkster@gmail.com */ $lang['server'] = 'Din MySQL server'; $lang['user'] = 'Användarnamn för MySQL'; $lang['password'] = 'Lösenord för användare ovan'; $lang['database'] = 'Databas att använda'; +$lang['charset'] = 'Teckenuppsättning som används i databas'; $lang['debug'] = 'Visa ytterligare felsökningsinformation'; $lang['forwardClearPass'] = 'Skicka användares lösenord i klartext till SQL sats nedan, istället för att använda passcrypt alternativet'; $lang['checkPass'] = 'SQL sats för kontroll av lösenord'; @@ -24,3 +26,4 @@ $lang['delUserRefs'] = 'SQL sats för att ta bort en användare frÃ¥n $lang['updateUser'] = 'SQL sats för att uppdatera en användarprofil'; $lang['delUserGroup'] = 'SQL sats för att ta bort en användare frÃ¥n en angiven grupp'; $lang['debug_o_0'] = 'ingen'; +$lang['debug_o_1'] = 'enbart för fel'; diff --git a/lib/plugins/authmysql/lang/uk/lang.php b/lib/plugins/authmysql/lang/uk/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..e6cbaf0266ec13e34782db2b35d9b134494b0e49 --- /dev/null +++ b/lib/plugins/authmysql/lang/uk/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['connectfail'] = 'Ðе вдалоÑÑ Ð·\'єднатиÑÑ Ð· базою даних.'; +$lang['userexists'] = 'Вибачте, кориÑтувач з таким логіном вже Ñ–Ñнує.'; +$lang['usernotexists'] = 'Вибачте, такого кориÑтувача не Ñ–Ñнує.'; diff --git a/lib/plugins/authpgsql/lang/eo/settings.php b/lib/plugins/authpgsql/lang/eo/settings.php index 2f59c49141f3850819434315098ecf6e4e361d8b..3af6b40798601a6e259ddee938f6f05d7621b25c 100644 --- a/lib/plugins/authpgsql/lang/eo/settings.php +++ b/lib/plugins/authpgsql/lang/eo/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['server'] = 'Via PostgreSQL-servilo'; $lang['port'] = 'Via PostgreSQL-servila pordego'; diff --git a/lib/plugins/authpgsql/lang/lv/settings.php b/lib/plugins/authpgsql/lang/lv/settings.php index 889b9566c20bc5ac4649263c84ea5588bbfaaf60..dd63544b57a7e88541a5df8454d436695407afa9 100644 --- a/lib/plugins/authpgsql/lang/lv/settings.php +++ b/lib/plugins/authpgsql/lang/lv/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['password'] = 'LietotÄja parole'; diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php index 69422c0cfd95b6e32a6919e4ac1e3c54a62dce3b..76301e67df0976de54e72cca1a315a604f57fa7e 100644 --- a/lib/plugins/authpgsql/lang/pl/settings.php +++ b/lib/plugins/authpgsql/lang/pl/settings.php @@ -3,7 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Mati <mackosa@wp.pl> */ $lang['server'] = 'Twój serwer PostgreSQL'; +$lang['user'] = 'Nazwa użytkownika PostgreSQL'; $lang['database'] = 'Baza danych do użycia'; +$lang['debug'] = 'WyÅ›wietl dodatkowe informacje debagowania'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php index 28efbdf1f5829f0240dd296d05a1eb32e8bc4b46..ceb5bd466b9f1c9dd13bcdcbf1f9c6611aeda097 100644 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ b/lib/plugins/authpgsql/lang/ru/settings.php @@ -5,7 +5,6 @@ * * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Vitaly Filatenko <kot@hacktest.net> * @author Type-kun <workwork-1@yandex.ru> * @author Alex P <alexander@lanos.co.uk> diff --git a/lib/plugins/authpgsql/lang/sr/settings.php b/lib/plugins/authpgsql/lang/sr/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..4b1cd8bfed5308a6d563bc98e7d66d655b28e03c --- /dev/null +++ b/lib/plugins/authpgsql/lang/sr/settings.php @@ -0,0 +1,18 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['server'] = 'Ваш PostgreSQL Ñервер'; +$lang['port'] = 'Порт вашег PostgreSQL Ñервера'; +$lang['user'] = 'PostgreSQL кориÑничко име'; +$lang['password'] = 'Лозинка за кориÑника изнад'; +$lang['database'] = 'База коју треба кориÑтити'; +$lang['debug'] = 'Прикажи додатне податке за поправљање грешака'; +$lang['forwardClearPass'] = 'ПренеÑи кориÑничке лозинке као чиÑÑ‚ текÑÑ‚ ка SQL упитима иÑпод умеÑто коришћења passcrypt опције'; +$lang['checkPass'] = 'SQL упит за проверу лозинки'; +$lang['getUserInfo'] = 'SQL упит за добављање кориÑничких података'; +$lang['getGroups'] = 'SQL упит за добављање групних учлањења кориÑника'; +$lang['getUsers'] = 'SQL упит за лиÑтање Ñвих кориÑника'; diff --git a/lib/plugins/authpgsql/lang/uk/settings.php b/lib/plugins/authpgsql/lang/uk/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..9a353414d2ce5c4b6a6827d7d0ef8dcd1c2a66c6 --- /dev/null +++ b/lib/plugins/authpgsql/lang/uk/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Nina Zolotova <nina-z@i.ua> + */ +$lang['database'] = 'ВикориÑтовувати базу даних'; diff --git a/lib/plugins/authplain/lang/da/lang.php b/lib/plugins/authplain/lang/da/lang.php index 20b08f5cb733e796540f54f488245a288a01dce1..ff683ed387603a27e032b5fbabfede44c88f6e58 100644 --- a/lib/plugins/authplain/lang/da/lang.php +++ b/lib/plugins/authplain/lang/da/lang.php @@ -3,5 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kenneth Schack Banner <kescba@gmail.com> */ $lang['userexists'] = 'Dette brugernavn er allerede i brug.'; +$lang['writefail'] = 'Ude af stand til at redigere bruger data. Kontakt venligst Wiki-Administratoren'; diff --git a/lib/plugins/authplain/lang/eo/lang.php b/lib/plugins/authplain/lang/eo/lang.php index ab7655e818a5c4875b9a94c8dd398f43bca13be3..3a3f45cd50a7120c5fd00c106646bf0ab34a52fc 100644 --- a/lib/plugins/authplain/lang/eo/lang.php +++ b/lib/plugins/authplain/lang/eo/lang.php @@ -1,6 +1,9 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> */ -$lang['userexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; +$lang['userexists'] = 'Pardonu, ĉi tiu uzanto-nomo jam ekzistas.'; +$lang['usernotexists'] = 'Pardonu, tiu uzanto ne ekzistas.'; diff --git a/lib/plugins/authplain/lang/es/lang.php b/lib/plugins/authplain/lang/es/lang.php index 68a854892463e049e6caf8effc81b09303407467..b81bbb8dd80a7554a33fc540c24af644ade3844c 100644 --- a/lib/plugins/authplain/lang/es/lang.php +++ b/lib/plugins/authplain/lang/es/lang.php @@ -9,4 +9,4 @@ $lang['userexists'] = 'Lo siento, ya existe un usuario con este nombre.'; $lang['usernotexists'] = 'Lo sentimos, no existe ese usuario.'; $lang['writefail'] = 'No es posible modificar los datos del usuario. Por favor, informa al Administrador del Wiki'; -$lang['protected'] = 'Los datos del usuario % están protegidos y no pueden ser modificados o eliminados.'; +$lang['protected'] = 'Los datos del usuario %s están protegidos y no pueden ser modificados o eliminados.'; diff --git a/lib/plugins/authplain/lang/he/lang.php b/lib/plugins/authplain/lang/he/lang.php index 160968edd26c10446374f8cb35a78617a3a440b2..a2e1324bb2b4980be87ce31559606b2622eb8021 100644 --- a/lib/plugins/authplain/lang/he/lang.php +++ b/lib/plugins/authplain/lang/he/lang.php @@ -2,6 +2,6 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['userexists'] = 'משתמש ×‘×©× ×–×” כבר × ×¨×©×, עמך הסליחה.'; diff --git a/lib/plugins/authplain/lang/lv/lang.php b/lib/plugins/authplain/lang/lv/lang.php index 3a9d4d3e5c5b249267dd23032a73e9b3d79bf5e1..afc89e462b309d12320d54278dd27b91f439c76b 100644 --- a/lib/plugins/authplain/lang/lv/lang.php +++ b/lib/plugins/authplain/lang/lv/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Atvaino, tÄds lietotÄjs jau ir.'; +$lang['userexists'] = 'Atvaino, tÄds lietotÄjs jau ir.'; diff --git a/lib/plugins/authplain/lang/pl/lang.php b/lib/plugins/authplain/lang/pl/lang.php index c4fb1a1ab55e303a6b44703c7a1eadec9ca97fa2..95b46fe86efddd54f20a853f1699ba1027d734bb 100644 --- a/lib/plugins/authplain/lang/pl/lang.php +++ b/lib/plugins/authplain/lang/pl/lang.php @@ -3,5 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> */ $lang['userexists'] = 'Użytkownik o tej nazwie już istnieje.'; +$lang['usernotexists'] = 'Przepraszamy, użytkownik nie istnieje'; +$lang['writefail'] = 'Nie można modyfikować danych użytkownika. ProszÄ™ skontaktować siÄ™ z administratorem '; +$lang['protected'] = 'Dane użytkownika %s sÄ… chronione, nie mogÄ… być modyfikowane oraz usuwane'; diff --git a/lib/plugins/authplain/lang/sv/lang.php b/lib/plugins/authplain/lang/sv/lang.php index 75a88c559836f51f661772c111c1b119b8202d28..83c24d7692361583a8db6dd8939b3626cb961964 100644 --- a/lib/plugins/authplain/lang/sv/lang.php +++ b/lib/plugins/authplain/lang/sv/lang.php @@ -3,5 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> */ $lang['userexists'] = 'Det finns redan en användare med det användarnamnet.'; +$lang['usernotexists'] = 'Tyvärr, den användaren existerar inte.'; +$lang['writefail'] = 'Kunde inte ändra användardata. Var god informera Wiki-administratören'; diff --git a/lib/plugins/authplain/lang/uk/lang.php b/lib/plugins/authplain/lang/uk/lang.php index 8a796870facee443e46266b50ea9ccc35402c110..86ab3d1583c0ebf48d39aecafa2330fa059f22ba 100644 --- a/lib/plugins/authplain/lang/uk/lang.php +++ b/lib/plugins/authplain/lang/uk/lang.php @@ -2,6 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Nina Zolotova <nina-z@i.ua> */ $lang['userexists'] = 'КориÑтувач з таким іменем вже Ñ–Ñнує.'; +$lang['usernotexists'] = 'Вибачте, такого кориÑтувача не Ñ–Ñнує.'; diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 262ff46d9b76201690f791275512481cd70b545d..76ecae24ccc86201f256be36c4153e5747d1ef3a 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -60,7 +60,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { $this->_input = $INPUT->arr('config'); - while (list($key) = each($this->_config->setting)) { + foreach ($this->_config->setting as $key => $value){ $input = isset($this->_input[$key]) ? $this->_input[$key] : null; if ($this->_config->setting[$key]->update($input)) { $this->_changed = true; diff --git a/lib/plugins/config/lang/da/lang.php b/lib/plugins/config/lang/da/lang.php index 6935049f5ada48e3857979dcc23bc5d6e9e4bb1d..7546264e93590412c24a618d2cd135bffa766840 100644 --- a/lib/plugins/config/lang/da/lang.php +++ b/lib/plugins/config/lang/da/lang.php @@ -3,14 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kenneth Schack Banner <kescba@gmail.com> + * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> * @author Jacob Palm <mail@jacobpalm.dk> */ diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index 2b07e02d84e8bbd5490e07ad05f9b8e9aa950c96..6c31e852086b3c8317d67df90a16ca7e171b2c99 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -119,6 +119,7 @@ $lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungs $lang['notify'] = 'Sende Änderungsbenachrichtigungen an diese E-Mail-Adresse.'; $lang['registernotify'] = 'Sende Information bei neu registrierten Benutzern an diese E-Mail-Adresse.'; $lang['mailfrom'] = 'Absenderadresse für automatisch erzeugte E-Mails'; +$lang['mailreturnpath'] = 'Empfänger-E-Mail-Adresse für Unzustellbarkeitsnachricht'; $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['sitemap'] = 'Erzeuge Google Sitemaps (Tage)'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index e21d1dab45e3613708efef71da04272663e7fa16..eecf550f784869bb22ab92bac82edb89e98ac20c 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Joel Strasser <strasser999@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Klier <chi@chimeric.de> * @author Leo Moll <leo@yeasoft.com> @@ -127,6 +128,7 @@ $lang['subscribe_time'] = 'Zeit nach der Zusammenfassungs- und Änderungs $lang['notify'] = 'Änderungsmitteilungen an diese E-Mail-Adresse versenden'; $lang['registernotify'] = 'Information über neu registrierte Benutzer an diese E-Mail-Adresse senden'; $lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mails'; +$lang['mailreturnpath'] = 'Empfänger-E-Mail-Adresse für Unzustellbarkeitsnachricht'; $lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen (Leer lassen um den Wiki-Titel zu verwenden)'; $lang['htmlmail'] = 'Versendet optisch angenehmere, aber größere E-Mails im HTML-Format (multipart). Deaktivieren, um Text-Mails zu versenden.'; $lang['sitemap'] = 'Google Sitemap erzeugen (Tage). Mit 0 deaktivieren.'; @@ -136,6 +138,9 @@ $lang['rss_content'] = 'Welche Inhalte sollen im XML-Feed dargestellt $lang['rss_update'] = 'XML-Feed Aktualisierungsintervall (Sekunden)'; $lang['rss_show_summary'] = 'Bearbeitungs-Zusammenfassung im XML-Feed anzeigen'; $lang['rss_media'] = 'Welche Änderungen sollen im XML-Feed angezeigt werden?'; +$lang['rss_media_o_both'] = 'beide'; +$lang['rss_media_o_pages'] = 'Seiten'; +$lang['rss_media_o_media'] = 'Medien'; $lang['updatecheck'] = 'Automatisch auf Updates und Sicherheitswarnungen prüfen? DokuWiki muss sich dafür mit update.dokuwiki.org verbinden.'; $lang['userewrite'] = 'Schöne Seitenadressen (URL rewriting)'; $lang['useslash'] = 'Schrägstrich (/) als Namensraumtrenner in URLs verwenden'; diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index e4c81ce110eeac5582a9c249b770f983eba60c84..269d24f4c96a601abc3906e8d4daf74d1af75695 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -5,6 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Christopher Smith <chris@jalakai.co.uk> * @author Matthias Schulte <dokuwiki@lupo49.de> + * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> */ // for admin plugins, the menu prompt to be displayed in the admin menu @@ -142,17 +143,22 @@ $lang['subscribe_time'] = 'Time after which subscription lists and digests are s $lang['notify'] = 'Always send change notifications to this email address'; $lang['registernotify'] = 'Always send info on newly registered users to this email address'; $lang['mailfrom'] = 'Sender email address to use for automatic mails'; +$lang['mailreturnpath'] = 'Recipient email address for non delivery notifications'; $lang['mailprefix'] = 'Email subject prefix to use for automatic mails. Leave blank to use the wiki title'; $lang['htmlmail'] = 'Send better looking, but larger in size HTML multipart emails. Disable for plain text only mails.'; /* Syndication Settings */ -$lang['sitemap'] = 'Generate Google sitemap this often (in days). 0 to disable'; -$lang['rss_type'] = 'XML feed type'; -$lang['rss_linkto'] = 'XML feed links to'; -$lang['rss_content'] = 'What to display in the XML feed items?'; -$lang['rss_update'] = 'XML feed update interval (sec)'; -$lang['rss_show_summary'] = 'XML feed show summary in title'; -$lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; +$lang['sitemap'] = 'Generate Google sitemap this often (in days). 0 to disable'; +$lang['rss_type'] = 'XML feed type'; +$lang['rss_linkto'] = 'XML feed links to'; +$lang['rss_content'] = 'What to display in the XML feed items?'; +$lang['rss_update'] = 'XML feed update interval (sec)'; +$lang['rss_show_summary'] = 'XML feed show summary in title'; +$lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; +$lang['rss_media_o_both'] = 'both'; +$lang['rss_media_o_pages'] = 'pages'; +$lang['rss_media_o_media'] = 'media'; + /* Advanced Options */ $lang['updatecheck'] = 'Check for updates and security warnings? DokuWiki needs to contact update.dokuwiki.org for this feature.'; diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index 644ca79abee7320301ff66058a0d97b8f7d77b4a..7201b326703ebb1b972a74aa2358b1c1a0f01a79 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -1,15 +1,15 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Esperantolanguage file * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> * @author Felipe Castro <fefcas@uol.com.br> - * @author Felipe Castro <fefcas@gmail.com> - * @author Felipe Castro <fefcas (cxe) gmail (punkto) com> * @author Felipo Kastro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Agordaj Difinoj'; $lang['error'] = 'La difinoj ne estas Äisdatigitaj pro malvalida valoro: bonvolu revizii viajn ÅanÄojn kaj resubmeti ilin. @@ -84,6 +84,7 @@ $lang['disableactions'] = 'Malebligi DokuWiki-ajn agojn'; $lang['disableactions_check'] = 'Kontroli'; $lang['disableactions_subscription'] = 'AliÄi/MalaliÄi'; $lang['disableactions_wikicode'] = 'Rigardi vikitekston/Eksporti fontotekston'; +$lang['disableactions_profile_delete'] = 'Forigi la propran konton'; $lang['disableactions_other'] = 'Aliaj agoj (disigita per komoj)'; $lang['auth_security_timeout'] = 'Sekureca tempolimo por aÅtentigo (sekundoj)'; $lang['securecookie'] = 'Ĉu kuketoj difinitaj per HTTPS sendiÄu de la foliumilo nur per HTTPS? Malebligu tiun ĉi opcion kiam nur la ensaluto al via vikio estas sekurigita per SSL, sed foliumado de la vikio estas farita malsekure.'; @@ -124,6 +125,8 @@ $lang['rss_content'] = 'Kion montri en la XML-aj novaĵ-flueroj?'; $lang['rss_update'] = 'Intertempo por Äisdatigi XML-an novaĵ-fluon (sek.)'; $lang['rss_show_summary'] = 'XML-a novaĵ-fluo montras resumon en la titolo'; $lang['rss_media'] = 'Kiaj Åangoj estu montrataj en la XML-fluo?'; +$lang['rss_media_o_both'] = 'ambaÅ'; +$lang['rss_media_o_pages'] = 'paÄoj'; $lang['updatecheck'] = 'Ĉu kontroli aktualigojn kaj sekurecajn avizojn? DokuWiki bezonas kontakti update.dokuwiki.org por tiu ĉi trajto.'; $lang['userewrite'] = 'Uzi netajn URL-ojn'; $lang['useslash'] = 'Uzi frakcistrekon kiel disigsignaĵon por nomspacoj en URL-oj'; diff --git a/lib/plugins/config/lang/es/lang.php b/lib/plugins/config/lang/es/lang.php index 0da118e929a191cfe4db86aed80e62c1a270b1fe..f50ca1f29145318a6deca67cd374c54197c9f09f 100644 --- a/lib/plugins/config/lang/es/lang.php +++ b/lib/plugins/config/lang/es/lang.php @@ -158,6 +158,10 @@ $lang['renderer_xhtml'] = 'Visualizador a usar para salida (xhtml) princi $lang['renderer__core'] = '%s (núcleo dokuwiki)'; $lang['renderer__plugin'] = '%s (plugin)'; $lang['dnslookups'] = 'DokuWiki buscara los hostnames para usuarios editando las páginas con IP remota. Si usted tiene un servidor DNS bastante lento o que no funcione, favor de desactivar esta opción.'; +$lang['jquerycdn'] = '¿DeberÃan cargarse los ficheros de script jQuery y jQuery UI desde un CDN? Esto añade peticiones HTTP adicionales, pero los ficheros se pueden cargar más rápido y los usuarios pueden tenerlas ya almacenadas en caché.'; +$lang['jquerycdn_o_0'] = 'No CDN, sólo entrega local'; +$lang['jquerycdn_o_jquery'] = 'CDN en code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN en cdnjs.com'; $lang['proxy____host'] = 'Nombre del servidor Proxy'; $lang['proxy____port'] = 'Puerto del servidor Proxy'; $lang['proxy____user'] = 'Nombre de usuario para el servidor Proxy'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 69d0b2d4db36037575a506ad2f8dadcb4e59e30c..a2049dd3b8f9da68dc073128ff9ee42037564d25 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Michael Bohn <mjbohn@gmail.com> + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author Guy Brand <gb@unistra.fr> * @author Delassaux Julien <julien@delassaux.fr> * @author Maurice A. LeBlanc <leblancma@cooptel.qc.ca> @@ -15,7 +17,6 @@ * @author Florian Gaub <floriang@floriang.net> * @author Samuel Dorsaz <samuel.dorsaz@novelion.net> * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author <skimpax@gmail.com> * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> @@ -23,7 +24,6 @@ * @author Carbain Frédéric <fcarbain@yahoo.fr> * @author Nicolas Friedli <nicolas@theologique.ch> * @author Floriang <antispam@floriang.eu> - * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Simon DELAGE <simon.geekitude@gmail.com> * @author Eric <ericstevenart@netc.fr> * @author Olivier Humbert <trebmuh@tuxfamily.org> @@ -39,7 +39,7 @@ $lang['security'] = 'Avertissement de sécurité : modifier cette o $lang['_configuration_manager'] = 'Gestionnaire de configuration'; $lang['_header_dokuwiki'] = 'Paramètres de DokuWiki'; $lang['_header_plugin'] = 'Paramètres des extensions'; -$lang['_header_template'] = 'Paramètres du modèle'; +$lang['_header_template'] = 'Paramètres du thème'; $lang['_header_undefined'] = 'Paramètres indéfinis'; $lang['_basic'] = 'Paramètres de base'; $lang['_display'] = 'Paramètres d\'affichage'; @@ -58,9 +58,9 @@ $lang['_msg_setting_no_default'] = 'Pas de valeur par défaut.'; $lang['title'] = 'Titre du wiki (nom du wiki)'; $lang['start'] = 'Nom de la page d\'accueil à utiliser pour toutes les catégories'; $lang['lang'] = 'Langue de l\'interface'; -$lang['template'] = 'Modèle (rendu visuel du wiki)'; -$lang['tagline'] = 'Descriptif du site (si le modèle supporte cette fonctionnalité)'; -$lang['sidebar'] = 'Nom du panneau latéral (si le modèle supporte cette fonctionnalité). Laisser le champ vide désactive le panneau latéral.'; +$lang['template'] = 'Thème (rendu visuel du wiki)'; +$lang['tagline'] = 'Descriptif du site (si le thème utilise cette fonctionnalité)'; +$lang['sidebar'] = 'Nom du panneau latéral (si le thème utilise cette fonctionnalité). Laisser le champ vide désactive le panneau latéral.'; $lang['license'] = 'Sous quelle licence doit-être placé le contenu ?'; $lang['savedir'] = 'Répertoire d\'enregistrement des données'; $lang['basedir'] = 'Répertoire de base du serveur (par exemple : <code>/dokuwiki/</code>). Laisser vide pour une détection automatique.'; @@ -133,6 +133,7 @@ $lang['subscribe_time'] = 'Délai après lequel les listes d\'abonnement $lang['notify'] = 'Notifier systématiquement les modifications à cette adresse de courriel'; $lang['registernotify'] = 'Notifier systématiquement les nouveaux utilisateurs enregistrés à cette adresse de courriel'; $lang['mailfrom'] = 'Adresse de courriel de l\'expéditeur des notifications par courriel du wiki'; +$lang['mailreturnpath'] = 'Adresse de courriel du destinataire pour les notifications de non-remise'; $lang['mailprefix'] = 'Préfixe à utiliser dans les objets des courriels automatiques. Laisser vide pour utiliser le titre du wiki'; $lang['htmlmail'] = 'Envoyer des courriel HTML multipart (visuellement plus agréable, mais plus lourd). Désactiver pour utiliser uniquement des courriel plain text'; $lang['sitemap'] = 'Fréquence de génération du sitemap Google (jours). 0 pour désactiver'; @@ -142,6 +143,9 @@ $lang['rss_content'] = 'Quel contenu afficher dans le flux XML?'; $lang['rss_update'] = 'Fréquence de mise à jour du flux XML (secondes)'; $lang['rss_show_summary'] = 'Le flux XML affiche le résumé dans le titre'; $lang['rss_media'] = 'Quels types de changements doivent être listés dans le flux XML?'; +$lang['rss_media_o_both'] = 'les deux'; +$lang['rss_media_o_pages'] = 'pages'; +$lang['rss_media_o_media'] = 'media'; $lang['updatecheck'] = 'Vérifier les mises à jour et alertes de sécurité? DokuWiki doit pouvoir contacter update.dokuwiki.org'; $lang['userewrite'] = 'Utiliser des URL esthétiques'; $lang['useslash'] = 'Utiliser « / » comme séparateur de catégories dans les URL'; @@ -151,12 +155,12 @@ $lang['fnencode'] = 'Méthode pour l\'encodage des fichiers non-ASC $lang['autoplural'] = 'Rechercher les formes plurielles dans les liens'; $lang['compression'] = 'Méthode de compression pour les fichiers attic'; $lang['gzip_output'] = 'Utiliser gzip pour le Content-Encoding du XHTML'; -$lang['compress'] = 'Compresser les flux CSS et JavaScript'; +$lang['compress'] = 'Compresser les fichiers CSS et JavaScript'; $lang['cssdatauri'] = 'Taille maximale en octets pour inclure dans les feuilles de styles CSS les images qui y sont référencées. Cette technique réduit le nombre de requêtes HTTP. Cette fonctionnalité ne fonctionne qu\'à partir de la version 8 d\'Internet Explorer! Nous recommandons une valeur entre <code>400</code> et <code>600</code>. <code>0</code> pour désactiver.'; $lang['send404'] = 'Renvoyer « HTTP 404/Page Not Found » pour les pages inexistantes'; $lang['broken_iua'] = 'La fonction ignore_user_abort est-elle opérationnelle sur votre système ? Ceci peut empêcher le fonctionnement de l\'index de recherche. IIS+PHP/ CGI dysfonctionne. Voir le <a href="http://bugs.splitbrain.org/?do=details&task_id=852">bug 852</a> pour plus d\'informations.'; -$lang['xsendfile'] = 'Utiliser l\'en-tête X-Sendfile pour permettre au serveur web de délivrer les fichiers statiques ? Votre serveur web doit supporter cette fonctionnalité.'; +$lang['xsendfile'] = 'Utiliser l\'en-tête X-Sendfile pour permettre au serveur web de délivrer les fichiers statiques ? Votre serveur web doit prendre en charge cette technologie.'; $lang['renderer_xhtml'] = 'Moteur de rendu du format de sortie principal (XHTML)'; $lang['renderer__core'] = '%s (cÅ“ur de DokuWiki)'; $lang['renderer__plugin'] = '%s (extension)'; diff --git a/lib/plugins/config/lang/he/lang.php b/lib/plugins/config/lang/he/lang.php index dbc6a322dc5e3df05fce9949266b5b653d394e4c..8c986ae65791af5a08314f5c8c6dca038346cd4f 100644 --- a/lib/plugins/config/lang/he/lang.php +++ b/lib/plugins/config/lang/he/lang.php @@ -2,9 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Guy Yakobovitch <guy.yakobovitch@gmail.com> * @author DoK <kamberd@yahoo.com> - * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> * @author Yaron Shahrabani <sh.yaron@gmail.com> diff --git a/lib/plugins/config/lang/hr/lang.php b/lib/plugins/config/lang/hr/lang.php index cdd38f95f497b522729582f394abaadab655b52d..8f5e7641a8d2f7dfbf155ebfc8655f53a6b238e6 100644 --- a/lib/plugins/config/lang/hr/lang.php +++ b/lib/plugins/config/lang/hr/lang.php @@ -112,6 +112,7 @@ $lang['subscribe_time'] = 'Vrijeme (sek.) nakon kojeg se Å¡alju pretplatn $lang['notify'] = 'Uvijek Å¡alji obavijesti o promjenama na ovu adresu epoÅ¡te'; $lang['registernotify'] = 'Uvijek Å¡alji obavijesti o novo-kreiranim korisnicima na ovu adresu epoÅ¡te'; $lang['mailfrom'] = 'Adresa poÅ¡iljatelja epoÅ¡te koja se koristi pri slanju automatskih poruka'; +$lang['mailreturnpath'] = 'Adresa e-poÅ¡te primatelja za obavijesti o ne-isporuci'; $lang['mailprefix'] = 'Prefiks predmeta poruke kod automatskih poruka. Ostaviti prazno za koriÅ¡tenje naslova wikija'; $lang['htmlmail'] = 'Å alji ljepÅ¡e, ali i veće poruke u HTML obliku. Onemogući za slanje poruka kao obiÄan tekst.'; $lang['sitemap'] = 'Generiraj Google mapu stranica svakih (dana). 0 za onemogućivanje'; @@ -121,6 +122,9 @@ $lang['rss_content'] = 'Å to da se prikazuje u stavkama XML feed-a?'; $lang['rss_update'] = 'Interval obnavljanja XML feed-a (sek.)'; $lang['rss_show_summary'] = 'Prikaz sažetka u naslovu XML feed-a'; $lang['rss_media'] = 'Koje vrste promjena trebaju biti prikazane u XML feed-u?'; +$lang['rss_media_o_both'] = 'oboje'; +$lang['rss_media_o_pages'] = 'stranice'; +$lang['rss_media_o_media'] = 'medij'; $lang['updatecheck'] = 'Provjera za nadogradnje i sigurnosna upozorenja? DokuWiki treba imati pristup do dokuwiki.org za ovo.'; $lang['userewrite'] = 'Koristi jednostavne URL-ove'; $lang['useslash'] = 'Koristi kosu crtu kao separator imenskih prostora u URL-ovima'; diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 3bb4afc5142064ce63378fa7941b6b227f0cb6e3..e07764b6a7905ffb8087d4c7b5b8be749cc970a0 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -3,19 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Torpedo <dgtorpedo@gmail.com> * @author Christopher Smith <chris@jalakai.co.uk> * @author Silvia Sargentoni <polinnia@tin.it> * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com - * @author Torpedo <dgtorpedo@gmail.com> * @author Riccardo <riccardofila@gmail.com> * @author Paolo <paolopoz12@gmail.com> */ @@ -126,6 +121,7 @@ $lang['subscribe_time'] = 'Tempo dopo il quale le liste di sottoscrizione $lang['notify'] = 'Invia notifiche sulle modifiche a questo indirizzo'; $lang['registernotify'] = 'Invia informazioni sui nuovi utenti registrati a questo indirizzo email'; $lang['mailfrom'] = 'Mittente per le mail automatiche'; +$lang['mailreturnpath'] = 'Indirizzo email destinatario per notifica di mancati recapiti'; $lang['mailprefix'] = 'Prefisso da inserire nell\'oggetto delle mail automatiche'; $lang['htmlmail'] = 'Invia email HTML multipart più gradevoli ma più ingombranti in dimensione. Disabilita per mail in puro testo.'; $lang['sitemap'] = 'Genera una sitemap Google (giorni)'; @@ -135,6 +131,9 @@ $lang['rss_content'] = 'Cosa mostrare negli elementi dei feed XML?'; $lang['rss_update'] = 'Intervallo di aggiornamento dei feed XML (sec)'; $lang['rss_show_summary'] = 'I feed XML riportano un sommario nel titolo'; $lang['rss_media'] = 'Quale tipo di cambiamento dovrebbe essere elencato nel feed XML?'; +$lang['rss_media_o_both'] = 'entrambi'; +$lang['rss_media_o_pages'] = 'pagine'; +$lang['rss_media_o_media'] = 'media'; $lang['updatecheck'] = 'Controllare aggiornamenti e avvisi di sicurezza? DokuWiki deve contattare update.dokuwiki.org per questa funzione.'; $lang['userewrite'] = 'Usa il rewrite delle URL'; $lang['useslash'] = 'Usa la barra rovescia (slash) come separatore nelle URL'; diff --git a/lib/plugins/config/lang/lv/lang.php b/lib/plugins/config/lang/lv/lang.php index 533b008ac479021777d7ccc906b0d2a7fc392663..8caba8ed3969f3a1ad3e4bca55a842cecf8325d8 100644 --- a/lib/plugins/config/lang/lv/lang.php +++ b/lib/plugins/config/lang/lv/lang.php @@ -1,7 +1,11 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Latvian, Lettish language file * + * @author Oskars Pakers <oskars.pakers@gmail.com> * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['menu'] = 'KonfigurÄcijas iestatÄ«jumi.'; diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php index 5695ce1375484b07dd07ae519cd41bd1b8f3c46f..e00af3a546678662d8a2e0529471fb3ce97ea3b8 100644 --- a/lib/plugins/config/lang/nl/lang.php +++ b/lib/plugins/config/lang/nl/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author mark prins <mprins@users.sf.net> * @author Pieter van der Meulen <pieter@vdmeulen.net> * @author Wouter Schoot <wouter@schoot.org> * @author John de Graaff <john@de-graaff.net> @@ -10,14 +11,11 @@ * @author Dion Nicolaas <dion@nicolaas.net> * @author Danny Rotsaert <danny.rotsaert@edpnet.be> * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> * @author Hugo Smet <hugo.smet@scarlet.be> - * @author mark prins <mprins@users.sf.net> */ $lang['menu'] = 'Configuratie-instellingen'; $lang['error'] = 'De instellingen zijn niet gewijzigd wegens een incorrecte waarde, kijk je wijzigingen na en sla dan opnieuw op.<br />Je kunt de incorrecte waarde(s) herkennen aan de rode rand.'; @@ -124,6 +122,7 @@ $lang['subscribe_time'] = 'Inschrijvingsmeldingen en samenvattingen worde $lang['notify'] = 'Stuur altijd e-mailnotificaties naar dit adres'; $lang['registernotify'] = 'Stuur altijd informatie over nieuw geregistreerde gebruikers naar dit e-mailadres'; $lang['mailfrom'] = 'E-mailadres van afzender voor automatische e-mail'; +$lang['mailreturnpath'] = 'Email adres voor de ontvanger van meldingen van niet-afleverbare berichten'; $lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email. Leeglaten gebruik de wikititel.'; $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.'; @@ -133,6 +132,9 @@ $lang['rss_content'] = 'Wat moet er in de XML feed items weergegeven w $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['rss_media_o_both'] = 'beide'; +$lang['rss_media_o_pages'] = 'pagina\'s'; +$lang['rss_media_o_media'] = 'media'; $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'; diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php index 55db6eba4328718bd1d245139aafef8c4f9d8e1e..2719bdda3b9f9c81d15e59f42865a326b5c06b1d 100644 --- a/lib/plugins/config/lang/pl/lang.php +++ b/lib/plugins/config/lang/pl/lang.php @@ -3,12 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> * @author Piotr JANKOWSKI <jankowski.piotr@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> @@ -88,6 +89,7 @@ $lang['disableactions'] = 'Wyłącz akcje DokuWiki'; $lang['disableactions_check'] = 'Sprawdzanie'; $lang['disableactions_subscription'] = 'Subskrypcje'; $lang['disableactions_wikicode'] = 'Pokazywanie źródeÅ‚'; +$lang['disableactions_profile_delete'] = 'UsuÅ„ wÅ‚asne konto '; $lang['disableactions_other'] = 'Inne akcje (oddzielone przecinkiem)'; $lang['auth_security_timeout'] = 'Czas wygaÅ›niÄ™cia uwierzytelnienia (w sekundach)'; $lang['securecookie'] = 'Czy ciasteczka wysÅ‚ane do przeglÄ…darki przez HTTPS powinny być przez niÄ… odsyÅ‚ane też tylko przez HTTPS? Odznacz tÄ™ opcjÄ™ tylko wtedy, gdy logowanie użytkowników jest zabezpieczone SSL, ale przeglÄ…danie stron odbywa siÄ™ bez zabezpieczenia.'; @@ -128,6 +130,7 @@ $lang['rss_content'] = 'Rodzaj informacji wyÅ›wietlanych w RSS '; $lang['rss_update'] = 'Okres aktualizacji RSS (w sekundach)'; $lang['rss_show_summary'] = 'Podsumowanie w tytule'; $lang['rss_media'] = 'Rodzaj zmian wyÅ›wietlanych w RSS'; +$lang['rss_media_o_pages'] = 'strony'; $lang['updatecheck'] = 'Sprawdzanie aktualizacji i bezpieczeÅ„stwa. DokuWiki bÄ™dzie kontaktować siÄ™ z serwerem update.dokuwiki.org.'; $lang['userewrite'] = 'Proste adresy URL'; $lang['useslash'] = 'Używanie ukoÅ›nika jako separatora w adresie URL'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index a3fd3bfda6964277b9906b628776f45d24448728..3d14552d82917c4c1bdefd7124d93025cd28f1ad 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -3,12 +3,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Zhassulan <zyesmukanov@gmail.com> * @author Denis Simakov <akinoame1@gmail.com> * @author Andrew Pleshakov <beotiger@mail.ru> * @author Змей ÐтерийÑкий evil_snake@eternion.ru * @author Hikaru Nakajima <jisatsu@mail.ru> * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com * @author Alexander Sorkin <kibizoid@gmail.com> * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> @@ -17,9 +17,7 @@ * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author RainbowSpike <1@2.ru> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author alexey <xeenych@gmail.com> */ $lang['menu'] = 'ÐаÑтройки вики'; @@ -127,6 +125,7 @@ $lang['subscribe_time'] = 'Интервал раÑÑылки Ð¿Ð¾Ð´Ð¿Ð¸Ñ $lang['notify'] = 'Ð’Ñегда отправлÑть ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ð±Â Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸ÑÑ… на Ñтот Ñлектронный адреÑ'; $lang['registernotify'] = 'Ð’Ñегода отправлÑть информацию о новых зарегиÑтрированных пользователÑÑ… на Ñтот Ñлектронный адреÑ'; $lang['mailfrom'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð²Ð¸ÐºÐ¸ (От:)'; +$lang['mailreturnpath'] = 'ÐÐ´Ñ€ÐµÑ Ñлектронной почты Ð´Ð»Ñ Ð´Ð¾Ñтавки отчета о недоÑтавленных Ñообщений'; $lang['mailprefix'] = 'ПрефикÑ, иÑпользуемый Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого пиÑьма, Ñтанет темой ÑообщениÑ. ОÑтавьте поле пуÑтым Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð²Ð¸ÐºÐ¸.'; $lang['htmlmail'] = 'ОтправлÑть краÑивые, но крупные HTML-многочаÑтные пиÑьма. Ð”Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ проÑтых текÑтовых пиÑем - отключить'; $lang['sitemap'] = 'ЧиÑло дней, через которое нужно Ñоздавать (обновлÑть) карту Ñайта Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñковиков (Гугл, Ð¯Ð½Ð´ÐµÐºÑ Ð¸ др.). Укажите 0 (ноль) Ð´Ð»Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ.'; @@ -136,6 +135,9 @@ $lang['rss_content'] = 'Что показывать в XML-ленте? $lang['rss_update'] = 'Интервал Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ XML-ленты (Ñек.)'; $lang['rss_show_summary'] = 'Показывать краткую выдержку в заголовках XML-ленты'; $lang['rss_media'] = 'Какие Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть отображены в XML-ленте?'; +$lang['rss_media_o_both'] = 'оба'; +$lang['rss_media_o_pages'] = 'Ñтраницы'; +$lang['rss_media_o_media'] = 'медиа'; $lang['updatecheck'] = 'ПроверÑть наличие обновлений и предупреждений о безопаÑноÑти? Ð”Ð»Ñ Ñтого «Докувики» потребуетÑÑ ÑвÑзыватьÑÑ Ñ update.dokuwiki.org.'; $lang['userewrite'] = 'Удобочитаемые адреÑа (URL)'; $lang['useslash'] = 'ИÑпользовать ÑлÑш в URL'; @@ -154,6 +156,7 @@ $lang['renderer_xhtml'] = 'Обработчик оÑновного (xhtml $lang['renderer__core'] = '%s (Ñдро «Докувики»)'; $lang['renderer__plugin'] = '%s (плагин)'; $lang['dnslookups'] = '«Докувики» ищет DNS-имена пользователей, редактирующих Ñтраницы. ЕÑли у Ð²Ð°Ñ Ð½ÐµÑ‚ DNS-Ñервера или он работает медленно, рекомендуем отключить Ñту опцию.'; +$lang['jquerycdn'] = 'ТребуетÑÑ Ð»Ð¸ загрузка jQuery-Ñкриптов (Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ jQuery UI-Ñкрипты) из CDN Ñети? Ð”Ð°Ð½Ð½Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ ÑƒÐ²ÐµÐ»Ð¸Ñ‡Ð¸Ð²Ð°ÐµÑ‚ количеÑтво HTTP запроÑов, но загрузка файлов будет проходить быÑтрее и пользователи Ñмогут кÑшировать запроÑÑ‹.'; $lang['jquerycdn_o_0'] = 'Ðе иÑпользовать CDN. ИÑпользовать только локальную доÑтавку'; $lang['jquerycdn_o_jquery'] = 'ИÑпользовать CDN Ñ code.jquery.com'; $lang['jquerycdn_o_cdnjs'] = 'ИÑпользовать CDN Ñ cdnjs.com'; diff --git a/lib/plugins/config/lang/sr/lang.php b/lib/plugins/config/lang/sr/lang.php index d41cdabb376f969ffe70741b67c6426add8b140f..e8f3b8335975ce8992e7a078cb8a2d0f098f1f36 100644 --- a/lib/plugins/config/lang/sr/lang.php +++ b/lib/plugins/config/lang/sr/lang.php @@ -6,6 +6,7 @@ * @author Иван Петровић petrovicivan@ubuntusrbija.org * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> * @author Miroslav Å olti <solti.miroslav@gmail.com> + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> */ $lang['menu'] = 'Подешавања'; $lang['error'] = 'Подешавања ниÑу прихваћена јер поÑтоји вредноÑÑ‚ Ñа грешком, проверите измене које Ñте извршили и поновите Ñлање.<br />ВредноÑÑ‚(и) Ñа грешком Ñу приказане Ñа црвеним оквиром.'; @@ -64,7 +65,7 @@ $lang['hidepages'] = 'Сакриј подударне Ñтраниц $lang['useacl'] = 'КориÑти лиÑту права приÑтупа'; $lang['autopasswd'] = 'ÐутогенериÑане лозинки'; $lang['authtype'] = 'ПозадинÑки ÑиÑтем аутентификације'; -$lang['passcrypt'] = 'Метода енкрипције лозинки'; +$lang['passcrypt'] = 'Метода шифровања лозинки'; $lang['defaultgroup'] = 'Подразумевана група'; $lang['superuser'] = 'СуперкориÑник - група, кориÑник или зарезом одвојена лиÑта кориÑника кориÑник1,@група1,кориÑник2 Ñа отвореним проÑтупом Ñвим Ñтраницама и функцијама без обзира на поÑтавке Контроле приÑтупа'; $lang['manager'] = 'Управник - група, кориÑник или зарезом одвојена лиÑта кориÑника кориÑник1,@група1,кориÑник2 Ñа отвореним проÑтупом неким функцијама за управљање'; @@ -124,6 +125,9 @@ $lang['xsendfile'] = 'КориÑти заглавље X-Sendfile д $lang['renderer_xhtml'] = 'ИÑцртавање кориÑти главни (xhtml) вики иÑпиÑ'; $lang['renderer__core'] = '%s (dokuwiki језгро)'; $lang['renderer__plugin'] = '%s (додатак)'; +$lang['jquerycdn_o_0'] = 'Без CDN-a, Ñамо локална доÑтава'; +$lang['jquerycdn_o_jquery'] = 'CDN на адреÑи code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN на cdnjs.com'; $lang['proxy____host'] = 'Ðазив поÑредника (прокÑија)'; $lang['proxy____port'] = 'Порт поÑредника (прокÑија)'; $lang['proxy____user'] = 'КориÑничко име на поÑреднику (прокÑију)'; @@ -171,6 +175,7 @@ $lang['xsendfile_o_2'] = 'Стандардно заглавље X-Sendfi $lang['xsendfile_o_3'] = 'ВлаÑничко заглавље Nginx X-Accel-Redirect'; $lang['showuseras_o_loginname'] = 'КориÑничко име'; $lang['showuseras_o_username'] = 'Име и презиме кориÑника'; +$lang['showuseras_o_username_link'] = 'Пуно име кориÑника као кориÑничка веза међувикија'; $lang['showuseras_o_email'] = 'Е-адреÑа (замућено по подешавањима mailguard-а)'; $lang['showuseras_o_email_link'] = 'КориÑничка Е-адреÑа као mailto: веза'; $lang['useheading_o_0'] = 'Ðикада'; diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php index 954851afed5d9ca799650a2e458a5b3127085f1e..268cc364e49f5479df11fc4852412e68bc3511e8 100644 --- a/lib/plugins/config/lang/sv/lang.php +++ b/lib/plugins/config/lang/sv/lang.php @@ -3,21 +3,16 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> * @author HÃ¥kan Sandell <hakan.sandell[at]mydata.se> * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author HÃ¥kan Sandell <hakan.sandell@home.se> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com - * @author Tor Härnqvist <tor@harnqvist.se> */ $lang['menu'] = 'Hantera inställningar'; $lang['error'] = 'Inställningarna uppdaterades inte pÃ¥ grund av ett felaktigt värde. Titta igenom dina ändringar och försök sedan spara igen. @@ -91,6 +86,7 @@ $lang['disableactions'] = 'Stäng av funktioner i DokuWiki'; $lang['disableactions_check'] = 'Kontroll'; $lang['disableactions_subscription'] = 'Prenumerera/Säg upp prenumeration'; $lang['disableactions_wikicode'] = 'Visa källkod/Exportera rÃ¥text'; +$lang['disableactions_profile_delete'] = 'Ta bort eget konto'; $lang['disableactions_other'] = 'Andra funktioner (kommaseparerade)'; $lang['auth_security_timeout'] = 'Autentisieringssäkerhets timeout (sekunder)'; $lang['securecookie'] = 'Skall cookies som sätts via HTTPS endast skickas via HTTPS frÃ¥n webbläsaren? Avaktivera detta alternativ endast om inloggningen till din wiki är säkrad med SSL men läsning av wikin är osäkrad.'; @@ -142,6 +138,8 @@ $lang['xsendfile'] = 'Använd X-Sendfile huvudet för att lÃ¥ta webs $lang['renderer_xhtml'] = 'Generera för användning i huvudwikipresentation (xhtml)'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; +$lang['jquerycdn_o_jquery'] = 'CDN pÃ¥ code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN pÃ¥ cdnjs.com'; $lang['proxy____host'] = 'Proxyserver'; $lang['proxy____port'] = 'Proxyport'; $lang['proxy____user'] = 'Användarnamn för proxy'; @@ -189,6 +187,7 @@ $lang['xsendfile_o_2'] = 'Standard X-Sendfile-huvud'; $lang['xsendfile_o_3'] = 'Proprietär Nginx X-Accel-Redirect header'; $lang['showuseras_o_loginname'] = 'Användarnamn'; $lang['showuseras_o_username'] = 'Namn'; +$lang['showuseras_o_username_link'] = 'Användarens fullständiga namn som interwiki-användarlänk'; $lang['showuseras_o_email'] = 'Användarens e-postadress (obfuskerad enligt inställningarna i mailguard)'; $lang['showuseras_o_email_link'] = 'Användarens e-postadress som mailto: länk'; $lang['useheading_o_0'] = 'Aldrig'; diff --git a/lib/plugins/config/lang/uk/lang.php b/lib/plugins/config/lang/uk/lang.php index fe700195540d6123a53c91dad7d3f30365615b6c..24c6211543f512a2dbe714ced6d76da1742312d5 100644 --- a/lib/plugins/config/lang/uk/lang.php +++ b/lib/plugins/config/lang/uk/lang.php @@ -2,15 +2,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author ОлекÑій <alexey.furashev@gmail.com> + * @author Vitaly <vitaly.balashov@smuzzy.com.ua> * @author Oleksiy Voronin <ovoronin@gmail.com> - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com - * @author Kate Arzamastseva pshns@ukr.net * @author Maksim <nikropol@yandex.ru> + * @author Nina Zolotova <nina-z@i.ua> + * @author Roman <vsmemorial@gmail.com> */ $lang['menu'] = 'ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð’Ñ–ÐºÑ–'; $lang['error'] = 'Параметри не збережено через помилкові значеннÑ. Будь лаÑка, переглÑньте ваші зміни та Ñпробуйте ще раз diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index 4a4eba44b05807df26555ec1b8f63e0112c0f609..6da00eeb175dd761d67033aa4a3c612678867550 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -3,17 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author lempel <riverlempel@hotmail.com> * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> * @author Garfield <garfield_550@outlook.com> * @author JellyChen <451453325@qq.com> @@ -131,6 +128,7 @@ $lang['subscribe_time'] = '订阅列表和摘è¦å‘é€çš„æ—¶é—´é—´éš”( $lang['notify'] = 'å‘逿›´æ”¹é€šçŸ¥ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; $lang['registernotify'] = 'å‘逿–°æ³¨å†Œç”¨æˆ·çš„ä¿¡æ¯ç»™è¿™ä¸ªé‚®ä»¶åœ°å€'; $lang['mailfrom'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€'; +$lang['mailreturnpath'] = 'éžæŠ•é€’é€šçŸ¥çš„æ”¶ä»¶äººé‚®ç®±åœ°å€'; $lang['mailprefix'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€å‰ç¼€'; $lang['htmlmail'] = 'å‘逿›´åŠ ç¾Žè§‚ï¼Œä½†ä½“ç§¯æ›´å¤§çš„ HTML 多部分邮件。ç¦ç”¨åˆ™å‘é€çº¯æ–‡æœ¬é‚®ä»¶ã€‚'; $lang['sitemap'] = 'ç”Ÿæˆ Google sitemap(天)'; @@ -140,6 +138,9 @@ $lang['rss_content'] = 'XML feed é¡¹ç›®ä¸æ˜¾ç¤ºä»€ä¹ˆå‘¢ï¼Ÿ'; $lang['rss_update'] = 'XML feed å‡çº§é—´éš”(秒)'; $lang['rss_show_summary'] = 'XML feed åœ¨æ ‡é¢˜ä¸æ˜¾ç¤ºæ‘˜è¦'; $lang['rss_media'] = '在 XML æºä¸åº”该列出何ç§ç±»åž‹çš„æ›´æ”¹ï¼Ÿ'; +$lang['rss_media_o_both'] = '两者å‡å¯'; +$lang['rss_media_o_pages'] = '页é¢'; +$lang['rss_media_o_media'] = '媒体'; $lang['updatecheck'] = '自动检查更新并接收安全è¦å‘Šå—?开å¯è¯¥åŠŸèƒ½åŽ DokuWiki 将自动访问 splitbrain.org。'; $lang['userewrite'] = '使用更整æ´çš„ URL'; $lang['useslash'] = '在 URL ä¸ä½¿ç”¨æ–œæ 作为命å空间的分隔符'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 965c2a38c6a2bcc58aa99d34babe705882421cd6..3196d7527189b8365eb5a50c2958cfcb92536e5c 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -982,6 +982,22 @@ if (!class_exists('setting_numericopt')) { class setting_numericopt extends setting_numeric { // just allow an empty config var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/'; + + + /** + * Empty string is valid for numericopt + * + * @param mixed $input + * + * @return bool + */ + function update($input) { + if ($input === '') { + return true; + } + + return parent::update($input); + } } } diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 495c44eb4b5d57ffb60c7c8218fc41ea7b690aba..0527bb9c3ea730947f5ad323880f1985f979ecd9 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -189,6 +189,7 @@ $meta['subscribe_time'] = array('numeric'); $meta['notify'] = array('email', '_multiple' => true); $meta['registernotify'] = array('email', '_multiple' => true); $meta['mailfrom'] = array('email', '_placeholders' => true); +$meta['mailreturnpath'] = array('email', '_placeholders' => true); $meta['mailprefix'] = array('string'); $meta['htmlmail'] = array('onoff'); diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index 339cc1bc65f1d6256195cba42f7d8c4228a60cd1..e77528b97f4d0a974d97a982868f8d96a18d9a31 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -340,7 +340,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @return array The names of the conflicting extensions */ public function getConflicts() { - if (!empty($this->remoteInfo['conflicts'])) return $this->remoteInfo['dependencies']; + if (!empty($this->remoteInfo['conflicts'])) return $this->remoteInfo['conflicts']; return array(); } diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 6ca72f7cef90438a2720589fa417a09c4e1df790..656b4ea09154871f8e271d8c7a78d5eb24f03eeb 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -340,9 +340,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $link = parse_url($url); $base = $link['host']; - if($link['port']) $base .= $base.':'.$link['port']; + if(!empty($link['port'])) $base .= $base.':'.$link['port']; $long = $link['path']; - if($link['query']) $long .= $link['query']; + if(!empty($link['query'])) $long .= $link['query']; $name = shorten($base, $long, 55); diff --git a/lib/plugins/extension/lang/de-informal/lang.php b/lib/plugins/extension/lang/de-informal/lang.php index d84e99243a4e23a152c3c04be74a119d9b7e286c..4daec7f6574dc62a0299b0e55518589443e89807 100644 --- a/lib/plugins/extension/lang/de-informal/lang.php +++ b/lib/plugins/extension/lang/de-informal/lang.php @@ -4,7 +4,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Felix <j.felix@mueller-donath.de> - * @author Felix Müller-Donath <j.felix@mueller-donath.de> */ $lang['menu'] = 'Erweiterungen verwalten'; $lang['tab_plugins'] = 'Installierte Plugins'; @@ -32,13 +31,65 @@ $lang['js']['display_disabled'] = 'deaktiviert'; $lang['js']['display_updatable'] = 'Update verfügbar'; $lang['search_for'] = 'Suche Erweiterung:'; $lang['search'] = 'Suche'; +$lang['extensionby'] = '<strong>%s</strong> von %s'; $lang['screenshot'] = 'Screenshot von %s'; $lang['popularity'] = 'Popularität: %s%%'; +$lang['homepage_link'] = 'Doku'; +$lang['bugs_features'] = 'Bugs'; +$lang['tags'] = 'Schlagworte:'; $lang['author_hint'] = 'Suche Erweiterungen dieses Autors'; $lang['installed'] = 'Installiert:'; +$lang['downloadurl'] = 'URL zum Herunterladen:'; +$lang['repository'] = 'Quelle:'; +$lang['unknown'] = '<em>unbekannt</em>'; $lang['installed_version'] = 'Installierte Version:'; $lang['install_date'] = 'Dein letztes Update:'; $lang['available_version'] = 'Verfügbare Version:'; $lang['compatible'] = 'Kompatibel mit:'; $lang['depends'] = 'Abhängig von:'; $lang['similar'] = 'Ähnlich wie:'; +$lang['conflicts'] = 'Nicht kompatibel mit:'; +$lang['donate'] = 'Nützlich?'; +$lang['donate_action'] = 'Spendiere dem Autor einen Kaffee!'; +$lang['repo_retry'] = 'Wiederholen'; +$lang['provides'] = 'Enthält:'; +$lang['status'] = 'Status'; +$lang['status_installed'] = 'installiert'; +$lang['status_not_installed'] = 'nicht installiert'; +$lang['status_protected'] = 'geschützt'; +$lang['status_enabled'] = 'aktiviert'; +$lang['status_disabled'] = 'deaktiviert'; +$lang['status_unmodifiable'] = 'unveränderlich'; +$lang['status_plugin'] = 'Plugin'; +$lang['status_template'] = 'Template'; +$lang['status_bundled'] = 'gebündelt'; +$lang['msg_enabled'] = 'Plugin %s ist aktiviert'; +$lang['msg_disabled'] = 'Erweiterung %s ist deaktiviert'; +$lang['msg_delete_success'] = 'Erweiterung %s wurde entfernt'; +$lang['msg_delete_failed'] = 'Deinstallation der Erweiterung %s fehlgeschlagen'; +$lang['msg_template_install_success'] = 'Das Template %s wurde erfolgreich installiert'; +$lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgreich '; +$lang['msg_plugin_install_success'] = 'Das Plugin %s wurde erfolgreich installiert'; +$lang['msg_plugin_update_success'] = 'Das Update des Plugins %s war erfolgreich'; +$lang['msg_upload_failed'] = 'Fehler beim Hochladen der Datei'; +$lang['missing_dependency'] = '<strong>Fehlende oder deaktivierte Abhängigkeit:<strong>%s'; +$lang['security_issue'] = '<strong>Sicherheitsproblem:</strong> %s'; +$lang['security_warning'] = '<strong>Sicherheitswarnung:</strong> %s'; +$lang['update_available'] = '<strong>Update:</strong> Version %s steht zum Download bereit.'; +$lang['wrong_folder'] = '<strong>Plugin wurde nicht korrekt installiert:</strong> Benenne das Plugin-Verzeichnis "%s" in "%s" um.'; +$lang['url_change'] = '<strong>URL geändert:</strong> Die Download URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s'; +$lang['error_badurl'] = 'URLs sollten mit http oder https beginnen'; +$lang['error_dircreate'] = 'Temporärer Ordner konnte nicht erstellt werden um Download zu abzuspeichern'; +$lang['error_download'] = 'Download der Datei: %s nicht möglich.'; +$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall solltest du versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem ​​Fall musst du die Datei selber herunterladen und manuell installieren.'; +$lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, lade die Datei herunter und installiere sie manuell.'; +$lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität deiner Wiki-Installation.'; +$lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; +$lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; +$lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; +$lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.'; +$lang['auth'] = 'Dieses Auth Plugin ist in der Konfiguration nicht aktiviert, Du solltest es deaktivieren.'; +$lang['install_url'] = 'Von URL installieren:'; +$lang['install_upload'] = 'Erweiterung hochladen:'; +$lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stelle sicher dass der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfe deine Proxy-Einstellungen.'; +$lang['nossl'] = 'Deine PHP-Installation scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki Erweiterungen wird scheitern.'; diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt index 7df8de1851ad0f29ccc5db3a4c5e95c1740f6b36..366925b9204d1cfb94d5404159d12ea04af4ba39 100644 --- a/lib/plugins/extension/lang/de/intro_search.txt +++ b/lib/plugins/extension/lang/de/intro_search.txt @@ -1 +1 @@ -Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken sie das jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. \ No newline at end of file +Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken Sie, dass jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. \ No newline at end of file diff --git a/lib/plugins/extension/lang/eo/lang.php b/lib/plugins/extension/lang/eo/lang.php index e0488cb46446ea43d4c9a8e8f8cdcac6ff036d3b..bcac85d7568925e3cf1e3c24c6a28020616738f2 100644 --- a/lib/plugins/extension/lang/eo/lang.php +++ b/lib/plugins/extension/lang/eo/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Aldonaĵa administrado'; @@ -25,6 +26,7 @@ $lang['btn_disable'] = 'Malebligi'; $lang['btn_install'] = 'Instali'; $lang['btn_reinstall'] = 'Re-instali'; $lang['js']['reallydel'] = 'Ĉu vere malinstali la aldonaĵon?'; +$lang['js']['display_updatable'] = 'Äisdatigebla'; $lang['search_for'] = 'Serĉi la aldonaĵon:'; $lang['search'] = 'Serĉi'; $lang['extensionby'] = '<strong>%s</strong> fare de %s'; diff --git a/lib/plugins/extension/lang/he/lang.php b/lib/plugins/extension/lang/he/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..ecdc19c5decd3c50ea801516673f77c31f59df9d --- /dev/null +++ b/lib/plugins/extension/lang/he/lang.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Guy Yakobovitch <guy.yakobovitch@gmail.com> + */ +$lang['menu'] = '×ž× ×”×œ הרחבות'; +$lang['tab_plugins'] = '×ª×•×¡×¤×™× ×ž×•×ª×§× ×™×'; +$lang['tab_templates'] = '×ª×‘× ×™×•×ª ×ž×•×ª×§× ×•×ª'; +$lang['tab_install'] = '×”×ª×§× ×” ×™×“× ×™×ª'; +$lang['notinstalled'] = 'הרחבה זו ×œ× ×ž×•×ª×§× ×ª'; +$lang['status_not_installed'] = '×œ× ×ž×•×ª×§×Ÿ'; +$lang['status_protected'] = 'מוגן'; +$lang['status_enabled'] = 'מופעל'; +$lang['status_disabled'] = 'מושבת'; +$lang['status_unmodifiable'] = '×œ× × ×™×ª×Ÿ ×œ×©×™× ×•×™'; +$lang['status_plugin'] = 'תוסף'; +$lang['status_template'] = '×ª×‘× ×™×ª'; +$lang['msg_enabled'] = 'תוסף %s מופעל'; +$lang['msg_disabled'] = 'תוסף %s מושבת'; +$lang['msg_delete_success'] = 'הרחבה %s הוסרה'; +$lang['msg_delete_failed'] = 'הסרת ההרחבה %s × ×›×©×œ×”'; +$lang['msg_template_install_success'] = '×ª×‘× ×™×ª %s ×”×•×ª×§× ×” בהצלחה'; +$lang['msg_template_update_success'] = '×ª×‘× ×™×ª %s ×¢×•×“×›× ×” בהצלחה'; +$lang['error_download'] = '×œ× × ×™×ª×Ÿ להוריד ×ת הקובץ: %s'; diff --git a/lib/plugins/extension/lang/pl/lang.php b/lib/plugins/extension/lang/pl/lang.php index ab9a818b6d5bc007651d3288eb1b61e1e12185b1..73673435dc0bb5f46bbee829af8b7cea20c57411 100644 --- a/lib/plugins/extension/lang/pl/lang.php +++ b/lib/plugins/extension/lang/pl/lang.php @@ -3,37 +3,73 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Mati <mackosa@wp.pl> */ $lang['menu'] = 'Menedżer rozszerzeÅ„'; $lang['tab_plugins'] = 'Zainstalowane dodatki'; +$lang['tab_templates'] = 'Zainstalowane Szablony'; $lang['tab_search'] = 'Znajdź i zainstaluj'; +$lang['tab_install'] = 'Instalacja rÄ™czna'; $lang['notinstalled'] = 'Te rozszerzenie nie zostaÅ‚o zainstalowane'; $lang['alreadyenabled'] = 'Te rozszerzenie jest już uruchomione'; +$lang['alreadydisabled'] = 'Rozszerzenie zostaÅ‚o wyłączone'; $lang['unknownauthor'] = 'Nieznany autor'; $lang['unknownversion'] = 'Nieznana wersja'; $lang['btn_info'] = 'Pokaż wiÄ™cej informacji'; +$lang['btn_update'] = 'Aktualizuj'; +$lang['btn_uninstall'] = 'Odinstaluj'; $lang['btn_enable'] = 'Uruchom'; $lang['btn_disable'] = 'Wyłącz'; +$lang['btn_install'] = 'Instaluj'; $lang['btn_reinstall'] = 'Ponowna instalacja'; $lang['js']['reallydel'] = 'NaprawdÄ™ odinstalować te rozszerzenie?'; +$lang['js']['display_viewoptions'] = 'Zobacz Opcje'; +$lang['js']['display_enabled'] = 'włącz'; +$lang['js']['display_disabled'] = 'wyłącz'; +$lang['search_for'] = 'Szukaj rozszerzenia:'; $lang['search'] = 'Szukaj'; +$lang['screenshot'] = 'Zrzut ekranu z %s'; $lang['bugs_features'] = 'Błędy'; $lang['tags'] = 'Tagi:'; +$lang['author_hint'] = 'Szukaj rozszerzenia po autorze'; $lang['installed'] = 'Zainstalowano:'; +$lang['downloadurl'] = 'Pobierz URL'; $lang['repository'] = 'Repozytorium'; +$lang['unknown'] = '<em>nie znany</em>'; $lang['installed_version'] = 'Zainstalowana wersja:'; $lang['install_date'] = 'Twoja ostatnia aktualizacja:'; $lang['available_version'] = 'DostÄ™pna wersja:'; +$lang['compatible'] = 'Zgodny z:'; $lang['depends'] = 'Zależy od:'; +$lang['similar'] = 'Podobny do:'; $lang['conflicts'] = 'Konflikt z:'; $lang['donate'] = 'Lubisz to?'; $lang['donate_action'] = 'Kup autorowi kawÄ™!'; $lang['repo_retry'] = 'Ponów'; +$lang['provides'] = 'Dostawcy:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'zainstalowano'; $lang['status_not_installed'] = 'nie zainstalowano'; +$lang['status_protected'] = 'chroniony'; $lang['status_enabled'] = 'uruchomione'; $lang['status_disabled'] = 'wyłączone'; +$lang['status_unmodifiable'] = 'niemodyfikowalny'; $lang['status_plugin'] = 'dodatek'; +$lang['status_template'] = 'szablon'; +$lang['msg_enabled'] = 'Dodatek %s włączony'; +$lang['msg_disabled'] = 'Dodatek %s wyłączony'; $lang['msg_delete_success'] = 'Rozszerzenie %s odinstalowane'; +$lang['msg_delete_failed'] = 'Odinstalowywanie rozszerzenia %s nie powiodÅ‚o siÄ™'; +$lang['msg_template_install_success'] = 'Szablon %s zostaÅ‚ zainstalowany'; +$lang['msg_template_update_success'] = 'Szablon %s zostaÅ‚ zaktualizowany'; +$lang['msg_plugin_install_success'] = 'Dodatek %s zostaÅ‚ zainstalowany'; +$lang['msg_plugin_update_success'] = 'Dodatek %s zostaÅ‚ zaktualizowany'; +$lang['msg_upload_failed'] = 'Åadowanie pliku nie powiodÅ‚o siÄ™'; +$lang['security_warning'] = '<strong>Alert BezpieczeÅ„stwa:</strong>%s'; +$lang['update_available'] = '<strong>Uaktualnij</strong> Nowa wersja %s jest dostÄ™pna.'; +$lang['error_badurl'] = 'URL powinien zaczynać siÄ™ od http lub https'; +$lang['error_dircreate'] = 'Nie można utworzyć tymczasowego folderu pobierania '; +$lang['error_download'] = 'Nie można pobrać pliku %s'; +$lang['install_url'] = 'Instaluj z URL:'; +$lang['install_upload'] = 'ZaÅ‚aduj Rozszerzenie '; diff --git a/lib/plugins/extension/lang/sr/intro_install.txt b/lib/plugins/extension/lang/sr/intro_install.txt new file mode 100644 index 0000000000000000000000000000000000000000..b05dc2c302dcde0844e30f250a7086e804b75f1c --- /dev/null +++ b/lib/plugins/extension/lang/sr/intro_install.txt @@ -0,0 +1 @@ +Овде можете ручно инÑталирати прикључке и шаблоне тако што ћете их отпремити или унети адреÑу за директно преузимање. \ No newline at end of file diff --git a/lib/plugins/extension/lang/sr/lang.php b/lib/plugins/extension/lang/sr/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..a4fc8843ce67d12a1740c13051e1075215d4eecc --- /dev/null +++ b/lib/plugins/extension/lang/sr/lang.php @@ -0,0 +1,66 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Марко М. КоÑтић <marko.m.kostic@gmail.com> + */ +$lang['menu'] = 'Управник проширења'; +$lang['tab_plugins'] = 'ИнÑталирани прикључци'; +$lang['tab_templates'] = 'ИнÑталирани шаблони'; +$lang['tab_search'] = 'Тражи и инÑталирај'; +$lang['tab_install'] = 'Ручно инÑталирање'; +$lang['notimplemented'] = 'Ова могућноÑÑ‚ још није израђена'; +$lang['notinstalled'] = 'Ово проширење још није инÑталирано'; +$lang['alreadyenabled'] = 'Ово проширење је већ омогућено'; +$lang['alreadydisabled'] = 'Ово проширење је већ онемогућено'; +$lang['pluginlistsaveerror'] = 'Догодила Ñе грешка приликом чувања ÑпиÑка прикључака'; +$lang['unknownauthor'] = 'Ðепознат творац'; +$lang['unknownversion'] = 'Ðепознато издање'; +$lang['btn_info'] = 'Прикажи још података'; +$lang['btn_update'] = 'Ðжурирај'; +$lang['btn_uninstall'] = 'ДеинÑталирај'; +$lang['btn_enable'] = 'Омогући'; +$lang['btn_disable'] = 'Онемогући'; +$lang['btn_install'] = 'ИнÑталирај'; +$lang['btn_reinstall'] = 'Поново инÑталирај'; +$lang['js']['reallydel'] = 'ЗаиÑта деинÑталирати ово проширење?'; +$lang['js']['display_viewoptions'] = 'Опције приказа:'; +$lang['js']['display_enabled'] = 'омогућено'; +$lang['js']['display_disabled'] = 'онемогућено'; +$lang['js']['display_updatable'] = 'могуће ажурирати'; +$lang['search_for'] = 'Претражи проширење:'; +$lang['search'] = 'Претрага'; +$lang['screenshot'] = 'Снимак екрана од %s'; +$lang['popularity'] = 'ПопуларноÑÑ‚: %s%%'; +$lang['homepage_link'] = 'Документа'; +$lang['bugs_features'] = 'Грешке'; +$lang['tags'] = 'Ознаке:'; +$lang['author_hint'] = 'Претражи проширења овог творца'; +$lang['installed'] = 'ИнÑталирано:'; +$lang['downloadurl'] = 'ÐдреÑа за преузимање:'; +$lang['repository'] = 'Ризница:'; +$lang['unknown'] = '<em>непознато</em>'; +$lang['installed_version'] = 'ИнÑталирано издање:'; +$lang['install_date'] = 'Ваше поÑледње ажурирање:'; +$lang['available_version'] = 'ДоÑтупно издање:'; +$lang['compatible'] = 'Подударно Ñа:'; +$lang['depends'] = 'ЗавиÑи од:'; +$lang['similar'] = 'Слично као:'; +$lang['conflicts'] = 'У Ñукобу Ñа:'; +$lang['donate'] = 'Свиђа вам Ñе?'; +$lang['donate_action'] = 'Купите творцу шољицу кафе!'; +$lang['repo_retry'] = 'Поново покушај'; +$lang['provides'] = 'Пружа:'; +$lang['status'] = 'Стање:'; +$lang['status_installed'] = 'инÑталирано'; +$lang['status_not_installed'] = 'није инÑталирано'; +$lang['status_protected'] = 'заштићено'; +$lang['status_enabled'] = 'омогућено'; +$lang['status_disabled'] = 'онемогућено'; +$lang['status_unmodifiable'] = 'неизмењиво'; +$lang['status_plugin'] = 'прикључак'; +$lang['status_template'] = 'шаблон'; +$lang['status_bundled'] = 'упаковано'; +$lang['msg_enabled'] = 'Прикључак %s је омогућен'; +$lang['msg_disabled'] = 'Прикључак %s је онемогућен'; diff --git a/lib/plugins/extension/lang/sv/lang.php b/lib/plugins/extension/lang/sv/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..92d21f25a4f7ded0acaaca81affb20dfa0696364 --- /dev/null +++ b/lib/plugins/extension/lang/sv/lang.php @@ -0,0 +1,67 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tor Härnqvist <tor@harnqvist.se> + */ +$lang['tab_templates'] = 'Installerade templat'; +$lang['tab_search'] = 'Sök och installera'; +$lang['tab_install'] = 'Manuell installation'; +$lang['notimplemented'] = 'Denna funktion har ännu inte implementerats'; +$lang['unknownauthor'] = 'Okänd skapare'; +$lang['unknownversion'] = 'Okänd version'; +$lang['btn_info'] = 'Visa mer info'; +$lang['btn_update'] = 'Uppdatera'; +$lang['btn_uninstall'] = 'Avinstallera'; +$lang['btn_enable'] = 'Aktivera'; +$lang['btn_disable'] = 'Avaktivera'; +$lang['btn_install'] = 'Installera'; +$lang['btn_reinstall'] = 'Ominstallera'; +$lang['js']['reallydel'] = 'Vill du verkligen avinstallera detta tillägg?'; +$lang['js']['display_viewoptions'] = 'Visa alternativ:'; +$lang['js']['display_enabled'] = 'aktivera'; +$lang['js']['display_disabled'] = 'avaktivera'; +$lang['js']['display_updatable'] = 'möjlig att uppdatera'; +$lang['search'] = 'Sök'; +$lang['screenshot'] = 'Skärmdump av %s'; +$lang['popularity'] = 'Populatitet: %s%%'; +$lang['homepage_link'] = 'Dokumentation'; +$lang['bugs_features'] = 'Buggar'; +$lang['tags'] = 'Taggar:'; +$lang['installed'] = 'Installerat:'; +$lang['downloadurl'] = 'Nedladdningslänk:'; +$lang['unknown'] = '<em>okänd</em>'; +$lang['installed_version'] = 'Installerad version:'; +$lang['install_date'] = 'Din senaste uppdatering:'; +$lang['available_version'] = 'Tillgänglig version:'; +$lang['compatible'] = 'Kompatibel med:'; +$lang['depends'] = 'Beroende av:'; +$lang['similar'] = 'Liknande som:'; +$lang['conflicts'] = 'Konflikt med:'; +$lang['donate'] = 'Som denna?'; +$lang['donate_action'] = 'Köp en kaffe till skaparen'; +$lang['repo_retry'] = 'Försök igen'; +$lang['status'] = 'Status:'; +$lang['status_installed'] = 'installerad'; +$lang['status_not_installed'] = 'inte installerad'; +$lang['status_protected'] = 'skyddad'; +$lang['status_enabled'] = 'aktiverad'; +$lang['status_disabled'] = 'avaktiverad'; +$lang['status_unmodifiable'] = 'ej modifierbar'; +$lang['msg_enabled'] = 'Tillägg %s aktiverat'; +$lang['msg_disabled'] = 'Tillägg %s avaktiverat'; +$lang['msg_template_install_success'] = 'Templat %s installerades framgÃ¥ngsrikt'; +$lang['msg_template_update_success'] = 'Templat %s uppdaterades framgÃ¥ngsrikt'; +$lang['msg_upload_failed'] = 'Uppladdning av filen misslyckades'; +$lang['security_warning'] = '<strong>Säkerhetsvarning:</strong> %s'; +$lang['update_available'] = '<strong>Uppdatering:</strong> Ny version av %s är tillgänglig.'; +$lang['url_change'] = '<strong>URL ändrad:</strong> Nedladdningslänken har ändrats sedan senaste nedladdning. Kontrollera om den nya sökvägen är giltig innan du uppdaterar tillägget.<br />Ny sökväg: %s<br />Gammal sökväg: %s'; +$lang['error_badurl'] = 'URL:er borde inledas med http eller https'; +$lang['error_dircreate'] = 'Kunde inte skapa temporär katalog för nedladdning'; +$lang['error_download'] = 'Kunde inte ladda ner filen: %s'; +$lang['notplperms'] = 'Templatkatalogen är inte skrivbar'; +$lang['nopluginperms'] = 'Tilläggskatalogen är inte skrivbar'; +$lang['install_url'] = 'Installera frÃ¥n URL:'; +$lang['install_upload'] = 'Ladda upp tillägg:'; +$lang['nossl'] = 'Din PHP tycks sakna SSL-stöd. Nedladdning kommer inte att fungera för mÃ¥nga DokuWiki-tillägg.'; diff --git a/lib/plugins/extension/lang/zh-tw/lang.php b/lib/plugins/extension/lang/zh-tw/lang.php index c5b1e6dc58df836d0ddaa74fb4147d2c11a3d64d..8087778ba17ede1e6e1e60ec73bd6ae876dc991a 100644 --- a/lib/plugins/extension/lang/zh-tw/lang.php +++ b/lib/plugins/extension/lang/zh-tw/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Stan <talktostan@gmail.com> * @author June-Hao Hou <junehao@gmail.com> * @author lioujheyu <lioujheyu@gmail.com> @@ -61,7 +61,6 @@ $lang['status_template'] = '模æ¿'; $lang['status_bundled'] = '已綑ç¶å…§é™„'; $lang['msg_enabled'] = '外掛 %s 已啟用'; $lang['msg_disabled'] = '外掛 %s å·²ç¦ç”¨'; -$lang['msg_delete_success'] = 'é™„åŠ å…ƒä»¶å·²ç§»é™¤'; $lang['msg_delete_failed'] = 'è§£é™¤å®‰è£ %s 失敗'; $lang['msg_template_install_success'] = 'æ¨¡æ¿ %s 以æˆåŠŸå®‰è£'; $lang['msg_template_update_success'] = 'æ¨¡æ¿ %s 以æˆåŠŸæ›´æ–°'; diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 0e27e89a3cfc195d855c586b60d2f10084d9c5f1..622a007b4e1e8b27d3def187a30ff14a94a32077 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author lempel <riverlempel@hotmail.com> * @author Cupen <Cupenoruler@foxmail.com> * @author xiqingongzi <Xiqingongzi@Gmail.com> * @author qinghao <qingxianhao@gmail.com> @@ -70,7 +71,7 @@ $lang['status_template'] = '模æ¿'; $lang['status_bundled'] = '内建'; $lang['msg_enabled'] = 'æ’ä»¶ %s å·²å¯ç”¨'; $lang['msg_disabled'] = 'æ’ä»¶ %s å·²ç¦ç”¨'; -$lang['msg_delete_success'] = 'æ’ä»¶å·²ç»å¸è½½'; +$lang['msg_delete_success'] = '%s 扩展没有安装'; $lang['msg_delete_failed'] = 'å¸è½½æ‰©å±• %s 失败'; $lang['msg_template_install_success'] = 'æ¨¡æ¿ %s 安装æˆåŠŸ'; $lang['msg_template_update_success'] = 'æ¨¡æ¿ %s æ›´æ–°æˆåŠŸ'; diff --git a/lib/plugins/popularity/lang/da/lang.php b/lib/plugins/popularity/lang/da/lang.php index 6e9d7c9863bc91529a59bba2b01aec8c00139e0e..715d6ac93899360b3da2d10b6176b8e354222a25 100644 --- a/lib/plugins/popularity/lang/da/lang.php +++ b/lib/plugins/popularity/lang/da/lang.php @@ -8,8 +8,7 @@ * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> */ $lang['name'] = 'Tilbagemelding om popularitet (vil mÃ¥ske tage en del tid at indlæse)'; diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php index 5e67e5bdb34221e762f3a1bbaaae463bf4b31d17..a0492c68c7a11a86cd5b078b79ab8a2ea9116b03 100644 --- a/lib/plugins/popularity/lang/eo/lang.php +++ b/lib/plugins/popularity/lang/eo/lang.php @@ -2,13 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipo Kastro <fefcas@gmail.com> - * @author Felipe Castro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> */ $lang['name'] = 'Populareca enketo (eble la Åargo prokrastos iomete)'; $lang['submit'] = 'Sendi datumaron'; diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php index 059bec74cbcff2316de97ccc43bc1756ce510a38..f1b9f626da4bf6fedac70e21081752077455a63d 100644 --- a/lib/plugins/popularity/lang/fr/lang.php +++ b/lib/plugins/popularity/lang/fr/lang.php @@ -11,10 +11,7 @@ * @author Vincent Feltz <psycho@feltzv.fr> * @author Philippe Bajoit <philippe.bajoit@gmail.com> * @author Florian Gaub <floriang@floriang.net> - * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author schplurtz@laposte.net - * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> diff --git a/lib/plugins/popularity/lang/he/lang.php b/lib/plugins/popularity/lang/he/lang.php index 54341636bdced565913b2c22459ce6b49530b4c0..e9f75b735da30bed20d1fe59ba6c788bb479f0b5 100644 --- a/lib/plugins/popularity/lang/he/lang.php +++ b/lib/plugins/popularity/lang/he/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> diff --git a/lib/plugins/popularity/lang/it/lang.php b/lib/plugins/popularity/lang/it/lang.php index acd59a6d2d6c6ef96acc67eeff49838fb64853aa..c355254b1285d0662aab147c4f9e58d7602fc1fe 100644 --- a/lib/plugins/popularity/lang/it/lang.php +++ b/lib/plugins/popularity/lang/it/lang.php @@ -4,14 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com */ $lang['name'] = 'Raccolta dati sul wiki (può impiegare del tempo per caricarsi)'; $lang['submit'] = 'Invia dati'; diff --git a/lib/plugins/popularity/lang/lv/lang.php b/lib/plugins/popularity/lang/lv/lang.php index a8ef37f7a91c3bbb1860c404a429e1113eef2f75..2c9bc63e2cdaa38367d1b9b6e9eff7154e585d57 100644 --- a/lib/plugins/popularity/lang/lv/lang.php +++ b/lib/plugins/popularity/lang/lv/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['name'] = 'PopularitÄtes atsauksmes (ielÄde var aizņemt kÄdu laiku)'; diff --git a/lib/plugins/popularity/lang/nl/lang.php b/lib/plugins/popularity/lang/nl/lang.php index d7ec14da1f2ad4b5f8a60f56e920024aa0a7aa3c..b1b48566ba38c862a1c5512fbd8dc02c09c9b841 100644 --- a/lib/plugins/popularity/lang/nl/lang.php +++ b/lib/plugins/popularity/lang/nl/lang.php @@ -8,10 +8,8 @@ * @author Dion Nicolaas <dion@nicolaas.net> * @author Danny Rotsaert <danny.rotsaert@edpnet.be> * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> * @author Remon <no@email.local> diff --git a/lib/plugins/popularity/lang/pl/lang.php b/lib/plugins/popularity/lang/pl/lang.php index 224c0eb7fa3256940c69598a135d116a23556cb6..2f198d2e52f759125bace490bc5fb344b7c0c392 100644 --- a/lib/plugins/popularity/lang/pl/lang.php +++ b/lib/plugins/popularity/lang/pl/lang.php @@ -7,7 +7,7 @@ * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> diff --git a/lib/plugins/popularity/lang/ru/lang.php b/lib/plugins/popularity/lang/ru/lang.php index 9a862f194d8fd8529b1b522ce7b52d9408c164c1..67a9dac56c55c63c55629f90e83a026984b44f08 100644 --- a/lib/plugins/popularity/lang/ru/lang.php +++ b/lib/plugins/popularity/lang/ru/lang.php @@ -6,7 +6,6 @@ * @author Змей ÐтерийÑкий evil_snake@eternion.ru * @author Hikaru Nakajima <jisatsu@mail.ru> * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com * @author Alexander Sorkin <kibizoid@gmail.com> * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> @@ -15,7 +14,6 @@ * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) */ $lang['name'] = 'Сбор информации о популÑрноÑти (Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ может потребоватьÑÑ Ð½ÐµÐºÐ¾Ñ‚Ð¾Ñ€Ð¾Ðµ времÑ)'; $lang['submit'] = 'Отправить данные'; diff --git a/lib/plugins/popularity/lang/sv/lang.php b/lib/plugins/popularity/lang/sv/lang.php index dc62621f93a1a7fbeec398a491838210f35be01f..ffbb903f26a414709caa6a51f080886edc780dbd 100644 --- a/lib/plugins/popularity/lang/sv/lang.php +++ b/lib/plugins/popularity/lang/sv/lang.php @@ -6,14 +6,10 @@ * @author HÃ¥kan Sandell <hakan.sandell@home.se> * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com */ $lang['name'] = 'Popularitets-feedback (det kan ta en stund att ladda sidan)'; $lang['submit'] = 'Sänd data'; diff --git a/lib/plugins/popularity/lang/uk/lang.php b/lib/plugins/popularity/lang/uk/lang.php index 9d67c1151fb1dadd57677a54576b56794c17849b..d47a0cf5fb450d55927d2c6f85886e742093776e 100644 --- a/lib/plugins/popularity/lang/uk/lang.php +++ b/lib/plugins/popularity/lang/uk/lang.php @@ -2,13 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com + * + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com - * @author Kate Arzamastseva pshns@ukr.net */ $lang['name'] = 'Відгук популÑрноÑті (може зайнÑти деÑкий чаÑ)'; $lang['submit'] = 'Передати дані'; diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php index 79abe1605874b9404f98c954e7315af8e602a854..695b5c4ad0e47f57469000c1aa5dbcdd69dc9ecd 100644 --- a/lib/plugins/popularity/lang/zh/lang.php +++ b/lib/plugins/popularity/lang/zh/lang.php @@ -5,15 +5,11 @@ * * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> * @author phy25 <git@phy25.com> */ diff --git a/lib/plugins/revert/lang/da/lang.php b/lib/plugins/revert/lang/da/lang.php index 782ec121f8c3fc12d4ae04c3ff12dec246d77bd3..11114bd1bfa824891b8268de99bc8737b81ffea0 100644 --- a/lib/plugins/revert/lang/da/lang.php +++ b/lib/plugins/revert/lang/da/lang.php @@ -8,8 +8,7 @@ * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> */ $lang['menu'] = 'Gendannelsesstyring'; diff --git a/lib/plugins/revert/lang/de-informal/lang.php b/lib/plugins/revert/lang/de-informal/lang.php index 7affe54f1fbb29e9a1713bb3e97e0c82986954dc..808fe6e4c1dad717f160699e1d32eec270583b3f 100644 --- a/lib/plugins/revert/lang/de-informal/lang.php +++ b/lib/plugins/revert/lang/de-informal/lang.php @@ -11,7 +11,6 @@ * @author Pierre Corell <info@joomla-praxis.de> * @author Frank Loizzi <contact@software.bacal.de> * @author Volker Bödker <volker@boedker.de> - * @author Matthias Schulte <dokuwiki@lupo49.de> */ $lang['menu'] = 'Seiten wiederherstellen'; $lang['filter'] = 'Durchsuche als Spam markierte Seiten'; diff --git a/lib/plugins/revert/lang/eo/lang.php b/lib/plugins/revert/lang/eo/lang.php index 2d0b0f26732ecadf83ab621aa2d9d1b11a46ad44..5e9c1717ebf8a6542624caf76c541268fc3a751a 100644 --- a/lib/plugins/revert/lang/eo/lang.php +++ b/lib/plugins/revert/lang/eo/lang.php @@ -2,15 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipe Castro <fefcas@uol.com.br> - * @author Felipe Castro <fefcas@gmail.com> - * @author Felipe Castro <fefcas (cxe) gmail (punkto) com> * @author Felipo Kastro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> */ $lang['menu'] = 'Administrado de restarigo'; $lang['filter'] = 'Serĉi spamecajn paÄojn'; diff --git a/lib/plugins/revert/lang/fr/lang.php b/lib/plugins/revert/lang/fr/lang.php index 7f604d68ac36a0a789a3fb06039f6b57e709d9bb..ed518f0cf5df4f804ac696766f07d49247d9805b 100644 --- a/lib/plugins/revert/lang/fr/lang.php +++ b/lib/plugins/revert/lang/fr/lang.php @@ -13,10 +13,7 @@ * @author Vincent Feltz <psycho@feltzv.fr> * @author Philippe Bajoit <philippe.bajoit@gmail.com> * @author Florian Gaub <floriang@floriang.net> - * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author schplurtz@laposte.net - * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> diff --git a/lib/plugins/revert/lang/he/lang.php b/lib/plugins/revert/lang/he/lang.php index 2f49856f5941a4e9c802c54b33c6a5b46f015270..562bbb3d224a85ef66291b0c897b8f8b9960f490 100644 --- a/lib/plugins/revert/lang/he/lang.php +++ b/lib/plugins/revert/lang/he/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> diff --git a/lib/plugins/revert/lang/it/lang.php b/lib/plugins/revert/lang/it/lang.php index bb8a47598076b6458bd4af242c2dab2aed7d6806..dfee9965ebabe0384d0a555432cb3e29a89a287c 100644 --- a/lib/plugins/revert/lang/it/lang.php +++ b/lib/plugins/revert/lang/it/lang.php @@ -4,15 +4,10 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com */ $lang['menu'] = 'Gestore di ripristini'; $lang['filter'] = 'Cerca pagine con spam'; diff --git a/lib/plugins/revert/lang/lv/lang.php b/lib/plugins/revert/lang/lv/lang.php index b873692336bfc3ad4ee0b5b992f64e127c325fa6..365171577d42c14a46f4b81e05a35835c5e54a57 100644 --- a/lib/plugins/revert/lang/lv/lang.php +++ b/lib/plugins/revert/lang/lv/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['menu'] = 'PiemÄ“sloto lapu atjaunotÄjs'; diff --git a/lib/plugins/revert/lang/nl/lang.php b/lib/plugins/revert/lang/nl/lang.php index a91b50fd5a20205610bb2eca08382bdf484b026e..9181f04b9dc788ca521ea64adf5c3dca682b58ae 100644 --- a/lib/plugins/revert/lang/nl/lang.php +++ b/lib/plugins/revert/lang/nl/lang.php @@ -9,10 +9,8 @@ * @author Dion Nicolaas <dion@nicolaas.net> * @author Danny Rotsaert <danny.rotsaert@edpnet.be> * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit <klapinklapin@gmail.com> * @author Remon <no@email.local> diff --git a/lib/plugins/revert/lang/pl/lang.php b/lib/plugins/revert/lang/pl/lang.php index d9b917e46c5ff6fa9bfbb08765af36d5de152cce..27937967384267bdcf4fe14af577ed004c2d4203 100644 --- a/lib/plugins/revert/lang/pl/lang.php +++ b/lib/plugins/revert/lang/pl/lang.php @@ -7,7 +7,7 @@ * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> diff --git a/lib/plugins/revert/lang/ru/lang.php b/lib/plugins/revert/lang/ru/lang.php index dd0f5219bc6c00ed6a74ef060d7d0faf09ee4ac1..663acff796878bb4ba058023e2fa534c80703e64 100644 --- a/lib/plugins/revert/lang/ru/lang.php +++ b/lib/plugins/revert/lang/ru/lang.php @@ -8,7 +8,6 @@ * @author Змей ÐтерийÑкий evil_snake@eternion.ru * @author Hikaru Nakajima <jisatsu@mail.ru> * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com * @author Alexander Sorkin <kibizoid@gmail.com> * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> @@ -17,7 +16,6 @@ * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) */ $lang['menu'] = 'Менеджер откаток'; $lang['filter'] = 'ПоиÑк Ñпам-Ñтраниц'; diff --git a/lib/plugins/revert/lang/sv/lang.php b/lib/plugins/revert/lang/sv/lang.php index 4d2c3adbeffd4b4b8dc03c54ddb843910766d361..7cff7ffd94c9308db41181a7268a5568b5f19bfc 100644 --- a/lib/plugins/revert/lang/sv/lang.php +++ b/lib/plugins/revert/lang/sv/lang.php @@ -3,24 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> * @author HÃ¥kan Sandell <hakan.sandell@home.se> * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com * @author Henrik <henrik@idealis.se> - * @author Tor Härnqvist <tor.harnqvist@gmail.com> * @author Hans Iwan Bratt <hibratt@gmail.com> * @author Mikael Bergström <krank23@gmail.com> - * @author Tor Härnqvist <tor@harnqvist.se> */ $lang['menu'] = 'Hantera Ã¥terställningar'; $lang['filter'] = 'Sök efter spamsidor'; diff --git a/lib/plugins/revert/lang/uk/lang.php b/lib/plugins/revert/lang/uk/lang.php index 2c9774f0c065855616054fa1854302759b788b7a..f56c0eb047e6eba7295daf5ba33b27e37381fecf 100644 --- a/lib/plugins/revert/lang/uk/lang.php +++ b/lib/plugins/revert/lang/uk/lang.php @@ -2,13 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com + * + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com - * @author Kate Arzamastseva pshns@ukr.net */ $lang['menu'] = 'Менеджер відновленнÑ'; $lang['filter'] = 'Пошук Ñпамних Ñторінок'; diff --git a/lib/plugins/revert/lang/zh/lang.php b/lib/plugins/revert/lang/zh/lang.php index b56d830ff5694aaf22e4a34f2d5db598d17a8344..60a7ba4f0f8f5beac08b0c6735e90160e0ff4d14 100644 --- a/lib/plugins/revert/lang/zh/lang.php +++ b/lib/plugins/revert/lang/zh/lang.php @@ -5,15 +5,11 @@ * * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> */ $lang['menu'] = '还原管ç†å™¨'; diff --git a/lib/plugins/styling/lang/de-informal/intro.txt b/lib/plugins/styling/lang/de-informal/intro.txt new file mode 100644 index 0000000000000000000000000000000000000000..aa9577355efe7d602e898367b76227bd5979d774 --- /dev/null +++ b/lib/plugins/styling/lang/de-informal/intro.txt @@ -0,0 +1,2 @@ +Dieses Plugin ermöglicht es, bestimmte Designeinstellungen des ausgewählten Templates zu ändern. +Alle Änderungen werden in einer lokalen Konfigurationsdatei gespeichert und sind upgrade-sicher. \ No newline at end of file diff --git a/lib/plugins/styling/lang/de-informal/lang.php b/lib/plugins/styling/lang/de-informal/lang.php index 48f57452cead7b2c801d1c15a42ea669c55f39fa..60ae96b0abda100865a27ef50cc616fa7eb40bcf 100644 --- a/lib/plugins/styling/lang/de-informal/lang.php +++ b/lib/plugins/styling/lang/de-informal/lang.php @@ -5,4 +5,19 @@ * * @author Felix Müller-Donath <j.felix@mueller-donath.de> */ +$lang['menu'] = 'Einstellungen fürs Template-Design'; +$lang['js']['loader'] = 'Vorschau lädt...<br />Falls diese Nachricht nicht verschwindet, könnten deine Werte fehlerhaft sein'; +$lang['js']['popup'] = 'Öffne als Popup'; +$lang['error'] = 'Dieses Template unterstützt diese Funktion nicht.'; +$lang['btn_preview'] = 'Vorschau der Änderungen anzeigen'; +$lang['btn_save'] = 'Änderungen speichern'; +$lang['btn_reset'] = 'Aktuelle Änderungen rückgängig machen'; +$lang['btn_revert'] = 'Design auf die Voreinstellung des Templates zurücksetzen'; +$lang['__text__'] = 'Main text color'; +$lang['__background__'] = 'Haupthintergrundfarbe'; +$lang['__text_alt__'] = 'Alternative Textfarbe'; +$lang['__background_alt__'] = 'Alternative Hintergrundfarbe'; +$lang['__text_neu__'] = 'Neutrale Textfarbe'; +$lang['__background_neu__'] = 'Neutrale Hintergrundfarbe'; +$lang['__border__'] = 'Rahmenfarbe'; $lang['__highlight__'] = 'Hervorhebungsfarbe (v.a. für Suchergebnisse)'; diff --git a/lib/plugins/styling/lang/eo/lang.php b/lib/plugins/styling/lang/eo/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..d8127e7db02c2af82e9a42004ac7a983f07a999d --- /dev/null +++ b/lib/plugins/styling/lang/eo/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> + */ +$lang['btn_preview'] = 'AntaÅaj ÅanÄoj'; +$lang['btn_save'] = 'Konservi ÅanÄojn'; diff --git a/lib/plugins/styling/lang/fr/lang.php b/lib/plugins/styling/lang/fr/lang.php index b3f0116462974d278de3cac1811fc7d307709b5b..05725bcf62b0146c474171e29dc2755297828979 100644 --- a/lib/plugins/styling/lang/fr/lang.php +++ b/lib/plugins/styling/lang/fr/lang.php @@ -5,11 +5,12 @@ * * @author Carbain Frédéric <fcarbain@yahoo.fr> * @author Nicolas Friedli <nicolas@theologique.ch> + * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> */ $lang['menu'] = 'Paramètres de style du thème (template)'; $lang['js']['loader'] = 'La prévisualisation est en chargement... <br />Si rien ne se passe, les données sont peut-être erronées'; $lang['js']['popup'] = 'Ouvrir dans une nouvelle fenêtre'; -$lang['error'] = 'Désolé, ce thème ne supporte pas cette fonctionnalité.'; +$lang['error'] = 'Désolé, ce thème n\'utilise pas cette fonctionnalité.'; $lang['btn_preview'] = 'Aperçu des changements'; $lang['btn_save'] = 'sauvegarder les changements.'; $lang['btn_reset'] = 'Remettre les changements courants à zéro'; diff --git a/lib/plugins/styling/lang/pl/lang.php b/lib/plugins/styling/lang/pl/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..d530c54db711d23201ee8a69cf8a29cbcd2ae231 --- /dev/null +++ b/lib/plugins/styling/lang/pl/lang.php @@ -0,0 +1,18 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Max <maxrb146@gmail.com> + */ +$lang['menu'] = 'Ustawienia Szablonu'; +$lang['js']['popup'] = 'Otwórz w nowym oknie'; +$lang['error'] = 'Przepraszamy, ten szablon nie wspiera tej funkcjonalnoÅ›ci'; +$lang['btn_preview'] = 'Pokaż zmiany '; +$lang['btn_save'] = 'Zapisz zmiany'; +$lang['btn_reset'] = 'Cofnij zmiany '; +$lang['__text__'] = 'Kolor tekstu '; +$lang['__background__'] = 'Kolor tÅ‚a '; +$lang['__text_alt__'] = 'Inny kolor tekstu'; +$lang['__background_alt__'] = 'Inny kolor tÅ‚a'; +$lang['__border__'] = 'kolor obramowania '; diff --git a/lib/plugins/styling/lang/sv/lang.php b/lib/plugins/styling/lang/sv/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..00a8518b20ff0457093f9c9bccf2511305bf228a --- /dev/null +++ b/lib/plugins/styling/lang/sv/lang.php @@ -0,0 +1,17 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tor Härnqvist <tor@harnqvist.se> + */ +$lang['btn_preview'] = 'Förhandsvisa ändringar'; +$lang['btn_save'] = 'Spara ändringar'; +$lang['btn_reset'] = 'Nollställ aktuella ändringar'; +$lang['__text__'] = 'Huvudsaklig textfärg'; +$lang['__background__'] = 'Huvudsaklig bakgrundsfärg'; +$lang['__text_alt__'] = 'Alternativ textfärg'; +$lang['__background_alt__'] = 'Alternativ bakgrundsfärg'; +$lang['__text_neu__'] = 'Neutral textfärg'; +$lang['__background_neu__'] = 'Neutral bakgrundsfärg'; +$lang['__border__'] = 'Ramfärg'; diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index 1cb4a90381fb6ef0bbcd06c6ace9033606d8bad4..b4e3c6c2513cec78485fb0d810254a3eee885b6a 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -9,11 +9,9 @@ * @author Harith <haj@berlingske.dk> * @author Daniel Ejsing-Duun <dokuwiki@zilvador.dk> * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author rasmus@kinnerup.com - * @author Michael Pedersen subben@gmail.com + * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> * @author soer9648 <soer9648@eucl.dk> - * @author Søren Birk <soer9648@eucl.dk> */ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; diff --git a/lib/plugins/usermanager/lang/de-informal/lang.php b/lib/plugins/usermanager/lang/de-informal/lang.php index 2523ce212a42b3fd3125a3cbc8f5a9f5fcb0cc2d..bea3bb9b2630ae87c84ca6451ea1c7d7a7943e06 100644 --- a/lib/plugins/usermanager/lang/de-informal/lang.php +++ b/lib/plugins/usermanager/lang/de-informal/lang.php @@ -12,6 +12,7 @@ * @author Frank Loizzi <contact@software.bacal.de> * @author Volker Bödker <volker@boedker.de> * @author Dennis Plöger <develop@dieploegers.de> + * @author F. Mueller-Donath <j.felix@mueller-donath.de> */ $lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Benutzeranmeldung ist nicht verfügbar)'; @@ -59,6 +60,8 @@ $lang['add_ok'] = 'Benutzer erfolgreich hinzugefügt'; $lang['add_fail'] = 'Hinzufügen des Benutzers fehlgeschlagen'; $lang['notify_ok'] = 'Benachrichtigungsmail wurde versendet'; $lang['notify_fail'] = 'Benachrichtigungsemail konnte nicht gesendet werden'; +$lang['import_userlistcsv'] = 'Benutzerliste (CSV-Datei):'; +$lang['import_header'] = 'Letzte Fehler bei Import'; $lang['import_success_count'] = 'Benutzerimport: %d Benutzer gefunden, %d erfolgreich importiert.'; $lang['import_failure_count'] = 'Benutzerimport: %d Benutzerimporte fehlgeschalten. Alle Fehler werden unten angezeigt.'; $lang['import_error_fields'] = 'Falsche Anzahl Felder. Gefunden: %d. Benötigt: 4.'; @@ -69,3 +72,12 @@ $lang['import_error_upload'] = 'Import fehlgeschlagen. Die CSV-Datei konnte ni $lang['import_error_readfail'] = 'Import fehlgeschlagen. Konnte die hochgeladene Datei nicht lesen.'; $lang['import_error_create'] = 'Konnte den Benutzer nicht erzeugen'; $lang['import_notify_fail'] = 'Benachrichtigung konnte an Benutzer %s (%s) nicht geschickt werden.'; +$lang['import_downloadfailures'] = 'Fehler als CSV-Datei zur Korrektur herunterladen'; +$lang['addUser_error_missing_pass'] = 'Bitte setze entweder ein Passwort oder aktiviere die Benutzerbenachrichtigung, um die Passwortgenerierung zu ermöglichen.'; +$lang['addUser_error_pass_not_identical'] = 'Die eingegebenen Passwörter stimmen nicht überein.'; +$lang['addUser_error_modPass_disabled'] = 'Das Bearbeiten von Passwörtern ist momentan deaktiviert'; +$lang['addUser_error_name_missing'] = 'Bitte gib den Namen des neuen Benutzer ein.'; +$lang['addUser_error_modName_disabled'] = 'Das Bearbeiten von Namen ist momentan deaktiviert.'; +$lang['addUser_error_mail_missing'] = 'Bitte gib die E-Mail-Adresse des neuen Benutzer ein.'; +$lang['addUser_error_modMail_disabled'] = 'Das Bearbeiten von E-Mailadressen ist momentan deaktiviert.'; +$lang['addUser_error_create_event_failed'] = 'Ein Plug-in hat das Hinzufügen des neuen Benutzers verhindert. Für weitere Informationen sieh dir mögliche andere Meldungen an.'; diff --git a/lib/plugins/usermanager/lang/eo/lang.php b/lib/plugins/usermanager/lang/eo/lang.php index ff7818e05b5cbea2b6925f8ebbef1ae94da3baf5..5a11e73e4f9c2cb09c6810308239918e94045ba7 100644 --- a/lib/plugins/usermanager/lang/eo/lang.php +++ b/lib/plugins/usermanager/lang/eo/lang.php @@ -2,16 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Felipe Castro <fefcas@uol.com.br> - * @author Felipe Castro <fefcas@gmail.com> - * @author Felipe Castro <fefcas (cxe) gmail (punkto) com> * @author Felipo Kastro <fefcas@gmail.com> * @author Robert Bogenschneider <robog@gmx.de> * @author Erik Pedersen <erik pedersen@shaw.ca> - * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Robert Bogenschneider <bogi@uea.org> - * @author Felipe Castro <fefcas@yahoo.com.br> */ $lang['menu'] = 'Administrado de uzantoj'; $lang['noauth'] = '(identiÄo de uzantoj ne disponeblas)'; diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index d1db76c2345e9c075b7dd73aa525695134250061..f2deac392a4abeb56c3ac5eb8527ed58228b6c40 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -13,9 +13,7 @@ * @author Vincent Feltz <psycho@feltzv.fr> * @author Philippe Bajoit <philippe.bajoit@gmail.com> * @author Florian Gaub <floriang@floriang.net> - * @author Samuel Dorsaz samuel.dorsaz@novelion.net * @author Johan Guilbaud <guilbaud.johan@gmail.com> - * @author skimpax@gmail.com * @author Yannick Aure <yannick.aure@gmail.com> * @author Olivier DUVAL <zorky00@gmail.com> * @author Anael Mobilia <contrib@anael.eu> @@ -28,7 +26,7 @@ */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification de l\'utilisateur non disponible)'; -$lang['nosupport'] = '(gestion de l\'utilisateur non supportée)'; +$lang['nosupport'] = '(gestion de l\'utilisateur non pris en charge)'; $lang['badauth'] = 'mécanisme d\'authentification invalide'; $lang['user_id'] = 'Identifiant '; $lang['user_pass'] = 'Mot de passe '; diff --git a/lib/plugins/usermanager/lang/he/lang.php b/lib/plugins/usermanager/lang/he/lang.php index 18202584e7e1b77a83a56aecff6f7f6b3e36cfb6..719fd901fd9b1ff0b1f20ce3a9b26f1d2107c8d0 100644 --- a/lib/plugins/usermanager/lang/he/lang.php +++ b/lib/plugins/usermanager/lang/he/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author DoK <kamberd@yahoo.com> - * @author Dotan Kamber <kamberd@yahoo.com> * @author Moshe Kaplan <mokplan@gmail.com> * @author Yaron Yogev <yaronyogev@gmail.com> * @author Yaron Shahrabani <sh.yaron@gmail.com> diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index a4834f51624e63f6bcdb2d28bed5f37fea3d95be..c1a315a01d03009a83a8427754b1c78d8d6c995e 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -6,15 +6,10 @@ * @author Chris Smith <chris@jalakai.co.uk> * @author Silvia Sargentoni <polinnia@tin.it> * @author Pietro Battiston toobaz@email.it - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda <lbreda@gmail.com> - * @author snarchio@alice.it * @author robocap <robocap1@gmail.com> - * @author Osman Tekin osman.tekin93@hotmail.it * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author snarchio@gmail.com * @author Claudio Lanconelli <lancos@libero.it> * @author Francesco <francesco.cavalli@hotmail.com> * @author Fabio <fabioslurp@yahoo.it> diff --git a/lib/plugins/usermanager/lang/lv/lang.php b/lib/plugins/usermanager/lang/lv/lang.php index 4944da31ec97757039a9d5d7d8752942888f6f0b..bb110569f47b092f19dfba08c3dd0833f9331df3 100644 --- a/lib/plugins/usermanager/lang/lv/lang.php +++ b/lib/plugins/usermanager/lang/lv/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aivars MiÅ¡ka <allefm@gmail.lv> - * @author Aivars MiÅ¡ka <allefm@gmail.com> */ $lang['menu'] = 'LietotÄju pÄrvaldnieks'; $lang['noauth'] = '(lietotÄju autentifikÄcijas nav)'; diff --git a/lib/plugins/usermanager/lang/nl/lang.php b/lib/plugins/usermanager/lang/nl/lang.php index 8233d86633bcc40f4029d4e155c90c7cff084c46..d6afc5488279961570efc993964efa2e0aa5012f 100644 --- a/lib/plugins/usermanager/lang/nl/lang.php +++ b/lib/plugins/usermanager/lang/nl/lang.php @@ -9,10 +9,8 @@ * @author Dion Nicolaas <dion@nicolaas.net> * @author Danny Rotsaert <danny.rotsaert@edpnet.be> * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> - * @author Jeroen * @author Ricardo Guijt <ricardoguijt@gmail.com> * @author Gerrit Uitslag <klapinklapin@gmail.com> * @author Rene <wllywlnt@yahoo.com> diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php index fb0ddd7d66db4a9240ecbe972bfb2be51b09f097..47071d967ee2d389792d9771cd5913ddd1a22175 100644 --- a/lib/plugins/usermanager/lang/pl/lang.php +++ b/lib/plugins/usermanager/lang/pl/lang.php @@ -3,11 +3,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Max <maxrb146@gmail.com> * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> * @author SÅ‚awomir Boczek <slawkens@gmail.com> - * @author sleshek@wp.pl + * @author sleshek <sleshek@wp.pl> * @author Leszek Stachowski <shazarre@gmail.com> * @author maros <dobrimaros@yahoo.pl> * @author Grzegorz WidÅ‚a <dzesdzes@gmail.com> @@ -36,6 +37,11 @@ $lang['search'] = 'Szukaj'; $lang['search_prompt'] = 'Rozpocznij przeszukiwanie'; $lang['clear'] = 'Resetuj filtr przeszukiwania'; $lang['filter'] = 'Filtr'; +$lang['export_all'] = 'Eksportuj wszystkich użytkowników (CSV)'; +$lang['export_filtered'] = 'Eksportuj wyfiltrowanÄ… listÄ™ użytkowników (CSV) '; +$lang['import'] = 'Importuj nowych użytkowników'; +$lang['line'] = 'Numer linii'; +$lang['error'] = 'Błędna wiadomość'; $lang['summary'] = 'Użytkownicy %1$d-%2$d z %3$d znalezionych. CaÅ‚kowita ilość użytkowników %4$d.'; $lang['nonefound'] = 'Nie znaleziono użytkowników. CaÅ‚kowita ilość użytkowników %d.'; $lang['delete_ok'] = 'UsuniÄ™to %d użytkowników.'; @@ -56,3 +62,15 @@ $lang['add_ok'] = 'Dodano użytkownika'; $lang['add_fail'] = 'Dodawanie użytkownika nie powiodÅ‚o siÄ™'; $lang['notify_ok'] = 'Powiadomienie zostaÅ‚o wysÅ‚ane'; $lang['notify_fail'] = 'WysyÅ‚anie powiadomienia nie powiodÅ‚o siÄ™'; +$lang['import_userlistcsv'] = 'Plik z listÄ… użytkowników (CSV):'; +$lang['import_error_baduserid'] = 'Brak id użytkownika'; +$lang['import_error_badname'] = 'Błędna nazwa'; +$lang['import_error_badmail'] = 'Błędny email'; +$lang['import_error_readfail'] = 'Åadownie przerwane. Nie można odczytać pliku. '; +$lang['import_error_create'] = 'Nie można utworzyć użytkownika'; +$lang['addUser_error_pass_not_identical'] = 'Wprowadzone różne hasÅ‚a '; +$lang['addUser_error_modPass_disabled'] = 'Modyfikacja haseÅ‚ zostaÅ‚a wyłączona'; +$lang['addUser_error_name_missing'] = 'Wprowadź nazwÄ™ dla nowego użytkownika'; +$lang['addUser_error_modName_disabled'] = 'Modyfikacja nazw zostaÅ‚a wyłączona '; +$lang['addUser_error_mail_missing'] = 'Wprowadź adres email dla nowego użytkownika'; +$lang['addUser_error_modMail_disabled'] = 'Modyfikacja adresów email zostaÅ‚a wyłączona '; diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index 32ce109af7142229a166d6e140220e3e10d4d260..ac439602211ea40a418f38b6a5b0f859cba9cbea 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -8,7 +8,6 @@ * @author Змей ÐтерийÑкий evil_snake@eternion.ru * @author Hikaru Nakajima <jisatsu@mail.ru> * @author Alexei Tereschenko <alexeitlex@yahoo.com> - * @author Irina Ponomareva irinaponomareva@webperfectionist.com * @author Alexander Sorkin <kibizoid@gmail.com> * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> @@ -17,9 +16,7 @@ * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Pavel <ivanovtsk@mail.ru> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Igor Degraf <igordegraf@gmail.com> * @author Vitaly Filatenko <kot@hacktest.net> * @author dimsharav <dimsharav@gmail.com> diff --git a/lib/plugins/usermanager/lang/sv/lang.php b/lib/plugins/usermanager/lang/sv/lang.php index c65a7d8801b723d3f93f6f91a40c4b621cdf220e..f8ff9108b55b2400e76b4ac41acd29ad120c7772 100644 --- a/lib/plugins/usermanager/lang/sv/lang.php +++ b/lib/plugins/usermanager/lang/sv/lang.php @@ -3,20 +3,16 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> * @author HÃ¥kan Sandell <hakan.sandell@home.se> * @author Dennis Karlsson * @author Tormod Otter Johansson <tormod@latast.se> - * @author emil@sys.nu * @author Pontus Bergendahl <pontus.bergendahl@gmail.com> - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind <emil@sys.nu> * @author Bogge Bogge <bogge@bogge.com> * @author Peter Ã…ström <eaustreum@gmail.com> - * @author mikael@mallander.net - * @author Smorkster Andersson smorkster@gmail.com - * @author Tor Härnqvist <tor.harnqvist@gmail.com> */ $lang['menu'] = 'Hantera användare'; $lang['noauth'] = '(användarautentisering ej tillgänlig)'; @@ -63,6 +59,7 @@ $lang['add_ok'] = 'Användaren tillagd'; $lang['add_fail'] = 'Användare kunde inte läggas till'; $lang['notify_ok'] = 'E-postmeddelande skickat'; $lang['notify_fail'] = 'E-postmeddelande kunde inte skickas'; +$lang['import_userlistcsv'] = 'Fillista över användare (CSV):'; $lang['import_success_count'] = 'Användar-import: %d användare funna, %d importerade framgÃ¥ngsrikt.'; $lang['import_failure_count'] = 'Användar-import: %d misslyckades. Misslyckandena listas nedan.'; $lang['import_error_baduserid'] = 'Användar-id saknas'; @@ -71,3 +68,6 @@ $lang['import_error_badmail'] = 'Felaktig e-postadress'; $lang['import_error_upload'] = 'Import misslyckades. Csv-filen kunde inte laddas upp eller är tom.'; $lang['import_error_readfail'] = 'Import misslyckades. Den uppladdade filen gick inte att läsa.'; $lang['import_error_create'] = 'Misslyckades att skapa användaren.'; +$lang['addUser_error_pass_not_identical'] = 'De angivna lösenorden var inte identiska.'; +$lang['addUser_error_name_missing'] = 'Var god fyll i namn pÃ¥ den nya användaren.'; +$lang['addUser_error_mail_missing'] = 'Var god fyll i e-postadress för den nya användaren.'; diff --git a/lib/plugins/usermanager/lang/uk/lang.php b/lib/plugins/usermanager/lang/uk/lang.php index 3afb7b7d6f866b1e5b90726cd22a53d18a72c76a..36b6f740799c4589a8c4fa05f03e929bee72957c 100644 --- a/lib/plugins/usermanager/lang/uk/lang.php +++ b/lib/plugins/usermanager/lang/uk/lang.php @@ -2,13 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Oleksiy Voronin <ovoronin@gmail.com> - * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com + * @author serg_stetsuk <serg_stetsuk@ukr.net> * @author Oleksandr Kunytsia <okunia@gmail.com> - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie <lukoie@gmail>.com */ $lang['menu'] = 'ÐšÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ¾Ñ€Ð¸Ñтувачами'; $lang['noauth'] = '(Ð°Ð²Ñ‚ÐµÐ½Ñ‚Ð¸Ñ„Ñ–ÐºÐ°Ñ†Ñ–Ñ ÐºÐ¾Ñ€Ð¸Ñтувачів не доÑтупна)'; diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php index 8f7e4fe04df9a3d2eaa4e66ec72bcd2f99a24651..5e9aa77b623c5e6856bd803ebfa134e1ee234a3b 100644 --- a/lib/plugins/usermanager/lang/zh/lang.php +++ b/lib/plugins/usermanager/lang/zh/lang.php @@ -5,15 +5,11 @@ * * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com * @author Simon zhan <simonzhan@21cn.com> - * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> * @author caii <zhoucaiqi@gmail.com> * @author Hiphen Lee <jacob.b.leung@gmail.com> - * @author caii, patent agent in China <zhoucaiqi@gmail.com> - * @author lainme993@gmail.com * @author Shuo-Ting Jian <shoting@gmail.com> * @author Rachel <rzhang0802@gmail.com> * @author Yangyu Huang <yangyu.huang@gmail.com> diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 5fddb0431de209770ab0ef3900065f51cf18629c..97edef0b7c64d95ad6794c74abd6f2b212de17a0 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -18,39 +18,6 @@ if (clientPC.indexOf('opera')!=-1) { var is_opera_seven = (window.opera && document.childNodes); } -/** - * Prints a animated gif to show the search is performed - * - * Because we need to modify the DOM here before the document is loaded - * and parsed completely we have to rely on document.write() - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function showLoadBar(){ - - document.write('<img src="'+DOKU_BASE+'lib/images/loading.gif" '+ - 'width="150" height="12" alt="..." />'); - - /* this does not work reliable in IE - obj = $(id); - - if(obj){ - obj.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" '+ - 'width="150" height="12" alt="..." />'; - obj.style.display="block"; - } - */ -} - -/** - * Disables the animated gif to show the search is done - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function hideLoadBar(id){ - jQuery('#' + id).hide(); -} - /** * Handler to close all open Popups */ diff --git a/lib/styles/all.css b/lib/styles/all.css index ff4bd245792a3c62b4b57cd7faa6550e1116eacc..1ae9a02c587fdbdb50acbd709368cfb7513ec512 100644 --- a/lib/styles/all.css +++ b/lib/styles/all.css @@ -54,6 +54,9 @@ div.no { .leftalign { text-align: left; } .centeralign { text-align: center; } .rightalign { text-align: right; } +[dir=rtl] .leftalign { text-align: left; } +[dir=rtl] .centeralign { text-align: center; } +[dir=rtl] .rightalign { text-align: right; } /* underline */ em.u { diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index 694f9aa92b5360e92d752b3c4296f57af67818b3..89f671b7c69568fa004cf2f272e8abd29a5d16fc 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -106,84 +106,10 @@ margin-left: 0; } -#dokuwiki__usertools a.action, -#dokuwiki__usertools a.iw_user { - padding-left: 20px; - background: transparent url(images/usertools.png) no-repeat 0 0; -} - -[dir=rtl] #dokuwiki__usertools a.action { - padding-left: 0; - padding-right: 20px; -} - #dokuwiki__header .mobileTools { display: none; /* hide mobile tools dropdown to only show in mobile view */ } -/*____________ user tools ____________*/ - -#dokuwiki__usertools { - position: absolute; - top: .5em; - right: .5em; - text-align: right; - width: 100%; - - ul { - margin: 0 auto; - padding: 0; - max-width: @ini_site_width; - } - - a.action.admin { - background-position: left 0; - } - - a.iw_user, - a.action.profile { - background-position: left -32px; - } - - a.action.register { - background-position: left -64px; - } - - a.action.login { - background-position: left -96px; - } - - a.action.logout { - background-position: left -128px; - } -} - -[dir=rtl] #dokuwiki__usertools { - text-align: left; - left: 40px; - right: auto; - - a.action.admin { - background-position: right 0; - } - - a.action.profile { - background-position: right -32px; - } - - a.action.register { - background-position: right -64px; - } - - a.action.login { - background-position: right -96px; - } - - a.action.logout { - background-position: right -128px; - } -} - /*____________ site tools ____________*/ #dokuwiki__sitetools { diff --git a/lib/tpl/dokuwiki/css/pagetools.less b/lib/tpl/dokuwiki/css/pagetools.less index f441a13638d7db0383c7e0bf44994fcd25941f13..2aaf0b978d94ca3787b038488931d0e67f0bfc3b 100644 --- a/lib/tpl/dokuwiki/css/pagetools.less +++ b/lib/tpl/dokuwiki/css/pagetools.less @@ -13,203 +13,112 @@ /* give the same space to the left to balance it out */ padding-left: 40px; } + .dokuwiki div.page { height: 190px; min-height: 190px; /* 30 (= height of icons) x 6 (= maximum number of possible tools) + 2x5 */ height: auto; } -#dokuwiki__usertools { - /* move the tools just outside of the site */ - right: 40px; -} -[dir=rtl] #dokuwiki__usertools { - right: auto; - left: 40px; -} - #dokuwiki__pagetools { + @ico-width: 28px; + @ico-margin: 8px; + @item-width: (@ico-width + @ico-margin + @ico-margin); + @item-height: (@ico-width + @ico-margin); + position: absolute; - right: -40px; + right: (-1 * @item-width); /* on same vertical level as first headline, because .page has 2em padding */ top: 2em; - width: 40px; -} -[dir=rtl] #dokuwiki__pagetools { - right: auto; - left: -40px; -} - -#dokuwiki__pagetools div.tools { - position: fixed; - width: 40px; -} - -#dokuwiki__pagetools ul { - position: absolute; - right: 0; - text-align: right; - margin: 0; - padding: 0; - /* add transparent border to prevent jumping when proper border is added on hover */ - border: 1px solid transparent; - z-index: 10; -} -[dir=rtl] #dokuwiki__pagetools ul { - right: auto; - left: 0; - text-align: left; -} - -#dokuwiki__pagetools ul li { - padding: 0; - margin: 0; - list-style: none; - font-size: 0.875em; -} - -#dokuwiki__pagetools ul li a { - display: block; - min-height: 20px; /* 30 - 2x5 */ - line-height: 20px; - padding: 0; - background-position: right 0; - background-repeat: no-repeat; - /* add transparent border to prevent jumping when proper border is added on focus */ - border: 1px solid transparent; - white-space: nowrap; - width: 30px; - height: 30px; - overflow: hidden; - margin-left: auto; /* align right if the ul is larger because one item is focused */ -} - -#dokuwiki__pagetools ul li a:before { - content: url(images/pagetools-sprite.png?v=2); - display: inline-block; - font-size: 0; - line-height: 0; -} - -[dir=rtl] #dokuwiki__pagetools ul li a { - background-position: left 0; - margin-right: auto; - margin-left: 0; -} - -/* show all tools on hover and individual tools on focus */ -#dokuwiki__pagetools:hover ul, -#dokuwiki__pagetools ul li a:focus, -#dokuwiki__pagetools ul li a:active { - background-color: @ini_background; - border-color: @ini_border; - border-radius: 2px; - box-shadow: 2px 2px 2px @ini_text_alt; -} - -#dokuwiki__pagetools:hover ul li a, -#dokuwiki__pagetools ul li a:focus, -#dokuwiki__pagetools ul li a:active { - width: auto; - height: auto; - overflow: visible; - padding: 5px 40px 5px 5px; - background-image: url(images/pagetools-sprite.png?v=2); -} - -#dokuwiki__pagetools:hover ul li a:before, -#dokuwiki__pagetools ul li a:focus:before { - content: none; -} - -[dir=rtl] #dokuwiki__pagetools:hover ul, -[dir=rtl] #dokuwiki__pagetools ul li a:focus { - box-shadow: -2px 2px 2px @ini_text_alt; -} - -[dir=rtl] #dokuwiki__pagetools:hover li a, -[dir=rtl] #dokuwiki__pagetools ul li a:focus, -[dir=rtl] #dokuwiki__pagetools ul li a:active { - padding: 5px 5px 5px 40px; -} - -#dokuwiki__pagetools ul li a:hover, -#dokuwiki__pagetools ul li a:active, -#dokuwiki__pagetools ul li a:focus { - text-decoration: none; -} -#dokuwiki__pagetools ul li a:hover { - background-color: @ini_background_alt; -} - -/*____________ all available icons in sprite ____________*/ - -@pagetools_icon_space: -90px; - -/** - * page tools without highlighting - * - * @param string @action The action class - * @param int @position Position in the page tools sprite - */ -.pagetools-item(@action, @position) { - @position-active: (@position+0.5); - - #dokuwiki__pagetools ul li a.@{action} { - background-position: right @pagetools_icon_space * @position; - - &:before { - margin-top: @pagetools_icon_space * @position; - } - &:hover, - &:active, - &:focus { - background-position: right @pagetools_icon_space * @position-active; + width: @item-width; + + div.tools { + position: fixed; + width: @item-width; + + ul { + position: absolute; + right: 0; + text-align: right; + margin: 0; + padding: 0; + /* add transparent border to prevent jumping when proper border is added on hover */ + border: 1px solid transparent; + z-index: 10; + + li { + padding: 0; + margin: 0; + list-style: none; + font-size: 0.875em; + + a { + + display: block; + /* add transparent border to prevent jumping when proper border is added on focus */ + border: 1px solid transparent; + white-space: nowrap; + line-height: @item-height; + vertical-align: middle; + height: @item-height; + + span { + display: none; // hide label until hover + margin: 0 @ico-margin; + } + + svg { + width: @ico-width; + height: @ico-width; + margin: 0 @ico-margin; + display: inline-block; + vertical-align: middle; + fill: @ini_border; + } + } + + // on interaction show the full item + a:active, + a:focus, + a:hover { + background-color: @ini_background_alt; + + span { + display: inline-block; + } + + svg { + fill: @ini_link; + } + } + } } } - [dir=rtl] #dokuwiki__pagetools ul li a.@{action} { - background-position: left @pagetools_icon_space * @position; - &:hover, - &:active, - &:focus { - background-position: left @pagetools_icon_space * @position-active; + [dir=rtl] & { + right: auto; + left: (-1 * @item-width); + + div.tools { + ul { + right: auto; + left: 0; + text-align: left; + } } } } -/** - * page tools with highlighting - * - * @param string @action The action class - * @param int @position Position in the page tools sprite - * @param string @mode The mode in which this tool should be highlighted - */ -.pagetools-item(@action, @position, @mode) { - .pagetools-item(@action, @position); - @position-active: (@position+0.5); - - .mode_@{mode} #dokuwiki__pagetools ul li a.@{action} { - background-position: right @pagetools_icon_space * @position-active; - &:before { - margin-top: @pagetools_icon_space * @position-active; +// on hover show all items +#dokuwiki__pagetools:hover { + div.tools ul { + background-color: @ini_background; + border-color: @ini_border; + border-radius: 2px; + box-shadow: 2px 2px 2px @ini_text_alt; + + li a span { + display: inline-block; + } } - } - [dir=rtl] .mode_@{mode} #dokuwiki__pagetools ul li a.@{action} { - background-position: left @pagetools_icon_space * @position-active; - } } - -.pagetools-item(edit, 1); -.pagetools-item(create, 2); -.pagetools-item(show, 4); -.pagetools-item(source, 5); -.pagetools-item(draft, 3); -.pagetools-item(revs, 7, revisions); -.pagetools-item(backlink, 8, backlink); -.pagetools-item(top, 10); -.pagetools-item(revert, 6, revert); -.pagetools-item(subscribe, 9, subscribe); -.pagetools-item(mediaManager, 11); -.pagetools-item(back, 12); -.pagetools-item(img_backto, 12); diff --git a/lib/tpl/dokuwiki/css/usertools.less b/lib/tpl/dokuwiki/css/usertools.less new file mode 100644 index 0000000000000000000000000000000000000000..efdf16c0ecbae2893f4288e2b1cae7d825ea1a3c --- /dev/null +++ b/lib/tpl/dokuwiki/css/usertools.less @@ -0,0 +1,50 @@ +#dokuwiki__usertools { + position: absolute; + top: .5em; + right: 40px; // pagetool width + text-align: right; + width: 100%; + + ul { + margin: 0 auto; + padding: 0; + max-width: @ini_site_width; + } + + li.action a { + display: inline-flex; + flex-direction: row-reverse; + flex-wrap: nowrap; + + svg { + height: 1.4em; + width: 1.4em; + vertical-align: middle; + fill: @ini_border; + margin-right: 0.2em; + } + } + + li.action a:hover, + li.action a:active { + svg { + fill: @ini_link; + } + } + +} + +[dir=rtl] #dokuwiki__usertools { + text-align: left; + left: 40px; // pagetool width + right: auto; + + + li.action a { + + svg { + margin-right: 0; + margin-left: 0.2em; + } + } +} diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index c26d81cb72b34c1af1fb0b36c02442072b3e8bd2..8e65410d71ba0036ab4414d449e5e0a17172f3b4 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -92,24 +92,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3> <div class="tools"> <ul> - <?php - $data = array( - 'view' => 'detail', - 'items' => array( - 'mediaManager' => tpl_action('mediaManager', true, 'li', true, '<span>', '</span>'), - 'img_backto' => tpl_action('img_backto', true, 'li', true, '<span>', '</span>'), - ) - ); - - // the page tools can be amended through a custom plugin hook - $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); - if($evt->advise_before()) { - foreach($evt->data['items'] as $k => $html) echo $html; - } - $evt->advise_after(); - unset($data); - unset($evt); - ?> + <?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?> </ul> </div> </div> diff --git a/lib/tpl/dokuwiki/lang/de-informal/lang.php b/lib/tpl/dokuwiki/lang/de-informal/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..d8c35833aa0da998b020febf22feb56dea2e6e4c --- /dev/null +++ b/lib/tpl/dokuwiki/lang/de-informal/lang.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author F. Mueller-Donath <j.felix@mueller-donath.de> + */ +$lang['__background_site__'] = 'Farbe für den Seitenhintergrund (hinter dem Inhaltsbereich)'; +$lang['__link__'] = 'Allgemeine Linkfarbe'; +$lang['__existing__'] = 'Farbe für Links zu existierenden Seiten'; +$lang['__missing__'] = 'Farbe für Links zu nicht-existierenden Seiten'; +$lang['__site_width__'] = 'Breite der ganzen Seite (kann eine beliebige Längeneinheit sein: %, px, em, ...)'; +$lang['__sidebar_width__'] = 'Breite der Seitenleiste, falls vorhanden (kann eine beliebige Längeneinheit sein: %, px, em, ...)'; +$lang['__tablet_width__'] = 'Unter dieser Fensterbreite wechselt die Seite in den Tabletmodus'; +$lang['__phone_width__'] = 'Unter dieser Fensterbreite wechselt die Seite in den Handymodus'; diff --git a/lib/tpl/dokuwiki/lang/de-informal/style.txt b/lib/tpl/dokuwiki/lang/de-informal/style.txt new file mode 100644 index 0000000000000000000000000000000000000000..b2470034e55ea796870ee8275530798750dc6fe8 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/de-informal/style.txt @@ -0,0 +1 @@ +Benutze einfach den Medien-Manager, um ein ''logo.png'' in den ''wiki''- oder obersten Namensraum hochzuladen, wenn du das Logo anpassen willst. Es wird dann automatisch als Logo verwendet. Alternativ kannst du dort auch ein 'favicon.ico'' hochladen. Falls du ein geschlossenes Wiki betreibst, ist es empfehlenswert, den ''wiki''- (oder Wurzel-)Namensraum für alle Nutzer in den ACL-Einstellungen als lesbar zu öffnen. Ansonsten wird das Logo nur für eingeloggte Nutzer angezeigt. \ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/fr/style.txt b/lib/tpl/dokuwiki/lang/fr/style.txt index 876f116c9ac0177e81ccf8949342c8254e1933d3..9034cbc531c0a30a9f697c6d2337ecb819f56b9f 100644 --- a/lib/tpl/dokuwiki/lang/fr/style.txt +++ b/lib/tpl/dokuwiki/lang/fr/style.txt @@ -1 +1 @@ -Si vous souhaitez modifier le logo, utilisez simplement le gestionnaire de médias et envoyez un fichier nommé "logo.png" dans l'espace de nom "wiki" ou à la racine. Il sera automatiquement utilisé. Il en est de même pour le "favicon.ico". Si vous utilisez un wiki fermé, il est recommandé de régler les ACL de la racine ou de l'espace de nom "wiki" pour rendre ces images visibles aux utilisateurs non connectés. \ No newline at end of file +Si vous souhaitez modifier le logo, utilisez simplement le gestionnaire de médias et envoyez un fichier nommé "logo.png" dans la catégorie "wiki" ou à la racine. Il sera automatiquement utilisé. Il en est de même pour le "favicon.ico". Si vous utilisez un wiki fermé, il est recommandé de régler les ACL de la racine ou de la catégorie "wiki" pour rendre ces images visibles aux utilisateurs non connectés. \ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/sv/lang.php b/lib/tpl/dokuwiki/lang/sv/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..6fdf4238bf76ececbb97bfacac52b1cee6136cc3 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/sv/lang.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Tor Härnqvist <tor@harnqvist.se> + */ +$lang['__link__'] = 'Den generella länkfärgen'; +$lang['__existing__'] = 'Färg pÃ¥ länkar till existerande sidor'; +$lang['__missing__'] = 'Färg pÃ¥ länkar till sidor som inte finns'; +$lang['__site_width__'] = 'Bredden pÃ¥ hela webbsidan (kan anges i valfri längdenhet: %, px, em, ...)'; +$lang['__sidebar_width__'] = 'Bredden pÃ¥ sidokolumnen, om existerande (kan anges i valfri längdenhet: %, px, em, ...)'; diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index d095ccf4f259e8a28d676a0ff2979b6c93c0349f..2d2151f9c496f4e41127d1580ce933d041dba6ad 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -73,28 +73,7 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3> <div class="tools"> <ul> - <?php - $data = array( - 'view' => 'main', - 'items' => array( - 'edit' => tpl_action('edit', true, 'li', true, '<span>', '</span>'), - 'revert' => tpl_action('revert', true, 'li', true, '<span>', '</span>'), - 'revisions' => tpl_action('revisions', true, 'li', true, '<span>', '</span>'), - 'backlink' => tpl_action('backlink', true, 'li', true, '<span>', '</span>'), - 'subscribe' => tpl_action('subscribe', true, 'li', true, '<span>', '</span>'), - 'top' => tpl_action('top', true, 'li', true, '<span>', '</span>') - ) - ); - - // the page tools can be amended through a custom plugin hook - $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); - if($evt->advise_before()){ - foreach($evt->data['items'] as $k => $html) echo $html; - } - $evt->advise_after(); - unset($data); - unset($evt); - ?> + <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?> </ul> </div> </div> diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini index b4432710b60c0e2e72d018901338f255dee42f54..892a6a6e546687a537bcd0330611bce23d60bdec 100644 --- a/lib/tpl/dokuwiki/style.ini +++ b/lib/tpl/dokuwiki/style.ini @@ -34,6 +34,7 @@ css/_forms.css = screen css/_admin.less = screen css/structure.less = screen css/design.less = screen +css/usertools.less = screen css/pagetools.less = screen css/content.less = screen @@ -67,12 +68,14 @@ __border__ = "#ccc" ; @ini_border ; highlighted text (e.g. search snippets) __highlight__ = "#ff9" ; @ini_highlight +; default link color +__link__ = "#2b73b7" ; @ini_link + ;-------------------------------------------------------------------------- __background_site__ = "#fbfaf9" ; @ini_background_site -; these are used for links -__link__ = "#2b73b7" ; @ini_link +; these are used for wiki links __existing__ = "#080" ; @ini_existing __missing__ = "#d30" ; @ini_missing diff --git a/lib/tpl/dokuwiki/tpl_footer.php b/lib/tpl/dokuwiki/tpl_footer.php index fa87c610b796ce4995a1a44d62c069aaba5d546d..34e8b90f664ebd34fb7f840c05d3f77ccb8ddd8b 100644 --- a/lib/tpl/dokuwiki/tpl_footer.php +++ b/lib/tpl/dokuwiki/tpl_footer.php @@ -16,15 +16,15 @@ if (!defined('DOKU_INC')) die(); tpl_license('button', true, false, false); // license button, no wrapper $target = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : ''; ?> - <a href="http://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img + <a href="https://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-donate.gif" width="80" height="15" alt="Donate" /></a> - <a href="http://php.net" title="Powered by PHP" <?php echo $target?>><img + <a href="https://php.net" title="Powered by PHP" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a> - <a href="http://validator.w3.org/check/referer" title="Valid HTML5" <?php echo $target?>><img + <a href="//validator.w3.org/check/referer" title="Valid HTML5" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a> - <a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img + <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-css.png" width="80" height="15" alt="Valid CSS" /></a> - <a href="http://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img + <a href="https://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a> </div> </div></div><!-- /footer --> diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php index 5b092c5644819d164223f08289379f4e7f7779e0..bb8732bdc994a5ba418ce0ebd4a4a19b111e8b8d 100644 --- a/lib/tpl/dokuwiki/tpl_header.php +++ b/lib/tpl/dokuwiki/tpl_header.php @@ -46,12 +46,7 @@ if (!defined('DOKU_INC')) die(); tpl_userinfo(); /* 'Logged in as ...' */ echo '</li>'; } - tpl_toolsevent('usertools', array( - tpl_action('admin', true, 'li', true), - tpl_action('profile', true, 'li', true), - tpl_action('register', true, 'li', true), - tpl_action('login', true, 'li', true) - )); + echo (new \dokuwiki\Menu\UserMenu())->getListItems('action '); ?> </ul> </div> @@ -62,16 +57,10 @@ if (!defined('DOKU_INC')) die(); <h3 class="a11y"><?php echo $lang['site_tools']; ?></h3> <?php tpl_searchform(); ?> <div class="mobileTools"> - <?php tpl_actiondropdown($lang['tools']); ?> + <?php echo (new \dokuwiki\Menu\MobileMenu())->getDropdown($lang['tools']); ?> </div> <ul> - <?php - tpl_toolsevent('sitetools', array( - tpl_action('recent', true, 'li', true), - tpl_action('media', true, 'li', true), - tpl_action('index', true, 'li', true) - )); - ?> + <?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?> </ul> </div> diff --git a/lib/tpl/index.php b/lib/tpl/index.php index 558f262a7ad4fa090234db761ab67d2048764022..fb368840e6ceee26e5b7499954301b108138f16c 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -50,11 +50,11 @@ $ini = css_styleini($conf['template']); if ($ini) { echo '<table>'; - echo "<caption>".htmlspecialchars($conf['template'])."'s style.ini</caption>"; + echo "<caption>".hsc($conf['template'])."'s style.ini</caption>"; foreach($ini['replacements'] as $key => $val){ echo '<tr>'; - echo '<td>'.htmlspecialchars($key).'</td>'; - echo '<td>'.htmlspecialchars($val).'</td>'; + echo '<td>'.hsc($key).'</td>'; + echo '<td>'.hsc($val).'</td>'; echo '<td>'; if(preg_match('/^#[0-f]{3,6}$/i',$val)){ echo '<div class="color" style="background-color:'.$val.';"> </div>'; @@ -64,7 +64,7 @@ if ($ini) { } echo '</table>'; } else { - echo "<p>Non-existent or invalid template or style.ini: <strong>".htmlspecialchars($conf['template'])."</strong></p>"; + echo "<p>Non-existent or invalid template or style.ini: <strong>".hsc($conf['template'])."</strong></p>"; } ?> </body> diff --git a/vendor/.htaccess b/vendor/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..5f279f180699c2f115c326319a8afc645c5a7245 --- /dev/null +++ b/vendor/.htaccess @@ -0,0 +1,7 @@ +<IfModule mod_authz_host> + Require all denied +</IfModule> +<IfModule !mod_authz_host> + Order allow,deny + Deny from all +</IfModule> diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 2baad22d947444b741b34ac99ce74fe9566d3297..538036724cf34215e03a61c1074b299b3371b678 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -27,4 +27,9 @@ return array( 'RSSCreator10' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/RSSCreator10.php', 'RSSCreator20' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/RSSCreator20.php', 'UniversalFeedCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/UniversalFeedCreator.php', + 'lessc' => $vendorDir . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_classic' => $vendorDir . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_compressed' => $vendorDir . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_lessjs' => $vendorDir . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_parser' => $vendorDir . '/marcusschwarz/lesserphp/lessc.inc.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 0f99dcf870f1f4510b0b60692dca0443d33fcd8c..55787b617c12cf4273b4fe261cdee98160ee976b 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', + 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 2e2f8c4563cd3650f3e38cdc31da04989e7cfa79..d22d6d13cb9f9e0aff5960a258dad26acaa07631 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -7,8 +7,8 @@ namespace Composer\Autoload; class ComposerStaticInita19a915ee98347a0c787119619d2ff9b { public static $files = array ( - 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', + 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); public static $prefixLengthsPsr4 = array ( @@ -72,6 +72,11 @@ class ComposerStaticInita19a915ee98347a0c787119619d2ff9b 'RSSCreator10' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Creator/RSSCreator10.php', 'RSSCreator20' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Creator/RSSCreator20.php', 'UniversalFeedCreator' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/UniversalFeedCreator.php', + 'lessc' => __DIR__ . '/..' . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_classic' => __DIR__ . '/..' . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_compressed' => __DIR__ . '/..' . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_formatter_lessjs' => __DIR__ . '/..' . '/marcusschwarz/lesserphp/lessc.inc.php', + 'lessc_parser' => __DIR__ . '/..' . '/marcusschwarz/lesserphp/lessc.inc.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 6be86c9da18ee4a83ce63552e9e61949fa376a0f..3912629188c3c83906169aafa25026af0b6d4046 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,160 +1,4 @@ [ - { - "name": "phpseclib/phpseclib", - "version": "2.0.4", - "version_normalized": "2.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "~4.0", - "sami/sami": "~2.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." - }, - "time": "2016-10-04T00:57:04+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "phpseclib/bootstrap.php" - ], - "psr-4": { - "phpseclib\\": "phpseclib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "role": "Developer" - } - ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ] - }, - { - "name": "simplepie/simplepie", - "version": "1.4.3", - "version_normalized": "1.4.3.0", - "source": { - "type": "git", - "url": "https://github.com/simplepie/simplepie.git", - "reference": "2a24b6e74aa9bf33243020f52895fe77efe94ccf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/simplepie/simplepie/zipball/2a24b6e74aa9bf33243020f52895fe77efe94ccf", - "reference": "2a24b6e74aa9bf33243020f52895fe77efe94ccf", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4 || ~5" - }, - "suggest": { - "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" - }, - "time": "2016-11-27T01:39:18+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "SimplePie": "library" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Ryan Parman", - "homepage": "http://ryanparman.com/", - "role": "Creator, alumnus developer" - }, - { - "name": "Geoffrey Sneddon", - "homepage": "http://gsnedders.com/", - "role": "Alumnus developer" - }, - { - "name": "Ryan McCue", - "email": "me@ryanmccue.info", - "homepage": "http://ryanmccue.info/", - "role": "Developer" - } - ], - "description": "A simple Atom/RSS parsing library for PHP", - "homepage": "http://simplepie.org/", - "keywords": [ - "atom", - "feeds", - "rss" - ] - }, { "name": "paragonie/random_compat", "version": "v2.0.10", @@ -205,59 +49,6 @@ "random" ] }, - { - "name": "splitbrain/php-archive", - "version": "1.0.8", - "version_normalized": "1.0.8.0", - "source": { - "type": "git", - "url": "https://github.com/splitbrain/php-archive.git", - "reference": "6b1c1746fa0a6f9f68f0bc832892ddeda8db905c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/6b1c1746fa0a6f9f68f0bc832892ddeda8db905c", - "reference": "6b1c1746fa0a6f9f68f0bc832892ddeda8db905c", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.5.*" - }, - "suggest": { - "ext-iconv": "Used for proper filename encode handling", - "ext-mbstring": "Can be used alternatively for handling filename encoding" - }, - "time": "2017-03-19T09:10:53+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "splitbrain\\PHPArchive\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Gohr", - "email": "andi@splitbrain.org" - } - ], - "description": "Pure-PHP implementation to read and write TAR and ZIP archives", - "keywords": [ - "archive", - "extract", - "tar", - "unpack", - "unzip", - "zip" - ] - }, { "name": "geshi/geshi", "version": "v1.0.9.0", @@ -392,5 +183,268 @@ ], "description": "Fork of AddedBytes' PHP EmailAddressValidator script, now with Composer support!", "homepage": "https://github.com/aziraphale/email-address-validator" + }, + { + "name": "marcusschwarz/lesserphp", + "version": "v0.5.1", + "version_normalized": "0.5.1.0", + "source": { + "type": "git", + "url": "https://github.com/MarcusSchwarz/lesserphp.git", + "reference": "e9e3d53980c0e486b07c75e12f2bae5e10bdee44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/e9e3d53980c0e486b07c75e12f2bae5e10bdee44", + "reference": "e9e3d53980c0e486b07c75e12f2bae5e10bdee44", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, + "time": "2016-09-30T11:13:18+00:00", + "bin": [ + "plessc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + }, + { + "name": "Marcus Schwarz", + "email": "github@maswaba.de", + "homepage": "https://www.maswaba.de" + } + ], + "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", + "homepage": "http://leafo.net/lessphp/" + }, + { + "name": "splitbrain/php-archive", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/splitbrain/php-archive.git", + "reference": "2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76", + "reference": "2a63b8cf0bfc7fdc0d987c9b7348e639e55cce76", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.5.*" + }, + "suggest": { + "ext-iconv": "Used for proper filename encode handling", + "ext-mbstring": "Can be used alternatively for handling filename encoding" + }, + "time": "2017-06-11T06:11:38+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "splitbrain\\PHPArchive\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Gohr", + "email": "andi@splitbrain.org" + } + ], + "description": "Pure-PHP implementation to read and write TAR and ZIP archives", + "keywords": [ + "archive", + "extract", + "tar", + "unpack", + "unzip", + "zip" + ] + }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.6", + "version_normalized": "2.0.6.0", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "~4.0", + "sami/sami": "~2.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "time": "2017-06-05T06:31:10+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ] + }, + { + "name": "simplepie/simplepie", + "version": "1.5", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/simplepie/simplepie.git", + "reference": "5de5551953f95feef12cf355a7a26a70f94aa3ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/simplepie/simplepie/zipball/5de5551953f95feef12cf355a7a26a70f94aa3ab", + "reference": "5de5551953f95feef12cf355a7a26a70f94aa3ab", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4 || ~5" + }, + "suggest": { + "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" + }, + "time": "2017-04-17T07:29:31+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "SimplePie": "library" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Ryan Parman", + "homepage": "http://ryanparman.com/", + "role": "Creator, alumnus developer" + }, + { + "name": "Geoffrey Sneddon", + "homepage": "http://gsnedders.com/", + "role": "Alumnus developer" + }, + { + "name": "Ryan McCue", + "email": "me@ryanmccue.info", + "homepage": "http://ryanmccue.info/", + "role": "Developer" + } + ], + "description": "A simple Atom/RSS parsing library for PHP", + "homepage": "http://simplepie.org/", + "keywords": [ + "atom", + "feeds", + "rss" + ] } ] diff --git a/vendor/marcusschwarz/lesserphp/.gitignore b/vendor/marcusschwarz/lesserphp/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7e33d9cbf9e47d9f5758da60e36ccbb6db1cc44e --- /dev/null +++ b/vendor/marcusschwarz/lesserphp/.gitignore @@ -0,0 +1,10 @@ +*.swp +*~ +/*.less +/*.css +tests/bootstrap +tests/tmp +vendor +composer.lock + +.idea/ diff --git a/vendor/marcusschwarz/lesserphp/HISTORY.md b/vendor/marcusschwarz/lesserphp/HISTORY.md new file mode 100644 index 0000000000000000000000000000000000000000..19ec7dc83f17071e2043d2951074cd98a388359a --- /dev/null +++ b/vendor/marcusschwarz/lesserphp/HISTORY.md @@ -0,0 +1,29 @@ +# lesserphp v0.5.1 + +Originally written by Leaf Corcoran, obviously abandoned circa 2014 +https://github.com/leafo/lessphp + +Last version provided by Leaf was 0.5.0 + +### v.0.5.1 +* 2016-09-30: renaming it to lesserphp for easier distinction +* 2016-09-30: applying some pull requests of the origin repository + * https://github.com/leafo/lessphp/pull/584 + * https://github.com/leafo/lessphp/pull/607 + * https://github.com/leafo/lessphp/pull/619 +* 2016-09-29: applying some pull requests of the origin repository + * https://github.com/leafo/lessphp/pull/590 + * https://github.com/leafo/lessphp/pull/523 + * https://github.com/leafo/lessphp/pull/540 + * https://github.com/leafo/lessphp/pull/564 + * https://github.com/leafo/lessphp/pull/566 +* 2016-09-26: applying some pull requests of the origin repository + * https://github.com/leafo/lessphp/pull/592 + * https://github.com/leafo/lessphp/pull/601 + * https://github.com/leafo/lessphp/pull/603 + * https://github.com/leafo/lessphp/pull/604 + * https://github.com/leafo/lessphp/pull/605 + * https://github.com/leafo/lessphp/pull/610 + * https://github.com/leafo/lessphp/pull/616 +* 2016-09-26: making it compatible with php7.x +* 2016-09-26: Forking master from https://github.com/leafo/lessphp diff --git a/vendor/marcusschwarz/lesserphp/LICENSE b/vendor/marcusschwarz/lesserphp/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5290202668d7cdc6972cc7b09e824d7ae36d8ea0 --- /dev/null +++ b/vendor/marcusschwarz/lesserphp/LICENSE @@ -0,0 +1,661 @@ +For ease of distribution, lessphp 0.5.1 is under a dual license. +You are free to pick which one suits your needs. + + + + +MIT LICENSE + + + + +Copyright (c) 2013 - 2015 Leaf Corcoran, http://leafo.net/lessphp +Copyright (c) 2016 - Marcus Schwarz, https://www.maswaba.de + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + +GPL VERSION 3 + + + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + diff --git a/vendor/marcusschwarz/lesserphp/README.md b/vendor/marcusschwarz/lesserphp/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b30e07eace7dde846a56700b14b16ee05908bbd6 --- /dev/null +++ b/vendor/marcusschwarz/lesserphp/README.md @@ -0,0 +1,97 @@ +[](https://travis-ci.org/MarcusSchwarz/lessphp) + +# lesserphp v0.5.1 +### <http://github.com/MarcusSchwarz/lesserphp> + +`lesserphp` is a compiler for LESS written in PHP. It is based on lessphp bei leafo. +The documentation is great, +so check it out: <http://leafo.net/lessphp/docs/>. + +Here's a quick tutorial: + +### How to use in your PHP project + +The only file required is `lessc.inc.php`, so copy that to your include directory. + +The typical flow of **lesserphp** is to create a new instance of `lessc`, +configure it how you like, then tell it to compile something using one built in +compile methods. + +The `compile` method compiles a string of LESS code to CSS. + +```php +<?php +require "lessc.inc.php"; + +$less = new lessc; +echo $less->compile(".block { padding: 3 + 4px }"); +``` + +The `compileFile` method reads and compiles a file. It will either return the +result or write it to the path specified by an optional second argument. + +```php +<?php +echo $less->compileFile("input.less"); +``` + +The `checkedCompile` method is like `compileFile`, but it only compiles if the output +file doesn't exist or it's older than the input file: + +```php +<?php +$less->checkedCompile("input.less", "output.css"); +``` + +If there any problem compiling your code, an exception is thrown with a helpful message: + +```php +<?php +try { + $less->compile("invalid LESS } {"); +} catch (\Exception $e) { + echo "fatal error: " . $e->getMessage(); +} +``` + +The `lessc` object can be configured through an assortment of instance methods. +Some possible configuration options include [changing the output format][1], +[setting variables from PHP][2], and [controlling the preservation of +comments][3], writing [custom functions][4] and much more. It's all described +in [the documentation][0]. + + + [0]: http://leafo.net/lessphp/docs/ + [1]: http://leafo.net/lessphp/docs/#output_formatting + [2]: http://leafo.net/lessphp/docs/#setting_variables_from_php + [3]: http://leafo.net/lessphp/docs/#preserving_comments + [4]: http://leafo.net/lessphp/docs/#custom_functions + + +### How to use from the command line + +An additional script has been included to use the compiler from the command +line. In the simplest invocation, you specify an input file and the compiled +css is written to standard out: + + $ plessc input.less > output.css + +Using the -r flag, you can specify LESS code directly as an argument or, if +the argument is left off, from standard in: + + $ plessc -r "my less code here" + +Finally, by using the -w flag you can watch a specified input file and have it +compile as needed to the output file: + + $ plessc -w input-file output-file + +Errors from watch mode are written to standard out. + +The -f flag sets the [output formatter][1]. For example, to compress the +output run this: + + $ plessc -f=compressed myfile.less + +For more help, run `plessc --help` + diff --git a/vendor/marcusschwarz/lesserphp/composer.json b/vendor/marcusschwarz/lesserphp/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..d32a5d4afdc3200f0669ceb0ff998b494e7587c3 --- /dev/null +++ b/vendor/marcusschwarz/lesserphp/composer.json @@ -0,0 +1,38 @@ +{ + "name": "marcusschwarz/lesserphp", + "type": "library", + "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", + "homepage": "http://leafo.net/lessphp/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + }, + { + "name": "Marcus Schwarz", + "email": "github@maswaba.de", + "homepage": "https://www.maswaba.de" + } + + ], + "bin": ["plessc"], + "autoload": { + "classmap": ["lessc.inc.php"] + }, + "extra": { + "branch-alias": { + "dev-master": "0.5.1-dev" + } + }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, + "scripts": { + "test": "phpunit" + } +} diff --git a/inc/lessc.inc.php b/vendor/marcusschwarz/lesserphp/lessc.inc.php similarity index 83% rename from inc/lessc.inc.php rename to vendor/marcusschwarz/lesserphp/lessc.inc.php index 53b390c089511186b1b827e9db1268f4f1d0f700..b9e80ccc88563ce4e05c61243418af6396465b75 100644 --- a/inc/lessc.inc.php +++ b/vendor/marcusschwarz/lesserphp/lessc.inc.php @@ -1,18 +1,19 @@ <?php /** - * lessphp v0.4.0 + * lessphp v0.5.1 * http://leafo.net/lessphp * - * LESS css compiler, adapted from http://lesscss.org + * LESS CSS compiler, adapted from http://lesscss.org * - * Copyright 2012, Leaf Corcoran <leafot@gmail.com> + * Copyright 2013, Leaf Corcoran <leafot@gmail.com> + * Copyright 2016, Marcus Schwarz <github@maswaba.de> * Licensed under MIT or GPLv3, see LICENSE */ /** - * The less compiler and parser. + * The LESS compiler and parser. * * Converting LESS to CSS is a three stage process. The incoming file is parsed * by `lessc_parser` into a syntax tree, then it is compiled into another tree @@ -27,7 +28,7 @@ * * In summary: * - * The `lessc` class creates an intstance of the parser, feeds it LESS code, + * The `lessc` class creates an instance of the parser, feeds it LESS code, * then transforms the resulting tree to a CSS tree. This class also holds the * evaluation context, such as all available mixins and variables at any given * time. @@ -38,9 +39,10 @@ * handling things like indentation. */ class lessc { - static public $VERSION = "v0.4.0"; - static protected $TRUE = array("keyword", "true"); - static protected $FALSE = array("keyword", "false"); + static public $VERSION = "v0.5.1"; + + static public $TRUE = array("keyword", "true"); + static public $FALSE = array("keyword", "false"); protected $libFunctions = array(); protected $registeredVars = array(); @@ -50,9 +52,13 @@ class lessc { public $mPrefix = '$'; // prefix of abstract blocks public $parentSelector = '&'; + static public $lengths = array( "px", "m", "cm", "mm", "in", "pt", "pc" ); + static public $times = array( "s", "ms" ); + static public $angles = array( "rad", "deg", "grad", "turn" ); + + static public $lengths_to_base = array( 1, 3779.52755906, 37.79527559, 3.77952756, 96, 1.33333333, 16 ); public $importDisabled = false; - /** @var string|string[] */ - public $importDir; + public $importDir = array(); protected $numberPrecision = null; @@ -63,8 +69,6 @@ class lessc { protected $sourceParser = null; protected $sourceLoc = null; - static public $defaultValue = array("keyword", ""); - static protected $nextImportId = 0; // uniquely identify imports // attempts to find the path of an import url, returns null for css files @@ -167,28 +171,27 @@ class lessc { $this->sourceParser = $oldSourceParser; } - /** - * Recursively compiles a block. - * - * A block is analogous to a CSS block in most cases. A single LESS document - * is encapsulated in a block when parsed, but it does not have parent tags - * so all of it's children appear on the root level when compiled. - * - * Blocks are made up of props and children. - * - * Props are property instructions, array tuples which describe an action - * to be taken, eg. write a property, set a variable, mixin a block. - * - * The children of a block are just all the blocks that are defined within. - * This is used to look up mixins when performing a mixin. - * - * Compiling the block involves pushing a fresh environment on the stack, - * and iterating through the props, compiling each one. - * - * See lessc::compileProp() - * - * @param stdClass $block - */ + /** + * Recursively compiles a block. + * + * A block is analogous to a CSS block in most cases. A single LESS document + * is encapsulated in a block when parsed, but it does not have parent tags + * so all of it's children appear on the root level when compiled. + * + * Blocks are made up of props and children. + * + * Props are property instructions, array tuples which describe an action + * to be taken, eg. write a property, set a variable, mixin a block. + * + * The children of a block are just all the blocks that are defined within. + * This is used to look up mixins when performing a mixin. + * + * Compiling the block involves pushing a fresh environment on the stack, + * and iterating through the props, compiling each one. + * + * See lessc::compileProp() + * + */ protected function compileBlock($block) { switch ($block->type) { case "root": @@ -209,7 +212,7 @@ class lessc { $this->compileNestedBlock($block, array($name)); break; default: - $this->throwError("unknown block type: $block->type\n"); + $block->parser->throwError("unknown block type: $block->type\n", $block->count); } } @@ -285,39 +288,73 @@ class lessc { foreach ($this->sortProps($block->props) as $prop) { $this->compileProp($prop, $block, $out); } + $out->lines = $this->deduplicate($out->lines); + } - $out->lines = array_values(array_unique($out->lines)); + /** + * Deduplicate lines in a block. Comments are not deduplicated. If a + * duplicate rule is detected, the comments immediately preceding each + * occurence are consolidated. + */ + protected function deduplicate($lines) { + $unique = array(); + $comments = array(); + + foreach($lines as $line) { + if (strpos($line, '/*') === 0) { + $comments[] = $line; + continue; + } + if (!in_array($line, $unique)) { + $unique[] = $line; + } + array_splice($unique, array_search($line, $unique), 0, $comments); + $comments = array(); + } + return array_merge($unique, $comments); } protected function sortProps($props, $split = false) { $vars = array(); $imports = array(); $other = array(); + $stack = array(); foreach ($props as $prop) { switch ($prop[0]) { + case "comment": + $stack[] = $prop; + break; case "assign": + $stack[] = $prop; if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) { - $vars[] = $prop; + $vars = array_merge($vars, $stack); } else { - $other[] = $prop; + $other = array_merge($other, $stack); } + $stack = array(); break; case "import": $id = self::$nextImportId++; $prop[] = $id; - $imports[] = $prop; + $stack[] = $prop; + $imports = array_merge($imports, $stack); $other[] = array("import_mixin", $id); + $stack = array(); break; default: - $other[] = $prop; + $stack[] = $prop; + $other = array_merge($other, $stack); + $stack = array(); + break; } } + $other = array_merge($other, $stack); if ($split) { - return array(array_merge($vars, $imports), $other); + return array(array_merge($imports, $vars), $other); } else { - return array_merge($vars, $imports, $other); + return array_merge($imports, $vars, $other); } } @@ -539,7 +576,7 @@ class lessc { return true; // not having enough is handled above } else { $numMatched = $i + 1; - // greater than becuase default values always match + // greater than because default values always match return $numMatched >= count($orderedArgs); } } @@ -659,6 +696,7 @@ class lessc { list(, $child) = $prop; $this->compileBlock($child); break; + case 'ruleset': case 'mixin': list(, $path, $args, $suffix) = $prop; @@ -686,8 +724,12 @@ class lessc { $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs); if ($mixins === null) { - // fwrite(STDERR,"failed to find block: ".implode(" > ", $path)."\n"); - break; // throw error here?? + $block->parser->throwError("{$prop[1][0]} is undefined", $block->count); + } + + if(strpos($prop[1][0], "$") === 0) { + //Use Ruleset Logic - Only last element + $mixins = array(array_pop($mixins)); } foreach ($mixins as $mixin) { @@ -710,7 +752,7 @@ class lessc { } $oldParent = $mixin->parent; - if ($mixin !== $block) $mixin->parent = $block; + if ($mixin != $block) $mixin->parent = $block; foreach ($this->sortProps($mixin->props) as $subProp) { if ($suffix !== null && @@ -773,27 +815,23 @@ class lessc { break; default: - $this->throwError("unknown op: {$prop[0]}\n"); + $block->parser->throwError("unknown op: {$prop[0]}\n", $block->count); } } - /** - * Compiles a primitive value into a CSS property value. - * - * Values in lessphp are typed by being wrapped in arrays, their format is - * typically: - * - * array(type, contents [, additional_contents]*) - * - * The input is expected to be reduced. This function will not work on - * things like expressions and variables. - * - * @param array $value - * - * @return string - */ - protected function compileValue($value) { + /** + * Compiles a primitive value into a CSS property value. + * + * Values in lessphp are typed by being wrapped in arrays, their format is + * typically: + * + * array(type, contents [, additional_contents]*) + * + * The input is expected to be reduced. This function will not work on + * things like expressions and variables. + */ + public function compileValue($value) { switch ($value[0]) { case 'list': // [1] - delimiter @@ -859,7 +897,7 @@ class lessc { protected function lib_pow($args) { list($base, $exp) = $this->assertArgs($args, 2, "pow"); - return pow($this->assertNumber($base), $this->assertNumber($exp)); + return array( "number", pow($this->assertNumber($base), $this->assertNumber($exp)), $args[2][0][2] ); } protected function lib_pi() { @@ -868,8 +906,66 @@ class lessc { protected function lib_mod($args) { list($a, $b) = $this->assertArgs($args, 2, "mod"); - return $this->assertNumber($a) % $this->assertNumber($b); - } + return array( "number", $this->assertNumber($a) % $this->assertNumber($b), $args[2][0][2] ); + } + + protected function lib_convert($args) { + list($value, $to) = $this->assertArgs($args, 2, "convert"); + + // If it's a keyword, grab the string version instead + if( is_array( $to ) && $to[0] == "keyword" ) + $to = $to[1]; + + return $this->convert( $value, $to ); + } + + protected function lib_abs($num) { + return array( "number", abs($this->assertNumber($num)), $num[2] ); + } + + protected function lib_min($args) { + $values = $this->assertMinArgs($args, 1, "min"); + + $first_format = $values[0][2]; + + $min_index = 0; + $min_value = $values[0][1]; + + for( $a = 0; $a < sizeof( $values ); $a++ ) + { + $converted = $this->convert( $values[$a], $first_format ); + + if( $converted[1] < $min_value ) + { + $min_index = $a; + $min_value = $values[$a][1]; + } + } + + return $values[ $min_index ]; + } + + protected function lib_max($args) { + $values = $this->assertMinArgs($args, 1, "max"); + + $first_format = $values[0][2]; + + $max_index = 0; + $max_value = $values[0][1]; + + for( $a = 0; $a < sizeof( $values ); $a++ ) + { + $converted = $this->convert( $values[$a], $first_format ); + + if( $converted[1] > $max_value ) + { + $max_index = $a; + $max_value = $values[$a][1]; + } + } + + return $values[ $max_index ]; + } protected function lib_tan($num) { return tan($this->assertNumber($num)); @@ -957,6 +1053,39 @@ class lessc { return $this->lib_rgbahex($color); } + /** + * Given an url, decide whether to output a regular link or the base64-encoded contents of the file + * + * @param array $value either an argument list (two strings) or a single string + * @return string formatted url(), either as a link or base64-encoded + */ + protected function lib_data_uri($value) { + $mime = ($value[0] === 'list') ? $value[2][0][2] : null; + $url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0]; + + $fullpath = $this->findImport($url); + + if($fullpath && ($fsize = filesize($fullpath)) !== false) { + // IE8 can't handle data uris larger than 32KB + if($fsize/1024 < 32) { + if(is_null($mime)) { + if(class_exists('finfo')) { // php 5.3+ + $finfo = new finfo(FILEINFO_MIME); + $mime = explode('; ', $finfo->file($fullpath)); + $mime = $mime[0]; + } elseif(function_exists('mime_content_type')) { // PHP 5.2 + $mime = mime_content_type($fullpath); + } + } + + if(!is_null($mime)) // fallback if the mime type is still unknown + $url = sprintf('data:%s;base64,%s', $mime, base64_encode(file_get_contents($fullpath))); + } + } + + return 'url("'.$url.'")'; + } + // utility func to unquote a string protected function lib_e($arg) { switch ($arg[0]) { @@ -965,7 +1094,7 @@ class lessc { if (isset($items[0])) { return $this->lib_e($items[0]); } - return self::$defaultValue; + $this->throwError("unrecognised input"); case "string": $arg[1] = ""; return $arg; @@ -1015,8 +1144,14 @@ class lessc { } protected function lib_round($arg) { - $value = $this->assertNumber($arg); - return array("number", round($value), $arg[2]); + if($arg[0] != "list") { + $value = $this->assertNumber($arg); + return array("number", round($value), $arg[2]); + } else { + $value = $this->assertNumber($arg[2][0]); + $precision = $this->assertNumber($arg[2][1]); + return array("number", round($value, $precision), $arg[2][0][2]); + } } protected function lib_unit($arg) { @@ -1029,15 +1164,11 @@ class lessc { } } - /** - * Helper function to get arguments for color manipulation functions. - * takes a list that contains a color like thing and a percentage - * - * @param array $args - * - * @return array - */ - protected function colorArgs($args) { + /** + * Helper function to get arguments for color manipulation functions. + * takes a list that contains a color like thing and a percentage + */ + public function colorArgs($args) { if ($args[0] != 'list' || count($args[2]) < 2) { return array(array('color', 0, 0, 0), 0); } @@ -1178,36 +1309,62 @@ class lessc { } protected function lib_contrast($args) { - if ($args[0] != 'list' || count($args[2]) < 3) { - return array(array('color', 0, 0, 0), 0); - } - - list($inputColor, $darkColor, $lightColor) = $args[2]; - - $inputColor = $this->assertColor($inputColor); - $darkColor = $this->assertColor($darkColor); - $lightColor = $this->assertColor($lightColor); - $hsl = $this->toHSL($inputColor); - - if ($hsl[3] > 50) { - return $darkColor; - } - - return $lightColor; - } - - protected function assertColor($value, $error = "expected color value") { + $darkColor = array('color', 0, 0, 0); + $lightColor = array('color', 255, 255, 255); + $threshold = 0.43; + + if ( $args[0] == 'list' ) { + $inputColor = ( isset($args[2][0]) ) ? $this->assertColor($args[2][0]) : $lightColor; + $darkColor = ( isset($args[2][1]) ) ? $this->assertColor($args[2][1]) : $darkColor; + $lightColor = ( isset($args[2][2]) ) ? $this->assertColor($args[2][2]) : $lightColor; + if( isset($args[2][3]) ) { + if( isset($args[2][3][2]) && $args[2][3][2] == '%' ) { + $args[2][3][1] /= 100; + unset($args[2][3][2]); + } + $threshold = $this->assertNumber($args[2][3]); + } + } + else { + $inputColor = $this->assertColor($args); + } + + $inputColor = $this->coerceColor($inputColor); + $darkColor = $this->coerceColor($darkColor); + $lightColor = $this->coerceColor($lightColor); + + //Figure out which is actually light and dark! + if ( $this->lib_luma($darkColor) > $this->lib_luma($lightColor) ) { + $t = $lightColor; + $lightColor = $darkColor; + $darkColor = $t; + } + + $inputColor_alpha = $this->lib_alpha($inputColor); + if ( ( $this->lib_luma($inputColor) * $inputColor_alpha) < $threshold) { + return $lightColor; + } + return $darkColor; + } + + protected function lib_luma($color) { + $color = $this->coerceColor($color); + return (0.2126 * $color[0] / 255) + (0.7152 * $color[1] / 255) + (0.0722 * $color[2] / 255); + } + + + public function assertColor($value, $error = "expected color value") { $color = $this->coerceColor($value); if (is_null($color)) $this->throwError($error); return $color; } - protected function assertNumber($value, $error = "expecting number") { + public function assertNumber($value, $error = "expecting number") { if ($value[0] == "number") return $value[1]; $this->throwError($error); } - protected function assertArgs($value, $expectedArgs, $name="") { + public function assertArgs($value, $expectedArgs, $name="") { if ($expectedArgs == 1) { return $value; } else { @@ -1226,6 +1383,21 @@ class lessc { } } + public function assertMinArgs($value, $expectedMinArgs, $name="") { + if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list"); + $values = $value[2]; + $numValues = count($values); + if ($expectedMinArgs > $numValues) { + if ($name) { + $name = $name . ": "; + } + + $this->throwError("${name}expecting at least $expectedMinArgs arguments, got $numValues"); + } + + return $values; +} + protected function toHSL($color) { if ($color[0] == 'hsl') return $color; @@ -1272,14 +1444,10 @@ class lessc { return $temp1; } - /** - * Converts a hsl array into a color value in rgb. - * Expects H to be in range of 0 to 360, S and L in 0 to 100 - * - * @param array $color - * - * @return array - */ + /** + * Converts a hsl array into a color value in rgb. + * Expects H to be in range of 0 to 360, S and L in 0 to 100 + */ protected function toRGB($color) { if ($color[0] == 'color') return $color; @@ -1311,14 +1479,10 @@ class lessc { return min($max, max($min, $v)); } - /** - * Convert the rgb, rgba, hsl color literals of function type - * as returned by the parser into values of color type. - * - * @param array $func - * - * @return bool|mixed - */ + /** + * Convert the rgb, rgba, hsl color literals of function type + * as returned by the parser into values of color type. + */ protected function funcToColor($func) { $fname = $func[1]; if ($func[2][0] != 'list') return false; // need a list of arguments @@ -1399,7 +1563,7 @@ class lessc { } $seen[$key] = true; - $out = $this->reduce($this->get($key, self::$defaultValue)); + $out = $this->reduce($this->get($key)); $seen[$key] = false; return $out; case "list": @@ -1427,8 +1591,9 @@ class lessc { list(, $name, $args) = $value; if ($name == "%") $name = "_sprintf"; + $f = isset($this->libFunctions[$name]) ? - $this->libFunctions[$name] : array($this, 'lib_'.$name); + $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name)); if (is_callable($f)) { if ($args[0] == 'list') @@ -1535,7 +1700,7 @@ class lessc { return $value; } - protected function toBool($a) { + public function toBool($a) { if ($a) return self::$TRUE; else return self::$FALSE; } @@ -1601,6 +1766,78 @@ class lessc { } } + protected function convert( $number, $to ) + { + $value = $this->assertNumber( $number ); + $from = $number[2]; + + // easy out + if( $from == $to ) + return $number; + + // check if the from value is a length + if( ( $from_index = array_search( $from, self::$lengths ) ) !== false ) { + // make sure to value is too + if( in_array( $to, self::$lengths ) ) { + // do the actual conversion + $to_index = array_search( $to, self::$lengths ); + $px = $value * self::$lengths_to_base[ $from_index ]; + $result = $px * ( 1 / self::$lengths_to_base[ $to_index ] ); + + $result = round( $result, 8 ); + return array( "number", $result, $to ); + } + } + + // do the same check for times + if( in_array( $from, self::$times ) ) { + if( in_array( $to, self::$times ) ) { + // currently only ms and s are valid + if( $to == "ms" ) + $result = $value * 1000; + else + $result = $value / 1000; + + $result = round( $result, 8 ); + return array( "number", $result, $to ); + } + } + + // lastly check for an angle + if( in_array( $from, self::$angles ) ) { + // convert whatever angle it is into degrees + if( $from == "rad" ) + $deg = rad2deg( $value ); + + else if( $from == "turn" ) + $deg = $value * 360; + + else if( $from == "grad" ) + $deg = $value / (400 / 360); + + else + $deg = $value; + + // Then convert it from degrees into desired unit + if( $to == "deg" ) + $result = $deg; + + if( $to == "rad" ) + $result = deg2rad( $deg ); + + if( $to == "turn" ) + $result = $value / 360; + + if( $to == "grad" ) + $result = $value * (400 / 360); + + $result = round( $result, 8 ); + return array( "number", $result, $to ); + } + + // we don't know how to convert these + $this->throwError( "Cannot convert {$from} to {$to}" ); + } // make sure a color's components don't go out of bounds protected function fixColor($c) { @@ -1758,10 +1995,13 @@ class lessc { // get the highest occurrence entry for a name - protected function get($name, $default=null) { + protected function get($name) { $current = $this->env; - $isArguments = $name == $this->vPrefix . 'arguments'; + // track scope to evaluate + $scope_secondary = array(); + + $isArguments = $name == $this->vPrefix . 'arguments'; while ($current) { if ($isArguments && isset($current->arguments)) { return array('list', ' ', $current->arguments); @@ -1769,13 +2009,42 @@ class lessc { if (isset($current->store[$name])) return $current->store[$name]; - else { - $current = isset($current->storeParent) ? - $current->storeParent : $current->parent; - } + // has secondary scope? + if (isset($current->storeParent)) + $scope_secondary[] = $current->storeParent; + + if (isset($current->parent)) + $current = $current->parent; + else + $current = null; } - return $default; + while (count($scope_secondary)) { + // pop one off + $current = array_shift($scope_secondary); + while ($current) { + if ($isArguments && isset($current->arguments)) { + return array('list', ' ', $current->arguments); + } + + if (isset($current->store[$name])) { + return $current->store[$name]; + } + + // has secondary scope? + if (isset($current->storeParent)) { + $scope_secondary[] = $current->storeParent; + } + + if (isset($current->parent)) { + $current = $current->parent; + } else { + $current = null; + } + } + } + + $this->throwError("variable $name is undefined"); } // inject array of unparsed strings into environment as variables @@ -1787,19 +2056,17 @@ class lessc { $parser->count = 0; $parser->buffer = (string)$strValue; if (!$parser->propertyValue($value)) { - throw new Exception("failed to parse passed in variable $name: $strValue"); + throw new \Exception("failed to parse passed in variable $name: $strValue"); } $this->set($name, $value); } } - /** - * Initialize any static state, can initialize parser for a file - * $opts isn't used yet - * - * @param null|string $fname - */ + /** + * Initialize any static state, can initialize parser for a file + * $opts isn't used yet + */ public function __construct($fname = null) { if ($fname !== null) { // used for deprecated parse method @@ -1816,6 +2083,7 @@ class lessc { $this->env = null; $this->scope = null; + $this->allParsedFiles = array(); $this->formatter = $this->newFormatter(); @@ -1835,7 +2103,7 @@ class lessc { public function compileFile($fname, $outFname = null) { if (!is_readable($fname)) { - throw new Exception('load error: failed to find '.$fname); + throw new \Exception('load error: failed to find '.$fname); } $pi = pathinfo($fname); @@ -1858,6 +2126,43 @@ class lessc { return $out; } + /** + * Based on explicit input/output files does a full change check on cache before compiling. + * + * @param string $in + * @param string $out + * @param boolean $force + * @return string Compiled CSS results + * @throws Exception + */ + public function checkedCachedCompile($in, $out, $force = false) { + if (!is_file($in) || !is_readable($in)) { + throw new Exception('Invalid or unreadable input file specified.'); + } + if (is_dir($out) || !is_writable(file_exists($out) ? $out : dirname($out))) { + throw new Exception('Invalid or unwritable output file specified.'); + } + + $outMeta = $out . '.meta'; + $metadata = null; + if (!$force && is_file($outMeta)) { + $metadata = unserialize(file_get_contents($outMeta)); + } + + $output = $this->cachedCompile($metadata ? $metadata : $in); + + if (!$metadata || $metadata['updated'] != $output['updated']) { + $css = $output['compiled']; + unset($output['compiled']); + file_put_contents($out, $css); + file_put_contents($outMeta, serialize($output)); + } else { + $css = file_get_contents($out); + } + + return $css; + } + // compile only if changed input has changed or output doesn't exist public function checkedCompile($in, $out) { if (!is_file($out) || filemtime($in) > filemtime($out)) { @@ -1946,7 +2251,7 @@ class lessc { if ($str == null) { if (empty($this->_parseFile)) { - throw new exception("nothing to parse"); + throw new \Exception("nothing to parse"); } $out = $this->compileFile($this->_parseFile); @@ -2013,22 +2318,18 @@ class lessc { return $this->allParsedFiles; } - protected function addParsedFile($file) { + public function addParsedFile($file) { $this->allParsedFiles[realpath($file)] = filemtime($file); } - /** - * Uses the current value of $this->count to show line and line number - * - * @param null|string $msg - * - * @throws exception - */ - protected function throwError($msg = null) { + /** + * Uses the current value of $this->count to show line and line number + */ + public function throwError($msg = null) { if ($this->sourceLoc >= 0) { $this->sourceParser->throwError($msg, $this->sourceLoc); } - throw new exception($msg); + throw new \Exception($msg); } // compile file $in to file $out if $in is newer than $out @@ -2290,15 +2591,14 @@ class lessc_parser { $this->whitespace(); // parse the entire file - $lastCount = $this->count; while (false !== $this->parseChunk()); if ($this->count != strlen($this->buffer)) $this->throwError(); // TODO report where the block was opened - if (!is_null($this->env->parent)) - throw new exception('parse error: unclosed block'); + if ( !property_exists($this->env, 'parent') || !is_null($this->env->parent) ) + throw new \Exception('parse error: unclosed block'); return $this->env; } @@ -2343,6 +2643,10 @@ class lessc_parser { if (empty($this->buffer)) return false; $s = $this->seek(); + if ($this->whitespace()) { + return true; + } + // setting a property if ($this->keyword($key) && $this->assign() && $this->propertyValue($value, $key) && $this->end()) @@ -2387,6 +2691,16 @@ class lessc_parser { $this->append(array("directive", $dirName, $dirValue)); return true; } + } elseif ($this->literal(":", true)) { + //Ruleset Definition + if (($this->openString("{", $dirValue, null, array(";")) || true) && + $this->literal("{")) + { + $dir = $this->pushBlock($this->fixTags(array("@".$dirName))); + $dir->name = $dirName; + if (isset($dirValue)) $dir->value = $dirValue; + return true; + } } } @@ -2423,7 +2737,7 @@ class lessc_parser { } // opening a simple block - if ($this->tags($tags) && $this->literal('{')) { + if ($this->tags($tags) && $this->literal('{', false)) { $tags = $this->fixTags($tags); $this->pushBlock($tags); return true; @@ -2435,7 +2749,7 @@ class lessc_parser { if ($this->literal('}', false)) { try { $block = $this->pop(); - } catch (exception $e) { + } catch (\Exception $e) { $this->seek($s); $this->throwError($e->getMessage()); } @@ -2519,15 +2833,10 @@ class lessc_parser { return true; } - /** - * Attempt to consume an expression. - * - * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code - * - * @param array $out - * - * @return bool - */ + /** + * Attempt to consume an expression. + * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code + */ protected function expression(&$out) { if ($this->value($lhs)) { $out = $this->expHelper($lhs, 0); @@ -2549,14 +2858,9 @@ class lessc_parser { return false; } - /** - * recursively parse infix equation with $lhs at precedence $minP - * - * @param array $lhs - * @param mixed $minP - * - * @return array - */ + /** + * recursively parse infix equation with $lhs at precedence $minP + */ protected function expHelper($lhs, $minP) { $this->inExp = true; $ss = $this->seek(); @@ -2674,7 +2978,7 @@ class lessc_parser { if ($this->unit($value)) return true; if ($this->color($value)) return true; if ($this->func($value)) return true; - if ($this->string($value)) return true; + if ($this->stringValue($value)) return true; if ($this->keyword($word)) { $value = array('keyword', $word); @@ -2688,7 +2992,7 @@ class lessc_parser { } // unquote string (should this work on any type? - if ($this->literal("~") && $this->string($str)) { + if ($this->literal("~") && $this->stringValue($str)) { $value = array("escape", $str); return true; } else { @@ -2708,7 +3012,6 @@ class lessc_parser { // an import statement protected function import(&$out) { - $s = $this->seek(); if (!$this->literal('@import')) return false; // @import "something.css" media; @@ -2819,7 +3122,7 @@ class lessc_parser { } } - if (($tok == "'" || $tok == '"') && $this->string($str)) { + if (($tok == "'" || $tok == '"') && $this->stringValue($str)) { $content[] = $str; continue; } @@ -2850,7 +3153,7 @@ class lessc_parser { return true; } - protected function string(&$out) { + protected function stringValue(&$out) { $s = $this->seek(); if ($this->literal('"', false)) { $delim = '"'; @@ -3068,7 +3371,6 @@ class lessc_parser { // list of tags of specifying mixin path // optionally separated by > (lazy, accepts extra >) protected function mixinTags(&$tags) { - $s = $this->seek(); $tags = array(); while ($this->tag($tt, true)) { $tags[] = $tt; @@ -3104,7 +3406,7 @@ class lessc_parser { $attrParts[] = " "; continue; } - if ($this->string($str)) { + if ($this->stringValue($str)) { // escape parent selector, (yuck) foreach ($str[2] as &$chunk) { $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk); @@ -3276,14 +3578,10 @@ class lessc_parser { return false; } - /** - * Consume an assignment operator - * Can optionally take a name that will be set to the current property name - * - * @param null|string $name - * - * @return bool - */ + /** + * Consume an assignment operator + * Can optionally take a name that will be set to the current property name + */ protected function assign($name = null) { if ($name) $this->currentProperty = $name; return $this->literal(':') || $this->literal('='); @@ -3300,7 +3598,7 @@ class lessc_parser { // consume an end of statement delimiter protected function end() { - if ($this->literal(';')) { + if ($this->literal(';', false)) { return true; } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') { // if there is end of file or a closing block next then we don't need a ; @@ -3449,9 +3747,9 @@ class lessc_parser { if ($this->writeComments) { $gotWhite = false; while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) { - if (isset($m[1]) && empty($this->commentsSeen[$this->count])) { + if (isset($m[1]) && empty($this->seenComments[$this->count])) { $this->append(array("comment", $m[1])); - $this->commentsSeen[$this->count] = true; + $this->seenComments[$this->count] = true; } $this->count += strlen($m[0]); $gotWhite = true; @@ -3495,14 +3793,14 @@ class lessc_parser { // TODO this depends on $this->count if ($this->peek("(.*?)(\n|$)", $m, $count)) { - throw new exception("$msg: failed at `$m[1]` $loc"); + throw new \Exception("$msg: failed at `$m[1]` $loc"); } else { - throw new exception("$msg: $loc"); + throw new \Exception("$msg: $loc"); } } protected function pushBlock($selectors=null, $type=null) { - $b = new stdclass; + $b = new \stdClass(); $b->parent = $this->env; $b->type = $type; @@ -3514,6 +3812,14 @@ class lessc_parser { $b->props = array(); $b->children = array(); + // add a reference to the parser so + // we can access the parser to throw errors + // or retrieve the sourceName of this block. + $b->parser = $this; + + // so we know the position of this block + $b->count = $this->count; + $this->env = $b; return $b; } diff --git a/vendor/phpseclib/phpseclib/README.md b/vendor/phpseclib/phpseclib/README.md index a6bde111ce104ec109bd803d3065e6b716268b03..89f84c24e26aa790d5f5566ccf59654a1b1dd406 100644 --- a/vendor/phpseclib/phpseclib/README.md +++ b/vendor/phpseclib/phpseclib/README.md @@ -6,17 +6,37 @@ MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 -* [Download (1.0.4)](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.4.zip/download) * [Browse Git](https://github.com/phpseclib/phpseclib) -* [Code Coverage Report](http://phpseclib.bantux.org/code_coverage/2.0/latest/) - -<img src="http://phpseclib.sourceforge.net/pear-icon.png" alt="PEAR Channel" width="16" height="16"> -PEAR Channel: [phpseclib.sourceforge.net](http://phpseclib.sourceforge.net/pear.htm) +* [Code Coverage Report](https://coverage.phpseclib.org/2.0/latest/) ## Documentation * [Documentation / Manual](http://phpseclib.sourceforge.net/) -* [API Documentation](http://phpseclib.bantux.org/api/2.0/) (generated by Sami) +* [API Documentation](https://api.phpseclib.org/2.0/) (generated by Sami) + +## Branches + +### master + +* Development Branch +* Unstable API +* Do not use in production + +### 2.0 + +* Modernized version of 1.0 +* Minimum PHP version: 5.3.3 +* PSR-4 autoloading with namespace rooted at `\phpseclib` +* Install via Composer: `composer require phpseclib/phpseclib ~2.0` + +### 1.0 + +* Long term support (LTS) release +* PHP4 compatible +* Composer compatible (PSR-0 autoloading) +* Install using Composer: `composer require phpseclib/phpseclib ~1.0` +* Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm) +* [Download 1.0.7 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.7.zip/download) ## Support @@ -26,40 +46,29 @@ Need Support? * [Create a Support Ticket on GitHub](https://github.com/phpseclib/phpseclib/issues/new) * [Browse the Support Forum](http://www.frostjedi.com/phpbb/viewforum.php?f=46) (no longer in use) -## Installing Development Dependencies - -Dependencies are managed via Composer. +## Contributing -1. Download the [`composer.phar`](https://getcomposer.org/composer.phar) executable as per the - [Composer Download Instructions](https://getcomposer.org/download/), e.g. by running +1. Fork the Project - ``` sh - curl -sS https://getcomposer.org/installer | php - ``` +2. Ensure you have Composer installed (see [Composer Download Instructions](https://getcomposer.org/download/)) -2. Install Dependencies +3. Install Development Dependencies ``` sh - php composer.phar install + composer install ``` -## Contributing - -1. Fork the Project - -2. Install Development Dependencies - -3. Create a Feature Branch +4. Create a Feature Branch -4. (Recommended) Run the Test Suite +5. (Recommended) Run the Test Suite ``` sh vendor/bin/phpunit ``` -5. (Recommended) Check whether your code conforms to our Coding Standards by running +6. (Recommended) Check whether your code conforms to our Coding Standards by running ``` sh vendor/bin/phing -f build/build.xml sniff ``` -6. Send us a Pull Request +7. Send us a Pull Request diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php index 3949e8123f881864e4e300ee7f585fd7d3fd0319..19d0a02002e3a731450b92483bf7c6f90c85f301 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php @@ -317,7 +317,10 @@ class Blowfish extends Base function isValidEngine($engine) { if ($engine == self::ENGINE_OPENSSL) { - if ($this->key_length != 16) { + if (version_compare(PHP_VERSION, '5.3.7') < 0 && $this->key_length != 16) { + return false; + } + if ($this->key_length < 16) { return false; } $this->cipher_name_openssl_ecb = 'bf-ecb'; diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php index 1e768d7d96549e704f1621dd2c6180ae9e000687..4812010c3a0fee06e859a4aa4f4dc878ea98b6b8 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php @@ -144,8 +144,10 @@ class RC4 extends Base */ function isValidEngine($engine) { - switch ($engine) { - case Base::ENGINE_OPENSSL: + if ($engine == Base::ENGINE_OPENSSL) { + if (version_compare(PHP_VERSION, '5.3.7') >= 0) { + $this->cipher_name_openssl = 'rc4-40'; + } else { switch (strlen($this->key)) { case 5: $this->cipher_name_openssl = 'rc4-40'; @@ -159,6 +161,7 @@ class RC4 extends Base default: return false; } + } } return parent::isValidEngine($engine); diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php index ef508a433272e92d6a2e5384904ac0df09166cf4..9670c01a76987127a558dc257df2b0023271f1b3 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php @@ -1572,6 +1572,15 @@ class RSA } if ($components === false) { + $this->comment = null; + $this->modulus = null; + $this->k = null; + $this->exponent = null; + $this->primes = null; + $this->exponents = null; + $this->coefficients = null; + $this->publicExponent = null; + return false; } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php index 170d1c3775f551335ab4b0d5f0393fb7039c4828..6b29e75181e417809e3758d2c30b284d5c92ef73 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php @@ -62,7 +62,7 @@ class Random // method 1. prior to PHP 5.3 this would call rand() on windows hence the function_exists('class_alias') call. // ie. class_alias is a function that was introduced in PHP 5.3 if (extension_loaded('mcrypt') && function_exists('class_alias')) { - return mcrypt_create_iv($length); + return @mcrypt_create_iv($length); } // method 2. openssl_random_pseudo_bytes was introduced in PHP 5.3.0 but prior to PHP 5.3.4 there was, // to quote <http://php.net/ChangeLog-5.php#5.3.4>, "possible blocking behavior". as of 5.3.4 @@ -101,7 +101,7 @@ class Random // not doing. regardless, this'll only be called if this PHP script couldn't open /dev/urandom due to open_basedir // restrictions or some such if (extension_loaded('mcrypt')) { - return mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); + return @mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); } } // at this point we have no choice but to use a pure-PHP CSPRNG diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php index 8308645b40f388af026e85145804bbd044e3af67..504dbe8bdd70b25033b0a949d07df8f9e55707d3 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php @@ -1138,7 +1138,7 @@ class ASN1 http://www.obj-sys.com/asn1tutorial/node14.html */ $pattern = $tag == self::TYPE_UTC_TIME ? - '#(..)(..)(..)(..)(..)(..)(.*)#' : + '#^(..)(..)(..)(..)(..)(..)?(.*)$#' : '#(....)(..)(..)(..)(..)(..).*([Z+-].*)$#'; preg_match($pattern, $content, $matches); @@ -1163,7 +1163,7 @@ class ASN1 $timezone = 0; } - return @$mktime($hour, $minute, $second, $month, $day, $year) + $timezone; + return @$mktime((int)$hour, (int)$minute, (int)$second, (int)$month, (int)$day, (int)$year) + $timezone; } /** diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php index 863d9e991ab19e31da7b1fb2bf4f420c11108313..9a70457bba1a7c4af95ffa84ad7e4839e5bcf481 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php @@ -1907,6 +1907,9 @@ class X509 // "SET Secure Electronic Transaction Specification" // http://www.maithean.com/docs/set_bk3.pdf case '2.23.42.7.0': // id-set-hashedRootKey + // "Certificate Transparency" + // https://tools.ietf.org/html/rfc6962 + case '1.3.6.1.4.1.11129.2.4.2': return true; // CSR attributes @@ -3463,8 +3466,8 @@ class X509 $altName = array(); - if (isset($subject->domains) && count($subject->domains) > 1) { - $altName = array_map(array('X509', '_dnsName'), $subject->domains); + if (isset($subject->domains) && count($subject->domains)) { + $altName = array_map(array('\phpseclib\File\X509', '_dnsName'), $subject->domains); } if (isset($subject->ipAddresses) && count($subject->ipAddresses)) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php index 8784b543a923210c5ac11811444ef2ba4bcc25ce..f95bce6df760ebe26d63a16d8bc8a14af0b322dc 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php @@ -99,7 +99,7 @@ class SCP * * Connects to an SSH server * - * @param \phpseclib\Net\SSH1|\phpseclin\Net\SSH2 $ssh + * @param \phpseclib\Net\SSH1|\phpseclib\Net\SSH2 $ssh * @return \phpseclib\Net\SCP * @access public */ @@ -299,6 +299,9 @@ class SCP $response = $this->ssh->_get_binary_packet(); switch ($response[SSH1::RESPONSE_TYPE]) { case NET_SSH1_SMSG_STDOUT_DATA: + if (strlen($response[SSH1::RESPONSE_DATA]) < 4) { + return false; + } extract(unpack('Nlength', $response[SSH1::RESPONSE_DATA])); return $this->ssh->_string_shift($response[SSH1::RESPONSE_DATA], $length); case NET_SSH1_SMSG_STDERR_DATA: diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php index 053ad3b776bb31606a2d13bd642da42d0e9da7f1..1421ecb49a81cc40caa168c684da9f621ea468e4 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php @@ -372,7 +372,7 @@ class SFTP extends SSH2 ); if (!defined('NET_SFTP_QUEUE_SIZE')) { - define('NET_SFTP_QUEUE_SIZE', 50); + define('NET_SFTP_QUEUE_SIZE', 32); } } @@ -472,11 +472,20 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nversion', $this->_string_shift($response, 4))); $this->version = $version; while (!empty($response)) { + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $key = $this->_string_shift($response, $length); + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $value = $this->_string_shift($response, $length); $this->extensions[$key] = $value; @@ -587,12 +596,15 @@ class SFTP extends SSH2 function _logError($response, $status = -1) { if ($status == -1) { + if (strlen($response) < 4) { + return; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); } $error = $this->status_codes[$status]; - if ($this->version > 2) { + if ($this->version > 2 || strlen($response) < 4) { extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->sftp_errors[] = $error . ': ' . $this->_string_shift($response, $length); } else { @@ -641,6 +653,9 @@ class SFTP extends SSH2 // should work on all SFTP versions since the only part of the SSH_FXP_NAME packet the following looks // at is the first part and that part is defined the same in SFTP versions 3 through 6. $this->_string_shift($response, 4); // skip over the count - it should be 1, anyway + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); return $this->_string_shift($response, $length); case NET_SFTP_STATUS: @@ -875,10 +890,19 @@ class SFTP extends SSH2 $response = $this->_get_sftp_packet(); switch ($this->packet_type) { case NET_SFTP_NAME: + if (strlen($response) < 4) { + return false; + } extract(unpack('Ncount', $this->_string_shift($response, 4))); for ($i = 0; $i < $count; $i++) { + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $shortname = $this->_string_shift($response, $length); + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $longname = $this->_string_shift($response, $length); $attributes = $this->_parseAttributes($response); @@ -905,6 +929,9 @@ class SFTP extends SSH2 } break; case NET_SFTP_STATUS: + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_EOF) { $this->_logError($response, $status); @@ -1499,6 +1526,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -1611,12 +1641,18 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Ncount', $this->_string_shift($response, 4))); // the file isn't a symlink if (!$count) { return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); return $this->_string_shift($response, $length); } @@ -1651,6 +1687,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -1714,6 +1753,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -1751,6 +1793,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { // presumably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED? @@ -1871,7 +1916,14 @@ class SFTP extends SSH2 break; case is_resource($data): $mode = $mode & ~self::SOURCE_LOCAL_FILE; - $fp = $data; + $info = stream_get_meta_data($data); + if ($info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') { + $fp = fopen('php://memory', 'w+'); + stream_copy_to_stream($data, $fp); + rewind($fp); + } else { + $fp = $data; + } break; case $mode & self::SOURCE_LOCAL_FILE: if (!is_file($data)) { @@ -1976,6 +2028,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -2007,6 +2062,9 @@ class SFTP extends SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -2180,6 +2238,15 @@ class SFTP extends SSH2 return false; } + if (is_object($path)) { + // It's an object. Cast it as string before we check anything else. + $path = (string) $path; + } + + if (!is_string($path) || $path == '') { + return false; + } + $path = $this->_realpath($path); if ($path === false) { return false; @@ -2197,6 +2264,9 @@ class SFTP extends SSH2 } // if $status isn't SSH_FX_OK it's probably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -2622,6 +2692,9 @@ class SFTP extends SSH2 } // if $status isn't SSH_FX_OK it's probably SSH_FX_NO_SUCH_FILE or SSH_FX_PERMISSION_DENIED + if (strlen($response) < 4) { + return false; + } extract(unpack('Nstatus', $this->_string_shift($response, 4))); if ($status != NET_SFTP_STATUS_OK) { $this->_logError($response, $status); @@ -2649,6 +2722,10 @@ class SFTP extends SSH2 function _parseAttributes(&$response) { $attr = array(); + if (strlen($response) < 4) { + user_error('Malformed file attributes'); + return array(); + } extract(unpack('Nflags', $this->_string_shift($response, 4))); // SFTPv4+ have a type field (a byte) that follows the above flag field foreach ($this->attributes as $key => $value) { @@ -2663,9 +2740,17 @@ class SFTP extends SSH2 $attr['size'] = hexdec(bin2hex($this->_string_shift($response, 8))); break; case NET_SFTP_ATTR_UIDGID: // 0x00000002 (SFTPv3 only) + if (strlen($response) < 8) { + user_error('Malformed file attributes'); + return $attr; + } $attr+= unpack('Nuid/Ngid', $this->_string_shift($response, 8)); break; case NET_SFTP_ATTR_PERMISSIONS: // 0x00000004 + if (strlen($response) < 4) { + user_error('Malformed file attributes'); + return $attr; + } $attr+= unpack('Npermissions', $this->_string_shift($response, 4)); // mode == permissions; permissions was the original array key and is retained for bc purposes. // mode was added because that's the more industry standard terminology @@ -2676,13 +2761,29 @@ class SFTP extends SSH2 } break; case NET_SFTP_ATTR_ACCESSTIME: // 0x00000008 + if (strlen($response) < 8) { + user_error('Malformed file attributes'); + return $attr; + } $attr+= unpack('Natime/Nmtime', $this->_string_shift($response, 8)); break; case NET_SFTP_ATTR_EXTENDED: // 0x80000000 + if (strlen($response) < 4) { + user_error('Malformed file attributes'); + return $attr; + } extract(unpack('Ncount', $this->_string_shift($response, 4))); for ($i = 0; $i < $count; $i++) { + if (strlen($response) < 4) { + user_error('Malformed file attributes'); + return $attr; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $key = $this->_string_shift($response, $length); + if (strlen($response) < 4) { + user_error('Malformed file attributes'); + return $attr; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $attr[$key] = $this->_string_shift($response, $length); } @@ -2792,13 +2893,13 @@ class SFTP extends SSH2 if (defined('NET_SFTP_LOGGING')) { $packet_type = '-> ' . $this->packet_types[$type] . ' (' . round($stop - $start, 4) . 's)'; - if (NET_SFTP_LOGGING == NET_SFTP_LOG_REALTIME) { + if (NET_SFTP_LOGGING == self::LOG_REALTIME) { echo "<pre>\r\n" . $this->_format_log(array($data), array($packet_type)) . "\r\n</pre>\r\n"; flush(); ob_flush(); } else { $this->packet_type_log[] = $packet_type; - if (NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX) { + if (NET_SFTP_LOGGING == self::LOG_COMPLEX) { $this->packet_log[] = $data; } } @@ -2836,6 +2937,9 @@ class SFTP extends SSH2 } $this->packet_buffer.= $temp; } + if (strlen($this->packet_buffer) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($this->packet_buffer, 4))); $tempLength = $length; $tempLength-= strlen($this->packet_buffer); @@ -2868,13 +2972,13 @@ class SFTP extends SSH2 if (defined('NET_SFTP_LOGGING')) { $packet_type = '<- ' . $this->packet_types[$this->packet_type] . ' (' . round($stop - $start, 4) . 's)'; - if (NET_SFTP_LOGGING == NET_SFTP_LOG_REALTIME) { + if (NET_SFTP_LOGGING == self::LOG_REALTIME) { echo "<pre>\r\n" . $this->_format_log(array($packet), array($packet_type)) . "\r\n</pre>\r\n"; flush(); ob_flush(); } else { $this->packet_type_log[] = $packet_type; - if (NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX) { + if (NET_SFTP_LOGGING == self::LOG_COMPLEX) { $this->packet_log[] = $packet; } } @@ -2898,10 +3002,10 @@ class SFTP extends SSH2 } switch (NET_SFTP_LOGGING) { - case NET_SFTP_LOG_COMPLEX: + case self::LOG_COMPLEX: return $this->_format_log($this->packet_log, $this->packet_type_log); break; - //case NET_SFTP_LOG_SIMPLE: + //case self::LOG_SIMPLE: default: return $this->packet_type_log; } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php index cc108a94f9866f409402bd1f0ee1e13160bbcd5e..9e608f4bcdb4c38b51f48a3b3effc09bdb9fd824 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php @@ -575,28 +575,46 @@ class SSH1 $this->_string_shift($response[self::RESPONSE_DATA], 4); + if (strlen($response[self::RESPONSE_DATA]) < 2) { + return false; + } $temp = unpack('nlen', $this->_string_shift($response[self::RESPONSE_DATA], 2)); $server_key_public_exponent = new BigInteger($this->_string_shift($response[self::RESPONSE_DATA], ceil($temp['len'] / 8)), 256); $this->server_key_public_exponent = $server_key_public_exponent; + if (strlen($response[self::RESPONSE_DATA]) < 2) { + return false; + } $temp = unpack('nlen', $this->_string_shift($response[self::RESPONSE_DATA], 2)); $server_key_public_modulus = new BigInteger($this->_string_shift($response[self::RESPONSE_DATA], ceil($temp['len'] / 8)), 256); + $this->server_key_public_modulus = $server_key_public_modulus; $this->_string_shift($response[self::RESPONSE_DATA], 4); + if (strlen($response[self::RESPONSE_DATA]) < 2) { + return false; + } $temp = unpack('nlen', $this->_string_shift($response[self::RESPONSE_DATA], 2)); $host_key_public_exponent = new BigInteger($this->_string_shift($response[self::RESPONSE_DATA], ceil($temp['len'] / 8)), 256); $this->host_key_public_exponent = $host_key_public_exponent; + if (strlen($response[self::RESPONSE_DATA]) < 2) { + return false; + } $temp = unpack('nlen', $this->_string_shift($response[self::RESPONSE_DATA], 2)); $host_key_public_modulus = new BigInteger($this->_string_shift($response[self::RESPONSE_DATA], ceil($temp['len'] / 8)), 256); + $this->host_key_public_modulus = $host_key_public_modulus; $this->_string_shift($response[self::RESPONSE_DATA], 4); // get a list of the supported ciphers + if (strlen($response[self::RESPONSE_DATA]) < 4) { + return false; + } extract(unpack('Nsupported_ciphers_mask', $this->_string_shift($response[self::RESPONSE_DATA], 4))); + foreach ($this->supported_ciphers as $mask => $name) { if (($supported_ciphers_mask & (1 << $mask)) == 0) { unset($this->supported_ciphers[$mask]); @@ -604,6 +622,9 @@ class SSH1 } // get a list of the supported authentications + if (strlen($response[self::RESPONSE_DATA]) < 4) { + return false; + } extract(unpack('Nsupported_authentications_mask', $this->_string_shift($response[self::RESPONSE_DATA], 4))); foreach ($this->supported_authentications as $mask => $name) { if (($supported_authentications_mask & (1 << $mask)) == 0) { @@ -1091,7 +1112,11 @@ class SSH1 } $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838 - $temp = unpack('Nlength', fread($this->fsock, 4)); + $data = fread($this->fsock, 4); + if (strlen($data) < 4) { + return false; + } + $temp = unpack('Nlength', $data); $padding_length = 8 - ($temp['length'] & 7); $length = $temp['length'] + $padding_length; @@ -1112,6 +1137,9 @@ class SSH1 $type = $raw[$padding_length]; $data = substr($raw, $padding_length + 1, -4); + if (strlen($raw) < 4) { + return false; + } $temp = unpack('Ncrc', substr($raw, -4)); //if ( $temp['crc'] != $this->_crc($padding . $type . $data) ) { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php index 1158075501fdef0ab01f39e1c0e0f3767eaf098c..937c38cc5a3e0e9fb7d5b9d6d0b95ee14cdb63a4 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php @@ -1005,7 +1005,10 @@ class SSH2 if (!is_resource($this->fsock)) { $start = microtime(true); - $this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout); + // with stream_select a timeout of 0 means that no timeout takes place; + // with fsockopen a timeout of 0 means that you instantly timeout + // to resolve this incompatibility a timeout of 100,000 will be used for fsockopen if timeout is 0 + $this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout == 0 ? 100000 : $this->curTimeout); if (!$this->fsock) { $host = $this->host . ':' . $this->port; user_error(rtrim("Cannot connect to $host. Error $errno. $errstr")); @@ -1021,6 +1024,10 @@ class SSH2 } } + $this->identifier = $this->_generate_identifier(); + + fputs($this->fsock, $this->identifier . "\r\n"); + /* According to the SSH2 specs, "The server MAY send other lines of data before sending the version @@ -1082,8 +1089,6 @@ class SSH2 $extra = $matches[1]; - $this->identifier = $this->_generate_identifier(); - if (defined('NET_SSH2_LOGGING')) { $this->_append_log('<-', $matches[0]); $this->_append_log('->', $this->identifier . "\r\n"); @@ -1099,15 +1104,13 @@ class SSH2 return false; } - fputs($this->fsock, $this->identifier . "\r\n"); - $response = $this->_get_binary_packet(); if ($response === false) { user_error('Connection closed by server'); return false; } - if (ord($response[0]) != NET_SSH2_MSG_KEXINIT) { + if (!strlen($response) || ord($response[0]) != NET_SSH2_MSG_KEXINIT) { user_error('Expected SSH_MSG_KEXINIT'); return false; } @@ -1304,36 +1307,69 @@ class SSH2 $this->_string_shift($response, 1); // skip past the message number (it should be SSH_MSG_KEXINIT) $server_cookie = $this->_string_shift($response, 16); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->kex_algorithms = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->server_host_key_algorithms = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->encryption_algorithms_client_to_server = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->encryption_algorithms_server_to_client = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->mac_algorithms_client_to_server = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->mac_algorithms_server_to_client = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->compression_algorithms_client_to_server = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->compression_algorithms_server_to_client = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->languages_client_to_server = explode(',', $this->_string_shift($response, $temp['length'])); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->languages_server_to_client = explode(',', $this->_string_shift($response, $temp['length'])); + if (!strlen($response)) { + return false; + } extract(unpack('Cfirst_kex_packet_follows', $this->_string_shift($response, 1))); $first_kex_packet_follows = $first_kex_packet_follows != 0; @@ -1432,10 +1468,16 @@ class SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('NprimeLength', $this->_string_shift($response, 4))); $primeBytes = $this->_string_shift($response, $primeLength); $prime = new BigInteger($primeBytes, -256); + if (strlen($response) < 4) { + return false; + } extract(unpack('NgLength', $this->_string_shift($response, 4))); $gBytes = $this->_string_shift($response, $gLength); $g = new BigInteger($gBytes, -256); @@ -1518,6 +1560,9 @@ class SSH2 user_error('Connection closed by server'); return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); if ($type != $serverKexReplyMessage) { @@ -1525,18 +1570,33 @@ class SSH2 return false; } + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->server_public_host_key = $server_public_host_key = $this->_string_shift($response, $temp['length']); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $public_key_format = $this->_string_shift($server_public_host_key, $temp['length']); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $fBytes = $this->_string_shift($response, $temp['length']); + if (strlen($response) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($response, 4)); $this->signature = $this->_string_shift($response, $temp['length']); + if (strlen($this->signature) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($this->signature, 4)); $this->signature_format = $this->_string_shift($this->signature, $temp['length']); @@ -1607,6 +1667,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); if ($type != NET_SSH2_MSG_NEWKEYS) { @@ -1937,6 +2000,9 @@ class SSH2 return false; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); if ($type != NET_SSH2_MSG_SERVICE_ACCEPT) { @@ -1986,6 +2052,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); switch ($type) { @@ -2041,6 +2110,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); switch ($type) { @@ -2048,14 +2120,23 @@ class SSH2 if (defined('NET_SSH2_LOGGING')) { $this->message_number_log[count($this->message_number_log) - 1] = 'NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ'; } + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->errors[] = 'SSH_MSG_USERAUTH_PASSWD_CHANGEREQ: ' . utf8_decode($this->_string_shift($response, $length)); return $this->_disconnect(NET_SSH2_DISCONNECT_AUTH_CANCELLED_BY_USER); case NET_SSH2_MSG_USERAUTH_FAILURE: // can we use keyboard-interactive authentication? if not then either the login is bad or the server employees // multi-factor authentication + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $auth_methods = explode(',', $this->_string_shift($response, $length)); + if (!strlen($response)) { + return false; + } extract(unpack('Cpartial_success', $this->_string_shift($response, 1))); $partial_success = $partial_success != 0; @@ -2130,16 +2211,31 @@ class SSH2 } } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); switch ($type) { case NET_SSH2_MSG_USERAUTH_INFO_REQUEST: + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->_string_shift($response, $length); // name; may be empty + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->_string_shift($response, $length); // instruction; may be empty + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->_string_shift($response, $length); // language tag; may be empty + if (strlen($response) < 4) { + return false; + } extract(unpack('Nnum_prompts', $this->_string_shift($response, 4))); for ($i = 0; $i < count($responses); $i++) { @@ -2154,6 +2250,9 @@ class SSH2 if (isset($this->keyboard_requests_responses)) { for ($i = 0; $i < $num_prompts; $i++) { + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); // prompt - ie. "Password: "; must not be empty $prompt = $this->_string_shift($response, $length); @@ -2299,10 +2398,16 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); switch ($type) { case NET_SSH2_MSG_USERAUTH_FAILURE: + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->errors[] = 'SSH_MSG_USERAUTH_FAILURE: ' . $this->_string_shift($response, $length); return false; @@ -2334,6 +2439,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); switch ($type) { @@ -2389,7 +2497,12 @@ class SSH2 $this->is_timeout = false; $this->stdErrorLog = ''; - if (!($this->bitmap & self::MASK_LOGIN)) { + if (!$this->isAuthenticated()) { + return false; + } + + if ($this->in_request_pty_exec) { + user_error('If you want to run multiple exec()\'s you will need to disable (and re-enable if appropriate) a PTY for each one.'); return false; } @@ -2452,6 +2565,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } list(, $type) = unpack('C', $this->_string_shift($response, 1)); switch ($type) { @@ -2588,6 +2704,9 @@ class SSH2 return false; } + if (!strlen($response)) { + return false; + } list(, $type) = unpack('C', $this->_string_shift($response, 1)); switch ($type) { @@ -2681,7 +2800,7 @@ class SSH2 $this->curTimeout = $this->timeout; $this->is_timeout = false; - if (!($this->bitmap & self::MASK_LOGIN)) { + if (!$this->isAuthenticated()) { user_error('Operation disallowed prior to login()'); return false; } @@ -2723,7 +2842,7 @@ class SSH2 */ function write($cmd) { - if (!($this->bitmap & self::MASK_LOGIN)) { + if (!$this->isAuthenticated()) { user_error('Operation disallowed prior to login()'); return false; } @@ -2923,6 +3042,9 @@ class SSH2 return false; } + if (strlen($raw) < 5) { + return false; + } extract(unpack('Npacket_length/Cpadding_length', $this->_string_shift($raw, 5))); $remaining_length = $packet_length + 4 - $this->decrypt_block_size; @@ -2998,6 +3120,9 @@ class SSH2 switch (ord($payload[0])) { case NET_SSH2_MSG_DISCONNECT: $this->_string_shift($payload, 1); + if (strlen($payload) < 8) { + return false; + } extract(unpack('Nreason_code/Nlength', $this->_string_shift($payload, 8))); $this->errors[] = 'SSH_MSG_DISCONNECT: ' . $this->disconnect_reasons[$reason_code] . "\r\n" . utf8_decode($this->_string_shift($payload, $length)); $this->bitmap = 0; @@ -3007,6 +3132,9 @@ class SSH2 break; case NET_SSH2_MSG_DEBUG: $this->_string_shift($payload, 2); + if (strlen($payload) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($payload, 4))); $this->errors[] = 'SSH_MSG_DEBUG: ' . utf8_decode($this->_string_shift($payload, $length)); $payload = $this->_get_binary_packet(); @@ -3024,17 +3152,23 @@ class SSH2 } // see http://tools.ietf.org/html/rfc4252#section-5.4; only called when the encryption has been activated and when we haven't already logged in - if (($this->bitmap & self::MASK_CONNECTED) && !($this->bitmap & self::MASK_LOGIN) && ord($payload[0]) == NET_SSH2_MSG_USERAUTH_BANNER) { + if (($this->bitmap & self::MASK_CONNECTED) && !$this->isAuthenticated() && ord($payload[0]) == NET_SSH2_MSG_USERAUTH_BANNER) { $this->_string_shift($payload, 1); + if (strlen($payload) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($payload, 4))); $this->banner_message = utf8_decode($this->_string_shift($payload, $length)); $payload = $this->_get_binary_packet(); } // only called when we've already logged in - if (($this->bitmap & self::MASK_CONNECTED) && ($this->bitmap & self::MASK_LOGIN)) { + if (($this->bitmap & self::MASK_CONNECTED) && $this->isAuthenticated()) { switch (ord($payload[0])) { case NET_SSH2_MSG_GLOBAL_REQUEST: // see http://tools.ietf.org/html/rfc4254#section-4 + if (strlen($payload) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($payload, 4))); $this->errors[] = 'SSH_MSG_GLOBAL_REQUEST: ' . $this->_string_shift($payload, $length); @@ -3046,8 +3180,14 @@ class SSH2 break; case NET_SSH2_MSG_CHANNEL_OPEN: // see http://tools.ietf.org/html/rfc4254#section-5.1 $this->_string_shift($payload, 1); + if (strlen($payload) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($payload, 4))); $data = $this->_string_shift($payload, $length); + if (strlen($payload) < 4) { + return false; + } extract(unpack('Nserver_channel', $this->_string_shift($payload, 4))); switch ($data) { case 'auth-agent': @@ -3055,6 +3195,9 @@ class SSH2 if (isset($this->agent)) { $new_channel = self::CHANNEL_AGENT_FORWARD; + if (strlen($payload) < 8) { + return false; + } extract(unpack('Nremote_window_size', $this->_string_shift($payload, 4))); extract(unpack('Nremote_maximum_packet_size', $this->_string_shift($payload, 4))); @@ -3100,6 +3243,9 @@ class SSH2 break; case NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST: $this->_string_shift($payload, 1); + if (strlen($payload) < 8) { + return false; + } extract(unpack('Nchannel', $this->_string_shift($payload, 4))); extract(unpack('Nwindow_size', $this->_string_shift($payload, 4))); $this->window_size_client_to_server[$channel]+= $window_size; @@ -3165,6 +3311,10 @@ class SSH2 */ function disablePTY() { + if ($this->in_request_pty_exec) { + $this->_close_channel(self::CHANNEL_EXEC); + $this->in_request_pty_exec = false; + } $this->request_pty = false; } @@ -3230,8 +3380,14 @@ class SSH2 return ''; } + if (!strlen($response)) { + return false; + } extract(unpack('Ctype', $this->_string_shift($response, 1))); + if (strlen($response) < 4) { + return false; + } if ($type == NET_SSH2_MSG_CHANNEL_OPEN) { extract(unpack('Nlength', $this->_string_shift($response, 4))); } else { @@ -3255,14 +3411,23 @@ class SSH2 case NET_SSH2_MSG_CHANNEL_OPEN: switch ($type) { case NET_SSH2_MSG_CHANNEL_OPEN_CONFIRMATION: + if (strlen($response) < 4) { + return false; + } extract(unpack('Nserver_channel', $this->_string_shift($response, 4))); $this->server_channels[$channel] = $server_channel; + if (strlen($response) < 4) { + return false; + } extract(unpack('Nwindow_size', $this->_string_shift($response, 4))); if ($window_size < 0) { $window_size&= 0x7FFFFFFF; $window_size+= 0x80000000; } $this->window_size_client_to_server[$channel] = $window_size; + if (strlen($response) < 4) { + return false; + } $temp = unpack('Npacket_size_client_to_server', $this->_string_shift($response, 4)); $this->packet_size_client_to_server[$channel] = $temp['packet_size_client_to_server']; $result = $client_channel == $channel ? true : $this->_get_channel_packet($client_channel, $skip_extended); @@ -3302,6 +3467,9 @@ class SSH2 $this->_send_channel_packet($channel, chr(0)); } */ + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $data = $this->_string_shift($response, $length); @@ -3328,6 +3496,9 @@ class SSH2 } */ // currently, there's only one possible value for $data_type_code: NET_SSH2_EXTENDED_DATA_STDERR + if (strlen($response) < 8) { + return false; + } extract(unpack('Ndata_type_code/Nlength', $this->_string_shift($response, 8))); $data = $this->_string_shift($response, $length); $this->stdErrorLog.= $data; @@ -3343,14 +3514,23 @@ class SSH2 $this->channel_buffers[$channel][] = $data; break; case NET_SSH2_MSG_CHANNEL_REQUEST: + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $value = $this->_string_shift($response, $length); switch ($value) { case 'exit-signal': $this->_string_shift($response, 1); + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); $this->errors[] = 'SSH_MSG_CHANNEL_REQUEST (exit-signal): ' . $this->_string_shift($response, $length); $this->_string_shift($response, 1); + if (strlen($response) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($response, 4))); if ($length) { $this->errors[count($this->errors)].= "\r\n" . $this->_string_shift($response, $length); @@ -3363,6 +3543,9 @@ class SSH2 break; case 'exit-status': + if (strlen($response) < 5) { + return false; + } extract(unpack('Cfalse/Nexit_status', $this->_string_shift($response, 5))); $this->exit_status = $exit_status; @@ -3696,10 +3879,9 @@ class SSH2 switch (NET_SSH2_LOGGING) { case self::LOG_SIMPLE: return $this->message_number_log; - break; case self::LOG_COMPLEX: - return $this->_format_log($this->message_log, $this->message_number_log); - break; + $log = $this->_format_log($this->message_log, $this->message_number_log); + return PHP_SAPI == 'cli' ? $log : '<pre>' . $log . '</pre>'; default: return false; } @@ -3991,6 +4173,9 @@ class SSH2 $signature = $this->signature; $server_public_host_key = $this->server_public_host_key; + if (strlen($server_public_host_key) < 4) { + return false; + } extract(unpack('Nlength', $this->_string_shift($server_public_host_key, 4))); $this->_string_shift($server_public_host_key, $length); @@ -4006,15 +4191,27 @@ class SSH2 case 'ssh-dss': $zero = new BigInteger(); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $p = new BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $q = new BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $g = new BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $y = new BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256); @@ -4061,15 +4258,24 @@ class SSH2 break; case 'ssh-rsa': + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $e = new BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256); + if (strlen($server_public_host_key) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4)); $rawN = $this->_string_shift($server_public_host_key, $temp['length']); $n = new BigInteger($rawN, -256); $nLength = strlen(ltrim($rawN, "\0")); /* + if (strlen($signature) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($signature, 4)); $signature = $this->_string_shift($signature, $temp['length']); @@ -4082,6 +4288,9 @@ class SSH2 } */ + if (strlen($signature) < 4) { + return false; + } $temp = unpack('Nlength', $this->_string_shift($signature, 4)); $s = new BigInteger($this->_string_shift($signature, $temp['length']), 256); diff --git a/vendor/simplepie/simplepie/library/SimplePie.php b/vendor/simplepie/simplepie/library/SimplePie.php index 63ab10b5ff95760dea630faf11cfadbe583770e2..428bfc06886f22a71103450046bd05ba4f7b796b 100755 --- a/vendor/simplepie/simplepie/library/SimplePie.php +++ b/vendor/simplepie/simplepie/library/SimplePie.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors + * Copyright (c) 2004-2017, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,8 +33,8 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @version 1.4.3 - * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue + * @version 1.5 + * @copyright 2004-2017 Ryan Parman, Geoffrey Sneddon, Ryan McCue * @author Ryan Parman * @author Geoffrey Sneddon * @author Ryan McCue @@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie'); /** * SimplePie Version */ -define('SIMPLEPIE_VERSION', '1.4.3'); +define('SIMPLEPIE_VERSION', '1.5'); /** * SimplePie Build @@ -643,6 +643,12 @@ class SimplePie */ public $strip_htmltags = array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style'); + /** + * @var bool Should we throw exceptions, or use the old-style error property? + * @access private + */ + public $enable_exceptions = false; + /** * The SimplePie class contains feed level data and options * diff --git a/vendor/simplepie/simplepie/library/SimplePie/Category.php b/vendor/simplepie/simplepie/library/SimplePie/Category.php index 92d511e1ae64c8e9e69abbe95861a5b43d9842b4..df0f13f9a1807ca85c90c864f39aa294022e8636 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/Category.php +++ b/vendor/simplepie/simplepie/library/SimplePie/Category.php @@ -56,7 +56,7 @@ class SimplePie_Category /** * Category identifier * - * @var string + * @var string|null * @see get_term */ var $term; @@ -64,7 +64,7 @@ class SimplePie_Category /** * Categorization scheme identifier * - * @var string + * @var string|null * @see get_scheme() */ var $scheme; @@ -72,23 +72,36 @@ class SimplePie_Category /** * Human readable label * - * @var string + * @var string|null * @see get_label() */ var $label; + /** + * Category type + * + * category for <category> + * subject for <dc:subject> + * + * @var string|null + * @see get_type() + */ + var $type; + /** * Constructor, used to input the data * - * @param string $term - * @param string $scheme - * @param string $label + * @param string|null $term + * @param string|null $scheme + * @param string|null $label + * @param string|null $type */ - public function __construct($term = null, $scheme = null, $label = null) + public function __construct($term = null, $scheme = null, $label = null, $type = null) { $this->term = $term; $this->scheme = $scheme; $this->label = $label; + $this->type = $type; } /** @@ -109,14 +122,7 @@ class SimplePie_Category */ public function get_term() { - if ($this->term !== null) - { - return $this->term; - } - else - { - return null; - } + return $this->term; } /** @@ -126,31 +132,32 @@ class SimplePie_Category */ public function get_scheme() { - if ($this->scheme !== null) - { - return $this->scheme; - } - else - { - return null; - } + return $this->scheme; } /** * Get the human readable label * + * @param bool $strict * @return string|null */ - public function get_label() + public function get_label($strict = false) { - if ($this->label !== null) - { - return $this->label; - } - else + if ($this->label === null && $strict !== true) { return $this->get_term(); } + return $this->label; + } + + /** + * Get the category type + * + * @return string|null + */ + public function get_type() + { + return $this->type; } } diff --git a/vendor/simplepie/simplepie/library/SimplePie/Item.php b/vendor/simplepie/simplepie/library/SimplePie/Item.php index 3979b8f1b1d2627da671df7d58ddfdf160a72fbb..00f4179bffdbed07c9473a16a1d9c9f1f056f11c 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/Item.php +++ b/vendor/simplepie/simplepie/library/SimplePie/Item.php @@ -206,9 +206,10 @@ class SimplePie_Item * * @since Beta 2 * @param boolean $hash Should we force using a hash instead of the supplied ID? - * @return string + * @param string|false $fn User-supplied function to generate an hash + * @return string|null */ - public function get_id($hash = false, $fn = '') + public function get_id($hash = false, $fn = 'md5') { if (!$hash) { @@ -237,7 +238,15 @@ class SimplePie_Item return $this->sanitize($this->data['attribs'][SIMPLEPIE_NAMESPACE_RDF]['about'], SIMPLEPIE_CONSTRUCT_TEXT); } } - if ($fn === '' || !is_callable($fn)) $fn = 'md5'; + if ($fn === false) + { + return null; + } + elseif (!is_callable($fn)) + { + trigger_error('User-supplied function $fn must be callable', E_USER_WARNING); + $fn = 'md5'; + } return call_user_func($fn, $this->get_permalink().$this->get_title().$this->get_content()); } @@ -460,7 +469,8 @@ class SimplePie_Item { $categories = array(); - foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) + $type = 'category'; + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, $type) as $category) { $term = null; $scheme = null; @@ -477,9 +487,9 @@ class SimplePie_Item { $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_HTML); } - $categories[] = $this->registry->create('Category', array($term, $scheme, $label)); + $categories[] = $this->registry->create('Category', array($term, $scheme, $label, $type)); } - foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, $type) as $category) { // This is really the label, but keep this as the term also for BC. // Label will also work on retrieving because that falls back to term. @@ -492,15 +502,17 @@ class SimplePie_Item { $scheme = null; } - $categories[] = $this->registry->create('Category', array($term, $scheme, null)); + $categories[] = $this->registry->create('Category', array($term, $scheme, null, $type)); } - foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) + + $type = 'subject'; + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, $type) as $category) { - $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); + $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null, $type)); } - foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, $type) as $category) { - $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null)); + $categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null, $type)); } if (!empty($categories)) @@ -2814,9 +2826,17 @@ class SimplePie_Item { $length = ceil($link['attribs']['']['length']); } + if (isset($link['attribs']['']['title'])) + { + $title = $this->sanitize($link['attribs']['']['title'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $title = $title_parent; + } // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor - $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width)); + $this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title, $width)); } } diff --git a/vendor/splitbrain/php-archive/.gitignore b/vendor/splitbrain/php-archive/.gitignore index c6277c187bf8f14922e7322bcf90fa753e201db3..e11729e196077a9f41f8028764e6ee65a3960849 100644 --- a/vendor/splitbrain/php-archive/.gitignore +++ b/vendor/splitbrain/php-archive/.gitignore @@ -5,4 +5,4 @@ vendor/ composer.lock apigen.phar docs/ - +nbproject/ \ No newline at end of file diff --git a/vendor/splitbrain/php-archive/src/Tar.php b/vendor/splitbrain/php-archive/src/Tar.php index f9d7bfbc094a4c5e78ab15028f40bde918107a08..b25575854115ddbed0c8b7bfe215c97179069945 100644 --- a/vendor/splitbrain/php-archive/src/Tar.php +++ b/vendor/splitbrain/php-archive/src/Tar.php @@ -356,7 +356,7 @@ class Tar extends Archive } if ($this->comptype === Archive::COMPRESS_GZIP) { - return gzcompress($this->memory, $this->complevel); + return gzencode($this->memory, $this->complevel); } if ($this->comptype === Archive::COMPRESS_BZIP) { return bzcompress($this->memory);