Merge branch 'master' into form

This commit is contained in:
Satoshi Sahara 2020-08-26 20:37:42 +09:00 committed by GitHub
commit a74a1f3f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 1146 additions and 351 deletions

View File

@ -4,9 +4,6 @@ php:
- "nightly"
- "7.3"
- "7.2"
- "7.1"
- "7.0"
- "5.6"
env:
- DISABLE_FUNCTIONS=
- DISABLE_FUNCTIONS="gzopen"

View File

@ -1,172 +1,143 @@
<?php
class init_clean_id_test extends DokuWikiTest {
class init_clean_id_test extends DokuWikiTest
{
function teardown() {
/** @inheritDoc */
function teardown()
{
global $cache_cleanid;
$cache_cleanid = array();
}
function test_default(){
// we test multiple cases here
// format: $id, $ascii, $correct_output
$tests = array();
/**
* DataProvider
*
* @return Generator|array
* @see testCleanId
*/
public function provideTestData()
{
// input, expected, optional options array
$tests = [
['page', 'page'],
['pa_ge', 'pa_ge'],
['pa%ge', 'pa_ge'],
['pa#ge', 'pa_ge'],
['pàge', 'page'],
['pagĖ', 'page'],
['pa$%^*#ge', 'pa_ge'],
['*page*', 'page'],
['ښ', 'ښ'],
['päge', 'paege'],
['foo bar', 'foo_bar'],
['PÄGÖ', 'paegoe'],
['Faß', 'fass'],
['ښ侧化并곦 β', 'ښ侧化并곦_β'],
['page:page', 'page:page'],
['page;page', 'page:page'],
['page:page 1.2', 'page:page_1.2'],
['page._#!', 'page'],
['._#!page', 'page'],
['page._#!page', 'page._page'],
['ns._#!:page', 'ns:page'],
['ns:._#!page', 'ns:page'],
['ns._#!ns:page', 'ns._ns:page'],
['ns_:page', 'ns:page'],
['page...page', 'page...page'],
['page---page', 'page---page'],
['page___page', 'page_page'],
['page_-.page', 'page_-.page'],
[':page', 'page'],
[':ns:page', 'ns:page'],
['page:', 'page'],
['ns:page:', 'ns:page'],
// use-slash handling
['page/page', 'page_page', ['useslash' => 0]],
['page/page', 'page:page', ['useslash' => 1]],
// different sep-char
['pa-ge', 'pa-ge', ['sepchar' => '-']],
['pa%ge', 'pa-ge', ['sepchar' => '-']],
// no deaccenting
['pàge', 'pàge', ['deaccent' => 0]],
['pagĖ', 'pagė', ['deaccent' => 0]],
['pagĒēĔĕĖėĘęĚě', 'pagēēĕĕėėęęěě', ['deaccent' => 0]],
['ښ', 'ښ', ['deaccent' => 0]],
['ښ侧化并곦ঝഈ', 'ښ侧化并곦ঝഈ', ['deaccent' => 0]],
// romanize
['pàge', 'page', ['deaccent' => 2]],
['pagĖ', 'page', ['deaccent' => 2]],
['pagĒēĔĕĖėĘęĚě', 'pageeeeeeeeee', ['deaccent' => 2]],
['ښ', 'ښ', ['deaccent' => 2]],
['ښ侧化并곦ঝഈ', 'ښ侧化并곦ঝഈ', ['deaccent' => 2]],
// deaccent and force ascii
['pàge', 'page', ['deaccent' => 1, 'ascii' => true]],
['pagĖ', 'page', ['deaccent' => 1, 'ascii' => true]],
['pagĒēĔĕĖėĘęĚě', 'pageeeeeeeeee', ['deaccent' => 1, 'ascii' => true]],
['ښ', '', ['deaccent' => 1, 'ascii' => true]],
['ښ侧化并곦ঝഈ', '', ['deaccent' => 1, 'ascii' => true]],
// romanize and force ascii
['pàge', 'page', ['deaccent' => 2, 'ascii' => true]],
['pagĖ', 'page', ['deaccent' => 2, 'ascii' => true]],
['pagĒēĔĕĖėĘęĚě', 'pageeeeeeeeee', ['deaccent' => 2, 'ascii' => true]],
['ښ', '', ['deaccent' => 2, 'ascii' => true]],
['ښ侧化并곦ঝഈ', '', ['deaccent' => 2, 'ascii' => true]],
];
foreach ($tests as $test) {
// defaults
$sepchar = $test[2]['sepchar'] ?: '_';
$deaccent = isset($test[2]['deaccent']) ? $test[2]['deaccent'] : 1;
$ascii = $test[2]['ascii'] ?: false;
// unless set, test both useslash settings
if (isset($test[2]['useslash'])) {
yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, $test[2]['useslash']]);
} else {
yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, 0]);
yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, 1]);
}
}
}
/**
* @dataProvider provideTestData
* @param string $input
* @param string $expected
* @param bool $ascii
* @param string $sepchar
* @param int $deaccent
* @param int $useslash
*/
function testCleanId($input, $expected, $ascii, $sepchar, $deaccent, $useslash)
{
// set dokuwiki defaults
global $conf;
$conf['sepchar'] = '_';
$conf['deaccent'] = 1;
$conf['sepchar'] = $sepchar;
$conf['deaccent'] = $deaccent;
$conf['useslash'] = $useslash;
$tests[] = array('page',false,'page');
$tests[] = array('pa_ge',false,'pa_ge');
$tests[] = array('pa%ge',false,'pa_ge');
$tests[] = array('pa#ge',false,'pa_ge');
$tests[] = array('pàge',false,'page');
$tests[] = array('pagĖ',false,'page');
$tests[] = array('pa$%^*#ge',false,'pa_ge');
$tests[] = array('*page*',false,'page');
$tests[] = array('ښ',false,'ښ');
$tests[] = array('päge',false,'paege');
$tests[] = array('foo bar',false,'foo_bar');
$tests[] = array('PÄGÖ',false,'paegoe');
$tests[] = array('Faß','false','fass');
$tests[] = array('ښ侧化并곦 β',false,'ښ侧化并곦_β');
$tests[] = array('page:page',false,'page:page');
$tests[] = array('page;page',false,'page:page');
$tests[] = array('page:page 1.2',false,'page:page_1.2');
$tests[] = array('page._#!','false','page');
$tests[] = array('._#!page','false','page');
$tests[] = array('page._#!page','false','page._page');
$tests[] = array('ns._#!:page','false','ns:page');
$tests[] = array('ns:._#!page','false','ns:page');
$tests[] = array('ns._#!ns:page','false','ns._ns:page');
$tests[] = array('ns_:page',false,'ns:page');
$tests[] = array('page...page','false','page...page');
$tests[] = array('page---page','false','page---page');
$tests[] = array('page___page','false','page_page');
$tests[] = array('page_-.page','false','page_-.page');
$tests[] = array(':page',false,'page');
$tests[] = array(':ns:page',false,'ns:page');
$tests[] = array('page:',false,'page');
$tests[] = array('ns:page:',false,'ns:page');
$conf['useslash'] = 0;
$tests[] = array('page/page',false,'page_page');
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
$conf['useslash'] = 1;
$tests = array();
$tests[] = array('page/page',false,'page:page');
$this->teardown();
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
$result = cleanID($input, $ascii);
$this->assertEquals($expected, $result);
}
function test_sepchar(){
// we test multiple cases here
// format: $id, $ascii, $correct_output
$tests = array();
global $conf;
$conf['sepchar'] = '-';
$conf['deaccent'] = 1;
$tests[] = array('pa-ge',false,'pa-ge');
$tests[] = array('pa%ge',false,'pa-ge');
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
}
function test_deaccent_keep(){
// we test multiple cases here
// format: $id, $ascii, $correct_output
$tests = array();
global $conf;
$conf['sepchar'] = '_';
$conf['deaccent'] = 0;
$tests[] = array('pàge',false,'pàge');
$tests[] = array('pagĖ',false,'pagė');
$tests[] = array('pagĒēĔĕĖėĘęĚě',false,'pagēēĕĕėėęęěě');
$tests[] = array('ښ',false,'ښ');
$tests[] = array('ښ侧化并곦ঝഈβ',false,'ښ侧化并곦ঝഈβ');
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
}
function test_deaccent_romanize(){
// we test multiple cases here
// format: $id, $ascii, $correct_output
$tests = array();
global $conf;
$conf['sepchar'] = '_';
$conf['deaccent'] = 2;
$tests[] = array('pàge',false,'page');
$tests[] = array('pagĖ',false,'page');
$tests[] = array('pagĒēĔĕĖėĘęĚě',false,'pageeeeeeeeee');
$tests[] = array('ښ',false,'ښ');
$tests[] = array('ښ侧化并곦ঝഈβ',false,'ښ侧化并곦ঝഈβ');
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
}
function test_deaccent_ascii(){
// we test multiple cases here
// format: $id, $ascii, $correct_output
$tests = array();
global $conf;
$conf['sepchar'] = '_';
$conf['deaccent'] = 0;
$tests[] = array('pàge',true,'page');
$tests[] = array('pagĖ',true,'page');
$tests[] = array('pagĒēĔĕĖėĘęĚě',true,'pageeeeeeeeee');
$tests[] = array('ښ',true,'');
$tests[] = array('ښ侧化并곦ঝഈβ',true,'');
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
$conf['deaccent'] = 1;
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
$conf['deaccent'] = 2;
foreach($tests as $test){
$this->assertEquals(cleanID($test[0],$test[1]),$test[2]);
}
}
function test_caching_ascii() {
function test_caching_ascii()
{
global $conf;
$conf['deaccent'] = 0;
$this->assertEquals('pàge', cleanID('pàge',false));
$this->assertEquals('page', cleanID('pàge',true));
$this->assertEquals('pàge', cleanID('pàge', false));
$this->assertEquals('page', cleanID('pàge', true));
$this->assertEquals('page', cleanID('pagĖ',true));
$this->assertEquals('pagė', cleanID('pagĖ',false));
$this->assertEquals('page', cleanID('pagĖ', true));
$this->assertEquals('pagė', cleanID('pagĖ', false));
}
}
//Setup VIM: ex: et ts=4 :

View File

