diff --git a/_test/tests/inc/auth_aclcheck.test.php b/_test/tests/inc/auth_aclcheck.test.php index b128b78719d2cdc97da5dd7f05cb579148d945d3..8c9b37536eb2200a82327d2702a46cbb25bc2f35 100644 --- a/_test/tests/inc/auth_aclcheck.test.php +++ b/_test/tests/inc/auth_aclcheck.test.php @@ -2,7 +2,7 @@ class auth_acl_test extends DokuWikiTest { - var $oldAuthAcl; + protected $oldAuthAcl; function setUp() { parent::setUp(); diff --git a/_test/tests/inc/auth_password.test.php b/_test/tests/inc/auth_password.test.php index b2d0df0d799c050aeecc14b3b3b0084b7c0c6fa6..3ecc5f85e33cedebd7e9254f0f0689c6e1c68e50 100644 --- a/_test/tests/inc/auth_password.test.php +++ b/_test/tests/inc/auth_password.test.php @@ -2,102 +2,112 @@ class auth_password_test extends DokuWikiTest { - // hashes for the password foo$method, using abcdefgh12345678912345678912345678 as salt - var $passes = array( - 'smd5' => '$1$abcdefgh$SYbjm2AEvSoHG7Xapi8so.', - 'apr1' => '$apr1$abcdefgh$C/GzYTF4kOVByYLEoD5X4.', - 'md5' => '8fa22d62408e5351553acdd91c6b7003', - 'sha1' => 'b456d3b0efd105d613744ffd549514ecafcfc7e1', - 'ssha' => '{SSHA}QMHG+uC7bHNYKkmoLbNsNI38/dJhYmNk', - 'lsmd5' => '{SMD5}HGbkPrkWgy9KgcRGWlrsUWFiY2RlZmdo', - 'crypt' => 'ablvoGr1hvZ5k', - 'mysql' => '4a1fa3780bd6fd55', - 'my411' => '*E5929347E25F82E19E4EBE92F1DC6B6E7C2DBD29', - 'kmd5' => 'a579299436d7969791189acadd86fcb716', - 'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158', - 'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678', - - ); + /** + * precomputed hashes + * + * for the password foo$method, using abcdefgh12345678912345678912345678 as salt + * + * @return array + */ + public function hashes() { + + $passes = array( + array('smd5', '$1$abcdefgh$SYbjm2AEvSoHG7Xapi8so.'), + array('apr1', '$apr1$abcdefgh$C/GzYTF4kOVByYLEoD5X4.'), + array('md5', '8fa22d62408e5351553acdd91c6b7003'), + array('sha1', 'b456d3b0efd105d613744ffd549514ecafcfc7e1'), + array('ssha', '{SSHA}QMHG+uC7bHNYKkmoLbNsNI38/dJhYmNk'), + array('lsmd5', '{SMD5}HGbkPrkWgy9KgcRGWlrsUWFiY2RlZmdo'), + array('crypt', 'ablvoGr1hvZ5k'), + array('mysql', '4a1fa3780bd6fd55'), + array('my411', '*E5929347E25F82E19E4EBE92F1DC6B6E7C2DBD29'), + array('kmd5', 'a579299436d7969791189acadd86fcb716'), + array('djangomd5', 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158'), + array('djangosha1', 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678'), + + ); - function __construct() { if(defined('CRYPT_SHA512') && CRYPT_SHA512 == 1) { // Check SHA512 only if available in this PHP - $this->passes['sha512'] = '$6$abcdefgh12345678$J9.zOcgx0lotwZdcz0uulA3IVQMinZvFZVjA5vapRLVAAqtay23XD4xeeUxQ3B4JvDWYFBIxVWW1tOYlHX13k1'; + $passes[] = array('sha512', '$6$abcdefgh12345678$J9.zOcgx0lotwZdcz0uulA3IVQMinZvFZVjA5vapRLVAAqtay23XD4xeeUxQ3B4JvDWYFBIxVWW1tOYlHX13k1'); } if(function_exists('hash_pbkdf2')) { if(in_array('sha256', hash_algos())) { - $this->passes['djangopbkdf2_sha256'] = 'pbkdf2_sha256$24000$abcdefgh1234$R23OyZJ0nGHLG6MvPNfEkV5AOz3jUY5zthByPXs2gn0='; + $passes[] = array('djangopbkdf2_sha256', 'pbkdf2_sha256$24000$abcdefgh1234$R23OyZJ0nGHLG6MvPNfEkV5AOz3jUY5zthByPXs2gn0='); } if(in_array('sha1', hash_algos())) { - $this->passes['djangopbkdf2_sha1'] = 'pbkdf2_sha1$24000$abcdefgh1234$pOliX4vV1hgOv7lFNURIHHx41HI='; + $passes[] = array('djangopbkdf2_sha1', 'pbkdf2_sha1$24000$abcdefgh1234$pOliX4vV1hgOv7lFNURIHHx41HI='); } } + return $passes; } - - function test_cryptPassword(){ - foreach($this->passes as $method => $hash){ - $info = "testing method $method"; - $this->assertEquals( - $hash, - auth_cryptPassword('foo'.$method, $method,'abcdefgh12345678912345678912345678'), - $info); - } + /** + * @dataProvider hashes + * @param $method + * @param $hash + */ + function test_cryptPassword($method, $hash) { + $this->assertEquals( + $hash, + auth_cryptPassword('foo' . $method, $method, 'abcdefgh12345678912345678912345678') + ); } - function test_verifyPassword(){ - foreach($this->passes as $method => $hash){ - $info = "testing method $method"; - $this->assertTrue(auth_verifyPassword('foo'.$method, $hash), $info); - $this->assertFalse(auth_verifyPassword('bar'.$method, $hash), $info); - } + /** + * @dataProvider hashes + * @param $method + * @param $hash + */ + function test_verifyPassword($method, $hash) { + $this->assertTrue(auth_verifyPassword('foo' . $method, $hash)); + $this->assertFalse(auth_verifyPassword('bar' . $method, $hash)); } - function test_verifySelf(){ - foreach($this->passes as $method => $hash){ - $info = "testing method $method"; - $hash = auth_cryptPassword('foo'.$method,$method); - $this->assertTrue(auth_verifyPassword('foo'.$method, $hash), $info); - } + /** + * @dataProvider hashes + * @param $method + * @param $hash + */ + function test_verifySelf($method, $hash) { + $hash = auth_cryptPassword('foo' . $method, $method); + $this->assertTrue(auth_verifyPassword('foo' . $method, $hash)); } - function test_bcrypt_self(){ - $hash = auth_cryptPassword('foobcrypt','bcrypt'); - $this->assertTrue(auth_verifyPassword('foobcrypt',$hash)); + function test_bcrypt_self() { + $hash = auth_cryptPassword('foobcrypt', 'bcrypt'); + $this->assertTrue(auth_verifyPassword('foobcrypt', $hash)); } - function test_verifyPassword_fixedbcrypt(){ - $this->assertTrue(auth_verifyPassword('foobcrypt','$2a$12$uTWercxbq4sjp2xAzv3we.ZOxk51m5V/Bv5bp2H27oVFJl5neFQoC')); + function test_verifyPassword_fixedbcrypt() { + $this->assertTrue(auth_verifyPassword('foobcrypt', '$2a$12$uTWercxbq4sjp2xAzv3we.ZOxk51m5V/Bv5bp2H27oVFJl5neFQoC')); } - function test_verifyPassword_nohash(){ - $this->assertTrue(auth_verifyPassword('foo','$1$$n1rTiFE0nRifwV/43bVon/')); + function test_verifyPassword_nohash() { + $this->assertTrue(auth_verifyPassword('foo', '$1$$n1rTiFE0nRifwV/43bVon/')); } - function test_verifyPassword_fixedpmd5(){ - $this->assertTrue(auth_verifyPassword('test12345','$P$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); - $this->assertTrue(auth_verifyPassword('test12345','$H$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); + function test_verifyPassword_fixedpmd5() { + $this->assertTrue(auth_verifyPassword('test12345', '$P$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); + $this->assertTrue(auth_verifyPassword('test12345', '$H$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); } - function test_veryPassword_mediawiki(){ + function test_veryPassword_mediawiki() { $this->assertTrue(auth_verifyPassword('password', ':B:838c83e1:e4ab7024509eef084cdabd03d8b2972c')); } - /** * pmd5 checking should throw an exception when a hash with a too high * iteration count is passed */ - function test_verifyPassword_pmd5Exception(){ + function test_verifyPassword_pmd5Exception() { $except = false; - try{ + try { auth_verifyPassword('foopmd5', '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.'); - }catch (Exception $e){ + } catch(Exception $e) { $except = true; } $this->assertTrue($except); } } - -//Setup VIM: ex: et ts=4 : diff --git a/_test/tests/inc/blowfish.test.php b/_test/tests/inc/blowfish.test.php deleted file mode 100644 index 972df11f4b16a8df50a5ab745b33e44dd09a55b0..0000000000000000000000000000000000000000 --- a/_test/tests/inc/blowfish.test.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** - * Test for blowfish encryption. - */ -class blowfish_test extends DokuWikiTest { - public function testEncryptDecryptNumbers() { - $secret = '$%ÄüfuDFRR'; - $string = '12345678'; - $this->assertEquals( - $string, - PMA_blowfish_decrypt(PMA_blowfish_encrypt($string, $secret), $secret) - ); - } - - public function testEncryptDecryptChars() { - $secret = '$%ÄüfuDFRR'; - $string = 'abcDEF012!"§$%&/()=?`´"\',.;:-_#+*~öäüÖÄÜ^°²³'; - $this->assertEquals( - $string, - PMA_blowfish_decrypt(PMA_blowfish_encrypt($string, $secret), $secret) - ); - } - - // FS#1690 FS#1713 - public function testEncryptDecryptBinary() { - $secret = '$%ÄüfuDFRR'; - $string = "this is\0binary because of\0zero bytes"; - $this->assertEquals( - $string, - PMA_blowfish_decrypt(PMA_blowfish_encrypt($string, $secret), $secret) - ); - } -} diff --git a/_test/tests/inc/io_readfile.test.php b/_test/tests/inc/io_readfile.test.php index 43bb7f80c90cf0437253912e18cd65d5d10bb898..b11bae1cbb2f7f930b987f7f35ce9cef24009fce 100644 --- a/_test/tests/inc/io_readfile.test.php +++ b/_test/tests/inc/io_readfile.test.php @@ -8,7 +8,9 @@ class io_readfile_test extends DokuWikiTest { public function test_ext_zlib() { if (!DOKU_HAS_GZIP) { $this->markTestSkipped('skipping all zlib tests. Need zlib extension'); + return; } + $this->assertTrue(true); } /* @@ -17,7 +19,9 @@ class io_readfile_test extends DokuWikiTest { public function test_ext_bz2() { if (!DOKU_HAS_BZIP) { $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension'); + return; } + $this->assertTrue(true); } function test_plain(){ diff --git a/_test/tests/inc/io_replaceinfile.test.php b/_test/tests/inc/io_replaceinfile.test.php index 58a29d86bcc7335aa4b87d3155548785db5d9e62..3fb81b256b8b7d54767d7ed3d6b42337831ece19 100644 --- a/_test/tests/inc/io_replaceinfile.test.php +++ b/_test/tests/inc/io_replaceinfile.test.php @@ -10,7 +10,9 @@ class io_replaceinfile_test extends DokuWikiTest { public function test_ext_zlib() { if (!DOKU_HAS_GZIP) { $this->markTestSkipped('skipping all zlib tests. Need zlib extension'); + return; } + $this->assertTrue(true); } /* @@ -19,7 +21,9 @@ class io_replaceinfile_test extends DokuWikiTest { public function test_ext_bz2() { if (!DOKU_HAS_BZIP) { $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension'); + return; } + $this->assertTrue(true); } function _write($file){ diff --git a/_test/tests/inc/io_savefile.test.php b/_test/tests/inc/io_savefile.test.php index 5f387b8a16bbe12537af047c43d97f444399209f..0dfb551cc4ec6d66f37d660731409cf1b17026a0 100644 --- a/_test/tests/inc/io_savefile.test.php +++ b/_test/tests/inc/io_savefile.test.php @@ -8,7 +8,9 @@ class io_savefile_test extends DokuWikiTest { public function test_ext_zlib() { if (!DOKU_HAS_GZIP) { $this->markTestSkipped('skipping all zlib tests. Need zlib extension'); + return; } + $this->assertTrue(true); } /* @@ -17,7 +19,9 @@ class io_savefile_test extends DokuWikiTest { public function test_ext_bz2() { if (!DOKU_HAS_BZIP) { $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension'); + return; } + $this->assertTrue(true); } function _write($file){ diff --git a/_test/tests/inc/pageutils_findnearest.test.php b/_test/tests/inc/pageutils_findnearest.test.php index d62d3dd78d07dc60196f1946356587f605d5fe8b..c2815a06cafaa82fd06e44daa6a6e62b9a852cbc 100644 --- a/_test/tests/inc/pageutils_findnearest.test.php +++ b/_test/tests/inc/pageutils_findnearest.test.php @@ -2,7 +2,7 @@ class pageutils_findnearest_test extends DokuWikiTest { - var $oldAuthAcl; + protected $oldAuthAcl; function setUp() { parent::setUp(); diff --git a/_test/tests/inc/remote.test.php b/_test/tests/inc/remote.test.php index 316f12e8aa01d9a51be27af3dc40be5e7b532710..ee040f09a4ad3cb614ace6721039fc389695af8e 100644 --- a/_test/tests/inc/remote.test.php +++ b/_test/tests/inc/remote.test.php @@ -129,10 +129,10 @@ class remote_plugin_testplugin2 extends DokuWiki_Remote_Plugin { class remote_test extends DokuWikiTest { - var $userinfo; + protected $userinfo; /** @var RemoteAPI */ - var $remote; + protected $remote; function setUp() { parent::setUp(); diff --git a/_test/tests/inc/utf8_utf16be.test.php b/_test/tests/inc/utf8_utf16be.test.php index 6a12a01fdafef702f105b54ac647386f062d8801..943ebeffc824921319b921e1039506104f91d2b0 100644 --- a/_test/tests/inc/utf8_utf16be.test.php +++ b/_test/tests/inc/utf8_utf16be.test.php @@ -5,8 +5,8 @@ if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); class utf8_utf16be_test extends DokuWikiTest { // some chars from various code regions - var $utf8 = '鈩ℵÅöx'; - var $utf16 = "\x92\x29\x21\x35\x1\x41\x0\xf6\x0\x78"; + protected $utf8 = '鈩ℵÅöx'; + protected $utf16 = "\x92\x29\x21\x35\x1\x41\x0\xf6\x0\x78"; /** * Convert from UTF-8 to UTF-16BE diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index ca59eb05fa5378b32e8c7c6b63f36f5c1f83b554..d667ce303d88dd53fb429d6edc3f28412a6e90f0 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -2037,8 +2037,7 @@ class JpegMeta { $ifdEntries = array(); $entryCount = 0; - reset($EXIFNames); - while (list($tag, $name) = each($EXIFNames)) { + foreach($EXIFNames as $tag => $name) { $type = $EXIFTypeInfo[$tag][0]; $count = $EXIFTypeInfo[$tag][1]; $value = null; @@ -2578,9 +2577,7 @@ class JpegMeta { $IPTCNames =& $this->_iptcNameTags(); - reset($this->_info['iptc']); - - while (list($label) = each($this->_info['iptc'])) { + foreach($this->_info['iptc'] as $label => $value) { $value =& $this->_info['iptc'][$label]; $type = -1; @@ -2969,8 +2966,8 @@ class JpegMeta { /*************************************************************/ function _names2Tags($tags2Names) { $names2Tags = array(); - reset($tags2Names); - while (list($tag, $name) = each($tags2Names)) { + + foreach($tags2Names as $tag => $name) { $names2Tags[$name] = $tag; } diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index 7ef068799f9840c7e08b8384f7b57835cad946ff..d24cc75e52110660c1b142dde1102b7713b441a1 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -537,7 +537,7 @@ class PassHash { if(is_null($salt)) { if($compute < 4 || $compute > 31) $compute = 8; - $salt = '$2a$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. + $salt = '$2y$'.str_pad($compute, 2, '0', STR_PAD_LEFT).'$'. $this->gen_salt(22); } diff --git a/inc/auth.php b/inc/auth.php index d9928cea68af7e8cc6bf24f6de59ebbd877d47c3..7fa61aa18af43a4d9760ed426f725217aa38e229 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -230,7 +230,10 @@ function auth_login($user, $pass, $sticky = false, $silent = false) { return true; } else { //invalid credentials - log off - if(!$silent) msg($lang['badlogin'], -1); + if(!$silent) { + http_status(403, 'Login failed'); + msg($lang['badlogin'], -1); + } auth_logoff(); return false; } diff --git a/inc/blowfish.php b/inc/blowfish.php deleted file mode 100644 index 7499515bc2bc79198007c23a79d7dae016c24372..0000000000000000000000000000000000000000 --- a/inc/blowfish.php +++ /dev/null @@ -1,515 +0,0 @@ -<?php -/* vim: set expandtab sw=4 ts=4 sts=4: */ -/** - * The Cipher_blowfish:: class implements the Cipher interface enryption data - * using the Blowfish algorithm. - * - * $Horde: horde/lib/Cipher/blowfish.php,v 1.2.2.3 2003/01/03 13:23:22 jan Exp $ - * - * Copyright 2002-2003 Mike Cochrane <mike@graftonhall.co.nz> - * - * See the enclosed file COPYING for license information (LGPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. - * - * @author Mike Cochrane <mike@graftonhall.co.nz> - * @version $Id: blowfish.php 11081 2008-01-25 09:35:48Z cybot_tm $ - * @since Horde 2.2 - * @package horde.cipher - */ - -// Change for phpMyAdmin by lem9: -//class Horde_Cipher_blowfish extends Horde_Cipher { -class Horde_Cipher_blowfish -{ - /* Pi Array */ - var $p = array( - 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, - 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, - 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, - 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, - 0x9216D5D9, 0x8979FB1B); - - /* S Boxes */ - var $s1 = array( - 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, - 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, - 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, - 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, - 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, - 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, - 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, - 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, - 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, - 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, - 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, - 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, - 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, - 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, - 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, - 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, - 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, - 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, - 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, - 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, - 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, - 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, - 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, - 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, - 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, - 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, - 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, - 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, - 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, - 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, - 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, - 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, - 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, - 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, - 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, - 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, - 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, - 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, - 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, - 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, - 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, - 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, - 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, - 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, - 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, - 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, - 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, - 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, - 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, - 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, - 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, - 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, - 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, - 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, - 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, - 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, - 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, - 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, - 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, - 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, - 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, - 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, - 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, - 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A); - var $s2 = array( - 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, - 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, - 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, - 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, - 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, - 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, - 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, - 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, - 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, - 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, - 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, - 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, - 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, - 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, - 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, - 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, - 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, - 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, - 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, - 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, - 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, - 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, - 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, - 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, - 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, - 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, - 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, - 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, - 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, - 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, - 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, - 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, - 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, - 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, - 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, - 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, - 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, - 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, - 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, - 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, - 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, - 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, - 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, - 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, - 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, - 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, - 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, - 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, - 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, - 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, - 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, - 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, - 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, - 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, - 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, - 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, - 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, - 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, - 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, - 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, - 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, - 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, - 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, - 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7); - var $s3 = array( - 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, - 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, - 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, - 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, - 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, - 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, - 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, - 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, - 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, - 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, - 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, - 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, - 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, - 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, - 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, - 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, - 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, - 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, - 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, - 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, - 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, - 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, - 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, - 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, - 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, - 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, - 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, - 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, - 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, - 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, - 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, - 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, - 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, - 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, - 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, - 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, - 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, - 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, - 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, - 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, - 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, - 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, - 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, - 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, - 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, - 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, - 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, - 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, - 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, - 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, - 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, - 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, - 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, - 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, - 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, - 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, - 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, - 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, - 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, - 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, - 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, - 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, - 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, - 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0); - var $s4 = array( - 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, - 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, - 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, - 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, - 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, - 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, - 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, - 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, - 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, - 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, - 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, - 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, - 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, - 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, - 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, - 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, - 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, - 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, - 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, - 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, - 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, - 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, - 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, - 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, - 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, - 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, - 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, - 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, - 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, - 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, - 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, - 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, - 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, - 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, - 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, - 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, - 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, - 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, - 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, - 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, - 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, - 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, - 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, - 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, - 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, - 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, - 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, - 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, - 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, - 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, - 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, - 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, - 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, - 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, - 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, - 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, - 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, - 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, - 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, - 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, - 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, - 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, - 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, - 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6); - - /* The number of rounds to do */ - var $_rounds = 16; - - /** - * Set the key to be used for en/decryption - * - * @param String $key The key to use - */ - function setKey($key) { - $key = $this->_formatKey($key); - $keyPos = $keyXor = 0; - - $iMax = count($this->p); - $keyLen = count($key); - for ($i = 0; $i < $iMax; $i++) { - for ($t = 0; $t < 4; $t++) { - $keyXor = ($keyXor << 8) | (($key[$keyPos]) & 0x0ff); - if (++$keyPos == $keyLen) { - $keyPos = 0; - } - } - $this->p[$i] = $this->p[$i] ^ $keyXor; - } - - $encZero = array('L' => 0, 'R' => 0); - for ($i = 0; $i + 1 < $iMax; $i += 2) { - $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); - $this->p[$i] = $encZero['L']; - $this->p[$i + 1] = $encZero['R']; - } - - $iMax = count($this->s1); - for ($i = 0; $i < $iMax; $i += 2) { - $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); - $this->s1[$i] = $encZero['L']; - $this->s1[$i + 1] = $encZero['R']; - } - - $iMax = count($this->s2); - for ($i = 0; $i < $iMax; $i += 2) { - $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); - $this->s2[$i] = $encZero['L']; - $this->s2[$i + 1] = $encZero['R']; - } - - $iMax = count($this->s3); - for ($i = 0; $i < $iMax; $i += 2) { - $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); - $this->s3[$i] = $encZero['L']; - $this->s3[$i + 1] = $encZero['R']; - } - - $iMax = count($this->s4); - for ($i = 0; $i < $iMax; $i += 2) { - $encZero = $this->_encryptBlock($encZero['L'], $encZero['R']); - $this->s4[$i] = $encZero['L']; - $this->s4[$i + 1] = $encZero['R']; - } - - } - - /** - * Encrypt a block on data. - * - * @param String $block The data to encrypt - * @param String $key optional The key to use - * - * @return String the encrypted output - */ - function encryptBlock($block, $key = null) { - if (!is_null($key)) { - $this->setKey($key); - } - - list($L, $R) = array_values(unpack('N*', $block)); - $parts = $this->_encryptBlock($L, $R); - return pack("NN", $parts['L'], $parts['R']); - } - - /** - * Encrypt a block on data. - * - * @param String $L The data to encrypt. - * @param String $R The data to encrypt. - * - * @return String The encrypted output. - */ - function _encryptBlock($L, $R) { - $L ^= $this->p[0]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[1]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[2]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[3]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[4]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[5]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[6]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[7]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[8]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[9]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[10]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[11]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[12]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[13]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[14]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[15]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[16]; - $R ^= $this->p[17]; - - return array('L' => $R, 'R' => $L); - } - - /** - * Decrypt a block on data. - * - * @param String $block The data to decrypt - * @param String $key optional The key to use - * - * @return String the decrypted output - */ - function decryptBlock($block, $key = null) { - if (!is_null($key)) { - $this->setKey($key); - } - - // change for phpMyAdmin - $L = null; - $R = null; - - $retarray = array_values(unpack('N*', $block)); - if (isset($retarray[0])) { - $L = $retarray[0]; - } - if (isset($retarray[1])) { - $R = $retarray[1]; - } - // end change for phpMyAdmin - - $L ^= $this->p[17]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[16]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[15]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[14]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[13]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[12]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[11]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[10]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[9]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[8]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[7]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[6]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[5]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[4]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[3]; - $R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[2]; - $L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[1]; - - $decrypted = pack("NN", $R ^ $this->p[0], $L); - return $decrypted; - } - - /** - * Converts a text key into an array. - * - * @param string $key - * @return array The key. - */ - function _formatKey($key) { - return array_values(unpack('C*', $key)); - } - -} - -// higher-level functions: -/** - * Encryption using blowfish algorithm - * - * @param string $data original data - * @param string $secret the secret - * - * @return string the encrypted result - * - * @access public - * - * @author lem9 - */ -function PMA_blowfish_encrypt($data, $secret) { - $pma_cipher = new Horde_Cipher_blowfish; - $encrypt = ''; - - $data .= '_'; // triming fixed for DokuWiki FS#1690 FS#1713 - $mod = strlen($data) % 8; - - if ($mod > 0) { - $data .= str_repeat("\0", 8 - $mod); - } - - foreach (str_split($data, 8) as $chunk) { - $encrypt .= $pma_cipher->encryptBlock($chunk, $secret); - } - return base64_encode($encrypt); -} - -/** - * Decryption using blowfish algorithm - * - * @param string $encdata encrypted data - * @param string $secret the secret - * - * @return string original data - * - * @access public - * - * @author lem9 - */ -function PMA_blowfish_decrypt($encdata, $secret) { - $pma_cipher = new Horde_Cipher_blowfish; - $decrypt = ''; - $data = base64_decode($encdata); - - foreach (str_split($data, 8) as $chunk) { - $decrypt .= $pma_cipher->decryptBlock($chunk, $secret); - } - return substr(rtrim($decrypt, "\0"), 0, -1); // triming fixed for DokuWiki FS#1690 FS#1713 -} diff --git a/inc/cache.php b/inc/cache.php index 9375dc86be863f4372687e272b3971882376d600..8589d91bad6f3e2d029b18a01b75a1feb86fcd5e 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -18,9 +18,9 @@ class cache { public $depends = array(); // array containing cache dependency information, // used by _useCache to determine cache validity - var $_event = ''; // event to be triggered during useCache - var $_time; - var $_nocache = false; // if set to true, cache will not be used or stored + public $_event = ''; // event to be triggered during useCache + public $_time; + public $_nocache = false; // if set to true, cache will not be used or stored /** * @param string $key primary identifier @@ -180,7 +180,7 @@ class cache_parser extends cache { public $mode = ''; // input mode (represents the processing the input file will undergo) public $page = ''; - var $_event = 'PARSER_CACHE_USE'; + public $_event = 'PARSER_CACHE_USE'; /** * diff --git a/inc/events.php b/inc/events.php index 35d55d0e3fda5f98b17eba1174e215925abc0a3d..af26b08a8a57a9dd3c2d13df977fef19bceb529d 100644 --- a/inc/events.php +++ b/inc/events.php @@ -22,8 +22,8 @@ class Doku_Event { public $canPreventDefault = true; // READONLY if true, event handlers can prevent the events default action // private properties, event handlers can effect these through the provided methods - var $_default = true; // whether or not to carry out the default action associated with the event - var $_continue = true; // whether or not to continue propagating the event to other handlers + protected $_default = true; // whether or not to carry out the default action associated with the event + protected $_continue = true; // whether or not to continue propagating the event to other handlers /** * event constructor @@ -123,18 +123,36 @@ class Doku_Event { * stop any further processing of the event by event handlers * this function does not prevent the default action taking place */ - function stopPropagation() { + public function stopPropagation() { $this->_continue = false; } + /** + * may the event propagate to the next handler? + * + * @return bool + */ + public function mayPropgate() { + return $this->_continue; + } + /** * preventDefault * * prevent the default action taking place */ - function preventDefault() { + public function preventDefault() { $this->_default = false; } + + /** + * should the default action be executed? + * + * @return bool + */ + public function mayRunDefault() { + return $this->_default; + } } /** @@ -211,7 +229,7 @@ class Doku_Event_Handler { $obj->$method($event, $param); } - if (!$event->_continue) return; + if (!$event->mayPropgate()) return; } } } diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php index fe444b39baa3b750026d35ca57afe9b760bf8e10..926bdc8dbe1faf06a41c70288a91baa719a7edd3 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -1315,7 +1315,7 @@ class MBOXCreator extends FeedCreator { $eol = "\r\n"; $escape = "="; $output = ""; - while( list(, $line) = each($lines) ) { + foreach($lines as $line) { //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary $linlen = strlen($line); $newline = ""; diff --git a/inc/form.php b/inc/form.php index 46cc8fe6bfa379dd36117ba05b1091832b751ec1..caf12c019b2fa5028d5914f20b384ba10e02487a 100644 --- a/inc/form.php +++ b/inc/form.php @@ -28,17 +28,17 @@ if(!defined('DOKU_INC')) die('meh.'); class Doku_Form { // Form id attribute - var $params = array(); + protected $params = array(); // Draw a border around form fields. // Adds <fieldset></fieldset> around the elements - var $_infieldset = false; + protected $_infieldset = false; // Hidden form fields. - var $_hidden = array(); + protected $_hidden = array(); // Array of pseudo-tags - var $_content = array(); + protected $_content = array(); /** * Constructor diff --git a/inc/html.php b/inc/html.php index 70ba4dcfe55fe55364b93c7c783cee8b11058a61..2897d01c15e3f07bb99df75f3a279b57e773b90b 100644 --- a/inc/html.php +++ b/inc/html.php @@ -208,8 +208,7 @@ function html_btn($name, $id, $akey, $params, $method='get', $tooltip='', $label $ret .= '<form class="button btn_'.$name.'" method="'.$method.'" action="'.$script.'"><div class="no">'; if(is_array($params)){ - reset($params); - while (list($key, $val) = each($params)) { + foreach($params as $key => $val) { $ret .= '<input type="hidden" name="'.$key.'" '; $ret .= 'value="'.htmlspecialchars($val).'" />'; } diff --git a/inc/io.php b/inc/io.php index a736d645a0da7178d965a8044d1181a056bab9fd..7b646f127f81491966f3efcc0357d6c334160256 100644 --- a/inc/io.php +++ b/inc/io.php @@ -339,7 +339,8 @@ function io_replaceInFile($file, $oldline, $newline, $regex=false, $maxlines=0) if ($maxlines > 0) { $count = 0; $matched = 0; - while (($count < $maxlines) && (list($i,$line) = each($lines))) { + foreach($lines as $i => $line) { + if($count >= $maxlines) break; // $matched will be set to 0|1 depending on whether pattern is matched and line replaced $lines[$i] = preg_replace($pattern, $replace, $line, -1, $matched); if ($matched) $count++; diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index b842c798fb2ed62726a0991d69691ea99b20559c..4416215ddf0f9314d618d75801f63ea687768e77 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -1,9 +1,10 @@ <?php + /** - * Azerbaijani language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Pasha L. Topchiyev <pasha@itopchiyev.com> + * @author Elchin <quliyev_elchin1989@mail.ru> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -43,6 +44,7 @@ $lang['btn_recover'] = 'Qaralamanı qaytar'; $lang['btn_draftdel'] = 'Qaralamanı sil'; $lang['btn_revert'] = 'Qaytar'; $lang['btn_register'] = 'Qeydiyyatdan keç'; +$lang['btn_img_backto'] = 'Qayıd %s'; $lang['loggedinas'] = 'İstifadÉ™cinin adı:'; $lang['user'] = 'istifadÉ™ci adı'; $lang['pass'] = 'ÅžifrÉ™'; @@ -57,7 +59,7 @@ $lang['badlogin'] = 'TÉ™ssüf ki istifadəçi adı vÉ™ ya ÅŸifrÉ™ s $lang['minoredit'] = 'Az dÉ™yiÅŸiklÉ™r'; $lang['draftdate'] = 'Qaralama yadda saxlandı'; $lang['nosecedit'] = 'Bu vaxt É™rzindÉ™ sÉ™hifÉ™ dÉ™yiÅŸilmiÅŸdir, vÉ™ bölmÉ™ haqqında mÉ™lumat köhnÉ™lmiÅŸdir. SÉ™hifÉ™nin tam versiyası yüklÉ™nmiÅŸdir.'; -$lang['searchcreatepage'] = "ÆgÉ™r Siz axtardığınızı tapa bilmÉ™dinizsÉ™, onda Siz adı axtarışınız ilÉ™ uyÄŸun düşən yeni sÉ™hifÉ™ yarada bilÉ™rsiniz. Bunu elÉ™mÉ™k üçün, sadÉ™cÉ™ ''SÉ™hifÉ™ni yarat'' düymÉ™sini sıxın."; +$lang['searchcreatepage'] = 'ÆgÉ™r Siz axtardığınızı tapa bilmÉ™dinizsÉ™, onda Siz adı axtarışınız ilÉ™ uyÄŸun düşən yeni sÉ™hifÉ™ yarada bilÉ™rsiniz. Bunu elÉ™mÉ™k üçün, sadÉ™cÉ™ \'\'SÉ™hifÉ™ni yarat\'\' düymÉ™sini sıxın.'; $lang['regmissing'] = 'TÉ™ssüf ki Siz bütün xanÉ™lÉ™ri doldurmalısınız.'; $lang['reguexists'] = 'TÉ™ssüf ki bu ad ilÉ™ istifadəçi artıq mövcuddur.'; $lang['regsuccess'] = 'İstivadÉ™ci yaradıldı vÉ™ ÅŸifrÉ™ sizin e-maila göndÉ™rildi.'; @@ -71,6 +73,9 @@ $lang['profna'] = 'Bu wiki profilin dÉ™yiÅŸdirilmÉ™sini dÉ™stÉ™kl $lang['profnochange'] = 'DÉ™yiÅŸiklÉ™r edilmÉ™di, profil yenilÉ™nmÉ™di.'; $lang['profnoempty'] = 'istifadÉ™ci adı vÉ™ e-mail ünvanı boÅŸ ola bilmÉ™z.'; $lang['profchanged'] = 'İstifadəçi profili uÄŸurla yenilÉ™ndi.'; +$lang['profdeleteuser'] = 'Profili sil.'; +$lang['profconfdeletemissing'] = 'TÉ™sdiq xanası seçilmÉ™ib.'; +$lang['proffail'] = 'İstifadəçi profili yenilÉ™nmiyib.'; $lang['pwdforget'] = 'ÅžifrÉ™ni yaddan çıxartmısız? Buyurun yenisini É™ldÉ™ edin'; $lang['resendna'] = 'Bu wiki ÅŸifrÉ™ni yenidÉ™n göndÉ™rmÉ™yi dÉ™stÉ™klÉ™mir.'; $lang['resendpwdmissing'] = 'Formanın bütün xanÉ™lırini doldurun.'; @@ -87,7 +92,25 @@ $lang['txt_filename'] = 'Faylın wiki-dÉ™ olan adını daxil edin (müt $lang['txt_overwrt'] = 'Mövcud olan faylın üstündÉ™n yaz'; $lang['lockedby'] = 'Ð’ данный момент заблокирован Bu an blokdadır:'; $lang['lockexpire'] = 'Blok bitir:'; -$lang['js']['willexpire'] = 'Sizin bu sÉ™hifÉ™dÉ™ dÉ™yiÅŸik etmÉ™k üçün blokunuz bir dÉ™qiqÉ™ É™rzindÉ™ bitÉ™cÉ™k.\nMünaqiÅŸÉ™lÉ™rdÉ™n yayınmaq vÉ™ blokun taymerini sıfırlamaq üçün, baxış düymÉ™sini sıxın.'; +$lang['js']['willexpire'] = 'Sizin bu sÉ™hifÉ™dÉ™ dÉ™yiÅŸik etmÉ™k üçün blokunuz bir dÉ™qiqÉ™ É™rzindÉ™ bitÉ™cÉ™k.\nMünaqiÅŸÉ™lÉ™rdÉ™n yayınmaq vÉ™ blokun taymerini sıfırlamaq üçün, baxış düymÉ™sini sıxın.'; +$lang['js']['notsavedyet'] = 'YaddaÅŸa verilmÉ™miÅŸ mÉ™lumatlar itÉ™cÉ™k.'; +$lang['js']['searchmedia'] = 'Faylların axtarışı'; +$lang['js']['keepopen'] = 'SeçimdÉ™n sonra pÉ™ncÉ™rÉ™ni açıq saxlamaq'; +$lang['js']['hidedetails'] = 'TÉ™fÉ™rruatı gizlÉ™t'; +$lang['js']['mediadisplay'] = 'Link növü'; +$lang['js']['mediasize'] = 'Şəkil ölçüsü.'; +$lang['js']['mediaclose'] = 'BaÄŸla.'; +$lang['js']['mediadisplayimg'] = 'Şəkili göstÉ™r.'; +$lang['js']['mediadisplaylnk'] = 'Ancaq linki göstÉ™r.'; +$lang['js']['mediasmall'] = 'Kiçik versiya.'; +$lang['js']['mediamedium'] = 'Orta versiya.'; +$lang['js']['medialarge'] = 'Böyük versiya.'; +$lang['js']['mediaoriginal'] = 'Orjinal versiya.'; +$lang['js']['medialnk'] = 'MÉ™lumat sÉ™hifÉ™sinÉ™ keçid.'; +$lang['js']['nosmblinks'] = 'Windows-un ÅŸÉ™bÉ™kÉ™ qovluqlarına link ancaq Internet Explorer-dÉ™n iÅŸlÉ™yir. \nAmma Siz linki köçürÉ™ bilÉ™rsiniz.'; +$lang['js']['linkwiz'] = 'LinklÉ™r kömÉ™kçisi'; +$lang['js']['linkto'] = 'Link göstÉ™rir:'; +$lang['js']['del_confirm'] = 'Siz É™minsiz ki, seçilmiÅŸlÉ™ri silmÉ™k istÉ™yirsiniz?'; $lang['rssfailed'] = 'AÅŸağıda göstÉ™rilmiÅŸ xÉ™bÉ™r lentini É™ldÉ™ edÉ™n zaman xÉ™ta baÅŸ verdi: '; $lang['nothingfound'] = 'HeçnÉ™ tapılmadı.'; $lang['mediaselect'] = 'Mediya-faylın seçilmÉ™si'; @@ -104,13 +127,6 @@ $lang['deletefail'] = '"%s" adlı fayl silinmÉ™di. Faylın giriÅŸ haq $lang['mediainuse'] = '"%s" adlı fayl silinmÉ™di. Fayl hÉ™lÉ™ istifadÉ™ olunur'; $lang['namespaces'] = 'Namespace-lÉ™r'; $lang['mediafiles'] = 'Mövcud olan fayllar'; -$lang['js']['searchmedia'] = 'Faylların axtarışı'; -$lang['js']['keepopen'] = 'SeçimdÉ™n sonra pÉ™ncÉ™rÉ™ni açıq saxlamaq'; -$lang['js']['hidedetails'] = 'TÉ™fÉ™rruatı gizlÉ™t'; -$lang['js']['nosmblinks'] = 'Windows-un ÅŸÉ™bÉ™kÉ™ qovluqlarına link ancaq Internet Explorer-dÉ™n iÅŸlÉ™yir. \nAmma Siz linki köçürÉ™ bilÉ™rsiniz.'; -$lang['js']['linkwiz'] = 'LinklÉ™r kömÉ™kçisi'; -$lang['js']['linkto'] = 'Link göstÉ™rir:'; -$lang['js']['del_confirm'] = 'Siz É™minsiz ki, seçilmiÅŸlÉ™ri silmÉ™k istÉ™yirsiniz?'; $lang['mediausage'] = 'Bu fayla link yaratmaq üçün aÅŸağıdakı sintaksisdÉ™n istifadÉ™ edin:'; $lang['mediaview'] = 'Bu faylın ilkinÉ™ bax'; $lang['mediaroot'] = 'kök'; @@ -170,7 +186,6 @@ $lang['upperns'] = 'Ana namespace-É™ keç'; $lang['metaedit'] = 'Meta-mÉ™lumatlarda düzÉ™liÅŸ et'; $lang['metasaveerr'] = 'Meta-mÉ™lumatları yazan zamanı xÉ™ta'; $lang['metasaveok'] = 'Meta-mÉ™lumatlar yadda saxlandı'; -$lang['btn_img_backto'] = 'Qayıd %s'; $lang['img_title'] = 'BaÅŸlıq:'; $lang['img_caption'] = 'İmza:'; $lang['img_date'] = 'Tarix:'; @@ -213,5 +228,5 @@ $lang['days'] = '%d gün É™vvÉ™l'; $lang['hours'] = '%d saat É™vvÉ™l'; $lang['minutes'] = '%d dÉ™qiqÉ™ É™vvÉ™l'; $lang['seconds'] = '%d saniyÉ™ É™vvÉ™l'; -$lang['email_signature_text'] = 'DokuWiki aÅŸağıdakı adresdÉ™ yerləşir +$lang['email_signature_text'] = 'DokuWiki aÅŸağıdakı adresdÉ™ yerləşir @DOKUWIKIURL@'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index e4b04ac02031577f5a9c6278e9749d4dace06fa3..ec353f770de9c017aa50d1c0a28b2fcf535b11e7 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -10,6 +10,7 @@ * @author controlonline.net <controlonline.net@gmail.com> * @author Pauet <pauet@gmx.com> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> + * @author David Surroca <david.tb303@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 24b047f5a6669764c9f964fb5eecddfc1aa1cb77..fe2f893660196391d948a422936fbf7542799995 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -22,6 +22,7 @@ * @author Turkislav <turkislav@blabla.com> * @author Daniel SlováÄek <danslo@danslo.cz> * @author Martin RůžiÄka <martinr@post.cz> + * @author Pavel KrupiÄka <pajdacz@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index c32a0b0296842e9814e18f4036b843bd1542b800..25910cbef6139984387b38757b727adc42727d0f 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -12,6 +12,7 @@ * @author Constantinos Xanthopoulos <conx@xanthopoulos.info> * @author chris taklis <ctaklis@gmail.com> * @author cross <cross1962@gmail.com> + * @author Zacharias Sdregas <zsdregas@sch.gr> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -55,6 +56,8 @@ $lang['btn_register'] = 'ΕγγÏαφή'; $lang['btn_apply'] = 'ΕφαÏμογή'; $lang['btn_media'] = 'ΔιαχειÏιστής πολυμÎσων'; $lang['btn_deleteuser'] = 'ΑφαίÏεσε τον λογαÏιασμό μου'; +$lang['btn_img_backto'] = 'ΕπιστÏοφή σε %s'; +$lang['btn_mediaManager'] = 'Εμφάνιση στον διαχειÏιστή πολυμÎσων'; $lang['loggedinas'] = 'ΣυνδεδεμÎνος ως:'; $lang['user'] = 'Όνομα χÏήστη'; $lang['pass'] = 'Κωδικός'; @@ -70,10 +73,12 @@ $lang['badpassconfirm'] = 'Ο κωδικός που εισάγατε εί $lang['minoredit'] = 'Ασήμαντες αλλαγÎÏ‚'; $lang['draftdate'] = 'Αυτόματη αποθήκευση Ï€ÏόχειÏης σελίδας στις'; $lang['nosecedit'] = 'Η σελίδα Ï„Ïοποποιήθηκε στο Î¼ÎµÏ„Î±Î¾Ï ÎºÎ±Î¹ τα στοιχεία της ενότητας δεν ήταν συγχÏονισμÎνα, οπότε φοÏτώθηκε η πλήÏης σελίδα. '; +$lang['searchcreatepage'] = 'Αν δεν βÏίσκεις αυτό που ψάχνεις, μποÏείς να δημιουÏγήσεις ή να επεξεÏγαστείς τη σελίδα που ψάχνεις, χÏησιμοποιώντας το κατάλληλο εÏγαλείο.'; $lang['regmissing'] = 'Î ÏÎπει να συμπληÏώσετε όλα τα πεδία.'; $lang['reguexists'] = 'Αυτός ο λογαÏιασμός υπάÏχει ήδη.'; $lang['regsuccess'] = 'Ο λογαÏιασμός δημιουÏγήθηκε και ο κωδικός εστάλει με e-mail.'; $lang['regsuccess2'] = 'Ο λογαÏιασμός δημιουÏγήθηκε.'; +$lang['regfail'] = 'Δεν Îγινε η δημιουÏγία χÏήστη.'; $lang['regmailfail'] = 'Φαίνεται να υπάÏχει Ï€Ïόβλημα με την αποστολή του ÎºÏ‰Î´Î¹ÎºÎ¿Ï Î¼Îσω e-mail. ΠαÏακαλοÏμε επικοινωνήστε μαζί μας!'; $lang['regbadmail'] = 'Η διεÏθυνση e-mail δεν είναι ÎγκυÏη - εάν πιστεÏετε ότι αυτό είναι λάθος, επικοινωνήστε μαζί μας'; $lang['regbadpass'] = 'Οι δÏο κωδικοί δεν είναι ίδιοι, Ï€Ïοσπαθήστε ξανά.'; @@ -87,6 +92,8 @@ $lang['profnodelete'] = 'Το wiki δεν υποστηÏίζει την $lang['profdeleteuser'] = 'ΔιαγÏαφή λογαÏιασμοÏ'; $lang['profdeleted'] = 'Ο λογαÏιασμός διαγÏάφηκε από αυτό το wiki'; $lang['profconfdelete'] = 'Επιθυμώ να διαγÏάψω τον λογαÏιασμό μου από αυτό το wiki. <br/> Αυτή η επιλογή δεν μποÏεί να αναιÏεθεί.'; +$lang['profconfdeletemissing'] = 'Το κουμπί επιβεβαίωσης δεν πατήθηκε'; +$lang['proffail'] = 'Δεν ενημεÏώθηκε το Ï€Ïοφίλ του χÏήστη.'; $lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας; Αποκτήστε νÎο.'; $lang['resendna'] = 'Αυτό το wiki δεν υποστηÏίζει την εκ\' νÎου αποστολή κωδικών.'; $lang['resendpwd'] = 'Εισαγωγή νÎου Ï‰Î´Î¹ÎºÎ¿Ï Î³Î¹Î±'; @@ -183,6 +190,9 @@ $lang['difflink'] = 'ΣÏνδεσμος σε αυτή την Ï€Ïο $lang['diff_type'] = 'Î Ïοβολή διαφοÏών:'; $lang['diff_inline'] = 'Σε σειÏά'; $lang['diff_side'] = 'Δίπλα-δίπλα'; +$lang['diffprevrev'] = 'Î ÏοηγοÏμενη αναθεώÏηση'; +$lang['diffnextrev'] = 'Επόμενη αναθεώÏηση'; +$lang['difflastrev'] = 'Τελευταία αναθεώÏηση'; $lang['line'] = 'ΓÏαμμή'; $lang['breadcrumb'] = 'ΙστοÏικό:'; $lang['youarehere'] = 'Είστε εδώ:'; @@ -238,7 +248,6 @@ $lang['upperns'] = 'πήγαινε στον μητÏικό φάκ $lang['metaedit'] = 'ΤÏοποποίηση metadata'; $lang['metasaveerr'] = 'Η αποθήκευση των metadata απÎτυχε'; $lang['metasaveok'] = 'Επιτυχής αποθήκευση metadata'; -$lang['btn_img_backto'] = 'ΕπιστÏοφή σε %s'; $lang['img_title'] = 'Τίτλος:'; $lang['img_caption'] = 'Λεζάντα:'; $lang['img_date'] = 'ΗμεÏομηνία:'; @@ -251,7 +260,6 @@ $lang['img_camera'] = 'Camera:'; $lang['img_keywords'] = 'ΛÎξεις-κλειδιά:'; $lang['img_width'] = 'Πλάτος:'; $lang['img_height'] = 'Ύψος:'; -$lang['btn_mediaManager'] = 'Εμφάνιση στον διαχειÏιστή πολυμÎσων'; $lang['subscr_subscribe_success'] = 'Ο/η %s Ï€ÏοστÎθηκε στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_subscribe_error'] = 'Σφάλμα κατά την Ï€Ïοσθήκη του/της %s στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_subscribe_noaddress'] = 'Δεν υπάÏχει διεÏθυνση ταχυδÏομείου συσχετισμÎνη με το όνομα χÏήστη σας. Κατά συνÎπεια δεν μποÏείτε να Ï€Ïοστεθείτε στην λίστα ειδοποιήσεων'; @@ -279,6 +287,7 @@ $lang['i_modified'] = 'Για λόγους ασφαλείας, ο ο Î ÏÎπει είτε να κάνετε νÎα εγκατάσταση, χÏησιμοποιώντας το αÏχικό πακÎτο εγκατάστασης, ή να συμβουλευτείτε τις <a href="http://dokuwiki.org/el:install">οδηγίες εγκατάστασης της εφαÏμογής</a>.'; $lang['i_funcna'] = 'Η λειτουÏγία <code>%s</code> της PHP δεν είναι διαθÎσιμη. Πιθανόν να είναι απενεÏγοποιημÎνη στις Ïυθμίσεις ÎναÏξης της PHP'; $lang['i_phpver'] = 'Η Îκδοση <code>%s</code> της PHP που Îχετε είναι παλαιότεÏη της απαιτοÏμενης <code>%s</code>. Î ÏÎπει να αναβαθμίσετε την PHP.'; +$lang['i_mbfuncoverload'] = 'Για να εκτελεστεί το Dokuwiki Ï€ÏÎπει να απενεÏγοποιήσετε τη ÏÏθμιση mbstring.func_overload στο αÏχείο php.ini'; $lang['i_permfail'] = 'Ο φάκελος <code>%s</code> δεν είναι εγγÏάψιμος από την εφαÏμογή DokuWiki. Î ÏÎπει να διοÏθώσετε τα δικαιώματα Ï€Ïόσβασης Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… φακÎλου!'; $lang['i_confexists'] = '<code>%s</code> υπάÏχει ήδη'; $lang['i_writeerr'] = 'Δεν είναι δυνατή η δημιουÏγία του <code>%s</code>. Î ÏÎπει να διοÏθώσετε τα δικαιώματα Ï€Ïόσβασης Î±Ï…Ï„Î¿Ï Ï„Î¿Ï… φακÎλου/αÏχείου και να δημιουÏγήσετε το αÏχείο χειÏοκίνητα!'; @@ -326,5 +335,5 @@ $lang['media_perm_upload'] = 'Συγνώμη, δεν Îχετε επαÏκή $lang['media_update'] = 'ΦόÏτωση νÎας Îκδοσης'; $lang['media_restore'] = 'ΕπαναφοÏά αυτή της Îκδοσης'; $lang['searchresult'] = 'ΑποτÎλεσμα ÎÏευνας'; -$lang['email_signature_text'] = 'Αυτό το e-mail δημιουÏγήθηκε αυτόματα από την εφαÏμογή DokuWiki στην διεÏθυνση +$lang['email_signature_text'] = 'Αυτό το e-mail δημιουÏγήθηκε αυτόματα από την εφαÏμογή DokuWiki στην διεÏθυνση @DOKUWIKIURL@'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index d9c90cdf3d2945ab440b651d4a2130c7d5f4cbe5..6d96b1dc0a33f91c4465896a268d6068cab88ac8 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -18,6 +18,7 @@ * @author PaweÅ‚ Jan CzochaÅ„ski <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> * @author Maciej Helt <geraldziu@gmail.com> + * @author Kris Charatonik <krishary@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -83,6 +84,7 @@ $lang['regmissing'] = 'WypeÅ‚nij wszystkie pola.'; $lang['reguexists'] = 'Użytkownik o tej nazwie już istnieje.'; $lang['regsuccess'] = 'Utworzono użytkownika. HasÅ‚o zostaÅ‚o przesÅ‚ane pocztÄ….'; $lang['regsuccess2'] = 'Utworzono użytkownika.'; +$lang['regfail'] = 'Użytkownik nie mógÅ‚ zostać utworzony.'; $lang['regmailfail'] = 'WystÄ…piÅ‚ błąd przy wysyÅ‚aniu hasÅ‚a pocztÄ…!'; $lang['regbadmail'] = 'Adres e-mail jest nieprawidÅ‚owy!'; $lang['regbadpass'] = 'HasÅ‚a nie sÄ… identyczne, spróbuj ponownie.'; @@ -97,6 +99,7 @@ $lang['profdeleteuser'] = 'UsuÅ„ konto'; $lang['profdeleted'] = 'Twoje konto zostaÅ‚o usuniÄ™te z tej wiki'; $lang['profconfdelete'] = 'ChcÄ™ usunąć moje konto z tej wiki. <br/> Decyzja nie może być cofniÄ™ta.'; $lang['profconfdeletemissing'] = 'Pole potwierdzenia nie zostaÅ‚o zaznaczone'; +$lang['proffail'] = 'Profil użytkownika nie zostaÅ‚ uaktualniony.'; $lang['pwdforget'] = 'Nie pamiÄ™tasz hasÅ‚a? ZdobÄ…dź nowe!'; $lang['resendna'] = 'To wiki nie pozwala na powtórne przesyÅ‚anie hasÅ‚a.'; $lang['resendpwd'] = 'Podaj nowe hasÅ‚o dla'; @@ -341,9 +344,10 @@ $lang['media_perm_read'] = 'Przepraszamy, nie masz wystarczajÄ…cych uprawn $lang['media_perm_upload'] = 'Przepraszamy, nie masz wystarczajÄ…cych uprawnieÅ„ do przesyÅ‚ania plików.'; $lang['media_update'] = 'PrzeÅ›lij nowÄ… wersjÄ™'; $lang['media_restore'] = 'Odtwórz tÄ… wersjÄ™'; +$lang['media_acl_warning'] = 'Ta lista może nie być kompletna ze wzglÄ™du na ograniczenia ACL oraz ukryte strony.'; $lang['currentns'] = 'Obecny katalog'; $lang['searchresult'] = 'Wyniki wyszukiwania'; $lang['plainhtml'] = 'Czysty HTML'; $lang['wikimarkup'] = 'Znaczniki'; -$lang['email_signature_text'] = 'List zostaÅ‚ wygenerowany przez DokuWiki pod adresem +$lang['email_signature_text'] = 'List zostaÅ‚ wygenerowany przez DokuWiki pod adresem @DOKUWIKIURL@'; diff --git a/inc/load.php b/inc/load.php index b34c9850ac2997068f26d7a1be68cd651b45b4fe..9d571e1b05ce8876faa3d9c6ed603db735648a5a 100644 --- a/inc/load.php +++ b/inc/load.php @@ -10,7 +10,6 @@ spl_autoload_register('load_autoload'); // require all the common libraries // for a few of these order does matter -require_once(DOKU_INC.'inc/blowfish.php'); require_once(DOKU_INC.'inc/actions.php'); require_once(DOKU_INC.'inc/changelog.php'); require_once(DOKU_INC.'inc/common.php'); diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 02d2e66894afc467519d5f8c801461f2ef4f28f3..e31bf05cdd3e2ff6730fe9fd4c283d1c209fa86b 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -57,10 +57,16 @@ class Doku_Handler { array_push($this->calls,array('document_end',array(),$last_call[2])); } + /** + * fetch the current call and advance the pointer to the next one + * + * @return bool|mixed + */ function fetch() { - $call = each($this->calls); - if ( $call ) { - return $call['value']; + $call = current($this->calls); + if($call !== false) { + next($this->calls); //advance the pointer + return $call; } return false; } diff --git a/inc/plugin.php b/inc/plugin.php index fb6bb0b376dec07b27338a442f7bc404d5aa21d9..8a90c0a6efedf06c7c3dad3ef8aa0edaa57fa897 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -12,10 +12,10 @@ */ class DokuWiki_Plugin { - var $localised = false; // set to true by setupLocale() after loading language dependent strings - var $lang = array(); // array to hold language dependent strings, best accessed via ->getLang() - var $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables - var $conf = array(); // array to hold plugin settings, best accessed via ->getConf() + protected $localised = false; // set to true by setupLocale() after loading language dependent strings + protected $lang = array(); // array to hold language dependent strings, best accessed via ->getLang() + protected $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables + protected $conf = array(); // array to hold plugin settings, best accessed via ->getConf() /** * General Info diff --git a/inc/template.php b/inc/template.php index afb2ea5e7ac15f7aa0030c999d4c97a29c3adbc8..c5d9c18fcf3c0ccee859b2a28bcd194b60973e29 100644 --- a/inc/template.php +++ b/inc/template.php @@ -455,6 +455,7 @@ function _tpl_metaheaders_action($data) { echo "<!--[if gte IE 9]><!-->\n"; // no scripts for old IE } foreach($inst as $attr) { + if ( empty($attr) ) { continue; } echo '<', $tag, ' ', buildAttributes($attr); if(isset($attr['_data']) || $tag == 'script') { if($tag == 'script' && $attr['_data']) diff --git a/inc/utf8.php b/inc/utf8.php index 794db2bb5c0f034f9f682ad96828db3a49451e18..f82a663e46af0904184776ac9d29a17e4dad0c32 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -357,7 +357,7 @@ if(!function_exists('utf8_strtolower')){ */ function utf8_strtolower($string){ if(UTF8_MBSTRING) { - if (class_exists("Normalizer", $autoload = false)) + if (class_exists("Normalizer", $autoload = false)) return normalizer::normalize(mb_strtolower($string,'utf-8')); else return (mb_strtolower($string,'utf-8')); @@ -636,7 +636,7 @@ if(!class_exists('utf8_entity_decoder')){ * Encapsulate HTML entity decoding tables */ class utf8_entity_decoder { - var $table; + protected $table; /** * Initializes the decoding tables diff --git a/lib/plugins/acl/lang/el/lang.php b/lib/plugins/acl/lang/el/lang.php index 09c8691e76fc5b68480b6fc4587f8188534d5c95..75cc41501717aa061fa3d9f23ac4f5023fc87d5e 100644 --- a/lib/plugins/acl/lang/el/lang.php +++ b/lib/plugins/acl/lang/el/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Andreas Gohr <andi@splitbrain.org> * @author Anika Henke <anika@selfthinker.org> * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> diff --git a/lib/plugins/acl/lang/pl/lang.php b/lib/plugins/acl/lang/pl/lang.php index 4fa4e8b9d83edc42d9ddbc5b4389803e2b17901d..c840f449b64af4008b25b238f3bd964568e96f11 100644 --- a/lib/plugins/acl/lang/pl/lang.php +++ b/lib/plugins/acl/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 3771d475d44fab17deeeef43cc34e58907df2467..27c5c162aced526f0b47fd8cb89a93f0ffa18f11 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -15,7 +15,7 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { 'listAcls' => array( 'args' => array(), 'return' => 'Array of ACLs {scope, user, permission}', - 'name' => 'listAcl', + 'name' => 'listAcls', 'doc' => 'Get the list of all ACLs', ),'addAcl' => array( 'args' => array('string','string','int'), diff --git a/lib/plugins/authad/lang/ca/settings.php b/lib/plugins/authad/lang/ca/settings.php index b3ab89b7579676794d8f12d115bf23c226a192bf..161f55264b2268be6104405a0938f4a999e9f518 100644 --- a/lib/plugins/authad/lang/ca/settings.php +++ b/lib/plugins/authad/lang/ca/settings.php @@ -5,6 +5,7 @@ * * @author controlonline.net <controlonline.net@gmail.com> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> + * @author David Surroca <david.tb303@gmail.com> */ $lang['account_suffix'] = 'El teu nom de compte. Ej.<code>@my.domain.org</code>'; $lang['base_dn'] = 'Nom base DN. Ej. <code>DC=my,DC=domain,DC=org</code>'; @@ -14,4 +15,5 @@ $lang['admin_password'] = 'La contrasenya de l\'usuari referit abans. '; $lang['sso'] = 'S\'hauria de fer servir Kerberos o NTLM per inici de sessió únic?'; $lang['debug'] = 'Mostrar informació addicional de depuració en cas d\'error?'; +$lang['expirywarn'] = 'Dies per endavant en avisar l\'usuari sobre la caducitat de la contrasenya. 0 per desactivar.'; $lang['update_mail'] = 'Permetre els usuaris actualitzar la seva adreça de correu electrònic?'; diff --git a/lib/plugins/authad/lang/el/lang.php b/lib/plugins/authad/lang/el/lang.php index 39e3283ccfbdbb9cb380e5aa716532edf4d767a0..c6064f05c5cbf2efc6d15228338dd8768d9c3d26 100644 --- a/lib/plugins/authad/lang/el/lang.php +++ b/lib/plugins/authad/lang/el/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com */ $lang['authpwdexpire'] = 'Ο κωδικός Ï€Ïόσβασης θα λήξει σε %d ημÎÏες. Î Ïοτείνουμε να τον αλλάξετε σÏντομα.'; diff --git a/lib/plugins/authad/lang/el/settings.php b/lib/plugins/authad/lang/el/settings.php index 9bf23ea1c90712601da9a0b01d7104d4d9a49fcf..b7608dff04f0b6315d7a5bc47455dd1aebee4177 100644 --- a/lib/plugins/authad/lang/el/settings.php +++ b/lib/plugins/authad/lang/el/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author chris taklis <ctaklis@gmail.com> */ $lang['admin_password'] = 'Ο κωδικός του παÏαπάνω χÏήστη.'; diff --git a/lib/plugins/authad/lang/pl/lang.php b/lib/plugins/authad/lang/pl/lang.php index 645b46afa4fa3ae4b34ccdd7bdb247286a1df905..a83bac295908a67e2560286e4d91b89b82f546ee 100644 --- a/lib/plugins/authad/lang/pl/lang.php +++ b/lib/plugins/authad/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aoi Karasu <aoikarasu@gmail.com> */ $lang['authpwdexpire'] = 'Twoje hasÅ‚o wygaÅ›nie za %d dni. Należy je zmienić w krótkim czasie.'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index 537bae7ea648266f5f3c74da9ed2bb36576f318b..da0d3af00019b978f8f91860fe6c785ac1c41521 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -2,11 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Tomasz Bosak <bosak.tomasz@gmail.com> * @author PaweÅ‚ Jan CzochaÅ„ski <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> * @author Maciej Helt <geraldziu@gmail.com> + * @author Kris Charatonik <krishary@gmail.com> */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. <code>@my.domain.org</code>'; $lang['base_dn'] = 'Twoje bazowe DN. Na przykÅ‚ad: <code>DC=my,DC=domain,DC=org</code>'; @@ -20,3 +21,5 @@ $lang['use_ssl'] = 'Użyć połączenie SSL? JeÅ›li tak to nie akt $lang['use_tls'] = 'Użyć połączenie TLS? JeÅ›li tak to nie aktywuj SSL powyżej.'; $lang['debug'] = 'WyÅ›wietlać dodatkowe informacje do debugowania w przypadku błędów?'; $lang['expirywarn'] = 'Dni poprzedzajÄ…cych powiadomienie użytkownika o wygasajÄ…cym haÅ›le. 0 aby wyłączyć.'; +$lang['update_name'] = 'Zezwól użytkownikom na uaktualnianie nazwy wyÅ›wietlanej w AD?'; +$lang['update_mail'] = 'Zezwól użytkownikom na uaktualnianie ich adresu email?'; diff --git a/lib/plugins/authldap/lang/ca/lang.php b/lib/plugins/authldap/lang/ca/lang.php new file mode 100644 index 0000000000000000000000000000000000000000..f4431a389d2043fc0bd59cdd70624b22d13fa34c --- /dev/null +++ b/lib/plugins/authldap/lang/ca/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author David Surroca <david.tb303@gmail.com> + */ +$lang['connectfail'] = 'L\'LDAP no s\'ha pogut connectar: %s'; +$lang['domainfail'] = 'L\'LDAP no ha trobat el teu nom distingit d\'usuari'; diff --git a/lib/plugins/authldap/lang/ca/settings.php b/lib/plugins/authldap/lang/ca/settings.php index 005d48b76ff5acbdff0099d6556413ad72558a2b..2f73833adcb99de5ac8696260aa01d96d055ae34 100644 --- a/lib/plugins/authldap/lang/ca/settings.php +++ b/lib/plugins/authldap/lang/ca/settings.php @@ -4,5 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Àngel Pérez Beroy <aperezberoy@gmail.com> + * @author David Surroca <david.tb303@gmail.com> */ +$lang['starttls'] = 'Utilitzar connexions TLS?'; $lang['bindpw'] = 'Contrasenya de l\'usuari referit abans.'; diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php index 0f5281b13be60aa58ff3eddc96b9a62811c51704..cc7174f6f508d4f48f4124ff81bd2dd5961ec758 100644 --- a/lib/plugins/authldap/lang/pl/settings.php +++ b/lib/plugins/authldap/lang/pl/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author PaweÅ‚ Jan CzochaÅ„ski <czochanski@gmail.com> * @author Maciej Helt <geraldziu@gmail.com> */ diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 68b5c6c22f7c8ba5a357015bc97ba7c5b1cfd41a..075a5e8803cb4b74f9a146d81b536ba22250b217 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author PaweÅ‚ Jan CzochaÅ„ski <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> * @author Maciej Helt <geraldziu@gmail.com> diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php index 25a2afd4f199635a5140f6d3282ed6acd55d3a76..69422c0cfd95b6e32a6919e4ac1e3c54a62dce3b 100644 --- a/lib/plugins/authpgsql/lang/pl/settings.php +++ b/lib/plugins/authpgsql/lang/pl/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mati <mackosa@wp.pl> */ $lang['server'] = 'Twój serwer PostgreSQL'; diff --git a/lib/plugins/authplain/lang/az/lang.php b/lib/plugins/authplain/lang/az/lang.php index f98eccde17c5136f3117c2edfcdcb33f1ee291d0..8d29d4cd6085109f60c1f708561294d77e81b637 100644 --- a/lib/plugins/authplain/lang/az/lang.php +++ b/lib/plugins/authplain/lang/az/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'TÉ™ssüf ki bu ad ilÉ™ istifadəçi artıq mövcuddur.'; +$lang['userexists'] = 'TÉ™ssüf ki bu ad ilÉ™ istifadəçi artıq mövcuddur.'; diff --git a/lib/plugins/authplain/lang/el/lang.php b/lib/plugins/authplain/lang/el/lang.php index 7f7e4e76dc617a654a18a61c7ae159df000f616f..1d83eb1701f426dbe352cacfb2af167f33aeaef7 100644 --- a/lib/plugins/authplain/lang/el/lang.php +++ b/lib/plugins/authplain/lang/el/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Αυτός ο λογαÏιασμός υπάÏχει ήδη.'; +$lang['userexists'] = 'Αυτός ο λογαÏιασμός υπάÏχει ήδη.'; diff --git a/lib/plugins/authplain/lang/pl/lang.php b/lib/plugins/authplain/lang/pl/lang.php index 9a61b004764ff7030cd900587206b284a9b1bcb8..c4fb1a1ab55e303a6b44703c7a1eadec9ca97fa2 100644 --- a/lib/plugins/authplain/lang/pl/lang.php +++ b/lib/plugins/authplain/lang/pl/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Użytkownik o tej nazwie już istnieje.'; +$lang['userexists'] = 'Użytkownik o tej nazwie już istnieje.'; diff --git a/lib/plugins/config/_test/configuration.test.php b/lib/plugins/config/_test/configuration.test.php index 0185fff9aac71ed9d42a80abd7665f458f6d6f97..7455461a4816cde1e7e844e7345c3207ca473e16 100644 --- a/lib/plugins/config/_test/configuration.test.php +++ b/lib/plugins/config/_test/configuration.test.php @@ -15,6 +15,8 @@ class plugin_config_configuration_test extends DokuWikiTest { * Load config files */ function __construct() { + parent::__construct(); + $this->config = dirname(__FILE__).'/data/config.php'; $this->meta = dirname(__FILE__).'/data/metadata.php'; require_once(dirname(__FILE__).'/../settings/config.class.php'); diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index e760a41c1fcf87b49707e5b5811e5dbc385e00eb..262ff46d9b76201690f791275512481cd70b545d 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -24,23 +24,23 @@ require_once(PLUGIN_SELF.'settings/extra.class.php'); // settings classes spec */ class admin_plugin_config extends DokuWiki_Admin_Plugin { - var $_file = PLUGIN_METADATA; - var $_config = null; - var $_input = null; - var $_changed = false; // set to true if configuration has altered - var $_error = false; - var $_session_started = false; - var $_localised_prompts = false; + protected $_file = PLUGIN_METADATA; + protected $_config = null; + protected $_input = null; + protected $_changed = false; // set to true if configuration has altered + protected $_error = false; + protected $_session_started = false; + protected $_localised_prompts = false; /** * @return int */ - function getMenuSort() { return 100; } + public function getMenuSort() { return 100; } /** * handle user request */ - function handle() { + public function handle() { global $ID, $INPUT; if(!$this->_restore_session() || $INPUT->int('save') != 1 || !checkSecurityToken()) { @@ -86,7 +86,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { /** * output appropriate html */ - function html() { + public function html() { $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here. global $lang; global $ID; @@ -225,7 +225,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { /** * @return boolean true - proceed with handle, false - don't proceed */ - function _restore_session() { + protected function _restore_session() { // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set, // however they can't be changed without starting the session again @@ -251,14 +251,14 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { return true; } - function _close_session() { + protected function _close_session() { if ($this->_session_started) session_write_close(); } /** * @param bool $prompts */ - function setupLocale($prompts=false) { + public function setupLocale($prompts=false) { parent::setupLocale(); if (!$prompts || $this->_localised_prompts) return; @@ -271,7 +271,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { /** * @return bool */ - function _setup_localised_plugin_prompts() { + protected function _setup_localised_plugin_prompts() { global $conf; $langfile = '/lang/'.$conf['lang'].'/settings.php'; @@ -328,7 +328,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { * * @return array */ - function getTOC() { + public function getTOC() { if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } $this->setupLocale(true); @@ -387,9 +387,18 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { * @param string $id * @param string $text */ - function _print_h1($id, $text) { + protected function _print_h1($id, $text) { ptln('<h1 id="'.$id.'">'.$text.'</h1>'); } - + /** + * Adds a translation to this plugin's language array + * + * @param string $key + * @param string $value + */ + public function addLang($key, $value) { + if (!$this->localised) $this->setupLocale(); + $this->lang[$key] = $value; + } } diff --git a/lib/plugins/config/lang/ca/lang.php b/lib/plugins/config/lang/ca/lang.php index c85a5c3219711309ef72db0b57a586743cdcda02..7ef19e74c4f12098daf81975bd98c25a7b35798e 100644 --- a/lib/plugins/config/lang/ca/lang.php +++ b/lib/plugins/config/lang/ca/lang.php @@ -11,6 +11,7 @@ * @author controlonline.net <controlonline.net@gmail.com> * @author Pauet <pauet@gmx.com> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> + * @author David Surroca <david.tb303@gmail.com> */ $lang['menu'] = 'Parà metres de configuració'; $lang['error'] = 'Els parà metres no s\'han pogut actualitzar per causa d\'un valor incorrecte Reviseu els canvis i torneu a enviar-los.<br />Els valors incorrectes es ressaltaran amb un marc vermell.'; diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php index 8b1154ec572b3d919e929522caa628d660755010..b3c9d3cf712fd261d9606b27942b94200aa8171a 100644 --- a/lib/plugins/config/lang/cs/lang.php +++ b/lib/plugins/config/lang/cs/lang.php @@ -17,6 +17,7 @@ * @author Turkislav <turkislav@blabla.com> * @author Daniel SlováÄek <danslo@danslo.cz> * @author Martin RůžiÄka <martinr@post.cz> + * @author Pavel KrupiÄka <pajdacz@gmail.com> */ $lang['menu'] = 'Správa nastavenÃ'; $lang['error'] = 'Nastavenà nebyla zmÄ›nÄ›na kvůli alespoň jedné neplatné položce, @@ -159,6 +160,11 @@ $lang['renderer_xhtml'] = 'Vykreslovacà jádro pro hlavnà (xhtml) výst $lang['renderer__core'] = '%s (jádro DokuWiki)'; $lang['renderer__plugin'] = '%s (plugin)'; $lang['dnslookups'] = 'DokuWiki zjišťuje DNS jména pro vzdálené IP adresy uživatelů, kteřà editujà stránky. Pokud máte pomalý, nebo nefunkÄnà DNS server, nebo nepotÅ™ebujete tuto funkci, tak tuto volbu zruÅ¡te.'; +$lang['jquerycdn'] = 'Majà být skripty jQuery a jQuery UI naÄÃtány z CDN? +Vzniknou tÃm dalšà HTTP dotazy, ale soubory se mohou naÄÃst rychleji a uživatelé je už mohou mÃt ve vyrovnávacà pamÄ›ti.'; +$lang['jquerycdn_o_0'] = 'Bez CDN, pouze lokálnà doruÄenÃ'; +$lang['jquerycdn_o_jquery'] = 'CDN na code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN na cdnjs.com'; $lang['proxy____host'] = 'Název proxy serveru'; $lang['proxy____port'] = 'Proxy port'; $lang['proxy____user'] = 'Proxy uživatelské jméno'; diff --git a/lib/plugins/config/lang/el/lang.php b/lib/plugins/config/lang/el/lang.php index a94bcc479a2a06be70d4997bbb9557f4d55f3c01..7904c63bd4586ed5c9bd062e23261c3e8a1cd0a8 100644 --- a/lib/plugins/config/lang/el/lang.php +++ b/lib/plugins/config/lang/el/lang.php @@ -1,11 +1,8 @@ <?php + /** - * Greek language file - * - * Based on DokuWiki Version rc2007-05-24 english language file - * Original english language file contents included for reference - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Christopher Smith <chris@jalakai.co.uk> * @author Thanos Massias <tm@thriasio.gr> * @author Αθανάσιος Îταής <homunculus@wana.gr> @@ -13,6 +10,7 @@ * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Zacharias Sdregas <zsdregas@sch.gr> */ $lang['menu'] = 'Ρυθμίσεις'; $lang['error'] = 'Οι Ïυθμίσεις σας δεν Îγιναν δεκτÎÏ‚ λόγω λανθασμÎνης τιμής κάποιας ÏÏθμισης. ΔιοÏθώστε την λάθος τιμή και Ï€Ïοσπαθήστε ξανά. diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php index 48514812c5a09fef848b95742923e0397c5cc472..55db6eba4328718bd1d245139aafef8c4f9d8e1e 100644 --- a/lib/plugins/config/lang/pl/lang.php +++ b/lib/plugins/config/lang/pl/lang.php @@ -1,8 +1,8 @@ <?php + /** - * polish language file - * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 102fc85469ae25e41d643a79a3c0da22adc7d943..965c2a38c6a2bcc58aa99d34babe705882421cd6 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -513,11 +513,11 @@ if (!class_exists('setting')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @param admin_plugin_config $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - public function html(&$plugin, $echo=false) { + public function html(admin_plugin_config $plugin, $echo=false) { $disable = ''; if ($this->is_protected()) { @@ -565,10 +565,10 @@ if (!class_exists('setting')) { /** * Returns the localized prompt * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @return string text */ - public function prompt(&$plugin) { + public function prompt(admin_plugin_config $plugin) { $prompt = $plugin->getLang($this->_key); if (!$prompt) $prompt = htmlspecialchars(str_replace(array('____','_'),' ',$this->_key)); return $prompt; @@ -738,11 +738,11 @@ if (!class_exists('setting_array')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { $disable = ''; if ($this->is_protected()) { @@ -774,11 +774,11 @@ if (!class_exists('setting_string')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { $disable = ''; if ($this->is_protected()) { @@ -835,11 +835,11 @@ if (!class_exists('setting_password')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { $disable = $this->is_protected() ? 'disabled="disabled"' : ''; @@ -993,11 +993,11 @@ if (!class_exists('setting_onoff')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo = false) { + function html(admin_plugin_config $plugin, $echo = false) { $disable = ''; if ($this->is_protected()) { @@ -1047,11 +1047,11 @@ if (!class_exists('setting_multichoice')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo = false) { + function html(admin_plugin_config $plugin, $echo = false) { $disable = ''; $nochoice = ''; @@ -1247,11 +1247,11 @@ if (!class_exists('setting_multicheckbox')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show input value, when error occurred, otherwise the stored setting * @return string[] with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { $disable = ''; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 2445577d1288ae91e933c571b5b56edb7a2c6e10..41af42247dd664e4782552912436f2670d2ee8ab 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -172,20 +172,19 @@ if (!class_exists('setting_disableactions')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return array with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { global $lang; // make some language adjustments (there must be a better way) // transfer some DokuWiki language strings to the plugin - if (!$plugin->localised) $plugin->setupLocale(); - $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs']; - - foreach ($this->_choices as $choice) - if (isset($lang['btn_'.$choice])) $plugin->lang[$this->_key.'_'.$choice] = $lang['btn_'.$choice]; + $plugin->addLang($this->_key.'_revisions', $lang['btn_revs']); + foreach ($this->_choices as $choice) { + if (isset($lang['btn_'.$choice])) $plugin->addLang($this->_key.'_'.$choice, $lang['btn_'.$choice]); + } return parent::html($plugin, $echo); } @@ -281,22 +280,26 @@ if (!class_exists('setting_renderer')) { /** * Build html for label and input of setting * - * @param DokuWiki_Plugin $plugin object of config plugin + * @param admin_plugin_config $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting * @return array with content array(string $label_html, string $input_html) */ - function html(&$plugin, $echo=false) { + function html(admin_plugin_config $plugin, $echo=false) { // make some language adjustments (there must be a better way) // transfer some plugin names to the config plugin - if (!$plugin->localised) $plugin->setupLocale(); - - foreach ($this->_choices as $choice) { - if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) { - if (!isset($this->_prompts[$choice])) { - $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__core'],$choice); + foreach($this->_choices as $choice) { + if(!$plugin->getLang($this->_key . '_o_' . $choice)) { + if(!isset($this->_prompts[$choice])) { + $plugin->addLang( + $this->_key . '_o_' . $choice, + sprintf($plugin->getLang('renderer__core'), $choice) + ); } else { - $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__plugin'],$this->_prompts[$choice]); + $plugin->addLang( + $this->_key . '_o_' . $choice, + sprintf($plugin->getLang('renderer__plugin'), $this->_prompts[$choice]) + ); } } } diff --git a/lib/plugins/popularity/lang/el/lang.php b/lib/plugins/popularity/lang/el/lang.php index 37a0369304a8dcc334c33a1967a021e94ba6d8b9..fe38a98f7ad159a8257360a8c5ca5ec26fcd98e2 100644 --- a/lib/plugins/popularity/lang/el/lang.php +++ b/lib/plugins/popularity/lang/el/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> diff --git a/lib/plugins/popularity/lang/pl/lang.php b/lib/plugins/popularity/lang/pl/lang.php index 045574a69c6700a12c8caeba767bbe48d969a9cd..224c0eb7fa3256940c69598a135d116a23556cb6 100644 --- a/lib/plugins/popularity/lang/pl/lang.php +++ b/lib/plugins/popularity/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index 3ec3cd192f5154b747e97cc01c3b7ab196865926..1371f98f3015536b9963fe71634eb9d48f463f15 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -22,6 +22,7 @@ * @author Turkislav <turkislav@blabla.com> * @author Daniel SlováÄek <danslo@danslo.cz> * @author Martin RůžiÄka <martinr@post.cz> + * @author Pavel KrupiÄka <pajdacz@gmail.com> */ $lang['menu'] = 'Obnova zaspamovaných stránek'; $lang['filter'] = 'Hledat zaspamované stránky'; diff --git a/lib/plugins/revert/lang/el/lang.php b/lib/plugins/revert/lang/el/lang.php index 4c93ee5a85bc3b93a9ef03f1802746c2eec40e24..48bbb22d048f296d6bf84b37a4c1192aa23c8c6c 100644 --- a/lib/plugins/revert/lang/el/lang.php +++ b/lib/plugins/revert/lang/el/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Thanos Massias <tm@thriasio.gr> * @author Αθανάσιος Îταής <homunculus@wana.gr> * @author Konstantinos Koryllos <koryllos@gmail.com> diff --git a/lib/plugins/revert/lang/pl/lang.php b/lib/plugins/revert/lang/pl/lang.php index d2d53b87e72c09c15581f16f1dd7308886e3d345..d9b917e46c5ff6fa9bfbb08765af36d5de152cce 100644 --- a/lib/plugins/revert/lang/pl/lang.php +++ b/lib/plugins/revert/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com> diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 1f0ee74368d6f9e7134b70eb37d20a9495833481..299e0183db012f185d219a5b275f75c74dc49212 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -103,7 +103,7 @@ importuser,"Ford Prefect",ford@example.com,user '; $failures = array( '2' => array( - 'error' => $this->usermanager->lang['import_error_create'], + 'error' => $this->usermanager->getLang('import_error_create'), 'user' => array( 'importuser', 'Ford Prefect', diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php index f3cc72c2730740173d630ce5cdec8b929eebc202..e524e451bd4261b467838641ae2ae36b4ec3bef3 100644 --- a/lib/plugins/usermanager/_test/mocks.class.php +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -12,6 +12,9 @@ class admin_mock_usermanager extends admin_plugin_usermanager { public $mock_email_notifications = true; public $mock_email_notifications_sent = 0; + public $localised; + public $lang; + public function getImportFailures() { return $this->_import_failures; } diff --git a/lib/plugins/usermanager/lang/el/lang.php b/lib/plugins/usermanager/lang/el/lang.php index e14aa615e8e5c7c43a2ee65365ccc9c8c4d1aa9d..a838f7346b541be4a9de66213ddcfdcc758062d8 100644 --- a/lib/plugins/usermanager/lang/el/lang.php +++ b/lib/plugins/usermanager/lang/el/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Chris Smith <chris@jalakai.co.uk> * @author Thanos Massias <tm@thriasio.gr> * @author Αθανάσιος Îταής <homunculus@wana.gr> diff --git a/lib/plugins/usermanager/lang/pl/lang.php b/lib/plugins/usermanager/lang/pl/lang.php index 2e063d2bb5823a68915efd3b98ce3177da48711e..fb0ddd7d66db4a9240ecbe972bfb2be51b09f097 100644 --- a/lib/plugins/usermanager/lang/pl/lang.php +++ b/lib/plugins/usermanager/lang/pl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Grzegorz Å»ur <grzegorz.zur@gmail.com> * @author Mariusz Kujawski <marinespl@gmail.com> * @author Maciej Kurczewski <pipijajko@gmail.com>