diff options
296 files changed, 4259 insertions, 3924 deletions
diff --git a/.github/workflows/phpCS.yml b/.github/workflows/phpCS.yml index 33afda46a..b0ebe6998 100644 --- a/.github/workflows/phpCS.yml +++ b/.github/workflows/phpCS.yml @@ -1,15 +1,12 @@ name: PHP Code Style -on: - push: - pull_request: - branches: - - '**:**' +on: [push, pull_request] jobs: phpcs: name: PHP CodeSniffer runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/testLinux.yml b/.github/workflows/testLinux.yml index 415fd9b57..fc4ea350b 100644 --- a/.github/workflows/testLinux.yml +++ b/.github/workflows/testLinux.yml @@ -1,19 +1,16 @@ name: Linux Unit Tests -on: - push: - pull_request: - branches: - - '**:**' +on: [push, pull_request] jobs: run: name: PHP ${{ matrix.php-versions }} runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: matrix: - php-versions: ['7.2', '7.3', '7.4'] + php-versions: ['7.2', '7.3', '7.4', '8.0'] fail-fast: false services: diff --git a/.github/workflows/testWindows.yml b/.github/workflows/testWindows.yml index 6a023eb7e..7787e3c46 100644 --- a/.github/workflows/testWindows.yml +++ b/.github/workflows/testWindows.yml @@ -1,19 +1,16 @@ name: Windows Unit Tests -on: - push: - pull_request: - branches: - - '**:**' +on: [push, pull_request] jobs: run: name: PHP ${{ matrix.php-versions }} runs-on: windows-latest + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository strategy: matrix: - php-versions: ['7.2', '7.3', '7.4'] + php-versions: ['7.2', '7.3', '7.4', '8.0'] fail-fast: false steps: diff --git a/.gitignore b/.gitignore index de576886a..bc00b7f20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,17 @@ +# Editor and temporary files +*.swp +*.bak +*.old +*~ +*.DS_Store +*.iml +.idea/ +.buildpath +.project +.settings/ + +# DokuWiki +.htaccess /conf/*.local.conf /conf/acl.auth.php /conf/local.php @@ -10,19 +24,6 @@ /conf/plugin_lang/* /conf/plugins.local.* /conf/tpl/* -.htaccess -*.swp -*.bak -*.old -*~ -*.DS_Store -*.iml -.idea/ -# Eclipse IDE -.buildpath -.project -.settings/ -# DokuWiki /data/attic/* /data/cache/* /data/index/* @@ -70,6 +71,7 @@ composer.phar vendor/bin/* vendor/*/*/phpunit.xml* vendor/*/*/.travis.yml +vendor/*/*/.github vendor/*/*/bin/* vendor/*/*/tests/* vendor/*/*/test/* @@ -91,3 +93,7 @@ vendor/splitbrain/php-cli/screenshot* vendor/splitbrain/php-cli/generate-api.sh vendor/splitbrain/php-cli/apigen.neon +# PHPUnit tests +phpunit.phar +.phpunit.result.cache +_test/data/ diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index 4430b87a3..e785e3b18 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -3,33 +3,12 @@ use dokuwiki\Extension\PluginController; use dokuwiki\Extension\Event; use dokuwiki\Extension\EventHandler; - -if(!class_exists('PHPUnit_Framework_TestCase')) { - /** - * phpunit 5/6 compatibility - */ - class PHPUnit_Framework_TestCase extends PHPUnit\Framework\TestCase { - /** - * setExpectedException is deprecated in PHPUnit 6 - * - * @param string $class - * @param null|string $message - */ - public function setExpectedException($class, $message=null) { - $this->expectException($class); - if(!is_null($message)) { - $this->expectExceptionMessage($message); - } - } - } -} - /** * Helper class to provide basic functionality for tests * * @uses PHPUnit_Framework_TestCase and thus PHPUnit 5.7+ is required */ -abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { +abstract class DokuWikiTest extends PHPUnit\Framework\TestCase { /** * tests can override this @@ -46,11 +25,24 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { protected $pluginsDisabled = array(); /** + * setExpectedException was deprecated in PHPUnit 6 + * + * @param string $class + * @param null|string $message + */ + public function setExpectedException($class, $message=null) { + $this->expectException($class); + if(!is_null($message)) { + $this->expectExceptionMessage($message); + } + } + + /** * Setup the data directory * * This is ran before each test class */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass() : void { // just to be safe not to delete something undefined later if(!defined('TMP_DIR')) die('no temporary directory'); if(!defined('DOKU_TMP_DATA')) die('no temporary data directory'); @@ -66,7 +58,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { * @throws Exception if plugin actions fail * @return void */ - public function setUp() { + public function setUp() : void { // reload config global $conf, $config_cascade; @@ -103,6 +95,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { $conf['compression'] = 0; } // make real paths and check them + init_creationmodes(); init_paths(); init_files(); diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 23ca76eec..f9ad5ffde 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -197,7 +197,7 @@ class TestRequest { } $params = array(); - list($uri, $query) = explode('?', $uri, 2); + list($uri, $query) = array_pad(explode('?', $uri, 2), 2, null); if($query) parse_str($query, $params); $this->script = substr($uri, 1); diff --git a/_test/fetchphpunit.php b/_test/fetchphpunit.php index e66950d86..856e42382 100755 --- a/_test/fetchphpunit.php +++ b/_test/fetchphpunit.php @@ -7,27 +7,16 @@ $phpVersion = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION; print "Running PHP $phpVersion\n"; -switch ($phpVersion) { - case '5.6': - $phpunit = 'phpunit-5.phar'; - break; - case '7.0': - $phpunit = 'phpunit-6.phar'; - break; - case '7.1': - case '7.2': - case '7.3': - $phpunit = 'phpunit-7.phar'; - break; - case '7.4': - $phpunit = 'phpunit-7.phar'; - // PHP 5 backward compatibility lock to PHPUnit 7 (type hinting) - break; - default: - $phpunit = 'phpunit-7.phar'; +if(version_compare($phpVersion, '7.2') < 0) { + echo 'we no longer support PHP versions < 7.2 and thus do not support tests on them'; + exit(1); } +// for now we default to phpunit-8 +$phpunit = 'phpunit-8.phar'; + + $url = "https://phar.phpunit.de/$phpunit"; $out = __DIR__ . '/phpunit.phar'; diff --git a/_test/tests/inc/FulltextPageLookupTest.php b/_test/tests/inc/FulltextPageLookupTest.php new file mode 100644 index 000000000..b0c98500b --- /dev/null +++ b/_test/tests/inc/FulltextPageLookupTest.php @@ -0,0 +1,22 @@ +<?php + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +/** + * Test cases search only in a namespace or exclude a namespace + */ +class FulltextPageLookupTest extends DokuWikiTest { + + public function test_inoutns() { + saveWikiText('test:page1', 'Some text', 'Test initialization'); + idx_addPage('test:page1'); + saveWikiText('ns:page2', 'Other text', 'Test initialization'); + idx_addPage('ns:page2'); + + $this->assertEquals(['test:page1' => null, 'ns:page2' => null], ft_pageLookup('page')); + $this->assertEquals(['test:page1' => null], ft_pageLookup('page @test')); + $this->assertEquals(['ns:page2' => null], ft_pageLookup('page ^test')); + } + +} diff --git a/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php b/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php index 3bc6a9c2f..d3d85c346 100644 --- a/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php +++ b/_test/tests/inc/Subscriptions/BulkSubscriptionsSenderTest.php @@ -12,15 +12,16 @@ class BulkSubscriptionsSenderTest extends DokuWikiTest private $originalSubscriptionConfig; - public function setUp() + public function setUp() : void { parent::setUp(); global $conf; $this->originalSubscriptionConfig = $conf['subscribers']; $conf['subscribers'] = true; + $conf['mailfromnobody'] = 'phpunit@example.com'; } - protected function tearDown() + protected function tearDown() : void { global $conf; $conf['subscribers'] = $this->originalSubscriptionConfig; diff --git a/_test/tests/inc/Subscriptions/SubscriberManagerTest.php b/_test/tests/inc/Subscriptions/SubscriberManagerTest.php index 1fcd7c84b..6c8b28fc4 100644 --- a/_test/tests/inc/Subscriptions/SubscriberManagerTest.php +++ b/_test/tests/inc/Subscriptions/SubscriberManagerTest.php @@ -9,7 +9,7 @@ class SubscriberManagerTest extends DokuWikiTest { private $originalSubscriptionConfig; - public function setUp() + public function setUp() : void { parent::setUp(); global $conf; @@ -17,7 +17,7 @@ class SubscriberManagerTest extends DokuWikiTest $conf['subscribers'] = true; } - protected function tearDown() + protected function tearDown() : void { global $conf; $conf['subscribers'] = $this->originalSubscriptionConfig; diff --git a/_test/tests/inc/XmlRpcServer.test.php b/_test/tests/inc/XmlRpcServer.test.php index 47d2f8cfc..6d5dffc76 100644 --- a/_test/tests/inc/XmlRpcServer.test.php +++ b/_test/tests/inc/XmlRpcServer.test.php @@ -15,7 +15,7 @@ class XmlRpcServerTest extends DokuWikiTest { protected $server; - function setUp() + function setUp () : void { parent::setUp(); global $conf; diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php index 2b5342e43..c2acafbf8 100644 --- a/_test/tests/inc/auth_aclcheck.test.php +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -6,7 +6,7 @@ class auth_acl_test extends DokuWikiTest { protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $AUTH_ACL; global $auth; @@ -14,7 +14,7 @@ class auth_acl_test extends DokuWikiTest { $auth = new AuthPlugin(); } - function tearDown() { + function tearDown() : void { global $AUTH_ACL; $AUTH_ACL = $this->oldAuthAcl; diff --git a/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php b/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php index af0f17223..77264dc52 100644 --- a/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php +++ b/_test/tests/inc/auth_aclcheck_caseinsensitive.test.php @@ -6,7 +6,7 @@ class auth_acl_caseinsensitive_test extends DokuWikiTest { protected $oldAuth; protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $auth; global $AUTH_ACL; @@ -17,7 +17,7 @@ class auth_acl_caseinsensitive_test extends DokuWikiTest { $auth = new AuthCaseInsensitivePlugin(); } - function tearDown() { + function tearDown() : void { global $conf; global $AUTH_ACL; global $auth; diff --git a/_test/tests/inc/auth_admincheck.test.php b/_test/tests/inc/auth_admincheck.test.php index 718cd642f..fea2f7152 100644 --- a/_test/tests/inc/auth_admincheck.test.php +++ b/_test/tests/inc/auth_admincheck.test.php @@ -8,7 +8,7 @@ class auth_admin_test extends DokuWikiTest private $oldauth; - function setUp() + function setUp() : void { parent::setUp(); global $auth; @@ -27,7 +27,27 @@ class auth_admin_test extends DokuWikiTest $auth = new AuthCaseInsensitivePlugin(); } - function teardown() + public function authenticateAdmin() + { + global $USERINFO; + $_SERVER['REMOTE_USER'] = 'testadmin'; + $USERINFO['grps'] = ['admin', 'foo', 'bar']; + + global $auth; + $auth = new \auth_plugin_authplain(); + } + + public function authenticateNonadmin() + { + global $USERINFO; + $_SERVER['REMOTE_USER'] = 'testuser'; + $USERINFO['grps'] = ['foo', 'bar']; + + global $auth; + $auth = new \auth_plugin_authplain(); + } + + function tearDown() : void { global $auth; global $AUTH_ACL; @@ -126,4 +146,56 @@ class auth_admin_test extends DokuWikiTest $this->assertTrue(auth_ismanager('Doe', array('admin'), true, true)); } + public function test_ismanager_authenticated_admin() + { + $this->authenticateAdmin(); + + global $conf; + $conf['superuser'] = '@admin'; + $conf['manager'] = '@managers'; + + global $auth; + $auth->createUser( + 'alice', + '179ad45c6ce2cb97cf1029e212046e81', + 'Alice', + 'alice@example.com', + [ + 'foo' + ] + ); + $auth->createUser( + 'bob', + '179ad45c6ce2cb97cf1029e212046e81', + 'Robert', + 'bob@example.com', + [ + 'managers' + ] + ); + + $this->assertFalse(auth_ismanager('alice', null, false, true)); + $this->assertTrue(auth_ismanager('bob', null, false, true)); + } + + public function test_isadmin_authenticated_nonadmin() + { + $this->authenticateNonadmin(); + + global $conf; + $conf['superuser'] = '@admin'; + + global $auth; + $auth->createUser( + 'camilla', + '179ad45c6ce2cb97cf1029e212046e81', + 'Camilla', + 'camilla@example.com', + [ + 'admin' + ] + ); + + $this->assertTrue(auth_ismanager('camilla', null, true, true)); + } } diff --git a/_test/tests/inc/auth_loadacl.test.php b/_test/tests/inc/auth_loadacl.test.php index e8d9f6696..7fae2e90e 100644 --- a/_test/tests/inc/auth_loadacl.test.php +++ b/_test/tests/inc/auth_loadacl.test.php @@ -7,14 +7,14 @@ class auth_loadacl_test extends DokuWikiTest { - function setUp() { + function setUp() : void { global $USERINFO; parent::setUp(); $_SERVER['REMOTE_USER'] = 'testuser'; $USERINFO['grps'] = array('foo','bar'); } - function tearDown() { + function tearDown() : void { parent::tearDown(); } diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php index 86db843d6..a41a4df76 100644 --- a/_test/tests/inc/auth_nameencode.test.php +++ b/_test/tests/inc/auth_nameencode.test.php @@ -2,7 +2,7 @@ class auth_nameencode_test extends DokuWikiTest { - function tearDown() { + function tearDown() : void { global $cache_authname; $cache_authname = array(); } diff --git a/_test/tests/inc/cache_use.test.php b/_test/tests/inc/cache_use.test.php index 3a1028d13..76e81a546 100644 --- a/_test/tests/inc/cache_use.test.php +++ b/_test/tests/inc/cache_use.test.php @@ -13,7 +13,7 @@ class cache_use_test extends DokuWikiTest { /** @var CacheRenderer $cache */ private $cache; - function setUp() { + function setUp() : void { global $ID, $conf; parent::setUp(); diff --git a/_test/tests/inc/changelog_getRevisionsAround.test.php b/_test/tests/inc/changelog_getRevisionsAround.test.php index ad6d3afcf..2504487cc 100644 --- a/_test/tests/inc/changelog_getRevisionsAround.test.php +++ b/_test/tests/inc/changelog_getRevisionsAround.test.php @@ -31,7 +31,7 @@ class changelog_getrevisionsaround_test extends DokuWikiTest { ); private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getlastrevisionat.test.php b/_test/tests/inc/changelog_getlastrevisionat.test.php index cec54f6db..49b3b2415 100644 --- a/_test/tests/inc/changelog_getlastrevisionat.test.php +++ b/_test/tests/inc/changelog_getlastrevisionat.test.php @@ -14,7 +14,7 @@ class changelog_getlastrevisionat_test extends DokuWikiTest { private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; @@ -140,7 +140,7 @@ class changelog_getlastrevisionat_test extends DokuWikiTest { //save settings $oldSuperUser = $conf['superuser']; $oldUseacl = $conf['useacl']; - $oldRemoteUser = $_SERVER['REMOTE_USER']; + $oldRemoteUser = isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : null; $conf['superuser'] = 'admin'; $conf['useacl'] = 1; @@ -165,7 +165,9 @@ class changelog_getlastrevisionat_test extends DokuWikiTest { $this->assertLessThanOrEqual(time(), $current); //restore settings - $_SERVER['REMOTE_USER'] = $oldRemoteUser; + if ($oldRemoteUser !== null) { + $_SERVER['REMOTE_USER'] = $oldRemoteUser; + } $conf['superuser'] = $oldSuperUser; $conf['useacl'] = $oldUseacl; } diff --git a/_test/tests/inc/changelog_getrelativerevision.test.php b/_test/tests/inc/changelog_getrelativerevision.test.php index 49d7a0915..4268e702f 100644 --- a/_test/tests/inc/changelog_getrelativerevision.test.php +++ b/_test/tests/inc/changelog_getrelativerevision.test.php @@ -14,7 +14,7 @@ class changelog_getrelativerevision_test extends DokuWikiTest { private $logline = "1362525899 127.0.0.1 E mailinglist pubcie [Data entry] \n"; private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getrevisioninfo.test.php b/_test/tests/inc/changelog_getrevisioninfo.test.php index 2d7ad131a..3decad0ef 100644 --- a/_test/tests/inc/changelog_getrevisioninfo.test.php +++ b/_test/tests/inc/changelog_getrevisioninfo.test.php @@ -15,7 +15,7 @@ class changelog_getrevisionsinfo_test extends DokuWikiTest { private $firstlogline = "1374261194 127.0.0.1 E mailinglist pubcie \n"; private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/changelog_getrevisions.test.php b/_test/tests/inc/changelog_getrevisions.test.php index e29b80997..0bd378c3c 100644 --- a/_test/tests/inc/changelog_getrevisions.test.php +++ b/_test/tests/inc/changelog_getrevisions.test.php @@ -31,7 +31,7 @@ class changelog_getrevisions_test extends DokuWikiTest { ); private $pageid = 'mailinglist'; - function setup() { + function setup() : void { parent::setup(); global $cache_revinfo; $cache =& $cache_revinfo; diff --git a/_test/tests/inc/cli_options.test.php b/_test/tests/inc/cli_options.test.php deleted file mode 100644 index ab03ee29b..000000000 --- a/_test/tests/inc/cli_options.test.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -class cli_options extends DokuWikiTest { - - function test_simpleshort() { - $options = new DokuCLI_Options(); - $options->registerOption('exclude', 'exclude files', 'x', 'file'); - - $options->args = array('-x', 'foo', 'bang'); - $options->parseOptions(); - - $this->assertEquals('foo', $options->getOpt('exclude')); - $this->assertEquals(array('bang'), $options->args); - $this->assertFalse($options->getOpt('nothing')); - } - - function test_simplelong1() { - $options = new DokuCLI_Options(); - $options->registerOption('exclude', 'exclude files', 'x', 'file'); - - $options->args = array('--exclude', 'foo', 'bang'); - $options->parseOptions(); - - $this->assertEquals('foo', $options->getOpt('exclude')); - $this->assertEquals(array('bang'), $options->args); - $this->assertFalse($options->getOpt('nothing')); - } - - function test_simplelong2() { - $options = new DokuCLI_Options(); - $options->registerOption('exclude', 'exclude files', 'x', 'file'); - - $options->args = array('--exclude=foo', 'bang'); - $options->parseOptions(); - - $this->assertEquals('foo', $options->getOpt('exclude')); - $this->assertEquals(array('bang'), $options->args); - $this->assertFalse($options->getOpt('nothing')); - } - - function test_complex() { - $options = new DokuCLI_Options(); - - $options->registerOption('plugins', 'run on plugins only', 'p'); - $options->registerCommand('status', 'display status info'); - $options->registerOption('long', 'display long lines', 'l', false, 'status'); - - $options->args = array('-p', 'status', '--long', 'foo'); - $options->parseOptions(); - - $this->assertEquals('status', $options->getCmd()); - $this->assertTrue($options->getOpt('plugins')); - $this->assertTrue($options->getOpt('long')); - $this->assertEquals(array('foo'), $options->args); - } -}
\ No newline at end of file diff --git a/_test/tests/inc/common_basicinfo.test.php b/_test/tests/inc/common_basicinfo.test.php index 1bcc1a0d5..bdb77087e 100644 --- a/_test/tests/inc/common_basicinfo.test.php +++ b/_test/tests/inc/common_basicinfo.test.php @@ -2,7 +2,7 @@ class common_infofunctions_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/common_clientip.test.php b/_test/tests/inc/common_clientip.test.php index b06390ee4..a546d4faf 100644 --- a/_test/tests/inc/common_clientip.test.php +++ b/_test/tests/inc/common_clientip.test.php @@ -2,7 +2,7 @@ class common_clientIP_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $conf; diff --git a/_test/tests/inc/common_mediainfo.test.php b/_test/tests/inc/common_mediainfo.test.php index cc5b17ec7..685a36be9 100644 --- a/_test/tests/inc/common_mediainfo.test.php +++ b/_test/tests/inc/common_mediainfo.test.php @@ -1,8 +1,8 @@ <?php class common_basicinfo_test extends DokuWikiTest { - - function setup(){ + + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php index adc9538d2..47651240f 100644 --- a/_test/tests/inc/common_pageinfo.test.php +++ b/_test/tests/inc/common_pageinfo.test.php @@ -6,7 +6,7 @@ */ class common_pageinfo_test extends DokuWikiTest { - function setup(){ + function setup() : void { parent::setup(); global $USERINFO; diff --git a/_test/tests/inc/httpclient_https.test.php b/_test/tests/inc/httpclient_https.test.php index 0163501b2..f16f52e13 100644 --- a/_test/tests/inc/httpclient_https.test.php +++ b/_test/tests/inc/httpclient_https.test.php @@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/httpclient_http.test.php'; class httpclient_https_test extends httpclient_http_test { protected $server = 'https://eu.httpbin.org/'; - public function setUp(){ + public function setUp() : void { // skip tests when this PHP has no SSL support $transports = stream_get_transports(); if(!in_array('ssl',$transports)){ diff --git a/_test/tests/inc/httpclient_https_proxy.test.php b/_test/tests/inc/httpclient_https_proxy.test.php index 2e9381d07..9ad0a3531 100644 --- a/_test/tests/inc/httpclient_https_proxy.test.php +++ b/_test/tests/inc/httpclient_https_proxy.test.php @@ -4,7 +4,7 @@ require_once dirname(__FILE__).'/httpclient_http_proxy.test.php'; class httpclient_https_proxy_test extends httpclient_http_proxy_test { protected $url = 'https://eu.httpbin.org/user-agent'; - public function setUp(){ + public function setUp() : void { // skip tests when this PHP has no SSL support $transports = stream_get_transports(); if(!in_array('ssl',$transports)){ diff --git a/_test/tests/inc/indexer_indexing.test.php b/_test/tests/inc/indexer_indexing.test.php index 3d4777f11..8c28cfb63 100644 --- a/_test/tests/inc/indexer_indexing.test.php +++ b/_test/tests/inc/indexer_indexing.test.php @@ -5,7 +5,7 @@ * @author Michael Hamann <michael@content-space.de> */ class indexer_indexing_test extends DokuWikiTest { - public function setUp() { + public function setUp() : void { parent::setUp(); saveWikiText('testpage', 'Foo bar baz.', 'Test initialization'); saveWikiText('notfound', 'Foon barn bazn.', 'Test initialization'); diff --git a/_test/tests/inc/indexer_rename.test.php b/_test/tests/inc/indexer_rename.test.php index 2dbe6dcad..97b51be2c 100644 --- a/_test/tests/inc/indexer_rename.test.php +++ b/_test/tests/inc/indexer_rename.test.php @@ -8,7 +8,7 @@ class indexer_rename_test extends DokuWikiTest { private $old_id = 'old_testid'; - function setUp() { + function setUp() : void { parent::setUp(); $this->indexer = idx_get_indexer(); $this->indexer->clear(); diff --git a/_test/tests/inc/input.test.php b/_test/tests/inc/input.test.php index 099a8eb81..880f51b42 100644 --- a/_test/tests/inc/input.test.php +++ b/_test/tests/inc/input.test.php @@ -227,12 +227,12 @@ class input_test extends DokuWikiTest { $INPUT = new Input(); $INPUT->remove('string'); - $this->assertNull($_REQUEST['string']); - $this->assertNull($_POST['string']); - $this->assertNull($_GET['string']); + $this->assertArrayNotHasKey('string', $_REQUEST); + $this->assertArrayNotHasKey('string', $_POST); + $this->assertArrayNotHasKey('string', $_GET); $INPUT->post->remove('int'); - $this->assertNull($_POST['int']); + $this->assertArrayNotHasKey('int', $_POST); $this->assertEquals(17, $_GET['int']); $this->assertEquals(17, $_REQUEST['int']); } @@ -245,13 +245,13 @@ class input_test extends DokuWikiTest { $INPUT->set('test','foo'); $this->assertEquals('foo',$_REQUEST['test']); - $this->assertNull($_POST['test']); - $this->assertNull($_GET['test']); + $this->assertArrayNotHasKey('test', $_POST); + $this->assertArrayNotHasKey('test', $_GET); $INPUT->get->set('test2','foo'); $this->assertEquals('foo',$_GET['test2']); $this->assertEquals('foo',$_REQUEST['test2']); - $this->assertNull($_POST['test']); + $this->assertArrayNotHasKey('test2', $_POST); } public function test_ref(){ diff --git a/_test/tests/inc/lang.php b/_test/tests/inc/lang.php new file mode 100644 index 000000000..a7b01f01f --- /dev/null +++ b/_test/tests/inc/lang.php @@ -0,0 +1,238 @@ +<?php + +/** + * Language file tests inspired by the script by schplurtz + * @link https://www.dokuwiki.org/teams:i18n:translation-check + */ +class lang_test extends DokuWikiTest +{ + /** + * returen all languages except english + * + * @return string[] + */ + protected function findLanguages() + { + $languages = glob(DOKU_INC . 'inc/lang/*', GLOB_ONLYDIR); + $languages = array_map('basename', $languages); + $languages = array_filter($languages, function ($in) { + return $in !== 'en'; + }); + return $languages; + } + + /** + * Get all installed plugins + * + * This finds all things that might be a plugin and does not care for enabled or not. + * + * @return string[] + */ + protected function findPlugins() + { + $plugins = glob(DOKU_INC . 'lib/plugins/*', GLOB_ONLYDIR); + return $plugins; + } + + /** + * Get all installed templates + * + * This finds all things that might be a template and does not care for enabled or not. + * + * @return string[] + */ + protected function findTemplates() + { + $templates = glob(DOKU_INC . 'lib/tpl/*', GLOB_ONLYDIR); + return $templates; + } + + /** + * Load the strings for the given language + * + * @param string $lang + * @return array + */ + protected function loadLanguage($file) + { + $lang = []; + if (file_exists($file)) { + include $file; + } + return $lang; + } + + /** + * Provide all the language files to compare + * + * @return Generator + */ + public function provideLanguageFiles() + { + $bases = array_merge( + [DOKU_INC . 'inc'], + $this->findPlugins(), + $this->findTemplates() + ); + + foreach ($this->findLanguages() as $code) { + foreach ($bases as $base) { + foreach (['lang.php', 'settings.php'] as $file) { + $englishFile = "$base/lang/en/$file"; + $foreignFile = "$base/lang/$code/$file"; + $name = substr($foreignFile, strlen(DOKU_INC)); + $name = '…'.substr($name, -35); + + if (file_exists($foreignFile)) { + yield ([ + $this->loadLanguage($englishFile), + $this->loadLanguage($foreignFile), + $code, + $name, + ]); + } + } + } + } + } + + /** + * Check for obsolete language strings + * + * @param array $english key/value language pairs for English + * @param array $foreign key/value language pairs for the foreign language + * @param string $code language code of the foreign file + * @param string $file the base file name the foreign keys came from + * @param string $prefix sub key that is currently checked (used in recursion) + * @dataProvider provideLanguageFiles + */ + public function testObsolete($english, $foreign, $code, $file, $prefix = '') + { + $this->assertGreaterThan(0, count($foreign), "$file exists but has no translations"); + + foreach ($foreign as $key => $value) { + $name = $prefix ? $prefix . $key : $key; + $this->assertArrayHasKey($key, $english, "$file: obsolete/unknown key '$name'"); + + // sub arrays as for the js translations: + if (is_array($value) && is_array($english[$key])) { + $this->testObsolete($english[$key], $value, $code, $file, $key); + } + } + } + + /** + * Check for sprintf format placeholder equality + * + * @param array $english key/value language pairs for English + * @param array $foreign key/value language pairs for the foreign language + * @param string $code language code of the foreign file + * @param string $file the base file name the foreign keys came from + * @param string $prefix sub key that is currently checked (used in recursion) + * @dataProvider provideLanguageFiles + */ + public function testPlaceholders($english, $foreign, $code, $file, $prefix = '') + { + $this->assertGreaterThan(0, count($foreign), "$file exists but has no translations"); + + foreach ($foreign as $key => $value) { + // non existing in english is skipped here, that what testObsolete checks + if (!isset($english[$key])) continue; + + // sub arrays as for the js translations: + if (is_array($value) && is_array($english[$key])) { + $this->testPlaceholders($english[$key], $value, $code, $file, $key); + return; + } + + $name = $prefix ? $prefix . $key : $key; + + $englishPlaceholders = $this->parsePlaceholders($english[$key]); + $foreignPlaceholders = $this->parsePlaceholders($value); + $countEnglish = count($englishPlaceholders); + $countForeign = count($foreignPlaceholders); + + $this->assertEquals($countEnglish, $countForeign, + join("\n", + [ + "$file: unequal amount of sprintf format placeholders in '$name'", + "en: '" . $english[$key] . "'", + "$code: '$value'", + ] + ) + ); + + $this->assertEquals($englishPlaceholders, $foreignPlaceholders, + join("\n", + [ + "$file: sprintf format mismatch in '$name'", + "en: '" . $english[$key] . "'", + "$code: '$value'", + ] + ) + ); + } + } + + /** + * Parses the placeholders from a string and brings them in the correct order + * + * This has its own test below. + * + * @param string $string + */ + protected function parsePlaceholders($string) + { + if (!preg_match_all('/%(?:([0-9]+)\$)?([-.0-9hl]*?[%dufsc])/', $string, $matches, PREG_SET_ORDER)) { + return []; + } + + // Given this string : 'schproutch %2$s with %1$04d in %-20s plouf' + // we have this in $matches: + // [ + // 0 => ['%2$s', 2, 's'], + // 1 => ['%1$04d', 1, '04d'], + // 2 => ['%-20s', '', '-20s'], + // ] + + // sort by the given sorting in key 1 + usort($matches, function ($a, $b) { + if ($a[1] === $b[1]) return 0; // keep as is + + // sort empties towards the back + if ($a[1] === '') $a[1] = 9999; + if ($b[1] === '') $b[1] = 9999; + + // compare sort numbers + if ((int)$a[1] < (int)$b[1]) return -1; + if ((int)$a[1] > (int)$b[1]) return 1; + return 0; + }); + + // return values in key 2 + return array_column($matches, 2); + } + + /** + * Dataprovider for the parsePlaceholder test + * @return array[] + */ + public function providePlaceholders() + { + return [ + ['schproutch %2$s with %1$04d in %-20s plouf', ['04d', 's', '-20s']], + ]; + } + + /** + * Test the parsePlaceholder utility function above + * + * @param string $input + * @param array $expected + * @dataProvider providePlaceholders + */ + public function testParsePlaceholders($input, $expected) + { + $this->assertEquals($expected, $this->parsePlaceholders($input)); + } +} diff --git a/_test/tests/inc/media_searchlist.test.php b/_test/tests/inc/media_searchlist.test.php index b881ccc95..234c2f521 100644 --- a/_test/tests/inc/media_searchlist.test.php +++ b/_test/tests/inc/media_searchlist.test.php @@ -1,6 +1,7 @@ <?php -class media_searchlist_test extends DokuWikiTest { +class media_searchlist_test extends DokuWikiTest +{ /** * @var string namespace used for testing @@ -10,11 +11,12 @@ class media_searchlist_test extends DokuWikiTest { /** * Save the file * - * @param $name name of saving file - * @param $copy file used as a content of uploaded file + * @param string $name name of saving file + * @param string $copy file used as a content of uploaded file */ - protected function save($name, $copy) { - $media_id = $this->upload_ns.':'.$name; + protected function save($name, $copy) + { + $media_id = $this->upload_ns . ':' . $name; media_save(array('name' => $copy), $media_id, true, AUTH_UPLOAD, 'copy'); } @@ -23,7 +25,10 @@ class media_searchlist_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void + { + parent::setUp(); + //create some files to search $png = mediaFN('wiki:kind_zu_katze.png'); $ogv = mediaFN('wiki:kind_zu_katze.ogv'); @@ -44,54 +49,6 @@ class media_searchlist_test extends DokuWikiTest { } - /* - * 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 @@ -100,159 +57,53 @@ class media_searchlist_test extends DokuWikiTest { * @param $ns * @return string */ - protected function media_searchlist($query, $ns) { + 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 + * @return array[] + * @see testSearch */ - 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'] = \dokuwiki\Utf8\PhpString::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; + public function provideSearch() + { + return [ + ['a.png', ['a:a.png', 'b:a.png', 'a.png', 'aa.png']], // no globbing + ['a*.png', ['a:a.png', 'b:a.png', 'a.png', 'aa.png', 'ab.png']], // globbing asterisk + ['*.ogv', ['a.ogv', 'aa.ogv', 'ab.ogv']], // globbing find by ext + ['a?.png', ['aa.png', 'ab.png']], // globbing question mark + ['a?.*', ['aa.ogv', 'aa.png', 'ab.ogv', 'ab.png']], // globbing question mark and asterisk + ['?.png', ['a:a.png', 'b:a.png', 'a.png']], // globbing question mark on the beginning + ['??.png', ['aa.png', 'ab.png']], // globbing two question marks on the beginning + ['??.*', ['aa.ogv', 'aa.png', 'ab.ogv', 'ab.png']], // globbing two letter file names + ['0', ['0.webm']], // zero search + ]; } /** - * 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 + * @dataProvider provideSearch + * @param string $query The query to use + * @param string[] $expected The expected media IDs in the result HTML + * @throws Exception */ - 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); + public function testSearch($query, $expected) + { + $result = $this->media_searchlist($query, $this->upload_ns); + $pq = phpQuery::newDocument($result); + + $elements = $pq->find('a.mediafile'); + $actual = []; + foreach ($elements as $element) { + $actual[] = $element->textContent; } - //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); + $this->assertEquals(count($expected), count($elements)); + $this->assertEquals($expected, $actual); } - 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_clean_id.test.php b/_test/tests/inc/pageutils_clean_id.test.php index 369e0b849..c6972576a 100644 --- a/_test/tests/inc/pageutils_clean_id.test.php +++ b/_test/tests/inc/pageutils_clean_id.test.php @@ -4,7 +4,7 @@ class init_clean_id_test extends DokuWikiTest { /** @inheritDoc */ - function teardown() + function teardown() : void { global $cache_cleanid; $cache_cleanid = array(); @@ -92,9 +92,9 @@ class init_clean_id_test extends DokuWikiTest foreach ($tests as $test) { // defaults - $sepchar = $test[2]['sepchar'] ?: '_'; + $sepchar = isset($test[2]['sepchar']) ? $test[2]['sepchar'] : '_'; $deaccent = isset($test[2]['deaccent']) ? $test[2]['deaccent'] : 1; - $ascii = $test[2]['ascii'] ?: false; + $ascii = isset($test[2]['ascii']) ? $test[2]['ascii'] : false; // unless set, test both useslash settings if (isset($test[2]['useslash'])) { diff --git a/_test/tests/inc/pageutils_findnearest.test.php b/_test/tests/inc/pageutils_findnearest.test.php index 55db44afa..4f97f5be9 100644 --- a/_test/tests/inc/pageutils_findnearest.test.php +++ b/_test/tests/inc/pageutils_findnearest.test.php @@ -6,7 +6,7 @@ class pageutils_findnearest_test extends DokuWikiTest { protected $oldAuthAcl; - function setUp() { + function setUp() : void { parent::setUp(); global $AUTH_ACL; global $auth; @@ -25,7 +25,7 @@ class pageutils_findnearest_test extends DokuWikiTest { ); } - function tearDown() { + function tearDown() : void { global $AUTH_ACL; $AUTH_ACL = $this->oldAuthAcl; } diff --git a/_test/tests/inc/pageutils_sectionid.test.php b/_test/tests/inc/pageutils_sectionid.test.php new file mode 100644 index 000000000..f7cfcc68a --- /dev/null +++ b/_test/tests/inc/pageutils_sectionid.test.php @@ -0,0 +1,43 @@ +<?php + +class sectionid_test extends Dokuwikitest +{ + /** + * DataProvider + * + * @return Generator|array + * @see testSectionidsAreUnique + */ + public function provideTestData(){ + // Each test case represents a sequence of sections title + return [ + [['A', 'A', 'A1']], + [['A', 'A1', 'A']] + ]; + } + + /** + * @dataProvider provideTestData + * @param array $titles + */ + function testSectionidsAreUnique($titles) + { + $check = array(); + $alreadyGeneratedIds = array(); + foreach($titles as $title){ + $newId = sectionID($title, $check); + $this->assertNotContains($newId, $alreadyGeneratedIds, "id $newId has been generated twice. The 2nd time it was for the title $title"); + $alreadyGeneratedIds []= $newId; + } + } + + /** + * The convention in the code is to pass $check=false when we're not interested in having + * unique sectionID. This test ensures that this type of call is correctly handled + */ + function testSectionIDCanBeCalledWithNonArrayCheck(){ + $check = false; + $this->assertEquals("abc", sectionID("abc", $check), "Passing \$check=false shouldn't lead to an error"); + $this->assertEquals("abc", sectionID("abc", $check), "Passing \$check=false shouldn't try to deduplicate id"); + } +} diff --git a/_test/tests/inc/parser/parser.inc.php b/_test/tests/inc/parser/parser.inc.php index 153f67b26..f0d141eb9 100644 --- a/_test/tests/inc/parser/parser.inc.php +++ b/_test/tests/inc/parser/parser.inc.php @@ -13,13 +13,13 @@ abstract class TestOfDoku_Parser extends DokuWikiTest { /** @var Doku_Handler */ protected $H; - function setUp() { + function setUp() : void { parent::setUp(); $this->H = new Doku_Handler(); $this->P = new Parser($this->H); } - function tearDown() { + function tearDown() : void { unset($this->P); unset($this->H); } diff --git a/_test/tests/inc/parser/parser_code.test.php b/_test/tests/inc/parser/parser_code.test.php index 961db7dd2..c700ed10a 100644 --- a/_test/tests/inc/parser/parser_code.test.php +++ b/_test/tests/inc/parser/parser_code.test.php @@ -11,7 +11,7 @@ require_once 'parser.inc.php'; */ class TestOfDoku_Parser_Code extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('code',new Code()); } diff --git a/_test/tests/inc/parser/parser_file.test.php b/_test/tests/inc/parser/parser_file.test.php index 407b04a48..23aa8ef5b 100644 --- a/_test/tests/inc/parser/parser_file.test.php +++ b/_test/tests/inc/parser/parser_file.test.php @@ -6,7 +6,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_File extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('file',new File()); } diff --git a/_test/tests/inc/parser/parser_footnote.test.php b/_test/tests/inc/parser/parser_footnote.test.php index 96d7a8407..d7b78cb64 100644 --- a/_test/tests/inc/parser/parser_footnote.test.php +++ b/_test/tests/inc/parser/parser_footnote.test.php @@ -16,7 +16,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); $this->P->addMode('footnote',new Footnote()); } diff --git a/_test/tests/inc/parser/parser_quotes.test.php b/_test/tests/inc/parser/parser_quotes.test.php index fb192d21f..73291c201 100644 --- a/_test/tests/inc/parser/parser_quotes.test.php +++ b/_test/tests/inc/parser/parser_quotes.test.php @@ -6,7 +6,7 @@ require_once 'parser.inc.php'; class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { - function setUp() { + function setUp() : void { parent::setUp(); global $conf; $conf['typography'] = 2; diff --git a/_test/tests/inc/parser/renderer_metadata.test.php b/_test/tests/inc/parser/renderer_metadata.test.php index 5498d6f1f..cdfe31689 100644 --- a/_test/tests/inc/parser/renderer_metadata.test.php +++ b/_test/tests/inc/parser/renderer_metadata.test.php @@ -12,12 +12,12 @@ class renderer_metadata_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void { parent::setUp(); $this->R = new Doku_Renderer_metadata(); } - function tearDown() { + function tearDown() : void { unset($this->R); } diff --git a/_test/tests/inc/parser/renderer_xhtml.test.php b/_test/tests/inc/parser/renderer_xhtml.test.php index 9b635c604..44fe48854 100644 --- a/_test/tests/inc/parser/renderer_xhtml.test.php +++ b/_test/tests/inc/parser/renderer_xhtml.test.php @@ -14,12 +14,12 @@ class renderer_xhtml_test extends DokuWikiTest { * * @throws Exception */ - function setUp() { + function setUp() : void { parent::setUp(); $this->R = new Doku_Renderer_xhtml(); } - function tearDown() { + function tearDown() : void { unset($this->R); } diff --git a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php index 18660553d..3e00acd0e 100644 --- a/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php +++ b/_test/tests/inc/parserutils_set_metadata_during_rendering.test.php @@ -1,6 +1,7 @@ <?php -class parserutils_set_metadata_during_rendering_test extends DokuWikiTest { +class parserutils_set_metadata_during_rendering_test extends DokuWikiTest +{ // the id used for this test case private $id; // if the test case is currently running @@ -8,17 +9,35 @@ class parserutils_set_metadata_during_rendering_test extends DokuWikiTest { // the original plugin controller private $plugin_controller; - // the actual test - function test_p_set_metadata_during_rendering() { + /** + * the actual test + * + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function test_p_set_metadata_during_rendering() + { global $EVENT_HANDLER; $this->id = 'test:p_set_metadata_during_rendering'; $this->active = true; // write the wiki page so it exists and needs to be rendered - saveWikiText($this->id, 'Test '.time(), 'Test data setup'); - - $EVENT_HANDLER->register_hook('PARSER_METADATA_RENDER', 'BEFORE', $this, 'helper_set_metadata', array('test_before_set' => 'test')); - $EVENT_HANDLER->register_hook('PARSER_METADATA_RENDER', 'AFTER', $this, 'helper_set_metadata', array('test_after_set' => 'test')); + saveWikiText($this->id, 'Test ' . time(), 'Test data setup'); + + $EVENT_HANDLER->register_hook( + 'PARSER_METADATA_RENDER', + 'BEFORE', + $this, + 'helper_set_metadata', + ['test_before_set' => 'test'] + ); + $EVENT_HANDLER->register_hook( + 'PARSER_METADATA_RENDER', + 'AFTER', + $this, + 'helper_set_metadata', + ['test_after_set' => 'test'] + ); $EVENT_HANDLER->register_hook('PARSER_HANDLER_DONE', 'BEFORE', $this, 'helper_inject_test_instruction'); // Change the global plugin controller so this test can be a fake syntax plugin @@ -33,9 +52,9 @@ class parserutils_set_metadata_during_rendering_test extends DokuWikiTest { $plugin_controller = $this->plugin_controller; // assert that all three calls to p_set_metadata have been successful - $this->assertEquals($newMeta['test_before_set'], 'test'); - $this->assertEquals($newMeta['test_after_set'], 'test'); - $this->assertEquals($newMeta['test_during_rendering'], 'test'); + $this->assertEquals($newMeta[ 'test_before_set' ], 'test'); + $this->assertEquals($newMeta[ 'test_after_set' ], 'test'); + $this->assertEquals($newMeta[ 'test_during_rendering' ], 'test'); // clean up $this->active = false; @@ -47,40 +66,46 @@ class parserutils_set_metadata_during_rendering_test extends DokuWikiTest { } // helper for the action plugin part of the test, tries executing p_set_metadata during rendering - function helper_set_metadata($event, $meta) { + public function helper_set_metadata($event, $meta) + { if ($this->active) { p_set_metadata($this->id, $meta, false, true); $keys = array_keys($meta); $key = array_pop($keys); - $this->assertTrue(is_string($meta[$key])); // ensure we really have a key + $this->assertTrue(is_string($meta[ $key ])); // ensure we really have a key // ensure that the metadata property hasn't been set previously - $this->assertNotEquals($meta[$key], p_get_metadata($this->id, $key)); + $this->assertNotEquals($meta[ $key ], p_get_metadata($this->id, $key)); } } // helper for injecting an instruction for this test case - function helper_inject_test_instruction($event) { - if ($this->active) - $event->data->calls[] = array('plugin', array('parserutils_test', array())); + public function helper_inject_test_instruction($event) + { + if ($this->active) { + $event->data->calls[] = ['plugin', ['parserutils_test', []], -9000]; + } } // fake syntax plugin rendering method that tries calling p_set_metadata during the actual rendering process - function render($format, &$renderer, $data) { + public function render($format, &$renderer, $data) + { if ($this->active) { $key = 'test_during_rendering'; - p_set_metadata($this->id, array($key => 'test'), false, true); + p_set_metadata($this->id, [$key => 'test'], false, true); // ensure that the metadata property hasn't been set previously $this->assertNotEquals($key, p_get_metadata($this->id, $key)); } } // wrapper function for the fake plugin controller - function getList($type='',$all=false){ + public function getList($type = '', $all = false) + { return $this->plugin_controller->getList(); } // wrapper function for the fake plugin controller, return $this for the fake syntax of this test - function load($type,$name,$new=false,$disabled=false){ + public function load($type, $name, $new = false, $disabled = false) + { if ($name == 'parserutils_test') { return $this; } else { diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index 7f1ec4aff..efe18d7ef 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -135,7 +135,7 @@ class remote_test extends DokuWikiTest { /** @var Api */ protected $remote; - function setUp() { + function setUp() : void { parent::setUp(); global $plugin_controller; global $conf; @@ -168,7 +168,7 @@ class remote_test extends DokuWikiTest { $auth = new AuthPlugin(); } - function tearDown() { + function tearDown() : void { global $USERINFO; $USERINFO = $this->userinfo; @@ -196,8 +196,8 @@ class remote_test extends DokuWikiTest { $this->assertEquals(array('string','int','bool','string'), $methods['plugin.testplugin2.commented']['args']); $this->assertEquals('array', $methods['plugin.testplugin2.commented']['return']); $this->assertEquals(0, $methods['plugin.testplugin2.commented']['public']); - $this->assertContains('This is a dummy method', $methods['plugin.testplugin2.commented']['doc']); - $this->assertContains('string $str some more parameter description', $methods['plugin.testplugin2.commented']['doc']); + $this->assertStringContainsString('This is a dummy method', $methods['plugin.testplugin2.commented']['doc']); + $this->assertStringContainsString('string $str some more parameter description', $methods['plugin.testplugin2.commented']['doc']); } function test_hasAccessSuccess() { @@ -206,15 +206,13 @@ class remote_test extends DokuWikiTest { $this->assertTrue($this->remote->hasAccess()); } - /** - * @expectedException dokuwiki\Remote\AccessDeniedException - */ function test_hasAccessFail() { global $conf; $conf['remote'] = 0; // the hasAccess() should throw a Exception to keep the same semantics with xmlrpc.php. // because the user(xmlrpc) check remote before .--> (!$conf['remote']) die('XML-RPC server not enabled.'); // so it must be a Exception when get here. + $this->expectException(\dokuwiki\Remote\AccessDeniedException::class); $this->remote->hasAccess(); } @@ -368,13 +366,12 @@ class remote_test extends DokuWikiTest { global $conf; $conf['remote'] = 1; + $this->expectException(RemoteException::class); + $this->expectExceptionCode(-32603); + $remoteApi = new Api(); - try { - $remoteApi->call('dose not exist'); - $this->fail('Expects RemoteException to be raised'); - } catch (RemoteException $th) { - $this->assertEquals(-32603, $th->getCode()); - } + $remoteApi->call('invalid method'); // no '.' + $remoteApi->call('does.not exist'); // unknown method type } function test_publicCallCore() { @@ -392,23 +389,19 @@ class remote_test extends DokuWikiTest { $this->assertTrue($remoteApi->call('plugin.testplugin.publicCall')); } - /** - * @expectedException dokuwiki\Remote\AccessDeniedException - */ function test_publicCallCoreDeny() { global $conf; $conf['useacl'] = 1; + $this->expectException(\dokuwiki\Remote\AccessDeniedException::class); $remoteApi = new Api(); $remoteApi->getCoreMethods(new RemoteAPICoreTest()); $remoteApi->call('wiki.stringTestMethod'); } - /** - * @expectedException dokuwiki\Remote\AccessDeniedException - */ function test_publicCallPluginDeny() { global $conf; $conf['useacl'] = 1; + $this->expectException(\dokuwiki\Remote\AccessDeniedException::class); $remoteApi = new Api(); $remoteApi->call('plugin.testplugin.methodString'); } diff --git a/_test/tests/inc/remoteapicore.test.php b/_test/tests/inc/remoteapicore.test.php index e152d4ac5..06b0d92c6 100644 --- a/_test/tests/inc/remoteapicore.test.php +++ b/_test/tests/inc/remoteapicore.test.php @@ -15,7 +15,7 @@ class remoteapicore_test extends DokuWikiTest { /** @var Api */ protected $remote; - public function setUp() { + public function setUp() : void { // we need a clean setup before each single test: DokuWikiTest::setUpBeforeClass(); @@ -35,7 +35,7 @@ class remoteapicore_test extends DokuWikiTest { $this->remote = new Api(); } - public function tearDown() { + public function tearDown() : void { parent::tearDown(); global $USERINFO; diff --git a/_test/tests/inc/remoteapicore_aclcheck.test.php b/_test/tests/inc/remoteapicore_aclcheck.test.php index 6ba7f1dcf..1e34b5427 100644 --- a/_test/tests/inc/remoteapicore_aclcheck.test.php +++ b/_test/tests/inc/remoteapicore_aclcheck.test.php @@ -21,7 +21,7 @@ class remoteapicore_aclcheck_test extends DokuWikiTest { $auth = new auth_plugin_authplain(); } - public function setUp() { + public function setUp() : void { global $config_cascade; global $conf; global $USERINFO; @@ -44,7 +44,7 @@ class remoteapicore_aclcheck_test extends DokuWikiTest { } - public function tearDown() { + public function tearDown() : void { global $USERINFO; global $AUTH_ACL; global $config_cascade; diff --git a/_test/tests/inc/sort_without_collator.test.php b/_test/tests/inc/sort_without_collator.test.php index e64cfb69e..f882a67e8 100644 --- a/_test/tests/inc/sort_without_collator.test.php +++ b/_test/tests/inc/sort_without_collator.test.php @@ -15,7 +15,7 @@ class sort_without_collator_test extends sort_with_collator_test /** * Disable the "intl" extension. */ - public static function setUpBeforeClass() + public static function setUpBeforeClass() : void { parent::setUpBeforeClass(); Sort::useIntl(false); @@ -24,7 +24,7 @@ class sort_without_collator_test extends sort_with_collator_test /** * Reenable the "intl" extension. */ - public static function tearDownAfterClass() + public static function tearDownAfterClass() : void { Sort::useIntl(true); parent::tearDownAfterClass(); diff --git a/_test/tests/inc/styleutils_cssstyleini.test.php b/_test/tests/inc/styleutils_cssstyleini.test.php index bbb10c3c6..72528556e 100644 --- a/_test/tests/inc/styleutils_cssstyleini.test.php +++ b/_test/tests/inc/styleutils_cssstyleini.test.php @@ -30,9 +30,13 @@ class styleutils_cssstyleini_test extends DokuWikiTest { $this->assertArrayHasKey('print', $actual['stylesheets']); // check an original stylesheet and an additional one - $this->assertArraySubset($expected['stylesheets']['screen'], $actual['stylesheets']['screen']); + $this->assertEmpty( + array_diff_assoc($expected['stylesheets']['screen'], $actual['stylesheets']['screen']) + ); // merged config has an original value (text), an overridden value (background) and a new custom replacement (custom_variable) - $this->assertArraySubset($expected['replacements'], $actual['replacements']); + $this->assertEmpty( + array_diff_assoc($expected['replacements'], $actual['replacements']) + ); } } diff --git a/_test/tests/inc/template_tpl_get_action.php b/_test/tests/inc/template_tpl_get_action.php index b18fe552d..1fc3bcbf2 100644 --- a/_test/tests/inc/template_tpl_get_action.php +++ b/_test/tests/inc/template_tpl_get_action.php @@ -2,7 +2,7 @@ class template_tpl_get_action_test extends DokuWikiTest { - public function setUp() { + public function setUp() : void { parent::setUp(); global $ID; $ID = 'start'; // run all tests on the start page 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 759272ebf..9eaab33d6 100644 --- a/_test/tests/lib/exe/css_at_import_less.test.php +++ b/_test/tests/lib/exe/css_at_import_less.test.php @@ -80,7 +80,7 @@ content: @foo;'; $this->csstest($in_css, $expected_css, $expected_less); } - public function tearDown() { + public function tearDown() : void { unlink($this->file); unlink($this->import); unset($this->file, $this->import); diff --git a/_test/tests/lib/exe/css_css_loadfile.test.php b/_test/tests/lib/exe/css_css_loadfile.test.php index 2b9d1fd2a..5c8af93ae 100644 --- a/_test/tests/lib/exe/css_css_loadfile.test.php +++ b/_test/tests/lib/exe/css_css_loadfile.test.php @@ -6,7 +6,7 @@ class css_css_loadfile_test extends DokuWikiTest { protected $file = ''; - public function setUp() { + public function setUp() : void { $this->file = tempnam(TMP_DIR, 'css'); } @@ -90,7 +90,7 @@ class css_css_loadfile_test extends DokuWikiTest { } } - public function tearDown() { + public function tearDown() : void { unlink($this->file); unset($this->file); } diff --git a/_test/tests/lib/exe/fetch_imagetoken.test.php b/_test/tests/lib/exe/fetch_imagetoken.test.php index 99e642557..c3371ca71 100644 --- a/_test/tests/lib/exe/fetch_imagetoken.test.php +++ b/_test/tests/lib/exe/fetch_imagetoken.test.php @@ -1,12 +1,12 @@ <?php class fetch_imagetoken_test extends DokuWikiTest { - + private $media = 'wiki:dokuwiki-128.png'; private $width = 200; private $height = 0; - function setUp() { + function setUp() : void { // check we can carry out these tests if (!file_exists(mediaFN($this->media))) { $this->markTestSkipped('Source image required for test'); diff --git a/_test/tests/lib/exe/fetch_statuscodes_external.test.php b/_test/tests/lib/exe/fetch_statuscodes_external.test.php index 79a45ec93..09b09b3ce 100644 --- a/_test/tests/lib/exe/fetch_statuscodes_external.test.php +++ b/_test/tests/lib/exe/fetch_statuscodes_external.test.php @@ -9,7 +9,7 @@ class fetch_statuscodes_external_test extends DokuWikiTest { private $width = 200; private $height = 0; - function setUp() { + function setUp() : void { header('X-Test: check headers working'); $header_check = function_exists('xdebug_get_headers') ? xdebug_get_headers() : headers_list(); diff --git a/_test/tests/test/plugins.test.php b/_test/tests/test/plugins.test.php index ac6d1ee45..03f3c526e 100644 --- a/_test/tests/test/plugins.test.php +++ b/_test/tests/test/plugins.test.php @@ -5,7 +5,7 @@ */ class InttestsPluginsTest extends DokuWikiTest { - function setUp() { + function setUp() : void { $this->pluginsEnabled = array( 'testing' ); diff --git a/bin/dwpage.php b/bin/dwpage.php index dee8039eb..a640fa783 100755 --- a/bin/dwpage.php +++ b/bin/dwpage.php @@ -118,6 +118,27 @@ class PageCLI extends CLI { true, 'unlock' ); + + /* gmeta command */ + $options->registerCommand( + 'getmeta', + 'Prints metadata value for a page to stdout.' + ); + $options->registerArgument( + 'wikipage', + 'The wiki page to get the metadata for', + true, + 'getmeta' + ); + $options->registerArgument( + 'key', + 'The name of the metadata item to be retrieved.' . "\n" . + 'If empty, an array of all the metadata items is returned.' ."\n" . + 'For retrieving items that are stored in sub-arrays, separate the ' . + 'keys of the different levels by spaces, in quotes, eg "date modified".', + false, + 'getmeta' + ); } /** @@ -160,6 +181,13 @@ class PageCLI extends CLI { $this->clearLock($wiki_id); $this->success("$wiki_id unlocked"); break; + case 'getmeta': + $wiki_id = array_shift($args); + $key = trim(array_shift($args)); + $meta = p_get_metadata($wiki_id, $key, METADATA_RENDER_UNLIMITED); + echo trim(json_encode($meta, JSON_PRETTY_PRINT)); + echo "\n"; + break; default: echo $options->help(); } diff --git a/composer.json b/composer.json index a2ae66485..8e0aa40c6 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "ext-json": "*", "splitbrain/php-archive": "~1.0", "phpseclib/phpseclib": "~2.0", - "paragonie/random_compat": "^2.0", "simplepie/simplepie": "^1.4", "geshi/geshi": "dev-master as 1.0.x-dev", "openpsa/universalfeedcreator": "^1.8", diff --git a/composer.lock b/composer.lock index 873189c96..b7edcabc9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f43d3a0e0afb925e14da17a3b8323a29", + "content-hash": "cd951937a517d2f058327d0429efe7ff", "packages": [ { "name": "aziraphale/email-address-validator", @@ -45,6 +45,10 @@ ], "description": "Fork of AddedBytes' PHP EmailAddressValidator script, now with Composer support!", "homepage": "https://github.com/aziraphale/email-address-validator", + "support": { + "issues": "https://github.com/aziraphale/email-address-validator/issues", + "source": "https://github.com/aziraphale/email-address-validator/tree/master" + }, "time": "2017-05-22T14:05:57+00:00" }, { @@ -64,6 +68,7 @@ "require-dev": { "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.2" }, + "default-branch": true, "type": "library", "autoload": { "classmap": [ @@ -85,24 +90,30 @@ ], "description": "Generic Syntax Highlighter", "homepage": "http://qbnz.com/highlighter/", + "support": { + "forum": "https://lists.sourceforge.net/lists/listinfo/geshi-users", + "irc": "irc://irc.freenode.org/geshi", + "issues": "https://sourceforge.net/p/geshi/feature-requests/", + "source": "https://github.com/GeSHi/geshi-1.0/tree/master" + }, "time": "2020-06-22T15:46:04+00:00" }, { "name": "marcusschwarz/lesserphp", - "version": "v0.5.4", + "version": "v0.5.5", "source": { "type": "git", "url": "https://github.com/MarcusSchwarz/lesserphp.git", - "reference": "3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e" + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e", - "reference": "3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7", "shasum": "" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": ">=4.8.35 <8" }, "bin": [ "plessc" @@ -137,20 +148,24 @@ ], "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", "homepage": "http://leafo.net/lessphp/", - "time": "2020-01-19T19:18:49+00:00" + "support": { + "issues": "https://github.com/MarcusSchwarz/lesserphp/issues", + "source": "https://github.com/MarcusSchwarz/lesserphp/tree/v0.5.5" + }, + "time": "2021-03-10T17:56:57+00:00" }, { "name": "openpsa/universalfeedcreator", - "version": "v1.8.3.2", + "version": "v1.8.4", "source": { "type": "git", "url": "https://github.com/flack/UniversalFeedCreator.git", - "reference": "906745196469b13ceefa6523ef04851a78ad10f4" + "reference": "099817dc9efef33ca2382b04daf9e191b77fed13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/906745196469b13ceefa6523ef04851a78ad10f4", - "reference": "906745196469b13ceefa6523ef04851a78ad10f4", + "url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/099817dc9efef33ca2382b04daf9e191b77fed13", + "reference": "099817dc9efef33ca2382b04daf9e191b77fed13", "shasum": "" }, "require": { @@ -188,69 +203,24 @@ "pie", "rss" ], - "time": "2019-09-01T17:49:46+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.18", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "support": { + "issues": "https://github.com/flack/UniversalFeedCreator/issues", + "source": "https://github.com/flack/UniversalFeedCreator/tree/v1.8.4" }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2019-01-03T20:59:08+00:00" + "time": "2020-09-25T08:36:47+00:00" }, { "name": "phpseclib/phpseclib", - "version": "2.0.28", + "version": "2.0.31", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260" + "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260", - "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4", + "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4", "shasum": "" }, "require": { @@ -258,8 +228,7 @@ }, "require-dev": { "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.0", - "sami/sami": "~2.0", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", "squizlabs/php_codesniffer": "~2.0" }, "suggest": { @@ -329,6 +298,10 @@ "x.509", "x509" ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/2.0.31" + }, "funding": [ { "url": "https://github.com/terrafrost", @@ -343,20 +316,20 @@ "type": "tidelift" } ], - "time": "2020-07-08T09:08:33+00:00" + "time": "2021-04-06T13:56:45+00:00" }, { "name": "simplepie/simplepie", - "version": "1.5.5", + "version": "1.5.6", "source": { "type": "git", "url": "https://github.com/simplepie/simplepie.git", - "reference": "ae49e2201b6da9c808e5dac437aca356a11831b4" + "reference": "1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplepie/simplepie/zipball/ae49e2201b6da9c808e5dac437aca356a11831b4", - "reference": "ae49e2201b6da9c808e5dac437aca356a11831b4", + "url": "https://api.github.com/repos/simplepie/simplepie/zipball/1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6", + "reference": "1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6", "shasum": "" }, "require": { @@ -410,20 +383,24 @@ "feeds", "rss" ], - "time": "2020-05-01T12:23:14+00:00" + "support": { + "issues": "https://github.com/simplepie/simplepie/issues", + "source": "https://github.com/simplepie/simplepie/tree/1.5.6" + }, + "time": "2020-10-14T07:17:22+00:00" }, { "name": "splitbrain/php-archive", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/splitbrain/php-archive.git", - "reference": "d4cf2d9a2d82548b7e4f1dc04802c526eba68b65" + "reference": "211a2198b73b233d7d2b6159462e11cd9a91348a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/d4cf2d9a2d82548b7e4f1dc04802c526eba68b65", - "reference": "d4cf2d9a2d82548b7e4f1dc04802c526eba68b65", + "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/211a2198b73b233d7d2b6159462e11cd9a91348a", + "reference": "211a2198b73b233d7d2b6159462e11cd9a91348a", "shasum": "" }, "require": { @@ -433,7 +410,7 @@ "ext-bz2": "*", "ext-zip": "*", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^8" }, "suggest": { "ext-iconv": "Used for proper filename encode handling", @@ -464,27 +441,31 @@ "unzip", "zip" ], - "time": "2020-10-13T12:41:15+00:00" + "support": { + "issues": "https://github.com/splitbrain/php-archive/issues", + "source": "https://github.com/splitbrain/php-archive/tree/1.2.1" + }, + "time": "2021-02-22T17:59:24+00:00" }, { "name": "splitbrain/php-cli", - "version": "1.1.7", + "version": "1.1.8", "source": { "type": "git", "url": "https://github.com/splitbrain/php-cli.git", - "reference": "fb4f888866d090b10e3e68292d197ca274cea626" + "reference": "8c2c001b1b55d194402cf18aad2757049ac6d575" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-cli/zipball/fb4f888866d090b10e3e68292d197ca274cea626", - "reference": "fb4f888866d090b10e3e68292d197ca274cea626", + "url": "https://api.github.com/repos/splitbrain/php-cli/zipball/8c2c001b1b55d194402cf18aad2757049ac6d575", + "reference": "8c2c001b1b55d194402cf18aad2757049ac6d575", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "4.5.*" + "phpunit/phpunit": "^8" }, "suggest": { "psr/log": "Allows you to make the CLI available as PSR-3 logger" @@ -515,20 +496,24 @@ "optparse", "terminal" ], - "time": "2019-12-12T08:24:54+00:00" + "support": { + "issues": "https://github.com/splitbrain/php-cli/issues", + "source": "https://github.com/splitbrain/php-cli/tree/1.1.8" + }, + "time": "2021-02-05T12:02:46+00:00" }, { "name": "splitbrain/slika", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/splitbrain/slika.git", - "reference": "a357f2ac6a10668c43516ef11220f60da9fab171" + "reference": "fda87e816eb150f3608282da962788b4ad509c11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/splitbrain/slika/zipball/a357f2ac6a10668c43516ef11220f60da9fab171", - "reference": "a357f2ac6a10668c43516ef11220f60da9fab171", + "url": "https://api.github.com/repos/splitbrain/slika/zipball/fda87e816eb150f3608282da962788b4ad509c11", + "reference": "fda87e816eb150f3608282da962788b4ad509c11", "shasum": "" }, "require-dev": { @@ -555,16 +540,20 @@ } ], "description": "Simple image resizing", - "time": "2020-09-01T15:14:41+00:00" + "support": { + "issues": "https://github.com/splitbrain/slika/issues", + "source": "https://github.com/splitbrain/slika/tree/master" + }, + "time": "2020-09-07T18:35:00+00:00" } ], "packages-dev": [], "aliases": [ { - "alias": "1.0.x-dev", - "alias_normalized": "1.0.9999999.9999999-dev", + "package": "geshi/geshi", "version": "9999999-dev", - "package": "geshi/geshi" + "alias": "1.0.x-dev", + "alias_normalized": "1.0.9999999.9999999-dev" } ], "minimum-stability": "stable", @@ -581,5 +570,5 @@ "platform-overrides": { "php": "7.2" }, - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/data/deleted.files b/data/deleted.files index 1d5db7cd8..9ccfa2715 100644 --- a/data/deleted.files +++ b/data/deleted.files @@ -2,6 +2,20 @@ # but were removed later. An up to date DokuWiki should not have any of # the files installed +# removed in next version +vendor/paragonie/random_compat/LICENSE +vendor/paragonie/random_compat/composer.json +vendor/paragonie/random_compat/lib/byte_safe_strings.php +vendor/paragonie/random_compat/lib/cast_to_int.php +vendor/paragonie/random_compat/lib/error_polyfill.php +vendor/paragonie/random_compat/lib/random.php +vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +vendor/paragonie/random_compat/lib/random_int.php + # removed in 2020-06-01 inc/PluginInterface.php inc/PluginTrait.php diff --git a/inc/Action/Admin.php b/inc/Action/Admin.php index 1c9afd6b9..aefa228e0 100644 --- a/inc/Action/Admin.php +++ b/inc/Action/Admin.php @@ -18,10 +18,7 @@ class Admin extends AbstractUserAction { return AUTH_READ; // let in check later } - public function checkPreconditions() { - parent::checkPreconditions(); - } - + /** @inheritDoc */ public function preProcess() { global $INPUT; global $INFO; @@ -38,8 +35,8 @@ class Admin extends AbstractUserAction { } } + /** @inheritDoc */ public function tplContent() { tpl_admin(); } - } diff --git a/inc/Action/Save.php b/inc/Action/Save.php index 0b2472983..a577e379f 100644 --- a/inc/Action/Save.php +++ b/inc/Action/Save.php @@ -44,7 +44,10 @@ class Save extends AbstractAction { throw new ActionException('edit'); } //conflict check - if($DATE != 0 && $INFO['meta']['date']['modified'] > $DATE) { + if($DATE != 0 + && isset($INFO['meta']['date']['modified']) + && $INFO['meta']['date']['modified'] > $DATE + ) { throw new ActionException('conflict'); } diff --git a/inc/Extension/PluginController.php b/inc/Extension/PluginController.php index 42aeac498..55fd299d8 100644 --- a/inc/Extension/PluginController.php +++ b/inc/Extension/PluginController.php @@ -274,7 +274,7 @@ class PluginController $backup = $file . '.bak'; if (file_exists($backup)) @unlink($backup); if (!@copy($file, $backup)) return false; - if (!empty($conf['fperm'])) chmod($backup, $conf['fperm']); + if ($conf['fperm']) chmod($backup, $conf['fperm']); } //check if can open for writing, else restore return io_saveFile($file, $out); diff --git a/inc/File/MediaFile.php b/inc/File/MediaFile.php new file mode 100644 index 000000000..4c27cc65c --- /dev/null +++ b/inc/File/MediaFile.php @@ -0,0 +1,166 @@ +<?php + +namespace dokuwiki\File; + +use dokuwiki\Utf8\PhpString; + +class MediaFile +{ + protected $id; + protected $path; + + protected $mime; + protected $ext; + protected $downloadable; + + protected $width; + protected $height; + protected $meta; + + /** + * MediaFile constructor. + * @param string $id + * @param string|int $rev optional revision + */ + public function __construct($id, $rev = '') + { + $this->id = $id; //FIXME should it be cleaned? + $this->path = mediaFN($id, $rev); + + list($this->ext, $this->mime, $this->downloadable) = mimetype($this->path, false); + } + + /** @return string */ + public function getId() + { + return $this->id; + } + + /** @return string */ + public function getPath() + { + return $this->path; + } + + /** + * The ID without namespace, used for display purposes + * + * @return string + */ + public function getDisplayName() + { + return noNS($this->id); + } + + /** @return string */ + public function getMime() + { + if (!$this->mime) return 'application/octet-stream'; + return $this->mime; + } + + /** @return string */ + public function getExtension() + { + return (string)$this->ext; + } + + /** + * Similar to the extesion but does some clean up + * + * @return string + */ + public function getIcoClass() + { + $ext = $this->getExtension(); + if ($ext === '') $ext = 'file'; + return preg_replace('/[^_\-a-z0-9]+/i', '_', $ext); + } + + /** + * Should this file be downloaded instead being displayed inline? + * + * @return bool + */ + public function isDownloadable() + { + return $this->downloadable; + } + + /** @return int */ + public function getFileSize() + { + return filesize($this->path); + } + + /** @return int */ + public function getLastModified() + { + return filemtime($this->path); + } + + /** @return bool */ + public function isWritable() + { + return is_writable($this->path); + } + + /** @return bool */ + public function isImage() + { + return (substr($this->mime, 0, 6) === 'image/'); + } + + /** + * initializes width and height for images when requested + */ + protected function initSizes() + { + $this->width = 0; + $this->height = 0; + if (!$this->isImage()) return; + $info = getimagesize($this->path); + if ($info === false) return; + list($this->width, $this->height) = $info; + } + + /** + * Returns the width if this is a supported image, 0 otherwise + * + * @return int + */ + public function getWidth() + { + if ($this->width === null) $this->initSizes(); + return $this->width; + } + + /** + * Returns the height if this is a supported image, 0 otherwise + * + * @return int + */ + public function getHeight() + { + if ($this->height === null) $this->initSizes(); + return $this->height; + } + + /** + * Returns the permissions the current user has on the file + * + * @todo doing this for each file within a namespace is a waste, we need to cache this somehow + * @return int + */ + public function userPermission() + { + return auth_quickaclcheck(getNS($this->id).':*'); + } + + /** @return \JpegMeta */ + public function getMeta() + { + if($this->meta === null) $this->meta = new \JpegMeta($this->path); + return $this->meta; + } +} diff --git a/inc/Form/InputElement.php b/inc/Form/InputElement.php index 63be8aaa7..b7ace8a90 100644 --- a/inc/Form/InputElement.php +++ b/inc/Form/InputElement.php @@ -107,7 +107,7 @@ class InputElement extends Element $name = array_keys($parsed); $name = array_shift($name); - if (is_array($parsed[$name])) { + if (isset($parsed[$name]) && is_array($parsed[$name])) { $key = array_keys($parsed[$name]); $key = array_shift($key); } else { diff --git a/inc/HTTP/HTTPClient.php b/inc/HTTP/HTTPClient.php index 4aaf47168..3c0edf7ad 100644 --- a/inc/HTTP/HTTPClient.php +++ b/inc/HTTP/HTTPClient.php @@ -178,10 +178,9 @@ class HTTPClient { // parse URL into bits $uri = parse_url($url); $server = $uri['host']; - $path = $uri['path']; - if(empty($path)) $path = '/'; + $path = !empty($uri['path']) ? $uri['path'] : '/'; + $uriPort = !empty($uri['port']) ? $uri['port'] : null; if(!empty($uri['query'])) $path .= '?'.$uri['query']; - if(!empty($uri['port'])) $port = $uri['port']; if(isset($uri['user'])) $this->user = $uri['user']; if(isset($uri['pass'])) $this->pass = $uri['pass']; @@ -194,7 +193,7 @@ class HTTPClient { $use_tls = $this->proxy_ssl; }else{ $request_url = $path; - if (!isset($port)) $port = ($uri['scheme'] == 'https') ? 443 : 80; + $port = $uriPort ?: ($uri['scheme'] == 'https' ? 443 : 80); $use_tls = ($uri['scheme'] == 'https'); } @@ -209,8 +208,8 @@ class HTTPClient { // prepare headers $headers = $this->headers; - $headers['Host'] = $uri['host']; - if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port']; + $headers['Host'] = $uri['host'] + . ($uriPort ? ':' . $uriPort : ''); $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; @@ -370,10 +369,10 @@ class HTTPClient { // handle non-RFC-compliant relative redirects if (!preg_match('/^http/i', $this->resp_headers['location'])){ if($this->resp_headers['location'][0] != '/'){ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. - dirname($uri['path']).'/'.$this->resp_headers['location']; + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uriPort. + dirname($path).'/'.$this->resp_headers['location']; }else{ - $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uri['port']. + $this->resp_headers['location'] = $uri['scheme'].'://'.$uri['host'].':'.$uriPort. $this->resp_headers['location']; } } @@ -511,7 +510,7 @@ class HTTPClient { if(!$this->useProxyForUrl($requesturl)) return false; $requestinfo = parse_url($requesturl); if($requestinfo['scheme'] != 'https') return false; - if(!$requestinfo['port']) $requestinfo['port'] = 443; + if(empty($requestinfo['port'])) $requestinfo['port'] = 443; // build request $request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL; diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 9ed1e2db4..9e6825d78 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1317,79 +1317,81 @@ class JpegMeta { $this->_info['file']['UnixTime'] = filemtime($this->_fileName); // get image size directly from file - $size = getimagesize($this->_fileName); - $this->_info['file']['Width'] = $size[0]; - $this->_info['file']['Height'] = $size[1]; - // set mime types and formats - // http://php.net/manual/en/function.getimagesize.php - // http://php.net/manual/en/function.image-type-to-mime-type.php - switch ($size[2]){ - case 1: - $this->_info['file']['Mime'] = 'image/gif'; - $this->_info['file']['Format'] = 'GIF'; - break; - case 2: - $this->_info['file']['Mime'] = 'image/jpeg'; - $this->_info['file']['Format'] = 'JPEG'; - break; - case 3: - $this->_info['file']['Mime'] = 'image/png'; - $this->_info['file']['Format'] = 'PNG'; - break; - case 4: - $this->_info['file']['Mime'] = 'application/x-shockwave-flash'; - $this->_info['file']['Format'] = 'SWF'; - break; - case 5: - $this->_info['file']['Mime'] = 'image/psd'; - $this->_info['file']['Format'] = 'PSD'; - break; - case 6: - $this->_info['file']['Mime'] = 'image/bmp'; - $this->_info['file']['Format'] = 'BMP'; - break; - case 7: - $this->_info['file']['Mime'] = 'image/tiff'; - $this->_info['file']['Format'] = 'TIFF (Intel)'; - break; - case 8: - $this->_info['file']['Mime'] = 'image/tiff'; - $this->_info['file']['Format'] = 'TIFF (Motorola)'; - break; - case 9: - $this->_info['file']['Mime'] = 'application/octet-stream'; - $this->_info['file']['Format'] = 'JPC'; - break; - case 10: - $this->_info['file']['Mime'] = 'image/jp2'; - $this->_info['file']['Format'] = 'JP2'; - break; - case 11: - $this->_info['file']['Mime'] = 'application/octet-stream'; - $this->_info['file']['Format'] = 'JPX'; - break; - case 12: - $this->_info['file']['Mime'] = 'application/octet-stream'; - $this->_info['file']['Format'] = 'JB2'; - break; - case 13: - $this->_info['file']['Mime'] = 'application/x-shockwave-flash'; - $this->_info['file']['Format'] = 'SWC'; - break; - case 14: - $this->_info['file']['Mime'] = 'image/iff'; - $this->_info['file']['Format'] = 'IFF'; - break; - case 15: - $this->_info['file']['Mime'] = 'image/vnd.wap.wbmp'; - $this->_info['file']['Format'] = 'WBMP'; - break; - case 16: - $this->_info['file']['Mime'] = 'image/xbm'; - $this->_info['file']['Format'] = 'XBM'; - break; - default: - $this->_info['file']['Mime'] = 'image/unknown'; + if ($size = getimagesize($this->_fileName)) { + $this->_info['file']['Width'] = $size[0]; + $this->_info['file']['Height'] = $size[1]; + + // set mime types and formats + // http://php.net/manual/en/function.getimagesize.php + // http://php.net/manual/en/function.image-type-to-mime-type.php + switch ($size[2]) { + case 1: + $this->_info['file']['Mime'] = 'image/gif'; + $this->_info['file']['Format'] = 'GIF'; + break; + case 2: + $this->_info['file']['Mime'] = 'image/jpeg'; + $this->_info['file']['Format'] = 'JPEG'; + break; + case 3: + $this->_info['file']['Mime'] = 'image/png'; + $this->_info['file']['Format'] = 'PNG'; + break; + case 4: + $this->_info['file']['Mime'] = 'application/x-shockwave-flash'; + $this->_info['file']['Format'] = 'SWF'; + break; + case 5: + $this->_info['file']['Mime'] = 'image/psd'; + $this->_info['file']['Format'] = 'PSD'; + break; + case 6: + $this->_info['file']['Mime'] = 'image/bmp'; + $this->_info['file']['Format'] = 'BMP'; + break; + case 7: + $this->_info['file']['Mime'] = 'image/tiff'; + $this->_info['file']['Format'] = 'TIFF (Intel)'; + break; + case 8: + $this->_info['file']['Mime'] = 'image/tiff'; + $this->_info['file']['Format'] = 'TIFF (Motorola)'; + break; + case 9: + $this->_info['file']['Mime'] = 'application/octet-stream'; + $this->_info['file']['Format'] = 'JPC'; + break; + case 10: + $this->_info['file']['Mime'] = 'image/jp2'; + $this->_info['file']['Format'] = 'JP2'; + break; + case 11: + $this->_info['file']['Mime'] = 'application/octet-stream'; + $this->_info['file']['Format'] = 'JPX'; + break; + case 12: + $this->_info['file']['Mime'] = 'application/octet-stream'; + $this->_info['file']['Format'] = 'JB2'; + break; + case 13: + $this->_info['file']['Mime'] = 'application/x-shockwave-flash'; + $this->_info['file']['Format'] = 'SWC'; + break; + case 14: + $this->_info['file']['Mime'] = 'image/iff'; + $this->_info['file']['Format'] = 'IFF'; + break; + case 15: + $this->_info['file']['Mime'] = 'image/vnd.wap.wbmp'; + $this->_info['file']['Format'] = 'WBMP'; + break; + case 16: + $this->_info['file']['Mime'] = 'image/xbm'; + $this->_info['file']['Format'] = 'XBM'; + break; + default: + $this->_info['file']['Mime'] = 'image/unknown'; + } } } else { $this->_info['file'] = array(); diff --git a/inc/Logger.php b/inc/Logger.php index 5923777df..a3999a6ea 100644 --- a/inc/Logger.php +++ b/inc/Logger.php @@ -40,7 +40,7 @@ class Logger */ static public function getInstance($facility = self::LOG_ERROR) { - if (self::$instances[$facility] === null) { + if (empty(self::$instances[$facility])) { self::$instances[$facility] = new Logger($facility); } return self::$instances[$facility]; diff --git a/inc/Remote/Api.php b/inc/Remote/Api.php index 3b526564d..749c2e6ea 100644 --- a/inc/Remote/Api.php +++ b/inc/Remote/Api.php @@ -92,7 +92,8 @@ class Api if ($args === null) { $args = array(); } - list($type, $pluginName, /* $call */) = explode('.', $method, 3); + // Ensure we have at least one '.' in $method + list($type, $pluginName, /* $call */) = explode('.', $method . '.', 3); if ($type === 'plugin') { return $this->callPlugin($pluginName, $method, $args); } @@ -128,8 +129,9 @@ class Api if (!array_key_exists($method, $customCalls)) { throw new RemoteException('Method does not exist', -32603); } - $customCall = $customCalls[$method]; - return $this->callPlugin($customCall[0], $customCall[1], $args); + list($plugin, $method) = $customCalls[$method]; + $fullMethod = "plugin.$plugin.$method"; + return $this->callPlugin($plugin, $fullMethod, $args); } /** diff --git a/inc/Search/Indexer.php b/inc/Search/Indexer.php index a29e5b28b..ae3b12c57 100644 --- a/inc/Search/Indexer.php +++ b/inc/Search/Indexer.php @@ -942,7 +942,7 @@ class Indexer { return false; } } - if (!empty($conf['dperm'])) { + if ($conf['dperm']) { chmod($lock, $conf['dperm']); } return $status; @@ -1186,8 +1186,10 @@ class Indexer { if ($tuple === '') continue; list($key, $cnt) = explode('*', $tuple); if (!$cnt) continue; - $key = $keys[$key]; - if ($key === false || is_null($key)) continue; + if (isset($keys[$key])) { + $key = $keys[$key]; + if ($key === false || is_null($key)) continue; + } $result[$key] = $cnt; } return $result; diff --git a/inc/Subscriptions/BulkSubscriptionSender.php b/inc/Subscriptions/BulkSubscriptionSender.php index 672ef90f6..7341cd0a5 100644 --- a/inc/Subscriptions/BulkSubscriptionSender.php +++ b/inc/Subscriptions/BulkSubscriptionSender.php @@ -156,7 +156,7 @@ class BulkSubscriptionSender extends SubscriptionSender return false; } - if (!empty($conf['dperm'])) { + if ($conf['dperm']) { chmod($lock, $conf['dperm']); } return true; diff --git a/inc/Ui/Admin.php b/inc/Ui/Admin.php index 07146e598..d3bbc6503 100644 --- a/inc/Ui/Admin.php +++ b/inc/Ui/Admin.php @@ -28,9 +28,10 @@ class Admin extends Ui { $this->menu = $this->getPluginList(); echo '<div class="ui-admin">'; echo p_locale_xhtml('admin'); - $this->showSecurityCheck(); + $this->showMenu('admin'); $this->showMenu('manager'); + $this->showSecurityCheck(); $this->showVersion(); $this->showMenu('other'); echo '</div>'; @@ -75,16 +76,15 @@ class Admin extends Ui { * it verifies either: * 'savedir' has been moved elsewhere, or * has protection to prevent the webserver serving files from it + * + * The actual check is carried out via JavaScript. See behaviour.js */ protected function showSecurityCheck() { global $conf; if(substr($conf['savedir'], 0, 2) !== './') return; $img = DOKU_URL . $conf['savedir'] . '/dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png'; - echo '<a style="border:none; float:right;" - href="http://www.dokuwiki.org/security#web_access_security"> - <img src="' . $img . '" alt="Your data directory seems to be protected properly." - onerror="this.parentNode.style.display=\'none\'" /></a>'; + echo '<div id="security__check" data-src="' . $img . '"></div>'; } /** diff --git a/inc/Ui/Media/Display.php b/inc/Ui/Media/Display.php new file mode 100644 index 000000000..16f2137b1 --- /dev/null +++ b/inc/Ui/Media/Display.php @@ -0,0 +1,119 @@ +<?php + +namespace dokuwiki\Ui\Media; + +use dokuwiki\File\MediaFile; + +class Display +{ + /** @var MediaFile */ + protected $mediaFile; + + /** @var string should IDs be shown relative to this namespace? Used in search results */ + protected $relativeDisplay = null; + + /** @var bool scroll to this file on display? */ + protected $scrollIntoView = false; + + /** + * Display constructor. + * @param MediaFile $mediaFile + */ + public function __construct(MediaFile $mediaFile) + { + $this->mediaFile = $mediaFile; + } + + /** + * Get the HTML to display a preview image if possible, otherwise show an icon + * + * @param int $w bounding box width to resize pixel based images to + * @param int $h bounding box height to resize pixel based images to + * @return string + */ + public function getPreviewHtml($w, $h) + { + if ($this->mediaFile->isImage()) { + $src = ml($this->mediaFile->getId(), ['w' => $w, 'h' => $h]); + } else { + $src = $this->getIconUrl(); + } + + return '<img src="' . $src . '" alt="' . hsc($this->mediaFile->getDisplayName()) . '" loading="lazy" />'; + } + + /** + * Return the URL to the icon for this file + * + * @return string + */ + public function getIconUrl() + { + $link = 'lib/images/fileicons/svg/' . $this->mediaFile->getIcoClass() . '.svg'; + if (!file_exists(DOKU_INC . $link)) $link = 'lib/images/fileicons/svg/file.svg'; + return DOKU_BASE . $link; + } + + /** + * Show IDs relative to this namespace + * + * @param string|null $ns Use null to disable + */ + public function relativeDisplay($ns) + { + $this->relativeDisplay = $ns; + } + + /** + * Scroll to this file on display? + * + * @param bool $set + */ + public function scrollIntoView($set = true) + { + $this->scrollIntoView = $set; + } + + /** @return string */ + protected function formatDate() + { + return dformat($this->mediaFile->getLastModified()); + } + + /** + * Output the image dimension if any + * + * @param string $empty what to show when no dimensions are available + * @return string + */ + protected function formatDimensions($empty = ' ') + { + $w = $this->mediaFile->getWidth(); + $h = $this->mediaFile->getHeight(); + if ($w && $h) { + return $w . '×' . $h; + } else { + return $empty; + } + } + + /** @return string */ + protected function formatFileSize() + { + return filesize_h($this->mediaFile->getFileSize()); + } + + /** @return string */ + protected function formatDisplayName() + { + if ($this->relativeDisplay !== null) { + $id = $this->mediaFile->getId(); + if (substr($id, 0, strlen($this->relativeDisplay)) == $this->relativeDisplay) { + $id = substr($id, strlen($this->relativeDisplay)); + } + return ltrim($id, ':'); + } else { + return $this->mediaFile->getDisplayName(); + } + } +} diff --git a/inc/Ui/Media/DisplayRow.php b/inc/Ui/Media/DisplayRow.php new file mode 100644 index 000000000..47feed088 --- /dev/null +++ b/inc/Ui/Media/DisplayRow.php @@ -0,0 +1,93 @@ +<?php + +namespace dokuwiki\Ui\Media; + +use dokuwiki\Utf8\PhpString; + +/** + * Display a MediaFile in the Media Popup + */ +class DisplayRow extends DisplayTile +{ + /** @inheritDoc */ + public function show() + { + global $lang; + // FIXME Zebra classes have been dropped and need to be readded via CSS + + $id = $this->mediaFile->getId(); + $class = 'select mediafile mf_' . $this->mediaFile->getIcoClass(); + $info = trim($this->formatDimensions('') . ' ' . $this->formatDate() . ' ' . $this->formatFileSize()); + $jump = $this->scrollIntoView ? 'id="scroll__here"' : ''; + + echo '<div title="' . $id . '" ' . $jump . '>'; + echo '<a id="h_:' . $id . '" class="' . $class . '">' . + $this->formatDisplayName() . + '</a> '; + echo '<span class="info">(' . $info . ')</span>' . NL; + + // view button + $link = ml($id, '', true); + echo ' <a href="' . $link . '" target="_blank"><img src="' . DOKU_BASE . 'lib/images/magnifier.png" ' . + 'alt="' . $lang['mediaview'] . '" title="' . $lang['mediaview'] . '" class="btn" /></a>'; + + // mediamanager button + $link = wl('', array('do' => 'media', 'image' => $id, 'ns' => getNS($id))); + echo ' <a href="' . $link . '" target="_blank"><img src="' . DOKU_BASE . 'lib/images/mediamanager.png" ' . + 'alt="' . $lang['btn_media'] . '" title="' . $lang['btn_media'] . '" class="btn" /></a>'; + + // delete button + if ($this->mediaFile->isWritable() && $this->mediaFile->userPermission() >= AUTH_DELETE) { + $link = DOKU_BASE . 'lib/exe/mediamanager.php?delete=' . rawurlencode($id) . + '&sectok=' . getSecurityToken(); + echo ' <a href="' . $link . '" class="btn_media_delete" title="' . $id . '">' . + '<img src="' . DOKU_BASE . 'lib/images/trash.png" alt="' . $lang['btn_delete'] . '" ' . + 'title="' . $lang['btn_delete'] . '" class="btn" /></a>'; + } + + echo '<div class="example" id="ex_' . str_replace(':', '_', $id) . '">'; + echo $lang['mediausage'] . ' <code>{{:' . $id . '}}</code>'; + echo '</div>'; + if ($this->mediaFile->getWidth()) $this->showDetails(); + echo '<div class="clearer"></div>' . NL; + echo '</div>' . NL; + + } + + /** + * Show Thumbnail and EXIF data + */ + protected function showDetails() + { + $id = $this->mediaFile->getId(); + + echo '<div class="detail">'; + echo '<div class="thumb">'; + echo '<a id="d_:' . $id . '" class="select">'; + echo $this->getPreviewHtml(120, 120); + echo '</a>'; + echo '</div>'; + + // read EXIF/IPTC data + $t = $this->mediaFile->getMeta()->getField(array('IPTC.Headline', 'xmp.dc:title')); + $d = $this->mediaFile->getMeta()->getField(array( + 'IPTC.Caption', + 'EXIF.UserComment', + 'EXIF.TIFFImageDescription', + 'EXIF.TIFFUserComment', + )); + if (PhpString::strlen($d) > 250) $d = PhpString::substr($d, 0, 250) . '...'; + $k = $this->mediaFile->getMeta()->getField(array('IPTC.Keywords', 'IPTC.Category', 'xmp.dc:subject')); + + // print EXIF/IPTC data + if ($t || $d || $k) { + echo '<p>'; + 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>'; + } + +} diff --git a/inc/Ui/Media/DisplayTile.php b/inc/Ui/Media/DisplayTile.php new file mode 100644 index 000000000..aff294b9b --- /dev/null +++ b/inc/Ui/Media/DisplayTile.php @@ -0,0 +1,54 @@ +<?php + +namespace dokuwiki\Ui\Media; + +use dokuwiki\File\MediaFile; + +/** + * Display a MediaFile in the FullScreen MediaManager + */ +class DisplayTile extends Display +{ + /** @var string URL to open this file in the media manager */ + protected $mmUrl; + + /** @inheritDoc */ + public function __construct(MediaFile $mediaFile) + { + parent::__construct($mediaFile); + + // FIXME we may want to integrate this function here or in another class + $this->mmUrl = media_managerURL([ + 'image' => $this->mediaFile->getId(), + 'ns' => getNS($this->mediaFile->getId()), + 'tab_details' => 'view', + ]); + } + + /** + * Display the tile + */ + public function show() + { + $jump = $this->scrollIntoView ? 'id="scroll__here"' : ''; + + echo '<dl title="' . $this->mediaFile->getDisplayName() . '"' . $jump . '>'; + echo '<dt>'; + echo '<a id="l_:' . $this->mediaFile->getId() . '" class="image thumb" href="' . $this->mmUrl . '">'; + echo $this->getPreviewHtml(90, 90); + echo '</a>'; + echo '</dt>'; + + echo '<dd class="name">'; + echo '<a href="' . $this->mmUrl . '" id="h_:' . $this->mediaFile->getId() . '">' . + $this->formatDisplayName() . + '</a>'; + echo '</dd>'; + + echo '<dd class="size">' . $this->formatDimensions() . '</dd>'; + echo '<dd class="date">' . $this->formatDate() . '</dd>'; + echo '<dd class="filesize">' . $this->formatFileSize() . '</dd>'; + + echo '</dl>'; + } +} diff --git a/inc/Ui/Revisions.php b/inc/Ui/Revisions.php index 3385afab2..ca38a213a 100644 --- a/inc/Ui/Revisions.php +++ b/inc/Ui/Revisions.php @@ -17,7 +17,7 @@ abstract class Revisions extends Ui /* @var ChangeLog */ protected $changelog; // PageChangeLog or MediaChangeLog object - /** + /** * Revisions Ui constructor * * @param string $id page id or media id @@ -145,6 +145,9 @@ abstract class Revisions extends Ui public function __construct(array $info) { + if (!isset($info['current'])) { + $info['current'] = false; + } $this->info = $info; } diff --git a/inc/auth.php b/inc/auth.php index b9ed0b85e..bb0ad57dc 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -245,19 +245,21 @@ function auth_login($user, $pass, $sticky = false, $silent = false) { // we got a cookie - see if we can trust it // get session info - $session = $_SESSION[DOKU_COOKIE]['auth']; - if(isset($session) && - $auth->useSessionCache($user) && - ($session['time'] >= time() - $conf['auth_security_timeout']) && - ($session['user'] == $user) && - ($session['pass'] == sha1($pass)) && //still crypted - ($session['buid'] == auth_browseruid()) - ) { - - // he has session, cookie and browser right - let him in - $INPUT->server->set('REMOTE_USER', $user); - $USERINFO = $session['info']; //FIXME move all references to session - return true; + if (isset($_SESSION[DOKU_COOKIE])) { + $session = $_SESSION[DOKU_COOKIE]['auth']; + if (isset($session) && + $auth->useSessionCache($user) && + ($session['time'] >= time() - $conf['auth_security_timeout']) && + ($session['user'] == $user) && + ($session['pass'] == sha1($pass)) && //still crypted + ($session['buid'] == auth_browseruid()) + ) { + + // he has session, cookie and browser right - let him in + $INPUT->server->set('REMOTE_USER', $user); + $USERINFO = $session['info']; //FIXME move all references to session + return true; + } } // no we don't trust it yet - recheck pass but silent $secret = auth_cookiesalt(!$sticky, true); //bind non-sticky to session @@ -467,8 +469,14 @@ function auth_ismanager($user = null, $groups = null, $adminonly = false, $recac $user = $INPUT->server->str('REMOTE_USER'); } } - if(is_null($groups)) { - $groups = $USERINFO ? (array) $USERINFO['grps'] : array(); + if (is_null($groups)) { + // checking the logged in user, or another one? + if ($USERINFO && $user === $INPUT->server->str('REMOTE_USER')) { + $groups = (array) $USERINFO['grps']; + } else { + $groups = $auth->getUserData($user); + $groups = $groups ? $groups['grps'] : []; + } } // prefer cached result diff --git a/inc/changelog.php b/inc/changelog.php index f02572e7f..d40b80432 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -38,7 +38,7 @@ function parseChangelogLine($line) { } /** - * Add's an entry to the changelog and saves the metadata for the page + * Adds an entry to the changelog and saves the metadata for the page * * @param int $date Timestamp of the change * @param String $id Name of the affected page @@ -94,12 +94,12 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr $wasReverted = ($type===DOKU_CHANGE_TYPE_REVERT); // update metadata if (!$wasRemoved) { - $oldmeta = p_read_metadata($id); + $oldmeta = p_read_metadata($id)['persistent']; $meta = array(); if ( $wasCreated && ( - empty($oldmeta['persistent']['date']['created']) || - $oldmeta['persistent']['date']['created'] === $created + empty($oldmeta['date']['created']) || + $oldmeta['date']['created'] === $created ) ){ // newly created @@ -108,11 +108,11 @@ function addLogEntry($date, $id, $type=DOKU_CHANGE_TYPE_EDIT, $summary='', $extr $meta['creator'] = isset($INFO) ? $INFO['userinfo']['name'] : null; $meta['user'] = $user; } - } elseif (($wasCreated || $wasReverted) && !empty($oldmeta['persistent']['date']['created'])) { + } elseif (($wasCreated || $wasReverted) && !empty($oldmeta['date']['created'])) { // re-created / restored - $meta['date']['created'] = $oldmeta['persistent']['date']['created']; + $meta['date']['created'] = $oldmeta['date']['created']; $meta['date']['modified'] = $created; // use the files ctime here - $meta['creator'] = $oldmeta['persistent']['creator']; + $meta['creator'] = isset($oldmeta['creator']) ? $oldmeta['creator'] : null; if ($user) $meta['contributor'][$user] = isset($INFO) ? $INFO['userinfo']['name'] : null; } elseif (!$minor) { // non-minor modification $meta['date']['modified'] = $date; diff --git a/inc/cli.php b/inc/cli.php deleted file mode 100644 index cb4dabf04..000000000 --- a/inc/cli.php +++ /dev/null @@ -1,656 +0,0 @@ -<?php - -/** - * Class DokuCLI - * - * All DokuWiki commandline scripts should inherit from this class and implement the abstract methods. - * - * @deprecated 2017-11-10 - * @author Andreas Gohr <andi@splitbrain.org> - */ -abstract class DokuCLI { - /** @var string the executed script itself */ - protected $bin; - /** @var DokuCLI_Options the option parser */ - protected $options; - /** @var DokuCLI_Colors */ - public $colors; - - /** - * constructor - * - * Initialize the arguments, set up helper classes and set up the CLI environment - */ - public function __construct() { - set_exception_handler(array($this, 'fatal')); - - $this->options = new DokuCLI_Options(); - $this->colors = new DokuCLI_Colors(); - - dbg_deprecated('use \splitbrain\phpcli\CLI instead'); - $this->error('DokuCLI is deprecated, use \splitbrain\phpcli\CLI instead.'); - } - - /** - * Register options and arguments on the given $options object - * - * @param DokuCLI_Options $options - * @return void - */ - abstract protected function setup(DokuCLI_Options $options); - - /** - * Your main program - * - * Arguments and options have been parsed when this is run - * - * @param DokuCLI_Options $options - * @return void - */ - abstract protected function main(DokuCLI_Options $options); - - /** - * Execute the CLI program - * - * Executes the setup() routine, adds default options, initiate the options parsing and argument checking - * and finally executes main() - */ - public function run() { - if('cli' != php_sapi_name()) throw new DokuCLI_Exception('This has to be run from the command line'); - - // setup - $this->setup($this->options); - $this->options->registerOption( - 'no-colors', - 'Do not use any colors in output. Useful when piping output to other tools or files.' - ); - $this->options->registerOption( - 'help', - 'Display this help screen and exit immediately.', - 'h' - ); - - // parse - $this->options->parseOptions(); - - // handle defaults - if($this->options->getOpt('no-colors')) { - $this->colors->disable(); - } - if($this->options->getOpt('help')) { - echo $this->options->help(); - exit(0); - } - - // check arguments - $this->options->checkArguments(); - - // execute - $this->main($this->options); - - exit(0); - } - - /** - * Exits the program on a fatal error - * - * @param Exception|string $error either an exception or an error message - */ - public function fatal($error) { - $code = 0; - if(is_object($error) && is_a($error, 'Exception')) { - /** @var Exception $error */ - $code = $error->getCode(); - $error = $error->getMessage(); - } - if(!$code) $code = DokuCLI_Exception::E_ANY; - - $this->error($error); - exit($code); - } - - /** - * Print an error message - * - * @param string $string - */ - public function error($string) { - $this->colors->ptln("E: $string", 'red', STDERR); - } - - /** - * Print a success message - * - * @param string $string - */ - public function success($string) { - $this->colors->ptln("S: $string", 'green', STDERR); - } - - /** - * Print an info message - * - * @param string $string - */ - public function info($string) { - $this->colors->ptln("I: $string", 'cyan', STDERR); - } - -} - -/** - * Class DokuCLI_Colors - * - * Handles color output on (Linux) terminals - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -class DokuCLI_Colors { - /** @var array known color names */ - protected $colors = array( - 'reset' => "\33[0m", - 'black' => "\33[0;30m", - 'darkgray' => "\33[1;30m", - 'blue' => "\33[0;34m", - 'lightblue' => "\33[1;34m", - 'green' => "\33[0;32m", - 'lightgreen' => "\33[1;32m", - 'cyan' => "\33[0;36m", - 'lightcyan' => "\33[1;36m", - 'red' => "\33[0;31m", - 'lightred' => "\33[1;31m", - 'purple' => "\33[0;35m", - 'lightpurple' => "\33[1;35m", - 'brown' => "\33[0;33m", - 'yellow' => "\33[1;33m", - 'lightgray' => "\33[0;37m", - 'white' => "\33[1;37m", - ); - - /** @var bool should colors be used? */ - protected $enabled = true; - - /** - * Constructor - * - * Tries to disable colors for non-terminals - */ - public function __construct() { - if(function_exists('posix_isatty') && !posix_isatty(STDOUT)) { - $this->enabled = false; - return; - } - if(!getenv('TERM')) { - $this->enabled = false; - return; - } - } - - /** - * enable color output - */ - public function enable() { - $this->enabled = true; - } - - /** - * disable color output - */ - public function disable() { - $this->enabled = false; - } - - /** - * Convenience function to print a line in a given color - * - * @param string $line - * @param string $color - * @param resource $channel - */ - public function ptln($line, $color, $channel = STDOUT) { - $this->set($color); - fwrite($channel, rtrim($line)."\n"); - $this->reset(); - } - - /** - * Set the given color for consecutive output - * - * @param string $color one of the supported color names - * @throws DokuCLI_Exception - */ - public function set($color) { - if(!$this->enabled) return; - if(!isset($this->colors[$color])) throw new DokuCLI_Exception("No such color $color"); - echo $this->colors[$color]; - } - - /** - * reset the terminal color - */ - public function reset() { - $this->set('reset'); - } -} - -/** - * Class DokuCLI_Options - * - * Parses command line options passed to the CLI script. Allows CLI scripts to easily register all accepted options and - * commands and even generates a help text from this setup. - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -class DokuCLI_Options { - /** @var array keeps the list of options to parse */ - protected $setup; - - /** @var array store parsed options */ - protected $options = array(); - - /** @var string current parsed command if any */ - protected $command = ''; - - /** @var array passed non-option arguments */ - public $args = array(); - - /** @var string the executed script */ - protected $bin; - - /** - * Constructor - */ - public function __construct() { - $this->setup = array( - '' => array( - 'opts' => array(), - 'args' => array(), - 'help' => '' - ) - ); // default command - - $this->args = $this->readPHPArgv(); - $this->bin = basename(array_shift($this->args)); - - $this->options = array(); - } - - /** - * Sets the help text for the tool itself - * - * @param string $help - */ - public function setHelp($help) { - $this->setup['']['help'] = $help; - } - - /** - * Register the names of arguments for help generation and number checking - * - * This has to be called in the order arguments are expected - * - * @param string $arg argument name (just for help) - * @param string $help help text - * @param bool $required is this a required argument - * @param string $command if theses apply to a sub command only - * @throws DokuCLI_Exception - */ - public function registerArgument($arg, $help, $required = true, $command = '') { - if(!isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command not registered"); - - $this->setup[$command]['args'][] = array( - 'name' => $arg, - 'help' => $help, - 'required' => $required - ); - } - - /** - * This registers a sub command - * - * Sub commands have their own options and use their own function (not main()). - * - * @param string $command - * @param string $help - * @throws DokuCLI_Exception - */ - public function registerCommand($command, $help) { - if(isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command already registered"); - - $this->setup[$command] = array( - 'opts' => array(), - 'args' => array(), - 'help' => $help - ); - - } - - /** - * Register an option for option parsing and help generation - * - * @param string $long multi character option (specified with --) - * @param string $help help text for this option - * @param string|null $short one character option (specified with -) - * @param bool|string $needsarg does this option require an argument? give it a name here - * @param string $command what command does this option apply to - * @throws DokuCLI_Exception - */ - public function registerOption($long, $help, $short = null, $needsarg = false, $command = '') { - if(!isset($this->setup[$command])) throw new DokuCLI_Exception("Command $command not registered"); - - $this->setup[$command]['opts'][$long] = array( - 'needsarg' => $needsarg, - 'help' => $help, - 'short' => $short - ); - - if($short) { - if(strlen($short) > 1) throw new DokuCLI_Exception("Short options should be exactly one ASCII character"); - - $this->setup[$command]['short'][$short] = $long; - } - } - - /** - * Checks the actual number of arguments against the required number - * - * Throws an exception if arguments are missing. Called from parseOptions() - * - * @throws DokuCLI_Exception - */ - public function checkArguments() { - $argc = count($this->args); - - $req = 0; - foreach($this->setup[$this->command]['args'] as $arg) { - if(!$arg['required']) break; // last required arguments seen - $req++; - } - - if($req > $argc) throw new DokuCLI_Exception("Not enough arguments", DokuCLI_Exception::E_OPT_ARG_REQUIRED); - } - - /** - * Parses the given arguments for known options and command - * - * The given $args array should NOT contain the executed file as first item anymore! The $args - * array is stripped from any options and possible command. All found otions can be accessed via the - * getOpt() function - * - * Note that command options will overwrite any global options with the same name - * - * @throws DokuCLI_Exception - */ - public function parseOptions() { - $non_opts = array(); - - $argc = count($this->args); - for($i = 0; $i < $argc; $i++) { - $arg = $this->args[$i]; - - // The special element '--' means explicit end of options. Treat the rest of the arguments as non-options - // and end the loop. - if($arg == '--') { - $non_opts = array_merge($non_opts, array_slice($this->args, $i + 1)); - break; - } - - // '-' is stdin - a normal argument - if($arg == '-') { - $non_opts = array_merge($non_opts, array_slice($this->args, $i)); - break; - } - - // first non-option - if($arg[0] != '-') { - $non_opts = array_merge($non_opts, array_slice($this->args, $i)); - break; - } - - // long option - if(strlen($arg) > 1 && $arg[1] == '-') { - list($opt, $val) = explode('=', substr($arg, 2), 2); - - if(!isset($this->setup[$this->command]['opts'][$opt])) { - throw new DokuCLI_Exception("No such option $arg", DokuCLI_Exception::E_UNKNOWN_OPT); - } - - // argument required? - if($this->setup[$this->command]['opts'][$opt]['needsarg']) { - if(is_null($val) && $i + 1 < $argc && !preg_match('/^--?[\w]/', $this->args[$i + 1])) { - $val = $this->args[++$i]; - } - if(is_null($val)) { - throw new DokuCLI_Exception("Option $arg requires an argument", DokuCLI_Exception::E_OPT_ARG_REQUIRED); - } - $this->options[$opt] = $val; - } else { - $this->options[$opt] = true; - } - - continue; - } - - // short option - $opt = substr($arg, 1); - if(!isset($this->setup[$this->command]['short'][$opt])) { - throw new DokuCLI_Exception("No such option $arg", DokuCLI_Exception::E_UNKNOWN_OPT); - } else { - $opt = $this->setup[$this->command]['short'][$opt]; // store it under long name - } - - // argument required? - if($this->setup[$this->command]['opts'][$opt]['needsarg']) { - $val = null; - if($i + 1 < $argc && !preg_match('/^--?[\w]/', $this->args[$i + 1])) { - $val = $this->args[++$i]; - } - if(is_null($val)) { - throw new DokuCLI_Exception("Option $arg requires an argument", DokuCLI_Exception::E_OPT_ARG_REQUIRED); - } - $this->options[$opt] = $val; - } else { - $this->options[$opt] = true; - } - } - - // parsing is now done, update args array - $this->args = $non_opts; - - // if not done yet, check if first argument is a command and reexecute argument parsing if it is - if(!$this->command && $this->args && isset($this->setup[$this->args[0]])) { - // it is a command! - $this->command = array_shift($this->args); - $this->parseOptions(); // second pass - } - } - - /** - * Get the value of the given option - * - * Please note that all options are accessed by their long option names regardless of how they were - * specified on commandline. - * - * Can only be used after parseOptions() has been run - * - * @param string $option - * @param bool|string $default what to return if the option was not set - * @return bool|string - */ - public function getOpt($option, $default = false) { - if(isset($this->options[$option])) return $this->options[$option]; - return $default; - } - - /** - * Return the found command if any - * - * @return string - */ - public function getCmd() { - return $this->command; - } - - /** - * Builds a help screen from the available options. You may want to call it from -h or on error - * - * @return string - */ - public function help() { - $text = ''; - - $hascommands = (count($this->setup) > 1); - foreach($this->setup as $command => $config) { - $hasopts = (bool) $this->setup[$command]['opts']; - $hasargs = (bool) $this->setup[$command]['args']; - - if(!$command) { - $text .= 'USAGE: '.$this->bin; - } else { - $text .= "\n$command"; - } - - if($hasopts) $text .= ' <OPTIONS>'; - - foreach($this->setup[$command]['args'] as $arg) { - if($arg['required']) { - $text .= ' <'.$arg['name'].'>'; - } else { - $text .= ' [<'.$arg['name'].'>]'; - } - } - $text .= "\n"; - - if($this->setup[$command]['help']) { - $text .= "\n"; - $text .= $this->tableFormat( - array(2, 72), - array('', $this->setup[$command]['help']."\n") - ); - } - - if($hasopts) { - $text .= "\n OPTIONS\n\n"; - foreach($this->setup[$command]['opts'] as $long => $opt) { - - $name = ''; - if($opt['short']) { - $name .= '-'.$opt['short']; - if($opt['needsarg']) $name .= ' <'.$opt['needsarg'].'>'; - $name .= ', '; - } - $name .= "--$long"; - if($opt['needsarg']) $name .= ' <'.$opt['needsarg'].'>'; - - $text .= $this->tableFormat( - array(2, 20, 52), - array('', $name, $opt['help']) - ); - $text .= "\n"; - } - } - - if($hasargs) { - $text .= "\n"; - foreach($this->setup[$command]['args'] as $arg) { - $name = '<'.$arg['name'].'>'; - - $text .= $this->tableFormat( - array(2, 20, 52), - array('', $name, $arg['help']) - ); - } - } - - if($command == '' && $hascommands) { - $text .= "\nThis tool accepts a command as first parameter as outlined below:\n"; - } - } - - return $text; - } - - /** - * Safely read the $argv PHP array across different PHP configurations. - * Will take care on register_globals and register_argc_argv ini directives - * - * @throws DokuCLI_Exception - * @return array the $argv PHP array or PEAR error if not registered - */ - private function readPHPArgv() { - global $argv; - if(!is_array($argv)) { - if(!@is_array($_SERVER['argv'])) { - if(!@is_array($GLOBALS['HTTP_SERVER_VARS']['argv'])) { - throw new DokuCLI_Exception( - "Could not read cmd args (register_argc_argv=Off?)", - DOKU_CLI_OPTS_ARG_READ - ); - } - return $GLOBALS['HTTP_SERVER_VARS']['argv']; - } - return $_SERVER['argv']; - } - return $argv; - } - - /** - * Displays text in multiple word wrapped columns - * - * @param int[] $widths list of column widths (in characters) - * @param string[] $texts list of texts for each column - * @return string - */ - private function tableFormat($widths, $texts) { - $wrapped = array(); - $maxlen = 0; - - foreach($widths as $col => $width) { - $wrapped[$col] = explode("\n", wordwrap($texts[$col], $width - 1, "\n", true)); // -1 char border - $len = count($wrapped[$col]); - if($len > $maxlen) $maxlen = $len; - - } - - $out = ''; - for($i = 0; $i < $maxlen; $i++) { - foreach($widths as $col => $width) { - if(isset($wrapped[$col][$i])) { - $val = $wrapped[$col][$i]; - } else { - $val = ''; - } - $out .= sprintf('%-'.$width.'s', $val); - } - $out .= "\n"; - } - return $out; - } -} - -/** - * Class DokuCLI_Exception - * - * The code is used as exit code for the CLI tool. This should probably be extended. Many cases just fall back to the - * E_ANY code. - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -class DokuCLI_Exception extends Exception { - const E_ANY = -1; // no error code specified - const E_UNKNOWN_OPT = 1; //Unrecognized option - const E_OPT_ARG_REQUIRED = 2; //Option requires argument - const E_OPT_ARG_DENIED = 3; //Option not allowed argument - const E_OPT_ABIGUOUS = 4; //Option abiguous - const E_ARG_READ = 5; //Could not read argv - - /** - * @param string $message The Exception message to throw. - * @param int $code The Exception code - * @param Exception $previous The previous exception used for the exception chaining. - */ - public function __construct($message = "", $code = 0, Exception $previous = null) { - if(!$code) $code = DokuCLI_Exception::E_ANY; - parent::__construct($message, $code, $previous); - } -} diff --git a/inc/common.php b/inc/common.php index 2910358c7..c56240a93 100644 --- a/inc/common.php +++ b/inc/common.php @@ -587,8 +587,10 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) if(is_array($more)) { // add token for resized images - if(!empty($more['w']) || !empty($more['h']) || $isexternalimage){ - $more['tok'] = media_get_token($id,$more['w'],$more['h']); + $w = isset($more['w']) ? $more['w'] : null; + $h = isset($more['h']) ? $more['h'] : null; + if($w || $h || $isexternalimage){ + $more['tok'] = media_get_token($id, $w, $h); } // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); @@ -820,7 +822,7 @@ function clientIP($single = false) { if(empty($ip[$i])) unset($ip[$i]); } $ip = array_values(array_unique($ip)); - if(!$ip[0]) $ip[0] = '0.0.0.0'; // for some strange reason we don't have a IP + if(empty($ip) || !$ip[0]) $ip[0] = '0.0.0.0'; // for some strange reason we don't have a IP if(!$single) return join(',', $ip); @@ -2079,7 +2081,7 @@ function set_doku_pref($pref, $val) { } $cookieVal = implode('#', $parts); } else if ($orig === false && $val !== false) { - $cookieVal = ($_COOKIE['DOKU_PREFS'] ? $_COOKIE['DOKU_PREFS'] . '#' : '') . + $cookieVal = (isset($_COOKIE['DOKU_PREFS']) ? $_COOKIE['DOKU_PREFS'] . '#' : '') . rawurlencode($pref) . '#' . rawurlencode($val); } diff --git a/inc/fulltext.php b/inc/fulltext.php index 79b2c4f8a..7c28a5962 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -80,7 +80,9 @@ function _ft_pageSearch(&$data) { case 'W-:': case 'W_:': // word $word = substr($token, 3); - $stack[] = (array) $lookup[$word]; + if(isset($lookup[$word])) { + $stack[] = (array)$lookup[$word]; + } break; case 'P+:': case 'P-:': // phrase @@ -266,6 +268,10 @@ function _ft_pageLookup(&$data){ $ns = cleanID($parsedQuery['ns'][0]) . ':'; $id = implode(' ', $parsedQuery['highlight']); } + if (count($parsedQuery['notns']) > 0) { + $notns = cleanID($parsedQuery['notns'][0]) . ':'; + $id = implode(' ', $parsedQuery['highlight']); + } $in_ns = $data['in_ns']; $in_title = $data['in_title']; @@ -297,6 +303,13 @@ function _ft_pageLookup(&$data){ } } } + if (isset($notns)) { + foreach (array_keys($pages) as $p_id) { + if (strpos($p_id, $notns) === 0) { + unset($pages[$p_id]); + } + } + } // discard hidden pages // discard nonexistent pages diff --git a/inc/init.php b/inc/init.php index 5cf1b56e9..059d7060a 100644 --- a/inc/init.php +++ b/inc/init.php @@ -402,8 +402,9 @@ function init_creationmodes(){ unset($conf['dmask']); unset($conf['fmask']); unset($conf['umask']); - unset($conf['fperm']); - unset($conf['dperm']); + + $conf['fperm'] = false; + $conf['dperm'] = false; // get system umask, fallback to 0 if none available $umask = @umask(); diff --git a/inc/io.php b/inc/io.php index 1dfabe845..18eff6858 100644 --- a/inc/io.php +++ b/inc/io.php @@ -410,7 +410,7 @@ function io_lock($file){ if ((time() - $timeStart) > 3) break; $locked = @mkdir($lockDir, $conf['dmode']); if($locked){ - if(!empty($conf['dperm'])) chmod($lockDir, $conf['dperm']); + if($conf['dperm']) chmod($lockDir, $conf['dperm']); break; } usleep(50); diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index e8b12f502..60a870c45 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> + * @author lp <spam@lukpopp.ch> * @author Martin <martin@andev.de> * @author F. Mueller-Donath <j.felix@mueller-donath.de> * @author Andreas Gohr <andi@splitbrain.org> @@ -85,6 +87,7 @@ $lang['badpassconfirm'] = 'Das Passwort war falsch.'; $lang['minoredit'] = 'Kleine Änderung'; $lang['draftdate'] = 'Entwurf gespeichert am'; $lang['nosecedit'] = 'Diese Seite wurde in der Zwischenzeit geändert, da das Sektionsinfo veraltet ist. Die ganze Seite wird stattdessen geladen.'; +$lang['searchcreatepage'] = 'Falls der gesuchte Begriff nicht gefunden wurde, kannst du direkt eine neue, nach deiner Anfrage benannte Seite %s anlegen.'; $lang['search_fullresults'] = 'Volltextergebnisse'; $lang['js']['search_toggle_tools'] = 'Suchwerkzeuge umschalten'; $lang['js']['willexpire'] = 'Die Sperre zur Bearbeitung dieser Seite läuft in einer Minute ab.\nUm Bearbeitungskonflikte zu vermeiden, solltest du sie durch einen Klick auf den Vorschau-Knopf verlängern.'; @@ -312,8 +315,11 @@ $lang['i_superuser'] = 'Benutzername des Administrators'; $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführte Probleme festgestellt, die zunächst behoben werden müssen, bevor du mit der Installation fortfahren kannst.'; $lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Skript nur mit einer neuen bzw. nicht modifizierten DokuWiki-Installation. Du solltest entweder alle Dateien noch einmal frisch installieren oder die <a href="http://dokuwiki.org/install">Dokuwiki-Installationsanleitung</a> konsultieren.'; $lang['i_funcna'] = 'Die PHP-Funktion <code>%s</code> ist nicht verfügbar. Unter Umständen wurde sie von deinem Hoster deaktiviert?'; +$lang['i_disabled'] = 'Es wurde von deinem Provider deaktiviert.'; +$lang['i_funcnmail'] = '<b>Hinweis:</b> Die PHP-Funktion "mail()" ist nicht verfügbar. %s Alternativ kansnt du das <a href="https://www.dokuwiki.org/plugin:smtp">SMTP-Plugin</a> installieren.'; $lang['i_phpver'] = 'Deine PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisiere deine PHP-Installation.'; $lang['i_mbfuncoverload'] = 'mbstring.func_overload muss in php.in deaktiviert werden um DokuWiki auszuführen.'; +$lang['i_urandom'] = 'DokuWiki kann keine kryptografisch sicheren Werte für Cookies generieren. Möglicherweise möchtest du die "open_basedir"-Einstellungen in der zutreffenden php.ini auf korrekten Zugriff auf <code>/ dev/urandom</ code> überprüfen.'; $lang['i_permfail'] = '<code>%s</code> ist nicht durch DokuWiki beschreibbar. Du musst die Berechtigungen dieses Ordners ändern!'; $lang['i_confexists'] = '<code>%s</code> existiert bereits'; $lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Du solltest die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.'; @@ -364,6 +370,7 @@ $lang['media_perm_upload'] = 'Du besitzt nicht die notwendigen Berechtigunge $lang['media_update'] = 'Neue Version hochladen'; $lang['media_restore'] = 'Diese Version wiederherstellen'; $lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.'; +$lang['email_fail'] = 'PHP-Funktion "mail ()" fehlt oder ist deaktiviert. Die folgende E-Mail wurde nicht gesendet:'; $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnis'; $lang['plainhtml'] = 'Reines HTML'; diff --git a/inc/lang/de-informal/onceexisted.txt b/inc/lang/de-informal/onceexisted.txt new file mode 100644 index 000000000..c5408f479 --- /dev/null +++ b/inc/lang/de-informal/onceexisted.txt @@ -0,0 +1,3 @@ +======= Diese Seite existiert nicht mehr ====== + +Du bist einem Link zu einer Seite gefolgt, den es nicht mehr gibt. Um zu sehen, wann und warum diese Seite gelöscht bzw. um ältere Versionen zu besichtigen oder zu laden, besuche [[?do=revisions|old revisions]].
\ No newline at end of file diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 7e455b0f2..07fbb3b8f 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Markus Glaser <glaser@hallowelt.com> * @author Axel Schwarzer <SchwarzerA@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> * @author Eric Haberstroh <ehaberstroh@gmail.com> @@ -148,6 +149,7 @@ $lang['js']['media_done_btn'] = 'Fertig'; $lang['js']['media_drop'] = 'Dateien hier hinziehen, um sie hochzuladen'; $lang['js']['media_cancel'] = 'Entfernen'; $lang['js']['media_overwrt'] = 'Existierende Dateien überschreiben'; +$lang['js']['data_insecure'] = 'WARNUNG: Es scheint, als wäre Ihr Datenverzeichnis nicht ausreichend geschützt. Bitte informieren Sie sich zur <a href="https://www.dokuwiki.org/security#web_access_security">Sicherheit von Webzugriffen in DokuWiki</a>'; $lang['search_exact_match'] = 'Genaue Treffer'; $lang['search_starts_with'] = 'Beginnt mit'; $lang['search_ends_with'] = 'Endet mit'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 000368ac2..9e56d6f84 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -171,6 +171,7 @@ $lang['js']['media_done_btn'] = 'Done'; $lang['js']['media_drop'] = 'Drop files here to upload'; $lang['js']['media_cancel'] = 'remove'; $lang['js']['media_overwrt'] = 'Overwrite existing files'; +$lang['js']['data_insecure'] = 'WARNING: It seems your data directory is not properly secured. Please read about <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki</a>.'; $lang['rssfailed'] = 'An error occurred while fetching this feed: '; $lang['nothingfound'] = 'Nothing was found.'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 6c5c448e3..f157fd5af 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Luna Frax <lunafrax@gmail.com> * @author Domingo Redal <docxml@gmail.com> * @author Liliana <lilianasaidon@gmail.com> * @author Alex Cachinero <anarres@protonmail.com> @@ -201,6 +202,7 @@ $lang['txt_upload'] = 'Selecciona el archivo a subir:'; $lang['txt_filename'] = 'Subir como (opcional):'; $lang['txt_overwrt'] = 'Sobreescribir archivo existente'; $lang['maxuploadsize'] = 'Peso máximo de %s por archivo'; +$lang['allowedmime'] = 'Lista de extensiones de archivo permitidas'; $lang['lockedby'] = 'Actualmente bloqueado por:'; $lang['lockexpire'] = 'El bloqueo expira en:'; $lang['rssfailed'] = 'Se ha producido un error mientras se leÃan los datos de este feed: '; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index bf456383b..89b069eeb 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -3,9 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> + * @author Nicolas Friedli <nicolas@theologique.ch> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Pierre Henriot <pierre.henriot@gmail.com> - * @author Nicolas Friedli <nicolas@theologique.ch> * @author PaliPalo <palipalo@hotmail.fr> * @author Laurent Ponthieu <contact@coopindus.fr> * @author Damien Regad <dregad@mantisbt.org> @@ -43,7 +44,6 @@ * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> * @author Floriang <antispam@floriang.eu> * @author Eric <ericstevenart@netc.fr> - * @author Olivier Humbert <trebmuh@tuxfamily.org> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -148,6 +148,7 @@ $lang['js']['media_done_btn'] = 'Terminé'; $lang['js']['media_drop'] = 'Déposez des fichiers ici pour les envoyer'; $lang['js']['media_cancel'] = 'supprimer'; $lang['js']['media_overwrt'] = 'Écraser les fichiers existants'; +$lang['js']['data_insecure'] = 'ATTENTION : votre répertoire de données ne semble pas correctement sécurisé. Veuillez lire <a href="https://www.dokuwiki.org/fr:security#securite_de_l_acces_web">Sécurité de l\'accès web (en français)</a> ou <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki (en anglais)</a>.'; $lang['search_exact_match'] = 'Correspondance exacte'; $lang['search_starts_with'] = 'Commence par'; $lang['search_ends_with'] = 'Se termine par'; @@ -304,9 +305,9 @@ $lang['img_artist'] = 'Photographe:'; $lang['img_copyr'] = 'Copyright:'; $lang['img_format'] = 'Format:'; $lang['img_camera'] = 'Appareil photo:'; -$lang['img_keywords'] = 'Mots-clés:'; -$lang['img_width'] = 'Largeur:'; -$lang['img_height'] = 'Hauteur:'; +$lang['img_keywords'] = 'Mots-clés :'; +$lang['img_width'] = 'Largeur :'; +$lang['img_height'] = 'Hauteur :'; $lang['subscr_subscribe_success'] = '%s a été ajouté à la liste des abonnés à %s'; $lang['subscr_subscribe_error'] = 'Erreur à l\'ajout de %s à la liste des abonnés de %s'; $lang['subscr_subscribe_noaddress'] = 'Il n\'y a pas d\'adresse associée à votre identifiant, vous ne pouvez pas être ajouté à la liste des abonnés.'; diff --git a/inc/lang/hy/admin.txt b/inc/lang/hy/admin.txt new file mode 100644 index 000000000..9b2eea7bb --- /dev/null +++ b/inc/lang/hy/admin.txt @@ -0,0 +1,3 @@ +====== Õ‚Õ¥Õ¯Õ¡Õ¾Õ¡Ö€Õ¸Ö‚Õ´ ====== + +ÕÕ¿Õ¸Ö€Ö‡ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ½ Õ£Õ¿Õ¶Õ¥Õ¬ Ô´Õ¸Õ¯Õ¸Ö‚ÕŽÕ«Ö„Õ«Õ¸Ö‚Õ´ Õ°Õ¡Õ½Õ¡Õ¶Õ¥Õ¬Õ« Õ²Õ¥Õ¯Õ¡Õ¾Õ¡Ö€Õ´Õ¡Õ¶ Õ¡Õ¼Õ¡Õ»Õ¡Õ¤Ö€Õ¡Õ¶Ö„Õ¶Õ¥Ö€Õ¨Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/adminplugins.txt b/inc/lang/hy/adminplugins.txt new file mode 100644 index 000000000..253eac22e --- /dev/null +++ b/inc/lang/hy/adminplugins.txt @@ -0,0 +1 @@ +===== Ô¼Ö€Õ¡ÖÕ¸Ö‚ÖÕ«Õ¹ Õ°Õ¡Õ¾Õ¥Õ¬Õ¸Ö‚Õ´Õ¶Õ¥Ö€ =====
\ No newline at end of file diff --git a/inc/lang/hy/conflict.txt b/inc/lang/hy/conflict.txt new file mode 100644 index 000000000..9b117f2fc --- /dev/null +++ b/inc/lang/hy/conflict.txt @@ -0,0 +1,5 @@ +====== Ô³Õ¸ÕµÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ¸Ö‚Õ¶Õ« Õ¶Õ¸Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯ ====== + +Ô³Õ¸ÕµÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ¸Ö‚Õ¶Õ« ÕÕ´Õ¢Õ¡Õ£Ö€Õ¾Õ¡Õ® ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ¶Õ¸Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Ö‰ Õ”Õ¸ ÕÕ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬Õ¸Ö‚ Õ¨Õ¶Õ©Õ¡ÖÖ„Õ¸Ö‚Õ´ Õ´Õ¥Õ¯ Õ¡ÕµÕ¬ Ö…Õ£Õ¿Õ¡Õ¿Õ¥Ö€ ÖƒÕ¸ÖƒÕ¸ÕÕ¥Õ¬ Õ§ Õ¡ÕµÕ½ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ¸Ö‚Õ²Õ©Õ¨Ö‰ + +Ô´Õ«Õ¿Õ«Ö€ Õ½Õ¿Õ¸Ö€Ö‡ ÖÕ¸Ö‚ÖÕ¡Õ¤Ö€Õ¾Õ¸Õ² Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Õ¨ Ö‡ Õ¸Ö€Õ¸Õ·Õ«Ö€, Õ¸Ö€Õ¶ Õ¥Õ½ ÖÕ¡Õ¶Õ¯Õ¡Õ¶Õ¸Ö‚Õ´ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬Ö‰ ÔµÕ©Õ¥ Õ¨Õ¶Õ¿Ö€Õ¥Õ½ «պահել», Ö„Õ¸ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨ Õ¯ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ«Ö‰ ÕÕ¥Õ²Õ´Õ«Ö€ Â«Õ¹Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬Â»Õ Õ¶Õ¥Ö€Õ¯Õ¡ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¨ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€;
\ No newline at end of file diff --git a/inc/lang/hy/denied.txt b/inc/lang/hy/denied.txt new file mode 100644 index 000000000..c9ccc72bf --- /dev/null +++ b/inc/lang/hy/denied.txt @@ -0,0 +1,3 @@ +====== Õ‰Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´ ====== + +Õ‘Õ¡Õ¾Õ¸Ö„, Õ¤Õ¸Ö‚ Õ¹Õ¸Ö‚Õ¶Õ¥Õ½ Õ¢Õ¡Õ¾Õ¡Ö€Õ¡Ö€ Õ«Ö€Õ¡Õ¾Õ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€ Õ·Õ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/diff.txt b/inc/lang/hy/diff.txt new file mode 100644 index 000000000..5816dccf3 --- /dev/null +++ b/inc/lang/hy/diff.txt @@ -0,0 +1,3 @@ +====== ÕÕ¡Ö€Õ¢Õ¥Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€ ====== + +Õ‘Õ¸Ö‚ÕµÖ Õ§ Õ¿Õ¡Õ¬Õ«Õ½ Õ§Õ»Õ« Õ¥Ö€Õ¯Õ¸Ö‚ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€Õ« Õ´Õ«Õ»Ö‡ Õ¡Õ¼Õ¯Õ¡ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/draft.txt b/inc/lang/hy/draft.txt new file mode 100644 index 000000000..123167aba --- /dev/null +++ b/inc/lang/hy/draft.txt @@ -0,0 +1,5 @@ +====== Ô³Õ¿Õ¶Õ¾Õ¥Õ¬ Õ§ Õ½Ö‡Õ¡Õ£Õ«Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯ ====== + +Õ”Õ¸ Õ¶Õ¡ÕÕ¸Ö€Õ¤ ÕÕ´Õ¢Õ¡Õ£Ö€Õ´Õ¡Õ¶ Õ½Õ¥Õ½Õ«Õ¡Õ¶ Õ°Õ¡Õ»Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¹Õ« Õ¡Õ¾Õ¡Ö€Õ¿Õ¾Õ¥Õ¬Ö‰ Ô´Õ¸Õ¯Õ¸Ö‚ÕŽÕ«Ö„Õ«Õ¶ Ö„Õ¸ Õ¡Õ·ÕÕ¡Õ¿Õ¡Õ¶Ö„Õ« Õ¨Õ¶Õ©Õ¡ÖÖ„Õ¸Ö‚Õ´ Õ¡Õ¾Õ¿Õ¸Õ´Õ¡Õ¿ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¥Õ¬ Õ§ Õ½Ö‡Õ¡Õ£Õ«Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯, Õ¸Ö€Õ¨ Õ¤Õ¸Ö‚ Õ¡ÕµÕªÕ´ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ½ Ö…Õ£Õ¿Õ¡Õ£Õ¸Ö€Õ®Õ¥Õ¬ ÕÕ´Õ¢Õ¡Õ£Ö€Õ¸Ö‚Õ´Õ¨ Õ·Õ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€Ö‰ ÕÕ¿Õ¸Ö€Ö‡ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ½ Õ£Õ¿Õ¶Õ¥Õ¬ Õ¾Õ¥Ö€Õ»Õ«Õ¶ Õ½Õ¥Õ½Õ«Õ¡ÕµÕ«Ö ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨Ö‰ + +Ô½Õ¶Õ¤Ö€Õ¸Ö‚Õ´ Õ¥Õ¶Ö„, Õ¸Ö€Õ¸Õ·Õ«Õ¹Õ ÖÕ¡Õ¶Õ¯Õ¡Õ¶Õ¸Ö‚Õ´ Õ¥Õ½ //Õ¾Õ¥Ö€Õ¡Õ¯Õ¡Õ¶Õ£Õ¶Õ¥Õ¬// Õ¯Õ¸Ö€Õ½Õ¾Õ¡Õ® ÕÕ´Õ¢Õ¡Õ£Ö€Õ´Õ¡Õ¶ Õ½Õ¥Õ½Õ«Õ¡Õ¶, //Õ»Õ¶Õ»Õ¥Õ¬// Õ¡Õ¾Õ¿Õ¸Õ´Õ¡Õ¿ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ¡Õ® Õ½Ö‡Õ¡Õ£Õ«Ö€Õ¨, Õ©Õ¥ //Õ¹Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬// ÕÕ´Õ¢Õ¡Õ£Ö€Õ´Õ¡Õ¶ Õ£Õ¸Ö€Õ®Õ¨Õ¶Õ©Õ¡ÖÕ¨Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/edit.txt b/inc/lang/hy/edit.txt new file mode 100644 index 000000000..776e3f44c --- /dev/null +++ b/inc/lang/hy/edit.txt @@ -0,0 +1 @@ +Ô½Õ´Õ¢Õ¡Õ£Ö€Õ«Ö€ Õ¡ÕµÕ½ Õ§Õ»Õ¨ Ö‡ Õ½Õ¥Õ²Õ´Õ«Ö€ //ÕŠÕ¡Õ°Õ¥Õ¬//Ö‰ Ô¿Õ¡Ö€Õ¤Õ¡ [[wiki:syntax]] Õ§Õ»Õ¨ Õ¡ÕµÕ½ Õ¾Õ«Ö„Õ«Õ« Õ·Õ¡Ö€Õ¡Õ°ÕµÕ¸Ö‚Õ½Õ¸Ö‚Õ©ÕµÕ¡Õ¶Õ¨ Õ®Õ¡Õ¶Õ¸Õ©Õ¡Õ¶Õ¡Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€Ö‰ Ô½Õ¶Õ¤Ö€Õ¸Ö‚Õ´ Õ¥Õ¶Ö„ ÕÕ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬ Õ¡ÕµÕ½ Õ§Õ»Õ¨ Õ´Õ«Õ¡ÕµÕ¶ Õ¥Õ©Õ¥ Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ½ **Õ¢Õ¡Ö€Õ¥Õ¬Õ¡Õ¾Õ¥Õ¬** Õ¡ÕµÕ¶Ö‰ ÔµÕ©Õ¥ ÖÕ¡Õ¶Õ¯Õ¡Õ¶Õ¸Ö‚Õ´ Õ¥Õ½ ÖƒÕ¸Ö€Õ±Õ¡Ö€Õ¯Õ¥Õ¬, Õ¡Õ¼Õ¡Õ»Õ«Õ¶ Ö„Õ¡ÕµÕ¬Õ¥Ö€Õ¤ Õ¡Ö€Õ¡ [[playground:playground|ÕÕ¡Õ²Õ¡Õ°Ö€Õ¡ÕºÕ¡Ö€Õ¡Õ¯Õ¸Ö‚Õ´]]Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/editrev.txt b/inc/lang/hy/editrev.txt new file mode 100644 index 000000000..31d7d0ae5 --- /dev/null +++ b/inc/lang/hy/editrev.txt @@ -0,0 +1,2 @@ +**Ô´Õ¸Ö‚ Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬ Õ¥Õ½ Õ¡ÕµÕ½ ÖƒÕ¡Õ½Õ¿Õ¡Õ©Õ²Õ©Õ« Õ°Õ«Õ¶ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Ö‰** ÔµÕ©Õ¥ ÕºÕ¡Õ°Õ¥Õ½ Õ¡ÕµÕ¶, Õ¡ÕµÕ½ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¸Õ¾ Õ¯Õ½Õ¿Õ¥Õ²Õ®Õ¥Õ½ Õ§Õ»Õ« Õ¶Õ¸Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Õ¡Õ¯Ö‰ +----
\ No newline at end of file diff --git a/inc/lang/hy/index.txt b/inc/lang/hy/index.txt new file mode 100644 index 000000000..1b213836b --- /dev/null +++ b/inc/lang/hy/index.txt @@ -0,0 +1,3 @@ +====== Ô¿Õ¡ÕµÖ„Õ« Ö„Õ¡Ö€Õ¿Õ¥Õ¦ ====== + +ÕÕ¡ Õ¢Õ¸Õ¬Õ¸Ö€ Õ¡Õ¼Õ¯Õ¡ Õ§Õ»Õ¥Ö€Õ« Ö„Õ¡Ö€Õ¿Õ¥Õ¦Õ¶ Õ§, Õ¸Ö€Õ¨ Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¾Õ¡Õ® Õ§ Õ¨Õ½Õ¿ [[doku>namespaces|Õ¡Õ¶Õ¾Õ¡Õ¶Õ¡Õ¿Õ¡Ö€Õ¡Õ®Ö„Õ¶Õ¥Ö€Õ«]]Ö‰
\ No newline at end of file diff --git a/inc/lang/hy/lang.php b/inc/lang/hy/lang.php new file mode 100644 index 000000000..0d253489b --- /dev/null +++ b/inc/lang/hy/lang.php @@ -0,0 +1,133 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Davit Saroyan <saroyandavid@gmail.com> + */ +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '«'; +$lang['doublequoteclosing'] = '»'; +$lang['singlequoteopening'] = '«'; +$lang['singlequoteclosing'] = '»'; +$lang['apostrophe'] = '’'; +$lang['btn_edit'] = 'Ô½Õ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬ Õ§Õ»Õ¨'; +$lang['btn_source'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ½Õ¯Õ¦Õ¢Õ¶Õ¡Õ²Õ¢ÕµÕ¸Ö‚Ö€Õ¨'; +$lang['btn_show'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ§Õ»Õ¨'; +$lang['btn_create'] = 'ÕÕ¿Õ¥Õ²Õ®Õ¥Õ¬ Õ§Õ»Õ¨'; +$lang['btn_search'] = 'ÕˆÖ€Õ¸Õ¶Õ¥Õ¬'; +$lang['btn_save'] = 'ÕŠÕ¡Õ°Õ¥Õ¬'; +$lang['btn_preview'] = 'Õ†Õ¡ÕÕ¡Õ¤Õ«Õ¿Õ¥Õ¬'; +$lang['btn_top'] = 'ÕŽÕ¥Ö€Õ¡Õ¤Õ¡Õ¼Õ¶Õ¡Õ¬ Õ¾Õ¥Ö€'; +$lang['btn_newer'] = '<< Õ¡Õ¾Õ¥Õ¬ Õ¾Õ¡Õ²'; +$lang['btn_older'] = 'Õ¡Õ¾Õ¥Õ¬Õ« Õ¸Ö‚Õ· >>'; +$lang['btn_revs'] = 'Õ€Õ«Õ¶ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯Õ¶Õ¥Ö€'; +$lang['btn_recent'] = 'ÕŽÕ¥Ö€Õ»Õ«Õ¶ ÖƒÕ¸ÖƒÕ¸ÕÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€'; +$lang['btn_upload'] = 'ÕŽÕ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬'; +$lang['btn_cancel'] = 'Õ‰Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬'; +$lang['btn_index'] = 'Ô¿Õ¡ÕµÖ„Õ« Ö„Õ¡Ö€Õ¿Õ¥Õ¦'; +$lang['btn_secedit'] = 'Ô½Õ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬'; +$lang['btn_login'] = 'Õ„Õ¸Ö‚Õ¿Ö„ Õ£Õ¸Ö€Õ®Õ¥Õ¬'; +$lang['btn_logout'] = 'Ô´Õ¸Ö‚Ö€Õ½ Õ£Õ¡Õ¬'; +$lang['btn_admin'] = 'Ô±Õ¤Õ´Õ«Õ¶'; +$lang['btn_update'] = 'Ô¹Õ¡Ö€Õ´Õ¡ÖÕ¶Õ¥Õ¬'; +$lang['btn_delete'] = 'Õ‹Õ¶Õ»Õ¥Õ¬'; +$lang['btn_back'] = 'Õ€Õ¥Õ¿'; +$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'] = 'Ô³Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼'; +$lang['newpass'] = 'Õ†Õ¸Ö€ Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼'; +$lang['oldpass'] = 'Õ€Õ¡Õ½Õ¿Õ¡Õ¿Õ¥Õ¬ Õ¶Õ¥Ö€Õ¯Õ¡ Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨'; +$lang['passchk'] = 'Õ¯Ö€Õ¯Õ«Õ¶'; +$lang['remember'] = 'Õ€Õ«Õ·Õ¥Õ¬ Õ«Õ¶Õ±'; +$lang['fullname'] = 'Ô»Ö€Õ¡Õ¯Õ¡Õ¶ Õ¡Õ¶Õ¸Ö‚Õ¶'; +$lang['email'] = 'Ô·Õ¬Õ¥Õ¯Õ¿Ö€Õ¸Õ¶Õ¡ÕµÕ«Õ¶ Õ°Õ¡Õ½ÖÕ¥'; +$lang['profile'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾'; +$lang['badlogin'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ¡Õ¶Õ¸Ö‚Õ¶Õ¶ Õ¸Ö‚ Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨ ÖÕ¡Õ¾Õ¸Ö„ Õ½ÕÕ¡Õ¬ Õ¥Õ¶'; +$lang['badpassconfirm'] = 'Ô³Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨ ÖÕ¡Õ¾Õ¸Ö„ Õ½ÕÕ¡Õ¬ Õ§'; +$lang['minoredit'] = 'Ô±Õ¶Õ¶Õ·Õ¡Õ¶ ÖƒÕ¸ÖƒÕ¸ÕÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€'; +$lang['draftdate'] = 'ÕÖ‡Õ¡Õ£Ö€Õ« Õ¡Õ¾Õ¿Õ¸Õ´Õ¡Õ¿ ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¸Ö‚Õ´Õ¨ Õ´Õ«Õ¡ÖÕ¾Õ¡Õ® Õ§'; +$lang['searchcreatepage'] = 'ÔµÕ©Õ¥ Õ¹Õ£Õ¿Õ¡Ö€ Õ«Õ¶Õ¹ ÖƒÕ¶Õ¿Ö€Õ¸Ö‚Õ´ Õ§Õ«Õ¶, Õ¯Õ¡Ö€Õ¸Õ² Õ¥Õ½ Õ½Õ¿Õ¥Õ²Õ®Õ¥Õ¬ Õ¯Õ¡Õ´ ÕÕ´Õ¢Õ¡Õ£Ö€Õ¥Õ¬ %s Õ§Õ»Õ¨, Õ¸Ö€Õ¨ Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¸Ö‚Õ´ Õ§ Õ°Õ¡Ö€ÖÕ´Õ¡Õ¶Õ¨Ö‰'; +$lang['search_fullresults'] = 'Ô±Õ´Õ¢Õ¸Õ²Õ»Õ¡Õ¯Õ¡Õ¶ Õ¿Õ¥Ö„Õ½Õ¿Õ« Õ¡Ö€Õ¤ÕµÕ¸Ö‚Õ¶Ö„Õ¶Õ¥Ö€'; +$lang['js']['search_toggle_tools'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ¸Ö€Õ¸Õ¶Õ´Õ¡Õ¶ Õ£Õ¸Ö€Õ®Õ«Ö„Õ¶Õ¥Ö€Õ¨'; +$lang['js']['notsavedyet'] = 'Õ‰ÕºÕ¡Õ°ÕºÕ¡Õ¶Õ¾Õ¡Õ® ÖƒÕ¸ÖƒÕ¸ÕÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨ Õ¯Õ¯Õ¸Ö€Õ¹Õ¥Õ¶'; +$lang['js']['searchmedia'] = 'ÕˆÖ€Õ¸Õ¶Õ¥Õ¬ Õ¶Õ«Õ·Ö„Õ¥Ö€'; +$lang['js']['hidedetails'] = 'Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨'; +$lang['js']['mediatitle'] = 'Õ€Õ²Õ´Õ¡Õ¶ Õ¨Õ¶Õ¿Ö€Õ¡Õ¶Ö„Õ¶Õ¥Ö€'; +$lang['js']['mediadisplay'] = 'Õ€Õ²Õ´Õ¡Õ¶ Õ¿Õ¥Õ½Õ¡Õ¯'; +$lang['js']['mediaalign'] = 'Ô´Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶'; +$lang['js']['mediasize'] = 'ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ« Õ¹Õ¡ÖƒÕ½'; +$lang['js']['mediatarget'] = 'Õ€Õ²Õ´Õ¡Õ¶ Õ©Õ«Ö€Õ¡Õ'; +$lang['js']['mediaclose'] = 'Õ“Õ¡Õ¯Õ¥Õ¬'; +$lang['js']['mediainsert'] = 'Õ†Õ¥Ö€Õ¤Õ¶Õ¥Õ¬'; +$lang['js']['mediadisplayimg'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨Ö‰'; +$lang['js']['mediadisplaylnk'] = 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¥Õ¬ Õ´Õ«Õ¡ÕµÕ¶ Õ°Õ²Õ¸Ö‚Õ´Õ¨Ö‰'; +$lang['js']['mediasmall'] = 'Õ“Õ¸Ö„Ö€ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; +$lang['js']['mediamedium'] = 'Õ„Õ«Õ»Õ«Õ¶ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; +$lang['js']['medialarge'] = 'Õ„Õ¥Õ® Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; +$lang['js']['mediaoriginal'] = 'Ô²Õ¶Ö…Ö€Õ«Õ¶Õ¡Õ¯ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¡Õ¯'; +$lang['js']['medialnk'] = 'Õ€Õ²Õ¸Ö‚Õ´ Õ¤Õ¥ÕºÕ« Õ´Õ¡Õ¶Ö€Õ¡Õ´Õ¡Õ½Õ¶Õ¥Ö€Õ« Õ§Õ»'; +$lang['js']['mediadirect'] = 'ÕˆÖ‚Õ²Õ«Õ² Õ°Õ²Õ¸Ö‚Õ´ Õ¤Õ¥ÕºÕ« Õ¢Õ¶Ö…Ö€Õ«Õ¶Õ¡Õ¯'; +$lang['js']['medianolnk'] = 'Ô±Õ¼Õ¡Õ¶Ö Õ°Õ²Õ¸Ö‚Õ´'; +$lang['js']['medianolink'] = 'Õ‰Õ°Õ²Õ¥Õ¬ ÕºÕ¡Õ¿Õ¯Õ¥Ö€Õ¨'; +$lang['js']['medialeft'] = 'ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬ Õ±Õ¡ÕÕ¸Ö‚Õ´'; +$lang['js']['mediaright'] = 'ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬ Õ¡Õ»Õ¸Ö‚Õ´'; +$lang['js']['mediacenter'] = 'ÕŠÕ¡Õ¿Õ¯Õ¥Ö€Õ¨ Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬ Õ´Õ¥Õ»Õ¿Õ¥Õ²Õ¸Ö‚Õ´'; +$lang['js']['medianoalign'] = 'Ô±Õ¼Õ¡Õ¶Ö Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶'; +$lang['js']['linkwiz'] = 'Õ€Õ²Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ« Ö…Õ£Õ¶Õ¡Õ¯Õ¡Õ¶'; +$lang['js']['linkto'] = 'Õ€Õ²Õ¸Ö‚Õ´ Õ¤Õ¥ÕºÕ«Õ'; +$lang['js']['del_confirm'] = 'Õ‹Õ¶Õ»Õ¥ÕžÕ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ®Õ¨Ö‰'; +$lang['js']['restore_confirm'] = 'ÕŽÕ¥Ö€Õ¡Õ¯Õ¡Õ¶Õ£Õ¶Õ¥ÕžÕ¬ Õ¡ÕµÕ½ Õ¿Ö€Õ¡Õ¢Õ¥Ö€Õ¡Õ¯Õ¨Ö‰'; +$lang['js']['media_diff'] = 'Ô´Õ«Õ¿Õ¥Õ¬ Õ¿Õ¡Ö€Õ¢Õ¥Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨Õ '; +$lang['js']['media_diff_both'] = 'Ô¿Õ¸Õ²Ö„ Õ¯Õ¸Õ²Ö„Õ«'; +$lang['js']['media_diff_portions'] = 'ÕÕ¡Õ°Õ¥ÖÕ¶Õ¥Õ¬'; +$lang['js']['media_select'] = 'Ô¸Õ¶Õ¿Ö€Õ¥Õ¬ նիշքեր…'; +$lang['js']['media_upload_btn'] = 'ÕŽÕ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬'; +$lang['js']['media_done_btn'] = 'Ô±Ö€Õ¾Õ¡Õ® Õ§'; +$lang['js']['media_drop'] = 'ÕŽÕ¥Ö€Õ¢Õ¥Õ¼Õ¶Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Õ¶Õ«Õ·Ö„Õ¥Ö€Õ¨ Õ£ÖÕ¥Õ¬ Õ¡ÕµÕ½Õ¿Õ¥Õ²'; +$lang['js']['media_cancel'] = 'Õ»Õ¶Õ»Õ¥Õ¬'; +$lang['js']['media_overwrt'] = 'Õ“Õ¸ÕÕ¡Ö€Õ«Õ¶Õ¥Õ¬ Õ£Õ¸ÕµÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ¸Ö‚Õ¶Õ¥ÖÕ¸Õ² Õ¶Õ«Õ·Ö„Õ¥Ö€Õ¨'; +$lang['search_exact_match'] = 'Õ†Õ¸Ö‚ÕµÕ¶Õ¡Õ¯Õ¡Õ¶'; +$lang['search_starts_with'] = 'ÕÕ¯Õ½Õ¸Ö‚Õ´ Õ§'; +$lang['search_ends_with'] = 'Ô±Õ¾Õ¡Ö€Õ¿Õ¾Õ¸Ö‚Õ´ Õ§'; +$lang['search_contains'] = 'ÕŠÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ¸Ö‚Õ´ Õ§'; +$lang['search_custom_match'] = 'Ô¸Õ¶Õ¿Ö€Õ¸Õ¾Õ«'; +$lang['search_any_ns'] = 'Õ‘Õ¡Õ¶Õ¯Õ¡ÖÕ¡Õ® Õ¡Õ¶Õ¾Õ¡Õ¶Õ¡Õ¿Õ¡Ö€Õ¡Õ®Ö„'; +$lang['search_any_time'] = 'Õ‘Õ¡Õ¶Õ¯Õ¡ÖÕ¡Õ® ÕªÕ¡Õ´Õ¡Õ¶Õ¡Õ¯'; +$lang['search_past_7_days'] = 'Ô±Õ¶ÖÕµÕ¡Õ¬ Õ·Õ¡Õ¢Õ¡Õ©'; +$lang['search_past_month'] = 'Ô±Õ¶ÖÕµÕ¡Õ¬ Õ¡Õ´Õ«Õ½'; +$lang['search_past_year'] = 'Ô±Õ¶ÖÕµÕ¡Õ¬ Õ¿Õ¡Ö€Õ«'; +$lang['search_sort_by_hits'] = 'Ô´Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬ Õ¨Õ½Õ¿ Õ¡ÕµÖÕ¥Õ¬Õ¸Ö‚Õ´Õ¶Õ¥Ö€Õ«'; +$lang['search_sort_by_mtime'] = 'Ô´Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¥Õ¬ Õ¨Õ½Õ¿ Õ¾Õ¥Ö€Õ»Õ«Õ¶ ÖƒÕ¸ÖƒÕ¸ÕÕ´Õ¡Õ¶'; +$lang['regmissing'] = 'ÕŠÕ¥Õ¿Ö„ Õ§ Õ¬Ö€Õ¡ÖÕ¶Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Õ¤Õ¡Õ·Õ¿Õ¥Ö€Õ¨Ö‰'; +$lang['reguexists'] = 'Ô±ÕµÕ½ Õ´Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ¡Õ¶Õ¸Ö‚Õ¶Õ¸Õ¾ Ö…Õ£Õ¿Õ¡Õ¿Õ¥Ö€ Õ¡Ö€Õ¤Õ¥Õ¶ Õ£Õ¸ÕµÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ Õ¸Ö‚Õ¶Õ«Ö‰'; +$lang['regsuccess'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ½Õ¿Õ¥Õ²Õ®Õ¾Õ¥Ö, Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¾Õ¥Õ¬ Õ§ Õ§Õ¬Õ¥Õ¯Õ¿Ö€Õ¸Õ¶Õ¡ÕµÕ«Õ¶ Õ°Õ¡Õ½ÖÕ¥Õ«Õ¶Ö‰'; +$lang['regsuccess2'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ½Õ¿Õ¥Õ²Õ®Õ¾Õ¥ÖÖ‰'; +$lang['regfail'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ°Ö€Õ¡Õ¶Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ½Õ¿Õ¥Õ²Õ®Õ¥Õ¬Ö‰'; +$lang['regbadpass'] = 'Ô±Õ¼Õ¡Õ»Õ¡Ö€Õ¯Õ¾Õ¡Õ® Õ¥Ö€Õ¯Õ¸Ö‚ Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¥Ö€Õ¨ Õ´Õ«Õ´ÕµÕ¡Õ¶Ö Õ¹Õ¥Õ¶ Õ°Õ¡Õ´Õ¡ÕºÕ¡Õ¿Õ¡Õ½ÕÕ¡Õ¶Õ¸Ö‚Õ´, ÕÕ¶Õ¤Ö€Õ¸Ö‚Õ´ Õ¥Õ¶Ö„, Õ¶Õ¸Ö€Õ«Ö ÖƒÕ¸Ö€Õ±Õ¥Õ¬Ö‰'; +$lang['regpwmail'] = 'Ô´Õ¸Õ¯Õ¸Ö‚ÕŽÕ«Ö„Õ«Õ« Ö„Õ¸ Õ£Õ¡Õ²Õ¿Õ¶Õ¡Õ¢Õ¡Õ¼Õ¨'; +$lang['reghere'] = 'Ô´Õ¥Õ¼ Õ°Õ¡Õ·Õ«Õ¾ Õ¹Õ¸Ö‚Õ¶Õ¥ÕžÕ½Ö‰ Ô³Ö€Õ¡Õ¶ÖÕ¾Õ«Õ›Ö€Ö‰'; +$lang['profna'] = 'Ô±ÕµÕ½ Õ¾Õ«Ö„Õ«Õ¶ Õ¹Õ« Õ¡Õ»Õ¡Õ¯ÖÕ¸Ö‚Õ´ Õ´Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ¾Õ« ÖƒÕ¸ÖƒÕ¸ÕÕ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨'; +$lang['profnoempty'] = 'Ô´Õ¡Õ¿Õ¡Ö€Õ¯ Õ¡Õ¶Õ¸Ö‚Õ¶Õ¨ Õ¯Õ¡Õ´ Õ§Õ¬Õ¥Õ¯Õ¿Ö€Õ¸Õ¶Õ¡ÕµÕ«Õ¶ Õ°Õ¡Õ½ÖÕ¥Õ¶ Õ¹Õ« Õ©Õ¸Ö‚ÕµÕ¬Õ¡Õ¿Ö€Õ¾Õ¸Ö‚Õ´Ö‰'; +$lang['profchanged'] = 'Õ„Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ°Õ¡Õ»Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ©Õ¡Ö€Õ´Õ¡ÖÕ¾Õ¥Ö'; +$lang['profnodelete'] = 'Ô±ÕµÕ½ Õ¾Õ«Ö„Õ«Õ¸Ö‚Õ´ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ»Õ¶Õ»Õ¥Õ¬ Ö…Õ£Õ¿Õ¡Õ¿Õ¥Ö€Õ¥Ö€Õ«Õ¶'; +$lang['profdeleteuser'] = 'Õ‹Õ¶Õ»Õ¥Õ¬ Õ°Õ¡Õ·Õ«Õ¾Õ¨'; +$lang['profdeleted'] = 'Õ”Õ¸ Õ´Õ¡Õ½Õ¶Õ¡Õ¯ÖÕ¡ÕµÕ«Õ¶ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ»Õ¶Õ»Õ¾Õ¥Ö Õ¡ÕµÕ½ Õ¾Õ«Ö„Õ«Õ«Ö'; +$lang['profconfdelete'] = 'Õ‘Õ¡Õ¶Õ¯Õ¡ÖÕ¶Õ¸Ö‚Õ´ Õ¥Õ´ Õ»Õ¶Õ»Õ¥Õ¬ Õ«Õ´ Õ°Õ¡Õ·Õ«Õ¾Õ¨ Õ¡ÕµÕ½ Õ¾Õ«Ö„Õ«Õ«ÖÖ‰ <br/> Ô±ÕµÕ½ Õ£Õ¸Ö€Õ®Õ¸Õ²Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ Õ°Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ§ Õ¹Õ¥Õ²Õ¡Ö€Õ¯Õ¥Õ¬Ö‰'; +$lang['profconfdeletemissing'] = 'Õ€Õ¡Õ½Õ¿Õ¡Õ¿Õ´Õ¡Õ¶ Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¨ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¹Õ§'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 8294101a4..7be236da4 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Dario <darioriso@virgilio.it> * @author Filippo <abrickslife@gmail.com> * @author Roberto Bellingeri <bellingeri@netguru.it> * @author Eddy <eddy@mail.it> @@ -180,6 +181,7 @@ $lang['txt_upload'] = 'Seleziona un file da caricare:'; $lang['txt_filename'] = 'Carica come (opzionale):'; $lang['txt_overwrt'] = 'Sovrascrivi file esistente'; $lang['maxuploadsize'] = 'Upload max. %s per ogni file.'; +$lang['allowedmime'] = 'Elenco delle estensioni di file consentite'; $lang['lockedby'] = 'Attualmente bloccato da:'; $lang['lockexpire'] = 'Il blocco scade alle:'; $lang['rssfailed'] = 'Si è verificato un errore cercando questo feed: '; diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index c00204232..f66cd23be 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Gustavo B. Schenkel <gustavo.schenkel@gmail.com> * @author Paulo <pschopf@gmail.com> * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> * @author Maykon Oliveira <maykonoliveira850@gmail.com> @@ -124,6 +125,7 @@ $lang['js']['media_done_btn'] = 'Feito'; $lang['js']['media_drop'] = 'Largue arquivo aqui para enviar'; $lang['js']['media_cancel'] = 'excluir'; $lang['js']['media_overwrt'] = 'Escrever por cima de arquivos existentes'; +$lang['js']['data_insecure'] = 'AVISO: Parece que seu diretório de dados não está devidamente protegido. Por favor leia sobre <a href="https://www.dokuwiki.org/security#web_access_security">Segurança de acesso à web em DokuWiki</a>.'; $lang['search_exact_match'] = 'Correspondência exata'; $lang['search_starts_with'] = 'Começa por'; $lang['search_ends_with'] = 'Termina em'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 7c855ceea..ca41a04ee 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Nikita <obraztsov568@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Ðнатолий <anatol_m@mail.ru> * @author Yuriy Skalko <yuriy.skalko@gmail.com> diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 14864212e..f26071c5d 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 Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> * @author Joaquim Homrighausen <joho@webbplatsen.se> * @author Per Foreby <per@foreby.se> @@ -78,44 +79,9 @@ $lang['badpassconfirm'] = 'Ledsen, lösenordet var felaktigt'; $lang['minoredit'] = 'SmÃ¥ ändringar'; $lang['draftdate'] = 'Utkast automatiskt sparat'; $lang['nosecedit'] = 'Sidan ändrades medan du skrev, sektionsinformationen var inte uppdaterad. Laddar hela sidan istället.'; -$lang['regmissing'] = 'Du mÃ¥ste fylla i alla fälten.'; -$lang['reguexists'] = 'Det finns redan en användare med det användarnamnet.'; -$lang['regsuccess'] = 'Användarkontot skapat, lösenordet har skickats via e-post.'; -$lang['regsuccess2'] = 'Användarkontot skapat.'; -$lang['regfail'] = 'Användaren kunde inte skapas.'; -$lang['regmailfail'] = 'Ett fel uppstod när ditt lösenord skulle skickas via e-post. Var god kontakta administratören!'; -$lang['regbadmail'] = 'Den angivna e-postadressen verkar vara ogiltig - om du anser detta felaktigt, var god kontakta administratören'; -$lang['regbadpass'] = 'De tvÃ¥ angivna lösenorden är inte identiska. Försök igen.'; -$lang['regpwmail'] = 'Ditt DokuWikilösenord'; -$lang['reghere'] = 'Har du inte ett konto än? Skaffa ett'; -$lang['profna'] = 'Denna wiki stödjer inte ändringar av profiler'; -$lang['profnochange'] = 'Ingenting ändrades, inget att göra.'; -$lang['profnoempty'] = 'Namn och e-postadress mÃ¥ste fyllas i.'; -$lang['profchanged'] = 'Användarprofilen uppdaterad.'; -$lang['profnodelete'] = 'Den här wiki:n stödjer ej borttagning av användare'; -$lang['profdeleteuser'] = 'Radera kontot'; -$lang['profdeleted'] = 'Ditt användarkonto har raderats frÃ¥n den här wiki:n'; -$lang['profconfdelete'] = 'Jag vill ta bort mitt konto/inlogg pÃ¥ den här wiki:n <br/> Denna Ã¥tgärd gÃ¥r ej att Ã¥ngra.'; -$lang['profconfdeletemissing'] = 'Bekräftelse-kryssrutan är ej markerad'; -$lang['proffail'] = 'Användarprofilen uppdaterades ej.'; -$lang['pwdforget'] = 'Glömt ditt lösenord? Ordna ett nytt'; -$lang['resendna'] = 'Den här wikin stödjer inte utskick av lösenord.'; -$lang['resendpwd'] = 'Sätt lösenord för'; -$lang['resendpwdmissing'] = 'Du mÃ¥ste fylla i alla fält.'; -$lang['resendpwdnouser'] = 'Den här användaren hittas inte i databasen.'; -$lang['resendpwdbadauth'] = 'Den här verifieringskoden är inte giltig. Kontrollera att du använde hela verifieringslänken.'; -$lang['resendpwdconfirm'] = 'En verifieringslänk har skickats med e-post.'; -$lang['resendpwdsuccess'] = 'Ditt nya lösenord har skickats med e-post.'; -$lang['license'] = 'Om inte annat angivet, innehÃ¥llet i denna wiki är licensierat under följande licenser:'; -$lang['licenseok'] = 'Notera: Genom att ändra i denna sidan sÃ¥ accepterar du att licensiera ditt bidrag under följande licenser:'; -$lang['searchmedia'] = 'Sök efter filnamn:'; -$lang['searchmedia_in'] = 'Sök i %s'; -$lang['txt_upload'] = 'Välj fil att ladda upp:'; -$lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt):'; -$lang['txt_overwrt'] = 'Skriv över befintlig fil'; -$lang['maxuploadsize'] = 'Max %s per uppladdad fil.'; -$lang['lockedby'] = 'LÃ¥st av:'; -$lang['lockexpire'] = 'LÃ¥s upphör att gälla:'; +$lang['searchcreatepage'] = 'Om du inte hittade det du sökte sÃ¥ kan du skapa eller editera sidan %s som är döpt efter din sökning.'; +$lang['search_fullresults'] = 'Heltext resultat'; +$lang['js']['search_toggle_tools'] = 'Växla sökverktyg'; $lang['js']['willexpire'] = 'Ditt redigeringslÃ¥s för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslÃ¥set.'; $lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade. Är du säker pÃ¥ att du vill fortsätta?'; @@ -142,6 +108,7 @@ $lang['js']['medianolink'] = 'Länka inte bilden'; $lang['js']['medialeft'] = 'Justera bilden till vänster.'; $lang['js']['mediaright'] = 'Justera bilden till höger.'; $lang['js']['mediacenter'] = 'Centrera bilden.'; +$lang['js']['medianoalign'] = 'Använd ingen justering'; $lang['js']['nosmblinks'] = 'Länkning till Windowsresurser fungerar bara med Microsofts Internet Explorer. Du kan fortfarande klippa och klistra in länken om du använder en annan webbläsare än MSIE.'; $lang['js']['linkwiz'] = 'Snabbguide Länkar'; @@ -158,6 +125,57 @@ $lang['js']['media_done_btn'] = 'Färdig'; $lang['js']['media_drop'] = 'Släpp filer här för att ladda upp'; $lang['js']['media_cancel'] = 'ta bort'; $lang['js']['media_overwrt'] = 'Skriv över existerande filer'; +$lang['search_exact_match'] = 'Exakt träff'; +$lang['search_starts_with'] = 'Börjar med'; +$lang['search_ends_with'] = 'Slutar med'; +$lang['search_contains'] = 'InnehÃ¥ller'; +$lang['search_custom_match'] = 'Anpassad'; +$lang['search_any_ns'] = 'Alla namespaces'; +$lang['search_any_time'] = 'Alla tider'; +$lang['search_past_7_days'] = 'Senaste veckan'; +$lang['search_past_month'] = 'Senaste mÃ¥naden'; +$lang['search_past_year'] = 'Senaste Ã¥ret'; +$lang['search_sort_by_hits'] = 'Sortera efter träffar'; +$lang['search_sort_by_mtime'] = 'Sortera efter senast modifierad'; +$lang['regmissing'] = 'Du mÃ¥ste fylla i alla fälten.'; +$lang['reguexists'] = 'Det finns redan en användare med det användarnamnet.'; +$lang['regsuccess'] = 'Användarkontot skapat, lösenordet har skickats via e-post.'; +$lang['regsuccess2'] = 'Användarkontot skapat.'; +$lang['regfail'] = 'Användaren kunde inte skapas.'; +$lang['regmailfail'] = 'Ett fel uppstod när ditt lösenord skulle skickas via e-post. Var god kontakta administratören!'; +$lang['regbadmail'] = 'Den angivna e-postadressen verkar vara ogiltig - om du anser detta felaktigt, var god kontakta administratören'; +$lang['regbadpass'] = 'De tvÃ¥ angivna lösenorden är inte identiska. Försök igen.'; +$lang['regpwmail'] = 'Ditt DokuWikilösenord'; +$lang['reghere'] = 'Har du inte ett konto än? Skaffa ett'; +$lang['profna'] = 'Denna wiki stödjer inte ändringar av profiler'; +$lang['profnochange'] = 'Ingenting ändrades, inget att göra.'; +$lang['profnoempty'] = 'Namn och e-postadress mÃ¥ste fyllas i.'; +$lang['profchanged'] = 'Användarprofilen uppdaterad.'; +$lang['profnodelete'] = 'Den här wiki:n stödjer ej borttagning av användare'; +$lang['profdeleteuser'] = 'Radera kontot'; +$lang['profdeleted'] = 'Ditt användarkonto har raderats frÃ¥n den här wiki:n'; +$lang['profconfdelete'] = 'Jag vill ta bort mitt konto/inlogg pÃ¥ den här wiki:n <br/> Denna Ã¥tgärd gÃ¥r ej att Ã¥ngra.'; +$lang['profconfdeletemissing'] = 'Bekräftelse-kryssrutan är ej markerad'; +$lang['proffail'] = 'Användarprofilen uppdaterades ej.'; +$lang['pwdforget'] = 'Glömt ditt lösenord? Ordna ett nytt'; +$lang['resendna'] = 'Den här wikin stödjer inte utskick av lösenord.'; +$lang['resendpwd'] = 'Sätt lösenord för'; +$lang['resendpwdmissing'] = 'Du mÃ¥ste fylla i alla fält.'; +$lang['resendpwdnouser'] = 'Den här användaren hittas inte i databasen.'; +$lang['resendpwdbadauth'] = 'Den här verifieringskoden är inte giltig. Kontrollera att du använde hela verifieringslänken.'; +$lang['resendpwdconfirm'] = 'En verifieringslänk har skickats med e-post.'; +$lang['resendpwdsuccess'] = 'Ditt nya lösenord har skickats med e-post.'; +$lang['license'] = 'Om inte annat angivet, innehÃ¥llet i denna wiki är licensierat under följande licenser:'; +$lang['licenseok'] = 'Notera: Genom att ändra i denna sidan sÃ¥ accepterar du att licensiera ditt bidrag under följande licenser:'; +$lang['searchmedia'] = 'Sök efter filnamn:'; +$lang['searchmedia_in'] = 'Sök i %s'; +$lang['txt_upload'] = 'Välj fil att ladda upp:'; +$lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt):'; +$lang['txt_overwrt'] = 'Skriv över befintlig fil'; +$lang['maxuploadsize'] = 'Max %s per uppladdad fil.'; +$lang['allowedmime'] = 'Lista av alla tillÃ¥tna extensions'; +$lang['lockedby'] = 'LÃ¥st av:'; +$lang['lockexpire'] = 'LÃ¥s upphör att gälla:'; $lang['rssfailed'] = 'Ett fel uppstod när detta RSS-flöde skulle hämtas: '; $lang['nothingfound'] = 'Inga filer hittades.'; $lang['mediaselect'] = 'Mediafiler'; @@ -192,10 +210,13 @@ $lang['diff'] = 'visa skillnader mot aktuell version'; $lang['diff2'] = 'Visa skillnader mellan valda versioner'; $lang['difflink'] = 'Länk till den här jämförelsesidan'; $lang['diff_type'] = 'Visa skillnader:'; +$lang['diff_inline'] = 'Exakt träff'; $lang['diff_side'] = 'Sida vid sida'; $lang['diffprevrev'] = 'FöregÃ¥ende version.'; $lang['diffnextrev'] = 'Nästa version.'; $lang['difflastrev'] = 'Senaste version.'; +$lang['diffbothprevrev'] = 'Börjar med'; +$lang['diffbothnextrev'] = 'Slutar med'; $lang['line'] = 'Rad'; $lang['breadcrumb'] = 'SpÃ¥r:'; $lang['youarehere'] = 'Här är du:'; @@ -290,7 +311,11 @@ $lang['i_modified'] = 'Av säkerhetsskäl fungerar det här skriptet Du fÃ¥r antingen packa upp det nedladdade paketet pÃ¥ nytt, eller konsultera de kompletta <a href="http://dokuwiki.org/install">instruktionerna för installation av Dokuwiki</a>'; $lang['i_funcna'] = 'PHP-funktionen <code>%s</code> är inte tillgänglig. Kanske ditt webbhotell har avaktiverat den av nÃ¥gon anledning?'; +$lang['i_disabled'] = 'Det är avstängt av din leverantör.'; +$lang['i_funcnmail'] = '<b>Note:</b> PHP mail funktionen är inte tillgänglig. %s Om det är fortsatt otillgängligt kan du installera <a href="https://www.dokuwiki.org/plugin:smtp">smtp pluginet</a>'; $lang['i_phpver'] = 'Din PHP-version <code>%s</code> är lägre än vad som krävs <code>%s</code>. Du behöver uppgradera din PHP-installation.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload mÃ¥ste inaktiveras i php.ini för att använda DokuWiki.'; +$lang['i_urandom'] = 'InnehÃ¥ller'; $lang['i_permfail'] = '<code>%s</code> är inte skrivbar av DokuWiki. Du behöver ändra filskyddet pÃ¥ den här katalogen!'; $lang['i_confexists'] = '<code>%s</code> finns redan'; $lang['i_writeerr'] = 'Kan inte skapa <code>%s</code>. Kontrollera filskyddet pÃ¥ kataloger/filer och skapa filen manuellt.'; @@ -343,9 +368,12 @@ $lang['media_perm_upload'] = 'Du har tyvärr inte tillräckliga behörighete $lang['media_update'] = 'Ladda upp ny version'; $lang['media_restore'] = 'Ã…terställ denna version'; $lang['media_acl_warning'] = 'Listan kanske inte är '; +$lang['email_fail'] = 'PHP mail() saknas eller är inaktiverad. Följande mejl skickades inte:'; $lang['currentns'] = 'Nuvarande namnrymd.'; $lang['searchresult'] = 'Sökresultat'; $lang['plainhtml'] = 'Ren HTML'; +$lang['wikimarkup'] = 'Wiki Markup'; $lang['page_nonexist_rev'] = 'Sidan fanns inte pÃ¥ %s. Den blev sedermera skapad pÃ¥ <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Oförmögen att processera i parameter "%s".'; $lang['email_signature_text'] = 'Detta meddelande har skapats av DokuWiki pÃ¥ @DOKUWIKIURL@'; diff --git a/inc/lang/sv/onceexisted.txt b/inc/lang/sv/onceexisted.txt new file mode 100644 index 000000000..56b894742 --- /dev/null +++ b/inc/lang/sv/onceexisted.txt @@ -0,0 +1,3 @@ +======= Den här sidan existerar inte längre ====== + +Du har följt en länk till en sida som inte längre existerar. Du kan kontrollera följande lista [[?do=revisions|old revisions]] för att se när och varför den togs bort, gÃ¥ till en äldre version för att Ã¥terställa den.
\ No newline at end of file diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 27e867d25..e93af031f 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Eren <bosshyapma@protonmail.com> * @author Hakan <hakandursun2009@gmail.com> * @author mahir <mahirtakak@gmail.com> * @author Selim FarsakoÄŸlu <farsakogluselim@yahoo.de> @@ -167,6 +168,7 @@ $lang['txt_upload'] = 'Yüklenecek dosyayı seç:'; $lang['txt_filename'] = 'Dosya adı (zorunlu deÄŸil):'; $lang['txt_overwrt'] = 'Mevcut dosyanın üstüne yaz'; $lang['maxuploadsize'] = 'Yükleme dosya başına en fazla %s'; +$lang['allowedmime'] = 'İzin verilen dosya uzantılarının listesi'; $lang['lockedby'] = 'Åžu an ÅŸunun tarafından kilitli:'; $lang['lockexpire'] = 'Kilitin açılma tarihi:'; $lang['rssfailed'] = 'Bu beslemeyi çekerken hata oluÅŸtu: '; @@ -302,6 +304,7 @@ $lang['i_superuser'] = 'Ana Kullanıcı'; $lang['i_problems'] = 'Kurulum sihirbazı aÅŸağıda gösterilen sorunları buldu. Bunları düzeltmeden devam etmeniz mümkün deÄŸil.'; $lang['i_modified'] = 'Güzenlik sebebiyle bu script sadece yeni ve deÄŸiÅŸtirilmemiÅŸ bir Dokuwiki kurulumunda çalışır. Ya indirdiÄŸiniz paketi yeniden açmalı ya da <a href="http://dokuwiki.org/install"> adresindeki Dokuwiki kurulum kılavuzu</a>na bakmalısınız.'; $lang['i_funcna'] = '<code>%s</code> PHP fonksiyonu bulunmamaktadır. Barındırma(Hosting) hizmetinde bu özellik kapatılmış olabilir.'; +$lang['i_disabled'] = 'SaÄŸlayıcınız tarafından devre dışı bırakılmış.'; $lang['i_phpver'] = '<code>%s</code> PHP sürümü, gereken <code>%s</code> sürümünden daha düşük. PHP kurulumunu yükseltmeniz gerekmektedir.'; $lang['i_mbfuncoverload'] = 'DokuWiki\'nin çalışması için php.ini dosyasında mbstring.func_overload seçeneÄŸi kapalı (deÄŸeri 0) olarak ayarlanmalıdır.'; $lang['i_permfail'] = '<code>%s</code> Dokuwiki tarafından yazılabilir deÄŸil. İzin ayarlarını bu klasör için düzeltmeniz gerekmektedir!'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index ed03832a5..455bd5639 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -109,6 +109,7 @@ $lang['js']['media_done_btn'] = 'Xong'; $lang['js']['media_drop'] = 'Kéo táºp tin và o đây để tải lên'; $lang['js']['media_cancel'] = 'xóa'; $lang['js']['media_overwrt'] = 'Ghi đè các táºp tin hiện có'; +$lang['js']['data_insecure'] = 'CẢNH BÃO: Có vẻ như đưá»ng dẫn dữ liệu cá»§a bạn không được bảo máºt đúng cách. Xin vui lòng Ä‘á»c <a href="https://www.dokuwiki.org/security#web_access_security">Web Access Security in DokuWiki</a>.'; $lang['search_exact_match'] = 'Khá»›p chÃnh xác'; $lang['search_starts_with'] = 'Bắt đầu vá»›i'; $lang['search_ends_with'] = 'Kết thúc bằng'; @@ -130,7 +131,7 @@ $lang['regmailfail'] = 'Có vẻ như đã xảy ra lá»—i khi gá»i th $lang['regbadmail'] = 'Äịa chỉ thư Ä‘iện tỠđược cung cấp có vẻ không hợp lệ - nếu bạn nghÄ© đây là lá»—i, hãy liên hệ vá»›i quản trị viên'; $lang['regbadpass'] = 'Hai máºt khẩu đã nháºp không giống nhau, vui lòng thá» lại.'; $lang['regpwmail'] = 'Máºt khẩu DokuWiki cá»§a bạn'; -$lang['reghere'] = 'Bạn chưa có tà i khoản? Hãy lấy má»™t cái'; +$lang['reghere'] = 'Bạn chưa có tà i khoản? Hãy tạo má»™t cái'; $lang['profna'] = 'Wiki nà y không há»— trợ sá»a đổi hồ sÆ¡'; $lang['profnochange'] = 'Không có thay đổi, không có gì để là m.'; $lang['profnoempty'] = 'Không được bá» trống tên hoặc địa chỉ thư Ä‘iện tá».'; @@ -141,7 +142,7 @@ $lang['profdeleted'] = 'Tà i khoản thà nh viên cá»§a bạn đã bá» $lang['profconfdelete'] = 'Tôi muốn xóa tà i khoản cá»§a tôi khá»i wiki nà y. <br/> Hà nh động nà y không thể hoà n tác.'; $lang['profconfdeletemissing'] = 'Há»™p kiểm xác nháºn chưa được đánh dấu'; $lang['proffail'] = 'Hồ sÆ¡ thà nh viên chưa được cáºp nháºt.'; -$lang['pwdforget'] = 'Bạn quên máºt khẩu? Thá» má»™t cái má»›i'; +$lang['pwdforget'] = 'Bạn quên máºt khẩu? Tạo má»™t cái má»›i'; $lang['resendna'] = 'Wiki nà y không há»— trợ gá»i lại máºt khẩu.'; $lang['resendpwd'] = 'Äặt máºt khẩu má»›i cho'; $lang['resendpwdmissing'] = 'Xin lá»—i, bạn phải Ä‘iá»n và o tất cả các trưá»ng.'; diff --git a/inc/lang/vi/newpage.txt b/inc/lang/vi/newpage.txt index 943c6c312..fa7cfbf06 100644 --- a/inc/lang/vi/newpage.txt +++ b/inc/lang/vi/newpage.txt @@ -1,3 +1,3 @@ ====== Chưa có đỠtà i nà y ====== -Bạn đã truy cáºp và o má»™t liên kết đến má»™t đỠtà i chưa tồn tại. Nếu quyá»n cho phép, bạn có thể tạo nó bằng cách nhấp và o **Tạo trang nà y**. +Bạn đã truy cáºp và o má»™t liên kết đến má»™t đỠtà i chưa tồn tại. Nếu quyá»n cho phép, bạn có thể tạo nó bằng cách nhấn và o **Tạo trang nà y**. diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index ff642abd6..1f63b505c 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Lakejason0 <lakesarchive@outlook.com> * @author Phy <dokuwiki@phy25.com> * @author Jenxi <seow@jenxi.com> * @author FENG.JIE <ahx@qq.com> diff --git a/inc/load.php b/inc/load.php index 68d425584..791f743d7 100644 --- a/inc/load.php +++ b/inc/load.php @@ -79,11 +79,6 @@ function load_autoload($name){ 'Doku_Renderer_code' => DOKU_INC.'inc/parser/code.php', 'Doku_Renderer_xhtmlsummary' => DOKU_INC.'inc/parser/xhtmlsummary.php', 'Doku_Renderer_metadata' => DOKU_INC.'inc/parser/metadata.php', - - 'DokuCLI' => DOKU_INC.'inc/cli.php', - 'DokuCLI_Options' => DOKU_INC.'inc/cli.php', - 'DokuCLI_Colors' => DOKU_INC.'inc/cli.php', - ); if(isset($classes[$name])){ diff --git a/inc/media.php b/inc/media.php index 4c87a2886..e0819d6d9 100644 --- a/inc/media.php +++ b/inc/media.php @@ -699,7 +699,7 @@ function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=fals $dir = utf8_encodeFN(str_replace(':','/',$ns)); $data = array(); - search($data,$conf['mediadir'],'search_media', + search($data,$conf['mediadir'],'search_mediafiles', array('showmsg'=>true,'depth'=>1),$dir,1,$sort); if(!count($data)){ @@ -710,9 +710,17 @@ function media_filelist($ns,$auth=null,$jump='',$fullscreenview=false,$sort=fals } foreach($data as $item){ if (!$fullscreenview) { - media_printfile($item,$auth,$jump); + //FIXME old call: media_printfile($item,$auth,$jump); + $display = new \dokuwiki\Ui\Media\DisplayRow($item); + $display->scrollIntoView($jump == $item->getID()); + $display->show(); } else { - media_printfile_thumbs($item,$auth,$jump); + //FIXME old call: media_printfile_thumbs($item,$auth,$jump); + echo '<li>'; + $display = new \dokuwiki\Ui\Media\DisplayTile($item); + $display->scrollIntoView($jump == $item->getID()); + $display->show(); + echo '</li>'; } } if ($fullscreenview) echo '</ul>'.NL; @@ -1348,7 +1356,7 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural $pattern = '/'.$quoted.'/i'; search($evdata['data'], $conf['mediadir'], - 'search_media', + 'search_mediafiles', array('showmsg'=>false,'pattern'=>$pattern), $dir, 1, @@ -1370,94 +1378,25 @@ function media_searchlist($query,$ns,$auth=null,$fullscreen=false,$sort='natural echo '<ul class="' . _media_get_list_type() . '">'; } foreach($evdata['data'] as $item){ - if (!$fullscreen) media_printfile($item,$item['perm'],'',true); - else media_printfile_thumbs($item,$item['perm'],false,true); + if (!$fullscreen) { + // FIXME old call: media_printfile($item,$item['perm'],'',true); + $display = new \dokuwiki\Ui\Media\DisplayRow($item); + $display->relativeDisplay($ns); + $display->show(); + } else { + // FIXME old call: media_printfile_thumbs($item,$item['perm'],false,true); + $display = new \dokuwiki\Ui\Media\DisplayTile($item); + $display->relativeDisplay($ns); + echo '<li>'; + $display->show(); + echo '</li>'; + } } if ($fullscreen) echo '</ul>'.NL; } } /** - * Formats and prints one file in the list - * - * @param array $item - * @param int $auth permission level - * @param string $jump item id - * @param bool $display_namespace - */ -function media_printfile($item,$auth,$jump,$display_namespace=false){ - global $lang; - - // Prepare zebra coloring - // I always wanted to use this variable name :-D - static $twibble = 1; - $twibble *= -1; - $zebra = ($twibble == -1) ? 'odd' : 'even'; - - // Automatically jump to recent action - if($jump == $item['id']) { - $jump = ' id="scroll__here" '; - }else{ - $jump = ''; - } - - // Prepare fileicons - list($ext) = mimetype($item['file'],false); - $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext); - $class = 'select mediafile mf_'.$class; - - // Prepare filename - $file = utf8_decodeFN($item['file']); - - // Prepare info - $info = ''; - if($item['isimg']){ - $info .= (int) $item['meta']->getField('File.Width'); - $info .= '×'; - $info .= (int) $item['meta']->getField('File.Height'); - $info .= ' '; - } - $info .= '<i>'.dformat($item['mtime']).'</i>'; - $info .= ' '; - $info .= filesize_h($item['size']); - - // output - echo '<div class="'.$zebra.'"'.$jump.' title="'.hsc($item['id']).'">'.NL; - if (!$display_namespace) { - echo '<a id="h_:'.$item['id'].'" class="'.$class.'">'.hsc($file).'</a> '; - } else { - echo '<a id="h_:'.$item['id'].'" class="'.$class.'">'.hsc($item['id']).'</a><br/>'; - } - echo '<span class="info">('.$info.')</span>'.NL; - - // view button - $link = ml($item['id'],'',true); - echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/magnifier.png" '. - 'alt="'.$lang['mediaview'].'" title="'.$lang['mediaview'].'" class="btn" /></a>'; - - // mediamanager button - $link = wl('',array('do'=>'media','image'=>$item['id'],'ns'=>getNS($item['id']))); - echo ' <a href="'.$link.'" target="_blank"><img src="'.DOKU_BASE.'lib/images/mediamanager.png" '. - 'alt="'.$lang['btn_media'].'" title="'.$lang['btn_media'].'" class="btn" /></a>'; - - // delete button - if($item['writable'] && $auth >= AUTH_DELETE){ - $link = DOKU_BASE.'lib/exe/mediamanager.php?delete='.rawurlencode($item['id']). - '&sectok='.getSecurityToken(); - echo ' <a href="'.$link.'" class="btn_media_delete" title="'.$item['id'].'">'. - '<img src="'.DOKU_BASE.'lib/images/trash.png" alt="'.$lang['btn_delete'].'" '. - 'title="'.$lang['btn_delete'].'" class="btn" /></a>'; - } - - echo '<div class="example" id="ex_'.str_replace(':','_',$item['id']).'">'; - echo $lang['mediausage'].' <code>{{:'.$item['id'].'}}</code>'; - echo '</div>'; - if($item['isimg']) media_printimgdetail($item); - echo '<div class="clearer"></div>'.NL; - echo '</div>'.NL; -} - -/** * Display a media icon * * @param string $filename media id @@ -1477,127 +1416,6 @@ function media_printicon($filename, $size=''){ } /** - * Formats and prints one file in the list in the thumbnails view - * - * @author Kate Arzamastseva <pshns@ukr.net> - * - * @param array $item - * @param int $auth permission level - * @param bool|string $jump item id - * @param bool $display_namespace - */ -function media_printfile_thumbs($item,$auth,$jump=false,$display_namespace=false){ - - // Prepare filename - $file = utf8_decodeFN($item['file']); - - // output - echo '<li><dl title="'.hsc($item['id']).'">'.NL; - - echo '<dt>'; - if($item['isimg']) { - media_printimgdetail($item, true); - - } else { - echo '<a id="d_:'.$item['id'].'" class="image" title="'.$item['id'].'" href="'. - media_managerURL(['image' => hsc($item['id']), 'ns' => getNS($item['id']), - 'tab_details' => 'view']).'">'; - echo media_printicon($item['id'], '32x32'); - echo '</a>'; - } - echo '</dt>'.NL; - if (!$display_namespace) { - $name = hsc($file); - } else { - $name = hsc($item['id']); - } - echo '<dd class="name"><a href="'.media_managerURL(['image' => hsc($item['id']), 'ns' => getNS($item['id']), - 'tab_details' => 'view']).'" id="h_:'.$item['id'].'">'.$name.'</a></dd>'.NL; - - if($item['isimg']){ - $size = ''; - $size .= (int) $item['meta']->getField('File.Width'); - $size .= '×'; - $size .= (int) $item['meta']->getField('File.Height'); - echo '<dd class="size">'.$size.'</dd>'.NL; - } else { - echo '<dd class="size"> </dd>'.NL; - } - $date = dformat($item['mtime']); - echo '<dd class="date">'.$date.'</dd>'.NL; - $filesize = filesize_h($item['size']); - echo '<dd class="filesize">'.$filesize.'</dd>'.NL; - echo '</dl></li>'.NL; -} - -/** - * Prints a thumbnail and metainfo - * - * @param array $item - * @param bool $fullscreen - */ -function media_printimgdetail($item, $fullscreen=false){ - // prepare thumbnail - $size = $fullscreen ? 90 : 120; - - $w = (int) $item['meta']->getField('File.Width'); - $h = (int) $item['meta']->getField('File.Height'); - if($w>$size || $h>$size){ - if (!$fullscreen) { - $ratio = $item['meta']->getResizeRatio($size); - } else { - $ratio = $item['meta']->getResizeRatio($size,$size); - } - $w = floor($w * $ratio); - $h = floor($h * $ratio); - } - $src = ml($item['id'],array('w'=>$w,'h'=>$h,'t'=>$item['mtime'])); - $p = array(); - if (!$fullscreen) { - // In fullscreen mediamanager view, image resizing is done via CSS. - $p['width'] = $w; - $p['height'] = $h; - } - $p['alt'] = $item['id']; - $att = buildAttributes($p); - - // output - if ($fullscreen) { - echo '<a id="l_:'.$item['id'].'" class="image thumb" href="'. - media_managerURL(['image' => hsc($item['id']), 'ns' => getNS($item['id']), 'tab_details' => 'view']).'">'; - echo '<img src="'.$src.'" '.$att.' />'; - echo '</a>'; - } - - if ($fullscreen) return; - - echo '<div class="detail">'; - echo '<div class="thumb">'; - echo '<a id="d_:'.$item['id'].'" class="select">'; - echo '<img src="'.$src.'" '.$att.' />'; - echo '</a>'; - echo '</div>'; - - // read EXIF/IPTC data - $t = $item['meta']->getField(array('IPTC.Headline','xmp.dc:title')); - $d = $item['meta']->getField(array('IPTC.Caption','EXIF.UserComment', - 'EXIF.TIFFImageDescription', - 'EXIF.TIFFUserComment')); - if(\dokuwiki\Utf8\PhpString::strlen($d) > 250) $d = \dokuwiki\Utf8\PhpString::substr($d,0,250).'...'; - $k = $item['meta']->getField(array('IPTC.Keywords','IPTC.Category','xmp.dc:subject')); - - // print EXIF/IPTC data - if($t || $d || $k ){ - echo '<p>'; - 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>'; -} - -/** * Build link based on the current, adding/rewriting parameters * * @author Kate Arzamastseva <pshns@ukr.net> diff --git a/inc/pageutils.php b/inc/pageutils.php index d4a8bb7c4..c281ffc5b 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -226,7 +226,7 @@ function noNSorNS($id) { * Creates a XHTML valid linkid from a given headline title * * @param string $title The headline title - * @param array|bool $check Existing IDs (title => number) + * @param array|bool $check Existing IDs * @return string the title * * @author Andreas Gohr <andi@splitbrain.org> @@ -241,15 +241,16 @@ function sectionID($title,&$check) { } if(is_array($check)){ - // make sure tiles are unique - if (!array_key_exists ($title,$check)) { - $check[$title] = 0; - } else { - $title .= ++ $check[$title]; + $suffix=0; + $candidateTitle = $title; + while(in_array($candidateTitle, $check)){ + $candidateTitle = $title . ++$suffix; } + $check []= $candidateTitle; + return $candidateTitle; + } else { + return $title; } - - return $title; } /** diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index e4eff2a62..c2055d647 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -889,7 +889,7 @@ abstract class Doku_Renderer extends Plugin { $url = $url.rawurlencode($reference); } //handle as wiki links - if($url[0] === ':') { + if($url && $url[0] === ':') { $urlparam = null; $id = $url; if (strpos($url, '?') !== false) { diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f40b1c4b7..417b143c6 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1249,7 +1249,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $title = $reference; } } - list($src, $hash) = explode('#', $src, 2); + // Squelch the warning in case there is no hash in the URL + @list($src, $hash) = explode('#', $src, 2); $noLink = false; if($src == '') { // only output plaintext without link if there is no src @@ -1657,6 +1658,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { ) ) . '"'; $ret .= ' class="media'.$align.'"'; + $ret .= ' loading="lazy"'; if($title) { $ret .= ' title="'.$title.'"'; @@ -1886,7 +1888,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $url = ml($file, '', true, '&'); $linkType = 'internalmedia'; } - $title = $atts['title'] ? $atts['title'] : $this->_xmlEntities(\dokuwiki\Utf8\PhpString::basename(noNS($file))); + $title = !empty($atts['title']) + ? $atts['title'] + : $this->_xmlEntities(\dokuwiki\Utf8\PhpString::basename(noNS($file))); $out .= '<source src="'.hsc($url).'" type="'.$mime.'" />'.NL; // alternative content (just a link to the file) diff --git a/inc/parserutils.php b/inc/parserutils.php index 846be54db..c9aacd91d 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -411,7 +411,7 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ function p_purge_metadata($id) { $meta = p_read_metadata($id); foreach($meta['current'] as $key => $value) { - if(is_array($meta[$key])) { + if(isset($meta[$key]) && is_array($meta[$key])) { $meta['current'][$key] = array(); } else { $meta['current'][$key] = ''; @@ -463,7 +463,9 @@ function p_save_metadata($id, $meta) { global $cache_metadata, $INFO; if (isset($cache_metadata[$id])) $cache_metadata[$id] = $meta; - if (!empty($INFO) && ($id == $INFO['id'])) { $INFO['meta'] = $meta['current']; } + if (!empty($INFO) && isset($INFO['id']) && ($id == $INFO['id'])) { + $INFO['meta'] = $meta['current']; + } return io_saveFile(metaFN($id, '.meta'), serialize($meta)); } diff --git a/inc/search.php b/inc/search.php index 98be6cbf8..a33ba87c5 100644 --- a/inc/search.php +++ b/inc/search.php @@ -132,13 +132,14 @@ function search_qsearch(&$data,$base,$file,$type,$lvl,$opts){ */ function search_index(&$data,$base,$file,$type,$lvl,$opts){ global $conf; + $ns = isset($opts['ns']) ? $opts['ns'] : ''; $opts = array( 'pagesonly' => true, 'listdirs' => true, 'listfiles' => empty($opts['nofiles']), 'sneakyacl' => $conf['sneaky_index'], // Hacky, should rather use recmatch - 'depth' => preg_match('#^'.preg_quote($file, '#').'(/|$)#','/'.$opts['ns']) ? 0 : -1 + 'depth' => preg_match('#^'.preg_quote($file, '#').'(/|$)#','/'.$ns) ? 0 : -1 ); return search_universal($data, $base, $file, $type, $lvl, $opts); @@ -233,6 +234,58 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){ } /** + * List all mediafiles in a namespace + * $opts['depth'] recursion level, 0 for all + * $opts['showmsg'] shows message if invalid media id is used + * $opts['skipacl'] skip acl checking + * $opts['pattern'] check given pattern + * $opts['hash'] add hashes to result list + * + * @todo This is a temporary copy of search_media returning a list of MediaFile intances + * + * @param array $data + * @param string $base + * @param string $file + * @param string $type + * @param integer $lvl + * @param array $opts + * + * @return bool + */ +function search_mediafiles(&$data,$base,$file,$type,$lvl,$opts){ + + //we do nothing with directories + if($type == 'd') { + if(empty($opts['depth'])) return true; // recurse forever + $depth = substr_count($file,'/'); + if($depth >= $opts['depth']) return false; // depth reached + return true; + } + + $id = pathID($file,true); + if($id != cleanID($id)){ + if($opts['showmsg']) + msg(hsc($id).' is not a valid file name for DokuWiki - skipped',-1); + return false; // skip non-valid files + } + + //check ACL for namespace (we have no ACL for mediafiles) + $info['perm'] = auth_quickaclcheck(getNS($id).':*'); + if(empty($opts['skipacl']) && $info['perm'] < AUTH_READ){ + return false; + } + + //check pattern filter + if(!empty($opts['pattern']) && !@preg_match($opts['pattern'], $id)){ + return false; + } + + $data[] = new \dokuwiki\File\MediaFile($id); + return false; +} + + +/** * This function just lists documents (for RSS namespace export) * * @author Andreas Gohr <andi@splitbrain.org> diff --git a/inc/template.php b/inc/template.php index 68f0ba73d..9b7dfa5ab 100644 --- a/inc/template.php +++ b/inc/template.php @@ -297,7 +297,7 @@ function tpl_metaheaders($alt = true) { } } - // setup robot tags apropriate for different modes + // setup robot tags appropriate for different modes if(($ACT == 'show' || $ACT == 'export_xhtml') && !$REV) { if($INFO['exists']) { //delay indexing: @@ -348,7 +348,6 @@ function tpl_metaheaders($alt = true) { $jquery = getCdnUrls(); foreach($jquery as $src) { $head['script'][] = array( - 'charset' => 'utf-8', '_data' => '', 'src' => $src, ) + ($conf['defer_js'] ? [ 'defer' => 'defer'] : []); @@ -356,7 +355,7 @@ function tpl_metaheaders($alt = true) { // load our javascript dispatcher $head['script'][] = array( - 'charset'=> 'utf-8', '_data'=> '', + '_data'=> '', 'src' => DOKU_BASE.'lib/exe/js.php'.'?t='.rawurlencode($conf['template']).'&tseed='.$tseed, ) + ($conf['defer_js'] ? [ 'defer' => 'defer'] : []); @@ -1008,11 +1007,13 @@ function tpl_img_getTag($tags, $alt = '', $src = null) { global $SRC; if(is_null($src)) $src = $SRC; + if(is_null($src)) return $alt; static $meta = null; if(is_null($meta)) $meta = new JpegMeta($src); if($meta === false) return $alt; $info = cleanText($meta->getField($tags)); + $meta = null; // garbage collect and close any file handles. See #3404 if($info == false) return $alt; return $info; } @@ -1067,7 +1068,7 @@ function tpl_get_img_meta() { if (!empty($tag[0])) { $t = array($tag[0]); } - if(is_array($tag[3])) { + if(isset($tag[3]) && is_array($tag[3])) { $t = array_merge($t,$tag[3]); } $value = tpl_img_getTag($t); @@ -1272,7 +1273,7 @@ function tpl_getLang($id) { } } } - return $lang[$id]; + return isset($lang[$id]) ? $lang[$id] : ''; } /** diff --git a/install.php b/install.php index e8e927933..f37a15435 100644 --- a/install.php +++ b/install.php @@ -424,7 +424,7 @@ EOT; } // enable popularity submission - if($d['pop']){ + if(isset($d['pop']) && $d['pop']){ @touch(DOKU_INC.'data/cache/autosubmit.txt'); } @@ -569,7 +569,6 @@ function check_functions(){ random_bytes(1); } catch (\Exception $th) { // If an appropriate source of randomness cannot be found, an Exception will be thrown by PHP 7+ - // this exception is also thrown by paragonie/random_compat for PHP 5.6 support $error[] = $lang['i_urandom']; $ok = false; } diff --git a/lib/exe/css.php b/lib/exe/css.php index 2ea2c0963..40d700670 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -80,7 +80,7 @@ function css_out(){ $files = array_merge($files, $styleini['stylesheets'][$mediatype]); } // load user styles - if(is_array($config_cascade['userstyle'][$mediatype])) { + if(isset($config_cascade['userstyle'][$mediatype]) and is_array($config_cascade['userstyle'][$mediatype])) { foreach($config_cascade['userstyle'][$mediatype] as $userstyle) { $files[$userstyle] = DOKU_BASE; } @@ -357,30 +357,26 @@ function css_filetypes(){ // default style echo '.mediafile {'; - echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repeat;'; - echo ' padding-left: 18px;'; - echo ' padding-bottom: 1px;'; + echo ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/svg/file.svg) 0px 1px no-repeat;'; + echo ' background-size: 1.2em;'; + echo ' padding-left: 1.5em;'; echo '}'; // additional styles when icon available // scan directory for all icons $exts = array(); - if($dh = opendir(DOKU_INC.'lib/images/fileicons')){ + if($dh = opendir(DOKU_INC.'lib/images/fileicons/svg')){ while(false !== ($file = readdir($dh))){ - if(preg_match('/([_\-a-z0-9]+(?:\.[_\-a-z0-9]+)*?)\.(png|gif)/i',$file,$match)){ - $ext = strtolower($match[1]); - $type = '.'.strtolower($match[2]); - if($ext!='file' && (!isset($exts[$ext]) || $type=='.png')){ - $exts[$ext] = $type; - } + if(preg_match('/(.*?)\.svg$/i',$file, $match)){ + $exts[] = strtolower($match[1]); } } closedir($dh); } - foreach($exts as $ext=>$type){ + foreach($exts as $ext){ $class = preg_replace('/[^_\-a-z0-9]+/','_',$ext); echo ".mf_$class {"; - echo ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')'; + echo ' background-image: url('.DOKU_BASE.'lib/images/fileicons/svg/'.$ext.'.svg)'; echo '}'; } } diff --git a/lib/exe/detail.php b/lib/exe/detail.php index a6cffa770..8edf15462 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -3,7 +3,11 @@ use dokuwiki\Extension\Event; if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); -define('DOKU_MEDIADETAIL',1); +if(!defined('DOKU_MEDIADETAIL')) define('DOKU_MEDIADETAIL',1); + +// define all DokuWiki globals here (needed within test requests but also helps to keep track) +global $INPUT, $IMG, $ID, $REV, $SRC, $ERROR, $AUTH; + require_once(DOKU_INC.'inc/init.php'); $IMG = getID('media'); diff --git a/lib/images/fileicons/svg/7z.svg b/lib/images/fileicons/svg/7z.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/7z.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/README b/lib/images/fileicons/svg/README new file mode 100644 index 000000000..4e7770bed --- /dev/null +++ b/lib/images/fileicons/svg/README @@ -0,0 +1 @@ +Icons come from https://fileicons.org/ diff --git a/lib/images/fileicons/svg/asm.svg b/lib/images/fileicons/svg/asm.svg new file mode 100644 index 000000000..748386696 --- /dev/null +++ b/lib/images/fileicons/svg/asm.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#999"/><path d="M69.4 28.6v5.5H21.5v-5.5M30.6 41h47.9v5.6H30.6zm-9.1 12.4h47.9V59H21.5zm9.1 12.5h47.9v5.6H30.6z" fill="#999" stroke="#999" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/bash.svg b/lib/images/fileicons/svg/bash.svg new file mode 100644 index 000000000..8406f792f --- /dev/null +++ b/lib/images/fileicons/svg/bash.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#999"/><path d="M42.3 44.2h15.4V48H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zM69.2 25H38.5c-4.2 0-7.7 3.4-7.7 7.7v34.6h-7.7c0 4.2 3.4 7.7 7.7 7.7h30.8c4.2 0 7.7-3.4 7.7-7.7V36.5H77v-3.8c-.1-4.3-3.5-7.7-7.8-7.7zm-3.8 41.6c0 2.5-2 4.5-4.5 4.5H32.7c1.9-1.3 1.9-3.8 1.9-3.8V32.7c0-2.1 1.7-3.8 3.8-3.8s3.8 1.7 3.8 3.8v3.8h23.1v30.1zM46.2 32.7v-3.8h23.1c3.5 0 3.8 2.2 3.8 3.8H46.2z" fill="#999" stroke="#999" stroke-width=".75" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/bz2.svg b/lib/images/fileicons/svg/bz2.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/bz2.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/c.svg b/lib/images/fileicons/svg/c.svg new file mode 100644 index 000000000..d014cb253 --- /dev/null +++ b/lib/images/fileicons/svg/c.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M51.8 73c-12.4 0-22.5-10.1-22.5-22.5S39.4 28 51.8 28c7.1 0 13.6 3.3 17.9 8.9l-8.2 4.8c-2.5-2.7-6-4.3-9.7-4.3-7.2 0-13.1 5.9-13.1 13.1s5.9 13.1 13.1 13.1c3.7 0 7.2-1.6 9.7-4.3l8.2 4.8C65.4 69.7 58.9 73 51.8 73z" fill="#215997"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/conf.svg b/lib/images/fileicons/svg/conf.svg new file mode 100644 index 000000000..1a9cae0db --- /dev/null +++ b/lib/images/fileicons/svg/conf.svg @@ -0,0 +1 @@ +<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#999}</style><path d="M0 0h100v100H0V0z" fill="#fff"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M57.5 42.7c0-3.2-1.9-5.7-4.7-6.8v-9.2c0-1.5-1.1-2.7-2.7-2.7-1.5 0-2.7 1.1-2.7 2.7v9.2c-2.8 1-4.7 3.7-4.7 6.8s1.9 5.8 4.7 6.8c0 .1-.1.4-.1.5v23.3c0 1.5 1.1 2.7 2.7 2.7 1.5 0 2.7-1.1 2.7-2.7V50.1c0-.3 0-.4-.1-.5 3-1.1 4.9-3.7 4.9-6.9zm-7.3 2c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm21.2-17.9c0-1.5-1.1-2.7-2.7-2.7-1.5 0-2.7 1.1-2.7 2.7v21.8c-2.8 1-4.7 3.7-4.7 6.8s1.9 5.8 4.7 6.8c0 .1-.1.4-.1.5v10.6c0 1.5 1.1 2.7 2.7 2.7 1.5 0 2.7-1.1 2.7-2.7V62.7c0-.3 0-.4-.1-.5 2.8-1 4.7-3.7 4.7-6.8s-1.9-5.7-4.7-6.8V26.8h.2zm-2.6 30.6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM28.9 73.3c0 1.5 1.1 2.7 2.7 2.7s2.7-1.1 2.7-2.7V62.7c0-.3 0-.4-.1-.5 2.8-1 4.7-3.7 4.7-6.8s-1.9-5.7-4.7-6.8V26.8c0-1.5-1.1-2.7-2.7-2.7-1.5 0-2.7 1.1-2.7 2.7v21.8c-2.8 1-4.7 3.7-4.7 6.8s1.9 5.8 4.7 6.8c0 .1-.1.4-.1.5v10.6h.2zm2.7-19.9c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/cpp.svg b/lib/images/fileicons/svg/cpp.svg new file mode 100644 index 000000000..178f532a0 --- /dev/null +++ b/lib/images/fileicons/svg/cpp.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st2{fill:#215997}</style><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path class="st2" d="M44.4 72.5C32 72.5 21.9 62.4 21.9 50S32 27.5 44.4 27.5c7.1 0 13.6 3.3 17.9 8.9l-8.2 4.8c-2.5-2.7-6-4.3-9.7-4.3-7.2 0-13.1 5.9-13.1 13.1s5.9 13.1 13.1 13.1c3.7 0 7.2-1.6 9.7-4.3l8.2 4.8c-4.2 5.6-10.8 8.9-17.9 8.9z"/><path class="st2" d="M66.9 51.9h-3.7v3.7h-3.8v-3.7h-3.7v-3.8h3.7v-3.7h3.8v3.7h3.7zm13.2 0h-3.8v3.7h-3.7v-3.7h-3.8v-3.8h3.8v-3.7h3.7v3.7h3.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/cs.svg b/lib/images/fileicons/svg/cs.svg new file mode 100644 index 000000000..c6853d00c --- /dev/null +++ b/lib/images/fileicons/svg/cs.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}.st1{fill:#d5006e}</style><path class="st0" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M44.9 73c-12.4 0-22.5-10.1-22.5-22.5S32.5 28 44.9 28c7.1 0 13.6 3.3 17.9 8.9l-8.2 4.8c-2.5-2.7-6-4.3-9.7-4.3-7.2 0-13.1 5.9-13.1 13.1s5.9 13.1 13.1 13.1c3.7 0 7.2-1.6 9.7-4.3l8.2 4.8C58.5 69.7 52 73 44.9 73z"/><path class="st1" d="M78.6 48.6h-3.7v3.8h3.7v3.7h-3.7v3.8h-3.8v-3.8h-3.7v3.8h-3.8v-3.8h-3.7v-3.7h3.7v-3.8h-3.7v-3.7h3.7v-3.8h3.8v3.8h3.7v-3.8h3.8v3.8h3.7z"/><path class="st0" d="M67.4 48.6h3.8v3.8h-3.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/csh.svg b/lib/images/fileicons/svg/csh.svg new file mode 100644 index 000000000..8406f792f --- /dev/null +++ b/lib/images/fileicons/svg/csh.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#999"/><path d="M42.3 44.2h15.4V48H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zM69.2 25H38.5c-4.2 0-7.7 3.4-7.7 7.7v34.6h-7.7c0 4.2 3.4 7.7 7.7 7.7h30.8c4.2 0 7.7-3.4 7.7-7.7V36.5H77v-3.8c-.1-4.3-3.5-7.7-7.8-7.7zm-3.8 41.6c0 2.5-2 4.5-4.5 4.5H32.7c1.9-1.3 1.9-3.8 1.9-3.8V32.7c0-2.1 1.7-3.8 3.8-3.8s3.8 1.7 3.8 3.8v3.8h23.1v30.1zM46.2 32.7v-3.8h23.1c3.5 0 3.8 2.2 3.8 3.8H46.2z" fill="#999" stroke="#999" stroke-width=".75" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/css.svg b/lib/images/fileicons/svg/css.svg new file mode 100644 index 000000000..f359b94cc --- /dev/null +++ b/lib/images/fileicons/svg/css.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}.st5{fill:#e6e6e5}</style><path class="st0" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path fill="#1072ba" d="M30.1 73l-4.3-49.5h48.4L69.9 73 50 78.5z"/><path fill="#2aaae2" d="M50 74.3l16.1-4.4 3.7-42.3H50z"/><path fill="#b4b4b4" d="M35.9 45.8l.5 6.1L50 45.8v-6.1z"/><path class="st5" d="M65.2 33.2L50 39.7v6.1l14.6-6.5zM50 61.7l-6.8-1.9-.4-4.8h-6.1l.8 9.5L50 68z"/><path class="st0" d="M50 45.8v6.1h7.5l-.7 7.9-6.8 1.9V68l12.4-3.5 1.7-18.7z"/><path class="st5" d="M50 45.8H35.9l.5 6.1H50zm0-6.5v-6.1H34.8l.5 6.1z"/><path class="st0" d="M50 33.2v6.1h14.6l.6-6.1z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/csv.svg b/lib/images/fileicons/svg/csv.svg new file mode 100644 index 000000000..318ba0573 --- /dev/null +++ b/lib/images/fileicons/svg/csv.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#1f7244}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M62.1 30.9h14.1v9.4H62.1zm0 14.5h14.1v9.4H62.1zm0 14.3h14.1v9.4H62.1zm-19.2 0H57v9.4H42.9zm-19 0H38v9.4H23.9zm19.2-14.2h14.1v9.4H43.1zm-19.2 0H38v9.4H23.9zm19.2-14.6h14.1v9.4H43.1zm-19.2 0H38v9.4H23.9z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/deb.svg b/lib/images/fileicons/svg/deb.svg new file mode 100644 index 000000000..2cdb6d758 --- /dev/null +++ b/lib/images/fileicons/svg/deb.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#a87d45}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M59.4 53.8L50 49.4l18.8-8.8 9.4 4.4-9.4 4.4-9.4 4.4zm9.4-21.9l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zM40.6 45l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zm0-8.7l9.4-4.4-9.4-4.4-18.8 8.8 9.4 4.4 9.4-4.4zM68.8 52l-8.4 3.9-1 .5-1-.5L50 52l-8.4 3.9-1 .5-1-.5-8.4-3.9v13.7L50 75.5l18.8-9.8V52z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/doc.svg b/lib/images/fileicons/svg/doc.svg new file mode 100644 index 000000000..ac084a0dc --- /dev/null +++ b/lib/images/fileicons/svg/doc.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#2372ba}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M27.6 27l7.9 29.7L45.2 27h9.5l9.8 29.7L72.4 27H85L71.2 73H59l-9-26.7L41 73H28.8L15 27h12.6z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/docx.svg b/lib/images/fileicons/svg/docx.svg new file mode 100644 index 000000000..ac084a0dc --- /dev/null +++ b/lib/images/fileicons/svg/docx.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#2372ba}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M27.6 27l7.9 29.7L45.2 27h9.5l9.8 29.7L72.4 27H85L71.2 73H59l-9-26.7L41 73H28.8L15 27h12.6z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/file.svg b/lib/images/fileicons/svg/file.svg new file mode 100644 index 000000000..2537cbec9 --- /dev/null +++ b/lib/images/fileicons/svg/file.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#bababa"/><path d="M71 36.3L57.8 23.1c-.4-.4-.9-.6-1.4-.6h-26c-1.1 0-2 .9-2 2v51.1c0 1.1.9 2 2 2h39.3c1.1 0 2-.9 2-2V37.7c-.1-.5-.3-1-.7-1.4zm-3.9 2.3H55.5V27l11.6 11.6zm.1 34.5H32.8V26.9h18.5v13.3c0 1.4 1.2 2.6 2.6 2.6h13.3v30.3z" fill="#bababa" stroke="#bababa" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/gif.svg b/lib/images/fileicons/svg/gif.svg new file mode 100644 index 000000000..8d4cac8c0 --- /dev/null +++ b/lib/images/fileicons/svg/gif.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#5b2d8d}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><circle class="st1" cx="32.4" cy="35" r="8"/><path class="st1" d="M78.9 47.3l-9.7-9.6L50 57l-9.6-9.7-19.3 19.3V73h57.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/gz.svg b/lib/images/fileicons/svg/gz.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/gz.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/h.svg b/lib/images/fileicons/svg/h.svg new file mode 100644 index 000000000..b80f32f2c --- /dev/null +++ b/lib/images/fileicons/svg/h.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M33.4 29.8h7.4V47h18.5V29.8h7.4v40.5h-7.4v-17H40.7v17h-7.4V29.8z" fill="#215997" stroke="#215997" stroke-width="1.75" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/htm.svg b/lib/images/fileicons/svg/htm.svg new file mode 100644 index 000000000..1e37bd48a --- /dev/null +++ b/lib/images/fileicons/svg/htm.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}</style><path class="st0" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path fill="#e44f26" d="M74.3 23.5H25.7l4.5 49.4L50 78.5l19.7-5.6z"/><path fill="#f1662a" d="M50 27.5v46.8l16-4.5 3.9-42.3z"/><path class="st0" d="M65.3 33.6H34.7l1.7 18.5.1-.2h20.8l-.6 7.9-6.7 1.9-6.8-1.9-.4-4.8h-6.1l.9 9.5L50 68l12.4-3.5 1.8-18.6H42l-.6-6.2h23.3z"/><path d="M50 33.6H34.7l1.7 18.5V52H50v-6h-8l-.6-6.2H50v-6.2zM42.8 55h-6.1l.9 9.4L50 68v-6.3l-6.7-2-.5-4.7z" fill="#ebebeb"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/html.svg b/lib/images/fileicons/svg/html.svg new file mode 100644 index 000000000..1e37bd48a --- /dev/null +++ b/lib/images/fileicons/svg/html.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}</style><path class="st0" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path fill="#e44f26" d="M74.3 23.5H25.7l4.5 49.4L50 78.5l19.7-5.6z"/><path fill="#f1662a" d="M50 27.5v46.8l16-4.5 3.9-42.3z"/><path class="st0" d="M65.3 33.6H34.7l1.7 18.5.1-.2h20.8l-.6 7.9-6.7 1.9-6.8-1.9-.4-4.8h-6.1l.9 9.5L50 68l12.4-3.5 1.8-18.6H42l-.6-6.2h23.3z"/><path d="M50 33.6H34.7l1.7 18.5V52H50v-6h-8l-.6-6.2H50v-6.2zM42.8 55h-6.1l.9 9.4L50 68v-6.3l-6.7-2-.5-4.7z" fill="#ebebeb"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ico.svg b/lib/images/fileicons/svg/ico.svg new file mode 100644 index 000000000..da894c465 --- /dev/null +++ b/lib/images/fileicons/svg/ico.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#8ed200}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M49.7 25.4c.2-.5.4-.5.6 0L56 43c.2.5.7.9 1.2.9h18.6c.5 0 .6.2.2.6L61 55.4c-.4.3-.6.9-.5 1.5l5.7 17.7c.2.5-.1.7-.5.3L50.7 64c-.5-.3-1.1-.3-1.5 0l-15 10.9c-.4.3-.6.2-.5-.3l5.7-17.7c.1-.5 0-1.1-.5-1.5L24 44.5c-.4-.3-.3-.6.2-.6h18.6c.6 0 1.1-.4 1.2-.9l5.7-17.6z"/><path d="M49.7 25.4c.2-.5.4-.5.6 0L56 43c.2.5.7.9 1.2.9h18.6c.5 0 .6.2.2.6L61 55.4c-.4.3-.6.9-.5 1.5l5.7 17.7c.2.5-.1.7-.5.3L50.7 64c-.5-.3-1.1-.3-1.5 0l-15 10.9c-.4.3-.6.2-.5-.3l5.7-17.7c.1-.5 0-1.1-.5-1.5L24 44.5c-.4-.3-.3-.6.2-.6h18.6c.6 0 1.1-.4 1.2-.9l5.7-17.6z" fill="none"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/index.php b/lib/images/fileicons/svg/index.php new file mode 100644 index 000000000..66c4835af --- /dev/null +++ b/lib/images/fileicons/svg/index.php @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html lang="en" dir="ltr"> +<head> + <title>Filetype icons</title> + + <style> + body { + background-color: #fff; + font-family: Arial; + } + </style> + +</head> + +<body> +<?php +foreach (glob('*.svg') as $img) { + echo '<img src="'.$img.'" alt="'.$img.'" width="32" height="32" title="'.$img.'" /> '; +} +?> +</body> +</html> diff --git a/lib/images/fileicons/svg/java.svg b/lib/images/fileicons/svg/java.svg new file mode 100644 index 000000000..2a095856b --- /dev/null +++ b/lib/images/fileicons/svg/java.svg @@ -0,0 +1 @@ +<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st2,.st3{fill:#c00;stroke:#c00;stroke-miterlimit:10}.st3{fill:#265db4;stroke:#265db4}</style><path d="M0 0h100v100H0V0z" fill="#fff"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path class="st2" d="M52.3 47.1c2.9 3.3-.8 6.3-.8 6.3s7.3-3.8 4-8.5c-3.1-4.4-5.6-6.6 7.5-14.2 0 0-20.5 5.2-10.7 16.4"/><path class="st2" d="M55.5 18.5s6.2 6.2-5.9 15.8c-9.7 7.7-2.2 12.1 0 17.1-5.7-5.1-9.8-9.6-7-13.8 4-6.2 15.4-9.2 12.9-19.1"/><path class="st3" d="M62.3 64.5c11.2-5.8 6-11.5 2.4-10.7-.9.2-1.3.3-1.3.3s.3-.5 1-.7c7.2-2.5 12.7 7.4-2.3 11.4-.1 0 .1-.2.2-.3m-20.7 2.4s-2.3 1.3 1.6 1.8c4.7.5 7.2.5 12.4-.5 0 0 1.4.9 3.3 1.6-11.7 5-26.5-.3-17.3-2.9m-1.4-6.5s-2.6 1.9 1.4 2.3c5.1.5 9.1.6 16-.8 0 0 1 1 2.5 1.5-14.2 4.2-30 .3-19.9-3"/><path class="st3" d="M67.8 71.8s1.7 1.4-1.9 2.5c-6.8 2.1-28.2 2.7-34.1.1-2.1-.9 1.9-2.2 3.1-2.5 1.3-.3 2.1-.2 2.1-.2-2.4-1.7-15.4 3.3-6.6 4.7 23.9 3.8 43.6-1.8 37.4-4.6M42.7 53.6s-10.9 2.6-3.9 3.5c3 .4 8.9.3 14.4-.2 4.5-.4 9-1.2 9-1.2s-1.6.7-2.7 1.5c-11.1 2.9-32.4 1.6-26.3-1.4 5.3-2.5 9.5-2.2 9.5-2.2"/><path class="st3" d="M43.8 80.3c10.8.7 27.3-.4 27.7-5.5 0 0-.8 1.9-8.9 3.5-9.2 1.7-20.6 1.5-27.3.4.1 0 1.5 1.2 8.5 1.6"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/jpeg.svg b/lib/images/fileicons/svg/jpeg.svg new file mode 100644 index 000000000..8d4cac8c0 --- /dev/null +++ b/lib/images/fileicons/svg/jpeg.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#5b2d8d}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><circle class="st1" cx="32.4" cy="35" r="8"/><path class="st1" d="M78.9 47.3l-9.7-9.6L50 57l-9.6-9.7-19.3 19.3V73h57.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/jpg.svg b/lib/images/fileicons/svg/jpg.svg new file mode 100644 index 000000000..8d4cac8c0 --- /dev/null +++ b/lib/images/fileicons/svg/jpg.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#5b2d8d}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><circle class="st1" cx="32.4" cy="35" r="8"/><path class="st1" d="M78.9 47.3l-9.7-9.6L50 57l-9.6-9.7-19.3 19.3V73h57.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/js.svg b/lib/images/fileicons/svg/js.svg new file mode 100644 index 000000000..c97554772 --- /dev/null +++ b/lib/images/fileicons/svg/js.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}</style><path class="st0" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path fill="#72a536" d="M74.3 23.5H25.7l4.5 49.4L50 78.5l19.7-5.6z"/><path fill="#9c4" d="M50 27.5v46.8l16-4.5 3.9-42.3z"/><path d="M62.4 64.6L50 68l-12.5-3.5-.9-9.5h6.2l.3 4.7 6.9 2 6.6-2 1.9-20.1H35.1l-.4-6h30.6l-2.9 31z" fill="#e6e6e5"/><path class="st0" d="M62.5 64.6L50 68v-6.3l6.6-2 1.9-20.1H50v-6h15.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/json.svg b/lib/images/fileicons/svg/json.svg new file mode 100644 index 000000000..fde9988be --- /dev/null +++ b/lib/images/fileicons/svg/json.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#999}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path d="M22 53.4v-5.9c1.3-.1 2.3-.2 2.9-.6.6-.2 1.1-.8 1.6-1.4.5-.7.8-1.5 1-2.6.1-.8.3-2.1.3-4 0-3.2.1-5.4.5-6.7.3-1.2.9-2.3 1.6-3 .8-.7 2-1.3 3.5-1.8 1-.2 2.6-.5 4.9-.5h1.4v5.8c-1.9 0-3.2.1-3.7.4-.5.2-.9.5-1.3 1-.3.4-.4 1.1-.4 2.1s-.1 3-.3 5.8c-.1 1.7-.3 3-.6 3.9-.4 1-.9 1.8-1.4 2.5-.5.6-1.4 1.3-2.5 2 1 .6 1.9 1.2 2.5 1.9.6.7 1.1 1.7 1.5 2.7.4 1.1.6 2.5.6 4.3.1 2.7.1 4.4.1 5.2 0 1.1.1 1.8.4 2.3.3.5.8.7 1.3 1 .5.2 1.8.4 3.7.4V74h-1.4c-2.3 0-4.2-.1-5.3-.5-1.3-.4-2.3-1-3.2-1.8-.9-.8-1.4-1.8-1.8-3-.3-1.2-.4-3.1-.4-5.7 0-3-.1-5-.4-5.8-.4-1.3-1-2.3-1.8-2.9-.5-.5-1.7-.9-3.3-.9zm55.9 0c-1.3.1-2.3.2-2.9.6-.6.2-1.1.8-1.6 1.4-.5.7-.8 1.5-1 2.6-.1.8-.3 2.1-.3 4 0 3.2-.1 5.4-.5 6.7-.3 1.3-.9 2.3-1.6 3-.8.7-2 1.3-3.5 1.8-1 .2-2.6.5-4.9.5h-1.4v-5.8c1.9 0 3-.1 3.7-.4.6-.2 1-.6 1.3-1s.4-1.1.4-2.1.1-2.9.3-5.7c.1-1.7.4-3.1.8-4 .4-1.1.9-1.9 1.5-2.6.6-.7 1.4-1.3 2.4-1.9-1.6-1-2.6-1.7-3.1-2.4-.8-1.1-1.4-2.5-1.6-4-.3-1.2-.4-3.7-.4-7.5 0-1.2-.1-2-.4-2.5-.3-.4-.6-.7-1.1-1-.5-.2-1.8-.4-3.8-.4v-5.8h1.4c2.3 0 4.2.1 5.3.5 1.3.4 2.3 1 3.2 1.8.9.8 1.4 1.8 1.8 3 .3 1.2.5 3.1.5 5.7 0 3 .1 4.9.4 5.8.4 1.3 1 2.3 1.8 2.7.8.6 2 .8 3.5 1v5.9l-.2.1z" stroke="#999" stroke-width=".5" stroke-miterlimit="10" fill="#999"/><path class="st1" d="M61.1 52.8c-1-.3-1.6-1.2-1.6-2.2 0-1 .7-1.9 1.6-2.2.3-.1.5-.4.4-.7-.3-1.1-.7-2.1-1.3-3-.1-.3-.5-.4-.8-.2-.3.2-.7.3-1.1.3-1.3 0-2.3-1.1-2.3-2.3 0-.4.1-.8.3-1.1.1-.3 0-.6-.2-.8-.9-.6-2-1-3-1.3-.3-.1-.6.1-.7.4-.3 1-1.2 1.6-2.2 1.6s-1.9-.7-2.2-1.6c-.1-.3-.4-.5-.7-.4-1.1.3-2.1.7-3 1.3-.3.1-.4.5-.2.8.2.3.3.7.3 1.1 0 1.3-1.1 2.3-2.3 2.3-.4 0-.8-.1-1.1-.3-.3-.1-.6 0-.8.2-.6.9-1 2-1.3 3-.1.3.1.6.4.7 1 .3 1.6 1.2 1.6 2.2 0 1-.7 1.9-1.6 2.2-.3.1-.5.4-.4.7.3 1.1.7 2.1 1.3 3 .1.3.5.4.8.2.3-.2.7-.3 1.1-.3 1.3 0 2.3 1.1 2.3 2.3 0 .4-.1.8-.3 1.1-.1.3 0 .6.2.8.9.6 2 1 3 1.3h.1c.2 0 .5-.1.6-.4.3-1 1.2-1.6 2.2-1.6s1.9.7 2.2 1.6c.1.3.4.5.7.4 1.1-.3 2.1-.7 3-1.3.3-.1.4-.5.2-.8-.2-.3-.3-.7-.3-1.1 0-1.3 1.1-2.3 2.3-2.3.4 0 .8.1 1.1.3.3.1.6 0 .8-.2.6-.9 1-2 1.3-3 .1-.3-.1-.6-.4-.7zM50 54.1c-2 0-3.6-1.6-3.6-3.6s1.6-3.6 3.6-3.6 3.6 1.6 3.6 3.6-1.6 3.6-3.6 3.6z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/lua.svg b/lib/images/fileicons/svg/lua.svg new file mode 100644 index 000000000..8c2a373c3 --- /dev/null +++ b/lib/images/fileicons/svg/lua.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M46.8 75C34.8 75 25 65.2 25 53.2s9.8-22 22.2-21.8c11.7.3 21.2 9.8 21.2 21.8S58.8 75 46.8 75zm9-37.2c-3.5 0-6.5 3-6.5 6.5s2.8 6.5 6.5 6.5c3.5 0 6.5-2.8 6.5-6.5-.1-3.5-2.8-6.5-6.5-6.5zm12.7 0c-3.5 0-6.5-2.8-6.2-6.5 0-3.5 2.8-6.2 6.5-6.2 3.5 0 6.2 3 6.2 6.5s-3 6.2-6.5 6.2z" fill="navy"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/mp3.svg b/lib/images/fileicons/svg/mp3.svg new file mode 100644 index 000000000..7d5a0a818 --- /dev/null +++ b/lib/images/fileicons/svg/mp3.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st2{fill:#039}</style><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#0e3693"/><path class="st2" d="M32.5 37.5h-9v25h9L53.6 77V23L32.5 37.5M71.9 50c0 6.8-3.7 12.7-9.1 15.8l2.8 4.9c7.1-4.1 11.9-11.8 11.9-20.7 0-8.8-4.8-16.6-11.9-20.7l-2.8 4.9c5.4 3.1 9.1 9 9.1 15.8z"/><path class="st2" d="M62.1 50c0 3.2-1.7 5.9-4.3 7.4l2.7 4.7c4.2-2.4 7-6.9 7-12.1 0-5.2-2.8-9.7-7-12.1l-2.7 4.7c2.6 1.5 4.3 4.2 4.3 7.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/mp4.svg b/lib/images/fileicons/svg/mp4.svg new file mode 100644 index 000000000..f2a277268 --- /dev/null +++ b/lib/images/fileicons/svg/mp4.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#ef6f2e}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M21 26.4v47.1h58V26.4H21zm10.9 43.5h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2zm10.9 25.4V37.3L60.9 50 42.8 62.7zm32.6 7.2h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ods.svg b/lib/images/fileicons/svg/ods.svg new file mode 100644 index 000000000..e36187083 --- /dev/null +++ b/lib/images/fileicons/svg/ods.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#1f7244}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M62.4 34h14.1v9.4H62.4zm0 14.5h14.1v9.4H62.4zm0 14.3h14.1v9.4H62.4zm-19.1 0h14.1v9.4H43.3zm-19.1 0h14.1v9.4H24.2zm24.6-35h2c3 .2 5.3.9 7.6 1.9 4.4-2 10.6-.5 14.6 1-5-.5-10.9 0-14.3 2-3.5-2.8-10-3.6-16.1-2.8 1.7-1.2 3.8-1.9 6.2-2.1zm-1.3 7.5c-3.6.2-6.5 1.4-8.4 3-5.9-2.7-16.1-1.5-19.9 2.1-.3.2-.7.5-.6.8 3.4-1 7.4-1.9 11.6-1.5 4.2.3 7.3 1.7 9.6 3.6 4.3-3.8 10.6-6 18.6-5.9-2.8-1.3-6.9-2.3-10.9-2.1zm-4.1 13.3h14.1V58H43.4zm-19.1 0h14.1V58H24.3z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/odt.svg b/lib/images/fileicons/svg/odt.svg new file mode 100644 index 000000000..f30088bf5 --- /dev/null +++ b/lib/images/fileicons/svg/odt.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1,.st2{fill:#1a75ce}.st2{stroke:#1a75ce;stroke-width:.5;stroke-miterlimit:10}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st2" d="M59 42.8h19.4v3.1H59v-3.1zm-37.9 8.4h57.4v3.4H21.1v-3.4zm0 8.4h57.4V63H21.1v-3.4z"/><path class="st1" d="M53.3 28.7h2.1c3.2.2 5.7 1 8.1 2 4.7-2.1 11.3-.5 15.5 1.1-5.3-.5-11.6 0-15.2 2.1C60 31 53.1 30.1 46.6 31c1.9-1.3 4.1-2 6.7-2.3zm-1.5 8c-3.8.2-6.9 1.5-9 3.2-6.3-2.8-17.1-1.6-21.1 2.2-.4.2-.7.5-.6.9 3.6-1.1 7.9-2 12.3-1.6 4.4.4 7.7 1.8 10.2 3.8 4.5-4.1 11.3-6.4 19.8-6.3-3-1.3-7.3-2.4-11.6-2.2z"/><path class="st2" d="M21.1 67.8h57.4v3.4H21.1v-3.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ogg.svg b/lib/images/fileicons/svg/ogg.svg new file mode 100644 index 000000000..7d5a0a818 --- /dev/null +++ b/lib/images/fileicons/svg/ogg.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st2{fill:#039}</style><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#0e3693"/><path class="st2" d="M32.5 37.5h-9v25h9L53.6 77V23L32.5 37.5M71.9 50c0 6.8-3.7 12.7-9.1 15.8l2.8 4.9c7.1-4.1 11.9-11.8 11.9-20.7 0-8.8-4.8-16.6-11.9-20.7l-2.8 4.9c5.4 3.1 9.1 9 9.1 15.8z"/><path class="st2" d="M62.1 50c0 3.2-1.7 5.9-4.3 7.4l2.7 4.7c4.2-2.4 7-6.9 7-12.1 0-5.2-2.8-9.7-7-12.1l-2.7 4.7c2.6 1.5 4.3 4.2 4.3 7.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ogv.svg b/lib/images/fileicons/svg/ogv.svg new file mode 100644 index 000000000..f2a277268 --- /dev/null +++ b/lib/images/fileicons/svg/ogv.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#ef6f2e}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M21 26.4v47.1h58V26.4H21zm10.9 43.5h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2zm10.9 25.4V37.3L60.9 50 42.8 62.7zm32.6 7.2h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/pdf.svg b/lib/images/fileicons/svg/pdf.svg new file mode 100644 index 000000000..e6472df17 --- /dev/null +++ b/lib/images/fileicons/svg/pdf.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#c11e07"/><path d="M46.2 21.8c-3.5 0-6.3 2.9-6.3 6.3 0 4.3 2.4 9.6 4.9 14.7-2 6.1-4.1 12.7-7 18.2-5.8 2.3-11 4-14 6.6l-.2.2c-1.1 1.2-1.8 2.7-1.8 4.4 0 3.5 2.9 6.3 6.3 6.3 1.7 0 3.4-.6 4.4-1.8 0 0 .2 0 .2-.2 2.3-2.7 5-7.8 7.5-12.2 5.5-2.1 11.5-4.4 16.9-5.8 4.1 3.4 10.1 5.5 15 5.5 3.5 0 6.3-2.9 6.3-6.3 0-3.5-2.9-6.3-6.3-6.3-4 0-9.6 1.4-13.9 2.9-3.5-3.4-6.7-7.5-9.2-11.9C50.6 37 52.6 32 52.6 28c-.2-3.5-2.9-6.2-6.4-6.2zm0 3.6c1.4 0 2.4 1.1 2.4 2.4 0 1.8-1.1 5.3-2.1 9-1.5-3.7-2.9-7.2-2.9-9 .1-1.2 1.2-2.4 2.6-2.4zm1.1 21.5c1.8 3.1 4.1 5.8 6.6 8.2-3.7 1.1-7.3 2.3-11 3.7 1.8-3.8 3.1-7.9 4.4-11.9zM72 55c1.4 0 2.4 1.1 2.4 2.4 0 1.4-1.1 2.4-2.4 2.4-2.9 0-6.9-1.2-10.1-3.1C65.6 56 69.7 55 72 55zM34.6 66.2c-1.8 3.2-3.5 6.1-4.7 7.6-.5.5-.9.6-1.7.6-1.4 0-2.4-1.1-2.4-2.4 0-.6.3-1.4.6-1.7 1.3-1.2 4.5-2.6 8.2-4.1z" fill="#c11e07" stroke="#c11e07" stroke-width="1.25" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/php.svg b/lib/images/fileicons/svg/php.svg new file mode 100644 index 000000000..096500ab5 --- /dev/null +++ b/lib/images/fileicons/svg/php.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.a{fill:#6781b2}</style><path fill="#FFF" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" class="a"/><path d="M27.3 54.7c1.8 0 3.2-.3 4-1 .8-.7 1.4-1.8 1.7-3.4.3-1.5.2-2.5-.3-3.1-.5-.6-1.6-.9-3.3-.9h-2.9l-1.6 8.4h2.4zM17.8 65c-.1 0-.3-.1-.3-.2-.1-.1-.1-.2-.1-.4l4.2-22.2c0-.2.2-.4.4-.4h9.2c2.9 0 5 .8 6.4 2.4 1.4 1.6 1.8 3.8 1.2 6.5-.2 1.1-.6 2.2-1.1 3.1-.5.9-1.2 1.8-2 2.6-1 .9-2.1 1.6-3.3 2-1.2.4-2.7.6-4.6.6h-3.7L23 64.6c0 .2-.2.4-.4.4h-4.8zm34.5-5.9c-.1 0-.3-.1-.3-.2-.1-.1-.1-.2-.1-.4l1.9-9.8c.2-.9.1-1.6-.1-1.9-.2-.2-.6-.5-2-.5h-3.4L46 58.6c0 .2-.2.4-.4.4h-4.7c-.1 0-.3-.1-.3-.2-.1-.1-.1-.2-.1-.4l4.2-22.2c0-.2.2-.4.4-.4h4.7c.1 0 .3.1.3.2.1.1.1.2.1.4l-1 5.4h3.6c2.8 0 4.6.5 5.7 1.5 1.1 1 1.5 2.7 1 5l-1.9 10.3c0 .2-.2.4-.4.4h-4.9v.1zm18.1-4.4c1.9 0 3.3-.3 4.2-1 .9-.7 1.5-1.8 1.8-3.4.3-1.5.2-2.5-.3-3.1-.5-.6-1.7-.9-3.4-.9h-3L68 54.7h2.4zM60.6 65c-.1 0-.3-.1-.4-.2-.1-.1-.1-.2-.1-.4l4.4-22.2c0-.2.2-.4.5-.4h9.5c3 0 5.2.8 6.6 2.4 1.4 1.6 1.8 3.8 1.3 6.5-.2 1.1-.6 2.2-1.1 3.1-.5.9-1.2 1.8-2.1 2.6-1 .9-2.2 1.6-3.5 2-1.2.4-2.8.6-4.8.6h-3.8L66 64.6c0 .2-.2.4-.5.4h-4.9z" class="a"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/pl.svg b/lib/images/fileicons/svg/pl.svg new file mode 100644 index 000000000..9abc83799 --- /dev/null +++ b/lib/images/fileicons/svg/pl.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st0{fill:#fff}</style><path class="st0" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M78 50.5c0 15.5-12.5 28-28 28S22 66 22 50.5s12.5-28 28-28 28 12.5 28 28" fill="#3a3c5b"/><path class="st0" d="M69.5 52.6c-.9-6-7.2-9.8-11.8-12.7-2-1.3-5.3-2.9-5.8-5.6-.2-1.1-.2-2.2-.2-3.4 0-.4 0-.9-.1-1.3-.1-.6-.6.1-.9-.4-.8-1.2-.5.4-.4 1 .2 1.5.4 3 .4 4.5 0 2.9-.5 5.7-1.2 8.5-1.7 6.6-3 13.3-1.4 20 .3 1.4.8 2.8 1.4 4.1.2.4.5 1.5 1 1.6 1.8.5 3.1.6 4.5 1.9.9.8 1.5.4 2.6 0 3.2-1.3 5.9-2.9 8.1-5.5 3.3-3.6 4.6-7.9 3.8-12.7m-3.3 6c-.3 2.4-1.8 4.6-3.4 6.5-1.1 1.3-2.7 3-4.4 3.6-.6.2.1-1 .2-1.1.5-.8 1.2-1.5 1.8-2.2.9-1.1 1.6-2.2 2.2-3.5 1.7-4.3 1.3-9.5-1.2-13.4-1.4-2.1-3.3-3.9-5.2-5.5-.9-.8-1.9-1.5-2.6-2.5-.2-.2-1.8-2.3-1.3-2.6.2-.1 3.6 3.6 4 3.8 1.4 1.1 2.9 2.1 4.2 3.3 1.8 1.7 3.6 3.5 4.7 5.7 1.1 2.4 1.3 5.2 1 7.9"/><path class="st0" d="M49 23.3c.5.3.6 2.4.6 4.2 0 1.9.2 9.8-.4 12-.6 2.1-1.9 4.5-3.4 6.6-1.4 2.1-3.1 6.5-3.1 9.2.1 2.7 1.6 7.2 2.8 9 1.2 1.9 3.3 4.5 2.8 5-.8 1-4.1-2.5-5.9-4.6-1.7-2.1-3.5-6.3-3.5-9.6-.1-3.3 1.8-6.4 3.1-8.2 1.3-1.9 3.9-5 4.6-6.5.7-1.4 1.4-3 1.7-5 .2-2 0-9.3 0-9.3s.1-3.2.7-2.8"/><path class="st0" d="M47.6 26.7c.5.2.6.9.6 1.5s-.2 3.2-.3 5.8c-.2 2.5-2.2 4.7-3.7 6.2s-5.9 6.2-7.5 8.5c-1.6 2.3-2.4 5.4-2.3 7.9.2 2.6.8 5.2 3.2 7.9 2.4 2.7 4.1 4 5.4 4.6 1.3.6 2.5 1.1 2.3 1.7-.3.6-1.5.2-2.8-.3-1.3-.5-5.9-2.3-8.5-5.3-2.6-3-3.9-6.9-3.8-10.7.1-3.8 1.2-5.3 2.9-7.8 1.7-2.4 6.5-6 8.1-7 1.5-.9 3.5-2.5 4.5-3.8 1-1.3 1.5-2.3 1.4-4.1-.1-1.7.1-3.3.1-3.9-.1-.3-.1-1.5.4-1.2m.1 45.4c.2 0 .1 1-.3 1.5s-1.1.8-1.2.6c-.1-.2.5-.3 1-.8.3-.5.2-1.3.5-1.3m4.7-.1c-.2 0-.1 1 .3 1.5s1.1.8 1.2.6c.1-.2-.5-.3-1-.8-.3-.4-.2-1.2-.5-1.3m-2.1 1.2c0 .9 0 1.6-.1 1.6-.2 0-.1-.7-.1-1.6 0-.9-.1-1.6.1-1.6.2-.1.1.7.1 1.6"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/png.svg b/lib/images/fileicons/svg/png.svg new file mode 100644 index 000000000..8d4cac8c0 --- /dev/null +++ b/lib/images/fileicons/svg/png.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#5b2d8d}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><circle class="st1" cx="32.4" cy="35" r="8"/><path class="st1" d="M78.9 47.3l-9.7-9.6L50 57l-9.6-9.7-19.3 19.3V73h57.8z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ppt.svg b/lib/images/fileicons/svg/ppt.svg new file mode 100644 index 000000000..edcc771bb --- /dev/null +++ b/lib/images/fileicons/svg/ppt.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#c24f32}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M45.2 74H32.7V26h19.9c5.4 0 9.5 1.4 12.4 4.2 2.9 2.8 4.3 6.7 4.3 11.8 0 5.1-1.4 9-4.3 11.8-2.9 2.8-7 4.2-12.4 4.2h-7.4v16zm0-26h4.1c4.6 0 6.9-2 6.9-6s-2.3-6-6.9-6h-4.1v12z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/pptx.svg b/lib/images/fileicons/svg/pptx.svg new file mode 100644 index 000000000..edcc771bb --- /dev/null +++ b/lib/images/fileicons/svg/pptx.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#c24f32}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M45.2 74H32.7V26h19.9c5.4 0 9.5 1.4 12.4 4.2 2.9 2.8 4.3 6.7 4.3 11.8 0 5.1-1.4 9-4.3 11.8-2.9 2.8-7 4.2-12.4 4.2h-7.4v16zm0-26h4.1c4.6 0 6.9-2 6.9-6s-2.3-6-6.9-6h-4.1v12z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/ps.svg b/lib/images/fileicons/svg/ps.svg new file mode 100644 index 000000000..9cb18357c --- /dev/null +++ b/lib/images/fileicons/svg/ps.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#fea500}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M37.6 41.6L24.5 69.4l2.5 2.5 16.3-16.3c-.6-1.3-.4-2.9.7-4 1.4-1.4 3.6-1.4 5 0s1.4 3.6 0 5c-1.1 1.1-2.7 1.3-4 .7L28.7 73.5l2.5 2.5L59 62.9l5.9-16.6-10.7-10.7-16.6 6zm38.1-3.3L62.2 24.8c-1.1-1.1-2.9-1.1-4 0L55 28c-1.1 1.1-1.1 2.9 0 4l13.5 13.5c1.1 1.1 2.9 1.1 4 0l3.2-3.2c1.1-1.1 1.1-2.9 0-4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/py.svg b/lib/images/fileicons/svg/py.svg new file mode 100644 index 000000000..4c268d42c --- /dev/null +++ b/lib/images/fileicons/svg/py.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M48.9 75.9c-6.3-.2-10.2-2.1-11.2-5.4l-.1-.4v-6.4c0-7.4 0-7.5.4-8.7.7-2.1 2.4-3.5 5-4.1l.6-.1h7.3c5.2 0 7.4 0 7.6-.1 1.5-.3 2.4-.6 3.3-1.3 1.1-.8 2-2.2 2.3-3.7.3-1.1.3-1 .3-4.9v-3.6h5.2l.5.1c2.7.8 4.7 3.3 5.5 7.2.3 1.5.3 1.6.3 5.4 0 3.7 0 3.7-.3 5-.3 1.2-.6 2.2-1.1 3.2-1 2-2.5 3.4-4.4 4-1.1.4-.2.3-10.7.4h-9.5v1.8h12.6v6.5c-.1.4-.2.9-.5 1.4-.3.5-1.1 1.3-1.6 1.7-1.7 1.1-4.3 1.8-7.7 2h-3.8zm8.7-4c1.2-.2 2.1-1.4 1.9-2.6-.2-1-.9-1.7-1.9-1.9-1.5-.2-2.8 1.1-2.6 2.6.2 1.1 1.1 1.8 2.2 1.9h.4zm-27-9.2c-1.4-.3-2.8-1.1-3.8-2.4-1.9-2.3-2.8-6.2-2.7-11.1.1-3 .5-5.3 1.5-7.2 1.2-2.5 3-3.9 5.4-4.4.5-.1.6-.1 9.8-.1h9.4c.1 0 .1-.1.1-.9v-.9H37.7v-3.3c0-3.6 0-3.5.3-4.2 1.1-2.3 4.2-3.7 9.2-4.1.4 0 1.3-.1 2.2-.1 5.6-.1 9.6.9 11.8 2.9.2.2.5.6.7.7.3.4.7 1.2.9 1.8l.1.4v6.8c0 6.3 0 6.8-.1 7.2-.1.6-.4 1.4-.6 1.8-.8 1.5-2.2 2.6-4.1 3.1-1.2.3-.7.3-8.7.4-8 0-7.5 0-8.6.3-2.2.6-3.8 2.3-4.4 4.7-.3 1.1-.3 1-.3 4.9v3.7h-2.4c-2.2.1-2.9.1-3.1 0zm13.3-30.4c.9-.4 1.5-1.5 1.3-2.4-.2-.9-.8-1.6-1.6-1.8-1.3-.4-2.7.4-2.9 1.8-.2 1.1.4 2.2 1.5 2.5.2.1.4.1.8.1.5 0 .6 0 .9-.2z" fill="#fed142"/><path d="M30.6 62.7c-1.4-.3-2.8-1.1-3.8-2.4-1.9-2.3-2.8-6.2-2.7-11.1.1-3 .5-5.3 1.5-7.2 1.2-2.5 3-3.9 5.4-4.4.5-.1.6-.1 9.8-.1h9.4c.1 0 .1-.1.1-.9v-.9H37.7v-3.3c0-3.6 0-3.5.3-4.2 1.1-2.3 4.2-3.7 9.2-4.1.4 0 1.3-.1 2.2-.1 5.6-.1 9.6.9 11.8 2.9.2.2.5.6.7.7.3.4.7 1.2.9 1.8l.1.4v6.8c0 6.3 0 6.8-.1 7.2-.1.6-.4 1.4-.6 1.8-.8 1.5-2.2 2.6-4.1 3.1-1.2.3-.7.3-8.7.4-8 0-7.5 0-8.6.3-2.2.6-3.8 2.3-4.4 4.7-.3 1.1-.3 1-.3 4.9v3.7h-2.4c-2.2.1-2.9.1-3.1 0zm13.3-30.4c.9-.4 1.5-1.5 1.3-2.4-.2-.9-.8-1.6-1.6-1.8-1.3-.4-2.7.4-2.9 1.8-.2 1.1.4 2.2 1.5 2.5.2.1.4.1.8.1.5 0 .6 0 .9-.2z" fill="#3571a3"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/rar.svg b/lib/images/fileicons/svg/rar.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/rar.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/rb.svg b/lib/images/fileicons/svg/rb.svg new file mode 100644 index 000000000..28b037b78 --- /dev/null +++ b/lib/images/fileicons/svg/rb.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M74.5 25.5v49L62.2 37.8l12.3-12.3zm-49 49h49L37.8 62.2 25.5 74.5zm12.3-12.3l36.8 12.2L50 50 37.8 62.2zM50 50l24.5 24.5-12.3-36.7L50 50zM25.5 62.2v12.2l12.2-12.2H25.5zM50 50H37.8v12.2L50 50zm12.2-12.2H50V50l12.2-12.2zm12.3-12.3H62.2v12.2l12.3-12.2zM37.8 50L25.5 62.2h12.2V50zM50 37.8L37.8 50H50V37.8zm12.2-12.3L50 37.8h12.2V25.5z" fill="#992315"/><path d="M74.5 25.5v49L62.2 37.8l12.3-12.3zm-49 49h49L37.8 62.2 25.5 74.5zm12.3-12.3l36.8 12.2L50 50 37.8 62.2zM50 50l24.5 24.5-12.3-36.7L50 50zM25.5 62.2v12.2l12.2-12.2H25.5zM50 50H37.8v12.2L50 50zm12.2-12.2H50V50l12.2-12.2zm12.3-12.3H62.2v12.2l12.3-12.2zM37.8 50L25.5 62.2h12.2V50zM50 37.8L37.8 50H50V37.8zm12.2-12.3L50 37.8h12.2V25.5z" fill="#992315" fill-opacity="0" stroke="#fff"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/rpm.svg b/lib/images/fileicons/svg/rpm.svg new file mode 100644 index 000000000..2cdb6d758 --- /dev/null +++ b/lib/images/fileicons/svg/rpm.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#a87d45}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M59.4 53.8L50 49.4l18.8-8.8 9.4 4.4-9.4 4.4-9.4 4.4zm9.4-21.9l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zM40.6 45l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zm0-8.7l9.4-4.4-9.4-4.4-18.8 8.8 9.4 4.4 9.4-4.4zM68.8 52l-8.4 3.9-1 .5-1-.5L50 52l-8.4 3.9-1 .5-1-.5-8.4-3.9v13.7L50 75.5l18.8-9.8V52z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/rtf.svg b/lib/images/fileicons/svg/rtf.svg new file mode 100644 index 000000000..629562858 --- /dev/null +++ b/lib/images/fileicons/svg/rtf.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#6b533b}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M19 63.7h35.3V73H19v-9.3m0-18.5h62v9.3H19zM19 27h62v9.3H19z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/sh.svg b/lib/images/fileicons/svg/sh.svg new file mode 100644 index 000000000..8406f792f --- /dev/null +++ b/lib/images/fileicons/svg/sh.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#999"/><path d="M42.3 44.2h15.4V48H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zm0 7.7h15.4v3.8H42.3v-3.8zM69.2 25H38.5c-4.2 0-7.7 3.4-7.7 7.7v34.6h-7.7c0 4.2 3.4 7.7 7.7 7.7h30.8c4.2 0 7.7-3.4 7.7-7.7V36.5H77v-3.8c-.1-4.3-3.5-7.7-7.8-7.7zm-3.8 41.6c0 2.5-2 4.5-4.5 4.5H32.7c1.9-1.3 1.9-3.8 1.9-3.8V32.7c0-2.1 1.7-3.8 3.8-3.8s3.8 1.7 3.8 3.8v3.8h23.1v30.1zM46.2 32.7v-3.8h23.1c3.5 0 3.8 2.2 3.8 3.8H46.2z" fill="#999" stroke="#999" stroke-width=".75" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/sql.svg b/lib/images/fileicons/svg/sql.svg new file mode 100644 index 000000000..b2c3e21de --- /dev/null +++ b/lib/images/fileicons/svg/sql.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#a03537}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M48.1 75.5c-6.5-.3-12.3-2.3-15.4-5.4-.9-.9-1.8-2.1-2.2-2.9l-.3-.5v-6.1c0-6 0-6.1.1-5.6.3 1.3 1.1 2.7 2.3 3.7.8.7 2.5 1.8 3.8 2.5 2.4 1.2 5.2 2 8.4 2.5 1.9.3 2.6.3 5.3.3s3.4 0 5.3-.3c3.1-.5 6-1.3 8.3-2.5 1.4-.7 3-1.7 3.8-2.5 1.1-1 2-2.5 2.3-3.8.1-.5.1-.4.1 5.5v6l-.3.6c-1 1.9-2.6 3.6-4.7 4.8-4.3 2.7-10.5 4-16.8 3.7z"/><path class="st1" d="M48.1 60.4c-5.7-.3-11-1.9-14.3-4.4-.7-.6-1.8-1.6-2.3-2.2-.4-.6-.8-1.2-1.1-1.8l-.3-.5v-6c0-5.9 0-6 .1-5.5.2.9.7 2 1.5 2.9.4.5 1.1 1.2 1.5 1.4.1.1.5.3.7.5 2.7 1.9 6.5 3.3 10.8 3.9 1.9.3 2.6.3 5.3.3s3.4 0 5.3-.3c3.1-.5 6-1.3 8.4-2.5 1.4-.7 3-1.8 3.9-2.5 1.1-1 2-2.4 2.2-3.7.1-.5.1-.4.1 5.5v5.9l-.4.8c-.7 1.2-1.1 1.8-1.9 2.7-.8.8-1.6 1.5-2.7 2.1-4.3 2.4-10.5 3.7-16.8 3.4z"/><path class="st1" d="M47.7 45.4c-3.8-.3-6.8-.9-9.6-2-3.4-1.3-5.8-3.1-7.1-5.2-.3-.4-.5-1-.7-1.6-.2-.6-.3-2-.1-2.7.9-4.3 6.6-7.9 14.5-9 1.9-.3 2.6-.3 5.3-.3s3.4 0 5.3.3c3.1.5 6 1.3 8.4 2.5 3.5 1.7 5.6 4 6.1 6.5.1.7.1 2.1-.1 2.7-.4 1.3-1 2.2-2 3.2-2.8 2.9-7.9 4.9-14.1 5.6-.9-.1-5.1 0-5.9 0z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/svg.svg b/lib/images/fileicons/svg/svg.svg new file mode 100644 index 000000000..9cb18357c --- /dev/null +++ b/lib/images/fileicons/svg/svg.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#fea500}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M37.6 41.6L24.5 69.4l2.5 2.5 16.3-16.3c-.6-1.3-.4-2.9.7-4 1.4-1.4 3.6-1.4 5 0s1.4 3.6 0 5c-1.1 1.1-2.7 1.3-4 .7L28.7 73.5l2.5 2.5L59 62.9l5.9-16.6-10.7-10.7-16.6 6zm38.1-3.3L62.2 24.8c-1.1-1.1-2.9-1.1-4 0L55 28c-1.1 1.1-1.1 2.9 0 4l13.5 13.5c1.1 1.1 2.9 1.1 4 0l3.2-3.2c1.1-1.1 1.1-2.9 0-4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/swf.svg b/lib/images/fileicons/svg/swf.svg new file mode 100644 index 000000000..4642c115b --- /dev/null +++ b/lib/images/fileicons/svg/swf.svg @@ -0,0 +1 @@ +<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d10407}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M65.6 36.6c1.4-.5 2.9-.7 4.4-.7V26c-6.7-.2-13.1 2.8-17.2 8.1-1.7 2.2-3.2 4.6-4.3 7.2l-3.2 7.9c-.8 2.4-1.8 4.8-2.9 7.1-.8 1.9-1.8 3.6-3 5.3-1 1.4-2.4 2.5-3.9 3.2-1.7.8-3.6 1.2-5.5 1.2v10c6.7.2 13.1-2.8 17.2-8.1 1.3-1.8 2.5-3.7 3.5-5.7l2.7-6.3H65V46h-7.6c.6-1.5 1.4-2.9 2.3-4.3.7-1.2 1.6-2.2 2.6-3.1 1-.9 2.1-1.6 3.3-2z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/tar.svg b/lib/images/fileicons/svg/tar.svg new file mode 100644 index 000000000..2cdb6d758 --- /dev/null +++ b/lib/images/fileicons/svg/tar.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#a87d45}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M59.4 53.8L50 49.4l18.8-8.8 9.4 4.4-9.4 4.4-9.4 4.4zm9.4-21.9l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zM40.6 45l-9.4-4.4-9.4 4.4 18.8 8.8 9.4-4.4-9.4-4.4zm0-8.7l9.4-4.4-9.4-4.4-18.8 8.8 9.4 4.4 9.4-4.4zM68.8 52l-8.4 3.9-1 .5-1-.5L50 52l-8.4 3.9-1 .5-1-.5-8.4-3.9v13.7L50 75.5l18.8-9.8V52z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/tgz.svg b/lib/images/fileicons/svg/tgz.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/tgz.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/txt.svg b/lib/images/fileicons/svg/txt.svg new file mode 100644 index 000000000..629562858 --- /dev/null +++ b/lib/images/fileicons/svg/txt.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#6b533b}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M19 63.7h35.3V73H19v-9.3m0-18.5h62v9.3H19zM19 27h62v9.3H19z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/wav.svg b/lib/images/fileicons/svg/wav.svg new file mode 100644 index 000000000..7d5a0a818 --- /dev/null +++ b/lib/images/fileicons/svg/wav.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st2{fill:#039}</style><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#0e3693"/><path class="st2" d="M32.5 37.5h-9v25h9L53.6 77V23L32.5 37.5M71.9 50c0 6.8-3.7 12.7-9.1 15.8l2.8 4.9c7.1-4.1 11.9-11.8 11.9-20.7 0-8.8-4.8-16.6-11.9-20.7l-2.8 4.9c5.4 3.1 9.1 9 9.1 15.8z"/><path class="st2" d="M62.1 50c0 3.2-1.7 5.9-4.3 7.4l2.7 4.7c4.2-2.4 7-6.9 7-12.1 0-5.2-2.8-9.7-7-12.1l-2.7 4.7c2.6 1.5 4.3 4.2 4.3 7.4z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/webm.svg b/lib/images/fileicons/svg/webm.svg new file mode 100644 index 000000000..f2a277268 --- /dev/null +++ b/lib/images/fileicons/svg/webm.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#ef6f2e}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M21 26.4v47.1h58V26.4H21zm10.9 43.5h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2zm10.9 25.4V37.3L60.9 50 42.8 62.7zm32.6 7.2h-7.2v-7.2h7.2v7.2zm0-10.8h-7.2v-7.2h7.2v7.2zm0-10.9h-7.2V41h7.2v7.2zm0-10.9h-7.2v-7.2h7.2v7.2z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/xls.svg b/lib/images/fileicons/svg/xls.svg new file mode 100644 index 000000000..ddf80382f --- /dev/null +++ b/lib/images/fileicons/svg/xls.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#30723f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M41.8 48.5L23.9 27h18.5l7.8 11.9L59.8 27h18.5l-19 21.5L80.7 73H62.4L50.9 58 37.4 73H19.3l22.5-24.5z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/xlsx.svg b/lib/images/fileicons/svg/xlsx.svg new file mode 100644 index 000000000..ddf80382f --- /dev/null +++ b/lib/images/fileicons/svg/xlsx.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#30723f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M41.8 48.5L23.9 27h18.5l7.8 11.9L59.8 27h18.5l-19 21.5L80.7 73H62.4L50.9 58 37.4 73H19.3l22.5-24.5z"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/xml.svg b/lib/images/fileicons/svg/xml.svg new file mode 100644 index 000000000..6af9a7866 --- /dev/null +++ b/lib/images/fileicons/svg/xml.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#fff" d="M0 0h100v100H0z"/><path d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7" fill="#666"/><path d="M21.5 48.3l16.2-14v7.1l-11 9.2v.1l11 9.2V67L21.5 53v-4.7zm30.6-17.6h4.3L48 71.3h-4.2l8.3-40.6zM62.3 60l11-9.2v-.1l-11-9.2v-7.1l16.2 14v4.9l-16.2 14V60z" fill="#666" stroke="#666" stroke-width="2" stroke-miterlimit="10"/></svg>
\ No newline at end of file diff --git a/lib/images/fileicons/svg/zip.svg b/lib/images/fileicons/svg/zip.svg new file mode 100644 index 000000000..44e435e43 --- /dev/null +++ b/lib/images/fileicons/svg/zip.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><style>.st1{fill:#d8a13f}</style><path fill="#fff" d="M0 0h100v100H0z"/><path class="st1" d="M100 100H0V0h100v100zM9.7 90h80.7V10H9.7"/><path class="st1" d="M72.4 38.5h-7.9v-7.9l7.9 7.9zm-21.3-7.9v28.8h21.4v-19h-9.9v-9.9H51.1zm3.3-7.6H30.8v5.6h9.3l-5.9 4.5v4.8l8.6-6.6v-2.7h30.1v-2.3L54.4 23zM42.9 35.1l-8.6 6.6v4.8l8.6-6.6v-4.8zm-8.7 20l8.6-6.6v-4.8l-8.6 6.6v4.8zm8.7 2v-4.8l-8.6 6.6v2.6h-3.4v5.6h5.3v3.8H33c-.6-1-1.6-1.6-2.8-1.6-1.8 0-3.2 1.4-3.2 3.2s1.4 3.2 3.2 3.2c1.2 0 2.2-.6 2.8-1.6h3.1V77h4.8v-2.9H44c.6 1 1.6 1.6 2.8 1.6 1.8 0 3.2-1.4 3.2-3.2s-1.4-3.2-3.2-3.2c-1.2 0-2.2.6-2.8 1.6h-3.1v-3.8h13.5l18.5-3.3v-2.3H37.1l5.8-4.4z"/></svg>
\ No newline at end of file diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index 90759418f..76082c05d 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Sébastien Bauer <sebastien.bauer@advalvas.be> * @author Antoine Fixary <antoine.fixary@freesbee.fr> @@ -26,8 +27,8 @@ * @author Bruno Veilleux <bruno.vey@gmail.com> */ $lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)'; -$lang['acl_group'] = 'Groupe:'; -$lang['acl_user'] = 'Utilisateur:'; +$lang['acl_group'] = 'Groupe :'; +$lang['acl_user'] = 'Utilisateur :'; $lang['acl_perms'] = 'Autorisations pour'; $lang['page'] = 'Page'; $lang['namespace'] = 'Catégorie'; diff --git a/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php b/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php index 3b93de07c..d750f1088 100644 --- a/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php +++ b/lib/plugins/authad/adLDAP/classes/adLDAPUsers.php @@ -519,7 +519,7 @@ class adLDAPUsers { { $password="\"".$password."\""; $encoded=""; - for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password{$i}}\000"; } + for ($i=0; $i <strlen($password); $i++){ $encoded.="{$password[$i]}\000"; } return $encoded; } diff --git a/lib/plugins/authad/lang/de-informal/settings.php b/lib/plugins/authad/lang/de-informal/settings.php index 4daa81d6f..b73b66801 100644 --- a/lib/plugins/authad/lang/de-informal/settings.php +++ b/lib/plugins/authad/lang/de-informal/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> * @author Frank Loizzi <contact@software.bacal.de> * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Volker Bödker <volker@boedker.de> @@ -24,3 +25,4 @@ $lang['expirywarn'] = 'Tage im Voraus um Benutzer über ablaufende Pa $lang['additional'] = 'Eine Komma-separierte Liste von zusätzlichen AD-Attributen, die von den Benutzerobjekten abgefragt werden. Wird von einigen Plugins benutzt.'; $lang['update_name'] = 'Nutzern erlauben ihren AD Anzeigenamen zu aktualisieren?'; $lang['update_mail'] = 'Nutzern erlauben ihre E-Mail-Adresse zu aktualisieren?'; +$lang['recursive_groups'] = 'Auflösen verschachtelter Gruppen für ihre jeweiligen Mitglieder (langsamer).'; diff --git a/lib/plugins/authad/lang/sv/lang.php b/lib/plugins/authad/lang/sv/lang.php index 8c6397552..35b6d0646 100644 --- a/lib/plugins/authad/lang/sv/lang.php +++ b/lib/plugins/authad/lang/sv/lang.php @@ -4,7 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Tor Härnqvist <tor@harnqvist.se> - * @author Smorkster Andersson smorkster@gmail.com + * @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.'; diff --git a/lib/plugins/authad/lang/sv/settings.php b/lib/plugins/authad/lang/sv/settings.php index 249eb33ac..385964861 100644 --- a/lib/plugins/authad/lang/sv/settings.php +++ b/lib/plugins/authad/lang/sv/settings.php @@ -3,14 +3,18 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> - * @author Smorkster Andersson smorkster@gmail.com + * @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_username'] = 'Anpassad'; $lang['admin_password'] = 'Lösenord för användare ovan.'; $lang['sso'] = 'Ska Single-Sign-On via Kerberos eller NTLM användas?'; +$lang['sso_charset'] = 'Alla namespaces'; +$lang['real_primarygroup'] = 'Alla tider'; $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?'; @@ -18,3 +22,4 @@ $lang['expirywarn'] = 'Antakl dagar i förväg att varna användare o $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?'; +$lang['recursive_groups'] = 'Senaste veckan'; diff --git a/lib/plugins/authad/lang/tr/settings.php b/lib/plugins/authad/lang/tr/settings.php index 8dfc4622b..a07793ff2 100644 --- a/lib/plugins/authad/lang/tr/settings.php +++ b/lib/plugins/authad/lang/tr/settings.php @@ -3,10 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Eren <bosshyapma@protonmail.com> * @author Hakan <hakandursun2009@gmail.com> * @author mahir <mahirtakak@gmail.com> */ $lang['admin_password'] = 'Yukarıdaki kullanıcının ÅŸifresi.'; +$lang['use_ssl'] = 'SSL baÄŸlantısı kullan? EÄŸer kullanılırsa aÅŸağıdaki TLS\'i açma.'; +$lang['use_tls'] = 'TLS baÄŸlantısı kullan? EÄŸer kullanılırsa yukarıdaki SSL\'i açma.'; $lang['debug'] = 'Hatalarda ek hata ayıklama çıktısı gösterilsin mi?'; $lang['update_name'] = 'Kullanıcıların AD görünen adlarını güncellemelerine izin verilsin mi?'; $lang['update_mail'] = 'Kullanıcıların e-posta adresini güncellemelerine izin verilsin mi?'; diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php index 716b92ee6..48100013a 100644 --- a/lib/plugins/authldap/lang/de-informal/settings.php +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Volker Bödker <volker@boedker.de> * @author rnck <dokuwiki@rnck.de> @@ -20,6 +21,7 @@ $lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)? $lang['deref'] = 'Wie sollen Aliasse derefernziert werden?'; $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.'; $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; +$lang['attributes'] = 'Attribute, die mit der LDAP-Suche abgerufen werden sollen.'; $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.'; diff --git a/lib/plugins/authldap/lang/sv/settings.php b/lib/plugins/authldap/lang/sv/settings.php index 07fc57426..a7286f98d 100644 --- a/lib/plugins/authldap/lang/sv/settings.php +++ b/lib/plugins/authldap/lang/sv/settings.php @@ -3,10 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> - * @author Smorkster Andersson smorkster@gmail.com + * @author Smorkster Andersson <smorkster@gmail.com> */ -$lang['server'] = 'Din LDAO server. Antingen värdnamn (<code>localhost</code>) eller giltig full URL (<code>ldap://server.tld:389</code>)'; +$lang['server'] = 'Din LDAP 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'; $lang['usertree'] = 'Specificera var användarkonton finns. T.ex. <code>ou=Användare, dc=server, dc=tld</code>'; $lang['grouptree'] = 'Specificera var grupper finns. T.ex. <code>ou=Grupp, dc=server, dc=tld</code>'; @@ -14,10 +15,18 @@ $lang['userfilter'] = 'LDAP filter för att söka efter användarkont $lang['groupfilter'] = 'LDAP filter för att söka efter grupper. T.ex. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $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['referrals'] = 'Senaste mÃ¥naden'; +$lang['deref'] = 'Senaste Ã¥ret'; +$lang['binddn'] = 'Sortera efter träffar'; $lang['bindpw'] = 'Lösenord för användare ovan'; +$lang['attributes'] = 'Sortera efter senast modifierad'; $lang['userscope'] = 'Begränsa sökomfattning för användarsökning'; $lang['groupscope'] = 'Begränsa sökomfattning för gruppsökning'; +$lang['userkey'] = 'Lista av alla tillÃ¥tna extensions'; $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'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authldap/lang/tr/lang.php b/lib/plugins/authldap/lang/tr/lang.php new file mode 100644 index 000000000..09e37e3ec --- /dev/null +++ b/lib/plugins/authldap/lang/tr/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Eren <bosshyapma@protonmail.com> + */ +$lang['connectfail'] = 'LDAP baÄŸlanamadı: %s'; diff --git a/lib/plugins/authpdo/_test/mysql.test.php b/lib/plugins/authpdo/_test/mysql.test.php index 8cd14189b..35a76baf5 100644 --- a/lib/plugins/authpdo/_test/mysql.test.php +++ b/lib/plugins/authpdo/_test/mysql.test.php @@ -15,7 +15,7 @@ class mysql_plugin_authpdo_test extends DokuWikiTest { protected $pass = ''; protected $port = ''; - public function setUp() { + public function setUp() : void { parent::setUp(); $configuration = DOKU_UNITTEST . "{$this->driver}.conf.php"; if(!file_exists($configuration)) { @@ -34,7 +34,7 @@ class mysql_plugin_authpdo_test extends DokuWikiTest { * * it might still be there if something went wrong */ - public function tearDown() { + public function tearDown() : void { parent::tearDown(); $this->dropDatabase(); } diff --git a/lib/plugins/authpdo/_test/sqlite.test.php b/lib/plugins/authpdo/_test/sqlite.test.php index 89cc9f60d..58fcadcb8 100644 --- a/lib/plugins/authpdo/_test/sqlite.test.php +++ b/lib/plugins/authpdo/_test/sqlite.test.php @@ -36,7 +36,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $this->assertTrue(true); // avoid being marked as risky for having no assertion } - public function setUp() { + public function setUp() : void { parent::setUp(); $this->dbfile = tempnam('/tmp/', 'pluginpdo_test_'); copy(__DIR__ . '/test.sqlite3', $this->dbfile); @@ -85,7 +85,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $conf['plugin']['authpdo']['leave-group'] = 'DELETE FROM member WHERE uid = :uid AND gid = :gid'; } - public function tearDown() { + public function tearDown() : void { parent::tearDown(); unlink($this->dbfile); } diff --git a/lib/plugins/authpdo/lang/de-informal/settings.php b/lib/plugins/authpdo/lang/de-informal/settings.php new file mode 100644 index 000000000..c01398829 --- /dev/null +++ b/lib/plugins/authpdo/lang/de-informal/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author MaWi <drmaxxis@gmail.com> + */ +$lang['debug'] = 'Zeige detaillierte Fehlermeldungen. Diese sollten nach dem Setup deaktiviert werden.'; +$lang['dsn'] = 'Der DSN(Data Source Name) zur Verbindung mit der Datenbank'; +$lang['user'] = 'Der Benutzer für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['pass'] = 'Das Passwort für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['select-user'] = 'SQL Anweisung um einen einzelnen Benutzer abzufragen'; +$lang['select-user-groups'] = 'SQL Anweisung um alle Gruppen eines Benutzers abzufragen'; +$lang['select-groups'] = 'SQL Anweisung um alle verfügbaren Gruppen auszuwählen'; +$lang['insert-user'] = 'SQL Anweisung um einen neuen Benutzer in der Datenbank abzulegen'; +$lang['delete-user'] = 'SQL Anweisung um einen Benutzer aus der Datenbank zu entfernen'; +$lang['list-users'] = 'SQL Anweisung um eine Liste gefilterter Benutzer anzuzeigen'; +$lang['count-users'] = 'SQL Anweisung, welche die Anzahl der gefilterten Benutzer wiedergibt'; +$lang['update-user-info'] = 'SQL Anweisung um den vollen Namen sowie dessen E-Mail Adresse zu aktualisieren'; +$lang['update-user-login'] = 'SQL Anweisung um den Login-Namen eines Benutzers zu aktualisieren'; +$lang['update-user-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu aktualisieren'; +$lang['insert-group'] = 'SQL Anweisung um eine neue Gruppe in der Datenbank anzulegen'; +$lang['join-group'] = 'SQL Anweisung um einen Benutzer zu einer existierenden Gruppe hinzuzufügen'; +$lang['leave-group'] = 'SQL Anweisung um einen Benutzer aus einer Gruppe zu entfernen'; +$lang['check-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu überprüfen. Es kann leer gelassen werden wenn die Information über die Benutzerabfrage erhoben wurde.'; diff --git a/lib/plugins/authpdo/lang/sv/lang.php b/lib/plugins/authpdo/lang/sv/lang.php new file mode 100644 index 000000000..d8c017b2e --- /dev/null +++ b/lib/plugins/authpdo/lang/sv/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> + */ +$lang['connectfail'] = 'Misslyckades med att ansluta databas.'; +$lang['userexists'] = 'PHP mail() saknas eller är inaktiverad. Följande mejl skickades inte:'; +$lang['writefail'] = 'Wiki Markup'; diff --git a/lib/plugins/authpdo/lang/sv/settings.php b/lib/plugins/authpdo/lang/sv/settings.php new file mode 100644 index 000000000..56a904f9a --- /dev/null +++ b/lib/plugins/authpdo/lang/sv/settings.php @@ -0,0 +1,23 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> + */ +$lang['user'] = 'Användaren för databasen ovan (tom för sqlite)'; +$lang['pass'] = 'Lösenordet för databasen ovan (tom för sqlite)'; +$lang['select-user'] = 'SQL uttryck för att välja datan för en enda användare'; +$lang['select-user-groups'] = 'SQL uttryck för att välja alla grupper för en enda användare'; +$lang['select-groups'] = 'SQL uttryck för att välja alla tillgängliga grupper'; +$lang['insert-user'] = 'SQL uttryck för att lägga till en ny användare i databasen'; +$lang['delete-user'] = 'SQL uttryck för att ta bort en enda användare frÃ¥n databasen'; +$lang['list-users'] = 'SQL uttryck för att lista användare som matchar filtret'; +$lang['count-users'] = 'SQL uttryck för att räkna användare som matchar filtret'; +$lang['update-user-info'] = 'SQL uttryck för att uppdatera det fullständiga namnet och mejladressen för en användare'; +$lang['update-user-login'] = 'SQL uttryck för att uppdatera användarnamnet för en användare'; +$lang['update-user-pass'] = 'SQL uttryck för att uppdatera lösenordet för en användare'; +$lang['insert-group'] = 'SQL uttryck för att lägga till en ny grupp i databasen'; +$lang['join-group'] = 'SQL uttryck för att lägga till en användare i en existerande grupp'; +$lang['leave-group'] = 'SQL uttryck för att ta bort en användare frÃ¥n en grupp'; +$lang['check-pass'] = 'SQL uttryck för att kontrollera en användares lösenord. Kan lämnas tomt utifall informationen hämtas i "select-user".'; diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index be4d06b4e..58f1025d7 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -24,7 +24,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { $this->auth = new auth_plugin_authplainharness(); } - function setUp() { + function setUp() : void { global $config_cascade; parent::setUp(); $name = $config_cascade['plainauth.users']['default']; @@ -32,7 +32,7 @@ class helper_plugin_authplain_escaping_test extends DokuWikiTest { $this->reloadUsers(); } - function tearDown() { + function tearDown() : void { global $config_cascade; parent::tearDown(); $name = $config_cascade['plainauth.users']['default']; diff --git a/lib/plugins/authplain/_test/userdata.test.php b/lib/plugins/authplain/_test/userdata.test.php index b80b39349..9460c1919 100644 --- a/lib/plugins/authplain/_test/userdata.test.php +++ b/lib/plugins/authplain/_test/userdata.test.php @@ -16,7 +16,7 @@ class userdata_test extends DokuWikiTest * Load auth with test conf * @throws Exception */ - public function setUp() + public function setUp() : void { parent::setUp(); global $config_cascade; diff --git a/lib/plugins/authplain/lang/sv/lang.php b/lib/plugins/authplain/lang/sv/lang.php index 83c24d769..91b3df2d6 100644 --- a/lib/plugins/authplain/lang/sv/lang.php +++ b/lib/plugins/authplain/lang/sv/lang.php @@ -3,8 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @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'; +$lang['protected'] = 'Datan för användare %s är skyddad och kan inte modifieras eller raderas.'; diff --git a/lib/plugins/config/_test/Setting/AbstractSettingTest.php b/lib/plugins/config/_test/Setting/AbstractSettingTest.php index d18f0ec17..55e53c4fe 100644 --- a/lib/plugins/config/_test/Setting/AbstractSettingTest.php +++ b/lib/plugins/config/_test/Setting/AbstractSettingTest.php @@ -13,7 +13,7 @@ abstract class AbstractSettingTest extends \DokuWikiTest { * Sets up the proper class to test based on the test's class name * @throws \Exception */ - public function setUp() { + public function setUp() : void { parent::setUp(); $class = get_class($this); $class = substr($class, strrpos($class, '\\') + 1, -4); diff --git a/lib/plugins/config/core/Writer.php b/lib/plugins/config/core/Writer.php index 56de621d9..5c6c93cff 100644 --- a/lib/plugins/config/core/Writer.php +++ b/lib/plugins/config/core/Writer.php @@ -2,6 +2,7 @@ namespace dokuwiki\plugin\config\core; use dokuwiki\plugin\config\core\Setting\Setting; +use dokuwiki\Logger; /** * Writes the settings to the correct local file @@ -69,14 +70,18 @@ class Writer { } /** - * Invalidate the opcache of the given file + * Invalidate the opcache of the given file (if possible) * * @todo this should probably be moved to core * @param string $file */ protected function opcacheUpdate($file) { if(!function_exists('opcache_invalidate')) return; + set_error_handler(function ($errNo, $errMsg) { + Logger::debug('Unable to invalidate opcache: ' . $errMsg); } + ); opcache_invalidate($file); + restore_error_handler(); } /** @@ -105,7 +110,7 @@ class Writer { '/*', ' * ' . $this->header, ' * Auto-generated by config plugin', - ' * Run for user: ' . $_SERVER['REMOTE_USER'], + ' * Run for user: ' . (isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : 'Unknown'), ' * Date: ' . date('r'), ' */', '', diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php index 9efe23d8f..57c142a7b 100644 --- a/lib/plugins/config/lang/cs/lang.php +++ b/lib/plugins/config/lang/cs/lang.php @@ -140,6 +140,7 @@ $lang['mailfrom'] = 'E-mailová adresa, která se bude použÃvat p $lang['mailreturnpath'] = 'E-mailová adresa pÅ™Ãjemce pro oznámenà o nedoruÄenÃ'; $lang['mailprefix'] = 'PÅ™edpona pÅ™edmÄ›tu e-mailu, která se bude použÃvat pro automatické maily'; $lang['htmlmail'] = 'PosÃlat emaily v HTML (hezÄà ale vÄ›tÅ¡Ã). PÅ™i vypnutà budou posÃlány jen textové emaily.'; +$lang['dontlog'] = 'Zakázat protokolovánà pro tyto typy záznamů.'; $lang['sitemap'] = 'Generovat Google sitemap (interval ve dnech)'; $lang['rss_type'] = 'Typ XML kanálu'; $lang['rss_linkto'] = 'XML kanál odkazuje na'; diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index dec3641ec..6f70f6655 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> * @author Alexander Fischer <tbanus@os-forge.net> * @author Juergen Schwarzer <jschwarzer@freenet.de> * @author Marcel Metz <marcel_metz@gmx.de> @@ -40,6 +41,7 @@ $lang['_advanced'] = 'Erweitert'; $lang['_network'] = 'Netzwerk'; $lang['_msg_setting_undefined'] = 'Keine Konfigurationsmetadaten.'; $lang['_msg_setting_no_class'] = 'Keine Konfigurationsklasse.'; +$lang['_msg_setting_no_known_class'] = 'Setting-Klasse nicht verfügbar.'; $lang['_msg_setting_no_default'] = 'Kein Standardwert.'; $lang['title'] = 'Wiki Titel'; $lang['start'] = 'Name der Startseite'; @@ -122,13 +124,18 @@ $lang['mailfrom'] = 'Absenderadresse für automatisch erzeugte E-Ma $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['dontlog'] = 'Deaktivieren Sie die Protokollierung für diese Arten von Logs.'; $lang['sitemap'] = 'Erzeuge Google Sitemaps (Tage)'; $lang['rss_type'] = 'XML-Feed-Format'; $lang['rss_linkto'] = 'XML-Feed verlinken auf'; $lang['rss_content'] = 'Was soll in XML-Feedinhalten angezeigt werden?'; $lang['rss_update'] = 'Aktualisierungsintervall für XML-Feeds (Sekunden)'; $lang['rss_show_summary'] = 'Bearbeitungs-Zusammenfassung im XML-Feed anzeigen'; +$lang['rss_show_deleted'] = 'XML-Feed: Gelöschte Feeds 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'] = 'Benutze schöne URLs'; $lang['useslash'] = 'Benutze Schrägstrich als Namensraumtrenner in URLs'; @@ -146,6 +153,15 @@ $lang['xsendfile'] = 'Den X-Sendfile-Header nutzen, um Dateien direk $lang['renderer_xhtml'] = 'Standard-Renderer für die normale (XHTML) Wiki-Ausgabe.'; $lang['renderer__core'] = '%s (DokuWiki Kern)'; $lang['renderer__plugin'] = '%s (Erweiterung)'; +$lang['search_nslimit'] = 'Beschränke die Suche auf die jetzigen X Namensräume. Wenn eine Suche von einer Seite in einem tieferen Namensraum aus ausgeführt wird, werden die ersten X Namensräume als Filter hinzugefügt'; +$lang['search_fragment'] = 'Spezifiziere das vorgegebenen Fragment-Suchverhalten'; +$lang['search_fragment_o_exact'] = 'genaue Treffer'; +$lang['search_fragment_o_starts_with'] = 'beginnt mit'; +$lang['search_fragment_o_ends_with'] = 'endet mit'; +$lang['search_fragment_o_contains'] = 'enthält'; +$lang['trustedproxy'] = 'Vertraue Weiterleitungs-Proxys, welche dem regulärem Ausdruck entsprechen, hinsichtlich der angegebenen Client-ID. Der Standardwert entspricht dem lokalem Netzwerk. Leer lassen um jedem Proxy zu vertrauen.'; +$lang['_feature_flags'] = 'Feature-Flags'; +$lang['defer_js'] = 'JavaScript-Ausführung verzögern bis das HTML der gesamten Seite verarbeitet wurde. Erhöht die gefühlte Geschwindigkeit des Seitenaufbaus, kann aber mit einigen wenigen Plugins inkompatibel sein.'; $lang['dnslookups'] = 'DokuWiki löst die IP-Adressen von Benutzern zu deren Hostnamen auf. Wenn du einen langsamen, unbrauchbaren DNS-Server verwendest oder die Funktion nicht benötigst, dann sollte diese Option deaktivert sein.'; $lang['jquerycdn'] = 'Sollen die jQuery und jQuery UI Skriptdateien von einem CDN geladen werden? Das verursacht zusätzliche HTTP Anfragen, aber die Dateien werden möglicherweise schneller geladen und Nutzer haben sie vielleicht bereits im Cache.'; $lang['jquerycdn_o_0'] = 'Kein CDN, nur lokale Auslieferung'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index 1ecd9036a..548524c5d 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 Markus Glaser <glaser@hallowelt.com> * @author Axel Schwarzer <SchwarzerA@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> * @author Eric Haberstroh <ehaberstroh@gmail.com> @@ -138,6 +139,7 @@ $lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mail $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['dontlog'] = 'Protokollierung für diese Logtypen deaktivieren.'; $lang['sitemap'] = 'Google Sitemap erzeugen (Tage). Mit 0 deaktivieren.'; $lang['rss_type'] = 'XML-Feed-Format'; $lang['rss_linkto'] = 'XML-Feed verlinken auf'; diff --git a/lib/plugins/config/lang/es/lang.php b/lib/plugins/config/lang/es/lang.php index 332a20753..f40ed027e 100644 --- a/lib/plugins/config/lang/es/lang.php +++ b/lib/plugins/config/lang/es/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Luna Frax <lunafrax@gmail.com> * @author Domingo Redal <docxml@gmail.com> * @author Miguel Pagano <miguel.pagano@gmail.com> * @author Oscar M. Lage <r0sk10@gmail.com> @@ -134,6 +135,7 @@ $lang['mailfrom'] = 'Dirección de correo electrónico para emails $lang['mailreturnpath'] = 'Dirección de correo electrónico del destinatario para las notificaciones de no entrega'; $lang['mailprefix'] = 'Asunto por defecto que se utilizará en mails automáticos.'; $lang['htmlmail'] = 'Enviar correos electronicos en HTML con mejor aspecto pero mayor peso. Desactivar para enviar correos electronicos en texto plano.'; +$lang['dontlog'] = 'Deshabilitar inicio de sesión para este tipo de registros.'; $lang['sitemap'] = 'Generar sitemap de Google (dÃas)'; $lang['rss_type'] = 'Tipo de resumen (feed) XML'; $lang['rss_linkto'] = 'Feed XML enlaza a'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 9ee0881ab..814cdf5da 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -3,9 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Olivier Humbert <trebmuh@tuxfamily.org> + * @author Nicolas Friedli <nicolas@theologique.ch> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Pierre Henriot <pierre.henriot@gmail.com> - * @author Nicolas Friedli <nicolas@theologique.ch> * @author PaliPalo <palipalo@hotmail.fr> * @author Laurent Ponthieu <contact@coopindus.fr> * @author Damien Regad <dregad@mantisbt.org> @@ -30,7 +31,6 @@ * @author Floriang <antispam@floriang.eu> * @author Simon DELAGE <simon.geekitude@gmail.com> * @author Eric <ericstevenart@netc.fr> - * @author Olivier Humbert <trebmuh@tuxfamily.org> */ $lang['menu'] = 'Paramètres de configuration'; $lang['error'] = 'Paramètres non modifiés en raison d\'une valeur invalide, vérifiez vos réglages puis réessayez. <br />Les valeurs erronées sont entourées d\'une bordure rouge.'; diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 6829362d8..5148220ac 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Dario <darioriso@virgilio.it> * @author Filippo <abrickslife@gmail.com> * @author Roberto Bellingeri <bellingeri@netguru.it> * @author Eddy <eddy@mail.it> @@ -130,6 +131,7 @@ $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['dontlog'] = 'Disabilita la registrazione per questi tipi di log.'; $lang['sitemap'] = 'Genera una sitemap Google (giorni)'; $lang['rss_type'] = 'Tipo di feed XML'; $lang['rss_linkto'] = 'Collega i feed XML a'; @@ -164,7 +166,9 @@ $lang['search_fragment_o_exact'] = 'esatto'; $lang['search_fragment_o_starts_with'] = 'inizia con'; $lang['search_fragment_o_ends_with'] = 'finisce con'; $lang['search_fragment_o_contains'] = 'contiene'; +$lang['trustedproxy'] = 'Proxy di inoltro di fiducia che corrispondono a questa espressione regolare sul vero IP del client che riportano. L\'impostazione predefinita corrisponde alle reti locali. Lascia vuoto per non fidarti di nessun proxy.'; $lang['_feature_flags'] = 'Segnalazione di feature'; +$lang['defer_js'] = 'Rimanda l\'esecuzione di JavaScript dopo che l\'HTML della pagina è stato analizzato. Migliora la velocità della pagina percepita ma potrebbe interrompere un piccolo numero di plugin.'; $lang['dnslookups'] = 'Dokuwiki farà il lookup dei nomi host per ricavare l\'indirizzo IP remoto degli utenti che modificano le pagine. Se hai un DNS lento o non funzionante o se non vuoi questa funzione, disabilita l\'opzione'; $lang['jquerycdn'] = 'Vuoi che gli script jQuery e jQuery UI siano caricati da una CDN? Questo richiederà richieste HTTP aggiuntive ma i file potrebbero caricarsi più velocemente e gli utenti potrebbero averli già in cache.'; $lang['jquerycdn_o_0'] = 'Nessuna CDN, solo consegna locale'; diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php index c9bf0e4fc..3e11719b0 100644 --- a/lib/plugins/config/lang/pt/lang.php +++ b/lib/plugins/config/lang/pt/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Gustavo B. Schenkel <gustavo.schenkel@gmail.com> * @author Paulo <pschopf@gmail.com> * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> * @author Maykon Oliveira <maykonoliveira850@gmail.com> @@ -126,6 +127,7 @@ $lang['mailfrom'] = 'Endereço de e-mail a ser utilizado para mensa $lang['mailreturnpath'] = 'Endereço de e-mail do destinatário para notificações não entregues'; $lang['mailprefix'] = 'Prefixo de e-mail a ser utilizado para mensagens automáticas. Deixe em branco para usar o tÃtulo do wiki'; $lang['htmlmail'] = 'Envie e-mails multipartes em HTML para uma melhor aparência, mas maiores em tamanho. Desative para mensagens em texto simples.'; +$lang['dontlog'] = 'Desabilite a gravação de relatórios para estes tipos de relatórios.'; $lang['sitemap'] = 'Gerar sitemap Google frequentemente (dias). 0 para desativar'; $lang['rss_type'] = 'Tipo de feed XML'; $lang['rss_linkto'] = 'Links de feed XML para'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index 2164882dc..9183cbae5 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Nikita <obraztsov568@gmail.com> * @author Ðнатолий <anatol_m@mail.ru> * @author Yuriy Skalko <yuriy.skalko@gmail.com> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> @@ -132,6 +133,7 @@ $lang['mailfrom'] = 'Ðлектронный Ð°Ð´Ñ€ÐµÑ Ð²Ð¸ÐºÐ¸ (О $lang['mailreturnpath'] = 'ÐÐ´Ñ€ÐµÑ Ñлектронной почты Ð´Ð»Ñ Ð´Ð¾Ñтавки отчёта о недоÑтавленных ÑообщениÑÑ…'; $lang['mailprefix'] = 'ПрефикÑ, иÑпользуемый Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого пиÑьма, Ñтанет темой ÑообщениÑ. ОÑтавьте поле пуÑтым Ð´Ð»Ñ Ð¸ÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð²Ð¸ÐºÐ¸.'; $lang['htmlmail'] = 'ОтправлÑть краÑивые, но более крупные HTML-пиÑьма. Отключите Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ проÑтых текÑтовых пиÑем.'; +$lang['dontlog'] = 'Отключить ведение журнала Ð´Ð»Ñ Ñтих типов запиÑей.'; $lang['sitemap'] = 'ЧиÑло дней, через которое нужно Ñоздавать (обновлÑть) карту Ñайта Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñковиков (Гугл, Ð¯Ð½Ð´ÐµÐºÑ Ð¸ др.). Укажите 0 (ноль) Ð´Ð»Ñ Ð¾Ñ‚ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ.'; $lang['rss_type'] = 'Тип XML-ленты'; $lang['rss_linkto'] = 'СÑылки в XML-ленте указывают на'; diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php index 6631f109a..e247e70e9 100644 --- a/lib/plugins/config/lang/sv/lang.php +++ b/lib/plugins/config/lang/sv/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> @@ -47,6 +48,7 @@ $lang['title'] = 'Wikins namn'; $lang['start'] = 'Startsidans namn'; $lang['lang'] = 'SprÃ¥k'; $lang['template'] = 'Mall'; +$lang['sidebar'] = 'Sidofältets sidonamn (om mall stödjer det), tomt fällt deaktiverar sidofältet'; $lang['license'] = 'Under vilken licens skall ditt innehÃ¥ll publiceras?'; $lang['savedir'] = 'Katalog för att spara data'; $lang['basedir'] = 'Grundkatalog'; @@ -88,6 +90,7 @@ $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['disableactions_rss'] = 'XML Syndikation (RSS)'; $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.'; $lang['usewordblock'] = 'Blockera spam baserat pÃ¥ ordlista'; @@ -105,6 +108,7 @@ $lang['target____interwiki'] = 'MÃ¥lfönster för interwiki-länkar'; $lang['target____extern'] = 'MÃ¥lfönster för externa länkar'; $lang['target____media'] = 'MÃ¥lfönster för medialänkar'; $lang['target____windows'] = 'MÃ¥lfönster för windowslänkar'; +$lang['mediarevisions'] = 'Aktivera versionshantering för media?'; $lang['refcheck'] = 'Kontrollera referenser till mediafiler'; $lang['gdlib'] = 'Version av GD-biblioteket'; $lang['im_convert'] = 'Sökväg till ImageMagicks konverteringsverktyg'; @@ -114,14 +118,20 @@ $lang['subscribers'] = 'Aktivera stöd för prenumeration pÃ¥ ändring $lang['notify'] = 'Skicka meddelande om ändrade sidor till den här e-postadressen'; $lang['registernotify'] = 'Skicka meddelande om nyregistrerade användare till en här e-postadressen'; $lang['mailfrom'] = 'Avsändaradress i automatiska e-postmeddelanden'; +$lang['mailreturnpath'] = 'Mottagarens mejladress för inga leveransnotifikationer'; $lang['mailprefix'] = 'Prefix i början pÃ¥ ämnesraden vid automatiska e-postmeddelanden'; +$lang['dontlog'] = 'Avaktivera loggning för dessa typer av loggar'; $lang['sitemap'] = 'Skapa Google sitemap (dagar)'; $lang['rss_type'] = 'Typ av XML-flöde'; $lang['rss_linkto'] = 'XML-flöde pekar pÃ¥'; $lang['rss_content'] = 'Vad ska visas för saker i XML-flödet?'; $lang['rss_update'] = 'Uppdateringsintervall för XML-flöde (sek)'; $lang['rss_show_summary'] = 'XML-flöde visar sammanfattning i rubriken'; +$lang['rss_show_deleted'] = 'XML flöde Visa raderade flöden'; $lang['rss_media'] = 'Vilka ändringar ska listas i XML flödet?'; +$lang['rss_media_o_both'] = 'bÃ¥da'; +$lang['rss_media_o_pages'] = 'sidor'; +$lang['rss_media_o_media'] = 'media'; $lang['updatecheck'] = 'Kontrollera uppdateringar och säkerhetsvarningar? DokuWiki behöver kontakta update.dokuwiki.org för den här funktionen.'; $lang['userewrite'] = 'Använd rena webbadresser'; $lang['useslash'] = 'Använd snedstreck för att separera namnrymder i webbadresser'; @@ -138,6 +148,11 @@ $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['search_fragment_o_exact'] = 'exakt'; +$lang['search_fragment_o_starts_with'] = 'börjar med'; +$lang['search_fragment_o_ends_with'] = 'slutar med'; +$lang['search_fragment_o_contains'] = 'innehÃ¥ller'; +$lang['jquerycdn_o_0'] = 'Ingen CDN, enbart lokal leverans'; $lang['jquerycdn_o_jquery'] = 'CDN pÃ¥ code.jquery.com'; $lang['jquerycdn_o_cdnjs'] = 'CDN pÃ¥ cdnjs.com'; $lang['proxy____host'] = 'Proxyserver'; diff --git a/lib/plugins/config/lang/tr/lang.php b/lib/plugins/config/lang/tr/lang.php index d86455d1f..54e00efbc 100644 --- a/lib/plugins/config/lang/tr/lang.php +++ b/lib/plugins/config/lang/tr/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Eren <bosshyapma@protonmail.com> * @author Hakan <hakandursun2009@gmail.com> * @author mahir <mahirtakak@gmail.com> * @author Aydın CoÅŸkuner <aydinweb@gmail.com> diff --git a/lib/plugins/config/lang/vi/lang.php b/lib/plugins/config/lang/vi/lang.php index c5283607e..b00e213d3 100644 --- a/lib/plugins/config/lang/vi/lang.php +++ b/lib/plugins/config/lang/vi/lang.php @@ -114,6 +114,7 @@ $lang['mailfrom'] = 'Äia chỉ thư Ä‘iện tá» ngưá»i gá»i sá $lang['mailreturnpath'] = 'Äịa chỉ thư Ä‘iện tá» ngưá»i nháºn cho thông báo không cung cấp'; $lang['mailprefix'] = 'Tiá»n tố chá»§ đỠthư Ä‘iện tá» sá» dụng cho thư tá»± động. Äể trống nếu muốn sá» dụng tiêu đỠwiki'; $lang['htmlmail'] = 'Gá»i tìm kiếm tốt hÆ¡n, nhưng kÃch thước lá»›n hÆ¡n thư Ä‘iện tá» HTML nhiá»u phần. Vô hiệu hóa cho thư chỉ có văn bản đơn thuần .'; +$lang['dontlog'] = 'Vô hiệu hóa ghi nháºt ký đối vá»›i các loại nháºt ký nà y.'; $lang['sitemap'] = 'Tạo sÆ¡ đồ trang web cá»§a Google (sitemap) thưá»ng xuyên (tÃnh theo ngà y). Äặt thà nh 0 để vô hiệu hóa'; $lang['rss_type'] = 'Loại nguồn cấp dữ liệu XML'; $lang['rss_linkto'] = 'Liên kết đến nguồn cấp dữ liệu XML '; @@ -135,7 +136,7 @@ $lang['autoplural'] = 'Kiểm tra các hình thức số nhiá»u tron $lang['compression'] = 'Phương pháp nén cho các táºp tin attic '; $lang['gzip_output'] = 'Sá» dụng mã hóa ná»™i dung gzip cho xhtml'; $lang['compress'] = 'Äầu ra CSS và javascript nhá» gá»n'; -$lang['cssdatauri'] = 'KÃch thước tÃnh theo byte mà hình ảnh được tham chiếu trong táºp tin CSS nên được nhúng ngay và o bảng định kiểu để giảm yêu cầu đầu đỠHTTP phÃa trước. <code>400</code> đến <code>600</code> bytes là các giá trị tốt. Äặt thà nh <code>0</code> để vô hiệu.'; +$lang['cssdatauri'] = 'KÃch thước tÃnh theo byte mà hình ảnh được tham chiếu trong táºp tin CSS nên được nhúng ngay và o bảng định kiểu để giảm yêu cầu đầu đỠHTTP phÃa trước. <code>400</code> đến <code>600</code> bytes là các giá trị tốt. Äặt thà nh <code>0</code> để vô hiệu hóa.'; $lang['send404'] = 'Gá»i "HTTP 404/Không tìm thấy trang" cho những trang không tồn tại'; $lang['broken_iua'] = 'Chức năng ign_user_abort có bị há»ng trên hệ thống cá»§a bạn không? Äiá»u nà y có thể khiến chỉ mục tìm kiếm không hoạt động. IIS + PHP/CGI được biết sẽ bị há»ng. Xem <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">Bug 852</a> để biết thêm thông tin.'; $lang['xsendfile'] = 'Sá» dụng đầu đỠX-Sendfile cho phép máy chá»§ web cung cấp các táºp tin tÄ©nh? Máy chá»§ web cá»§a bạn cần há»— trợ cái nà y.'; diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index ea59eefb4..8231c4d7b 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Lakejason0 <lakesarchive@outlook.com> * @author Phy <dokuwiki@phy25.com> * @author Jenxi <seow@jenxi.com> * @author FENG.JIE <ahx@qq.com> @@ -138,6 +139,7 @@ $lang['mailfrom'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€'; $lang['mailreturnpath'] = 'éžæŠ•é€’é€šçŸ¥çš„æ”¶ä»¶äººé‚®ç®±åœ°å€'; $lang['mailprefix'] = '自动å‘é€é‚®ä»¶æ—¶ä½¿ç”¨çš„邮件地å€å‰ç¼€'; $lang['htmlmail'] = 'å‘逿›´åŠ ç¾Žè§‚ï¼Œä½†ä½“ç§¯æ›´å¤§çš„ HTML 多部分邮件。ç¦ç”¨åˆ™å‘é€çº¯æ–‡æœ¬é‚®ä»¶ã€‚'; +$lang['dontlog'] = '为这些ç§ç±»çš„æ—¥å¿—ç¦ç”¨æ—¥å¿—记录。'; $lang['sitemap'] = 'ç”Ÿæˆ Google sitemap(天)'; $lang['rss_type'] = 'XML feed 类型'; $lang['rss_linkto'] = 'XML feed 链接到'; diff --git a/lib/plugins/extension/lang/de-informal/lang.php b/lib/plugins/extension/lang/de-informal/lang.php index 10401061e..4164e25bb 100644 --- a/lib/plugins/extension/lang/de-informal/lang.php +++ b/lib/plugins/extension/lang/de-informal/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> * @author Felix <j.felix@mueller-donath.de> */ $lang['menu'] = 'Erweiterungen verwalten'; @@ -72,6 +73,7 @@ $lang['msg_template_update_success'] = 'Das Update des Templates %s war erfolgre $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['msg_nooverwrite'] = 'Die Erweiterung %s ist bereits vorhanden, sodass sie nicht überschrieben wird. Zum Überschreiben aktiviere die Option "Überschreiben".'; $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'; diff --git a/lib/plugins/extension/lang/pt/lang.php b/lib/plugins/extension/lang/pt/lang.php index 813cae23a..aa93549a3 100644 --- a/lib/plugins/extension/lang/pt/lang.php +++ b/lib/plugins/extension/lang/pt/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Gustavo B. Schenkel <gustavo.schenkel@gmail.com> * @author Paulo <pschopf@gmail.com> * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> * @author Maykon Oliveira <maykonoliveira850@gmail.com> diff --git a/lib/plugins/extension/lang/sv/lang.php b/lib/plugins/extension/lang/sv/lang.php index 92d21f25a..87bebadf2 100644 --- a/lib/plugins/extension/lang/sv/lang.php +++ b/lib/plugins/extension/lang/sv/lang.php @@ -3,12 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> */ +$lang['menu'] = 'Tilläggshanterare'; +$lang['tab_plugins'] = 'Installerade plugins'; $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['notinstalled'] = 'Tillägget är inte installerat'; +$lang['alreadyenabled'] = 'Tillägget har redan aktiverats'; +$lang['alreadydisabled'] = 'Tillägget har redan avaktiverats'; +$lang['pluginlistsaveerror'] = 'Det fanns ett error när plugin listan skulle sparas'; $lang['unknownauthor'] = 'Okänd skapare'; $lang['unknownversion'] = 'Okänd version'; $lang['btn_info'] = 'Visa mer info'; @@ -23,14 +30,18 @@ $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_for'] = 'Sök Tillägg'; $lang['search'] = 'Sök'; +$lang['extensionby'] = '<strong>%s</strong> av %s'; $lang['screenshot'] = 'Skärmdump av %s'; $lang['popularity'] = 'Populatitet: %s%%'; $lang['homepage_link'] = 'Dokumentation'; $lang['bugs_features'] = 'Buggar'; $lang['tags'] = 'Taggar:'; +$lang['author_hint'] = 'Sök tillägg baserat pÃ¥ användare'; $lang['installed'] = 'Installerat:'; $lang['downloadurl'] = 'Nedladdningslänk:'; +$lang['repository'] = 'Förvar:'; $lang['unknown'] = '<em>okänd</em>'; $lang['installed_version'] = 'Installerad version:'; $lang['install_date'] = 'Din senaste uppdatering:'; @@ -42,6 +53,7 @@ $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['provides'] = 'TillhandahÃ¥ller:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'installerad'; $lang['status_not_installed'] = 'inte installerad'; @@ -49,19 +61,34 @@ $lang['status_protected'] = 'skyddad'; $lang['status_enabled'] = 'aktiverad'; $lang['status_disabled'] = 'avaktiverad'; $lang['status_unmodifiable'] = 'ej modifierbar'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'mall'; +$lang['status_bundled'] = 'sammanslagna'; $lang['msg_enabled'] = 'Tillägg %s aktiverat'; $lang['msg_disabled'] = 'Tillägg %s avaktiverat'; +$lang['msg_delete_success'] = 'Tillägg %s avinstallerat'; +$lang['msg_delete_failed'] = 'Avinstallerar Tillägg %s misslyckades'; $lang['msg_template_install_success'] = 'Templat %s installerades framgÃ¥ngsrikt'; $lang['msg_template_update_success'] = 'Templat %s uppdaterades framgÃ¥ngsrikt'; +$lang['msg_plugin_install_success'] = 'Installation av Plugin %s lyckades'; +$lang['msg_plugin_update_success'] = 'Uppdatering av Plugin %s lyckades'; $lang['msg_upload_failed'] = 'Uppladdning av filen misslyckades'; +$lang['msg_nooverwrite'] = 'Tillägg %s existerar redan, sÃ¥ det blir inte överskrivet; för att skriva över, välj "skriv över" alternativet'; +$lang['missing_dependency'] = '<strong>Saknar eller avaktiverat beroende:</strong> %s'; +$lang['security_issue'] = '<strong>Säkerhetsproblem:</strong> %s'; $lang['security_warning'] = '<strong>Säkerhetsvarning:</strong> %s'; $lang['update_available'] = '<strong>Uppdatering:</strong> Ny version av %s är tillgänglig.'; +$lang['wrong_folder'] = '<strong>Plugin installerades inkorrekt:</strong> Döp om plugin mapp "%s" till "%s".'; $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['error_findfolder'] = 'Kan inte identifiera tilläggsmapp, du mÃ¥ste ladda ner och installera manuellt'; +$lang['noperms'] = 'Tilläggsmapp är inte skrivbar'; $lang['notplperms'] = 'Templatkatalogen är inte skrivbar'; $lang['nopluginperms'] = 'Tilläggskatalogen är inte skrivbar'; +$lang['git'] = 'Tillägget installerades via git, du kanske vill uppdatera det här.'; +$lang['auth'] = 'Det här "auth" pluginet är inte aktiverat i konfigurationen, överväg att avaktivera det.'; $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/vi/lang.php b/lib/plugins/extension/lang/vi/lang.php index a61f90def..d8fdcc929 100644 --- a/lib/plugins/extension/lang/vi/lang.php +++ b/lib/plugins/extension/lang/vi/lang.php @@ -73,7 +73,7 @@ $lang['msg_plugin_install_success'] = 'Cà i đặt thà nh công plugin %s'; $lang['msg_plugin_update_success'] = 'Cáºp nháºt thà nh công plugin %s'; $lang['msg_upload_failed'] = 'Tải táºp tin không thà nh công'; $lang['msg_nooverwrite'] = 'Phần mở rá»™ng %s đã tồn tại để không bị ghi đè; để ghi đè, đánh dấu tùy chá»n ghi đè'; -$lang['missing_dependency'] = '<strong>Thiếu hoặc đã vô hiệu phần hóa phụ thuá»™c:</strong> %s'; +$lang['missing_dependency'] = '<strong>Thiếu hoặc đã vô hiệu hóa phần phụ thuá»™c:</strong> %s'; $lang['security_issue'] = '<strong>Vấn đỠbảo máºt:</strong> %s'; $lang['security_warning'] = '<strong>Cảnh báo bảo máºt:</strong> %s'; $lang['update_available'] = '<strong>Cáºp nháºt:</strong> Phiên bản má»›i %s hiện có sẵn.'; diff --git a/lib/plugins/logviewer/lang/en/intro.txt b/lib/plugins/logviewer/lang/en/intro.txt index 5b63b148a..b83448cfe 100644 --- a/lib/plugins/logviewer/lang/en/intro.txt +++ b/lib/plugins/logviewer/lang/en/intro.txt @@ -1,8 +1,8 @@ ====== View Logs ====== -This interface allows you to view the various logs that are written by DokuWiki. By default, there shouldn't be logged -much here (it depends on your [[doku>config:dontlog|log settings]]). However if something goes wrong, chances are high, -you'll find useful info here. All times are UTC! +This interface allows you to view the various logs that are written by DokuWiki. By default, there shouldn't be much +here (it depends on your [[doku>config:dontlog|log settings]]). However if something goes wrong, chances are high +you'll find useful information about the problem. All times are UTC! -Please be aware **log files can contain sensitive information** like passwords, paths or other secrets. +Please be aware that **log files can contain sensitive information** like passwords, paths or other secrets. Be sure to redact the logs appropriately when posting them on the forum or in bug reports! diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 4537976ae..c2904ee17 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -13,7 +13,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin /** * The url where the data should be sent */ - public $submitUrl = 'http://update.dokuwiki.org/popularity.php'; + public $submitUrl = 'https://update.dokuwiki.org/popularity.php'; /** * Name of the file which determine if the the autosubmit is enabled, diff --git a/lib/plugins/revert/lang/sv/lang.php b/lib/plugins/revert/lang/sv/lang.php index 7cff7ffd9..4eb0e0c7d 100644 --- a/lib/plugins/revert/lang/sv/lang.php +++ b/lib/plugins/revert/lang/sv/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> diff --git a/lib/plugins/styling/lang/sv/lang.php b/lib/plugins/styling/lang/sv/lang.php index 00a8518b2..f2a8213da 100644 --- a/lib/plugins/styling/lang/sv/lang.php +++ b/lib/plugins/styling/lang/sv/lang.php @@ -3,8 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> */ +$lang['menu'] = 'Mall stil inställningar'; +$lang['js']['loader'] = 'Förhandsvisning laddas...<br />dina värden kan vara felaktiva om inte detta försvinner'; +$lang['js']['popup'] = 'Öppna som popup'; +$lang['error'] = 'FörlÃ¥t, denna mall stödjer inte denna funktionalitet.'; $lang['btn_preview'] = 'Förhandsvisa ändringar'; $lang['btn_save'] = 'Spara ändringar'; $lang['btn_reset'] = 'Nollställ aktuella ändringar'; diff --git a/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php index 5982c6933..f8054755c 100644 --- a/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php +++ b/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php @@ -5,7 +5,7 @@ */ class TestingDummyPluginIntegrationTest extends DokuWikiTest { - function setUp() { + function setUp() : void { $this->pluginsEnabled = array( 'testing' ); diff --git a/lib/plugins/usermanager/_test/csv_export.test.php b/lib/plugins/usermanager/_test/csv_export.test.php index 667fc71dc..96f9eb28c 100644 --- a/lib/plugins/usermanager/_test/csv_export.test.php +++ b/lib/plugins/usermanager/_test/csv_export.test.php @@ -12,7 +12,7 @@ class plugin_usermanager_csv_export_test extends DokuWikiTest { protected $usermanager; - function setUp() { + function setUp() : void { $this->usermanager = new admin_mock_usermanager(); parent::setUp(); } diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 13034a012..9cf23eb8d 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -20,7 +20,7 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest protected $usermanager; protected $importfile; - public function setUp() + public function setUp() : void { $this->importfile = tempnam(TMP_DIR, 'csv'); @@ -39,7 +39,7 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest parent::setUp(); } - public function tearDown() + public function tearDown() : void { $_FILES = $this->old_files; parent::tearDown(); diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php index 0d535219c..c9452c7e3 100644 --- a/lib/plugins/usermanager/lang/pt/lang.php +++ b/lib/plugins/usermanager/lang/pt/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Gustavo B. Schenkel <gustavo.schenkel@gmail.com> * @author Paulo <pschopf@gmail.com> * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> * @author Maykon Oliveira <maykonoliveira850@gmail.com> diff --git a/lib/plugins/usermanager/lang/sv/lang.php b/lib/plugins/usermanager/lang/sv/lang.php index f8ff9108b..c20215063 100644 --- a/lib/plugins/usermanager/lang/sv/lang.php +++ b/lib/plugins/usermanager/lang/sv/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> * @author Per Foreby <per@foreby.se> * @author Nicklas Henriksson <nicklas[at]nihe.se> @@ -38,6 +39,7 @@ $lang['filter'] = 'Filter'; $lang['export_all'] = 'Exportera alla användare (CSV)'; $lang['export_filtered'] = 'Exportera filtrerade användarlistningen (CSV)'; $lang['import'] = 'Importera nya användare'; +$lang['line'] = 'Radnummer.'; $lang['error'] = 'Error-meddelande'; $lang['summary'] = 'Visar användare %1$d-%2$d av %3$d funna. %4$d användare totalt.'; $lang['nonefound'] = 'Inga användare hittades. %d användare totalt.'; @@ -68,6 +70,12 @@ $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['import_downloadfailures'] = 'Ladda ner misslyckanden som CSV för korrigering'; +$lang['addUser_error_missing_pass'] = 'Vänligen skapa ett lösenord eller aktivera användarnotifikationer för att aktivera lösenordsgenerering.'; $lang['addUser_error_pass_not_identical'] = 'De angivna lösenorden var inte identiska.'; +$lang['addUser_error_modPass_disabled'] = 'Ändring av lösenord är för tillfället avaktiverat'; $lang['addUser_error_name_missing'] = 'Var god fyll i namn pÃ¥ den nya användaren.'; +$lang['addUser_error_modName_disabled'] = 'Ändring av namn är för tillfället avaktiverat'; $lang['addUser_error_mail_missing'] = 'Var god fyll i e-postadress för den nya användaren.'; +$lang['addUser_error_modMail_disabled'] = 'Ändring av mejladresser är för tillfället avaktiverat'; +$lang['addUser_error_create_event_failed'] = 'Ett plugin förhindrade att den nya användaren lades till. Granska andra möjliga meddelanden för mer information.'; diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 70b60ef9a..cd2ace459 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -56,6 +56,7 @@ var dw_behaviour = { dw_behaviour.checkWindowsShares(); dw_behaviour.subscription(); dw_behaviour.pageRestoreConfirm(); + dw_behaviour.securityCheck(); dw_behaviour.revisionBoxHandler(); jQuery(document).on('click','#page__revisions input[type=checkbox]', @@ -204,6 +205,36 @@ var dw_behaviour = { } }); } + }, + + /** + * Check that access to the data directory is properly secured + * + * A successful check (a 403 error was returned when loading the image) is saved + * to session storage and not repeated again until the next browser session. This + * avoids overeager security bans (see #3363) + */ + securityCheck: function () { + var $checkDiv = jQuery('#security__check'); + if (!$checkDiv.length) return; + if (sessionStorage.getItem('dw-security-check:' + DOKU_BASE)) { + // check was already executed successfully + $checkDiv.remove(); + return; + } + + var img = new Image(); + img.onerror = function () { + // successful check will not be repeated during session + $checkDiv.remove(); + sessionStorage.setItem('dw-security-check:' + DOKU_BASE, true); + }; + img.onload = function () { + // check failed, display a warning message + $checkDiv.html(LANG.data_insecure); + $checkDiv.addClass('error'); + }; + img.src = $checkDiv.data('src') + '?t=' + Date.now(); } }; diff --git a/lib/tpl/dokuwiki/css/_admin.less b/lib/tpl/dokuwiki/css/_admin.less index 38ca4bc63..115861203 100644 --- a/lib/tpl/dokuwiki/css/_admin.less +++ b/lib/tpl/dokuwiki/css/_admin.less @@ -61,4 +61,13 @@ clear: right; float: left; } + + /* data directory security check */ + #security__check { + float: right; + max-width: 20em; + } + [dir=rtl] & #admin__version { + float: left; + } } diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less index abb330a15..be498f6c6 100644 --- a/lib/tpl/dokuwiki/css/basic.less +++ b/lib/tpl/dokuwiki/css/basic.less @@ -234,6 +234,9 @@ audio { button img { max-width: none; } +table img { + max-width: 50vw; +} hr { border-top: solid @ini_border; @@ -248,6 +251,7 @@ acronym, abbr { cursor: help; border-bottom: 1px dotted; + text-decoration: none; font-style: normal; } em acronym, diff --git a/lib/tpl/dokuwiki/css/content.less b/lib/tpl/dokuwiki/css/content.less index 33329867c..9b26cce7a 100644 --- a/lib/tpl/dokuwiki/css/content.less +++ b/lib/tpl/dokuwiki/css/content.less @@ -297,6 +297,16 @@ border-right: 1px solid @ini_border; } +.dokuwiki.export #dw__toc { + margin-top: 0; + margin-right: 0; +} + +[dir=rtl] .dokuwiki.export #dw__toc { + margin-top: 0; + margin-left: 0; +} + .dokuwiki h3.toggle { padding: .5em 1em; margin-bottom: 0; diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index 86315d211..fec9d6a84 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -7,6 +7,10 @@ * @author Clarence Lee <clarencedglee@gmail.com> */ +.dokuwiki.export { + background-color: @ini_background; +} + /* header ********************************************************************/ @@ -22,10 +26,11 @@ margin-top: .2em; } - h1 { + .logo { margin: 0; font-size: 1.5em; font-weight: normal; + line-height: 1.2; img { float: left; @@ -56,7 +61,7 @@ } } -[dir=rtl] #dokuwiki__header h1 img { +[dir=rtl] #dokuwiki__header .logo img { float: right; margin-left: .5em; margin-right: 0; @@ -298,6 +303,7 @@ form.search { .dokuwiki .docInfo { font-size: 0.875em; text-align: right; + overflow-wrap: break-word; } /* license note under edit window */ diff --git a/lib/tpl/dokuwiki/css/print.css b/lib/tpl/dokuwiki/css/print.css index 7197ac1c1..cea1becaa 100644 --- a/lib/tpl/dokuwiki/css/print.css +++ b/lib/tpl/dokuwiki/css/print.css @@ -141,18 +141,19 @@ th { #dokuwiki__header { border-bottom: 2pt solid #ccc; } -#dokuwiki__header h1 { +#dokuwiki__header .logo { font-size: 1.5em; + font-weight: bold; } -#dokuwiki__header h1 a { +#dokuwiki__header .logo a { text-decoration: none; border-width: 0; } -#dokuwiki__header h1 img { +#dokuwiki__header .logo img { float: left; margin-right: .5em; } -[dir=rtl] #dokuwiki__header h1 img { +[dir=rtl] #dokuwiki__header .logo img { float: right; margin-right: 0; margin-left: .5em; diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index 8e65410d7..ec6eabb60 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -34,7 +34,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <div class="wrapper group" id="dokuwiki__detail"> <!-- ********** CONTENT ********** --> - <div id="dokuwiki__content"><div class="pad group"> + <main id="dokuwiki__content"><div class="pad group"> <?php html_msgarea() ?> <?php if(!$ERROR): ?> @@ -82,20 +82,20 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <div class="docInfo"><?php tpl_pageinfo(); ?></div> */ ?> - </div></div><!-- /content --> + </div></main><!-- /content --> <hr class="a11y" /> <!-- PAGE ACTIONS --> <?php if (!$ERROR): ?> - <div id="dokuwiki__pagetools"> - <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3> + <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading"> + <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3> <div class="tools"> <ul> <?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?> </ul> </div> - </div> + </nav> <?php endif; ?> </div><!-- /wrapper --> diff --git a/lib/tpl/dokuwiki/lang/de-informal/lang.php b/lib/tpl/dokuwiki/lang/de-informal/lang.php index d8c35833a..7ac48b2f0 100644 --- a/lib/tpl/dokuwiki/lang/de-informal/lang.php +++ b/lib/tpl/dokuwiki/lang/de-informal/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author MaWi <drmaxxis@gmail.com> * @author F. Mueller-Donath <j.felix@mueller-donath.de> */ $lang['__background_site__'] = 'Farbe für den Seitenhintergrund (hinter dem Inhaltsbereich)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'Breite der ganzen Seite (kann eine beliebige L $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'; +$lang['__theme_color__'] = 'Farbschema der Webapplikation'; diff --git a/lib/tpl/dokuwiki/lang/sv/lang.php b/lib/tpl/dokuwiki/lang/sv/lang.php index 6fdf4238b..045c329c2 100644 --- a/lib/tpl/dokuwiki/lang/sv/lang.php +++ b/lib/tpl/dokuwiki/lang/sv/lang.php @@ -3,10 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Patrik K Lundberg <patrik.kotiranta.lundberg@gmail.com> * @author Tor Härnqvist <tor@harnqvist.se> */ +$lang['__background_site__'] = 'Färg för bakgrunden (bakom innehÃ¥llsytan)'; $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, ...)'; +$lang['__tablet_width__'] = 'Under skärmstorlekar av denna bredd gÃ¥r sidan över till tablet-läge'; +$lang['__phone_width__'] = 'Under skärmstorlekar av denna bredd gÃ¥r sidan över till mobilläge'; +$lang['__theme_color__'] = 'Färgen pÃ¥ web-appen'; diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 67b6e61de..014a35c0e 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -34,7 +34,8 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <?php if($showSidebar): ?> <!-- ********** ASIDE ********** --> - <div id="dokuwiki__aside"><div class="pad aside include group"> + <nav id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar'] + ?>"><div class="pad aside include group"> <h3 class="toggle"><?php echo $lang['sidebar'] ?></h3> <div class="content"><div class="group"> <?php tpl_flush() ?> @@ -42,11 +43,11 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <?php tpl_include_page($conf['sidebar'], true, true) ?> <?php tpl_includeFile('sidebarfooter.html') ?> </div></div> - </div></div><!-- /aside --> + </div></nav><!-- /aside --> <?php endif; ?> <!-- ********** CONTENT ********** --> - <div id="dokuwiki__content"><div class="pad group"> + <main id="dokuwiki__content"><div class="pad group"> <?php html_msgarea() ?> <div class="pageId"><span><?php echo hsc($ID) ?></span></div> @@ -63,19 +64,19 @@ $showSidebar = $hasSidebar && ($ACT=='show'); <div class="docInfo"><?php tpl_pageinfo() ?></div> <?php tpl_flush() ?> - </div></div><!-- /content --> - <hr class="a11y" /> + <hr class="a11y" /> + </div></main><!-- /content --> <!-- PAGE ACTIONS --> - <div id="dokuwiki__pagetools"> - <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3> + <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading"> + <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3> <div class="tools"> <ul> <?php echo (new \dokuwiki\Menu\PageMenu())->getListItems(); ?> </ul> </div> - </div> + </nav> </div><!-- /wrapper --> <?php include('tpl_footer.php') ?> diff --git a/lib/tpl/dokuwiki/mediamanager.php b/lib/tpl/dokuwiki/mediamanager.php index 53ed06292..c39b81f37 100644 --- a/lib/tpl/dokuwiki/mediamanager.php +++ b/lib/tpl/dokuwiki/mediamanager.php @@ -27,18 +27,18 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <body> <div id="media__manager" class="dokuwiki"> <?php html_msgarea() ?> - <div id="mediamgr__aside"><div class="pad"> + <nav id="mediamgr__aside"><div class="pad"> <h1><?php echo hsc($lang['mediaselect'])?></h1> <?php /* keep the id! additional elements are inserted via JS here */?> <div id="media__opts"></div> <?php tpl_mediaTree() ?> - </div></div> + </div></nav> - <div id="mediamgr__content"><div class="pad"> + <main id="mediamgr__content"><div class="pad"> <?php tpl_mediaContent() ?> - </div></div> + </div></main> </div> </body> </html> diff --git a/lib/tpl/dokuwiki/tpl_footer.php b/lib/tpl/dokuwiki/tpl_footer.php index c7a04e155..0750c7b58 100644 --- a/lib/tpl/dokuwiki/tpl_footer.php +++ b/lib/tpl/dokuwiki/tpl_footer.php @@ -8,7 +8,7 @@ if (!defined('DOKU_INC')) die(); ?> <!-- ********** FOOTER ********** --> -<div id="dokuwiki__footer"><div class="pad"> +<footer id="dokuwiki__footer"><div class="pad"> <?php tpl_license(''); // license text ?> <div class="buttons"> @@ -28,7 +28,6 @@ if (!defined('DOKU_INC')) die(); src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a> </div> -</div></div><!-- /footer --> -<?php -tpl_includeFile('footer.html'); + <?php tpl_includeFile('footer.html'); ?> +</div></footer><!-- /footer --> diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php index bb8732bdc..b314b27ea 100644 --- a/lib/tpl/dokuwiki/tpl_header.php +++ b/lib/tpl/dokuwiki/tpl_header.php @@ -8,7 +8,7 @@ if (!defined('DOKU_INC')) die(); ?> <!-- ********** HEADER ********** --> -<div id="dokuwiki__header"><div class="pad group"> +<header id="dokuwiki__header"><div class="pad group"> <?php tpl_includeFile('header.html') ?> @@ -17,7 +17,7 @@ if (!defined('DOKU_INC')) die(); <li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content']; ?></a></li> </ul> - <h1><?php + <h1 class="logo"><?php // get logo either out of the template images folder or data/media folder $logoSize = array(); $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize); @@ -78,7 +78,5 @@ if (!defined('DOKU_INC')) die(); </div> <?php endif ?> - - <hr class="a11y" /> -</div></div><!-- /header --> +</div></header><!-- /header --> diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 03b9bb9c4..247294d66 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -37,11 +37,13 @@ namespace Composer\Autoload; * * @author Fabien Potencier <fabien@symfony.com> * @author Jordi Boggiano <j.boggiano@seld.be> - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { + private $vendorDir; + // PSR-4 private $prefixLengthsPsr4 = array(); private $prefixDirsPsr4 = array(); @@ -57,6 +59,13 @@ class ClassLoader private $missingClasses = array(); private $apcuPrefix; + private static $registeredLoaders = array(); + + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -300,6 +309,17 @@ class ClassLoader public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } } /** @@ -308,6 +328,10 @@ class ClassLoader public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } } /** @@ -367,6 +391,16 @@ class ClassLoader return $file; } + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + private function findFileWithExtension($class, $ext) { // PSR-4 lookup diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 000000000..4910e1b21 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,366 @@ +<?php + + + + + + + + + + + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + + + + + + +class InstalledVersions +{ +private static $installed = array ( + 'root' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '4ee6ddae660f9ec72c1f6e2ddb72d6b29d6d8900', + 'name' => 'splitbrain/dokuwiki', + ), + 'versions' => + array ( + 'aziraphale/email-address-validator' => + array ( + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'fa25bc22c1c0b6491657c91473fae3e40719a650', + ), + 'geshi/geshi' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + 0 => '1.0.x-dev', + 1 => '9999999-dev', + ), + 'reference' => '3c12a7931d509c5e3557c5ed44c9a32e9c917c7d', + ), + 'marcusschwarz/lesserphp' => + array ( + 'pretty_version' => 'v0.5.5', + 'version' => '0.5.5.0', + 'aliases' => + array ( + ), + 'reference' => '77ba82b5218ff228267d3b0e5ec8697be75e86a7', + ), + 'openpsa/universalfeedcreator' => + array ( + 'pretty_version' => 'v1.8.4', + 'version' => '1.8.4.0', + 'aliases' => + array ( + ), + 'reference' => '099817dc9efef33ca2382b04daf9e191b77fed13', + ), + 'phpseclib/phpseclib' => + array ( + 'pretty_version' => '2.0.31', + 'version' => '2.0.31.0', + 'aliases' => + array ( + ), + 'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4', + ), + 'simplepie/simplepie' => + array ( + 'pretty_version' => '1.5.6', + 'version' => '1.5.6.0', + 'aliases' => + array ( + ), + 'reference' => '1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6', + ), + 'splitbrain/dokuwiki' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '4ee6ddae660f9ec72c1f6e2ddb72d6b29d6d8900', + ), + 'splitbrain/php-archive' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => '211a2198b73b233d7d2b6159462e11cd9a91348a', + ), + 'splitbrain/php-cli' => + array ( + 'pretty_version' => '1.1.8', + 'version' => '1.1.8.0', + 'aliases' => + array ( + ), + 'reference' => '8c2c001b1b55d194402cf18aad2757049ac6d575', + ), + 'splitbrain/slika' => + array ( + 'pretty_version' => '1.0.4', + 'version' => '1.0.4.0', + 'aliases' => + array ( + ), + 'reference' => 'fda87e816eb150f3608282da962788b4ad509c11', + ), + ), +); +private static $canGetVendors; +private static $installedByVendor = array(); + + + + + + + +public static function getInstalledPackages() +{ +$packages = array(); +foreach (self::getInstalled() as $installed) { +$packages[] = array_keys($installed['versions']); +} + + +if (1 === \count($packages)) { +return $packages[0]; +} + +return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); +} + + + + + + + + + +public static function isInstalled($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (isset($installed['versions'][$packageName])) { +return true; +} +} + +return false; +} + + + + + + + + + + + + + + +public static function satisfies(VersionParser $parser, $packageName, $constraint) +{ +$constraint = $parser->parseConstraints($constraint); +$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + +return $provided->matches($constraint); +} + + + + + + + + + + +public static function getVersionRanges($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +$ranges = array(); +if (isset($installed['versions'][$packageName]['pretty_version'])) { +$ranges[] = $installed['versions'][$packageName]['pretty_version']; +} +if (array_key_exists('aliases', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); +} +if (array_key_exists('replaced', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); +} +if (array_key_exists('provided', $installed['versions'][$packageName])) { +$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); +} + +return implode(' || ', $ranges); +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['version'])) { +return null; +} + +return $installed['versions'][$packageName]['version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getPrettyVersion($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['pretty_version'])) { +return null; +} + +return $installed['versions'][$packageName]['pretty_version']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getReference($packageName) +{ +foreach (self::getInstalled() as $installed) { +if (!isset($installed['versions'][$packageName])) { +continue; +} + +if (!isset($installed['versions'][$packageName]['reference'])) { +return null; +} + +return $installed['versions'][$packageName]['reference']; +} + +throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); +} + + + + + +public static function getRootPackage() +{ +$installed = self::getInstalled(); + +return $installed[0]['root']; +} + + + + + + + +public static function getRawData() +{ +return self::$installed; +} + + + + + + + + + + + + + + + + + + + +public static function reload($data) +{ +self::$installed = $data; +self::$installedByVendor = array(); +} + + + + +private static function getInstalled() +{ +if (null === self::$canGetVendors) { +self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); +} + +$installed = array(); + +if (self::$canGetVendors) { +foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { +if (isset(self::$installedByVendor[$vendorDir])) { +$installed[] = self::$installedByVendor[$vendorDir]; +} elseif (is_file($vendorDir.'/composer/installed.php')) { +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; +} +} +} + +$installed[] = self::$installed; + +return $installed; +} +} diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 538036724..65472be27 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -8,6 +8,7 @@ $baseDir = dirname($vendorDir); return array( 'AtomCreator03' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/AtomCreator03.php', 'AtomCreator10' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/AtomCreator10.php', + 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'FeedCreator' => $vendorDir . '/openpsa/universalfeedcreator/lib/Creator/FeedCreator.php', 'FeedDate' => $vendorDir . '/openpsa/universalfeedcreator/lib/Element/FeedDate.php', 'FeedHtmlField' => $vendorDir . '/openpsa/universalfeedcreator/lib/Element/FeedHtmlField.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 403be68f0..ed6507cda 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,6 +7,5 @@ $baseDir = dirname($vendorDir); return array( 'fdc0e9724ddc47859c8bf0c1ea0a623a' => $vendorDir . '/openpsa/universalfeedcreator/lib/constants.php', - '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', 'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 99e063b99..14bd01a30 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -22,13 +22,15 @@ class ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b return self::$loader; } + require __DIR__ . '/platform_check.php'; + spl_autoload_register(array('ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); spl_autoload_unregister(array('ComposerAutoloaderInita19a915ee98347a0c787119619d2ff9b', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; + require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInita19a915ee98347a0c787119619d2ff9b::getInitializer($loader)); } else { diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 7cc032707..4618df6b3 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,7 +8,6 @@ class ComposerStaticInita19a915ee98347a0c787119619d2ff9b { public static $files = array ( 'fdc0e9724ddc47859c8bf0c1ea0a623a' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/constants.php', - '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', 'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php', ); @@ -69,6 +68,7 @@ class ComposerStaticInita19a915ee98347a0c787119619d2ff9b public static $classMap = array ( 'AtomCreator03' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Creator/AtomCreator03.php', 'AtomCreator10' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Creator/AtomCreator10.php', + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'FeedCreator' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Creator/FeedCreator.php', 'FeedDate' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Element/FeedDate.php', 'FeedHtmlField' => __DIR__ . '/..' . '/openpsa/universalfeedcreator/lib/Element/FeedHtmlField.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index efa467921..86a2915cd 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,573 +1,534 @@ -[ - { - "name": "aziraphale/email-address-validator", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/aziraphale/email-address-validator.git", - "reference": "fa25bc22c1c0b6491657c91473fae3e40719a650" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aziraphale/email-address-validator/zipball/fa25bc22c1c0b6491657c91473fae3e40719a650", - "reference": "fa25bc22c1c0b6491657c91473fae3e40719a650", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "time": "2017-05-22T14:05:57+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "EmailAddressValidator": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dave Child", - "email": "dave@addedbytes.com" - }, - { - "name": "Andrew Gillard", - "email": "andrew@lorddeath.net" - } - ], - "description": "Fork of AddedBytes' PHP EmailAddressValidator script, now with Composer support!", - "homepage": "https://github.com/aziraphale/email-address-validator" - }, - { - "name": "geshi/geshi", - "version": "dev-master", - "version_normalized": "9999999-dev", - "source": { - "type": "git", - "url": "https://github.com/GeSHi/geshi-1.0.git", - "reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/3c12a7931d509c5e3557c5ed44c9a32e9c917c7d", - "reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.2" - }, - "time": "2020-06-22T15:46:04+00:00", - "type": "library", - "installation-source": "source", - "autoload": { - "classmap": [ - "src/geshi/", - "src/geshi.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Benny Baumann", - "email": "BenBE@geshi.org", - "homepage": "http://blog.benny-baumann.de/", - "role": "Developer" - } - ], - "description": "Generic Syntax Highlighter", - "homepage": "http://qbnz.com/highlighter/" - }, - { - "name": "marcusschwarz/lesserphp", - "version": "v0.5.4", - "version_normalized": "0.5.4.0", - "source": { - "type": "git", - "url": "https://github.com/MarcusSchwarz/lesserphp.git", - "reference": "3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e", - "reference": "3a0f5ae0d63cbb661b5f4afd2f96875e73b3ad7e", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "~4.3" - }, - "time": "2020-01-19T19:18:49+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": "openpsa/universalfeedcreator", - "version": "v1.8.3.2", - "version_normalized": "1.8.3.2", - "source": { - "type": "git", - "url": "https://github.com/flack/UniversalFeedCreator.git", - "reference": "906745196469b13ceefa6523ef04851a78ad10f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/906745196469b13ceefa6523ef04851a78ad10f4", - "reference": "906745196469b13ceefa6523ef04851a78ad10f4", - "shasum": "" - }, - "require": { - "php": ">=5.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "time": "2019-09-01T17:49:46+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "lib" +{ + "packages": [ + { + "name": "aziraphale/email-address-validator", + "version": "2.0.1", + "version_normalized": "2.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/aziraphale/email-address-validator.git", + "reference": "fa25bc22c1c0b6491657c91473fae3e40719a650" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aziraphale/email-address-validator/zipball/fa25bc22c1c0b6491657c91473fae3e40719a650", + "reference": "fa25bc22c1c0b6491657c91473fae3e40719a650", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "time": "2017-05-22T14:05:57+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "EmailAddressValidator": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "files": [ - "lib/constants.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Andreas Flack", - "email": "flack@contentcontrol-berlin.de", - "homepage": "http://www.contentcontrol-berlin.de/" - } - ], - "description": "RSS and Atom feed generator by Kai Blankenhorn", - "keywords": [ - "atom", - "georss", - "gpx", - "opml", - "pie", - "rss" - ] - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.18", - "version_normalized": "2.0.18.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "time": "2019-01-03T20:59:08+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ] - }, - { - "name": "phpseclib/phpseclib", - "version": "2.0.28", - "version_normalized": "2.0.28.0", - "source": { - "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260", - "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.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": "2020-07-08T09:08:33+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "phpseclib/bootstrap.php" + "authors": [ + { + "name": "Dave Child", + "email": "dave@addedbytes.com" + }, + { + "name": "Andrew Gillard", + "email": "andrew@lorddeath.net" + } ], - "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" - ], - "funding": [ - { - "url": "https://github.com/terrafrost", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpseclib", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", - "type": "tidelift" - } - ] - }, - { - "name": "simplepie/simplepie", - "version": "1.5.5", - "version_normalized": "1.5.5.0", - "source": { - "type": "git", - "url": "https://github.com/simplepie/simplepie.git", - "reference": "ae49e2201b6da9c808e5dac437aca356a11831b4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/simplepie/simplepie/zipball/ae49e2201b6da9c808e5dac437aca356a11831b4", - "reference": "ae49e2201b6da9c808e5dac437aca356a11831b4", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "ext-xml": "*", - "ext-xmlreader": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.4.3 || ~6.5" - }, - "suggest": { - "ext-curl": "", - "ext-iconv": "", - "ext-intl": "", - "ext-mbstring": "", - "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" - }, - "time": "2020-05-01T12:23:14+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": "Sam Sneddon", - "homepage": "https://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": "splitbrain/php-archive", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/splitbrain/php-archive.git", - "reference": "d4cf2d9a2d82548b7e4f1dc04802c526eba68b65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/d4cf2d9a2d82548b7e4f1dc04802c526eba68b65", - "reference": "d4cf2d9a2d82548b7e4f1dc04802c526eba68b65", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "ext-bz2": "*", - "ext-zip": "*", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8" - }, - "suggest": { - "ext-iconv": "Used for proper filename encode handling", - "ext-mbstring": "Can be used alternatively for handling filename encoding" - }, - "time": "2020-10-13T12:41:15+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": "splitbrain/php-cli", - "version": "1.1.7", - "version_normalized": "1.1.7.0", - "source": { - "type": "git", - "url": "https://github.com/splitbrain/php-cli.git", - "reference": "fb4f888866d090b10e3e68292d197ca274cea626" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/splitbrain/php-cli/zipball/fb4f888866d090b10e3e68292d197ca274cea626", - "reference": "fb4f888866d090b10e3e68292d197ca274cea626", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.5.*" - }, - "suggest": { - "psr/log": "Allows you to make the CLI available as PSR-3 logger" - }, - "time": "2019-12-12T08:24:54+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "splitbrain\\phpcli\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Gohr", - "email": "andi@splitbrain.org" - } - ], - "description": "Easy command line scripts for PHP with opt parsing and color output. No dependencies", - "keywords": [ - "argparse", - "cli", - "command line", - "console", - "getopt", - "optparse", - "terminal" - ] - }, - { - "name": "splitbrain/slika", - "version": "1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/splitbrain/slika.git", - "reference": "a357f2ac6a10668c43516ef11220f60da9fab171" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/splitbrain/slika/zipball/a357f2ac6a10668c43516ef11220f60da9fab171", - "reference": "a357f2ac6a10668c43516ef11220f60da9fab171", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "suggest": { - "ext-gd": "PHP's builtin image manipulation library. Alternatively use an installation of ImageMagick" - }, - "time": "2020-09-01T15:14:41+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "splitbrain\\slika\\tests\\": "tests", - "splitbrain\\slika\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Gohr", - "email": "andi@splitbrain.org" - } - ], - "description": "Simple image resizing" - } -] + "description": "Fork of AddedBytes' PHP EmailAddressValidator script, now with Composer support!", + "homepage": "https://github.com/aziraphale/email-address-validator", + "install-path": "../aziraphale/email-address-validator" + }, + { + "name": "geshi/geshi", + "version": "dev-master", + "version_normalized": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/GeSHi/geshi-1.0.git", + "reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/3c12a7931d509c5e3557c5ed44c9a32e9c917c7d", + "reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.2" + }, + "time": "2020-06-22T15:46:04+00:00", + "type": "library", + "installation-source": "source", + "autoload": { + "classmap": [ + "src/geshi/", + "src/geshi.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Benny Baumann", + "email": "BenBE@geshi.org", + "homepage": "http://blog.benny-baumann.de/", + "role": "Developer" + } + ], + "description": "Generic Syntax Highlighter", + "homepage": "http://qbnz.com/highlighter/", + "install-path": "../geshi/geshi" + }, + { + "name": "marcusschwarz/lesserphp", + "version": "v0.5.5", + "version_normalized": "0.5.5.0", + "source": { + "type": "git", + "url": "https://github.com/MarcusSchwarz/lesserphp.git", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8.35 <8" + }, + "time": "2021-03-10T17:56:57+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/", + "install-path": "../marcusschwarz/lesserphp" + }, + { + "name": "openpsa/universalfeedcreator", + "version": "v1.8.4", + "version_normalized": "1.8.4.0", + "source": { + "type": "git", + "url": "https://github.com/flack/UniversalFeedCreator.git", + "reference": "099817dc9efef33ca2382b04daf9e191b77fed13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/flack/UniversalFeedCreator/zipball/099817dc9efef33ca2382b04daf9e191b77fed13", + "reference": "099817dc9efef33ca2382b04daf9e191b77fed13", + "shasum": "" + }, + "require": { + "php": ">=5.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "time": "2020-09-25T08:36:47+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "classmap": [ + "lib" + ], + "files": [ + "lib/constants.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Andreas Flack", + "email": "flack@contentcontrol-berlin.de", + "homepage": "http://www.contentcontrol-berlin.de/" + } + ], + "description": "RSS and Atom feed generator by Kai Blankenhorn", + "keywords": [ + "atom", + "georss", + "gpx", + "opml", + "pie", + "rss" + ], + "install-path": "../openpsa/universalfeedcreator" + }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.31", + "version_normalized": "2.0.31.0", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/233a920cb38636a43b18d428f9a8db1f0a1a08f4", + "reference": "233a920cb38636a43b18d428f9a8db1f0a1a08f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", + "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": "2021-04-06T13:56:45+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" + ], + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "install-path": "../phpseclib/phpseclib" + }, + { + "name": "simplepie/simplepie", + "version": "1.5.6", + "version_normalized": "1.5.6.0", + "source": { + "type": "git", + "url": "https://github.com/simplepie/simplepie.git", + "reference": "1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/simplepie/simplepie/zipball/1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6", + "reference": "1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "~5.4.3 || ~6.5" + }, + "suggest": { + "ext-curl": "", + "ext-iconv": "", + "ext-intl": "", + "ext-mbstring": "", + "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" + }, + "time": "2020-10-14T07:17:22+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": "Sam Sneddon", + "homepage": "https://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" + ], + "install-path": "../simplepie/simplepie" + }, + { + "name": "splitbrain/php-archive", + "version": "1.2.1", + "version_normalized": "1.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/splitbrain/php-archive.git", + "reference": "211a2198b73b233d7d2b6159462e11cd9a91348a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/splitbrain/php-archive/zipball/211a2198b73b233d7d2b6159462e11cd9a91348a", + "reference": "211a2198b73b233d7d2b6159462e11cd9a91348a", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "ext-bz2": "*", + "ext-zip": "*", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^8" + }, + "suggest": { + "ext-iconv": "Used for proper filename encode handling", + "ext-mbstring": "Can be used alternatively for handling filename encoding" + }, + "time": "2021-02-22T17:59:24+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" + ], + "install-path": "../splitbrain/php-archive" + }, + { + "name": "splitbrain/php-cli", + "version": "1.1.8", + "version_normalized": "1.1.8.0", + "source": { + "type": "git", + "url": "https://github.com/splitbrain/php-cli.git", + "reference": "8c2c001b1b55d194402cf18aad2757049ac6d575" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/splitbrain/php-cli/zipball/8c2c001b1b55d194402cf18aad2757049ac6d575", + "reference": "8c2c001b1b55d194402cf18aad2757049ac6d575", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^8" + }, + "suggest": { + "psr/log": "Allows you to make the CLI available as PSR-3 logger" + }, + "time": "2021-02-05T12:02:46+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "splitbrain\\phpcli\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Gohr", + "email": "andi@splitbrain.org" + } + ], + "description": "Easy command line scripts for PHP with opt parsing and color output. No dependencies", + "keywords": [ + "argparse", + "cli", + "command line", + "console", + "getopt", + "optparse", + "terminal" + ], + "install-path": "../splitbrain/php-cli" + }, + { + "name": "splitbrain/slika", + "version": "1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/splitbrain/slika.git", + "reference": "fda87e816eb150f3608282da962788b4ad509c11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/splitbrain/slika/zipball/fda87e816eb150f3608282da962788b4ad509c11", + "reference": "fda87e816eb150f3608282da962788b4ad509c11", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-gd": "PHP's builtin image manipulation library. Alternatively use an installation of ImageMagick" + }, + "time": "2020-09-07T18:35:00+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "splitbrain\\slika\\tests\\": "tests", + "splitbrain\\slika\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Gohr", + "email": "andi@splitbrain.org" + } + ], + "description": "Simple image resizing", + "install-path": "../splitbrain/slika" + } + ], + "dev": true, + "dev-package-names": [] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 000000000..57d493fd1 --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,107 @@ +<?php return array ( + 'root' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '4ee6ddae660f9ec72c1f6e2ddb72d6b29d6d8900', + 'name' => 'splitbrain/dokuwiki', + ), + 'versions' => + array ( + 'aziraphale/email-address-validator' => + array ( + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'aliases' => + array ( + ), + 'reference' => 'fa25bc22c1c0b6491657c91473fae3e40719a650', + ), + 'geshi/geshi' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + 0 => '1.0.x-dev', + 1 => '9999999-dev', + ), + 'reference' => '3c12a7931d509c5e3557c5ed44c9a32e9c917c7d', + ), + 'marcusschwarz/lesserphp' => + array ( + 'pretty_version' => 'v0.5.5', + 'version' => '0.5.5.0', + 'aliases' => + array ( + ), + 'reference' => '77ba82b5218ff228267d3b0e5ec8697be75e86a7', + ), + 'openpsa/universalfeedcreator' => + array ( + 'pretty_version' => 'v1.8.4', + 'version' => '1.8.4.0', + 'aliases' => + array ( + ), + 'reference' => '099817dc9efef33ca2382b04daf9e191b77fed13', + ), + 'phpseclib/phpseclib' => + array ( + 'pretty_version' => '2.0.31', + 'version' => '2.0.31.0', + 'aliases' => + array ( + ), + 'reference' => '233a920cb38636a43b18d428f9a8db1f0a1a08f4', + ), + 'simplepie/simplepie' => + array ( + 'pretty_version' => '1.5.6', + 'version' => '1.5.6.0', + 'aliases' => + array ( + ), + 'reference' => '1c68e14ca3ac84346b6e6fe3c5eedf725d0f92c6', + ), + 'splitbrain/dokuwiki' => + array ( + 'pretty_version' => 'dev-master', + 'version' => 'dev-master', + 'aliases' => + array ( + ), + 'reference' => '4ee6ddae660f9ec72c1f6e2ddb72d6b29d6d8900', + ), + 'splitbrain/php-archive' => + array ( + 'pretty_version' => '1.2.1', + 'version' => '1.2.1.0', + 'aliases' => + array ( + ), + 'reference' => '211a2198b73b233d7d2b6159462e11cd9a91348a', + ), + 'splitbrain/php-cli' => + array ( + 'pretty_version' => '1.1.8', + 'version' => '1.1.8.0', + 'aliases' => + array ( + ), + 'reference' => '8c2c001b1b55d194402cf18aad2757049ac6d575', + ), + 'splitbrain/slika' => + array ( + 'pretty_version' => '1.0.4', + 'version' => '1.0.4.0', + 'aliases' => + array ( + ), + 'reference' => 'fda87e816eb150f3608282da962788b4ad509c11', + ), + ), +); diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php new file mode 100644 index 000000000..589e9e770 --- /dev/null +++ b/vendor/composer/platform_check.php @@ -0,0 +1,26 @@ +<?php + +// platform_check.php @generated by Composer + +$issues = array(); + +if (!(PHP_VERSION_ID >= 70200)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; +} + +if ($issues) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); + } elseif (!headers_sent()) { + echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; + } + } + trigger_error( + 'Composer detected issues in your platform: ' . implode(' ', $issues), + E_USER_ERROR + ); +} diff --git a/vendor/marcusschwarz/lesserphp/HISTORY.md b/vendor/marcusschwarz/lesserphp/HISTORY.md index 4a55d823c..b36ce91f3 100644 --- a/vendor/marcusschwarz/lesserphp/HISTORY.md +++ b/vendor/marcusschwarz/lesserphp/HISTORY.md @@ -1,10 +1,13 @@ -# lesserphp v0.5.4 +# lesserphp v0.5.5 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.5 +* 2021-03-10: More PHP 7.4 support for 0.5-dev (@phy25) + ### v.0.5.4 * 2020-01-19: added 7.4 support to travis and removed antique php versions (@phy25) * 2020-01-19: fixed wrong array access in lib_luma diff --git a/vendor/marcusschwarz/lesserphp/LICENSE b/vendor/marcusschwarz/lesserphp/LICENSE index 529020266..5dcdbf377 100644 --- a/vendor/marcusschwarz/lesserphp/LICENSE +++ b/vendor/marcusschwarz/lesserphp/LICENSE @@ -1,4 +1,4 @@ -For ease of distribution, lessphp 0.5.1 is under a dual license. +For ease of distribution, lesserphp is under a dual license. You are free to pick which one suits your needs. diff --git a/vendor/marcusschwarz/lesserphp/README.md b/vendor/marcusschwarz/lesserphp/README.md index 8c26ab14a..efa660182 100644 --- a/vendor/marcusschwarz/lesserphp/README.md +++ b/vendor/marcusschwarz/lesserphp/README.md @@ -1,6 +1,6 @@ [](https://travis-ci.org/MarcusSchwarz/lesserphp) -# lesserphp v0.5.4 +# lesserphp v0.5.5 ### <http://github.com/MarcusSchwarz/lesserphp> `lesserphp` is a compiler for LESS written in PHP. It is based on lessphp bei leafo. diff --git a/vendor/marcusschwarz/lesserphp/composer.json b/vendor/marcusschwarz/lesserphp/composer.json index d32a5d4af..f96d98d86 100644 --- a/vendor/marcusschwarz/lesserphp/composer.json +++ b/vendor/marcusschwarz/lesserphp/composer.json @@ -30,7 +30,7 @@ } }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": ">=4.8.35 <8" }, "scripts": { "test": "phpunit" diff --git a/vendor/marcusschwarz/lesserphp/lessc.inc.php b/vendor/marcusschwarz/lesserphp/lessc.inc.php index e8c85d9cf..175b27cd9 100644 --- a/vendor/marcusschwarz/lesserphp/lessc.inc.php +++ b/vendor/marcusschwarz/lesserphp/lessc.inc.php @@ -1,7 +1,7 @@ <?php /** - * lessphp v0.5.2 + * lessphp v0.5.5 * http://leafo.net/lessphp * * LESS CSS compiler, adapted from http://lesscss.org @@ -39,7 +39,7 @@ * handling things like indentation. */ class lessc { - static public $VERSION = "v0.5.2"; + static public $VERSION = "v0.5.5"; static public $TRUE = array("keyword", "true"); static public $FALSE = array("keyword", "false"); diff --git a/vendor/openpsa/universalfeedcreator/LICENSE b/vendor/openpsa/universalfeedcreator/LICENSE new file mode 100644 index 000000000..178db1468 --- /dev/null +++ b/vendor/openpsa/universalfeedcreator/LICENSE @@ -0,0 +1,456 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. diff --git a/vendor/openpsa/universalfeedcreator/lib/Creator/HTMLCreator.php b/vendor/openpsa/universalfeedcreator/lib/Creator/HTMLCreator.php index e02a8d767..f0f03d857 100644 --- a/vendor/openpsa/universalfeedcreator/lib/Creator/HTMLCreator.php +++ b/vendor/openpsa/universalfeedcreator/lib/Creator/HTMLCreator.php @@ -140,7 +140,7 @@ class HTMLCreator extends FeedCreator $feedArray[] = "<div class='".$this->stylePrefix."footer'>".$this->footer."</div>"; } - $feed = "".join($feedArray, "\r\n"); + $feed = "".implode("\r\n", $feedArray); return $feed; } diff --git a/vendor/paragonie/random_compat/LICENSE b/vendor/paragonie/random_compat/LICENSE deleted file mode 100644 index 45c7017df..000000000 --- a/vendor/paragonie/random_compat/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Paragon Initiative Enterprises - -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. - diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json deleted file mode 100644 index 34f1381d5..000000000 --- a/vendor/paragonie/random_compat/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "paragonie/random_compat", - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "random", - "polyfill", - "pseudorandom" - ], - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "support": { - "issues": "https://github.com/paragonie/random_compat/issues", - "email": "info@paragonie.com", - "source": "https://github.com/paragonie/random_compat" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "autoload": { - "files": [ - "lib/random.php" - ] - } -} diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php deleted file mode 100644 index ef24488f9..000000000 --- a/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('RandomCompat_strlen')) { - if ( - defined('MB_OVERLOAD_STRING') - && - ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING - ) { - /** - * strlen() implementation that isn't brittle to mbstring.func_overload - * - * This version uses mb_strlen() in '8bit' mode to treat strings as raw - * binary rather than UTF-8, ISO-8859-1, etc - * - * @param string $binary_string - * - * @throws TypeError - * - * @return int - */ - function RandomCompat_strlen($binary_string) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_strlen() expects a string' - ); - } - - return (int) mb_strlen($binary_string, '8bit'); - } - - } else { - /** - * strlen() implementation that isn't brittle to mbstring.func_overload - * - * This version just used the default strlen() - * - * @param string $binary_string - * - * @throws TypeError - * - * @return int - */ - function RandomCompat_strlen($binary_string) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_strlen() expects a string' - ); - } - return (int) strlen($binary_string); - } - } -} - -if (!is_callable('RandomCompat_substr')) { - - if ( - defined('MB_OVERLOAD_STRING') - && - ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING - ) { - /** - * substr() implementation that isn't brittle to mbstring.func_overload - * - * This version uses mb_substr() in '8bit' mode to treat strings as raw - * binary rather than UTF-8, ISO-8859-1, etc - * - * @param string $binary_string - * @param int $start - * @param int|null $length (optional) - * - * @throws TypeError - * - * @return string - */ - function RandomCompat_substr($binary_string, $start, $length = null) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_substr(): First argument should be a string' - ); - } - - if (!is_int($start)) { - throw new TypeError( - 'RandomCompat_substr(): Second argument should be an integer' - ); - } - - if ($length === null) { - /** - * mb_substr($str, 0, NULL, '8bit') returns an empty string on - * PHP 5.3, so we have to find the length ourselves. - */ - /** @var int $length */ - $length = RandomCompat_strlen($binary_string) - $start; - } elseif (!is_int($length)) { - throw new TypeError( - 'RandomCompat_substr(): Third argument should be an integer, or omitted' - ); - } - - // Consistency with PHP's behavior - if ($start === RandomCompat_strlen($binary_string) && $length === 0) { - return ''; - } - if ($start > RandomCompat_strlen($binary_string)) { - return ''; - } - - return (string) mb_substr( - (string) $binary_string, - (int) $start, - (int) $length, - '8bit' - ); - } - - } else { - - /** - * substr() implementation that isn't brittle to mbstring.func_overload - * - * This version just uses the default substr() - * - * @param string $binary_string - * @param int $start - * @param int|null $length (optional) - * - * @throws TypeError - * - * @return string - */ - function RandomCompat_substr($binary_string, $start, $length = null) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_substr(): First argument should be a string' - ); - } - - if (!is_int($start)) { - throw new TypeError( - 'RandomCompat_substr(): Second argument should be an integer' - ); - } - - if ($length !== null) { - if (!is_int($length)) { - throw new TypeError( - 'RandomCompat_substr(): Third argument should be an integer, or omitted' - ); - } - - return (string) substr( - (string )$binary_string, - (int) $start, - (int) $length - ); - } - - return (string) substr( - (string) $binary_string, - (int) $start - ); - } - } -} diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php deleted file mode 100644 index 1b1bbfe8d..000000000 --- a/vendor/paragonie/random_compat/lib/cast_to_int.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('RandomCompat_intval')) { - - /** - * Cast to an integer if we can, safely. - * - * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) - * (non-inclusive), it will sanely cast it to an int. If you it's equal to - * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats - * lose precision, so the <= and => operators might accidentally let a float - * through. - * - * @param int|float $number The number we want to convert to an int - * @param bool $fail_open Set to true to not throw an exception - * - * @return float|int - * @psalm-suppress InvalidReturnType - * - * @throws TypeError - */ - function RandomCompat_intval($number, $fail_open = false) - { - if (is_int($number) || is_float($number)) { - $number += 0; - } elseif (is_numeric($number)) { - /** @psalm-suppress InvalidOperand */ - $number += 0; - } - /** @var int|float $number */ - - if ( - is_float($number) - && - $number > ~PHP_INT_MAX - && - $number < PHP_INT_MAX - ) { - $number = (int) $number; - } - - if (is_int($number)) { - return (int) $number; - } elseif (!$fail_open) { - throw new TypeError( - 'Expected an integer.' - ); - } - return $number; - } -} diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php deleted file mode 100644 index c02c5c8b4..000000000 --- a/vendor/paragonie/random_compat/lib/error_polyfill.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!class_exists('Error', false)) { - // We can't really avoid making this extend Exception in PHP 5. - class Error extends Exception - { - - } -} - -if (!class_exists('TypeError', false)) { - if (is_subclass_of('Error', 'Exception')) { - class TypeError extends Error - { - - } - } else { - class TypeError extends Exception - { - - } - } -} diff --git a/vendor/paragonie/random_compat/lib/random.php b/vendor/paragonie/random_compat/lib/random.php deleted file mode 100644 index 36245f542..000000000 --- a/vendor/paragonie/random_compat/lib/random.php +++ /dev/null @@ -1,225 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * @version 2.0.17 - * @released 2018-07-04 - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!defined('PHP_VERSION_ID')) { - // This constant was introduced in PHP 5.2.7 - $RandomCompatversion = array_map('intval', explode('.', PHP_VERSION)); - define( - 'PHP_VERSION_ID', - $RandomCompatversion[0] * 10000 - + $RandomCompatversion[1] * 100 - + $RandomCompatversion[2] - ); - $RandomCompatversion = null; -} - -/** - * PHP 7.0.0 and newer have these functions natively. - */ -if (PHP_VERSION_ID >= 70000) { - return; -} - -if (!defined('RANDOM_COMPAT_READ_BUFFER')) { - define('RANDOM_COMPAT_READ_BUFFER', 8); -} - -$RandomCompatDIR = dirname(__FILE__); - -require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'byte_safe_strings.php'; -require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'cast_to_int.php'; -require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'error_polyfill.php'; - -if (!is_callable('random_bytes')) { - /** - * PHP 5.2.0 - 5.6.x way to implement random_bytes() - * - * We use conditional statements here to define the function in accordance - * to the operating environment. It's a micro-optimization. - * - * In order of preference: - * 1. Use libsodium if available. - * 2. fread() /dev/urandom if available (never on Windows) - * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) - * 4. COM('CAPICOM.Utilities.1')->GetRandom() - * - * See RATIONALE.md for our reasoning behind this particular order - */ - if (extension_loaded('libsodium')) { - // See random_bytes_libsodium.php - if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium.php'; - } elseif (method_exists('Sodium', 'randombytes_buf')) { - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium_legacy.php'; - } - } - - /** - * Reading directly from /dev/urandom: - */ - if (DIRECTORY_SEPARATOR === '/') { - // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast - // way to exclude Windows. - $RandomCompatUrandom = true; - $RandomCompat_basedir = ini_get('open_basedir'); - - if (!empty($RandomCompat_basedir)) { - $RandomCompat_open_basedir = explode( - PATH_SEPARATOR, - strtolower($RandomCompat_basedir) - ); - $RandomCompatUrandom = (array() !== array_intersect( - array('/dev', '/dev/', '/dev/urandom'), - $RandomCompat_open_basedir - )); - $RandomCompat_open_basedir = null; - } - - if ( - !is_callable('random_bytes') - && - $RandomCompatUrandom - && - @is_readable('/dev/urandom') - ) { - // Error suppression on is_readable() in case of an open_basedir - // or safe_mode failure. All we care about is whether or not we - // can read it at this point. If the PHP environment is going to - // panic over trying to see if the file can be read in the first - // place, that is not helpful to us here. - - // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_dev_urandom.php'; - } - // Unset variables after use - $RandomCompat_basedir = null; - } else { - $RandomCompatUrandom = false; - } - - /** - * mcrypt_create_iv() - * - * We only want to use mcypt_create_iv() if: - * - * - random_bytes() hasn't already been defined - * - the mcrypt extensions is loaded - * - One of these two conditions is true: - * - We're on Windows (DIRECTORY_SEPARATOR !== '/') - * - We're not on Windows and /dev/urandom is readabale - * (i.e. we're not in a chroot jail) - * - Special case: - * - If we're not on Windows, but the PHP version is between - * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will - * hang indefinitely. This is bad. - * - If we're on Windows, we want to use PHP >= 5.3.7 or else - * we get insufficient entropy errors. - */ - if ( - !is_callable('random_bytes') - && - // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. - (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) - && - // Prevent this code from hanging indefinitely on non-Windows; - // see https://bugs.php.net/bug.php?id=69833 - ( - DIRECTORY_SEPARATOR !== '/' || - (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) - ) - && - extension_loaded('mcrypt') - ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_mcrypt.php'; - } - $RandomCompatUrandom = null; - - /** - * This is a Windows-specific fallback, for when the mcrypt extension - * isn't loaded. - */ - if ( - !is_callable('random_bytes') - && - extension_loaded('com_dotnet') - && - class_exists('COM') - ) { - $RandomCompat_disabled_classes = preg_split( - '#\s*,\s*#', - strtolower(ini_get('disable_classes')) - ); - - if (!in_array('com', $RandomCompat_disabled_classes)) { - try { - $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - if (method_exists($RandomCompatCOMtest, 'GetRandom')) { - // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_com_dotnet.php'; - } - } catch (com_exception $e) { - // Don't try to use it. - } - } - $RandomCompat_disabled_classes = null; - $RandomCompatCOMtest = null; - } - - /** - * throw new Exception - */ - if (!is_callable('random_bytes')) { - /** - * We don't have any more options, so let's throw an exception right now - * and hope the developer won't let it fail silently. - * - * @param mixed $length - * @psalm-suppress InvalidReturnType - * @throws Exception - * @return string - */ - function random_bytes($length) - { - unset($length); // Suppress "variable not used" warnings. - throw new Exception( - 'There is no suitable CSPRNG installed on your system' - ); - return ''; - } - } -} - -if (!is_callable('random_int')) { - require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_int.php'; -} - -$RandomCompatDIR = null; diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php deleted file mode 100644 index 537d02b27..000000000 --- a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('random_bytes')) { - /** - * Windows with PHP < 5.3.0 will not have the function - * openssl_random_pseudo_bytes() available, so let's use - * CAPICOM to work around this deficiency. - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ - function random_bytes($bytes) - { - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** @var string $buf */ - $buf = ''; - if (!class_exists('COM')) { - throw new Error( - 'COM does not exist' - ); - } - /** @var COM $util */ - $util = new COM('CAPICOM.Utilities.1'); - $execCount = 0; - - /** - * Let's not let it loop forever. If we run N times and fail to - * get N bytes of random data, then CAPICOM has failed us. - */ - do { - $buf .= base64_decode((string) $util->GetRandom($bytes, 0)); - if (RandomCompat_strlen($buf) >= $bytes) { - /** - * Return our random entropy buffer here: - */ - return (string) RandomCompat_substr($buf, 0, $bytes); - } - ++$execCount; - } while ($execCount < $bytes); - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php deleted file mode 100644 index c4e31ccbb..000000000 --- a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!defined('RANDOM_COMPAT_READ_BUFFER')) { - define('RANDOM_COMPAT_READ_BUFFER', 8); -} - -if (!is_callable('random_bytes')) { - /** - * Unless open_basedir is enabled, use /dev/urandom for - * random numbers in accordance with best practices - * - * Why we use /dev/urandom and not /dev/random - * @ref https://www.2uo.de/myths-about-urandom - * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ - function random_bytes($bytes) - { - /** @var resource $fp */ - static $fp = null; - - /** - * This block should only be run once - */ - if (empty($fp)) { - /** - * We don't want to ever read C:\dev\random, only /dev/urandom on - * Unix-like operating systems. While we guard against this - * condition in random.php, it doesn't hurt to be defensive in depth - * here. - * - * To that end, we only try to open /dev/urandom if we're on a Unix- - * like operating system (which means the directory separator is set - * to "/" not "\". - */ - if (DIRECTORY_SEPARATOR === '/') { - if (!is_readable('/dev/urandom')) { - throw new Exception( - 'Environment misconfiguration: ' . - '/dev/urandom cannot be read.' - ); - } - /** - * We use /dev/urandom if it is a char device. - * We never fall back to /dev/random - */ - /** @var resource|bool $fp */ - $fp = fopen('/dev/urandom', 'rb'); - if (is_resource($fp)) { - /** @var array<string, int> $st */ - $st = fstat($fp); - if (($st['mode'] & 0170000) !== 020000) { - fclose($fp); - $fp = false; - } - } - } - - if (is_resource($fp)) { - /** - * stream_set_read_buffer() does not exist in HHVM - * - * If we don't set the stream's read buffer to 0, PHP will - * internally buffer 8192 bytes, which can waste entropy - * - * stream_set_read_buffer returns 0 on success - */ - if (is_callable('stream_set_read_buffer')) { - stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); - } - if (is_callable('stream_set_chunk_size')) { - stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER); - } - } - } - - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** - * This if() block only runs if we managed to open a file handle - * - * It does not belong in an else {} block, because the above - * if (empty($fp)) line is logic that should only be run once per - * page load. - */ - if (is_resource($fp)) { - /** - * @var int - */ - $remaining = $bytes; - - /** - * @var string|bool - */ - $buf = ''; - - /** - * We use fread() in a loop to protect against partial reads - */ - do { - /** - * @var string|bool - */ - $read = fread($fp, $remaining); - if (!is_string($read)) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - * - * @var string|bool - */ - $buf = false; - break; - } - /** - * Decrease the number of bytes returned from remaining - */ - $remaining -= RandomCompat_strlen($read); - /** - * @var string $buf - */ - $buf .= $read; - } while ($remaining > 0); - - /** - * Is our result valid? - * @var string|bool $buf - */ - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - /** - * Return our random entropy buffer here: - */ - return $buf; - } - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Error reading from source device' - ); - } -} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php deleted file mode 100644 index 2e5629018..000000000 --- a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('random_bytes')) { - /** - * If the libsodium PHP extension is loaded, we'll use it above any other - * solution. - * - * libsodium-php project: - * @ref https://github.com/jedisct1/libsodium-php - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ - function random_bytes($bytes) - { - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** - * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be - * generated in one invocation. - */ - /** @var string|bool $buf */ - if ($bytes > 2147483647) { - $buf = ''; - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= \Sodium\randombytes_buf($n); - } - } else { - /** @var string|bool $buf */ - $buf = \Sodium\randombytes_buf($bytes); - } - - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php deleted file mode 100644 index f78b2199a..000000000 --- a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('random_bytes')) { - /** - * If the libsodium PHP extension is loaded, we'll use it above any other - * solution. - * - * libsodium-php project: - * @ref https://github.com/jedisct1/libsodium-php - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ - function random_bytes($bytes) - { - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** - * @var string - */ - $buf = ''; - - /** - * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be - * generated in one invocation. - */ - if ($bytes > 2147483647) { - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= Sodium::randombytes_buf((int) $n); - } - } else { - $buf .= Sodium::randombytes_buf((int) $bytes); - } - - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php deleted file mode 100644 index 0b13fa73c..000000000 --- a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - -if (!is_callable('random_bytes')) { - /** - * Powered by ext/mcrypt (and thankfully NOT libmcrypt) - * - * @ref https://bugs.php.net/bug.php?id=55169 - * @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386 - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ - function random_bytes($bytes) - { - try { - /** @var int $bytes */ - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - - /** @var string|bool $buf */ - $buf = @mcrypt_create_iv((int) $bytes, (int) MCRYPT_DEV_URANDOM); - if ( - is_string($buf) - && - RandomCompat_strlen($buf) === $bytes - ) { - /** - * Return our random entropy buffer here: - */ - return $buf; - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/vendor/paragonie/random_compat/lib/random_int.php b/vendor/paragonie/random_compat/lib/random_int.php deleted file mode 100644 index ff80dfa43..000000000 --- a/vendor/paragonie/random_compat/lib/random_int.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php - -if (!is_callable('random_int')) { - /** - * Random_* Compatibility Library - * for using the new PHP 7 random_* API in PHP 5 projects - * - * The MIT License (MIT) - * - * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises - * - * 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. - */ - - /** - * Fetch a random integer between $min and $max inclusive - * - * @param int $min - * @param int $max - * - * @throws Exception - * - * @return int - */ - function random_int($min, $max) - { - /** - * Type and input logic checks - * - * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) - * (non-inclusive), it will sanely cast it to an int. If you it's equal to - * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats - * lose precision, so the <= and => operators might accidentally let a float - * through. - */ - - try { - /** @var int $min */ - $min = RandomCompat_intval($min); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $min must be an integer' - ); - } - - try { - /** @var int $max */ - $max = RandomCompat_intval($max); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $max must be an integer' - ); - } - - /** - * Now that we've verified our weak typing system has given us an integer, - * let's validate the logic then we can move forward with generating random - * integers along a given range. - */ - if ($min > $max) { - throw new Error( - 'Minimum value must be less than or equal to the maximum value' - ); - } - - if ($max === $min) { - return (int) $min; - } - - /** - * Initialize variables to 0 - * - * We want to store: - * $bytes => the number of random bytes we need - * $mask => an integer bitmask (for use with the &) operator - * so we can minimize the number of discards - */ - $attempts = $bits = $bytes = $mask = $valueShift = 0; - /** @var int $attempts */ - /** @var int $bits */ - /** @var int $bytes */ - /** @var int $mask */ - /** @var int $valueShift */ - - /** - * At this point, $range is a positive number greater than 0. It might - * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to - * a float and we will lose some precision. - * - * @var int|float $range - */ - $range = $max - $min; - - /** - * Test for integer overflow: - */ - if (!is_int($range)) { - - /** - * Still safely calculate wider ranges. - * Provided by @CodesInChaos, @oittaa - * - * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 - * - * We use ~0 as a mask in this case because it generates all 1s - * - * @ref https://eval.in/400356 (32-bit) - * @ref http://3v4l.org/XX9r5 (64-bit) - */ - $bytes = PHP_INT_SIZE; - /** @var int $mask */ - $mask = ~0; - - } else { - - /** - * $bits is effectively ceil(log($range, 2)) without dealing with - * type juggling - */ - while ($range > 0) { - if ($bits % 8 === 0) { - ++$bytes; - } - ++$bits; - $range >>= 1; - /** @var int $mask */ - $mask = $mask << 1 | 1; - } - $valueShift = $min; - } - - /** @var int $val */ - $val = 0; - /** - * Now that we have our parameters set up, let's begin generating - * random integers until one falls between $min and $max - */ - /** @psalm-suppress RedundantCondition */ - do { - /** - * The rejection probability is at most 0.5, so this corresponds - * to a failure probability of 2^-128 for a working RNG - */ - if ($attempts > 128) { - throw new Exception( - 'random_int: RNG is broken - too many rejections' - ); - } - - /** - * Let's grab the necessary number of random bytes - */ - $randomByteString = random_bytes($bytes); - - /** - * Let's turn $randomByteString into an integer - * - * This uses bitwise operators (<< and |) to build an integer - * out of the values extracted from ord() - * - * Example: [9F] | [6D] | [32] | [0C] => - * 159 + 27904 + 3276800 + 201326592 => - * 204631455 - */ - $val &= 0; - for ($i = 0; $i < $bytes; ++$i) { - $val |= ord($randomByteString[$i]) << ($i * 8); - } - /** @var int $val */ - - /** - * Apply mask - */ - $val &= $mask; - $val += $valueShift; - - ++$attempts; - /** - * If $val overflows to a floating point number, - * ... or is larger than $max, - * ... or smaller than $min, - * then try again. - */ - } while (!is_int($val) || $val > $max || $val < $min); - - return (int) $val; - } -} diff --git a/vendor/phpseclib/phpseclib/README.md b/vendor/phpseclib/phpseclib/README.md index 56260b0bc..099486dc9 100644 --- a/vendor/phpseclib/phpseclib/README.md +++ b/vendor/phpseclib/phpseclib/README.md @@ -1,6 +1,6 @@ # phpseclib - PHP Secure Communications Library -[](https://travis-ci.org/phpseclib/phpseclib) +[](https://travis-ci.com/phpseclib/phpseclib) ## Supporting phpseclib @@ -10,16 +10,16 @@ ## Introduction -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 +MIT-licensed pure-PHP implementations of the following: + +SSH-2, SFTP, X.509, an arbitrary-precision integer arithmetic library, Ed25519 / Ed449 / Curve25519 / Curve449, ECDSA / ECDH (with support for 66 curves), RSA (PKCS#1 v2.2 compliant), DSA / DH, DES / 3DES / RC4 / Rijndael / AES / Blowfish / Twofish / Salsa20 / ChaCha20, GCM / Poly1305 * [Browse Git](https://github.com/phpseclib/phpseclib) ## Documentation -* [Documentation / Manual](http://phpseclib.sourceforge.net/) -* [API Documentation](https://api.phpseclib.org/2.0/) (generated by Sami) +* [Documentation / Manual](https://phpseclib.com/) +* [API Documentation](https://api.phpseclib.com/2.0/) (generated by Doctum) ## Branches @@ -29,6 +29,14 @@ AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509 * Unstable API * Do not use in production +### 3.0 + +* Long term support (LTS) release +* Major expansion of cryptographic primitives +* Minimum PHP version: 5.6.1 +* PSR-4 autoloading with namespace rooted at `\phpseclib3` +* Install via Composer: `composer require phpseclib/phpseclib:~3.0` + ### 2.0 * Long term support (LTS) release diff --git a/vendor/phpseclib/phpseclib/composer.json b/vendor/phpseclib/phpseclib/composer.json index b4e8a1c9c..08b9c7c91 100644 --- a/vendor/phpseclib/phpseclib/composer.json +++ b/vendor/phpseclib/phpseclib/composer.json @@ -55,8 +55,7 @@ }, "require-dev": { "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.0", - "sami/sami": "~2.0", + "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4", "squizlabs/php_codesniffer": "~2.0" }, "suggest": { diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php index 224eaa521..8822b9b88 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php @@ -779,12 +779,14 @@ abstract class Base } if ($this->engine === self::ENGINE_MCRYPT) { + set_error_handler(array($this, 'do_nothing')); + if ($this->changed) { $this->_setupMcrypt(); $this->changed = false; } if ($this->enchanged) { - @mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); + mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); $this->enchanged = false; } @@ -817,15 +819,15 @@ abstract class Base if ($len >= $block_size) { if ($this->enbuffer['enmcrypt_init'] === false || $len > $this->cfb_init_len) { if ($this->enbuffer['enmcrypt_init'] === true) { - @mcrypt_generic_init($this->enmcrypt, $this->key, $iv); + mcrypt_generic_init($this->enmcrypt, $this->key, $iv); $this->enbuffer['enmcrypt_init'] = false; } - $ciphertext.= @mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size)); + $ciphertext.= mcrypt_generic($this->enmcrypt, substr($plaintext, $i, $len - $len % $block_size)); $iv = substr($ciphertext, -$block_size); $len%= $block_size; } else { while ($len >= $block_size) { - $iv = @mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size); + $iv = mcrypt_generic($this->ecb, $iv) ^ substr($plaintext, $i, $block_size); $ciphertext.= $iv; $len-= $block_size; $i+= $block_size; @@ -834,22 +836,26 @@ abstract class Base } if ($len) { - $iv = @mcrypt_generic($this->ecb, $iv); + $iv = mcrypt_generic($this->ecb, $iv); $block = $iv ^ substr($plaintext, -$len); $iv = substr_replace($iv, $block, 0, $len); $ciphertext.= $block; $pos = $len; } + restore_error_handler(); + return $ciphertext; } - $ciphertext = @mcrypt_generic($this->enmcrypt, $plaintext); + $ciphertext = mcrypt_generic($this->enmcrypt, $plaintext); if (!$this->continuousBuffer) { - @mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); + mcrypt_generic_init($this->enmcrypt, $this->key, $this->encryptIV); } + restore_error_handler(); + return $ciphertext; } @@ -1118,13 +1124,14 @@ abstract class Base } if ($this->engine === self::ENGINE_MCRYPT) { + set_error_handler(array($this, 'do_nothing')); $block_size = $this->block_size; if ($this->changed) { $this->_setupMcrypt(); $this->changed = false; } if ($this->dechanged) { - @mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); + mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); $this->dechanged = false; } @@ -1152,26 +1159,30 @@ abstract class Base } if ($len >= $block_size) { $cb = substr($ciphertext, $i, $len - $len % $block_size); - $plaintext.= @mcrypt_generic($this->ecb, $iv . $cb) ^ $cb; + $plaintext.= mcrypt_generic($this->ecb, $iv . $cb) ^ $cb; $iv = substr($cb, -$block_size); $len%= $block_size; } if ($len) { - $iv = @mcrypt_generic($this->ecb, $iv); + $iv = mcrypt_generic($this->ecb, $iv); $plaintext.= $iv ^ substr($ciphertext, -$len); $iv = substr_replace($iv, substr($ciphertext, -$len), 0, $len); $pos = $len; } + restore_error_handler(); + return $plaintext; } - $plaintext = @mdecrypt_generic($this->demcrypt, $ciphertext); + $plaintext = mdecrypt_generic($this->demcrypt, $ciphertext); if (!$this->continuousBuffer) { - @mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); + mcrypt_generic_init($this->demcrypt, $this->key, $this->decryptIV); } + restore_error_handler(); + return $this->paddable ? $this->_unpad($plaintext) : $plaintext; } @@ -1649,9 +1660,12 @@ abstract class Base } return false; case self::ENGINE_MCRYPT: - return $this->cipher_name_mcrypt && + set_error_handler(array($this, 'do_nothing')); + $result = $this->cipher_name_mcrypt && extension_loaded('mcrypt') && - in_array($this->cipher_name_mcrypt, @mcrypt_list_algorithms()); + in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms()); + restore_error_handler(); + return $result; case self::ENGINE_INTERNAL: return true; } @@ -1728,17 +1742,19 @@ abstract class Base } if ($this->engine != self::ENGINE_MCRYPT && $this->enmcrypt) { + set_error_handler(array($this, 'do_nothing')); // Closing the current mcrypt resource(s). _mcryptSetup() will, if needed, // (re)open them with the module named in $this->cipher_name_mcrypt - @mcrypt_module_close($this->enmcrypt); - @mcrypt_module_close($this->demcrypt); + mcrypt_module_close($this->enmcrypt); + mcrypt_module_close($this->demcrypt); $this->enmcrypt = null; $this->demcrypt = null; if ($this->ecb) { - @mcrypt_module_close($this->ecb); + mcrypt_module_close($this->ecb); $this->ecb = null; } + restore_error_handler(); } $this->changed = true; @@ -1851,19 +1867,19 @@ abstract class Base self::MODE_STREAM => MCRYPT_MODE_STREAM, ); - $this->demcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); - $this->enmcrypt = @mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); + $this->demcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); + $this->enmcrypt = mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], ''); // we need the $ecb mcrypt resource (only) in MODE_CFB with enableContinuousBuffer() // to workaround mcrypt's broken ncfb implementation in buffered mode // see: {@link http://phpseclib.sourceforge.net/cfb-demo.phps} if ($this->mode == self::MODE_CFB) { - $this->ecb = @mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, ''); + $this->ecb = mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, ''); } } // else should mcrypt_generic_deinit be called? if ($this->mode == self::MODE_CFB) { - @mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size)); + mcrypt_generic_init($this->ecb, $this->key, str_repeat("\0", $this->block_size)); } } @@ -2627,7 +2643,7 @@ abstract class Base * * @see self::_setupInlineCrypt() * @access private - * @param $bytes + * @param string $bytes * @return string */ function _hashInlineCryptFunction($bytes) @@ -2696,4 +2712,13 @@ abstract class Base return $safeint . '((fmod(floor($temp / 0x80000000), 2) & 1) << 31))'; } } + + /** + * Dummy error handler to suppress mcrypt errors + * + * @access private + */ + function do_nothing() + { + } } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php index a61668209..248b65ef7 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php @@ -849,7 +849,6 @@ class Hash * _sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the * possibility of overflow exists, care has to be taken. BigInteger could be used but this should be faster. * - * @param int $... * @return int * @see self::_sha256() * @access private diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php index 72be6eeb1..811d039d3 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php @@ -537,7 +537,7 @@ class RSA * @access public * @param int $bits * @param int $timeout - * @param array $p + * @param array $partial */ function createKey($bits = 1024, $timeout = false, $partial = array()) { @@ -716,7 +716,12 @@ class RSA * * @access private * @see self::setPrivateKeyFormat() - * @param string $RSAPrivateKey + * @param Math_BigInteger $n + * @param Math_BigInteger $e + * @param Math_BigInteger $d + * @param array<int,Math_BigInteger> $primes + * @param array<int,Math_BigInteger> $exponents + * @param array<int,Math_BigInteger> $coefficients * @return string */ function _convertPrivateKey($n, $e, $d, $primes, $exponents, $coefficients) @@ -997,8 +1002,9 @@ class RSA * * @access private * @see self::setPublicKeyFormat() - * @param string $RSAPrivateKey - * @return string + * @param Math_BigInteger $n + * @param Math_BigInteger $e + * @return string|array<string,Math_BigInteger> */ function _convertPublicKey($n, $e) { @@ -1213,6 +1219,7 @@ class RSA $length = $this->_decodeLength($temp); switch ($this->_string_shift($temp, $length)) { case "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01": // rsaEncryption + case "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x0A": // rsaPSS break; case "\x2a\x86\x48\x86\xf7\x0d\x01\x05\x03": // pbeWithMD5AndDES-CBC /* @@ -1539,6 +1546,8 @@ class RSA return $components; } + + return false; } /** @@ -1878,7 +1887,6 @@ class RSA * * @see self::getPublicKey() * @access public - * @param string $key * @param int $type optional */ function getPublicKey($type = self::PUBLIC_FORMAT_PKCS8) @@ -1936,7 +1944,6 @@ class RSA * * @see self::getPublicKey() * @access public - * @param string $key * @param int $type optional * @return mixed */ @@ -1961,8 +1968,7 @@ class RSA * * @see self::getPrivateKey() * @access private - * @param string $key - * @param int $type optional + * @param int $mode optional */ function _getPrivatePublicKey($mode = self::PUBLIC_FORMAT_PKCS8) { @@ -2179,7 +2185,7 @@ class RSA * of the hash function Hash) and 0. * * @access public - * @param int $format + * @param int $sLen */ function setSaltLength($sLen) { @@ -2212,7 +2218,7 @@ class RSA * See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}. * * @access private - * @param string $x + * @param int|string|resource $x * @return \phpseclib\Math\BigInteger */ function _os2ip($x) @@ -2439,7 +2445,7 @@ class RSA * * @access private * @param string $mgfSeed - * @param int $mgfLen + * @param int $maskLen * @return string */ function _mgf1($mgfSeed, $maskLen) @@ -2912,6 +2918,59 @@ class RSA } /** + * EMSA-PKCS1-V1_5-ENCODE (without NULL) + * + * Quoting https://tools.ietf.org/html/rfc8017#page-65, + * + * "The parameters field associated with id-sha1, id-sha224, id-sha256, + * id-sha384, id-sha512, id-sha512/224, and id-sha512/256 should + * generally be omitted, but if present, it shall have a value of type + * NULL" + * + * @access private + * @param string $m + * @param int $emLen + * @return string + */ + function _emsa_pkcs1_v1_5_encode_without_null($m, $emLen) + { + $h = $this->hash->hash($m); + if ($h === false) { + return false; + } + + switch ($this->hashName) { + case 'sha1': + $t = pack('H*', '301f300706052b0e03021a0414'); + break; + case 'sha256': + $t = pack('H*', '302f300b06096086480165030402010420'); + break; + case 'sha384': + $t = pack('H*', '303f300b06096086480165030402020430'); + break; + case 'sha512': + $t = pack('H*', '304f300b06096086480165030402030440'); + break; + default: + return false; + } + $t.= $h; + $tLen = strlen($t); + + if ($emLen < $tLen + 11) { + user_error('Intended encoded message length too short'); + return false; + } + + $ps = str_repeat(chr(0xFF), $emLen - $tLen - 3); + + $em = "\0\1$ps\0$t"; + + return $em; + } + + /** * RSASSA-PKCS1-V1_5-SIGN * * See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}. @@ -2948,6 +3007,7 @@ class RSA * * @access private * @param string $m + * @param string $s * @return string */ function _rsassa_pkcs1_v1_5_verify($m, $s) @@ -2976,13 +3036,17 @@ class RSA // EMSA-PKCS1-v1_5 encoding $em2 = $this->_emsa_pkcs1_v1_5_encode($m, $this->k); - if ($em2 === false) { + $em3 = $this->_emsa_pkcs1_v1_5_encode_without_null($m, $this->k); + + if ($em2 === false && $em3 === false) { user_error('RSA modulus too short'); return false; } // Compare - return $this->_equals($em, $em2); + + return ($em2 !== false && $this->_equals($em, $em2)) || + ($em3 !== false && $this->_equals($em, $em3)); } /** @@ -3088,7 +3152,7 @@ class RSA * * @see self::encrypt() * @access public - * @param string $plaintext + * @param string $ciphertext * @return string */ function decrypt($ciphertext) diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php b/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php index 334d10faf..b6874d357 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php @@ -203,8 +203,7 @@ class ANSI /** * Set the number of lines that should be logged past the terminal height * - * @param int $x - * @param int $y + * @param int $history * @access public */ function setHistory($history) @@ -316,19 +315,20 @@ class ANSI $mods = explode(';', $match[1]); foreach ($mods as $mod) { switch ($mod) { - case 0: // Turn off character attributes + case '': + case '0': // Turn off character attributes $attr_cell = clone $this->base_attr_cell; break; - case 1: // Turn bold mode on + case '1': // Turn bold mode on $attr_cell->bold = true; break; - case 4: // Turn underline mode on + case '4': // Turn underline mode on $attr_cell->underline = true; break; - case 5: // Turn blinking mode on + case '5': // Turn blinking mode on $attr_cell->blink = true; break; - case 7: // Turn reverse video on + case '7': // Turn reverse video on $attr_cell->reverse = !$attr_cell->reverse; $temp = $attr_cell->background; $attr_cell->background = $attr_cell->foreground; @@ -341,23 +341,23 @@ class ANSI $back = &$attr_cell->{ $attr_cell->reverse ? 'foreground' : 'background' }; switch ($mod) { // @codingStandardsIgnoreStart - case 30: $front = 'black'; break; - case 31: $front = 'red'; break; - case 32: $front = 'green'; break; - case 33: $front = 'yellow'; break; - case 34: $front = 'blue'; break; - case 35: $front = 'magenta'; break; - case 36: $front = 'cyan'; break; - case 37: $front = 'white'; break; - - case 40: $back = 'black'; break; - case 41: $back = 'red'; break; - case 42: $back = 'green'; break; - case 43: $back = 'yellow'; break; - case 44: $back = 'blue'; break; - case 45: $back = 'magenta'; break; - case 46: $back = 'cyan'; break; - case 47: $back = 'white'; break; + case '30': $front = 'black'; break; + case '31': $front = 'red'; break; + case '32': $front = 'green'; break; + case '33': $front = 'yellow'; break; + case '34': $front = 'blue'; break; + case '35': $front = 'magenta'; break; + case '36': $front = 'cyan'; break; + case '37': $front = 'white'; break; + + case '40': $back = 'black'; break; + case '41': $back = 'red'; break; + case '42': $back = 'green'; break; + case '43': $back = 'yellow'; break; + case '44': $back = 'blue'; break; + case '45': $back = 'magenta'; break; + case '46': $back = 'cyan'; break; + case '47': $back = 'white'; break; // @codingStandardsIgnoreEnd default: diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php index a304a000a..dc5b78f64 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php @@ -235,7 +235,7 @@ class ASN1 $current = array('start' => $start); $type = ord($encoded[$encoded_pos++]); - $start++; + $startOffset = 1; $constructed = ($type >> 5) & 1; @@ -245,13 +245,20 @@ class ASN1 // process septets (since the eighth bit is ignored, it's not an octet) do { $temp = ord($encoded[$encoded_pos++]); + $startOffset++; $loop = $temp >> 7; $tag <<= 7; - $tag |= $temp & 0x7F; - $start++; + $temp &= 0x7F; + // "bits 7 to 1 of the first subsequent octet shall not all be zero" + if ($startOffset == 2 && $temp == 0) { + return false; + } + $tag |= $temp; } while ($loop); } + $start+= $startOffset; + // Length, as discussed in paragraph 8.1.3 of X.690-0207.pdf#page=13 $length = ord($encoded[$encoded_pos++]); $start++; @@ -344,13 +351,16 @@ class ASN1 switch ($tag) { case self::TYPE_BOOLEAN: // "The contents octets shall consist of a single octet." -- paragraph 8.2.1 - //if (strlen($content) != 1) { - // return false; - //} + if ($constructed || strlen($content) != 1) { + return false; + } $current['content'] = (bool) ord($content[$content_pos]); break; case self::TYPE_INTEGER: case self::TYPE_ENUMERATED: + if ($constructed) { + return false; + } $current['content'] = new BigInteger(substr($content, $content_pos), -256); break; case self::TYPE_REAL: // not currently supported @@ -370,15 +380,15 @@ class ASN1 $last = count($temp) - 1; for ($i = 0; $i < $last; $i++) { // all subtags should be bit strings - //if ($temp[$i]['type'] != self::TYPE_BIT_STRING) { - // return false; - //} + if ($temp[$i]['type'] != self::TYPE_BIT_STRING) { + return false; + } $current['content'].= substr($temp[$i]['content'], 1); } // all subtags should be bit strings - //if ($temp[$last]['type'] != self::TYPE_BIT_STRING) { - // return false; - //} + if ($temp[$last]['type'] != self::TYPE_BIT_STRING) { + return false; + } $current['content'] = $temp[$last]['content'][0] . $current['content'] . substr($temp[$i]['content'], 1); } break; @@ -395,9 +405,9 @@ class ASN1 } $content_pos += $temp['length']; // all subtags should be octet strings - //if ($temp['type'] != self::TYPE_OCTET_STRING) { - // return false; - //} + if ($temp['type'] != self::TYPE_OCTET_STRING) { + return false; + } $current['content'].= $temp['content']; $length+= $temp['length']; } @@ -408,12 +418,15 @@ class ASN1 break; case self::TYPE_NULL: // "The contents octets shall not contain any octets." -- paragraph 8.8.2 - //if (strlen($content)) { - // return false; - //} + if ($constructed || strlen($content)) { + return false; + } break; case self::TYPE_SEQUENCE: case self::TYPE_SET: + if (!$constructed) { + return false; + } $offset = 0; $current['content'] = array(); $content_len = strlen($content); @@ -434,7 +447,13 @@ class ASN1 } break; case self::TYPE_OBJECT_IDENTIFIER: + if ($constructed) { + return false; + } $current['content'] = $this->_decodeOID(substr($content, $content_pos)); + if ($current['content'] === false) { + return false; + } break; /* Each character string type shall be encoded as if it had been declared: [UNIVERSAL x] IMPLICIT OCTET STRING @@ -464,12 +483,20 @@ class ASN1 case self::TYPE_UTF8_STRING: // ???? case self::TYPE_BMP_STRING: + if ($constructed) { + return false; + } $current['content'] = substr($content, $content_pos); break; case self::TYPE_UTC_TIME: case self::TYPE_GENERALIZED_TIME: + if ($constructed) { + return false; + } $current['content'] = $this->_decodeTime(substr($content, $content_pos), $tag); + break; default: + return false; } $start+= $length; @@ -790,7 +817,7 @@ class ASN1 * * @param string $source * @param string $mapping - * @param int $idx + * @param array $special * @return string * @access public */ @@ -806,6 +833,7 @@ class ASN1 * @param string $source * @param string $mapping * @param int $idx + * @param array $special * @return string * @access private */ @@ -1126,6 +1154,11 @@ class ASN1 $oid = array(); $pos = 0; $len = strlen($content); + + if (ord($content[$len - 1]) & 0x80) { + return false; + } + $n = new BigInteger(); while ($pos < $len) { $temp = ord($content[$pos++]); @@ -1161,7 +1194,7 @@ class ASN1 * Called by _encode_der() * * @access private - * @param string $content + * @param string $source * @return string */ function _encodeOID($source) diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php index ddbc61595..7b1b1cfad 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php +++ b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php @@ -1608,7 +1608,7 @@ class X509 * Map extension values from octet string to extension-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1661,7 +1661,7 @@ class X509 * Map extension values from extension-specific internal format to * octet string. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1727,7 +1727,7 @@ class X509 * Map attribute values from ANY type to attribute-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1768,7 +1768,7 @@ class X509 * Map attribute values from attribute-specific internal format to * ANY type. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1811,7 +1811,7 @@ class X509 * Map DN values from ANY type to DN-specific internal * format. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -1841,7 +1841,7 @@ class X509 * Map DN values from DN-specific internal format to * ANY type. * - * @param array ref $root + * @param array $root (by reference) * @param string $path * @param object $asn1 * @access private @@ -3195,7 +3195,8 @@ class X509 /** * Load a Certificate Signing Request * - * @param string $csr + * @param string|array $csr + * @param int $mode * @access public * @return mixed */ @@ -3332,7 +3333,7 @@ class X509 * * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen * - * @param string $csr + * @param string|array $spkac * @access public * @return mixed */ @@ -3403,7 +3404,7 @@ class X509 /** * Save a SPKAC CSR request * - * @param array $csr + * @param string|array $spkac * @param int $format optional * @access public * @return string @@ -3447,6 +3448,7 @@ class X509 * Load a Certificate Revocation List * * @param string $crl + * @param int $mode * @access public * @return mixed */ @@ -4043,8 +4045,7 @@ class X509 /** * X.509 certificate signing helper function. * - * @param object $key - * @param \phpseclib\File\X509 $subject + * @param \phpseclib\File\X509 $key * @param string $signatureAlgorithm * @access public * @return mixed @@ -4119,7 +4120,7 @@ class X509 * Set Serial Number * * @param string $serial - * @param $base optional + * @param int $base optional * @access public */ function setSerialNumber($serial, $base = -256) @@ -4782,7 +4783,6 @@ class X509 * Set the IP Addresses's which the cert is to be valid for * * @access public - * @param string $ipAddress optional */ function setIPAddress() { @@ -5054,11 +5054,16 @@ class X509 * subject=/O=organization/OU=org unit/CN=common name * issuer=/O=organization/CN=common name */ - $temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1); - // remove the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- stuff - $temp = preg_replace('#-+[^-]+-+#', '', $temp); + if (strlen($str) > ini_get('pcre.backtrack_limit')) { + $temp = $str; + } else { + $temp = preg_replace('#.*?^-+[^-]+-+[\r\n ]*$#ms', '', $str, 1); + $temp = preg_replace('#-+END.*[\r\n ]*.*#ms', '', $str, 1); + } // remove new lines $temp = str_replace(array("\r", "\n", ' '), '', $temp); + // remove the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- stuff + $temp = preg_replace('#^-+[^-]+-+|-+[^-]+-+$#', '', $temp); $temp = preg_match('#^[a-zA-Z\d/+]*={0,2}$#', $temp) ? base64_decode($temp) : false; return $temp != false ? $temp : $str; } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php index e7f664670..fc24b9145 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php @@ -243,7 +243,7 @@ class BigInteger * ?> * </code> * - * @param $x base-10 number or base-$base number if $base set. + * @param int|string|resource $x base-10 number or base-$base number if $base set. * @param int $base * @return \phpseclib\Math\BigInteger * @access public @@ -658,11 +658,11 @@ class BigInteger { $hex = $this->toHex($twos_compliment); $bits = ''; - for ($i = strlen($hex) - 8, $start = strlen($hex) & 7; $i >= $start; $i-=8) { - $bits = str_pad(decbin(hexdec(substr($hex, $i, 8))), 32, '0', STR_PAD_LEFT) . $bits; + for ($i = strlen($hex) - 6, $start = strlen($hex) % 6; $i >= $start; $i-=6) { + $bits = str_pad(decbin(hexdec(substr($hex, $i, 6))), 24, '0', STR_PAD_LEFT) . $bits; } if ($start) { // hexdec('') == 0 - $bits = str_pad(decbin(hexdec(substr($hex, 0, $start))), 8, '0', STR_PAD_LEFT) . $bits; + $bits = str_pad(decbin(hexdec(substr($hex, 0, $start))), 8 * $start, '0', STR_PAD_LEFT) . $bits; } $result = $this->precision > 0 ? substr($bits, -$this->precision) : ltrim($bits, '0'); @@ -1994,7 +1994,7 @@ class BigInteger * * @see self::_slidingWindow() * @access private - * @param \phpseclib\Math\BigInteger + * @param \phpseclib\Math\BigInteger $n * @return \phpseclib\Math\BigInteger */ function _mod2($n) @@ -2688,7 +2688,7 @@ class BigInteger * Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y). * * @param \phpseclib\Math\BigInteger $y - * @return int < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal. + * @return int that is < 0 if $this is less than $y; > 0 if $this is greater than $y, and 0 if they are equal. * @access public * @see self::equals() * @internal Could return $this->subtract($x), but that's not as fast as what we do do. @@ -3090,7 +3090,7 @@ class BigInteger * * Byte length is equal to $length. Uses \phpseclib\Crypt\Random if it's loaded and mt_rand if it's not. * - * @param int $length + * @param int $size * @return \phpseclib\Math\BigInteger * @access private */ @@ -3557,7 +3557,7 @@ class BigInteger * * Removes leading zeros and truncates (if necessary) to maintain the appropriate precision * - * @param \phpseclib\Math\BigInteger + * @param \phpseclib\Math\BigInteger $result * @return \phpseclib\Math\BigInteger * @see self::_trim() * @access private @@ -3634,8 +3634,8 @@ class BigInteger /** * Array Repeat * - * @param $input Array - * @param $multiplier mixed + * @param array $input + * @param mixed $multiplier * @return array * @access private */ @@ -3649,8 +3649,8 @@ class BigInteger * * Shifts binary strings $shift bits, essentially multiplying by 2**$shift. * - * @param $x String - * @param $shift Integer + * @param string $x (by reference) + * @param int $shift * @return string * @access private */ @@ -3678,8 +3678,8 @@ class BigInteger * * Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder. * - * @param $x String - * @param $shift Integer + * @param string $x (by referenc) + * @param int $shift * @return string * @access private */ diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php index 7c821377b..34741831b 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php @@ -260,6 +260,16 @@ class SFTP extends SSH2 var $requestBuffer = array(); /** + * Preserve timestamps on file downloads / uploads + * + * @see self::get() + * @see self::put() + * @var bool + * @access private + */ + var $preserveTime = false; + + /** * Default Constructor. * * Connects to an SFTP server @@ -406,7 +416,6 @@ class SFTP extends SSH2 * Login * * @param string $username - * @param string $password * @return bool * @access public */ @@ -1015,7 +1024,7 @@ class SFTP extends SSH2 uasort($contents, array(&$this, '_comparator')); } - return $raw ? $contents : array_keys($contents); + return $raw ? $contents : array_map('strval', array_keys($contents)); } /** @@ -1217,7 +1226,7 @@ class SFTP extends SSH2 * * Mainly used by file_exists * - * @param string $dir + * @param string $path * @return mixed * @access private */ @@ -1772,6 +1781,8 @@ class SFTP extends SSH2 * Creates a directory. * * @param string $dir + * @param int $mode + * @param bool $recursive * @return bool * @access public */ @@ -1804,6 +1815,7 @@ class SFTP extends SSH2 * Helper function for directory creation * * @param string $dir + * @param int $mode * @return bool * @access private */ @@ -2075,7 +2087,14 @@ class SFTP extends SSH2 } if ($mode & self::SOURCE_LOCAL_FILE) { - fclose($fp); + if ($this->preserveTime) { + $stat = fstat($fp); + $this->touch($remote_file, $stat['mtime'], $stat['atime']); + } + + if (isset($fp) && is_resource($fp)) { + fclose($fp); + } } return $this->_close_handle($handle); @@ -2198,7 +2217,7 @@ class SFTP extends SSH2 $res_offset = $stat['size']; } else { $res_offset = 0; - if ($local_file !== false) { + if ($local_file !== false && !is_callable($local_file)) { $fp = fopen($local_file, 'wb'); if (!$fp) { return false; @@ -2208,7 +2227,7 @@ class SFTP extends SSH2 } } - $fclose_check = $local_file !== false && !is_resource($local_file); + $fclose_check = $local_file !== false && !is_callable($local_file) && !is_resource($local_file); $start = $offset; $read = 0; @@ -2229,9 +2248,6 @@ class SFTP extends SSH2 } $packet = null; $read+= $packet_size; - if (is_callable($progressCallback)) { - call_user_func($progressCallback, $read); - } $i++; } @@ -2258,9 +2274,14 @@ class SFTP extends SSH2 $offset+= strlen($temp); if ($local_file === false) { $content.= $temp; + } elseif (is_callable($local_file)) { + $local_file($temp); } else { fputs($fp, $temp); } + if (is_callable($progressCallback)) { + call_user_func($progressCallback, $offset); + } $temp = null; break; case NET_SFTP_STATUS: @@ -2292,6 +2313,11 @@ class SFTP extends SSH2 if ($fclose_check) { fclose($fp); + + if ($this->preserveTime) { + $stat = $this->stat($remote_file); + touch($local_file, $stat['mtime'], $stat['atime']); + } } if (!$this->_close_handle($handle)) { @@ -2713,6 +2739,7 @@ class SFTP extends SSH2 * * @param string $path * @param string $prop + * @param mixed $type * @return mixed * @access private */ @@ -2953,6 +2980,7 @@ class SFTP extends SSH2 * * @param int $type * @param string $data + * @param int $request_id * @see self::_get_sftp_packet() * @see self::_send_channel_packet() * @return bool @@ -2960,6 +2988,10 @@ class SFTP extends SSH2 */ function _send_sftp_packet($type, $data, $request_id = 1) { + // in SSH2.php the timeout is cumulative per function call. eg. exec() will + // timeout after 10s. but for SFTP.php it's cumulative per packet + $this->curTimeout = $this->timeout; + $packet = $this->use_request_id ? pack('NCNa*', strlen($data) + 5, $type, $request_id, $data) : pack('NCa*', strlen($data) + 1, $type, $data); @@ -2972,9 +3004,17 @@ class SFTP extends SSH2 $packet_type = '-> ' . $this->packet_types[$type] . ' (' . round($stop - $start, 4) . 's)'; 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(); + switch (PHP_SAPI) { + case 'cli': + $start = $stop = "\r\n"; + break; + default: + $start = '<pre>'; + $stop = '</pre>'; + } + echo $start . $this->_format_log(array($data), array($packet_type)) . $stop; + @flush(); + @ob_flush(); } else { $this->packet_type_log[] = $packet_type; if (NET_SFTP_LOGGING == self::LOG_COMPLEX) { @@ -3081,9 +3121,17 @@ class SFTP extends SSH2 $packet_type = '<- ' . $this->packet_types[$this->packet_type] . ' (' . round($stop - $start, 4) . 's)'; 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(); + switch (PHP_SAPI) { + case 'cli': + $start = $stop = "\r\n"; + break; + default: + $start = '<pre>'; + $stop = '</pre>'; + } + echo $start . $this->_format_log(array($packet), array($packet_type)) . $stop; + @flush(); + @ob_flush(); } else { $this->packet_type_log[] = $packet_type; if (NET_SFTP_LOGGING == self::LOG_COMPLEX) { @@ -3176,4 +3224,24 @@ class SFTP extends SSH2 $this->pwd = false; parent::_disconnect($reason); } + + /** + * Enable Date Preservation + * + * @access public + */ + function enableDatePreservation() + { + $this->preserveTime = true; + } + + /** + * Disable Date Preservation + * + * @access public + */ + function disableDatePreservation() + { + $this->preserveTime = false; + } } diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php index d2c4425de..ec9e5841a 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php @@ -410,7 +410,7 @@ class Stream { switch ($whence) { case SEEK_SET: - if ($offset >= $this->size || $offset < 0) { + if ($offset < 0) { return false; } break; @@ -447,7 +447,9 @@ class Stream // and https://github.com/php/php-src/blob/master/main/php_streams.h#L592 switch ($option) { case 1: // PHP_STREAM_META_TOUCH - return $this->sftp->touch($path, $var[0], $var[1]); + $time = isset($var[0]) ? $var[0] : null; + $atime = isset($var[1]) ? $var[1] : null; + return $this->sftp->touch($path, $time, $atime); case 2: // PHP_STREAM_OWNER_NAME case 3: // PHP_STREAM_GROUP_NAME return false; @@ -626,7 +628,6 @@ class Stream * $options. What does 8 correspond to? * * @param string $path - * @param int $mode * @param int $options * @return bool * @access public @@ -768,8 +769,8 @@ class Stream * If NET_SFTP_STREAM_LOGGING is defined all calls will be output on the screen and then (regardless of whether or not * NET_SFTP_STREAM_LOGGING is enabled) the parameters will be passed through to the appropriate method. * - * @param string - * @param array + * @param string $name + * @param array $arguments * @return mixed * @access public */ diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php index ff48d5436..e372b8b92 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php @@ -812,6 +812,7 @@ class SSH1 * @see self::interactiveRead() * @see self::interactiveWrite() * @param string $cmd + * @param bool $block * @return mixed * @access public */ @@ -1385,7 +1386,6 @@ class SSH1 * named constants from it, using the value as the name of the constant and the index as the value of the constant. * If any of the constants that would be defined already exists, none of the constants will be defined. * - * @param array $array * @access private */ function _define_array() @@ -1584,7 +1584,8 @@ class SSH1 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param string $data + * @param int $protocol_flags + * @param string $message * @access private */ function _append_log($protocol_flags, $message) diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php index ba83c9d0e..f8f8dcfde 100644 --- a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php +++ b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php @@ -688,6 +688,14 @@ class SSH2 var $curTimeout; /** + * Keep Alive Interval + * + * @see self::setKeepAlive() + * @access private + */ + var $keepAlive; + + /** * Real-time log file pointer * * @see self::_append_log() @@ -1538,6 +1546,32 @@ class SSH2 return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); } + $server_host_key_algorithm = $this->_array_intersect_first($server_host_key_algorithms, $this->server_host_key_algorithms); + if ($server_host_key_algorithm === false) { + user_error('No compatible server host key algorithms found'); + return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + } + + $mac_algorithm_in = $this->_array_intersect_first($s2c_mac_algorithms, $this->mac_algorithms_server_to_client); + if ($mac_algorithm_in === false) { + user_error('No compatible server to client message authentication algorithms found'); + return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + } + + $compression_algorithm_out = $this->_array_intersect_first($c2s_compression_algorithms, $this->compression_algorithms_client_to_server); + if ($compression_algorithm_out === false) { + user_error('No compatible client to server compression algorithms found'); + return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + } + //$this->decompress = $compression_algorithm_out == 'zlib'; + + $compression_algorithm_in = $this->_array_intersect_first($s2c_compression_algorithms, $this->compression_algorithms_client_to_server); + if ($compression_algorithm_in === false) { + user_error('No compatible server to client compression algorithms found'); + return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); + } + //$this->compress = $compression_algorithm_in == 'zlib'; + // Only relevant in diffie-hellman-group-exchange-sha{1,256}, otherwise empty. $exchange_hash_rfc4419 = ''; @@ -1773,12 +1807,6 @@ class SSH2 $this->session_id = $this->exchange_hash; } - $server_host_key_algorithm = $this->_array_intersect_first($server_host_key_algorithms, $this->server_host_key_algorithms); - if ($server_host_key_algorithm === false) { - user_error('No compatible server host key algorithms found'); - return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); - } - switch ($server_host_key_algorithm) { case 'ssh-dss': $expected_key_format = 'ssh-dss'; @@ -1903,14 +1931,14 @@ class SSH2 $this->decrypt->decrypt(str_repeat("\0", 1536)); } - $mac_algorithm = $this->_array_intersect_first($c2s_mac_algorithms, $this->mac_algorithms_client_to_server); - if ($mac_algorithm === false) { + $mac_algorithm_out = $this->_array_intersect_first($c2s_mac_algorithms, $this->mac_algorithms_client_to_server); + if ($mac_algorithm_out === false) { user_error('No compatible client to server message authentication algorithms found'); return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); } $createKeyLength = 0; // ie. $mac_algorithm == 'none' - switch ($mac_algorithm) { + switch ($mac_algorithm_out) { case 'hmac-sha2-256': $this->hmac_create = new Hash('sha256'); $createKeyLength = 32; @@ -1931,17 +1959,11 @@ class SSH2 $this->hmac_create = new Hash('md5-96'); $createKeyLength = 16; } - $this->hmac_create->name = $mac_algorithm; - - $mac_algorithm = $this->_array_intersect_first($s2c_mac_algorithms, $this->mac_algorithms_server_to_client); - if ($mac_algorithm === false) { - user_error('No compatible server to client message authentication algorithms found'); - return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); - } + $this->hmac_create->name = $mac_algorithm_out; $checkKeyLength = 0; $this->hmac_size = 0; - switch ($mac_algorithm) { + switch ($mac_algorithm_in) { case 'hmac-sha2-256': $this->hmac_check = new Hash('sha256'); $checkKeyLength = 32; @@ -1967,7 +1989,7 @@ class SSH2 $checkKeyLength = 16; $this->hmac_size = 12; } - $this->hmac_check->name = $mac_algorithm; + $this->hmac_check->name = $mac_algorithm_in; $key = $kexHash->hash($keyBytes . $this->exchange_hash . 'E' . $this->session_id); while ($createKeyLength > strlen($key)) { @@ -1981,20 +2003,6 @@ class SSH2 } $this->hmac_check->setKey(substr($key, 0, $checkKeyLength)); - $compression_algorithm = $this->_array_intersect_first($c2s_compression_algorithms, $this->compression_algorithms_client_to_server); - if ($compression_algorithm === false) { - user_error('No compatible client to server compression algorithms found'); - return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); - } - //$this->decompress = $compression_algorithm == 'zlib'; - - $compression_algorithm = $this->_array_intersect_first($s2c_compression_algorithms, $this->compression_algorithms_client_to_server); - if ($compression_algorithm === false) { - user_error('No compatible server to client compression algorithms found'); - return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED); - } - //$this->compress = $compression_algorithm == 'zlib'; - return true; } @@ -2112,8 +2120,6 @@ class SSH2 * The $password parameter can be a plaintext password, a \phpseclib\Crypt\RSA object or an array * * @param string $username - * @param mixed $password - * @param mixed $... * @return bool * @see self::_login() * @access public @@ -2125,11 +2131,13 @@ class SSH2 // try logging with 'none' as an authentication method first since that's what // PuTTY does - if ($this->_login($username)) { - return true; - } - if (count($args) == 1) { - return false; + if (substr($this->server_identifier, 0, 13) != 'SSH-2.0-CoreFTP') { + if ($this->_login($username)) { + return true; + } + if (count($args) == 1) { + return false; + } } return call_user_func_array(array(&$this, '_login'), $args); } @@ -2138,8 +2146,6 @@ class SSH2 * Login Helper * * @param string $username - * @param mixed $password - * @param mixed $... * @return bool * @see self::_login_helper() * @access private @@ -2400,7 +2406,6 @@ class SSH2 /** * Handle the keyboard-interactive requests / responses. * - * @param string $responses... * @return bool * @access private */ @@ -2545,7 +2550,7 @@ class SSH2 * Login with an RSA private key * * @param string $username - * @param \phpseclib\Crypt\RSA $password + * @param \phpseclib\Crypt\RSA $privatekey * @return bool * @access private * @internal It might be worthwhile, at some point, to protect against {@link http://tools.ietf.org/html/rfc4251#section-9.3.9 traffic analysis} @@ -2629,6 +2634,13 @@ class SSH2 // we'll just take it on faith that the public key blob and the public key algorithm name are as // they should be $this->_updateLogHistory('UNKNOWN (60)', 'NET_SSH2_MSG_USERAUTH_PK_OK'); + break; + case NET_SSH2_MSG_USERAUTH_SUCCESS: + $this->bitmap |= self::MASK_LOGIN; + return true; + default: + user_error('Unexpected response to publickey authentication pt 1'); + return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); } $packet = $part1 . chr(1) . $part2; @@ -2663,7 +2675,8 @@ class SSH2 return true; } - return false; + user_error('Unexpected response to publickey authentication pt 2'); + return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); } /** @@ -2681,6 +2694,19 @@ class SSH2 } /** + * Set Keep Alive + * + * Sends an SSH2_MSG_IGNORE message every x seconds, if x is a positive non-zero number. + * + * @param int $interval + * @access public + */ + function setKeepAlive($interval) + { + $this->keepAlive = $interval; + } + + /** * Get the output from stdError * * @access public @@ -2909,28 +2935,6 @@ class SSH2 return false; } - $response = $this->_get_binary_packet(); - if ($response === false) { - $this->bitmap = 0; - user_error('Connection closed by server'); - return false; - } - - if (!strlen($response)) { - return false; - } - list(, $type) = unpack('C', $this->_string_shift($response, 1)); - - switch ($type) { - case NET_SSH2_MSG_CHANNEL_SUCCESS: - // if a pty can't be opened maybe commands can still be executed - case NET_SSH2_MSG_CHANNEL_FAILURE: - break; - default: - user_error('Unable to request pseudo-terminal'); - return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); - } - $packet = pack( 'CNNa*C', NET_SSH2_MSG_CHANNEL_REQUEST, @@ -2943,14 +2947,7 @@ class SSH2 return false; } - $this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_REQUEST; - - $response = $this->_get_channel_packet(self::CHANNEL_SHELL); - if ($response === false) { - return false; - } - - $this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_CHANNEL_DATA; + $this->channel_status[self::CHANNEL_SHELL] = NET_SSH2_MSG_IGNORE; $this->bitmap |= self::MASK_SHELL; @@ -3318,6 +3315,54 @@ class SSH2 */ function _get_binary_packet($skip_channel_filter = false) { + if ($skip_channel_filter) { + $read = array($this->fsock); + $write = $except = null; + + if ($this->curTimeout <= 0) { + if ($this->keepAlive <= 0) { + @stream_select($read, $write, $except, null); + } else { + if (!@stream_select($read, $write, $except, $this->keepAlive) && !count($read)) { + $this->_send_binary_packet(pack('CN', NET_SSH2_MSG_IGNORE, 0)); + return $this->_get_binary_packet(true); + } + } + } else { + if ($this->curTimeout < 0) { + $this->is_timeout = true; + return true; + } + + $read = array($this->fsock); + $write = $except = null; + + $start = microtime(true); + + if ($this->keepAlive > 0 && $this->keepAlive < $this->curTimeout) { + if (!@stream_select($read, $write, $except, $this->keepAlive) && !count($read)) { + $this->_send_binary_packet(pack('CN', NET_SSH2_MSG_IGNORE, 0)); + $elapsed = microtime(true) - $start; + $this->curTimeout-= $elapsed; + return $this->_get_binary_packet(true); + } + $elapsed = microtime(true) - $start; + $this->curTimeout-= $elapsed; + } + + $sec = floor($this->curTimeout); + $usec = 1000000 * ($this->curTimeout - $sec); + + // on windows this returns a "Warning: Invalid CRT parameters detected" error + if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) { + $this->is_timeout = true; + return true; + } + $elapsed = microtime(true) - $start; + $this->curTimeout-= $elapsed; + } + } + if (!is_resource($this->fsock) || feof($this->fsock)) { $this->bitmap = 0; user_error('Connection closed prematurely'); @@ -3469,9 +3514,19 @@ class SSH2 // only called when we've already logged in if (($this->bitmap & self::MASK_CONNECTED) && $this->isAuthenticated()) { switch (ord($payload[0])) { + case NET_SSH2_MSG_CHANNEL_REQUEST: + if (strlen($payload) == 31) { + extract(unpack('cpacket_type/Nchannel/Nlength', $payload)); + if (substr($payload, 9, $length) == 'keepalive@openssh.com' && isset($this->server_channels[$channel])) { + if (ord(substr($payload, 9 + $length))) { // want reply + $this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_SUCCESS, $this->server_channels[$channel])); + } + $payload = $this->_get_binary_packet($skip_channel_filter); + } + } + break; case NET_SSH2_MSG_CHANNEL_DATA: case NET_SSH2_MSG_CHANNEL_EXTENDED_DATA: - case NET_SSH2_MSG_CHANNEL_REQUEST: case NET_SSH2_MSG_CHANNEL_CLOSE: case NET_SSH2_MSG_CHANNEL_EOF: if (!$skip_channel_filter && !empty($this->server_channels)) { @@ -3651,8 +3706,9 @@ class SSH2 * * Returns the data as a string if it's available and false if not. * - * @param $client_channel - * @return mixed + * @param int $client_channel + * @param bool $skip_extended + * @return mixed|bool * @access private */ function _get_channel_packet($client_channel, $skip_extended = false) @@ -3666,36 +3722,13 @@ class SSH2 $response = $this->binary_packet_buffer; $this->binary_packet_buffer = false; } else { - $read = array($this->fsock); - $write = $except = null; - - if (!$this->curTimeout) { - @stream_select($read, $write, $except, null); - } else { - if ($this->curTimeout < 0) { - $this->is_timeout = true; - return true; - } - - $read = array($this->fsock); - $write = $except = null; - - $start = microtime(true); - $sec = floor($this->curTimeout); - $usec = 1000000 * ($this->curTimeout - $sec); - // on windows this returns a "Warning: Invalid CRT parameters detected" error - if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) { - $this->is_timeout = true; - if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) { - $this->_close_channel($client_channel); - } - return true; + $response = $this->_get_binary_packet(true); + if ($response === true && $this->is_timeout) { + if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) { + $this->_close_channel($client_channel); } - $elapsed = microtime(true) - $start; - $this->curTimeout-= $elapsed; + return true; } - - $response = $this->_get_binary_packet(true); if ($response === false) { $this->bitmap = 0; user_error('Connection closed by server'); @@ -3843,6 +3876,16 @@ class SSH2 return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); } break; + case NET_SSH2_MSG_IGNORE: + switch ($type) { + case NET_SSH2_MSG_CHANNEL_SUCCESS: + //$this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_DATA; + continue 3; + case NET_SSH2_MSG_CHANNEL_FAILURE: + user_error('Error opening channel'); + return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION); + } + break; case NET_SSH2_MSG_CHANNEL_REQUEST: switch ($type) { case NET_SSH2_MSG_CHANNEL_SUCCESS: @@ -3862,6 +3905,10 @@ class SSH2 switch ($type) { case NET_SSH2_MSG_CHANNEL_DATA: + //if ($this->channel_status[$channel] == NET_SSH2_MSG_IGNORE) { + // $this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_DATA; + //} + /* if ($channel == self::CHANNEL_EXEC) { // SCP requires null packets, such as this, be sent. further, in the case of the ssh.com SSH server @@ -3962,7 +4009,7 @@ class SSH2 $packet.= $hmac; $start = microtime(true); - $result = strlen($packet) == fputs($this->fsock, $packet); + $result = strlen($packet) == @fputs($this->fsock, $packet); $stop = microtime(true); if (defined('NET_SSH2_LOGGING')) { @@ -3982,7 +4029,8 @@ class SSH2 * * Makes sure that only the last 1MB worth of packets will be logged * - * @param string $data + * @param string $message_number + * @param string $message * @access private */ function _append_log($message_number, $message) @@ -4187,7 +4235,6 @@ class SSH2 * named constants from it, using the value as the name of the constant and the index as the value of the constant. * If any of the constants that would be defined already exists, none of the constants will be defined. * - * @param array $array * @access private */ function _define_array() @@ -4603,11 +4650,15 @@ class SSH2 //'none' // OPTIONAL no encryption; NOT RECOMMENDED ); - $engines = array( - Base::ENGINE_OPENSSL, - Base::ENGINE_MCRYPT, - Base::ENGINE_INTERNAL - ); + if ($this->crypto_engine) { + $engines = array($this->crypto_engine); + } else { + $engines = array( + Base::ENGINE_OPENSSL, + Base::ENGINE_MCRYPT, + Base::ENGINE_INTERNAL + ); + } $ciphers = array(); foreach ($engines as $engine) { diff --git a/vendor/simplepie/simplepie/README.markdown b/vendor/simplepie/simplepie/README.markdown index 9fcc12937..5522b7b72 100644 --- a/vendor/simplepie/simplepie/README.markdown +++ b/vendor/simplepie/simplepie/README.markdown @@ -91,7 +91,7 @@ Authors and contributors * [Michael Shipley][] (Submitter of patches, support) * [Steve Minutillo][] (Submitter of patches) -[Malcolm Blaney]: https://unicyclic.com/mal +[Malcolm Blaney]: https://mblaney.xyz [Ryan McCue]: http://ryanmccue.info [Ryan Parman]: http://ryanparman.com [Sam Sneddon]: https://gsnedders.com diff --git a/vendor/simplepie/simplepie/idn/idna_convert.class.php b/vendor/simplepie/simplepie/idn/idna_convert.class.php index ec137dc4c..1efeef966 100644 --- a/vendor/simplepie/simplepie/idn/idna_convert.class.php +++ b/vendor/simplepie/simplepie/idn/idna_convert.class.php @@ -374,7 +374,7 @@ class idna_convert $delim_pos = strrpos($encoded, '-'); if ($delim_pos > strlen($this->_punycode_prefix)) { for ($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k) { - $decoded[] = ord($encoded{$k}); + $decoded[] = ord($encoded[$k]); } } else { $decoded = array(); @@ -390,7 +390,7 @@ class idna_convert for ($enco_idx = ($delim_pos) ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) { for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) { - $digit = $this->_decode_digit($encoded{$enco_idx++}); + $digit = $this->_decode_digit($encoded[$enco_idx++]); $idx += $digit * $w; $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); @@ -793,7 +793,7 @@ class idna_convert $mode = 'next'; $test = 'none'; for ($k = 0; $k < $inp_len; ++$k) { - $v = ord($input{$k}); // Extract byte from input string + $v = ord($input[$k]); // Extract byte from input string if ($v < 128) { // We found an ASCII char - put into stirng as is $output[$out_len] = $v; @@ -932,7 +932,7 @@ class idna_convert $out_len++; $output[$out_len] = 0; } - $output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) ); + $output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4) ) ); } return $output; } diff --git a/vendor/simplepie/simplepie/library/SimplePie.php b/vendor/simplepie/simplepie/library/SimplePie.php index 5ce5f82f3..a6a5a9e13 100755 --- a/vendor/simplepie/simplepie/library/SimplePie.php +++ b/vendor/simplepie/simplepie/library/SimplePie.php @@ -33,7 +33,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @version 1.5.5 + * @version 1.5.6 * @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue * @author Ryan Parman * @author Sam Sneddon @@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie'); /** * SimplePie Version */ -define('SIMPLEPIE_VERSION', '1.5.5'); +define('SIMPLEPIE_VERSION', '1.5.6'); /** * SimplePie Build diff --git a/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php b/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php index 39972b5a7..027e131ef 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php +++ b/vendor/simplepie/simplepie/library/SimplePie/Content/Type/Sniffer.php @@ -150,7 +150,7 @@ class SimplePie_Content_Type_Sniffer } elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) { - return 'application/octect-stream'; + return 'application/octet-stream'; } return 'text/plain'; diff --git a/vendor/simplepie/simplepie/library/SimplePie/File.php b/vendor/simplepie/simplepie/library/SimplePie/File.php index 82db47ec9..90ad8196a 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/File.php +++ b/vendor/simplepie/simplepie/library/SimplePie/File.php @@ -109,11 +109,6 @@ class SimplePie_File curl_setopt($fp, CURLOPT_REFERER, $url); curl_setopt($fp, CURLOPT_USERAGENT, $useragent); curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); - if (!ini_get('open_basedir') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) - { - curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); - curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); - } foreach ($curl_options as $curl_param => $curl_value) { curl_setopt($fp, $curl_param, $curl_value); } @@ -148,7 +143,7 @@ class SimplePie_File $this->redirects++; $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); $previousStatusCode = $this->status_code; - $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options); $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; return; } @@ -233,7 +228,7 @@ class SimplePie_File $this->redirects++; $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); $previousStatusCode = $this->status_code; - $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options); $this->permanent_url = ($previousStatusCode == 301) ? $location : $url; return; } diff --git a/vendor/simplepie/simplepie/library/SimplePie/Locator.php b/vendor/simplepie/simplepie/library/SimplePie/Locator.php index bf7c21a6f..a207df6fe 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/Locator.php +++ b/vendor/simplepie/simplepie/library/SimplePie/Locator.php @@ -94,7 +94,7 @@ class SimplePie_Locator $this->registry = $registry; } - public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working) + public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working = null) { if ($this->is_feed($this->file)) { diff --git a/vendor/simplepie/simplepie/library/SimplePie/Misc.php b/vendor/simplepie/simplepie/library/SimplePie/Misc.php index 48d7c860a..a52498ac7 100644 --- a/vendor/simplepie/simplepie/library/SimplePie/Misc.php +++ b/vendor/simplepie/simplepie/library/SimplePie/Misc.php @@ -364,11 +364,12 @@ class SimplePie_Misc } // Check that the encoding is supported - if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80") + if (!in_array($input, mb_list_encodings())) { return false; } - if (!in_array($input, mb_list_encodings())) + + if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80") { return false; } diff --git a/vendor/splitbrain/php-archive/.gitignore b/vendor/splitbrain/php-archive/.gitignore index e11729e19..be66c59e6 100644 --- a/vendor/splitbrain/php-archive/.gitignore +++ b/vendor/splitbrain/php-archive/.gitignore @@ -5,4 +5,5 @@ vendor/ composer.lock apigen.phar docs/ -nbproject/
\ No newline at end of file +nbproject/ +.phpunit.result.cache diff --git a/vendor/splitbrain/php-archive/README.md b/vendor/splitbrain/php-archive/README.md index f18764b61..840148c56 100644 --- a/vendor/splitbrain/php-archive/README.md +++ b/vendor/splitbrain/php-archive/README.md @@ -6,8 +6,6 @@ needed for compression). It can create new files or extract existing ones. To keep things simple, the modification (adding or removing files) of existing archives is not supported. -[](https://travis-ci.org/splitbrain/php-archive) - Install ------- diff --git a/vendor/splitbrain/php-archive/composer.json b/vendor/splitbrain/php-archive/composer.json index 8102838fb..589ab0df4 100644 --- a/vendor/splitbrain/php-archive/composer.json +++ b/vendor/splitbrain/php-archive/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { - "phpunit/phpunit": "^4.8", + "phpunit/phpunit": "^8", "mikey179/vfsstream": "^1.6", "ext-zip": "*", "ext-bz2": "*" diff --git a/vendor/splitbrain/php-archive/phpunit.xml b/vendor/splitbrain/php-archive/phpunit.xml index c5e1ad3ce..41c7fb15d 100644 --- a/vendor/splitbrain/php-archive/phpunit.xml +++ b/vendor/splitbrain/php-archive/phpunit.xml @@ -7,8 +7,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false" - syntaxCheck="false"> + stopOnFailure="false"> <testsuites> <testsuite name="Test Suite"> <directory suffix=".php">./tests/</directory> diff --git a/vendor/splitbrain/php-archive/src/Tar.php b/vendor/splitbrain/php-archive/src/Tar.php index d5bdd612b..c48e80811 100644 --- a/vendor/splitbrain/php-archive/src/Tar.php +++ b/vendor/splitbrain/php-archive/src/Tar.php @@ -256,33 +256,36 @@ class Tar extends Archive throw new ArchiveIOException('Archive has been closed, files can no longer be added'); } - $fp = @fopen($file, 'rb'); - if (!$fp) { - throw new ArchiveIOException('Could not open file for reading: '.$file); - } - // create file header $this->writeFileHeader($fileinfo); - // write data - $read = 0; - while (!feof($fp)) { - $data = fread($fp, 512); - $read += strlen($data); - if ($data === false) { - break; + // write data, but only if we have data to write. + // note: on Windows fopen() on a directory will fail, so we prevent + // errors on Windows by testing if we have data to write. + if (!$fileinfo->getIsdir() && $fileinfo->getSize() > 0) { + $read = 0; + $fp = @fopen($file, 'rb'); + if (!$fp) { + throw new ArchiveIOException('Could not open file for reading: ' . $file); } - if ($data === '') { - break; + while (!feof($fp)) { + $data = fread($fp, 512); + $read += strlen($data); + if ($data === false) { + break; + } + if ($data === '') { + break; + } + $packed = pack("a512", $data); + $this->writebytes($packed); } - $packed = pack("a512", $data); - $this->writebytes($packed); - } - fclose($fp); + fclose($fp); - if($read != $fileinfo->getSize()) { - $this->close(); - throw new ArchiveCorruptedException("The size of $file changed while reading, archive corrupted. read $read expected ".$fileinfo->getSize()); + if ($read != $fileinfo->getSize()) { + $this->close(); + throw new ArchiveCorruptedException("The size of $file changed while reading, archive corrupted. read $read expected ".$fileinfo->getSize()); + } } if(is_callable($this->callback)) { diff --git a/vendor/splitbrain/php-cli/.gitignore b/vendor/splitbrain/php-cli/.gitignore index c6277c187..9f150adf9 100644 --- a/vendor/splitbrain/php-cli/.gitignore +++ b/vendor/splitbrain/php-cli/.gitignore @@ -5,4 +5,4 @@ vendor/ composer.lock apigen.phar docs/ - +.phpunit.result.cache diff --git a/vendor/splitbrain/php-cli/README.md b/vendor/splitbrain/php-cli/README.md index 5e42a55eb..7c68ceaa0 100644 --- a/vendor/splitbrain/php-cli/README.md +++ b/vendor/splitbrain/php-cli/README.md @@ -12,8 +12,6 @@ It takes care of It is lightweight and has **no 3rd party dependencies**. Note: this is for non-interactive scripts only. It has no readline or similar support. -[](https://travis-ci.org/splitbrain/php-cli) - ## Installation Use composer: diff --git a/vendor/splitbrain/php-cli/composer.json b/vendor/splitbrain/php-cli/composer.json index 79e2502c4..9e2629007 100644 --- a/vendor/splitbrain/php-cli/composer.json +++ b/vendor/splitbrain/php-cli/composer.json @@ -24,7 +24,7 @@ "psr/log": "Allows you to make the CLI available as PSR-3 logger" }, "require-dev": { - "phpunit/phpunit": "4.5.*" + "phpunit/phpunit": "^8" }, "autoload": { "psr-4": { diff --git a/vendor/splitbrain/php-cli/src/Options.php b/vendor/splitbrain/php-cli/src/Options.php index 74dae2be4..5ee6b6931 100644 --- a/vendor/splitbrain/php-cli/src/Options.php +++ b/vendor/splitbrain/php-cli/src/Options.php @@ -31,6 +31,9 @@ class Options /** @var Colors for colored help output */ protected $colors; + /** @var string newline used for spacing help texts */ + protected $newline = "\n"; + /** * Constructor * @@ -49,7 +52,8 @@ class Options '' => array( 'opts' => array(), 'args' => array(), - 'help' => '' + 'help' => '', + 'commandhelp' => 'This tool accepts a command as first parameter as outlined below:' ) ); // default command @@ -78,6 +82,26 @@ class Options } /** + * Sets the help text for the tools commands itself + * + * @param string $help + */ + public function setCommandHelp($help) + { + $this->setup['']['commandhelp'] = $help; + } + + /** + * Use a more compact help screen with less new lines + * + * @param bool $set + */ + public function useCompactHelp($set = true) + { + $this->newline = $set ? '' : "\n"; + } + + /** * Register the names of arguments for help generation and number checking * * This has to be called in the order arguments are expected @@ -342,6 +366,8 @@ class Options $text = ''; $hascommands = (count($this->setup) > 1); + $commandhelp = $this->setup['']["commandhelp"]; + foreach ($this->setup as $command => $config) { $hasopts = (bool)$this->setup[$command]['opts']; $hasargs = (bool)$this->setup[$command]['args']; @@ -353,7 +379,7 @@ class Options $text .= ' ' . $this->bin; $mv = 2; } else { - $text .= "\n"; + $text .= $this->newline; $text .= $this->colors->wrap(' ' . $command, Colors::C_PURPLE); $mv = 4; } @@ -374,14 +400,14 @@ class Options } $text .= ' ' . $out; } - $text .= "\n"; + $text .= $this->newline; // usage or command intro if ($this->setup[$command]['help']) { $text .= "\n"; $text .= $tf->format( array($mv, '*'), - array('', $this->setup[$command]['help'] . "\n") + array('', $this->setup[$command]['help'] . $this->newline) ); } @@ -412,7 +438,7 @@ class Options array('', $name, $opt['help']), array('', 'green', '') ); - $text .= "\n"; + $text .= $this->newline; } } @@ -422,7 +448,7 @@ class Options $text .= "\n"; $text .= $this->colors->wrap('ARGUMENTS:', Colors::C_BROWN); } - $text .= "\n"; + $text .= $this->newline; foreach ($this->setup[$command]['args'] as $arg) { $name = '<' . $arg['name'] . '>'; @@ -441,9 +467,9 @@ class Options $text .= "\n"; $text .= $tf->format( array($mv, '*'), - array('', 'This tool accepts a command as first parameter as outlined below:') + array('', $commandhelp) ); - $text .= "\n"; + $text .= $this->newline; } } diff --git a/vendor/splitbrain/slika/README.md b/vendor/splitbrain/slika/README.md index c5ed69ee8..0b987d442 100644 --- a/vendor/splitbrain/slika/README.md +++ b/vendor/splitbrain/slika/README.md @@ -28,7 +28,7 @@ use \splitbrain\slika\Exception; $options = [ 'quality' => 75 -] +]; try { Slika::run('input.png', $options) diff --git a/vendor/splitbrain/slika/src/Adapter.php b/vendor/splitbrain/slika/src/Adapter.php index 29b9b613f..99d1de1d3 100644 --- a/vendor/splitbrain/slika/src/Adapter.php +++ b/vendor/splitbrain/slika/src/Adapter.php @@ -57,8 +57,8 @@ abstract class Adapter * * You may omit one of the dimensions to auto calculate it based on the aspect ratio * - * @param int $width - * @param int $height + * @param int|string $width in pixels or % + * @param int|string $height in pixels or % * @return Adapter */ abstract public function resize($width, $height); @@ -69,8 +69,8 @@ abstract class Adapter * * You may omit one of the dimensions to use a square area * - * @param int $width - * @param int $height + * @param int|string $width in pixels or % + * @param int|string $height in pixels or % * @return Adapter */ abstract public function crop($width, $height); diff --git a/vendor/splitbrain/slika/src/GdAdapter.php b/vendor/splitbrain/slika/src/GdAdapter.php index 0f8db82e7..c55859955 100644 --- a/vendor/splitbrain/slika/src/GdAdapter.php +++ b/vendor/splitbrain/slika/src/GdAdapter.php @@ -268,6 +268,9 @@ class GdAdapter extends Adapter */ protected function boundingBox($width, $height) { + $width = $this->cleanDimension($width, $this->width); + $height = $this->cleanDimension($height, $this->height); + if ($width == 0 && $height == 0) { throw new Exception('You can not resize to 0x0'); } @@ -289,6 +292,26 @@ class GdAdapter extends Adapter } /** + * Ensure the given Dimension is a proper pixel value + * + * When a percentage is given, the value is calculated based on the given original dimension + * + * @param int|string $dim New Dimension + * @param int $orig Original dimension + * @return int + */ + protected function cleanDimension($dim, $orig) + { + if ($dim && substr($dim, -1) == '%') { + $dim = round($orig * ((float)$dim / 100)); + } else { + $dim = (int)$dim; + } + + return $dim; + } + + /** * Calculates crop position * * Given the wanted final size, this calculates which exact area needs to be cut |