@ -0,0 +1,356 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
*/
class sort_with_collator_test extends DokuWikiTest
{
/*
* Dependency for tests that need "intl" extension.
*/
public function testIntlExtensionAvailability()
{
if (!class_exists('\Collator')) {
$this->markTestSkipped('Skipping all sort tests with collator, as they need "intl" extension');
}
$this->assertTrue(true); // avoid being marked as risky for having no assertion
}
/**
* Provide real word pairs of the languages being tested (when possible).
* Everything which is beyond the usual A-Z order should be checked,
* including every character with an accent (diacritic) used in the language.
*
* CHECKING NON-EQUIVALENT CHARACTERS (X < Y)
*
* In this case, the words are always sorted according to the character pair.
* Craft word pairs to double-check the collator, such that sort by the next
* character yields the opposite result.
*
* Esperanto example: ĉ < d
* ĉokolado, dento ==> ĉ < d ==> ĉokolado < dento
* (if ĉ < d would fail, o < e would also fail ==> collator failure)
*
* CHECKING EQUIVALENT CHARACTERS (X = Y)
*
* If the sole difference between the words is the character pair, the sort
* will be as if X < Y. Otherwise the characters will be treated as the same.
* Craft two word pairs to test both conditions.
*
* German example: a = ä
* Sole diff.: Apfel, Äpfel ==> a < ä ==> Apfel < Äpfel
* Otherwise: Ämter, Arzt ==> a = ä, m < r ==> Ämter < Arzt
*
* CHECKING MULTIPLE EQUIVALENT CHARACTERS (X = Y = Z = ...)
*
* An extension of the above case. If the sole difference between the words is
* a character pair from the given set, the sort will be as if X < Y < Z < ...
* Otherwise the characters will be treated as the same.
* Craft at least one word pair to test the first case and as many as possible
* to test the other case.
*
* Portuguese example: e = é = ê
* Sole diff.: de, ==> e < ê ==> de <
* Otherwise: , pedra ==> é = e, end of word < d ==> < pedra
* pêssego, peste ==> ê = e, s = s, s < t ==> pêssego < peste
*
* @return Generator|array
* @see testStrcmp
*/
public function provideWordPairs()
{
static $pairs = [
// Esperanto
'eo' => [
// c < ĉ < d
['celo', 'ĉapo'], ['ĉokolado', 'dento'],
// g < ĝ < h < ĥ < i
['glacio', 'ĝirafo'], ['ĝojo', 'haro'], ['horo', 'ĥameleono'], ['ĥoro', 'iam'],
// j < ĵ < k
['jes', 'ĵaŭdo'], ['ĵurnalo', 'kapo'],
// s < ŝ < t
['seka', 'ŝako'], ['ŝuo', 'tablo'],
// u < ŭ < v
['urso', 'ŭaŭ'], ['ŭo', 'vino'],
// natural sort
['paĝo 2', 'paĝo 10'], ['paĝo 51', 'paĝo 100']
],
// German
'de' => [
// a = ä
['Apfel', 'Äpfel'], ['Ämter', 'Arzt'],
// o = ö
['Tochter', 'Töchter'], ['Öl', 'Orange'],
// u = ü
['Mutter', 'Mütter'], ['Übersetzung', 'Uhrzeit'],
// ß = ss
['weiss', 'weiß'], ['Fuchs', 'Fuß'], ['Fraß', 'Frau'],
// natural sort
['Seite 2', 'Seite 10'], ['Seite 51', 'Seite 100']
],
// Portuguese
'pt' => [
// a = á = à = â = ã
['a', 'à'], ['água', 'amor'], ['às', 'ato'], ['âmbar', 'arte'], ['lã', 'lata'],
// e = é = ê
['de', 'dê'], ['pé', 'pedra'], ['pêssego', 'peste'],
// i = í
['liquido', 'líquido'], ['índio', 'indireto'],
// o = ó = ô = õ
['avó', 'avô'], ['ótimo', 'ovo'], ['ônibus', 'osso'], ['limões', 'limonada'],
// u = ú = ü (ü appears in old texts)
['numero', 'número'], ['último', 'um'], ['tranqüila', 'tranquilamente'],
// c = ç
['faca', 'faça'], ['taça', 'taco'],
// natural sort
['página 2', 'página 10'], ['página 51', 'página 100']
],
// Spanish
'es' => [
// n < ñ < o
['nube', 'ñoño'], ['ñu', 'ojo'],
// a = á
['mas', 'más'], ['ácido', 'agua'],
// e = é
['de', 'dé'], ['él', 'elefante'],
// i = í
['mi', 'mí'], ['íntimo', 'isla'],
// o = ó
['como', 'cómo'], ['óptimo', 'oreja'],
// u = ú
['tu', 'tú'], ['último', 'uno'],
// natural sort
['página 2', 'página 10'], ['página 51', 'página 100']
],
];
foreach ($pairs as $lang => $list) {
foreach ($list as $pair) {
yield [$lang, $pair[0], $pair[1]];
}
}
}
/**
* Provide the sorted sequences of all characters used in the languages being tested.
* Everything which is beyond the usual A-Z order should be checked.
*
* CHECKING NON-EQUIVALENT CHARACTERS (X < Y)
*
* Add a 2nd character to double-check the collator, such that sort by the 2nd
* character yields the opposite result.
*
* Esperanto example: ĉ < d
* 2nd character: ĉe, da ==> ĉ < d ==> ĉe < da
* (if ĉ < d would fail, e < a would also fail ==> collator failure)
*
* CHECKING EQUIVALENT CHARACTERS (X = Y = Z)
*
* Don't add a 2nd character, because it would break the test. The lone characters
* will be sorted as words with a sole difference, that is, as if X < Y < Z.
*
* German example: a = ä
* Sole difference: a, ä ==> a < ä
*
* @return Generator|array
* @see testSort
* @see testKSort
* @see testASort
* @see testASortFnUrl
* @see testASortFnSafe
* @see testASortFnUtf8
*/
public function provideSortedCharList()
{
static $lists = [
// Esperanto
// c < ĉ < d
// g < ĝ < h < ĥ < i
// j < ĵ < k
// s < ŝ < t
// u < ŭ < v
'eo' => 'a b ci ĉe da e f gu ĝo hi ĥe ia ju ĵo ke l m n o p r so ŝi te us ŭo ve z',
// German
// a = ä
// o = ö
// u = ü
// ß = ss
'de' => 'a ä b c d e f g h i j k l m n o ö p q r s ss ß st t u ü v w x y z',
// Portuguese
// a = á = à = â = ã
// e = é = ê
// i = í
// o = ó = ô = õ
// u = ú = ü (ü appears in old texts)
// c = ç
'pt' => 'a á à â ã b c ç d e é ê f g h i í j k l m n o ó ô õ p q r s t u ú ü v w x y z',
// Spanish
// n < ñ < o
// a = á
// e = é
// i = í
// o = ó
// u = ú
'es' => 'a á b c d e é f g h i í j k l m nu ño oh óh p q r s t u ú v w x y z',
];
foreach ($lists as $lang => $list) {
yield [$lang, $list];
}
}
/**
* @depends testIntlExtensionAvailability
* @dataProvider provideWordPairs
* @param string $lang
* @param string $word1
* @param string $word2
*/
public function testStrcmp($lang, $word1, $word2)
{
global $conf;
$conf['lang'] = $lang;
$this->assertLessThan(0, Sort::strcmp($word1, $word2));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testSort($lang, $list)
{
global $conf;
$conf['lang'] = $lang;
$sorted = explode(' ', $list);
$random = explode(' ', $list);
shuffle($random);
Sort::sort($random);
$this->assertEquals(array_values($random), array_values($sorted));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testKSort($lang, $list)
{
global $conf;
$conf['lang'] = $lang;
$sorted = array_flip(explode(' ', $list));
$random = explode(' ', $list);
shuffle($random);
$random = array_flip($random);
Sort::ksort($random);
$this->assertEquals(array_keys($random), array_keys($sorted));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testASort($lang, $list)
{
global $conf;
$conf['lang'] = $lang;
$sorted = explode(' ', $list);
$keys = array_keys($sorted);
shuffle($keys);
foreach ($keys as $key) {
$random[$key] = $sorted[$key];
}
Sort::asort($random);
$this->assertEquals(array_values($random), array_values($sorted));
$this->assertEquals(array_keys($random), array_keys($sorted));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testASortFnUrl($lang, $list)
{
global $conf;
$conf['fnencode'] = 'url';
$conf['lang'] = $lang;
$sorted = explode('+', urlencode($list));
$keys = array_keys($sorted);
shuffle($keys);
foreach ($keys as $key) {
$random[$key] = $sorted[$key];
}
Sort::asortFN($random);
$this->assertEquals(array_values($random), array_values($sorted));
$this->assertEquals(array_keys($random), array_keys($sorted));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testASortFnSafe($lang, $list)
{
global $conf;
$conf['fnencode'] = 'safe';
$conf['lang'] = $lang;
$sorted = explode(' ', $list);
foreach (array_keys($sorted) as $key) {
$sorted[$key] = SafeFN::encode($sorted[$key]);
}
$keys = array_keys($sorted);
shuffle($keys);
foreach ($keys as $key) {
$random[$key] = $sorted[$key];
}
Sort::asortFN($random);
$this->assertEquals(array_values($random), array_values($sorted));
$this->assertEquals(array_keys($random), array_keys($sorted));
}
/**
* @dataProvider provideSortedCharList
* @depends testIntlExtensionAvailability
* @param string $lang
* @param string $list
*/
public function testASortFnUtf8($lang, $list)
{
global $conf;
$conf['fnencode'] = 'utf-8';
$conf['lang'] = $lang;
$sorted = explode(' ', $list);
$keys = array_keys($sorted);
shuffle($keys);
foreach ($keys as $key) {
$random[$key] = $sorted[$key];
}
Sort::asortFN($random);
$this->assertEquals(array_values($random), array_values($sorted));
$this->assertEquals(array_keys($random), array_keys($sorted));
}
}

View File

@ -0,0 +1,148 @@
<?php
use dokuwiki\Utf8\Sort;
require_once __DIR__ . '/sort_with_collator.test.php';
/**
* Based on sort_with_collator.test.php.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
*/
class sort_without_collator_test extends sort_with_collator_test
{
/**
* Disable the "intl" extension.
*/
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
Sort::useIntl(false);
}
/**
* Reenable the "intl" extension.
*/
public static function tearDownAfterClass()
{
Sort::useIntl(true);
parent::tearDownAfterClass();
}
/**
* Since we always use the fallback sort, we do not check for
* the availability of the "intl" extension here at all.
*/
public function testIntlExtensionAvailability()
{
$this->assertTrue(true); // avoid being marked as risky for having no assertion
}
/**
* Provide real word pairs of the languages being tested (when possible).
* The pairs should show what the fallback sort can or cannot do, as it
* simply follows character codes.
*
* In particular, there should be a test to show that every character with
* an accent (diacritic) used in the language is WRONGLY sorted after Z.
*
* @return Generator|array
* @see testStrcmp
*/
public function provideWordPairs()
{
static $pairs = [
// Esperanto
'eo' => [
// fallback sort works for c < ĉ, but not for ĉ < d (and so on)
['celo', 'ĉapo'], ['glacio', 'ĝirafo'], ['horo', 'ĥameleono'],
['jes', 'ĵaŭdo'], ['seka', 'ŝako'], ['urso', 'ŭaŭ'],
// fallback sort WRONGLY puts ĉ/ĝ/ĥ/ĵ/ŝ/ŭ after z
['zorio', 'ĉokolado'], ['zorio', 'ĝojo'], ['zorio', 'ĥoro'],
['zorio', 'ĵurnalo'], ['zorio', 'ŝuo'], ['zorio', 'ŭo'],
// natural sort works as usual
['paĝo 2', 'paĝo 10'], ['paĝo 51', 'paĝo 100']
],
// German
'de' => [
// fallback sort WRONGLY puts ä/ö/ü/ß after z
['Zebra', 'Äpfel'], ['Zebra', 'Öl'], ['Zebra', 'Übersetzung'],
['Weizen', 'weiß'],
// natural sort works as usual
['Seite 2', 'Seite 10'], ['Seite 51', 'Seite 100']
],
// Portuguese
'pt' => [
// fallback sort WRONGLY puts accented letters after z
['zebra', 'às'], ['zebra', 'água'], ['zebra', 'âmbar'],
['zebra', 'épico'], ['zebra', 'ênclise'], ['zebra', 'índio'],
['zebra', 'ótimo'], ['zebra', 'ônibus'], ['zebra', 'último'],
['pizza', 'pião'], ['pizza', 'piões'], ['azar', 'aço'],
// natural sort works as usual
['página 2', 'página 10'], ['página 51', 'página 100']
],
// Spanish
'es' => [
// fallback sort works for n < ñ, but not for ñ < o
['nube', 'ñu'],
// fallback sort WRONGLY puts accented letters after z
['zapato', 'ácido'], ['zapato', 'él'], ['zapato', 'íntimo'],
['zapato', 'óptimo'], ['zapato', 'último'],
['pizza', 'piña'],
// natural sort works as usual
['página 2', 'página 10'], ['página 51', 'página 100']
],
];
foreach ($pairs as $lang => $list) {
foreach ($list as $pair) {
yield [$lang, $pair[0], $pair[1]];
}
}
}
/**
* Provide WRONG sorted sequences of all characters used in the languages
* being tested, as the fallback sort simply follows character codes.
*
* The sorted sequences given in class "sort_with_collator" are simply
* reordered here, starting with A-Z and continuing with accented characters
* ordered by character codes.
*
* @return Generator|array
* @see testSort
* @see testKSort
* @see testASort
* @see testASortFnUrl
* @see testASortFnSafe
* @see testASortFnUtf8
*/
public function provideSortedCharList()
{
static $lists = [
// Esperanto
// 'a b c ĉ d e f g ĝ h ĥ i j ĵ k l m n o p r s ŝ t u ŭ v z'
'eo' => 'a b c d e f g h i j k l m n o p r s t u v z ĉ ĝ ĥ ĵ ŝ ŭ',
// German
// 'a ä b c d e f g h i j k l m n o ö p q r s ß t u ü v w x y z'
'de' => 'a b c d e f g h i j k l m n o p q r s t u v w x y z ß ä ö ü',
// Portuguese
// 'a á à â ã b c ç d e é ê f g h i í j k l m n o ó ô õ p q r s t u ú ü v w x y z'
'pt' => 'a b c d e f g h i j k l m n o p q r s t u v w x y z à á â ã ç é ê í ó ô õ ú ü',
// Spanish
// 'a á b c d e é f g h i í j k l m n ñ o ó p q r s t u ú v w x y z'
'es' => 'a b c d e f g h i j k l m n o p q r s t u v w x y z á é í ñ ó ú',
];
foreach ($lists as $lang => $list) {
yield [$lang, $list];
}
}
}

View File

@ -33,5 +33,13 @@ class utf8_romanize_test extends DokuWikiTest {
function test_deaccented(){
$this->assertEquals("a A a A a o O",\dokuwiki\Utf8\Clean::romanize("å Å ä Ä ä ö Ö"));
}
/**
* Greeklish romanization
*/
function test_greeklish(){
$this->assertEquals('kalimera pos eiste',\dokuwiki\Utf8\Clean::romanize('Καλημέρα πώς είστε'));
}
}
//Setup VIM: ex: et ts=4 :

View File

@ -3,6 +3,7 @@
use splitbrain\phpcli\CLI;
use splitbrain\phpcli\Options;
use dokuwiki\Utf8\Sort;
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../') . '/');
define('NOSESSION', 1);
@ -77,13 +78,13 @@ class WantedPagesCLI extends CLI {
foreach($this->getPages($startdir) as $page) {
$this->internalLinks($page);
}
ksort($this->result);
Sort::ksort($this->result);
foreach($this->result as $main => $subs) {
if($this->skip) {
print "$main\n";
} else {
$subs = array_unique($subs);
sort($subs);
Sort::sort($subs);
foreach($subs as $sub) {
printf("%-40s %s\n", $main, $sub);
}

View File

@ -5,13 +5,13 @@
"type": "project",
"license": "GPL v2",
"require": {
"php": ">=5.6",
"php": ">=7.2",
"ext-json": "*",
"splitbrain/php-archive": "~1.0",
"phpseclib/phpseclib": "~2.0",
"paragonie/random_compat": "^2.0",
"simplepie/simplepie": "^1.4",
"geshi/geshi": "^1.0",
"geshi/geshi": "dev-master as 1.0.x-dev",
"openpsa/universalfeedcreator": "^1.8",
"aziraphale/email-address-validator": "^2",
"marcusschwarz/lesserphp": "^0.5.1",
@ -19,10 +19,12 @@
},
"config": {
"platform": {
"php": "5.6"
"php": "7.2"
}
},
"suggest": {
"ext-mbstring": "The mbstring extension is highly reccomended to speed up all UTF-8 handling",
"ext-intl": "The intl extension allows for better locale specific sorting",
"squizlabs/php_codesniffer": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"phpunit/phpunit": "Allows automated tests to be run without system-wide install (only version 4-7 are supported)."
},

39
composer.lock generated
View File

@ -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": "0bc9b3664395537d94aa155b32251ae8",
"content-hash": "dc3e894425a4e285b1c56c2ce4966a60",
"packages": [
{
"name": "aziraphale/email-address-validator",
@ -49,16 +49,16 @@
},
{
"name": "geshi/geshi",
"version": "v1.0.9.1",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/GeSHi/geshi-1.0.git",
"reference": "fd22ab78481bf90337862b590e6f7517863926b8"
"reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/fd22ab78481bf90337862b590e6f7517863926b8",
"reference": "fd22ab78481bf90337862b590e6f7517863926b8",
"url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/3c12a7931d509c5e3557c5ed44c9a32e9c917c7d",
"reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d",
"shasum": ""
},
"require-dev": {
@ -85,7 +85,7 @@
],
"description": "Generic Syntax Highlighter",
"homepage": "http://qbnz.com/highlighter/",
"time": "2019-10-20T20:54:46+00:00"
"time": "2020-06-22T15:46:04+00:00"
},
{
"name": "marcusschwarz/lesserphp",
@ -241,16 +241,16 @@
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.27",
"version": "2.0.28",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
"shasum": ""
},
"require": {
@ -343,7 +343,7 @@
"type": "tidelift"
}
],
"time": "2020-04-04T23:17:33+00:00"
"time": "2020-07-08T09:08:33+00:00"
},
{
"name": "simplepie/simplepie",
@ -519,18 +519,27 @@
}
],
"packages-dev": [],
"aliases": [],
"aliases": [
{
"alias": "1.0.x-dev",
"alias_normalized": "1.0.9999999.9999999-dev",
"version": "9999999-dev",
"package": "geshi/geshi"
}
],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"geshi/geshi": 20
},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": ">=5.6",
"php": ">=7.2",
"ext-json": "*"
},
"platform-dev": [],
"platform-overrides": {
"php": "5.6"
"php": "7.2"
},
"plugin-api-version": "1.1.0"
}

View File

@ -11,7 +11,7 @@
// update message version - always use a string to avoid localized floats!
use dokuwiki\Extension\Event;
$updateVersion = "51.2";
$updateVersion = "51.3";
// xdebug_start_profiling();

View File

@ -3,6 +3,7 @@
namespace dokuwiki;
use dokuwiki\Ui;
use dokuwiki\Utf8\Sort;
/**
* Manage all builtin AJAX calls
@ -100,7 +101,7 @@ class Ajax {
$data = array_map('trim', $data);
$data = array_map('noNS', $data);
$data = array_unique($data);
sort($data);
Sort::sort($data);
/* now construct a json */
$suggestions = array(

View File

@ -13,12 +13,12 @@ class DebugHelper
/**
* Log accesses to deprecated fucntions to the debug log
*
* @param string $alternative (optional) The function or method that should be used instead
* @param int $callerOffset (optional) How far the deprecated method is removed from this one
*
* @param string $alternative (optional) The function or method that should be used instead
* @param int $callerOffset (optional) How far the deprecated method is removed from this one
* @param string $thing (optional) The deprecated thing, defaults to the calling method
* @triggers \dokuwiki\Debug::INFO_DEPRECATION_LOG_EVENT
*/
public static function dbgDeprecatedFunction($alternative = '', $callerOffset = 1)
public static function dbgDeprecatedFunction($alternative = '', $callerOffset = 1, $thing = '')
{
global $conf;
/** @var EventHandler $EVENT_HANDLER */
@ -38,12 +38,16 @@ class DebugHelper
list($self, $call) = $backtrace;
if (!$thing) {
$thing = trim(
(!empty($self['class']) ? ($self['class'] . '::') : '') .
$self['function'] . '()', ':');
}
self::triggerDeprecationEvent(
$backtrace,
$alternative,
trim(
(!empty($self['class']) ? ($self['class'] . '::') : '') .
$self['function'] . '()', ':'),
$thing,
trim(
(!empty($call['class']) ? ($call['class'] . '::') : '') .
$call['function'] . '()', ':'),

View File

@ -41,4 +41,12 @@ class Externallink extends AbstractMode
{
return 330;
}
/**
* @return array
*/
public function getPatterns()
{
return $this->patterns;
}
}

View File

@ -6,6 +6,7 @@ use Doku_Renderer_xhtml;
use dokuwiki\ChangeLog\MediaChangeLog;
use dokuwiki\ChangeLog\PageChangeLog;
use dokuwiki\Extension\Event;
use dokuwiki\Utf8\Sort;
define('DOKU_API_VERSION', 10);
@ -142,11 +143,11 @@ class ApiCore
), 'wiki.getRecentChanges' => array(
'args' => array('int'),
'return' => 'array',
'Returns a struct about all recent changes since given timestamp.'
'doc' => 'Returns a struct about all recent changes since given timestamp.'
), 'wiki.getRecentMediaChanges' => array(
'args' => array('int'),
'return' => 'array',
'Returns a struct about all recent media changes since given timestamp.'
'doc' => 'Returns a struct about all recent media changes since given timestamp.'
), 'wiki.aclCheck' => array(
'args' => array('string', 'string', 'array'),
'return' => 'int',
@ -310,6 +311,7 @@ class ApiCore
$list = array();
$pages = idx_get_indexer()->getPages();
$pages = array_filter(array_filter($pages, 'isVisiblePage'), 'page_exists');
Sort::ksort($pages);
foreach (array_keys($pages) as $idx) {
$perm = auth_quickaclcheck($pages[$idx]);

View File

@ -1,6 +1,8 @@
<?php
namespace dokuwiki\Ui;
use dokuwiki\Utf8\Sort;
/**
* Class Admin
*
@ -159,7 +161,7 @@ class Admin extends Ui {
* @return int
*/
protected function menuSort($a, $b) {
$strcmp = strcasecmp($a['prompt'], $b['prompt']);
$strcmp = Sort::strcmp($a['prompt'], $b['prompt']);
if($strcmp != 0) return $strcmp;
if($a['sort'] === $b['sort']) return 0;
return ($a['sort'] < $b['sort']) ? -1 : 1;

View File

@ -4,6 +4,7 @@ namespace dokuwiki\Ui;
use dokuwiki\Extension\Event;
use dokuwiki\Form\Form;
use dokuwiki\Utf8\Sort;
class Search extends Ui
{
@ -382,7 +383,7 @@ class Search extends Ui
}
$namespaces[$subtopNS] += 1;
}
ksort($namespaces);
Sort::ksort($namespaces);
arsort($namespaces);
return $namespaces;
}

173
inc/Utf8/Sort.php Normal file
View File

@ -0,0 +1,173 @@
<?php
namespace dokuwiki\Utf8;
/**
* DokuWiki sort functions
*
* When "intl" extension is available, all sorts are done using a collator.
* Otherwise, primitive PHP functions are called.
*
* The collator is created using the locale given in $conf['lang'].
* It always uses case insensitive "natural" ordering in its collation.
* The fallback solution uses the primitive PHP functions that return almost the same results
* when the input is text with only [A-Za-z0-9] characters.
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
*/
class Sort
{
/** @var \Collator[] language specific collators, usually only one */
protected static $collators = [];
/** @var bool should the intl extension be used if available? For testing only */
protected static $useIntl = true;
/**
* Initialization of a collator using $conf['lang'] as the locale.
* The initialization is done only once.
* The collation takes "natural ordering" into account, that is, "page 2" is before "page 10".
*
* @return \Collator Returns a configured collator or null if the collator cannot be created.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
*/
protected static function getCollator()
{
global $conf;
$lc = $conf['lang'];
// check if intl extension is available
if (!self::$useIntl || !class_exists('\Collator')) {
return null;
}
// load collator if not available yet
if (!isset(self::$collators[$lc])) {
$collator = \Collator::create($lc);
if (!isset($collator)) return null; // check needed as stated in the docs
$collator->setAttribute(\Collator::NUMERIC_COLLATION, \Collator::ON);
dbglog('Collator created with locale "' . $lc . '": numeric collation on, ' .
'valid locale "' . $collator->getLocale(\Locale::VALID_LOCALE) . '", ' .
'actual locale "' . $collator->getLocale(\Locale::ACTUAL_LOCALE) . '"');
self::$collators[$lc] = $collator;
}
return self::$collators[$lc];
}
/**
* Enable or disable the use of the "intl" extension collator.
* This is used for testing and should not be used in normal code.
*
* @param bool $use
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
public static function useIntl($use = true)
{
self::$useIntl = $use;
}
/**
* Drop-in replacement for strcmp(), strcasecmp(), strnatcmp() and strnatcasecmp().
* It uses a collator-based comparison, or strnatcasecmp() as a fallback.
*
* @param string $str1 The first string.
* @param string $str2 The second string.
* @return int Returns < 0 if $str1 is less than $str2; > 0 if $str1 is greater than $str2, and 0 if they are equal.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
*/
public static function strcmp($str1, $str2)
{
$collator = self::getCollator();
if (isset($collator)) {
return $collator->compare($str1, $str2);
} else {
return strnatcasecmp($str1, $str2);
}
}
/**
* Drop-in replacement for sort().
* It uses a collator-based sort, or sort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback.
*
* @param array $array The input array.
* @return bool Returns true on success or false on failure.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
*/
public static function sort(&$array)
{
$collator = self::getCollator();
if (isset($collator)) {
return $collator->sort($array);
} else {
return sort($array, SORT_NATURAL | SORT_FLAG_CASE);
}
}
/**
* Drop-in replacement for ksort().
* It uses a collator-based sort, or ksort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback.
*
* @param array $array The input array.
* @return bool Returns true on success or false on failure.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
*/
public static function ksort(&$array)
{
$collator = self::getCollator();
if (isset($collator)) {
return uksort($array, array($collator, 'compare'));
} else {
return ksort($array, SORT_NATURAL | SORT_FLAG_CASE);
}
}
/**
* Drop-in replacement for asort(), natsort() and natcasesort().
* It uses a collator-based sort, or asort() with flags SORT_NATURAL and SORT_FLAG_CASE as a fallback.
*
* @param array $array The input array.
* @return bool Returns true on success or false on failure.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
*/
public static function asort(&$array)
{
$collator = self::getCollator();
if (isset($collator)) {
return $collator->asort($array);
} else {
return asort($array, SORT_NATURAL | SORT_FLAG_CASE);
}
}
/**
* Drop-in replacement for asort(), natsort() and natcasesort() when the parameter is an array of filenames.
* Filenames may not be equal to page names, depending on the setting in $conf['fnencode'],
* so the correct behavior is to sort page names and reflect this sorting in the filename array.
*
* @param array $array The input array.
* @return bool Returns true on success or false on failure.
*
* @author Moisés Braga Ribeiro <moisesbr@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
*/
public static function asortFN(&$array)
{
$collator = self::getCollator();
return uasort($array, function ($fn1, $fn2) use ($collator) {
if (isset($collator)) {
return $collator->compare(utf8_decodeFN($fn1), utf8_decodeFN($fn2));
} else {
return strnatcasecmp(utf8_decodeFN($fn1), utf8_decodeFN($fn2));
}
});
}
}

View File

@ -53,6 +53,7 @@ return [
'ĩ' => 'i',
'į' => 'i',
'ī' => 'i',
'ı' => 'i',
'ĵ' => 'j',
'ķ' => 'k',
'ĺ' => 'l',

View File

@ -1288,24 +1288,75 @@ return [
// 'ヂ'=>'dzi',
// "Greeklish"
'Γ' => 'G',
'Δ' => 'E',
'Θ' => 'Th',
'Λ' => 'L',
'Ξ' => 'X',
'Π' => 'P',
'Σ' => 'S',
'Φ' => 'F',
'Ψ' => 'Ps',
'Α' => 'a',
'Ά' => 'a',
'Β' => 'b',
'Γ' => 'g',
'Δ' => 'd',
'Ε' => 'e',
'Έ' => 'e',
'Ζ' => 'z',
'Η' => 'i',
'Ή' => 'i',
'Θ' => 'th',
'Ι' => 'i',
'Ί' => 'i',
'Ϊ' => 'i',
'ΐ' => 'i',
'Κ' => 'k',
'Λ' => 'l',
'Μ' => 'm',
'Ν' => 'n',
'Ξ' => 'x',
'Ο' => 'o',
'Ό' => 'o',
'Π' => 'p',
'Ρ' => 'r',
'Σ' => 's',
'Τ' => 't',
'Υ' => 'y',
'Ύ' => 'y',
'Ϋ' => 'y',
'ΰ' => 'y',
'Φ' => 'f',
'Χ' => 'ch',
'Ψ' => 'ps',
'Ω' => 'o',
'Ώ' => 'o',
'α' => 'a',
'ά' => 'a',
'β' => 'b',
'γ' => 'g',
'δ' => 'e',
'δ' => 'd',
'ε' => 'e',
'έ' => 'e',
'ζ' => 'z',
'η' => 'i',
'ή' => 'i',
'θ' => 'th',
'ι' => 'i',
'ί' => 'i',
'ϊ' => 'i',
'κ' => 'k',
'λ' => 'l',
'μ' => 'm',
'ν' => 'n',
'ξ' => 'x',
'ο' => 'o',
'ό' => 'o',
'π' => 'p',
'ρ' => 'r',
'σ' => 's',
'ς' => 's',
'τ' => 't',
'υ' => 'y',
'ύ' => 'y',
'ϋ' => 'y',
'φ' => 'f',
'χ' => 'ch',
'ψ' => 'ps',
'ω' => 'o',
'ώ' => 'o',
// Thai
'ก' => 'k',

View File

@ -7,6 +7,7 @@
*/
use dokuwiki\Extension\Event;
use dokuwiki\Utf8\Sort;
/**
* create snippets for the first few results only
@ -151,6 +152,7 @@ function _ft_pageSearch(&$data) {
uksort($docs, 'ft_pagemtimesorter');
} else {
// sort docs by count
uksort($docs, 'ft_pagesorter');
arsort($docs);
}
@ -180,7 +182,7 @@ function ft_backlinks($id, $ignore_perms = false){
}
}
sort($result);
Sort::sort($result);
return $result;
}
@ -211,7 +213,7 @@ function ft_mediause($id, $ignore_perms = false){
}
}
sort($result);
Sort::sort($result);
return $result;
}
@ -370,7 +372,7 @@ function ft_pagesorter($a, $b){
}elseif($ac > $bc){
return 1;
}
return strcmp ($a,$b);
return Sort::strcmp($a,$b);
}
/**

View File

@ -123,13 +123,13 @@ function check(){
if ($INFO['isadmin'] || $INFO['ismanager']){
msg('DokuWiki version: '.getVersion(),1);
if(version_compare(phpversion(),'5.6.0','<')){
msg('Your PHP version is too old ('.phpversion().' vs. 5.6.0+ needed)',-1);
if(version_compare(phpversion(),'7.2.0','<')){
msg('Your PHP version is too old ('.phpversion().' vs. 7.2+ needed)',-1);
}else{
msg('PHP version '.phpversion(),1);
}
} else {
if(version_compare(phpversion(),'5.6.0','<')){
if(version_compare(phpversion(),'7.2.0','<')){
msg('Your PHP version is too old',-1);
}
}

View File

@ -1,3 +1,3 @@
====== Správa ======
Níže je možno spravovat vaší DokuWiki.
Zde najdete možnosti správy a nastavení DokuWiki.

View File

@ -179,6 +179,7 @@ $lang['txt_upload'] = 'Vyberte soubor jako přílohu:';
$lang['txt_filename'] = 'Wiki jméno (volitelné):';
$lang['txt_overwrt'] = 'Přepsat existující soubor';
$lang['maxuploadsize'] = 'Max. velikost souboru %s';
$lang['allowedmime'] = 'Seznam povolených přípon souboru';
$lang['lockedby'] = 'Právě zamknuto:';
$lang['lockexpire'] = 'Zámek vyprší:';
$lang['rssfailed'] = 'Nastala chyba při vytváření tohoto RSS: ';

View File

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Axel Schwarzer <SchwarzerA@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
* @author Eric Haberstroh <ehaberstroh@gmail.com>
* @author C!own77 <clown77@posteo.de>
@ -331,8 +332,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 Sie mit der Installation fortfahren können.';
$lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Skript nur mit einer neuen bzw. nicht modifizierten DokuWiki Installation. Sie sollten entweder alle Dateien noch einmal frisch installieren oder die <a href="http://dokuwiki.org/install">Dokuwiki-Installationsanleitung</a> konsultieren.';
$lang['i_funcna'] = 'Die PHP-Funktion <code>%s</code> ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?';
$lang['i_disabled'] = 'Es wurde von Ihrem Provider deaktiviert.';
$lang['i_funcnmail'] = '<b>Hinweis:</b> Die PHP-Funktion "mail()" ist nicht verfügbar. %s Alternativ können Sie das <a href="https://www.dokuwiki.org/plugin:smtp">SMTP-Plugin</a> installieren.';
$lang['i_phpver'] = 'Ihre PHP-Version <code>%s</code> ist niedriger als die benötigte Version <code>%s</code>. Bitte aktualisieren Sie Ihre PHP-Installation.';
$lang['i_mbfuncoverload'] = 'Um DokuWiki zu starten muss mbstring.func_overload in php.ini ausgeschaltet sein.';
$lang['i_urandom'] = 'DokuWiki kann keine kryptografisch sicheren Werte für Cookies generieren. Möglicherweise möchten Sie Ihre "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. Sie müssen die Berechtigungen dieses Ordners ändern!';
$lang['i_confexists'] = '<code>%s</code> existiert bereits';
$lang['i_writeerr'] = '<code>%s</code> konnte nicht erzeugt werden. Sie sollten die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
@ -383,6 +387,7 @@ $lang['media_perm_upload'] = 'Sie besitzen nicht die notwendigen Berechtigun
$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'] = 'Suchergebnisse';
$lang['plainhtml'] = 'HTML Klartext';

View File

@ -3,8 +3,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Pierre Henriot <pierre.henriot@gmail.com>
* @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>
@ -196,6 +196,7 @@ $lang['txt_upload'] = 'Sélectionnez un fichier à envoyer:';
$lang['txt_filename'] = 'Envoyer en tant que (optionnel):';
$lang['txt_overwrt'] = 'Écraser le fichier cible (s\'il existe)';
$lang['maxuploadsize'] = 'Taille d\'envoi maximale : %s par fichier';
$lang['allowedmime'] = 'Liste des extensions de fichier autorisées';
$lang['lockedby'] = 'Actuellement bloqué par:';
$lang['lockexpire'] = 'Le blocage expire à:';
$lang['rssfailed'] = 'Une erreur s\'est produite en récupérant ce flux : ';

View File

@ -3,7 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paulo Schopf <pschopf@gmail.com>
* @author Paulo <pschopf@gmail.com>
* @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com>
* @author Maykon Oliveira <maykonoliveira850@gmail.com>
* @author José Vieira <jmsv63@gmail.com>
@ -172,6 +172,7 @@ $lang['txt_upload'] = 'Escolha arquivo a carregar:';
$lang['txt_filename'] = 'Carregar como (opcional):';
$lang['txt_overwrt'] = 'Sobrescrever arquivo';
$lang['maxuploadsize'] = 'Enviar %s max. por arquivo.';
$lang['allowedmime'] = 'Lista de extensões de arquivo permitidas';
$lang['lockedby'] = 'Bloqueado por:';
$lang['lockexpire'] = 'Expira em:';
$lang['rssfailed'] = 'Erro ao buscar informação deste feed:';

View File

@ -193,6 +193,7 @@ $lang['txt_upload'] = 'Выберите файл для загруз
$lang['txt_filename'] = 'Введите имя файла в вики (необязательно):';
$lang['txt_overwrt'] = 'Перезаписать существующий файл';
$lang['maxuploadsize'] = 'Макс. размер загружаемого файла %s.';
$lang['allowedmime'] = 'Список разрешённых расширений файлов';
$lang['lockedby'] = 'В данный момент заблокировано пользователем';
$lang['lockexpire'] = 'Блокировка истекает в';
$lang['rssfailed'] = 'Произошла ошибка при получении новостной ленты: ';

View File

@ -8,8 +8,8 @@
* auth.class language support
* installer strings
*
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Martin Michalek <michalek.dev@gmail.com>
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Ondrej Vegh <ov@vsieti.sk> with help of the scholars from Zdruzena stredna skola polygraficka in Bratislava
* @author Michal Mesko <michal.mesko@gmail.com>
* @author exusik <exusik@gmail.com>
@ -74,7 +74,7 @@ $lang['badpassconfirm'] = 'Ľutujem, heslo bolo nesprávne.';
$lang['minoredit'] = 'Menšie zmeny';
$lang['draftdate'] = 'Koncept automaticky uložený';
$lang['nosecedit'] = 'Stránka bola medzičasom zmenená, informácie o sekcii sú zastaralé a z tohto dôvodu bola nahraná celá stránka.';
$lang['searchcreatepage'] = 'Ak ste nenašli, čo ste hľadali, môžete vytvoriť alebo upraviť stránku %s, ktorá bola nazvaná podľa vášho dopytu.';
$lang['searchcreatepage'] = 'Ak ste nenašli, čo ste hľadali, môžete vytvoriť alebo upraviť stránku %s pomenovanú podľa vášho dopytu.';
$lang['search_fullresults'] = 'Fulltextové výsledky';
$lang['js']['search_toggle_tools'] = 'Zobraziť/Skryť vyhľadávacie nástroje';
$lang['js']['willexpire'] = 'Váš zámok pre editáciu za chvíľu stratí platnosť.\nAby ste predišli konfliktom, stlačte tlačítko Náhľad a zámok sa predĺži.';
@ -120,7 +120,7 @@ $lang['js']['media_drop'] = 'Pridajte súbory potiahnutím myšou';
$lang['js']['media_cancel'] = 'odstrániť';
$lang['js']['media_overwrt'] = 'Prepísať existujúce súbory';
$lang['search_exact_match'] = 'Presná zhoda';
$lang['search_starts_with'] = 'Začín na';
$lang['search_starts_with'] = 'Začína na';
$lang['search_ends_with'] = 'Končí na';
$lang['search_contains'] = 'Obsahuje';
$lang['search_custom_match'] = 'Vlastný';
@ -128,7 +128,7 @@ $lang['search_any_ns'] = 'Akýkoľvek menný priestor';
$lang['search_any_time'] = 'Kedykoľvek';
$lang['search_past_7_days'] = 'Posledný týždeň';
$lang['search_past_month'] = 'Posledný mesiac';
$lang['search_past_year'] = 'Posledný rok';
$lang['search_past_year'] = 'Posledný rok';
$lang['search_sort_by_hits'] = 'Zoradiť podľa počtu návštev';
$lang['search_sort_by_mtime'] = 'Zoradiť podľa posledných úprav';
$lang['regmissing'] = 'Musíte vyplniť všetky údaje.';
@ -167,6 +167,7 @@ $lang['txt_upload'] = 'Vyberte súbor ako prílohu:';
$lang['txt_filename'] = 'Uložiť ako (voliteľné):';
$lang['txt_overwrt'] = 'Prepísať existujúci súbor';
$lang['maxuploadsize'] = 'Obmedzenie max. %s na súbor.';
$lang['allowedmime'] = 'Zoznam povolených prípon súborov';
$lang['lockedby'] = 'Práve zamknuté:';
$lang['lockexpire'] = 'Zámok stratí platnosť:';
$lang['rssfailed'] = 'Nastala chyba pri vytváraní tohto RSS: ';
@ -302,6 +303,7 @@ $lang['i_superuser'] = 'Správca';
$lang['i_problems'] = 'Inštalátor narazil na nižšie uvedené problémy. Nemôžete pokračovať, pokiaľ ich neodstránite.';
$lang['i_modified'] = 'Z bezpečnostných dôvodov bude tento skript fungovať iba s novou, neupravenou inštaláciou Dokuwiki. Môžete buď znovu rozbaliť stiahnutý inštalačný balík alebo preštudovať <a href="http://dokuwiki.org/install"> inštalačné inštrukcie Dokuwiki</a>';
$lang['i_funcna'] = 'PHP funkcia <code>%s</code> nie je dostupná. Je možné, že ju z určitých dôvodov zablokoval váš poskytovateľ webhostingu?';
$lang['i_funcnmail'] = '<b>Note:</b> PHP mail funkcia nie je dostupná. %s Ak zostáva stále nedostupná, možno by ste mohli nainštalovať <a href="https://www.dokuwiki.org/plugin:smtp">smtp plugin</a>.';
$lang['i_phpver'] = 'Vaša verzia PHP <code>%s</code> je nižšia ako požadovaná <code>%s</code>. Potrebujete aktualizovať Vašu inštaláciu PHP.';
$lang['i_mbfuncoverload'] = 'mbstring.func_overload musí byt zakázaná v php.ini pre bezproblémový chod DokuWiki.';
$lang['i_permfail'] = '<code>%s</code> nie je zapisovateľný pre DokuWiki. Musíte zmeniť prístupové práva pre tento adresár!';
@ -354,6 +356,7 @@ $lang['media_perm_upload'] = 'Prepáčte, ale nemáte dostatočné oprávnen
$lang['media_update'] = 'Nahrať novú verziu';
$lang['media_restore'] = 'Obnoviť túto verziu';
$lang['media_acl_warning'] = 'Tento zoznam nemusí byť úplný z dôvodu ACL obmedzení alebo skratých stránok.';
$lang['email_fail'] = 'PHP funkcia mail() chýba alebo nie je povolená. Nasledujúci mail nebol poslaný:';
$lang['currentns'] = 'Aktuálny menný priestor';
$lang['searchresult'] = 'Výsledky hľadania';
$lang['plainhtml'] = 'Jednoduché HTML';

View File

@ -3,20 +3,19 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author GHSRobert Ciang <robertus0617@gmail.com>
* @author chinsan <chinsan@mail2000.com.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
* @author tsangho <ou4222@gmail.com>
* @author Danny Lin <danny0838@gmail.com>
* @author Stan <talktostan@gmail.com>
* @author June-Hao Hou <junehao@gmail.com>
* @author lioujheyu <lioujheyu@gmail.com>
* @author Liou, Jhe-Yu <lioujheyu@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@ -77,42 +76,6 @@ $lang['badpassconfirm'] = '抱歉,這密碼是錯的';
$lang['minoredit'] = '小修改';
$lang['draftdate'] = '草稿已自動存檔於';
$lang['nosecedit'] = '在您編輯期間,其他使用者修改過本頁面。區段資料已逾時,因此系統載入了全頁,以取代之。';
$lang['regmissing'] = '很抱歉,所有欄位都要填寫。';
$lang['reguexists'] = '很抱歉,有人已使用了這個帳號。';
$lang['regsuccess'] = '使用者帳號已建立,密碼已寄發至該電郵。';
$lang['regsuccess2'] = '使用者帳號已建立。';
$lang['regmailfail'] = '寄出密碼信似乎有問題,請跟管理員聯絡!';
$lang['regbadmail'] = '您輸入的電郵地址似乎不正確。若您覺得是正確的,請與管理員聯絡。';
$lang['regbadpass'] = '兩次輸入的密碼不一致,請再試一次。';
$lang['regpwmail'] = '您的 DokuWiki 帳號密碼';
$lang['reghere'] = '您還沒有帳號嗎?註冊一個吧。';
$lang['profna'] = '本 wiki 不支援修改個人資料。';
$lang['profnochange'] = '並未作任何變更。';
$lang['profnoempty'] = '帳號或電郵地址不可空白!';
$lang['profchanged'] = '個人資料已更新。';
$lang['profnodelete'] = '本 wiki 不支援刪除使用者';
$lang['profdeleteuser'] = '刪除帳號';
$lang['profdeleted'] = '您的使用者帳號已從本 wiki 刪除';
$lang['profconfdelete'] = '我想把帳號從本 wiki 刪除(不能復原)';
$lang['profconfdeletemissing'] = '未勾選確認方塊';
$lang['pwdforget'] = '忘記密碼了?索取新密碼!';
$lang['resendna'] = '本 wiki 不支援重寄密碼。';
$lang['resendpwd'] = '設定新密碼供';
$lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。';
$lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者。';
$lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用了完整的確認連結。';
$lang['resendpwdconfirm'] = '確認連結已通過郵件發送給您了。';
$lang['resendpwdsuccess'] = '您的新密碼已寄出。';
$lang['license'] = '若無特別註明,本 wiki 上的內容都是採用以下授權方式:';
$lang['licenseok'] = '注意:編輯此頁面表示您同意用以下授權方式發布您撰寫的內容:';
$lang['searchmedia'] = '搜尋檔名:';
$lang['searchmedia_in'] = '在 %s 裏搜尋';
$lang['txt_upload'] = '請選擇要上傳的檔案:';
$lang['txt_filename'] = '請輸入要上傳至本 wiki 的檔案名稱 (非必要):';
$lang['txt_overwrt'] = '是否要覆蓋原有檔案';
$lang['maxuploadsize'] = '每個上傳檔案不可大於 %s 。';
$lang['lockedby'] = '目前已被下列人員鎖定:';
$lang['lockexpire'] = '預計解除鎖定於:';
$lang['js']['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。';
$lang['js']['notsavedyet'] = '未儲存的變更將會遺失,繼續嗎?';
$lang['js']['searchmedia'] = '搜尋檔案';
@ -155,6 +118,47 @@ $lang['js']['media_done_btn'] = '完成';
$lang['js']['media_drop'] = '拖拉檔案到此上傳';
$lang['js']['media_cancel'] = '刪除';
$lang['js']['media_overwrt'] = '覆蓋已存在的檔案';
$lang['search_any_ns'] = '任何名稱空間';
$lang['search_any_time'] = '任何時間';
$lang['search_past_7_days'] = '過去一週';
$lang['search_past_month'] = '過去一個月';
$lang['search_past_year'] = '過去一年';
$lang['regmissing'] = '很抱歉,所有欄位都要填寫。';
$lang['reguexists'] = '很抱歉,有人已使用了這個帳號。';
$lang['regsuccess'] = '使用者帳號已建立,密碼已寄發至該電郵。';
$lang['regsuccess2'] = '使用者帳號已建立。';
$lang['regmailfail'] = '寄出密碼信似乎有問題,請跟管理員聯絡!';
$lang['regbadmail'] = '您輸入的電郵地址似乎不正確。若您覺得是正確的,請與管理員聯絡。';
$lang['regbadpass'] = '兩次輸入的密碼不一致,請再試一次。';
$lang['regpwmail'] = '您的 DokuWiki 帳號密碼';
$lang['reghere'] = '您還沒有帳號嗎?註冊一個吧。';
$lang['profna'] = '本 wiki 不支援修改個人資料。';
$lang['profnochange'] = '並未作任何變更。';
$lang['profnoempty'] = '帳號或電郵地址不可空白!';
$lang['profchanged'] = '個人資料已更新。';
$lang['profnodelete'] = '本 wiki 不支援刪除使用者';
$lang['profdeleteuser'] = '刪除帳號';
$lang['profdeleted'] = '您的使用者帳號已從本 wiki 刪除';
$lang['profconfdelete'] = '我想把帳號從本 wiki 刪除(不能復原)';
$lang['profconfdeletemissing'] = '未勾選確認方塊';
$lang['pwdforget'] = '忘記密碼了?索取新密碼!';
$lang['resendna'] = '本 wiki 不支援重寄密碼。';
$lang['resendpwd'] = '設定新密碼供';
$lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。';
$lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者。';
$lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用了完整的確認連結。';
$lang['resendpwdconfirm'] = '確認連結已通過郵件發送給您了。';
$lang['resendpwdsuccess'] = '您的新密碼已寄出。';
$lang['license'] = '若無特別註明,本 wiki 上的內容都是採用以下授權方式:';
$lang['licenseok'] = '注意:編輯此頁面表示您同意用以下授權方式發布您撰寫的內容:';
$lang['searchmedia'] = '搜尋檔名:';
$lang['searchmedia_in'] = '在 %s 裏搜尋';
$lang['txt_upload'] = '請選擇要上傳的檔案:';
$lang['txt_filename'] = '請輸入要上傳至本 wiki 的檔案名稱 (非必要):';
$lang['txt_overwrt'] = '是否要覆蓋原有檔案';
$lang['maxuploadsize'] = '每個上傳檔案不可大於 %s 。';
$lang['lockedby'] = '目前已被下列人員鎖定:';
$lang['lockexpire'] = '預計解除鎖定於:';
$lang['rssfailed'] = '擷取 RSS 饋送檔時發生錯誤:';
$lang['nothingfound'] = '沒找到任何結果。';
$lang['mediaselect'] = '媒體檔案';
@ -344,5 +348,5 @@ $lang['currentns'] = '目前的命名空間';
$lang['searchresult'] = '搜尋結果';
$lang['plainhtml'] = '純 HTML';
$lang['wikimarkup'] = 'Wiki 語法標記';
$lang['email_signature_text'] = '本信件由以下 DokuWiki 網站產生
$lang['email_signature_text'] = '本信件由以下 DokuWiki 網站產生
@DOKUWIKIURL@';

View File

@ -0,0 +1,3 @@
======= 此頁已不存在 ======
你點的連結的目標頁面已不存在。您可查看[[?do=revisions|舊版]]瞭解頁面被刪除的時間及原因、載入舊版或還原舊版。

View File

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Jenxi <seow@jenxi.com>
* @author FENG.JIE <ahx@qq.com>
* @author Xin <chenxin1034@gmail.com>
* @author HaoNan <haonan@zhuoming.info>
@ -189,6 +190,7 @@ $lang['txt_upload'] = '选择要上传的文件:';
$lang['txt_filename'] = '上传并重命名为(可选):';
$lang['txt_overwrt'] = '覆盖已存在的同名文件';
$lang['maxuploadsize'] = '上传限制。每个文件 %s';
$lang['allowedmime'] = '允许文件扩展名列表';
$lang['lockedby'] = '目前已被下列人员锁定:';
$lang['lockexpire'] = '预计锁定解除于:';
$lang['rssfailed'] = '获取该 RSS 信息时产生错误:';

View File

@ -11,6 +11,7 @@ use dokuwiki\HTTP\DokuHTTPClient;
use dokuwiki\Subscriptions\MediaSubscriptionSender;
use dokuwiki\Extension\Event;
use dokuwiki\Form\Form;
use dokuwiki\Utf8\Sort;
/**
* Lists pages which currently use a media file selected for deletion
@ -1989,10 +1990,7 @@ function media_nstree($ns){
while ($data[$pos]['id'] != $tmp_ns) {
if (
$pos >= count($data) ||
(
$data[$pos]['level'] <= $level+1 &&
strnatcmp(utf8_encodeFN($data[$pos]['id']), utf8_encodeFN($tmp_ns)) > 0
)
($data[$pos]['level'] <= $level+1 && Sort::strcmp($data[$pos]['id'], $tmp_ns) > 0)
) {
array_splice($data, $pos, 0, array(array('level' => $level+1, 'id' => $tmp_ns, 'open' => 'true')));
break;

View File

@ -6,6 +6,8 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
use dokuwiki\Utf8\Sort;
/**
* Recurse directory
*
@ -49,9 +51,9 @@ function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort='natural'){
if ($sort == 'date') {
@array_multisort(array_map('filemtime', $filepaths), SORT_NUMERIC, SORT_DESC, $files);
} else /* natural */ {
natsort($files);
Sort::asortFN($files);
}
natsort($dirs);
Sort::asortFN($dirs);
}
//give directories to userfunction then recurse
@ -368,7 +370,7 @@ function sort_search_fulltext($a,$b){
}elseif($a['count'] < $b['count']){
return 1;
}else{
return strcmp($a['id'],$b['id']);
return Sort::strcmp($a['id'],$b['id']);
}
}

View File

@ -585,7 +585,7 @@ function check_functions(){
'ob_start opendir parse_ini_file readfile realpath '.
'rename rmdir serialize session_start unlink usleep '.
'preg_replace file_get_contents htmlspecialchars_decode '.
'spl_autoload_register stream_select fsockopen pack');
'spl_autoload_register stream_select fsockopen pack xml_parser_create');
if (!function_exists('mb_substr')) {
$funcs[] = 'utf8_encode';

View File

@ -1,4 +1,6 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* ACL administration functions
*
@ -304,7 +306,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin
while (count($a_ids) && count($b_ids)) {
// compare each level from upper to lower
// until a non-equal component is found
$cur_result = strcmp(array_shift($a_ids), array_shift($b_ids));
$cur_result = Sort::strcmp(array_shift($a_ids), array_shift($b_ids));
if ($cur_result) {
// if one of the components is the last component and is a file
// and the other one is either of a deeper level or a directory,
@ -589,7 +591,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin
}
$this->specials = array_filter($this->specials);
$this->specials = array_unique($this->specials);
sort($this->specials);
Sort::sort($this->specials);
foreach ($AUTH_ACL as $line) {
$line = trim(preg_replace('/#.*$/', '', $line)); //ignore comments
@ -608,8 +610,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin
}
$usersgroups = array_unique($usersgroups);
sort($usersgroups);
ksort($acl_config);
Sort::sort($usersgroups);
Sort::ksort($acl_config);
foreach (array_keys($acl_config) as $pagename) {
Sort::ksort($acl_config[$pagename]);
}
$this->acl = $acl_config;
$this->usersgroups = $usersgroups;

View File

@ -2,17 +2,15 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author chinsan <chinsan@mail2000.com.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Danny Lin <danny0838@pchome.com.tw>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
*/
$lang['admin_acl'] = '管理存取控制表 (ACL)';
$lang['acl_group'] = '群組:';

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -38,6 +38,8 @@
require_once(dirname(__FILE__) . '/../adLDAP.php');
require_once(dirname(__FILE__) . '/../collections/adLDAPContactCollection.php');
use dokuwiki\Utf8\Sort;
class adLDAPContacts {
/**
* The current adLDAP connection via dependency injection
@ -271,7 +273,7 @@ class adLDAPContacts {
}
}
if ($sorted) {
asort($usersArray);
Sort::asort($usersArray);
}
return $usersArray;
}

View File

@ -37,6 +37,8 @@
require_once(dirname(__FILE__) . '/../adLDAP.php');
require_once(dirname(__FILE__) . '/../collections/adLDAPGroupCollection.php');
use dokuwiki\Utf8\Sort;
/**
* GROUP FUNCTIONS
*/
@ -524,7 +526,7 @@ class adLDAPGroups {
}
}
if ($sorted) {
asort($groupsArray);
Sort::asort($groupsArray);
}
return $groupsArray;
}

View File

@ -37,6 +37,8 @@
require_once(dirname(__FILE__) . '/../adLDAP.php');
require_once(dirname(__FILE__) . '/../collections/adLDAPUserCollection.php');
use dokuwiki\Utf8\Sort;
/**
* USER FUNCTIONS
*/
@ -568,7 +570,7 @@ class adLDAPUsers {
}
}
if ($sorted) {
asort($usersArray);
Sort::asort($usersArray);
}
return $usersArray;
}
@ -631,7 +633,7 @@ class adLDAPUsers {
}
}
if ($sorted){
asort($usersArray);
Sort::asort($usersArray);
}
return ($usersArray);
}

