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..4f872eb5168c474330484631b27c427cd9d06162 100644 --- a/_test/tests/inc/auth_password.test.php +++ b/_test/tests/inc/auth_password.test.php @@ -3,7 +3,7 @@ class auth_password_test extends DokuWikiTest { // hashes for the password foo$method, using abcdefgh12345678912345678912345678 as salt - var $passes = array( + protected $passes = array( 'smd5' => '$1$abcdefgh$SYbjm2AEvSoHG7Xapi8so.', 'apr1' => '$apr1$abcdefgh$C/GzYTF4kOVByYLEoD5X4.', 'md5' => '8fa22d62408e5351553acdd91c6b7003', 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/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/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/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/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/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/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; }