View File

@ -1,4 +1,5 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* Active Directory authentication backend for DokuWiki
@ -739,7 +740,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin
$domains[$key] = ltrim($val['account_suffix'], '@');
}
}
ksort($domains);
Sort::ksort($domains);
return $domains;
}

View File

@ -2,9 +2,9 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author June-Hao Hou <junehao@gmail.com>
* @author syaoranhinata@gmail.com
* @author syaoranhinata <syaoranhinata@gmail.com>
*/
$lang['domain'] = '登入網域';
$lang['authpwdexpire'] = '您的密碼將在 %d 天內到期,請馬上更換新密碼。';

View File

@ -2,8 +2,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author syaoranhinata@gmail.com
*
* @author syaoranhinata <syaoranhinata@gmail.com>
* @author June-Hao Hou <junehao@gmail.com>
*/
$lang['account_suffix'] = '您的帳號後綴。如: <code>@my.domain.org</code>';

View File

@ -1,4 +1,5 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* LDAP authentication backend
@ -413,7 +414,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin
for ($i = 0; $i < $entries["count"]; $i++) {
array_push($users_array, $entries[$i][$userkey][0]);
}
asort($users_array);
Sort::asort($users_array);
$result = $users_array;
if (!$result) return array();
$this->users = array_fill_keys($result, false);

View File

@ -2,8 +2,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author syaoranhinata@gmail.com
*
* @author syaoranhinata <syaoranhinata@gmail.com>
*/
$lang['server'] = '您的 LDAP 伺服器。填寫主機名稱 (<code>localhost</code>) 或完整的 URL (<code>ldap://server.tld:389</code>)';
$lang['port'] = 'LDAP 伺服器端口 (若上方沒填寫完整的 URL)';

View File

@ -1,4 +1,6 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* DokuWiki Plugin authpdo (Auth Component)
*
@ -599,7 +601,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin
}
$groups = array_unique($groups);
sort($groups);
Sort::sort($groups);
return $groups;
}
@ -632,7 +634,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin
$this->debugMsg("select-groups statement did not return a list of result", -1, __LINE__);
}
ksort($groups);
Sort::ksort($groups);
return $groups;
}

View File

@ -1,4 +1,5 @@
<?php
use dokuwiki\Utf8\Sort;
/**
* Plaintext authentication backend
@ -298,7 +299,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin
if ($this->users === null) $this->loadUserData();
ksort($this->users);
Sort::ksort($this->users);
$i = 0;
$count = 0;
@ -335,6 +336,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin
foreach($this->users as $user => $info) {
$groups = array_merge($groups, array_diff($info['grps'], $groups));
}
Sort::ksort($groups);
if($limit > 0) {
return array_splice($groups, $start, $limit);

View File

@ -2,6 +2,6 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
*/
$lang['userexists'] = '很抱歉,有人已使用了這個帳號。';

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Axel Schwarzer <SchwarzerA@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
* @author Eric Haberstroh <ehaberstroh@gmail.com>
* @author C!own77 <clown77@posteo.de>
@ -143,6 +144,7 @@ $lang['rss_linkto'] = 'XML-Feed verlinken auf';
$lang['rss_content'] = 'Welche Inhalte sollen im XML-Feed dargestellt werden?';
$lang['rss_update'] = 'XML-Feed Aktualisierungsintervall (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';
@ -171,6 +173,7 @@ $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'] = 'Vertrauen Sie 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 Sie einen langsamen oder unzuverlässigen DNS-Server verwenden oder die Funktion nicht benötigen, dann sollte diese Option deaktiviert sein.';
$lang['jquerycdn'] = 'Sollen jQuery und jQuery UI Skriptdateien von einem CDN (Content Delivery Network) geladen werden? Dadurch entstehen zusätzliche HTTP-Anfragen, aber die Daten werden voraussichtlich schneller geladen und eventuell sind sie auch schon beim Benutzer im Cache.';

View File

@ -3,8 +3,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Pierre Henriot <pierre.henriot@gmail.com>
* @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>

View File

@ -3,7 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paulo Schopf <pschopf@gmail.com>
* @author Paulo <pschopf@gmail.com>
* @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com>
* @author Maykon Oliveira <maykonoliveira850@gmail.com>
* @author José Vieira <jmsv63@gmail.com>

View File

@ -3,8 +3,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Martin Michalek <michalek.dev@gmail.com>
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Tibor Repček <tiborepcek@gmail.com>
* @author Michal Mesko <michal.mesko@gmail.com>
* @author exusik <exusik@gmail.com>
@ -144,10 +144,12 @@ $lang['xsendfile'] = 'Používať X-Sendfile hlavičku pre doručeni
$lang['renderer_xhtml'] = 'Používané vykresľovacie jadro pre hlavný (xhtml) wiki výstup';
$lang['renderer__core'] = '%s (dokuwiki jadro)';
$lang['renderer__plugin'] = '%s (plugin)';
$lang['search_nslimit'] = 'Obmedzte vyhľadávanie na aktuálnych X menných priestorov. Ak je vyhľadávanie vyvolané zo stránky v hlbšom mennom priestore, prvých X menných priestorov bude pridaných ako filter';
$lang['search_fragment_o_exact'] = 'presne';
$lang['search_fragment_o_starts_with'] = 'začína s';
$lang['search_fragment_o_ends_with'] = 'končí na';
$lang['search_fragment_o_contains'] = 'obsahuje';
$lang['defer_js'] = 'Odložiť vykonanie javascriptu po spracovaní HTML stránky. Zlepší sa vnímanie rýchlosti stránky, ale môže znefunkčniť niektoré pluginy.';
$lang['dnslookups'] = 'DokuWiki hľadá mená vzdialených IP adries používateľov editujúcich stránky. Ak máte pomalý alebo nefunkčný DNS server alebo nechcete túto možnosť, deaktivujte túto voľbu';
$lang['jquerycdn'] = 'Mali by byť jQuery a jQuery UI skripty načítané z CDN? Voľba zvýši počet dodatočných HTTP požiadaviek, ale súbory sa môžu načítať rýchlejšie a používatelia ich už môžu mať vo vyrovnávacej pamäti.';
$lang['jquerycdn_o_0'] = 'Nepoužívať CDN, iba lokálne súbory';
@ -194,6 +196,7 @@ $lang['xsendfile_o_2'] = 'Štandardná X-Sendfile hlavička';
$lang['xsendfile_o_3'] = 'Proprietárna Nginx X-Accel-Redirect hlavička';
$lang['showuseras_o_loginname'] = 'Prihlasovacie meno';
$lang['showuseras_o_username'] = 'Celé meno používateľa';
$lang['showuseras_o_username_link'] = 'Celé meno používateľa ako interwiki odkaz';
$lang['showuseras_o_email'] = 'E-mailová adresa používateľa (zamaskovaná podľa nastavenia)';
$lang['showuseras_o_email_link'] = 'E-mailová adresa používateľa vo forme odkazu mailto:';
$lang['useheading_o_0'] = 'Nikdy';

View File

@ -3,15 +3,14 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author GHSRobert Ciang <robertus0617@gmail.com>
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
* @author Liou, Jhe-Yu <lioujheyu@gmail.com>
*/
$lang['menu'] = '系統設定';

View File

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Jenxi <seow@jenxi.com>
* @author FENG.JIE <ahx@qq.com>
* @author Xin <chenxin1034@gmail.com>
* @author HaoNan <haonan@zhuoming.info>

View File

@ -118,7 +118,7 @@ class cli_plugin_extension extends DokuWiki_CLI_Plugin
$ext->setExtension($extname);
$date = $ext->getInstalledVersion();
$avail = $ext->getLastUpdate();
if ($avail && $avail > $date) {
if ($avail && $avail > $date && !$ext->isBundled()) {
$ok += $this->cmdInstall([$extname]);
}
}

View File

@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Axel Schwarzer <SchwarzerA@gmail.com>
* @author Benjamin Molitor <bmolitor@uos.de>
* @author H. Richard <wanderer379@t-online.de>
* @author Joerg <scooter22@gmx.de>
@ -80,6 +81,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 aktivieren Sie 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';

View File

@ -3,7 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paulo Schopf <pschopf@gmail.com>
* @author Paulo <pschopf@gmail.com>
* @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com>
* @author Maykon Oliveira <maykonoliveira850@gmail.com>
* @author José Vieira <jmsv63@gmail.com>

View File

@ -75,6 +75,7 @@ $lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná';
$lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný';
$lang['msg_plugin_update_success'] = 'Plugin %s úspešne aktualizovaný';
$lang['msg_upload_failed'] = 'Nahrávanie súboru zlyhalo';
$lang['msg_nooverwrite'] = 'Rozšírenie %s už existuje a nebude prepísané; aby ste ho prepísali, povoľte príslušnú voľbu';
$lang['missing_dependency'] = '<strong>Chýbajúca alebo nepovolená závislosť:</strong> %s';
$lang['security_issue'] = '<strong>Bezpečnostný problém:</strong> %s';
$lang['security_warning'] = '<strong>Bezpečnostné upozornenie:</strong> %s';

View File

@ -3,10 +3,10 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author GHSRobert Ciang <robertus0617@gmail.com>
* @author Stan <talktostan@gmail.com>
* @author June-Hao Hou <junehao@gmail.com>
* @author lioujheyu <lioujheyu@gmail.com>
* @author Liou, Jhe-Yu <lioujheyu@gmail.com>
*/
$lang['menu'] = '延伸功能管理';
$lang['tab_plugins'] = '已安裝外掛';

View File

@ -2,16 +2,14 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
*/
$lang['name'] = '人氣回饋 (可能需要一些時間載入) ';
$lang['submit'] = '發送資料';

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -2,16 +2,14 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Danny Lin <danny0838@pchome.com.tw>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
*/
$lang['menu'] = '還原管理';
$lang['filter'] = '搜索包含垃圾訊息的頁面';

View File

@ -0,0 +1,2 @@
Tento nástroj umožňuje zmeniť určité nastavenia Vašej aktuálne zvolenej šablóny.
Všetky zmeny sú uložené v lokálnom konfiguračnom súbore a zabezpečené v prípade aktualizácie.

View File

@ -3,10 +3,11 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Martin Michalek <michalek.dev@gmail.com>
* @author Peter Mydliar <peto.mydliar@gmail.com>
*/
$lang['menu'] = 'Nastavenie typov šablón';
$lang['js']['loader'] = 'Nahráva na náhľad...<br />Ak táto správa nezmizne, Vaše údaje môžu byť chybné';
$lang['js']['popup'] = 'Otvor vo vyskakovacom okne';
$lang['error'] = 'Táto šablóna nepodporuje túto funkciu.';
$lang['btn_preview'] = 'Náhľad zmien';

View File

@ -2,7 +2,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author Liou, Jhe-Yu <lioujheyu@gmail.com>
*/
$lang['menu'] = '模板風格設定';

View File

@ -1,2 +1,4 @@
<?php
dbg_deprecated('Autoloading. Do not require() files yourself.');
\dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction(
'Do not require() files yourself. Autoloading', 0, basename(__FILE__)
);

View File

@ -3,7 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Paulo Schopf <pschopf@gmail.com>
* @author Paulo <pschopf@gmail.com>
* @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com>
* @author Maykon Oliveira <maykonoliveira850@gmail.com>
* @author José Vieira <jmsv63@gmail.com>

View File

@ -3,8 +3,8 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Martin Michalek <michalek.dev@gmail.com>
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Ondrej Végh <ov@vsieti.sk>
* @author Michal Mesko <michal.mesko@gmail.com>
* @author exusik <exusik@gmail.com>
@ -68,9 +68,11 @@ $lang['import_error_readfail'] = 'Import neúspešný. Nie je možné prečíta
$lang['import_error_create'] = 'Nie je možné vytvoriť pouzívateľa';
$lang['import_notify_fail'] = 'Správa nemohla byť zaslaná importovanému používatelovi, %s s emailom %s.';
$lang['import_downloadfailures'] = 'Stiahnuť chyby vo formáte CSV za účelom opravy';
$lang['addUser_error_missing_pass'] = 'Nastavte heslo alebo aktivujte upozornenie používateľa o možnosti vytvorenia hesla.';
$lang['addUser_error_pass_not_identical'] = 'Zadané heslo nie je identické.';
$lang['addUser_error_modPass_disabled'] = 'Zmena hesla nie je momentálne povolená';
$lang['addUser_error_name_missing'] = 'Prosím zadajte meno nového používateľa.';
$lang['addUser_error_modName_disabled'] = 'Zmena mena nie je momentálne povolená.';
$lang['addUser_error_mail_missing'] = 'Prosím zadajte emailovú adresu nového používateľa.';
$lang['addUser_error_modMail_disabled'] = 'Zmena emailovej adresy nie je momentálne povolená.';
$lang['addUser_error_create_event_failed'] = 'Plugin zabránil pridaniu nového používateľa. Pre viac informácií prezrite ďalšie možné správy.';

View File

@ -2,16 +2,14 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
*
* @author chinsan <chinsan.tw@gmail.com>
* @author Li-Jiun Huang <ljhuang.tw@gmail.com>
* @author http://www.chinese-tools.com/tools/converter-simptrad.html
* @author Wayne San <waynesan@zerozone.tw>
* @author Li-Jiun Huang <ljhuang.tw@gmai.com>
* @author Cheng-Wei Chien <e.cwchien@gmail.com>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
* @author Ichirou Uchiki <syaoranhinata@gmail.com>
* @author syaoranhinata <syaoranhinata@gmail.com>
* @author tsangho <ou4222@gmail.com>
* @author Danny Lin <danny0838@gmail.com>
*/

View File

@ -3,15 +3,15 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Peter Mydliar <peto.mydliar@gmail.com>
* @author Martin Michalek <michalek.dev@gmail.com>
* @author Peter Mydliar <peto.mydliar@gmail.com>
*/
$lang['__background_site__'] = 'Farba základného pozadia (za oknom s obsahom)';
$lang['__link__'] = 'Všeobecná farba odkazu';
$lang['__existing__'] = 'Farba odkazov na existujúce stránky';
$lang['__missing__'] = 'Farba odkazov na neexistujúce stránky';
$lang['__site_width__'] = 'Šírka stránky (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...}';
$lang['__sidebar_width__'] = 'Šírka bočného panela (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...}';
$lang['__site_width__'] = 'Šírka stránky (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...)';
$lang['__sidebar_width__'] = 'Šírka bočného panela (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...)';
$lang['__tablet_width__'] = 'Nižšia šírka stránky prepne zobrazenie do režimu tabletu';
$lang['__phone_width__'] = 'Nižšia šírka stránky prepne zobrazenie do režimu telefónu';
$lang['__theme_color__'] = 'Farba témy pre webovú aplikáciu';

View File

@ -0,0 +1 @@
Ak chcete upraviť logo, jednoducho pomocou Správcu médií nahrajte súbor "logo.png" do "wiki" alebo hlavného menného priestoru, ktorý bude následne automaticky použitý ako logo. Možete tam tiež nahrať "favicon.ico". Ak používate uzatvorenú wiki, je odporúčané sprístupniť "wiki" (alebo hlavný) menný priestor pre čítanie v ACL nastaveniach, inak Vaše logo nebude zobrazené neprihlásených používateľom.

View File

@ -44,25 +44,25 @@
},
{
"name": "geshi/geshi",
"version": "v1.0.9.1",
"version_normalized": "1.0.9.1",
"version": "dev-master",
"version_normalized": "9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/GeSHi/geshi-1.0.git",
"reference": "fd22ab78481bf90337862b590e6f7517863926b8"
"reference": "3c12a7931d509c5e3557c5ed44c9a32e9c917c7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/GeSHi/geshi-1.0/zipball/fd22ab78481bf90337862b590e6f7517863926b8",
"reference": "fd22ab78481bf90337862b590e6f7517863926b8",
"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": "2019-10-20T20:54:46+00:00",
"time": "2020-06-22T15:46:04+00:00",
"type": "library",
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"classmap": [
"src/geshi/",
@ -244,17 +244,17 @@
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.27",
"version_normalized": "2.0.27.0",
"version": "2.0.28",
"version_normalized": "2.0.28.0",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
"reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
"reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
"shasum": ""
},
"require": {
@ -272,7 +272,7 @@
"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-04-04T23:17:33+00:00",
"time": "2020-07-08T09:08:33+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {

View File

@ -4045,7 +4045,7 @@ class GeSHi {
$parsed_code .= str_repeat('</span>', $close);
$close = 0;
}
elseif ($i + 1 < $n) {
if ($i + 1 < $n) {
$parsed_code .= "\n";
}
unset($code[$i]);

View File

@ -44,7 +44,7 @@ AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509
* Composer compatible (PSR-0 autoloading)
* Install using Composer: `composer require phpseclib/phpseclib:~1.0`
* Install using PEAR: See [phpseclib PEAR Channel Documentation](http://phpseclib.sourceforge.net/pear.htm)
* [Download 1.0.18 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.18.zip/download)
* [Download 1.0.19 as ZIP](http://sourceforge.net/projects/phpseclib/files/phpseclib1.0.19.zip/download)
## Security contact information

View File

@ -413,7 +413,7 @@ abstract class Base
* @var mixed
* @access private
*/
var $use_inline_crypt;
var $use_inline_crypt = true;
/**
* If OpenSSL can be used in ECB but not in CTR we can emulate CTR
@ -495,11 +495,6 @@ abstract class Base
}
$this->_setEngine();
// Determining whether inline crypting can be used by the cipher
if ($this->use_inline_crypt !== false) {
$this->use_inline_crypt = version_compare(PHP_VERSION, '5.3.0') >= 0 || function_exists('create_function');
}
}
/**
@ -2602,12 +2597,8 @@ abstract class Base
}
// Create the $inline function and return its name as string. Ready to run!
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
eval('$func = function ($_action, &$self, $_text) { ' . $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' } };');
return $func;
}
return create_function('$_action, &$self, $_text', $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' }');
eval('$func = function ($_action, &$self, $_text) { ' . $init_crypt . 'if ($_action == "encrypt") { ' . $encrypt . ' } else { ' . $decrypt . ' } };');
return $func;
}
/**

View File

@ -272,7 +272,7 @@ class ANSI
case "\x1B[K": // Clear screen from cursor right
$this->screen[$this->y] = substr($this->screen[$this->y], 0, $this->x);
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - $this->x - 1, $this->base_attr_cell));
array_splice($this->attrs[$this->y], $this->x + 1, $this->max_x - $this->x, array_fill($this->x, $this->max_x - ($this->x - 1), $this->base_attr_cell));
break;
case "\x1B[2K": // Clear entire line
$this->screen[$this->y] = str_repeat(' ', $this->x);

View File

@ -719,7 +719,7 @@ class SFTP extends SSH2
}
}
if ($path[0] != '/') {
if (!strlen($path) || $path[0] != '/') {
$path = $this->pwd . '/' . $path;
}
@ -1198,6 +1198,9 @@ class SFTP extends SSH2
$temp = &$this->stat_cache;
$max = count($dirs) - 1;
foreach ($dirs as $i => $dir) {
if (!is_array($temp)) {
return false;
}
if ($i === $max) {
unset($temp[$dir]);
return true;
@ -1224,6 +1227,9 @@ class SFTP extends SSH2
$temp = &$this->stat_cache;
foreach ($dirs as $dir) {
if (!is_array($temp)) {
return null;
}
if (!isset($temp[$dir])) {
return null;
}
@ -2018,8 +2024,8 @@ class SFTP extends SSH2
$sent = 0;
$size = $size < 0 ? ($size & 0x7FFFFFFF) + 0x80000000 : $size;
$sftp_packet_size = 4096; // PuTTY uses 4096
// make the SFTP packet be exactly 4096 bytes by including the bytes in the NET_SFTP_WRITE packets "header"
$sftp_packet_size = $this->max_sftp_packet;
// make the SFTP packet be exactly the SFTP packet size by including the bytes in the NET_SFTP_WRITE packets "header"
$sftp_packet_size-= strlen($handle) + 25;
$i = $j = 0;
while ($dataCallback || ($size === 0 || $sent < $size)) {

View File

@ -3004,7 +3004,7 @@ class SSH2
* @see self::write()
* @param string $expect
* @param int $mode
* @return string
* @return string|bool
* @access public
*/
function read($expect = '', $mode = self::READ_SIMPLE)
@ -3894,7 +3894,7 @@ class SSH2
$this->channel_buffers[$channel][] = $data;
break;
case NET_SSH2_MSG_CHANNEL_CLOSE:
$this->curTimeout = 0;
$this->curTimeout = 5;
if ($this->bitmap & self::MASK_SHELL) {
$this->bitmap&= ~self::MASK_SHELL;
@ -4123,11 +4123,15 @@ class SSH2
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
$this->curTimeout = 0;
$this->curTimeout = 5;
while (!is_bool($this->_get_channel_packet($client_channel))) {
}
if ($this->is_timeout) {
$this->disconnect();
}
if ($want_reply) {
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
}